Skip to content

Commit 8252d93

Browse files
committed
fix merge conflicts
2 parents af5f54d + a49e755 commit 8252d93

154 files changed

Lines changed: 9580 additions & 5297 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

apps/docs/content/docs/en/integrations/jira_service_management.mdx

Lines changed: 266 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -988,6 +988,272 @@ Copy forms from one Jira issue to another
988988
| `copiedForms` | json | Array of successfully copied forms |
989989
| `errors` | json | Array of errors encountered during copy |
990990

991+
### `jsm_list_object_schemas`
992+
993+
List Assets (Insight/CMDB) object schemas in Jira Service Management
994+
995+
#### Input
996+
997+
| Parameter | Type | Required | Description |
998+
| --------- | ---- | -------- | ----------- |
999+
| `domain` | string | Yes | Your Jira domain \(e.g., yourcompany.atlassian.net\) |
1000+
| `cloudId` | string | No | Jira Cloud ID for the instance |
1001+
| `workspaceId` | string | No | Assets workspace ID \(resolved automatically when omitted\) |
1002+
| `startAt` | number | No | Pagination start index \(e.g., 0, 50\) |
1003+
| `maxResults` | number | No | Maximum schemas to return \(e.g., 25, 50\) |
1004+
| `includeCounts` | boolean | No | Include object and object-type counts per schema |
1005+
1006+
#### Output
1007+
1008+
| Parameter | Type | Description |
1009+
| --------- | ---- | ----------- |
1010+
| `ts` | string | Timestamp of the operation |
1011+
| `schemas` | array | List of Assets object schemas |
1012+
|`id` | string | Schema ID |
1013+
|`name` | string | Schema name |
1014+
|`objectSchemaKey` | string | Schema key |
1015+
|`status` | string | Schema status |
1016+
|`description` | string | Schema description |
1017+
|`objectCount` | number | Number of objects |
1018+
|`objectTypeCount` | number | Number of object types |
1019+
| `total` | number | Total number of schemas |
1020+
| `isLast` | boolean | Whether this is the last page |
1021+
1022+
### `jsm_get_object_schema`
1023+
1024+
Get a single Assets (Insight/CMDB) object schema by ID
1025+
1026+
#### Input
1027+
1028+
| Parameter | Type | Required | Description |
1029+
| --------- | ---- | -------- | ----------- |
1030+
| `domain` | string | Yes | Your Jira domain \(e.g., yourcompany.atlassian.net\) |
1031+
| `cloudId` | string | No | Jira Cloud ID for the instance |
1032+
| `workspaceId` | string | No | Assets workspace ID \(resolved automatically when omitted\) |
1033+
| `schemaId` | string | Yes | The Assets object schema ID |
1034+
1035+
#### Output
1036+
1037+
| Parameter | Type | Description |
1038+
| --------- | ---- | ----------- |
1039+
| `ts` | string | Timestamp of the operation |
1040+
| `schema` | json | The Assets object schema |
1041+
|`id` | string | Schema ID |
1042+
|`name` | string | Schema name |
1043+
|`objectSchemaKey` | string | Schema key |
1044+
|`status` | string | Schema status |
1045+
|`description` | string | Schema description |
1046+
|`objectCount` | number | Number of objects |
1047+
|`objectTypeCount` | number | Number of object types |
1048+
1049+
### `jsm_list_object_types`
1050+
1051+
List object types within an Assets (Insight/CMDB) object schema
1052+
1053+
#### Input
1054+
1055+
| Parameter | Type | Required | Description |
1056+
| --------- | ---- | -------- | ----------- |
1057+
| `domain` | string | Yes | Your Jira domain \(e.g., yourcompany.atlassian.net\) |
1058+
| `cloudId` | string | No | Jira Cloud ID for the instance |
1059+
| `workspaceId` | string | No | Assets workspace ID \(resolved automatically when omitted\) |
1060+
| `schemaId` | string | Yes | The Assets object schema ID to list object types for |
1061+
| `excludeAbstract` | boolean | No | Exclude abstract object types from the result |
1062+
1063+
#### Output
1064+
1065+
| Parameter | Type | Description |
1066+
| --------- | ---- | ----------- |
1067+
| `ts` | string | Timestamp of the operation |
1068+
| `objectTypes` | array | List of object types in the schema |
1069+
|`id` | string | Object type ID |
1070+
|`name` | string | Object type name |
1071+
|`description` | string | Object type description |
1072+
|`objectSchemaId` | string | Parent schema ID |
1073+
|`objectCount` | number | Number of objects |
1074+
|`abstractObjectType` | boolean | Whether the type is abstract |
1075+
|`inherited` | boolean | Whether the type inherits attributes |
1076+
| `total` | number | Total number of object types |
1077+
1078+
### `jsm_get_object_type_attributes`
1079+
1080+
Get the attribute definitions for an Assets (Insight/CMDB) object type. Use the returned attribute IDs to build create/update payloads or map columns.
1081+
1082+
#### Input
1083+
1084+
| Parameter | Type | Required | Description |
1085+
| --------- | ---- | -------- | ----------- |
1086+
| `domain` | string | Yes | Your Jira domain \(e.g., yourcompany.atlassian.net\) |
1087+
| `cloudId` | string | No | Jira Cloud ID for the instance |
1088+
| `workspaceId` | string | No | Assets workspace ID \(resolved automatically when omitted\) |
1089+
| `objectTypeId` | string | Yes | The Assets object type ID |
1090+
| `onlyValueEditable` | boolean | No | Return only attributes whose values can be edited |
1091+
| `query` | string | No | Filter attributes by a search query |
1092+
1093+
#### Output
1094+
1095+
| Parameter | Type | Description |
1096+
| --------- | ---- | ----------- |
1097+
| `ts` | string | Timestamp of the operation |
1098+
| `attributes` | array | Attribute definitions for the object type |
1099+
|`id` | string | Attribute definition ID — use as objectTypeAttributeId in create/update |
1100+
|`name` | string | Attribute name |
1101+
|`label` | boolean | Whether this attribute is the object label |
1102+
|`type` | number | Data type discriminator \(integer enum\) |
1103+
|`defaultType` | json | Default data type \{ id, name \} |
1104+
|`editable` | boolean | Whether the value is editable |
1105+
|`minimumCardinality` | number | Minimum number of values \(>= 1 means required\) |
1106+
|`maximumCardinality` | number | Maximum number of values |
1107+
|`uniqueAttribute` | boolean | Whether values must be unique |
1108+
| `total` | number | Total number of attributes |
1109+
1110+
### `jsm_search_objects_aql`
1111+
1112+
Search Assets (Insight/CMDB) objects using AQL (Assets Query Language), e.g. objectType =
1113+
1114+
#### Input
1115+
1116+
| Parameter | Type | Required | Description |
1117+
| --------- | ---- | -------- | ----------- |
1118+
| `domain` | string | Yes | Your Jira domain \(e.g., yourcompany.atlassian.net\) |
1119+
| `cloudId` | string | No | Jira Cloud ID for the instance |
1120+
| `workspaceId` | string | No | Assets workspace ID \(resolved automatically when omitted\) |
1121+
| `qlQuery` | string | Yes | AQL query string \(e.g., objectType = "Host" AND "Operating System" = "Ubuntu"\) |
1122+
| `page` | number | No | Page number \(1-based, defaults to 1\) |
1123+
| `resultsPerPage` | number | No | Results per page \(e.g., 25, 50\) |
1124+
| `includeAttributes` | boolean | No | Include resolved attribute values on each object \(defaults to true\) |
1125+
| `objectTypeId` | string | No | Optionally scope the search to a single object type ID |
1126+
| `objectSchemaId` | string | No | Optionally scope the search to a single object schema ID |
1127+
1128+
#### Output
1129+
1130+
| Parameter | Type | Description |
1131+
| --------- | ---- | ----------- |
1132+
| `ts` | string | Timestamp of the operation |
1133+
| `objects` | array | Matching Assets objects |
1134+
|`id` | string | Object ID |
1135+
|`label` | string | Object label |
1136+
|`objectKey` | string | Object key \(e.g., HOST-123\) |
1137+
|`objectType` | json | Object type metadata |
1138+
|`attributes` | json | Resolved attribute values |
1139+
| `total` | number | Total number of matching objects \(totalFilterCount\) |
1140+
| `pageNumber` | number | Current page number |
1141+
| `pageSize` | number | Number of objects on this page |
1142+
1143+
### `jsm_get_object`
1144+
1145+
Get a single Assets (Insight/CMDB) object by ID, including its attribute values
1146+
1147+
#### Input
1148+
1149+
| Parameter | Type | Required | Description |
1150+
| --------- | ---- | -------- | ----------- |
1151+
| `domain` | string | Yes | Your Jira domain \(e.g., yourcompany.atlassian.net\) |
1152+
| `cloudId` | string | No | Jira Cloud ID for the instance |
1153+
| `workspaceId` | string | No | Assets workspace ID \(resolved automatically when omitted\) |
1154+
| `objectId` | string | Yes | The Assets object ID |
1155+
1156+
#### Output
1157+
1158+
| Parameter | Type | Description |
1159+
| --------- | ---- | ----------- |
1160+
| `ts` | string | Timestamp of the operation |
1161+
| `object` | json | The Assets object |
1162+
|`id` | string | Object ID |
1163+
|`label` | string | Human-readable object label |
1164+
|`objectKey` | string | Object key \(e.g., HOST-123\) |
1165+
|`globalId` | string | Global object ID |
1166+
|`objectType` | json | Object type metadata |
1167+
|`attributes` | json | Resolved attribute values for the object |
1168+
|`hasAvatar` | boolean | Whether the object has an avatar |
1169+
|`created` | string | Creation timestamp |
1170+
|`updated` | string | Last update timestamp |
1171+
|`link` | string | Self link to the object |
1172+
1173+
### `jsm_create_object`
1174+
1175+
Create an Assets (Insight/CMDB) object of a given object type. Attributes use objectTypeAttributeId values from the object type definition.
1176+
1177+
#### Input
1178+
1179+
| Parameter | Type | Required | Description |
1180+
| --------- | ---- | -------- | ----------- |
1181+
| `domain` | string | Yes | Your Jira domain \(e.g., yourcompany.atlassian.net\) |
1182+
| `cloudId` | string | No | Jira Cloud ID for the instance |
1183+
| `workspaceId` | string | No | Assets workspace ID \(resolved automatically when omitted\) |
1184+
| `objectTypeId` | string | Yes | The object type ID to create the object under |
1185+
| `attributes` | json | Yes | Array of attributes: \[\{ objectTypeAttributeId, objectAttributeValues: \[\{ value \}\] \}\] |
1186+
1187+
#### Output
1188+
1189+
| Parameter | Type | Description |
1190+
| --------- | ---- | ----------- |
1191+
| `ts` | string | Timestamp of the operation |
1192+
| `object` | json | The created Assets object |
1193+
|`id` | string | Object ID |
1194+
|`label` | string | Human-readable object label |
1195+
|`objectKey` | string | Object key \(e.g., HOST-123\) |
1196+
|`globalId` | string | Global object ID |
1197+
|`objectType` | json | Object type metadata |
1198+
|`attributes` | json | Resolved attribute values for the object |
1199+
|`hasAvatar` | boolean | Whether the object has an avatar |
1200+
|`created` | string | Creation timestamp |
1201+
|`updated` | string | Last update timestamp |
1202+
|`link` | string | Self link to the object |
1203+
1204+
### `jsm_update_object`
1205+
1206+
Update an existing Assets (Insight/CMDB) object. Provide the attributes to change using their objectTypeAttributeId values.
1207+
1208+
#### Input
1209+
1210+
| Parameter | Type | Required | Description |
1211+
| --------- | ---- | -------- | ----------- |
1212+
| `domain` | string | Yes | Your Jira domain \(e.g., yourcompany.atlassian.net\) |
1213+
| `cloudId` | string | No | Jira Cloud ID for the instance |
1214+
| `workspaceId` | string | No | Assets workspace ID \(resolved automatically when omitted\) |
1215+
| `objectId` | string | Yes | The Assets object ID to update |
1216+
| `attributes` | json | Yes | Array of attributes to set: \[\{ objectTypeAttributeId, objectAttributeValues: \[\{ value \}\] \}\] |
1217+
| `objectTypeId` | string | No | Optional object type ID \(only if changing the type\) |
1218+
1219+
#### Output
1220+
1221+
| Parameter | Type | Description |
1222+
| --------- | ---- | ----------- |
1223+
| `ts` | string | Timestamp of the operation |
1224+
| `object` | json | The updated Assets object |
1225+
|`id` | string | Object ID |
1226+
|`label` | string | Human-readable object label |
1227+
|`objectKey` | string | Object key \(e.g., HOST-123\) |
1228+
|`globalId` | string | Global object ID |
1229+
|`objectType` | json | Object type metadata |
1230+
|`attributes` | json | Resolved attribute values for the object |
1231+
|`hasAvatar` | boolean | Whether the object has an avatar |
1232+
|`created` | string | Creation timestamp |
1233+
|`updated` | string | Last update timestamp |
1234+
|`link` | string | Self link to the object |
1235+
1236+
### `jsm_delete_object`
1237+
1238+
Delete an Assets (Insight/CMDB) object by ID
1239+
1240+
#### Input
1241+
1242+
| Parameter | Type | Required | Description |
1243+
| --------- | ---- | -------- | ----------- |
1244+
| `domain` | string | Yes | Your Jira domain \(e.g., yourcompany.atlassian.net\) |
1245+
| `cloudId` | string | No | Jira Cloud ID for the instance |
1246+
| `workspaceId` | string | No | Assets workspace ID \(resolved automatically when omitted\) |
1247+
| `objectId` | string | Yes | The Assets object ID to delete |
1248+
1249+
#### Output
1250+
1251+
| Parameter | Type | Description |
1252+
| --------- | ---- | ----------- |
1253+
| `ts` | string | Timestamp of the operation |
1254+
| `objectId` | string | The deleted object ID |
1255+
| `deleted` | boolean | Whether the object was deleted |
1256+
9911257

9921258

9931259
## Triggers
Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
import { env } from '@/lib/core/config/env'
2-
import { isGithubAuthDisabled, isGoogleAuthDisabled, isProd } from '@/lib/core/config/feature-flags'
2+
import {
3+
isGithubAuthDisabled,
4+
isGoogleAuthDisabled,
5+
isMicrosoftAuthDisabled,
6+
isProd,
7+
} from '@/lib/core/config/feature-flags'
38

49
export async function getOAuthProviderStatus() {
510
const githubAvailable =
@@ -8,5 +13,8 @@ export async function getOAuthProviderStatus() {
813
const googleAvailable =
914
!!(env.GOOGLE_CLIENT_ID && env.GOOGLE_CLIENT_SECRET) && !isGoogleAuthDisabled
1015

11-
return { githubAvailable, googleAvailable, isProduction: isProd }
16+
const microsoftAvailable =
17+
!!(env.MICROSOFT_CLIENT_ID && env.MICROSOFT_CLIENT_SECRET) && !isMicrosoftAuthDisabled
18+
19+
return { githubAvailable, googleAvailable, microsoftAvailable, isProduction: isProd }
1220
}

apps/sim/app/(auth)/components/social-login-buttons.tsx

Lines changed: 41 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@
22

33
import { type ReactNode, useState } from 'react'
44
import { Button } from '@/components/emcn'
5-
import { GithubIcon, GoogleIcon } from '@/components/icons'
5+
import { GithubIcon, GoogleIcon, MicrosoftIcon } from '@/components/icons'
66
import { client } from '@/lib/auth/auth-client'
77

88
interface SocialLoginButtonsProps {
99
githubAvailable: boolean
1010
googleAvailable: boolean
11+
microsoftAvailable: boolean
1112
callbackURL?: string
1213
isProduction: boolean
1314
children?: ReactNode
@@ -16,12 +17,14 @@ interface SocialLoginButtonsProps {
1617
export function SocialLoginButtons({
1718
githubAvailable,
1819
googleAvailable,
20+
microsoftAvailable,
1921
callbackURL = '/workspace',
2022
isProduction,
2123
children,
2224
}: SocialLoginButtonsProps) {
2325
const [isGithubLoading, setIsGithubLoading] = useState(false)
2426
const [isGoogleLoading, setIsGoogleLoading] = useState(false)
27+
const [isMicrosoftLoading, setIsMicrosoftLoading] = useState(false)
2528

2629
async function signInWithGithub() {
2730
if (!githubAvailable) return
@@ -69,6 +72,29 @@ export function SocialLoginButtons({
6972
}
7073
}
7174

75+
async function signInWithMicrosoft() {
76+
if (!microsoftAvailable) return
77+
78+
setIsMicrosoftLoading(true)
79+
try {
80+
await client.signIn.social({ provider: 'microsoft', callbackURL })
81+
} catch (err: any) {
82+
let errorMessage = 'Failed to sign in with Microsoft'
83+
84+
if (err.message?.includes('account exists')) {
85+
errorMessage = 'An account with this email already exists. Please sign in instead.'
86+
} else if (err.message?.includes('cancelled')) {
87+
errorMessage = 'Microsoft sign in was cancelled. Please try again.'
88+
} else if (err.message?.includes('network')) {
89+
errorMessage = 'Network error. Please check your connection and try again.'
90+
} else if (err.message?.includes('rate limit')) {
91+
errorMessage = 'Too many attempts. Please try again later.'
92+
}
93+
} finally {
94+
setIsMicrosoftLoading(false)
95+
}
96+
}
97+
7298
const githubButton = (
7399
<Button
74100
variant='outline'
@@ -93,7 +119,19 @@ export function SocialLoginButtons({
93119
</Button>
94120
)
95121

96-
const hasAnyOAuthProvider = githubAvailable || googleAvailable
122+
const microsoftButton = (
123+
<Button
124+
variant='outline'
125+
className='w-full rounded-sm border-[var(--landing-border-strong)] py-1.5 text-sm'
126+
disabled={!microsoftAvailable || isMicrosoftLoading}
127+
onClick={signInWithMicrosoft}
128+
>
129+
<MicrosoftIcon className='!h-[18px] !w-[18px] mr-1' />
130+
{isMicrosoftLoading ? 'Connecting...' : 'Microsoft'}
131+
</Button>
132+
)
133+
134+
const hasAnyOAuthProvider = githubAvailable || googleAvailable || microsoftAvailable
97135

98136
if (!hasAnyOAuthProvider && !children) {
99137
return null
@@ -102,6 +140,7 @@ export function SocialLoginButtons({
102140
return (
103141
<div className='grid gap-3 font-light'>
104142
{googleAvailable && googleButton}
143+
{microsoftAvailable && microsoftButton}
105144
{githubAvailable && githubButton}
106145
{children}
107146
</div>

0 commit comments

Comments
 (0)