Skip to content

The open alternative to Salesforce, designed for AI.

Track application installs and uninstalls with deterministic queue jobs (#25502)

martmullcc4ad05d3d60
diff --git a/packages/twenty-client-sdk/src/metadata/generated/schema.graphql b/packages/twenty-client-sdk/src/metadata/generated/schema.graphql
index 9534ae786ab..ef806aafda6 100644
--- a/packages/twenty-client-sdk/src/metadata/generated/schema.graphql
+++ b/packages/twenty-client-sdk/src/metadata/generated/schema.graphql
@@ -535,7 +535,6 @@ type Application {
logoFileId: UUID
version: String
universalIdentifier: String!
- state: ApplicationState!
packageJsonChecksum: String
packageJsonFileId: UUID
yarnLockChecksum: String
@@ -557,13 +556,6 @@ type Application {
logoUrl: String
}
-enum ApplicationState {
- INSTALLING
- INSTALLED
- UPGRADING
- UNINSTALLING
-}
-
type TwoFactorAuthenticationMethodSummary {
twoFactorAuthenticationMethodId: UUID!
status: String!
@@ -2317,6 +2309,14 @@ type MarketplaceAppDetail {
manifest: JSON @deprecated(reason: "Use the explicit MarketplaceAppDetail fields (description, author, roles, ...) instead")
}
+type TriggerInstallApplicationJobResult {
+ jobId: String!
+}
+
+type TriggerUninstallApplicationJobResult {
+ jobId: String!
+}
+
type WorkspaceCompanyEnrichmentResult {
outcome: WorkspaceCompanyEnrichmentOutcome!
enrichment: JSON
@@ -3586,6 +3586,8 @@ type Query {
githubClaimAuthorizationUrl(applicationRegistrationId: String!): String!
findManyApplications: [Application!]!
findOneApplication(id: UUID, universalIdentifier: UUID): Application!
+ findInstallApplicationJobStatus(universalIdentifier: String!): JobStatus
+ findUninstallApplicationJobStatus(universalIdentifier: String!): JobStatus
findManyMarketplaceApps(universalIdentifiers: [String!]): [MarketplaceApp!]!
findMarketplaceAppDetail(universalIdentifier: String!): MarketplaceAppDetail!
publicMarketplaceApps(isVetted: Boolean! = true): [MarketplaceApp!]!
@@ -3880,6 +3882,8 @@ type Mutation {
transferApplicationRegistrationOwnership(applicationRegistrationId: String!, targetWorkspaceSubdomain: String!): ApplicationRegistration!
installMarketplaceApp(universalIdentifier: String!, version: String): Boolean! @deprecated(reason: "Use installApplication instead")
installApplication(universalIdentifier: String!, version: String): Application!
+ triggerInstallApplicationJob(input: TriggerInstallApplicationJobInput!): TriggerInstallApplicationJobResult!
+ triggerUninstallApplicationJob(input: TriggerUninstallApplicationJobInput!): TriggerUninstallApplicationJobResult!
updateApplication(id: UUID!, input: UpdateApplicationInput!): Application!
uninstallApplication(universalIdentifier: String!): Boolean!
syncMarketplaceCatalog: Boolean!
@@ -4777,6 +4781,14 @@ input UpdateApplicationRegistrationVariablePayload {
description: String
}
+input TriggerInstallApplicationJobInput {
+ universalIdentifier: String!
+}
+
+input TriggerUninstallApplicationJobInput {
+ universalIdentifier: String!
+}
+
input UpdateApplicationInput {
autoUpgrade: Boolean
}
diff --git a/packages/twenty-client-sdk/src/metadata/generated/schema.ts b/packages/twenty-client-sdk/src/metadata/generated/schema.ts
index a8640ea6a12..086a79bfc63 100644
--- a/packages/twenty-client-sdk/src/metadata/generated/schema.ts
+++ b/packages/twenty-client-sdk/src/metadata/generated/schema.ts
@@ -350,7 +350,6 @@ export interface Application {
logoFileId?: Scalars['UUID']
version?: Scalars['String']
universalIdentifier: Scalars['String']
- state: ApplicationState
packageJsonChecksum?: Scalars['String']
packageJsonFileId?: Scalars['UUID']
yarnLockChecksum?: Scalars['String']
@@ -373,8 +372,6 @@ export interface Application {
__typename: 'Application'
}
-export type ApplicationState = 'INSTALLING' | 'INSTALLED' | 'UPGRADING' | 'UNINSTALLING'
-
export interface TwoFactorAuthenticationMethodSummary {
twoFactorAuthenticationMethodId: Scalars['UUID']
status: Scalars['String']
@@ -1954,6 +1951,16 @@ export interface MarketplaceAppDetail {
__typename: 'MarketplaceAppDetail'
}
+export interface TriggerInstallApplicationJobResult {
+ jobId: Scalars['String']
+ __typename: 'TriggerInstallApplicationJobResult'
+}
+
+export interface TriggerUninstallApplicationJobResult {
+ jobId: Scalars['String']
+ __typename: 'TriggerUninstallApplicationJobResult'
+}
+
export interface WorkspaceCompanyEnrichmentResult {
outcome: WorkspaceCompanyEnrichmentOutcome
enrichment?: Scalars['JSON']
@@ -3134,6 +3141,8 @@ export interface Query {
githubClaimAuthorizationUrl: Scalars['String']
findManyApplications: Application[]
findOneApplication: Application
+ findInstallApplicationJobStatus?: JobStatus
+ findUninstallApplicationJobStatus?: JobStatus
findManyMarketplaceApps: MarketplaceApp[]
findMarketplaceAppDetail: MarketplaceAppDetail
publicMarketplaceApps: MarketplaceApp[]
@@ -3320,6 +3329,8 @@ export interface Mutation {
/** @deprecated Use installApplication instead */
installMarketplaceApp: Scalars['Boolean']
installApplication: Application
+ triggerInstallApplicationJob: TriggerInstallApplicationJobResult
+ triggerUninstallApplicationJob: TriggerUninstallApplicationJobResult
updateApplication: Application
uninstallApplication: Scalars['Boolean']
syncMarketplaceCatalog: Scalars['Boolean']
@@ -3824,7 +3835,6 @@ export interface ApplicationGenqlSelection{
logoFileId?: boolean | number
version?: boolean | number
universalIdentifier?: boolean | number
- state?: boolean | number
packageJsonChecksum?: boolean | number
packageJsonFileId?: boolean | number
yarnLockChecksum?: boolean | number
@@ -5486,6 +5496,18 @@ export interface MarketplaceAppDetailGenqlSelection{
__scalar?: boolean | number
}
+export interface TriggerInstallApplicationJobResultGenqlSelection{
+ jobId?: boolean | number
+ __typename?: boolean | number
+ __scalar?: boolean | number
+}
+
+export interface TriggerUninstallApplicationJobResultGenqlSelection{
+ jobId?: boolean | number
+ __typename?: boolean | number
+ __scalar?: boolean | number
+}
+
export interface WorkspaceCompanyEnrichmentResultGenqlSelection{
outcome?: boolean | number
enrichment?: boolean | number
@@ -6723,6 +6745,8 @@ export interface QueryGenqlSelection{
githubClaimAuthorizationUrl?: { __args: {applicationRegistrationId: Scalars['String']} }
findManyApplications?: ApplicationGenqlSelection
findOneApplication?: (ApplicationGenqlSelection & { __args?: {id?: (Scalars['UUID'] | null), universalIdentifier?: (Scalars['UUID'] | null)} })
+ findInstallApplicationJobStatus?: (JobStatusGenqlSelection & { __args: {universalIdentifier: Scalars['String']} })
+ findUninstallApplicationJobStatus?: (JobStatusGenqlSelection & { __args: {universalIdentifier: Scalars['String']} })
findManyMarketplaceApps?: (MarketplaceAppGenqlSelection & { __args?: {universalIdentifiers?: (Scalars['String'][] | null)} })
findMarketplaceAppDetail?: (MarketplaceAppDetailGenqlSelection & { __args: {universalIdentifier: Scalars['String']} })
publicMarketplaceApps?: (MarketplaceAppGenqlSelection & { __args: {isVetted: Scalars['Boolean']} })
@@ -6948,6 +6972,8 @@ export interface MutationGenqlSelection{
/** @deprecated Use installApplication instead */
installMarketplaceApp?: { __args: {universalIdentifier: Scalars['String'], version?: (Scalars['String'] | null)} }
installApplication?: (ApplicationGenqlSelection & { __args: {universalIdentifier: Scalars['String'], version?: (Scalars['String'] | null)} })
+ triggerInstallApplicationJob?: (TriggerInstallApplicationJobResultGenqlSelection & { __args: {input: TriggerInstallApplicationJobInput} })
+ triggerUninstallApplicationJob?: (TriggerUninstallApplicationJobResultGenqlSelection & { __args: {input: TriggerUninstallApplicationJobInput} })
updateApplication?: (ApplicationGenqlSelection & { __args: {id: Scalars['UUID'], input: UpdateApplicationInput} })
uninstallApplication?: { __args: {universalIdentifier: Scalars['String']} }
syncMarketplaceCatalog?: boolean | number
@@ -7337,6 +7363,10 @@ export interface UpdateApplicationRegistrationVariableInput {id: Scalars['String
export interface UpdateApplicationRegistrationVariablePayload {value?: (Scalars['String'] | null),resetValue?: (Scalars['Boolean'] | null),description?: (Scalars['String'] | null)}
+export interface TriggerInstallApplicationJobInput {universalIdentifier: Scalars['String']}
+
+export interface TriggerUninstallApplicationJobInput {universalIdentifier: Scalars['String']}
+
export interface UpdateApplicationInput {autoUpgrade?: (Scalars['Boolean'] | null)}
export interface CreateOneFieldMetadataInput {
@@ -8825,6 +8855,22 @@ export interface LogicFunctionLogsInput {applicationId?: (Scalars['UUID'] | null
+ const TriggerInstallApplicationJobResult_possibleTypes: string[] = ['TriggerInstallApplicationJobResult']
+ export const isTriggerInstallApplicationJobResult = (obj?: { __typename?: any } | null): obj is TriggerInstallApplicationJobResult => {
+ if (!obj?.__typename) throw new Error('__typename is missing in "isTriggerInstallApplicationJobResult"')
+ return TriggerInstallApplicationJobResult_possibleTypes.includes(obj.__typename)
+ }
+
+
+
+ const TriggerUninstallApplicationJobResult_possibleTypes: string[] = ['TriggerUninstallApplicationJobResult']
+ export const isTriggerUninstallApplicationJobResult = (obj?: { __typename?: any } | null): obj is TriggerUninstallApplicationJobResult => {
+ if (!obj?.__typename) throw new Error('__typename is missing in "isTriggerUninstallApplicationJobResult"')
+ return TriggerUninstallApplicationJobResult_possibleTypes.includes(obj.__typename)
+ }
+
+
+
const WorkspaceCompanyEnrichmentResult_possibleTypes: string[] = ['WorkspaceCompanyEnrichmentResult']
export const isWorkspaceCompanyEnrichmentResult = (obj?: { __typename?: any } | null): obj is WorkspaceCompanyEnrichmentResult => {
if (!obj?.__typename) throw new Error('__typename is missing in "isWorkspaceCompanyEnrichmentResult"')
@@ -9982,13 +10028,6 @@ export const enumRowLevelPermissionPredicateOperand = {
VECTOR_SEARCH: 'VECTOR_SEARCH' as const
}
-export const enumApplicationState = {
- INSTALLING: 'INSTALLING' as const,
- INSTALLED: 'INSTALLED' as const,
- UPGRADING: 'UPGRADING' as const,
- UNINSTALLING: 'UNINSTALLING' as const
-}
-
export const enumPermissionFlagType = {
API_KEYS_AND_WEBHOOKS: 'API_KEYS_AND_WEBHOOKS' as const,
WORKSPACE: 'WORKSPACE' as const,
diff --git a/packages/twenty-client-sdk/src/metadata/generated/types.ts b/packages/twenty-client-sdk/src/metadata/generated/types.ts
index 403a3069395..61b8b63fe08 100644
--- a/packages/twenty-client-sdk/src/metadata/generated/types.ts
+++ b/packages/twenty-client-sdk/src/metadata/generated/types.ts
@@ -21,87 +21,86 @@ export default {
39,
42,
44,
- 50,
- 53,
- 55,
- 57,
- 59,
- 62,
+ 52,
+ 54,
+ 56,
+ 58,
+ 61,
+ 64,
65,
66,
67,
68,
- 69,
+ 70,
71,
- 72,
+ 73,
74,
- 75,
- 82,
- 85,
+ 81,
+ 84,
+ 89,
90,
- 91,
+ 93,
94,
- 95,
- 97,
+ 96,
+ 99,
100,
- 101,
- 111,
- 126,
+ 110,
+ 125,
+ 131,
132,
133,
- 134,
- 136,
- 145,
- 147,
- 154,
- 156,
- 159,
- 161,
+ 135,
+ 144,
+ 146,
+ 153,
+ 155,
+ 158,
+ 160,
+ 175,
176,
177,
- 178,
- 186,
- 190,
+ 185,
+ 189,
+ 196,
197,
- 198,
- 205,
- 208,
- 211,
- 222,
- 239,
+ 204,
+ 207,
+ 210,
+ 221,
240,
- 242,
- 247,
- 250,
- 259,
- 290,
- 297,
- 305,
+ 241,
+ 243,
+ 248,
+ 251,
+ 260,
+ 291,
+ 298,
306,
307,
- 309,
+ 308,
310,
311,
312,
313,
314,
315,
- 323,
+ 316,
324,
- 327,
- 364,
- 371,
- 373,
+ 325,
+ 328,
+ 365,
+ 372,
374,
375,
376,
- 378,
- 380,
- 385,
- 400,
- 412,
- 527,
- 552
+ 377,
+ 379,
+ 381,
+ 386,
+ 401,
+ 413,
+ 530,
+ 555
],
"types": {
"BillingProductDTO": {
@@ -115,13 +114,13 @@ export default {
1
],
"metadata": [
- 131
+ 130
],
"on_BillingLicensedProduct": [
- 140
+ 139
],
"on_BillingMeteredProduct": [
- 141
+ 140
],
"__typename": [
1
@@ -577,7 +576,7 @@ export default {
1
],
"fields": [
- 254,
+ 255,
{
"paging": [
27,
@@ -590,7 +589,7 @@ export default {
}
],
"indexMetadatas": [
- 255,
+ 256,
{
"paging": [
27,
@@ -603,13 +602,13 @@ export default {
}
],
"fieldsList": [
- 241
+ 242
],
"indexMetadataList": [
- 249
+ 250
],
"searchFieldMetadataList": [
- 257
+ 258
],
"__typename": [
1
@@ -1045,9 +1044,6 @@ export default {
"universalIdentifier": [
1
],
- "state": [
- 50
- ],
"packageJsonChecksum": [
1
],
@@ -1109,7 +1105,6 @@ export default {
1
]
},
- "ApplicationState": {},
"TwoFactorAuthenticationMethodSummary": {
"twoFactorAuthenticationMethodId": [
3
@@ -1129,7 +1124,7 @@ export default {
3
],
"user": [
- 73
+ 72
],
"userId": [
3
@@ -1147,7 +1142,7 @@ export default {
4
],
"permissionFlags": [
- 53
+ 52
],
"objectPermissions": [
45
@@ -1156,7 +1151,7 @@ export default {
45
],
"twoFactorAuthenticationMethodSummary": [
- 51
+ 50
],
"isImpersonating": [
8
@@ -1192,7 +1187,7 @@ export default {
15
],
"aggregateOperation": [
- 55
+ 54
],
"viewId": [
3
@@ -1231,7 +1226,7 @@ export default {
3
],
"logicalOperator": [
- 57
+ 56
],
"positionInViewFilterGroup": [
15
@@ -1264,7 +1259,7 @@ export default {
3
],
"operand": [
- 59
+ 58
],
"value": [
9
@@ -1341,7 +1336,7 @@ export default {
3
],
"direction": [
- 62
+ 61
],
"subFieldName": [
1
@@ -1398,7 +1393,7 @@ export default {
4
],
"viewFields": [
- 54
+ 53
],
"isOverridden": [
8
@@ -1427,10 +1422,10 @@ export default {
3
],
"type": [
- 65
+ 64
],
"key": [
- 66
+ 65
],
"icon": [
1
@@ -1445,10 +1440,10 @@ export default {
8
],
"openRecordIn": [
- 67
+ 66
],
"kanbanAggregateOperation": [
- 55
+ 54
],
"kanbanAggregateOperationFieldMetadataId": [
3
@@ -1475,7 +1470,7 @@ export default {
1
],
"calendarLayout": [
- 68
+ 67
],
"createdAt": [
4
@@ -1487,25 +1482,25 @@ export default {
4
],
"viewFields": [
- 54
+ 53
],
"viewFilters": [
- 58
+ 57
],
"viewFilterGroups": [
- 56
+ 55
],
"viewSorts": [
- 61
+ 60
],
"viewGroups": [
- 60
+ 59
],
"viewFieldGroups": [
- 63
+ 62
],
"visibility": [
- 69
+ 68
],
"createdByUserWorkspaceId": [
3
@@ -1554,7 +1549,7 @@ export default {
8
],
"workspaceDiscoverability": [
- 71
+ 70
],
"trashRetentionDays": [
15
@@ -1566,25 +1561,25 @@ export default {
15
],
"activationStatus": [
- 72
+ 71
],
"views": [
- 64
+ 63
],
"viewFields": [
- 54
+ 53
],
"viewFilters": [
- 58
+ 57
],
"viewFilterGroups": [
- 56
+ 55
],
"viewGroups": [
- 60
+ 59
],
"viewSorts": [
- 61
+ 60
],
"metadataVersion": [
15
@@ -1653,22 +1648,22 @@ export default {
49
],
"featureFlags": [
- 189
+ 188
],
"billingSubscriptions": [
- 144
+ 143
],
"installedApplications": [
49
],
"currentBillingSubscription": [
- 144
+ 143
],
"billingCustomer": [
- 143
+ 142
],
"billingEntitlements": [
- 258
+ 259
],
"hasValidSignedEnterpriseKey": [
8
@@ -1677,7 +1672,7 @@ export default {
8
],
"workspaceUrls": [
- 191
+ 190
],
"workspaceCustomApplicationId": [
1
@@ -1729,28 +1724,28 @@ export default {
35
],
"userWorkspaces": [
- 52
+ 51
],
"onboardingStatus": [
- 74
+ 73
],
"previousOnboardingStatus": [
- 74
+ 73
],
"currentWorkspace": [
- 70
+ 69
],
"currentUserWorkspace": [
- 52
+ 51
],
"userVars": [
- 75
+ 74
],
"workspaceMembers": [
35
],
"deletedWorkspaceMembers": [
- 232
+ 231
],
"hasPassword": [
8
@@ -1762,10 +1757,10 @@ export default {
8
],
"workspaces": [
- 52
+ 51
],
"availableWorkspaces": [
- 231
+ 230
],
"__typename": [
1
@@ -1902,19 +1897,19 @@ export default {
1
],
"type": [
- 82
+ 81
],
"objectMetadataId": [
3
],
"gridPosition": [
- 80
+ 79
],
"position": [
- 83
+ 82
],
"configuration": [
- 88
+ 87
],
"conditionalDisplay": [
9
@@ -1944,13 +1939,13 @@ export default {
"WidgetType": {},
"PageLayoutWidgetPosition": {
"on_PageLayoutWidgetGridPosition": [
- 84
+ 83
],
"on_PageLayoutWidgetVerticalListPosition": [
- 86
+ 85
],
"on_PageLayoutWidgetCanvasPosition": [
- 87
+ 86
],
"__typename": [
1
@@ -1958,7 +1953,7 @@ export default {
},
"PageLayoutWidgetGridPosition": {
"layoutMode": [
- 85
+ 84
],
"row": [
28
@@ -1979,7 +1974,7 @@ export default {
"PageLayoutTabLayoutMode": {},
"PageLayoutWidgetVerticalListPosition": {
"layoutMode": [
- 85
+ 84
],
"index": [
28
@@ -1990,7 +1985,7 @@ export default {
},
"PageLayoutWidgetCanvasPosition": {
"layoutMode": [
- 85
+ 84
],
"__typename": [
1
@@ -1998,85 +1993,85 @@ export default {
},
"WidgetConfiguration": {
"on_AggregateChartConfiguration": [
- 89
+ 88
],
"on_StandaloneRichTextConfiguration": [
- 92
+ 91
],
"on_PieChartConfiguration": [
- 93
+ 92
],
"on_LineChartConfiguration": [
- 96
+ 95
],
"on_IframeConfiguration": [
- 98
+ 97
],
"on_BarChartConfiguration": [
- 99
+ 98
],
"on_CalendarConfiguration": [
- 102
+ 101
],
"on_FrontComponentConfiguration": [
- 103
+ 102
],
"on_EmailsConfiguration": [
- 104
+ 103
],
"on_EmailThreadConfiguration": [
- 105
+ 104
],
"on_CallRecordingSummaryConfiguration": [
- 106
+ 105
],
"on_CallRecordingTranscriptConfiguration": [
- 107
+ 106
],
"on_MessageCampaignBodyConfiguration": [
- 108
+ 107
],
"on_MessageCampaignDetailsConfiguration": [
- 109
+ 108
],
"on_FieldConfiguration": [
- 110
+ 109
],
"on_FieldRichTextConfiguration": [
- 112
+ 111
],
"on_FieldsConfiguration": [
- 113
+ 112
],
"on_FormFieldConfiguration": [
- 114
+ 113
],
"on_FilesConfiguration": [
- 115
+ 114
],
"on_NotesConfiguration": [
- 116
+ 115
],
"on_TasksConfiguration": [
- 117
+ 116
],
"on_TimelineConfiguration": [
- 118
+ 117
],
"on_ViewConfiguration": [
- 119
+ 118
],
"on_RecordTableConfiguration": [
- 120
+ 119
],
"on_WorkflowConfiguration": [
- 121
+ 120
],
"on_WorkflowRunConfiguration": [
- 122
+ 121
],
"on_WorkflowVersionConfiguration": [
- 123
+ 122
],
"__typename": [
1
@@ -2084,13 +2079,13 @@ export default {
},
"AggregateChartConfiguration": {
"configurationType": [
- 90
+ 89
],
"aggregateFieldMetadataId": [
3
],
"aggregateOperation": [
- 55
+ 54
],
"label": [
1
@@ -2099,7 +2094,7 @@ export default {
8
],
"numberFormat": [
- 91
+ 90
],
"description": [
1
@@ -2120,7 +2115,7 @@ export default {
1
],
"ratioAggregateConfig": [
- 78
+ 77
],
"__typename": [
1
@@ -2130,10 +2125,10 @@ export default {
"ChartNumberFormat": {},
"StandaloneRichTextConfiguration": {
"configurationType": [
- 90
+ 89
],
"body": [
- 79
+ 78
],
"__typename": [
1
@@ -2141,13 +2136,13 @@ export default {
},
"PieChartConfiguration": {
"configurationType": [
- 90
+ 89
],
"aggregateFieldMetadataId": [
3
],
"aggregateOperation": [
- 55
+ 54
],
"groupByFieldMetadataId": [
3
@@ -2156,10 +2151,10 @@ export default {
1
],
"dateGranularity": [
- 94
+ 93
],
"orderBy": [
- 95
+ 94
],
"manualSortOrder": [
1
@@ -2177,7 +2172,7 @@ export default {
8
],
"numberFormat": [
- 91
+ 90
],
"splitMultiValueFields": [
8
@@ -2205,13 +2200,13 @@ export default {
"GraphOrderBy": {},
"LineChartConfiguration": {
"configurationType": [
- 90
+ 89
],
"aggregateFieldMetadataId": [
3
],
"aggregateOperation": [
- 55
+ 54
],
"primaryAxisGroupByFieldMetadataId": [
3
@@ -2220,10 +2215,10 @@ export default {
1
],
"primaryAxisDateGranularity": [
- 94
+ 93
],
"primaryAxisOrderBy": [
- 95
+ 94
],
"primaryAxisManualSortOrder": [
1
@@ -2235,10 +2230,10 @@ export default {
1
],
"secondaryAxisGroupByDateGranularity": [
- 94
+ 93
],
"secondaryAxisOrderBy": [
- 95
+ 94
],
"secondaryAxisManualSortOrder": [
1
@@ -2250,7 +2245,7 @@ export default {
8
],
"axisNameDisplay": [
- 97
+ 96
],
"displayDataLabel": [
8
@@ -2259,7 +2254,7 @@ export default {
8
],
"numberFormat": [
- 91
+ 90
],
"rangeMin": [
15
@@ -2295,7 +2290,7 @@ export default {
"AxisNameDisplay": {},
"IframeConfiguration": {
"configurationType": [
- 90
+ 89
],
"url": [
1
@@ -2306,13 +2301,13 @@ export default {
},
"BarChartConfiguration": {
"configurationType": [
- 90
+ 89
],
"aggregateFieldMetadataId": [
3
],
"aggregateOperation": [
- 55
+ 54
],
"primaryAxisGroupByFieldMetadataId": [
3
@@ -2321,10 +2316,10 @@ export default {
1
],
"primaryAxisDateGranularity": [
- 94
+ 93
],
"primaryAxisOrderBy": [
- 95
+ 94
],
"primaryAxisManualSortOrder": [
1
@@ -2336,10 +2331,10 @@ export default {
1
],
"secondaryAxisGroupByDateGranularity": [
- 94
+ 93
],
"secondaryAxisOrderBy": [
- 95
+ 94
],
"secondaryAxisManualSortOrder": [
1
@@ -2351,7 +2346,7 @@ export default {
8
],
"axisNameDisplay": [
- 97
+ 96
],
"displayDataLabel": [
8
@@ -2360,7 +2355,7 @@ export default {
8
],
"numberFormat": [
- 91
+ 90
],
"rangeMin": [
15
@@ -2378,10 +2373,10 @@ export default {
9
],
"groupMode": [
- 100
+ 99
],
"layout": [
- 101
+ 100
],
"isCumulative": [
8
@@ -2400,7 +2395,7 @@ export default {
"BarChartLayout": {},
"CalendarConfiguration": {
"configurationType": [
- 90
+ 89
],
"__typename": [
1
@@ -2408,7 +2403,7 @@ export default {
},
"FrontComponentConfiguration": {
"configurationType": [
- 90
+ 89
],
"frontComponentId": [
3
@@ -2422,7 +2417,7 @@ export default {
},
"EmailsConfiguration": {
"configurationType": [
- 90
+ 89
],
"__typename": [
1
@@ -2430,7 +2425,7 @@ export default {
},
"EmailThreadConfiguration": {
"configurationType": [
- 90
+ 89
],
"__typename": [
1
@@ -2438,7 +2433,7 @@ export default {
},
"CallRecordingSummaryConfiguration": {
"configurationType": [
- 90
+ 89
],
"__typename": [
1
@@ -2446,7 +2441,7 @@ export default {
},
"CallRecordingTranscriptConfiguration": {
"configurationType": [
- 90
+ 89
],
"__typename": [
1
@@ -2454,7 +2449,7 @@ export default {
},
"MessageCampaignBodyConfiguration": {
"configurationType": [
- 90
+ 89
],
"__typename": [
1
@@ -2462,7 +2457,7 @@ export default {
},
"MessageCampaignDetailsConfiguration": {
"configurationType": [
- 90
+ 89
],
"__typename": [
1
@@ -2470,13 +2465,13 @@ export default {
},
"FieldConfiguration": {
"configurationType": [
- 90
+ 89
],
"fieldMetadataId": [
1
],
"fieldDisplayMode": [
- 111
+ 110
],
"viewId": [
1
@@ -2494,7 +2489,7 @@ export default {
"FieldDisplayMode": {},
"FieldRichTextConfiguration": {
"configurationType": [
- 90
+ 89
],
"__typename": [
1
@@ -2502,7 +2497,7 @@ export default {
},
"FieldsConfiguration": {
"configurationType": [
- 90
+ 89
],
"viewId": [
1
@@ -2519,7 +2514,7 @@ export default {
},
"FormFieldConfiguration": {
"configurationType": [
- 90
+ 89
],
"fieldMetadataId": [
1
@@ -2530,7 +2525,7 @@ export default {
},
"FilesConfiguration": {
"configurationType": [
- 90
+ 89
],
"__typename": [
1
@@ -2538,7 +2533,7 @@ export default {
},
"NotesConfiguration": {
"configurationType": [
- 90
+ 89
],
"__typename": [
1
@@ -2546,7 +2541,7 @@ export default {
},
"TasksConfiguration": {
"configurationType": [
- 90
+ 89
],
"__typename": [
1
@@ -2554,7 +2549,7 @@ export default {
},
"TimelineConfiguration": {
"configurationType": [
- 90
+ 89
],
"__typename": [
1
@@ -2562,7 +2557,7 @@ export default {
},
"ViewConfiguration": {
"configurationType": [
- 90
+ 89
],
"__typename": [
1
@@ -2570,7 +2565,7 @@ export default {
},
"RecordTableConfiguration": {
"configurationType": [
- 90
+ 89
],
"viewId": [
1
@@ -2587,7 +2582,7 @@ export default {
},
"WorkflowConfiguration": {
"configurationType": [
- 90
+ 89
],
"__typename": [
1
@@ -2595,7 +2590,7 @@ export default {
},
"WorkflowRunConfiguration": {
"configurationType": [
- 90
+ 89
],
"__typename": [
1
@@ -2603,7 +2598,7 @@ export default {
},
"WorkflowVersionConfiguration": {
"configurationType": [
- 90
+ 89
],
"__typename": [
1
@@ -2632,13 +2627,13 @@ export default {
3
],
"widgets": [
- 81
+ 80
],
"icon": [
1
],
"layoutMode": [
- 85
+ 84
],
"createdAt": [
4
@@ -2667,13 +2662,13 @@ export default {
1
],
"type": [
- 126
+ 125
],
"objectMetadataId": [
3
],
"tabs": [
- 124
+ 123
],
"defaultTabToFocusOnMobileAndSidePanelId": [
3
@@ -2732,7 +2727,7 @@ export default {
1
],
"oauth": [
- 127
+ 126
],
"logoUrl": [
1
@@ -2760,7 +2755,7 @@ export default {
15
],
"items": [
- 129
+ 128
],
"__typename": [
1
@@ -2768,13 +2763,13 @@ export default {
},
"BillingProductMetadata": {
"planKey": [
- 132
+ 131
],
"priceUsageBased": [
- 133
+ 132
],
"productKey": [
- 134
+ 133
],
"__typename": [
1
@@ -2785,7 +2780,7 @@ export default {
"BillingProductKey": {},
"BillingPriceLicensed": {
"recurringInterval": [
- 136
+ 135
],
"unitAmount": [
15
@@ -2794,7 +2789,7 @@ export default {
1
],
"priceUsageType": [
- 133
+ 132
],
"creditAmount": [
15
@@ -2820,16 +2815,16 @@ export default {
},
"BillingPriceMetered": {
"tiers": [
- 137
+ 136
],
"recurringInterval": [
- 136
+ 135
],
"stripePriceId": [
1
],
"priceUsageType": [
- 133
+ 132
],
"__typename": [
1
@@ -2846,7 +2841,7 @@ export default {
1
],
"metadata": [
- 131
+ 130
],
"__typename": [
1
@@ -2863,10 +2858,10 @@ export default {
1
],
"metadata": [
- 131
+ 130
],
"prices": [
- 135
+ 134
],
"__typename": [
1
@@ -2883,10 +2878,10 @@ export default {
1
],
"metadata": [
- 131
+ 130
],
"prices": [
- 138
+ 137
],
"__typename": [
1
@@ -2928,13 +2923,13 @@ export default {
3
],
"status": [
- 145
+ 144
],
"interval": [
- 136
+ 135
],
"billingSubscriptionItems": [
- 142
+ 141
],
"currentPeriodEnd": [
4
@@ -2943,7 +2938,7 @@ export default {
9
],
"phases": [
- 130
+ 129
],
"cancelAt": [
4
@@ -2964,7 +2959,7 @@ export default {
15
],
"status": [
- 147
+ 146
],
"error": [
9
@@ -3082,7 +3077,7 @@ export default {
3
],
"type": [
- 154
+ 153
],
"name": [
1
@@ -3115,7 +3110,7 @@ export default {
4
],
"targetRecordIdentifier": [
- 152
+ 151
],
"__typename": [
1
@@ -3127,7 +3122,7 @@ export default {
1
],
"state": [
- 156
+ 155
],
"attemptsMade": [
28
@@ -3168,7 +3163,7 @@ export default {
},
"MetadataEvent": {
"type": [
- 159
+ 158
],
"metadataName": [
1
@@ -3177,7 +3172,7 @@ export default {
1
],
"properties": [
- 157
+ 156
],
"updatedCollectionHash": [
1
@@ -3189,7 +3184,7 @@ export default {
"MetadataEventAction": {},
"ObjectRecordEvent": {
"action": [
- 161
+ 160
],
"objectNameSingular": [
1
@@ -3204,7 +3199,7 @@ export default {
1
],
"properties": [
- 157
+ 156
],
"__typename": [
1
@@ -3216,7 +3211,7 @@ export default {
1
],
"objectRecordEvent": [
- 160
+ 159
],
"__typename": [
1
@@ -3227,13 +3222,13 @@ export default {
1
],
"objectRecordEventsWithQueryIds": [
- 162
+ 161
],
"metadataEvents": [
- 158
+ 157
],
"queueJobEvents": [
- 155
+ 154
],
"__typename": [
1
@@ -3276,7 +3271,7 @@ export default {
},
"BillingEndTrialPeriod": {
"status": [
- 145
+ 144
],
"hasPaymentMethod": [
8
@@ -3285,10 +3280,10 @@ export default {
1
],
"currentBillingSubscription": [
- 144
+ 143
],
"billingSubscriptions": [
- 144
+ 143
],
"__typename": [
1
@@ -3296,7 +3291,7 @@ export default {
},
"BillingResourceCreditUsage": {
"productKey": [
- 134
+ 133
],
"periodStart": [
4
@@ -3325,16 +3320,16 @@ export default {
},
"BillingPlan": {
"planKey": [
- 132
+ 131
],
"baseProducts": [
- 140
+ 139
],
"resourceCreditProducts": [
- 140
+ 139
],
"meteredProducts": [
- 141
+ 140
],
"__typename": [
1
@@ -3361,10 +3356,10 @@ export default {
},
"BillingUpdate": {
"currentBillingSubscription": [
- 144
+ 143
],
"billingSubscriptions": [
- 144
+ 143
],
"__typename": [
1
@@ -3400,7 +3395,7 @@ export default {
1
],
"dailyUsage": [
- 172
+ 171
],
"__typename": [
1
@@ -3408,19 +3403,19 @@ export default {
},
"UsageAnalytics": {
"usageByUser": [
- 171
+ 170
],
"usageByOperationType": [
- 171
+ 170
],
"usageByApplication": [
- 171
+ 170
],
"usageByModel": [
- 171
+ 170
],
"timeSeries": [
- 172
+ 171
],
"periodStart": [
4
@@ -3429,7 +3424,7 @@ export default {
4
],
"userDailyUsage": [
- 173
+ 172
],
"__typename": [
1
@@ -3440,10 +3435,10 @@ export default {
3
],
"resourceType": [
- 176
+ 175
],
"operationType": [
- 177
+ 176
],
"spenderType": [
1
@@ -3464,10 +3459,10 @@ export default {
1
],
"limitValue": [
- 178
+ 177
],
"burstValue": [
- 178
+ 177
],
"createdAt": [
4
@@ -3512,10 +3507,10 @@ export default {
},
"OnboardingStepNavigation": {
"onboardingStatus": [
- 74
+ 73
],
"previousOnboardingStatus": [
- 74
+ 73
],
"__typename": [
1
@@ -3554,7 +3549,7 @@ export default {
1
],
"result": [
- 183
+ 182
],
"__typename": [
1
@@ -3571,7 +3566,7 @@ export default {
1
],
"connectionSecurity": [
- 186
+ 185
],
"__typename": [
1
@@ -3580,13 +3575,13 @@ export default {
"EmailConnectionSecurity": {},
"PublicImapSmtpCaldavConnectionParameters": {
"IMAP": [
- 185
+ 184
],
"SMTP": [
- 185
+ 184
],
"CALDAV": [
- 185
+ 184
],
"__typename": [
1
@@ -3642,7 +3637,7 @@ export default {
4
],
"connectionParameters": [
- 187
+ 186
],
"__typename": [
1
@@ -3650,7 +3645,7 @@ export default {
},
"FeatureFlag": {
"key": [
- 190
+ 189
],
"value": [
8
@@ -3734,7 +3729,7 @@ export default {
1
],
"versionDistribution": [
- 193
+ 192
],
"__typename": [
1
@@ -3759,10 +3754,10 @@ export default {
1
],
"type": [
- 197
+ 196
],
"status": [
- 198
+ 197
],
"issuer": [
1
@@ -3775,7 +3770,7 @@ export default {
"SSOIdentityProviderStatus": {},
"AuthProviders": {
"sso": [
- 196
+ 195
],
"google": [
8
@@ -3812,10 +3807,10 @@ export default {
3
],
"authProviders": [
- 199
+ 198
],
"authBypassProviders": [
- 200
+ 199
],
"logo": [
1
@@ -3824,7 +3819,7 @@ export default {
1
],
"workspaceUrls": [
- 191
+ 190
],
"__typename": [
1
@@ -3863,7 +3858,7 @@ export default {
1
],
"modelFamily": [
- 205
+ 204
],
"modelFamilyLabel": [
1
@@ -3878,7 +3873,7 @@ export default {
15
],
"nativeCapabilities": [
- 203
+ 202
],
"isDeprecated": [
8
@@ -3917,7 +3912,7 @@ export default {
1
],
"trialPeriods": [
- 195
+ 194
],
"__typename": [
1
@@ -3925,7 +3920,7 @@ export default {
},
"Support": {
"supportDriver": [
- 208
+ 207
],
"supportFrontChatId": [
1
@@ -3954,7 +3949,7 @@ export default {
},
"Captcha": {
"provider": [
- 211
+ 210
],
"siteKey": [
1
@@ -3991,10 +3986,10 @@ export default {
},
"PublicFeatureFlag": {
"key": [
- 190
+ 189
],
"metadata": [
- 213
+ 212
],
"__typename": [
1
@@ -4019,13 +4014,13 @@ export default {
1
],
"authProviders": [
- 199
+ 198
],
"billing": [
- 206
+ 205
],
"aiModels": [
- 204
+ 203
],
"signInPrefilled": [
8
@@ -4049,25 +4044,25 @@ export default {
8
],
"support": [
- 207
+ 206
],
"isAttachmentPreviewEnabled": [
8
],
"sentry": [
- 209
+ 208
],
"captcha": [
- 210
+ 209
],
"api": [
- 212
+ 211
],
"canManageFeatureFlags": [
8
],
"publicFeatureFlags": [
- 214
+ 213
],
"isCookieSessionEnabled": [
8
@@ -4121,7 +4116,7 @@ export default {
1
],
"maintenance": [
- 215
+ 214
],
"__typename": [
1
@@ -4158,7 +4153,7 @@ export default {
},
"CreateApplicationRegistration": {
"applicationRegistration": [
- 76
+ 75
],
"clientSecret": [
1
@@ -4197,7 +4192,7 @@ export default {
},
"AppConnection": {
"id": [
- 222
+ 221
],
"providerName": [
1
@@ -4252,7 +4247,7 @@ export default {
3
],
"type": [
- 197
+ 196
],
"issuer": [
1
@@ -4261,7 +4256,7 @@ export default {
1
],
"status": [
- 198
+ 197
],
"__typename": [
1
@@ -4280,7 +4275,7 @@ export default {
},
"FindAvailableSSOIDP": {
"type": [
- 197
+ 196
],
"id": [
3
@@ -4292,10 +4287,10 @@ export default {
1
],
"status": [
- 198
+ 197
],
"workspace": [
- 226
+ 225
],
"__typename": [
1
@@ -4306,7 +4301,7 @@ export default {
3
],
"type": [
- 197
+ 196
],
"issuer": [
1
@@ -4315,7 +4310,7 @@ export default {
1
],
"status": [
- 198
+ 197
],
"__typename": [
1
@@ -4323,7 +4318,7 @@ export default {
},
"SSOConnection": {
"type": [
- 197
+ 196
],
"id": [
3
@@ -4335,7 +4330,7 @@ export default {
1
],
"status": [
- 198
+ 197
],
"__typename": [
1
@@ -4358,13 +4353,13 @@ export default {
1
],
"workspaceUrls": [
- 191
+ 190
],
"logo": [
1
],
"sso": [
- 229
+ 228
],
"__typename": [
1
@@ -4372,10 +4367,10 @@ export default {
},
"AvailableWorkspaces": {
"availableWorkspacesForSignIn": [
- 230
+ 229
],
"availableWorkspacesForSignUp": [
- 230
+ 229
],
"__typename": [
1
@@ -4508,10 +4503,10 @@ export default {
1
],
"objectPermissions": [
- 234
+ 233
],
"fieldPermissions": [
- 235
+ 234
],
"__typename": [
1
@@ -4582,7 +4577,7 @@ export default {
1
],
"roles": [
- 236
+ 235
],
"manifest": [
9
@@ -4591,15 +4586,31 @@ export default {
1
]
},
+ "TriggerInstallApplicationJobResult": {
+ "jobId": [
+ 1
+ ],
+ "__typename": [
+ 1
+ ]
+ },
+ "TriggerUninstallApplicationJobResult": {
+ "jobId": [
+ 1
+ ],
+ "__typename": [
+ 1
+ ]
+ },
"WorkspaceCompanyEnrichmentResult": {
"outcome": [
- 239
+ 240
],
"enrichment": [
9
],
"personOutcome": [
- 240
+ 241
],
"personEnrichment": [
9
@@ -4621,7 +4632,7 @@ export default {
1
],
"type": [
- 242
+ 243
],
"name": [
1
@@ -4687,10 +4698,10 @@ export default {
23
],
"relation": [
- 246
+ 247
],
"morphRelations": [
- 246
+ 247
],
"__typename": [
1
@@ -4716,7 +4727,7 @@ export default {
},
"FieldEdge": {
"node": [
- 241
+ 242
],
"cursor": [
29
@@ -4727,10 +4738,10 @@ export default {
},
"FieldConnection": {
"pageInfo": [
- 243
+ 244
],
"edges": [
- 244
+ 245
],
"__typename": [
1
@@ -4738,7 +4749,7 @@ export default {
},
"Relation": {
"type": [
- 247
+ 248
],
"sourceObjectMetadata": [
23
@@ -4747,10 +4758,10 @@ export default {
23
],
"sourceFieldMetadata": [
- 241
+ 242
],
"targetFieldMetadata": [
- 241
+ 242
],
"__typename": [
1
@@ -4797,7 +4808,7 @@ export default {
1
],
"indexType": [
- 250
+ 251
],
"createdAt": [
4
@@ -4806,7 +4817,7 @@ export default {
4
],
"indexFieldMetadataList": [
- 248
+ 249
],
"__typename": [
1
@@ -4815,7 +4826,7 @@ export default {
"IndexType": {},
"IndexEdge": {
"node": [
- 249
+ 250
],
"cursor": [
29
@@ -4837,10 +4848,10 @@ export default {
},
"ObjectConnection": {
"pageInfo": [
- 243
+ 244
],
"edges": [
- 252
+ 253
],
"__typename": [
1
@@ -4848,10 +4859,10 @@ export default {
},
"ObjectFieldsConnection": {
"pageInfo": [
- 243
+ 244
],
"edges": [
- 244
+ 245
],
"__typename": [
1
@@ -4859,10 +4870,10 @@ export default {
},
"ObjectIndexMetadatasConnection": {
"pageInfo": [
- 243
+ 244
],
"edges": [
- 251
+ 252
],
"__typename": [
1
@@ -4904,7 +4915,7 @@ export default {
},
"BillingEntitlement": {
"key": [
- 259
+ 260
],
"value": [
8
@@ -4942,7 +4953,7 @@ export default {
1
],
"records": [
- 260
+ 261
],
"isCustomDomainEnabled": [
8
@@ -5015,10 +5026,10 @@ export default {
},
"AvailableWorkspacesAndAccessTokens": {
"tokens": [
- 268
+ 269
],
"availableWorkspaces": [
- 231
+ 230
],
"__typename": [
1
@@ -5056,7 +5067,7 @@ export default {
},
"WorkspaceUrlsAndId": {
"workspaceUrls": [
- 191
+ 190
],
"id": [
3
@@ -5070,7 +5081,7 @@ export default {
11
],
"workspace": [
- 273
+ 274
],
"__typename": [
1
@@ -5103,7 +5114,7 @@ export default {
11
],
"workspaceUrls": [
- 191
+ 190
],
"__typename": [
1
@@ -5147,7 +5158,7 @@ export default {
},
"AuthTokens": {
"tokens": [
- 268
+ 269
],
"__typename": [
1
@@ -5188,7 +5199,7 @@ export default {
11
],
"workspace": [
- 273
+ 274
],
"__typename": [
1
@@ -5256,7 +5267,7 @@ export default {
1
],
"status": [
- 290
+ 291
],
"reason": [
1
@@ -5282,16 +5293,16 @@ export default {
},
"ApplicationExport": {
"application": [
- 288
+ 289
],
"manifest": [
9
],
"coverage": [
- 289
+ 290
],
"files": [
- 291
+ 292
],
"__typename": [
1
@@ -5327,10 +5338,10 @@ export default {
},
"CompleteApplicationFileUploadsResult": {
"files": [
- 293
+ 294
],
"errors": [
- 294
+ 295
],
"__typename": [
1
@@ -5341,7 +5352,7 @@ export default {
3
],
"fileFolder": [
- 297
+ 298
],
"filePath": [
1
@@ -5362,7 +5373,7 @@ export default {
"FileFolder": {},
"ApplicationFileUploadError": {
"fileFolder": [
- 297
+ 298
],
"filePath": [
1
@@ -5376,10 +5387,10 @@ export default {
},
"CreateApplicationFileUploadsResult": {
"targets": [
- 296
+ 297
],
"errors": [
- 298
+ 299
],
"__typename": [
1
@@ -5461,16 +5472,16 @@ export default {
1
],
"status": [
- 305
+ 306
],
"tenantStatus": [
- 306
+ 307
],
"unsubscribeHostnameStatus": [
- 307
+ 308
],
"verificationRecords": [
- 303
+ 304
],
"verifiedAt": [
4
@@ -5487,7 +5498,7 @@ export default {
3
],
"visibility": [
- 309
+ 310
],
"handle": [
1
@@ -5496,16 +5507,16 @@ export default {
1
],
"type": [
- 310
+ 311
],
"isContactAutoCreationEnabled": [
8
],
"contactAutoCreationPolicy": [
- 311
+ 312
],
"messageFolderImportPolicy": [
- 312
+ 313
],
"excludeNonProfessionalEmails": [
8
@@ -5514,7 +5525,7 @@ export default {
8
],
"pendingGroupEmailsAction": [
- 313
+ 314
],
"isSyncEnabled": [
8
@@ -5523,10 +5534,10 @@ export default {
4
],
"syncStatus": [
- 314
+ 315
],
"syncStage": [
- 315
+ 316
],
"syncStageStartedAt": [
4
@@ -5547,7 +5558,7 @@ export default {
4
],
"connectedAccount": [
- 188
+ 187
],
"__typename": [
1
@@ -5562,7 +5573,7 @@ export default {
"MessageChannelSyncStage": {},
"CreateEmailGroupChannelOutput": {
"messageChannel": [
- 308
+ 309
],
"forwardingAddress": [
1
@@ -5627,7 +5638,7 @@ export default {
28
],
"audience": [
- 317
+ 318
],
"__typename": [
1
@@ -5670,10 +5681,10 @@ export default {
1
],
"reason": [
- 323
+ 324
],
"source": [
- 324
+ 325
],
"unsubscribeTopicId": [
3
@@ -5686,7 +5697,7 @@ export default {
"MessageSuppressionSource": {},
"MessageSuppressionList": {
"records": [
- 322
+ 323
],
"totalCount": [
28
@@ -5712,7 +5723,7 @@ export default {
1
],
"visibility": [
- 327
+ 328
],
"__typename": [
1
@@ -5758,7 +5769,7 @@ export default {
1
],
"location": [
- 329
+ 330
],
"__typename": [
1
@@ -5775,7 +5786,7 @@ export default {
1
],
"connectionSecurity": [
- 186
+ 185
],
"__typename": [
1
@@ -5786,13 +5797,13 @@ export default {
1
],
"IMAP": [
- 331
+ 332
],
"SMTP": [
- 331
+ 332
],
"CALDAV": [
- 331
+ 332
],
"__typename": [
1
@@ -5812,7 +5823,7 @@ export default {
3
],
"connectionParameters": [
- 332
+ 333
],
"__typename": [
1
@@ -6037,7 +6048,7 @@ export default {
1
],
"series": [
- 341
+ 342
],
"xAxisLabel": [
1
@@ -6052,10 +6063,10 @@ export default {
8
],
"layout": [
- 101
+ 100
],
"groupMode": [
- 100
+ 99
],
"hasTooManyGroups": [
8
@@ -6086,7 +6097,7 @@ export default {
1
],
"data": [
- 343
+ 344
],
"__typename": [
1
@@ -6094,7 +6105,7 @@ export default {
},
"LineChartData": {
"series": [
- 344
+ 345
],
"xAxisLabel": [
1
@@ -6131,7 +6142,7 @@ export default {
},
"PieChartData": {
"data": [
- 346
+ 347
],
"showLegend": [
8
@@ -6236,13 +6247,13 @@ export default {
},
"EventLogQueryResult": {
"records": [
- 351
+ 352
],
"totalCount": [
28
],
"pageInfo": [
- 352
+ 353
],
"__typename": [
1
@@ -6306,7 +6317,7 @@ export default {
1
],
"parts": [
- 337
+ 338
],
"processedAt": [
4
@@ -6320,7 +6331,7 @@ export default {
},
"AgentChatThread": {
"id": [
- 222
+ 221
],
"title": [
1
@@ -6375,7 +6386,7 @@ export default {
},
"AiSystemPromptPreview": {
"sections": [
- 357
+ 358
],
"estimatedTokenCount": [
28
@@ -6403,7 +6414,7 @@ export default {
28
],
"error": [
- 359
+ 360
],
"__typename": [
1
@@ -6436,10 +6447,10 @@ export default {
},
"StartWorkspaceSetupChatResult": {
"outcome": [
- 364
+ 365
],
"thread": [
- 356
+ 357
],
"__typename": [
1
@@ -6477,10 +6488,10 @@ export default {
3
],
"evaluations": [
- 365
+ 366
],
"messages": [
- 355
+ 356
],
"createdAt": [
4
@@ -6542,7 +6553,7 @@ export default {
9
],
"scope": [
- 371
+ 372
],
"__typename": [
1
@@ -6557,19 +6568,19 @@ export default {
1
],
"syncStatus": [
- 373
+ 374
],
"syncStage": [
- 374
+ 375
],
"visibility": [
- 375
+ 376
],
"isContactAutoCreationEnabled": [
8
],
"contactAutoCreationPolicy": [
- 376
+ 377
],
"isSyncEnabled": [
8
@@ -6620,7 +6631,7 @@ export default {
1
],
"pendingSyncAction": [
- 378
+ 379
],
"messageChannelId": [
3
@@ -6662,7 +6673,7 @@ export default {
1
],
"provenance": [
- 380
+ 381
],
"__typename": [
1
@@ -6691,7 +6702,7 @@ export default {
3
],
"through": [
- 381
+ 382
],
"__typename": [
1
@@ -6711,7 +6722,7 @@ export default {
1
],
"emit": [
- 382
+ 383
],
"action": [
1
@@ -6746,7 +6757,7 @@ export default {
},
"CollectionHash": {
"collectionName": [
- 385
+ 386
],
"hash": [
1
@@ -6796,10 +6807,10 @@ export default {
3
],
"type": [
- 65
+ 64
],
"key": [
- 66
+ 65
],
"objectMetadataId": [
3
@@ -6810,13 +6821,13 @@ export default {
},
"MinimalMetadata": {
"objectMetadataItems": [
- 386
+ 387
],
"views": [
- 387
+ 388
],
"collectionHashes": [
- 384
+ 385
],
"__typename": [
1
@@ -6824,10 +6835,10 @@ export default {
},
"Query": {
"navigationMenuItems": [
- 153
+ 152
],
"navigationMenuItem": [
- 153,
+ 152,
{
"id": [
3,
@@ -6836,7 +6847,7 @@ export default {
}
],
"applicationSdkClientChecksums": [
- 77,
+ 76,
{
"applicationId": [
3,
@@ -6870,21 +6881,21 @@ export default {
}
],
"enterpriseSubscriptionStatus": [
- 149
+ 148
],
"getUsageAnalytics": [
- 174,
+ 173,
{
"input": [
- 390
+ 391
]
}
],
"usageLimits": [
- 175
+ 174
],
"getViewFilterGroups": [
- 56,
+ 55,
{
"viewId": [
1
@@ -6892,7 +6903,7 @@ export default {
}
],
"getViewFilterGroup": [
- 56,
+ 55,
{
"id": [
1,
@@ -6901,7 +6912,7 @@ export default {
}
],
"getViewFilters": [
- 58,
+ 57,
{
"viewId": [
1
@@ -6909,7 +6920,7 @@ export default {
}
],
"getViewFilter": [
- 58,
+ 57,
{
"id": [
1,
@@ -6918,19 +6929,19 @@ export default {
}
],
"getViews": [
- 64,
+ 63,
{
"objectMetadataId": [
1
],
"viewTypes": [
- 65,
+ 64,
"[ViewType!]"
]
}
],
"getView": [
- 64,
+ 63,
{
"id": [
1,
@@ -6939,7 +6950,7 @@ export default {
}
],
"getViewSorts": [
- 61,
+ 60,
{
"viewId": [
1
@@ -6947,7 +6958,7 @@ export default {
}
],
"getViewSort": [
- 61,
+ 60,
{
"id": [
1,
@@ -6956,7 +6967,7 @@ export default {
}
],
"getViewFields": [
- 54,
+ 53,
{
"viewId": [
1,
@@ -6965,7 +6976,7 @@ export default {
}
],
"getViewField": [
- 54,
+ 53,
{
"id": [
1,
@@ -6974,7 +6985,7 @@ export default {
}
],
"getViewFieldGroups": [
- 63,
+ 62,
{
"viewId": [
1,
@@ -6983,7 +6994,7 @@ export default {
}
],
"getViewFieldGroup": [
- 63,
+ 62,
{
"id": [
1,
@@ -7001,19 +7012,19 @@ export default {
2,
{
"input": [
- 391,
+ 392,
"GetApiKeyInput!"
]
}
],
"currentUserSessions": [
- 164
+ 163
],
"myConnectedAccounts": [
- 188
+ 187
],
"applicationConnectionProviders": [
- 128,
+ 127,
{
"applicationId": [
3,
@@ -7022,7 +7033,7 @@ export default {
}
],
"billingPortalSession": [
- 169,
+ 168,
{
"returnUrlPath": [
1
@@ -7033,22 +7044,22 @@ export default {
}
],
"listPlans": [
- 167
+ 166
],
"getResourceCreditUsage": [
- 166
+ 165
],
"getInviteSuggestions": [
- 180
+ 179
],
"findWorkspaceInvitations": [
- 183
+ 182
],
"getApprovedAccessDomains": [
- 179
+ 178
],
"getPageLayoutTabs": [
- 124,
+ 123,
{
"pageLayoutId": [
1,
@@ -7057,7 +7068,7 @@ export default {
}
],
"getPageLayoutTab": [
- 124,
+ 123,
{
"id": [
1,
@@ -7066,18 +7077,18 @@ export default {
}
],
"getPageLayouts": [
- 125,
+ 124,
{
"objectMetadataId": [
1
],
"pageLayoutType": [
- 126
+ 125
]
}
],
"getPageLayout": [
- 125,
+ 124,
{
"id": [
1,
@@ -7086,7 +7097,7 @@ export default {
}
],
"getPageLayoutWidgets": [
- 81,
+ 80,
{
"pageLayoutTabId": [
1,
@@ -7095,7 +7106,7 @@ export default {
}
],
"getPageLayoutWidget": [
- 81,
+ 80,
{
"id": [
1,
@@ -7110,20 +7121,20 @@ export default {
10,
{
"input": [
- 392,
+ 393,
"AgentIdInput!"
]
}
],
"objects": [
- 253,
+ 254,
{
"paging": [
27,
"CursorPaging!"
],
"filter": [
- 393,
+ 394,
"ObjectFilter!"
]
}
@@ -7138,7 +7149,7 @@ export default {
}
],
"objectRecordCounts": [
- 256
+ 257
],
"mostlyEmptyFieldMetadataIds": [
3,
@@ -7153,7 +7164,7 @@ export default {
21,
{
"input": [
- 394,
+ 395,
"LogicFunctionIdInput!"
]
}
@@ -7165,7 +7176,7 @@ export default {
9,
{
"input": [
- 394,
+ 395,
"LogicFunctionIdInput!"
]
}
@@ -7174,7 +7185,7 @@ export default {
1,
{
"input": [
- 394,
+ 395,
"LogicFunctionIdInput!"
]
}
@@ -7204,10 +7215,10 @@ export default {
}
],
"currentWorkspace": [
- 70
+ 69
],
"getPublicWorkspaceDataByDomain": [
- 201,
+ 200,
{
"origin": [
1
@@ -7215,7 +7226,7 @@ export default {
}
],
"getPublicWorkspaceDataById": [
- 202,
+ 201,
{
"id": [
3,
@@ -7224,7 +7235,7 @@ export default {
}
],
"findApplicationRegistrationByClientId": [
- 219,
+ 218,
{
"clientId": [
1,
@@ -7233,7 +7244,7 @@ export default {
}
],
"findApplicationRegistrationByUniversalIdentifier": [
- 76,
+ 75,
{
"universalIdentifier": [
1,
@@ -7242,10 +7253,10 @@ export default {
}
],
"findManyApplicationRegistrations": [
- 76
+ 75
],
"findOneApplicationRegistration": [
- 76,
+ 75,
{
"id": [
1,
@@ -7254,7 +7265,7 @@ export default {
}
],
"findApplicationRegistrationStats": [
- 194,
+ 193,
{
"id": [
1,
@@ -7263,7 +7274,7 @@ export default {
}
],
"findApplicationRegistrationVariables": [
- 192,
+ 191,
{
"applicationRegistrationId": [
1,
@@ -7281,7 +7292,7 @@ export default {
}
],
"findClaimableApplicationRegistration": [
- 217,
+ 216,
{
"sourcePackage": [
1
@@ -7314,8 +7325,26 @@ export default {
]
}
],
+ "findInstallApplicationJobStatus": [
+ 154,
+ {
+ "universalIdentifier": [
+ 1,
+ "String!"
+ ]
+ }
+ ],
+ "findUninstallApplicationJobStatus": [
+ 154,
+ {
+ "universalIdentifier": [
+ 1,
+ "String!"
+ ]
+ }
+ ],
"findManyMarketplaceApps": [
- 233,
+ 232,
{
"universalIdentifiers": [
1,
@@ -7324,7 +7353,7 @@ export default {
}
],
"findMarketplaceAppDetail": [
- 237,
+ 236,
{
"universalIdentifier": [
1,
@@ -7333,7 +7362,7 @@ export default {
}
],
"publicMarketplaceApps": [
- 233,
+ 232,
{
"isVetted": [
8,
@@ -7342,7 +7371,7 @@ export default {
}
],
"publicMarketplaceAppDetail": [
- 237,
+ 236,
{
"universalIdentifier": [
1,
@@ -7351,7 +7380,7 @@ export default {
}
],
"fields": [
- 245,
+ 246,
{
"paging": [
27,
@@ -7364,7 +7393,7 @@ export default {
}
],
"field": [
- 241,
+ 242,
{
"id": [
3,
@@ -7373,7 +7402,7 @@ export default {
}
],
"getViewGroups": [
- 60,
+ 59,
{
"viewId": [
1
@@ -7381,7 +7410,7 @@ export default {
}
],
"getViewGroup": [
- 60,
+ 59,
{
"id": [
1,
@@ -7393,28 +7422,28 @@ export default {
48
],
"previewMessageCampaignAudience": [
- 317,
+ 318,
{
"input": [
- 395,
+ 396,
"PreviewMessageCampaignAudienceInput!"
]
}
],
"messageSuppressions": [
- 325,
+ 326,
{
"input": [
- 396,
+ 397,
"FindMessageSuppressionsInput!"
]
}
],
"unsubscribeTopics": [
- 326
+ 327
],
"myMessageChannels": [
- 308,
+ 309,
{
"connectedAccountId": [
3
@@ -7422,10 +7451,10 @@ export default {
}
],
"getEmailingDomains": [
- 304
+ 305
],
"getToolIndex": [
- 336
+ 337
],
"getToolInputSchema": [
9,
@@ -7437,10 +7466,10 @@ export default {
}
],
"webhooks": [
- 335
+ 336
],
"webhook": [
- 335,
+ 336,
{
"id": [
3,
@@ -7449,7 +7478,7 @@ export default {
}
],
"myMessageFolders": [
- 377,
+ 378,
{
"messageChannelId": [
3
@@ -7457,7 +7486,7 @@ export default {
}
],
"myCalendarChannels": [
- 372,
+ 373,
{
"connectedAccountId": [
3
@@ -7465,22 +7494,22 @@ export default {
}
],
"minimalMetadata": [
- 388
+ 389
],
"appKeyValue": [
- 370,
+ 371,
{
"key": [
1,
"String!"
],
"scope": [
- 371
+ 372
]
}
],
"getJobs": [
- 155,
+ 154,
{
"jobIds": [
1,
@@ -7489,30 +7518,30 @@ export default {
}
],
"appConnections": [
- 221,
+ 220,
{
"filter": [
- 397
+ 398
]
}
],
"appConnection": [
- 221,
+ 220,
{
"id": [
- 222,
+ 221,
"ID!"
]
}
],
"findWorkspaceAiStats": [
- 367
+ 368
],
"chatThreads": [
- 356
+ 357
],
"chatThread": [
- 356,
+ 357,
{
"id": [
3,
@@ -7521,7 +7550,7 @@ export default {
}
],
"chatMessages": [
- 355,
+ 356,
{
"threadId": [
3,
@@ -7530,7 +7559,7 @@ export default {
}
],
"chatStreamCatchupChunks": [
- 360,
+ 361,
{
"threadId": [
3,
@@ -7539,13 +7568,13 @@ export default {
}
],
"getAiSystemPromptPreview": [
- 358
+ 359
],
"skills": [
- 354
+ 355
],
"skill": [
- 354,
+ 355,
{
"id": [
3,
@@ -7554,7 +7583,7 @@ export default {
}
],
"agentTurns": [
- 366,
+ 367,
{
"agentId": [
3,
@@ -7563,19 +7592,19 @@ export default {
}
],
"timelineActivityTypes": [
- 383
+ 384
],
"metadataTranslations": [
- 379,
+ 380,
{
"input": [
- 398,
+ 399,
"MetadataTranslationsInput!"
]
}
],
"checkUserExists": [
- 283,
+ 284,
{
"email": [
1,
@@ -7587,7 +7616,7 @@ export default {
}
],
"checkWorkspaceInviteHashIsValid": [
- 284,
+ 285,
{
"inviteHash": [
1,
@@ -7596,7 +7625,7 @@ export default {
}
],
"findWorkspaceFromInviteHash": [
- 70,
+ 69,
{
"inviteHash": [
1,
@@ -7605,7 +7634,7 @@ export default {
}
],
"checkWorkspaceSubdomainAvailability": [
- 278,
+ 279,
{
"subdomain": [
1,
@@ -7614,10 +7643,10 @@ export default {
}
],
"getWorkspaceCreationDefaults": [
- 279
+ 280
],
"validatePasswordResetToken": [
- 276,
+ 277,
{
"passwordResetToken": [
1,
@@ -7626,43 +7655,43 @@ export default {
}
],
"currentUser": [
- 73
+ 72
],
"getSSOIdentityProviders": [
- 227
+ 226
],
"eventLogs": [
- 353,
+ 354,
{
"input": [
- 399,
+ 400,
"EventLogQueryInput!"
]
}
],
"pieChartData": [
- 347,
+ 348,
{
"input": [
- 403,
+ 404,
"PieChartDataInput!"
]
}
],
"lineChartData": [
- 345,
+ 346,
{
"input": [
- 404,
+ 405,
"LineChartDataInput!"
]
}
],
"barChartData": [
- 342,
+ 343,
{
"input": [
- 405,
+ 406,
"BarChartDataInput!"
]
}
@@ -7677,7 +7706,7 @@ export default {
}
],
"getConnectedImapSmtpCaldavAccount": [
- 333,
+ 334,
{
"id": [
3,
@@ -7686,7 +7715,7 @@ export default {
}
],
"getAutoCompleteAddress": [
- 328,
+ 329,
{
"address": [
1,
@@ -7705,7 +7734,7 @@ export default {
}
],
"getAddressDetails": [
- 330,
+ 331,
{
"placeId": [
1,
@@ -7718,10 +7747,10 @@ export default {
}
],
"findManyPublicDomains": [
- 302
+ 303
],
"exportApplication": [
- 292,
+ 293,
{
"universalIdentifier": [
3,
@@ -7730,7 +7759,7 @@ export default {
}
],
"currentUserApplicationAuthorizations": [
- 287
+ 288
],
"__typename": [
1
@@ -7747,7 +7776,7 @@ export default {
1
],
"operationTypes": [
- 177
+ 176
],
"__typename": [
1
@@ -7771,10 +7800,10 @@ export default {
},
"ObjectFilter": {
"and": [
- 393
+ 394
],
"or": [
- 393
+ 394
],
"id": [
31
@@ -7809,7 +7838,7 @@ export default {
},
"LogicFunctionIdInput": {
"id": [
- 222
+ 221
],
"__typename": [
1
@@ -7828,7 +7857,7 @@ export default {
},
"FindMessageSuppressionsInput": {
"reason": [
- 323
+ 324
],
"searchTerm": [
1
@@ -7876,10 +7905,10 @@ export default {
},
"EventLogQueryInput": {
"table": [
- 400
+ 401
],
"filters": [
- 401
+ 402
],
"first": [
28
@@ -7900,7 +7929,7 @@ export default {
1
],
"dateRange": [
- 402
+ 403
],
"recordId": [
1
@@ -7961,7 +7990,7 @@ export default {
8,
{
"input": [
- 407,
+ 408,
"AddQuerySubscriptionInput!"
]
}
@@ -7970,49 +7999,49 @@ export default {
8,
{
"input": [
- 408,
+ 409,
"RemoveQueryFromEventStreamInput!"
]
}
],
"createManyNavigationMenuItems": [
- 153,
+ 152,
{
"inputs": [
- 409,
+ 410,
"[CreateNavigationMenuItemInput!]!"
]
}
],
"createNavigationMenuItem": [
- 153,
+ 152,
{
"input": [
- 409,
+ 410,
"CreateNavigationMenuItemInput!"
]
}
],
"updateManyNavigationMenuItems": [
- 153,
+ 152,
{
"inputs": [
- 410,
+ 411,
"[UpdateOneNavigationMenuItemInput!]!"
]
}
],
"updateNavigationMenuItem": [
- 153,
+ 152,
{
"input": [
- 410,
+ 411,
"UpdateOneNavigationMenuItemInput!"
]
}
],
"deleteManyNavigationMenuItems": [
- 153,
+ 152,
{
"ids": [
3,
@@ -8021,7 +8050,7 @@ export default {
}
],
"deleteNavigationMenuItem": [
- 153,
+ 152,
{
"id": [
3,
@@ -8030,7 +8059,7 @@ export default {
}
],
"createFileUpload": [
- 151,
+ 150,
{
"filename": [
1,
@@ -8041,7 +8070,7 @@ export default {
"Float!"
],
"fileFolder": [
- 297,
+ 298,
"FileFolder!"
],
"fieldMetadataId": [
@@ -8053,7 +8082,7 @@ export default {
}
],
"completeFileUpload": [
- 150,
+ 149,
{
"fileId": [
1,
@@ -8065,10 +8094,10 @@ export default {
8
],
"releaseEnterpriseServerBinding": [
- 148
+ 147
],
"setEnterpriseKey": [
- 148,
+ 147,
{
"enterpriseKey": [
1,
@@ -8077,28 +8106,28 @@ export default {
}
],
"uploadWorkspaceLogo": [
- 150,
+ 149,
{
"file": [
- 412,
+ 413,
"Upload!"
]
}
],
"uploadWorkspaceMemberProfilePicture": [
- 150,
+ 149,
{
"file": [
- 412,
+ 413,
"Upload!"
]
}
],
"uploadFilesFieldFileByUniversalIdentifier": [
- 150,
+ 149,
{
"file": [
- 412,
+ 413,
"Upload!"
],
"fieldMetadataUniversalIdentifier": [
@@ -8108,10 +8137,10 @@ export default {
}
],
"upsertUsageLimit": [
- 175,
+ 174,
{
"input": [
- 413,
+ 414,
"UpsertUsageLimitInput!"
]
}
@@ -8126,23 +8155,23 @@ export default {
}
],
"createViewFilterGroup": [
- 56,
+ 55,
{
"input": [
- 414,
+ 415,
"CreateViewFilterGroupInput!"
]
}
],
"updateViewFilterGroup": [
- 56,
+ 55,
{
"id": [
1,
"String!"
],
"input": [
- 415,
+ 416,
"UpdateViewFilterGroupInput!"
]
}
@@ -8166,59 +8195,59 @@ export default {
}
],
"createViewFilter": [
- 58,
+ 57,
{
"input": [
- 416,
+ 417,
"CreateViewFilterInput!"
]
}
],
"updateViewFilter": [
- 58,
+ 57,
{
"input": [
- 417,
+ 418,
"UpdateViewFilterInput!"
]
}
],
"deleteViewFilter": [
- 58,
+ 57,
{
"input": [
- 419,
+ 420,
"DeleteViewFilterInput!"
]
}
],
"destroyViewFilter": [
- 58,
+ 57,
{
"input": [
- 420,
+ 421,
"DestroyViewFilterInput!"
]
}
],
"createView": [
- 64,
+ 63,
{
"input": [
- 421,
+ 422,
"CreateViewInput!"
]
}
],
"updateView": [
- 64,
+ 63,
{
"id": [
1,
"String!"
],
"input": [
- 422,
+ 423,
"UpdateViewInput!"
]
}
@@ -8242,28 +8271,28 @@ export default {
}
],
"upsertViewWidget": [
- 64,
+ 63,
{
"input": [
- 423,
+ 424,
"UpsertViewWidgetInput!"
]
}
],
"createViewSort": [
- 61,
+ 60,
{
"input": [
- 429,
+ 430,
"CreateViewSortInput!"
]
}
],
"updateViewSort": [
- 61,
+ 60,
{
"input": [
- 430,
+ 431,
"UpdateViewSortInput!"
]
}
@@ -8272,7 +8301,7 @@ export default {
8,
{
"input": [
- 432,
+ 433,
"DeleteViewSortInput!"
]
}
@@ -8281,106 +8310,106 @@ export default {
8,
{
"input": [
- 433,
+ 434,
"DestroyViewSortInput!"
]
}
],
"updateViewField": [
- 54,
+ 53,
{
"input": [
- 434,
+ 435,
"UpdateViewFieldInput!"
]
}
],
"createViewField": [
- 54,
+ 53,
{
"input": [
- 436,
+ 437,
"CreateViewFieldInput!"
]
}
],
"createManyViewFields": [
- 54,
+ 53,
{
"inputs": [
- 436,
+ 437,
"[CreateViewFieldInput!]!"
]
}
],
"deleteViewField": [
- 54,
+ 53,
{
"input": [
- 437,
+ 438,
"DeleteViewFieldInput!"
]
}
],
"destroyViewField": [
- 54,
+ 53,
{
"input": [
- 438,
+ 439,
"DestroyViewFieldInput!"
]
}
],
"updateViewFieldGroup": [
- 63,
+ 62,
{
"input": [
- 439,
+ 440,
"UpdateViewFieldGroupInput!"
]
}
],
"createViewFieldGroup": [
- 63,
+ 62,
{
"input": [
- 441,
+ 442,
"CreateViewFieldGroupInput!"
]
}
],
"createManyViewFieldGroups": [
- 63,
+ 62,
{
"inputs": [
- 441,
+ 442,
"[CreateViewFieldGroupInput!]!"
]
}
],
"deleteViewFieldGroup": [
- 63,
+ 62,
{
"input": [
- 442,
+ 443,
"DeleteViewFieldGroupInput!"
]
}
],
"destroyViewFieldGroup": [
- 63,
+ 62,
{
"input": [
- 443,
+ 444,
"DestroyViewFieldGroupInput!"
]
}
],
"upsertFieldsWidget": [
- 64,
+ 63,
{
"input": [
- 444,
+ 445,
"UpsertFieldsWidgetInput!"
]
}
@@ -8389,7 +8418,7 @@ export default {
2,
{
"input": [
- 447,
+ 448,
"CreateApiKeyInput!"
]
}
@@ -8398,7 +8427,7 @@ export default {
2,
{
"input": [
- 448,
+ 449,
"UpdateApiKeyInput!"
]
}
@@ -8407,7 +8436,7 @@ export default {
2,
{
"input": [
- 449,
+ 450,
"RevokeApiKeyInput!"
]
}
@@ -8438,7 +8467,7 @@ export default {
28
],
"deleteConnectedAccount": [
- 188,
+ 187,
{
"id": [
3,
@@ -8464,14 +8493,14 @@ export default {
}
],
"checkoutSession": [
- 169,
+ 168,
{
"recurringInterval": [
- 136,
+ 135,
"SubscriptionInterval!"
],
"plan": [
- 132,
+ 131,
"BillingPlanKey!"
],
"requirePaymentMethod": [
@@ -8484,14 +8513,14 @@ export default {
}
],
"createSubscriptionPaymentIntent": [
- 168,
+ 167,
{
"recurringInterval": [
- 136,
+ 135,
"SubscriptionInterval!"
],
"plan": [
- 132,
+ 131,
"BillingPlanKey!"
],
"requirePaymentMethod": [
@@ -8508,22 +8537,22 @@ export default {
}
],
"createBillingPaymentMethodSetupIntent": [
- 168
+ 167
],
"switchSubscriptionInterval": [
- 170
+ 169
],
"switchBillingPlan": [
- 170
+ 169
],
"cancelSwitchBillingPlan": [
- 170
+ 169
],
"cancelSwitchBillingInterval": [
- 170
+ 169
],
"setResourceCreditSubscriptionPrice": [
- 170,
+ 169,
{
"priceId": [
1,
@@ -8532,13 +8561,13 @@ export default {
}
],
"endSubscriptionTrialPeriod": [
- 165
+ 164
],
"cancelSwitchResourceCreditPrice": [
- 170
+ 169
],
"skipSyncEmailOnboardingStep": [
- 182,
+ 181,
{
"isAutoSkipped": [
8,
@@ -8547,7 +8576,7 @@ export default {
}
],
"completeBookCallOnboardingStep": [
- 182,
+ 181,
{
"hasBookedCall": [
8,
@@ -8560,7 +8589,7 @@ export default {
}
],
"triggerInstallAppsOnboardingStep": [
- 182,
+ 181,
{
"universalIdentifiers": [
1,
@@ -8573,7 +8602,7 @@ export default {
}
],
"goBackToPreviousOnboardingStep": [
- 181
+ 180
],
"deleteWorkspaceInvitation": [
1,
@@ -8585,7 +8614,7 @@ export default {
}
],
"resendWorkspaceInvitation": [
- 184,
+ 183,
{
"appTokenId": [
1,
@@ -8594,7 +8623,7 @@ export default {
}
],
"sendInvitations": [
- 184,
+ 183,
{
"emails": [
1,
@@ -8606,10 +8635,10 @@ export default {
}
],
"createApprovedAccessDomain": [
- 179,
+ 178,
{
"input": [
- 450,
+ 451,
"CreateApprovedAccessDomainInput!"
]
}
@@ -8618,38 +8647,38 @@ export default {
8,
{
"input": [
- 451,
+ 452,
"DeleteApprovedAccessDomainInput!"
]
}
],
"validateApprovedAccessDomain": [
- 179,
+ 178,
{
"input": [
- 452,
+ 453,
"ValidateApprovedAccessDomainInput!"
]
}
],
"createPageLayoutTab": [
- 124,
+ 123,
{
"input": [
- 453,
+ 454,
"CreatePageLayoutTabInput!"
]
}
],
"updatePageLayoutTab": [
- 124,
+ 123,
{
"id": [
1,
"String!"
],
"input": [
- 454,
+ 455,
"UpdatePageLayoutTabInput!"
]
}
@@ -8664,23 +8693,23 @@ export default {
}
],
"createPageLayout": [
- 125,
+ 124,
{
"input": [
- 455,
+ 456,
"CreatePageLayoutInput!"
]
}
],
"updatePageLayout": [
- 125,
+ 124,
{
"id": [
1,
"String!"
],
"input": [
- 456,
+ 457,
"UpdatePageLayoutInput!"
]
}
@@ -8695,20 +8724,20 @@ export default {
}
],
"updatePageLayoutWithTabsAndWidgets": [
- 125,
+ 124,
{
"id": [
1,
"String!"
],
"input": [
- 457,
+ 458,
"UpdatePageLayoutWithTabsInput!"
]
}
],
"resetPageLayoutToDefault": [
- 125,
+ 124,
{
"id": [
1,
@@ -8717,7 +8746,7 @@ export default {
}
],
"resetPageLayoutWidgetToDefault": [
- 81,
+ 80,
{
"id": [
1,
@@ -8726,7 +8755,7 @@ export default {
}
],
"resetPageLayoutTabToDefault": [
- 124,
+ 123,
{
"id": [
1,
@@ -8735,23 +8764,23 @@ export default {
}
],
"createPageLayoutWidget": [
- 81,
+ 80,
{
"input": [
- 460,
+ 461,
"CreatePageLayoutWidgetInput!"
]
}
],
"updatePageLayoutWidget": [
- 81,
+ 80,
{
"id": [
1,
"String!"
],
"input": [
- 461,
+ 462,
"UpdatePageLayoutWidgetInput!"
]
}
@@ -8769,7 +8798,7 @@ export default {
10,
{
"input": [
- 462,
+ 463,
"CreateAgentInput!"
]
}
@@ -8778,7 +8807,7 @@ export default {
10,
{
"input": [
- 463,
+ 464,
"UpdateAgentInput!"
]
}
@@ -8787,7 +8816,7 @@ export default {
10,
{
"input": [
- 392,
+ 393,
"AgentIdInput!"
]
}
@@ -8796,7 +8825,7 @@ export default {
23,
{
"input": [
- 464,
+ 465,
"CreateOneObjectInput!"
]
}
@@ -8805,7 +8834,7 @@ export default {
23,
{
"input": [
- 466,
+ 467,
"DeleteOneObjectInput!"
]
}
@@ -8814,25 +8843,25 @@ export default {
23,
{
"input": [
- 467,
+ 468,
"UpdateOneObjectInput!"
]
}
],
"createOneIndex": [
- 249,
+ 250,
{
"input": [
- 470,
+ 471,
"CreateOneIndexInput!"
]
}
],
"deleteOneIndex": [
- 249,
+ 250,
{
"input": [
- 473,
+ 474,
"DeleteOneIndexInput!"
]
}
@@ -8841,7 +8870,7 @@ export default {
21,
{
"input": [
- 394,
+ 395,
"LogicFunctionIdInput!"
]
}
@@ -8850,16 +8879,16 @@ export default {
21,
{
"input": [
- 474,
+ 475,
"CreateLogicFunctionFromSourceInput!"
]
}
],
"executeOneLogicFunction": [
- 146,
+ 145,
{
"input": [
- 475,
+ 476,
"ExecuteOneLogicFunctionInput!"
]
}
@@ -8868,7 +8897,7 @@ export default {
8,
{
"input": [
- 476,
+ 477,
"UpdateLogicFunctionFromSourceInput!"
]
}
@@ -8877,7 +8906,7 @@ export default {
14,
{
"input": [
- 478,
+ 479,
"CreateCommandMenuItemInput!"
]
}
@@ -8886,7 +8915,7 @@ export default {
14,
{
"input": [
- 479,
+ 480,
"UpdateCommandMenuItemInput!"
]
}
@@ -8913,7 +8942,7 @@ export default {
13,
{
"input": [
- 480,
+ 481,
"CreateFrontComponentInput!"
]
}
@@ -8922,7 +8951,7 @@ export default {
13,
{
"input": [
- 481,
+ 482,
"UpdateFrontComponentInput!"
]
}
@@ -8937,31 +8966,31 @@ export default {
}
],
"activateWorkspace": [
- 70,
+ 69,
{
"data": [
- 483,
+ 484,
"ActivateWorkspaceInput!"
]
}
],
"updateWorkspace": [
- 70,
+ 69,
{
"data": [
- 484,
+ 485,
"UpdateWorkspaceInput!"
]
}
],
"deleteCurrentWorkspace": [
- 70
+ 69
],
"checkCustomDomainValidRecords": [
- 261
+ 262
],
"enrichWorkspaceCompany": [
- 238
+ 239
],
"upgradeApplication": [
8,
@@ -8977,19 +9006,19 @@ export default {
}
],
"createApplicationRegistration": [
- 218,
+ 217,
{
"input": [
- 485,
+ 486,
"CreateApplicationRegistrationInput!"
]
}
],
"updateApplicationRegistration": [
- 76,
+ 75,
{
"input": [
- 486,
+ 487,
"UpdateApplicationRegistrationInput!"
]
}
@@ -9004,7 +9033,7 @@ export default {
}
],
"rotateApplicationRegistrationClientSecret": [
- 220,
+ 219,
{
"id": [
1,
@@ -9013,19 +9042,19 @@ export default {
}
],
"createApplicationRegistrationVariable": [
- 192,
+ 191,
{
"input": [
- 488,
+ 489,
"CreateApplicationRegistrationVariableInput!"
]
}
],
"updateApplicationRegistrationVariable": [
- 192,
+ 191,
{
"input": [
- 489,
+ 490,
"UpdateApplicationRegistrationVariableInput!"
]
}
@@ -9040,10 +9069,10 @@ export default {
}
],
"uploadAppTarball": [
- 76,
+ 75,
{
"file": [
- 412,
+ 413,
"Upload!"
],
"universalIdentifier": [
@@ -9052,7 +9081,7 @@ export default {
}
],
"claimApplicationRegistrationOwnership": [
- 76,
+ 75,
{
"applicationRegistrationId": [
1,
@@ -9061,7 +9090,7 @@ export default {
}
],
"transferApplicationRegistrationOwnership": [
- 76,
+ 75,
{
"applicationRegistrationId": [
1,
@@ -9097,6 +9126,24 @@ export default {
]
}
],
+ "triggerInstallApplicationJob": [
+ 237,
+ {
+ "input": [
+ 492,
+ "TriggerInstallApplicationJobInput!"
+ ]
+ }
+ ],
+ "triggerUninstallApplicationJob": [
+ 238,
+ {
+ "input": [
+ 493,
+ "TriggerUninstallApplicationJobInput!"
+ ]
+ }
+ ],
"updateApplication": [
49,
{
@@ -9105,7 +9152,7 @@ export default {
"UUID!"
],
"input": [
- 491,
+ 494,
"UpdateApplicationInput!"
]
}
@@ -9123,82 +9170,82 @@ export default {
8
],
"createOneField": [
- 241,
+ 242,
{
"input": [
- 492,
+ 495,
"CreateOneFieldMetadataInput!"
]
}
],
"updateOneField": [
- 241,
+ 242,
{
"input": [
- 494,
+ 497,
"UpdateOneFieldMetadataInput!"
]
}
],
"deleteOneField": [
- 241,
+ 242,
{
"input": [
- 496,
+ 499,
"DeleteOneFieldInput!"
]
}
],
"createViewGroup": [
- 60,
+ 59,
{
"input": [
- 497,
+ 500,
"CreateViewGroupInput!"
]
}
],
"createManyViewGroups": [
- 60,
+ 59,
{
"inputs": [
- 497,
+ 500,
"[CreateViewGroupInput!]!"
]
}
],
"updateViewGroup": [
- 60,
+ 59,
{
"input": [
- 498,
+ 501,
"UpdateViewGroupInput!"
]
}
],
"updateManyViewGroups": [
- 60,
+ 59,
{
"inputs": [
- 498,
+ 501,
"[UpdateViewGroupInput!]!"
]
}
],
"deleteViewGroup": [
- 60,
+ 59,
{
"input": [
- 500,
+ 503,
"DeleteViewGroupInput!"
]
}
],
"destroyViewGroup": [
- 60,
+ 59,
{
"input": [
- 501,
+ 504,
"DestroyViewGroupInput!"
]
}
@@ -9220,7 +9267,7 @@ export default {
48,
{
"createRoleInput": [
- 502,
+ 505,
"CreateRoleInput!"
]
}
@@ -9229,7 +9276,7 @@ export default {
48,
{
"updateRoleInput": [
- 503,
+ 506,
"UpdateRoleInput!"
]
}
@@ -9247,7 +9294,7 @@ export default {
45,
{
"upsertObjectPermissionsInput": [
- 505,
+ 508,
"UpsertObjectPermissionsInput!"
]
}
@@ -9256,7 +9303,7 @@ export default {
46,
{
"upsertPermissionFlagsInput": [
- 507,
+ 510,
"UpsertPermissionFlagsInput!"
]
}
@@ -9265,16 +9312,16 @@ export default {
40,
{
"upsertFieldPermissionsInput": [
- 508,
+ 511,
"UpsertFieldPermissionsInput!"
]
}
],
"upsertRowLevelPermissionPredicates": [
- 262,
+ 263,
{
"input": [
- 510,
+ 513,
"UpsertRowLevelPermissionPredicatesInput!"
]
}
@@ -9302,43 +9349,43 @@ export default {
}
],
"sendEmailViaEmailingDomain": [
- 319,
+ 320,
{
"input": [
- 513,
+ 516,
"SendEmailViaDomainInput!"
]
}
],
"sendMessageCampaign": [
- 320,
+ 321,
{
"input": [
- 514,
+ 517,
"SendMessageCampaignInput!"
]
}
],
"cancelMessageCampaign": [
- 318,
+ 319,
{
"input": [
- 515,
+ 518,
"CancelMessageCampaignInput!"
]
}
],
"sendMessageCampaignTest": [
- 319,
+ 320,
{
"input": [
- 516,
+ 519,
"SendMessageCampaignTestInput!"
]
}
],
"duplicateMessageList": [
- 321,
+ 322,
{
"id": [
3,
@@ -9347,10 +9394,10 @@ export default {
}
],
"createMessageSuppression": [
- 322,
+ 323,
{
"input": [
- 517,
+ 520,
"CreateMessageSuppressionInput!"
]
}
@@ -9365,19 +9412,19 @@ export default {
}
],
"createUnsubscribeTopic": [
- 326,
+ 327,
{
"input": [
- 518,
+ 521,
"CreateUnsubscribeTopicInput!"
]
}
],
"updateUnsubscribeTopic": [
- 326,
+ 327,
{
"input": [
- 519,
+ 522,
"UpdateUnsubscribeTopicInput!"
]
}
@@ -9392,34 +9439,34 @@ export default {
}
],
"updateMessageChannel": [
- 308,
+ 309,
{
"input": [
- 520,
+ 523,
"UpdateMessageChannelInput!"
]
}
],
"createEmailGroupChannel": [
- 316,
+ 317,
{
"input": [
- 522,
+ 525,
"CreateEmailGroupChannelInput!"
]
}
],
"updateEmailGroupChannel": [
- 308,
+ 309,
{
"input": [
- 523,
+ 526,
"UpdateEmailGroupChannelInput!"
]
}
],
"deleteEmailGroupChannel": [
- 308,
+ 309,
{
"id": [
3,
@@ -9428,10 +9475,10 @@ export default {
}
],
"createEmailingDomain": [
- 304,
+ 305,
{
"input": [
- 524,
+ 527,
"CreateEmailingDomainInput!"
]
}
@@ -9446,7 +9493,7 @@ export default {
}
],
"verifyEmailingDomain": [
- 304,
+ 305,
{
"id": [
1,
@@ -9455,34 +9502,34 @@ export default {
}
],
"runAgent": [
- 338,
+ 339,
{
"input": [
- 525,
+ 528,
"RunAgentInput!"
]
}
],
"createWebhook": [
- 335,
+ 336,
{
"input": [
- 528,
+ 531,
"CreateWebhookInput!"
]
}
],
"updateWebhook": [
- 335,
+ 336,
{
"input": [
- 529,
+ 532,
"UpdateWebhookInput!"
]
}
],
"deleteWebhook": [
- 335,
+ 336,
{
"id": [
3,
@@ -9491,37 +9538,37 @@ export default {
}
],
"updateMessageFolder": [
- 377,
+ 378,
{
"input": [
- 531,
+ 534,
"UpdateMessageFolderInput!"
]
}
],
"updateMessageFolders": [
- 377,
+ 378,
{
"input": [
- 533,
+ 536,
"UpdateMessageFoldersInput!"
]
}
],
"updateCalendarChannel": [
- 372,
+ 373,
{
"input": [
- 534,
+ 537,
"UpdateCalendarChannelInput!"
]
}
],
"setAppKeyValue": [
- 370,
+ 371,
{
"input": [
- 536,
+ 539,
"SetAppKeyValueInput!"
]
}
@@ -9534,33 +9581,33 @@ export default {
"String!"
],
"scope": [
- 371
+ 372
]
}
],
"enqueueJob": [
- 368,
+ 369,
{
"input": [
- 537,
+ 540,
"EnqueueJobInput!"
]
}
],
"enqueueJobs": [
- 369,
+ 370,
{
"input": [
- 538,
+ 541,
"EnqueueJobsInput!"
]
}
],
"createChatThread": [
- 356
+ 357
],
"sendChatMessage": [
- 361,
+ 362,
{
"threadId": [
3,
@@ -9581,13 +9628,13 @@ export default {
1
],
"fileAttachments": [
- 540,
+ 543,
"[FileAttachmentInput!]"
]
}
],
"retryChatMessage": [
- 361,
+ 362,
{
"threadId": [
3,
@@ -9599,7 +9646,7 @@ export default {
}
],
"answerAgentChatQuestion": [
- 361,
+ 362,
{
"threadId": [
3,
@@ -9610,14 +9657,14 @@ export default {
"UUID!"
],
"answers": [
- 541,
+ 544,
"[AgentChatQuestionAnswerInput!]!"
],
"modelId": [
1
],
"fileAttachments": [
- 540,
+ 543,
"[FileAttachmentInput!]"
]
}
@@ -9632,7 +9679,7 @@ export default {
}
],
"renameChatThread": [
- 356,
+ 357,
{
"id": [
3,
@@ -9645,7 +9692,7 @@ export default {
}
],
"archiveChatThread": [
- 356,
+ 357,
{
"id": [
3,
@@ -9654,7 +9701,7 @@ export default {
}
],
"unarchiveChatThread": [
- 356,
+ 357,
{
"id": [
3,
@@ -9681,7 +9728,7 @@ export default {
}
],
"startWorkspaceSetupChat": [
- 363,
+ 364,
{
"companyContext": [
9
@@ -9692,25 +9739,25 @@ export default {
}
],
"createSkill": [
- 354,
+ 355,
{
"input": [
- 542,
+ 545,
"CreateSkillInput!"
]
}
],
"updateSkill": [
- 354,
+ 355,
{
"input": [
- 543,
+ 546,
"UpdateSkillInput!"
]
}
],
"deleteSkill": [
- 354,
+ 355,
{
"id": [
3,
@@ -9719,7 +9766,7 @@ export default {
}
],
"activateSkill": [
- 354,
+ 355,
{
"id": [
3,
@@ -9728,7 +9775,7 @@ export default {
}
],
"deactivateSkill": [
- 354,
+ 355,
{
"id": [
3,
@@ -9737,7 +9784,7 @@ export default {
}
],
"evaluateAgentTurn": [
- 365,
+ 366,
{
"turnId": [
3,
@@ -9746,7 +9793,7 @@ export default {
}
],
"runEvaluationInput": [
- 366,
+ 367,
{
"agentId": [
3,
@@ -9759,16 +9806,16 @@ export default {
}
],
"updateTimelineActivityType": [
- 383,
+ 384,
{
"input": [
- 544,
+ 547,
"UpdateTimelineActivityTypeInput!"
]
}
],
"resetTimelineActivityType": [
- 383,
+ 384,
{
"id": [
3,
@@ -9777,16 +9824,16 @@ export default {
}
],
"getAuthorizationUrlForSSO": [
- 271,
+ 272,
{
"input": [
- 545,
+ 548,
"GetAuthorizationUrlForSSOInput!"
]
}
],
"getLoginTokenFromCredentials": [
- 282,
+ 283,
{
"email": [
1,
@@ -9812,7 +9859,7 @@ export default {
}
],
"signIn": [
- 269,
+ 270,
{
"email": [
1,
@@ -9834,7 +9881,7 @@ export default {
}
],
"verifyEmailAndGetLoginToken": [
- 277,
+ 278,
{
"emailVerificationToken": [
1,
@@ -9854,7 +9901,7 @@ export default {
}
],
"verifyEmailAndGetWorkspaceAgnosticToken": [
- 269,
+ 270,
{
"emailVerificationToken": [
1,
@@ -9870,7 +9917,7 @@ export default {
}
],
"getAuthTokensFromOTP": [
- 281,
+ 282,
{
"otp": [
1,
@@ -9890,7 +9937,7 @@ export default {
}
],
"signUp": [
- 269,
+ 270,
{
"email": [
1,
@@ -9912,7 +9959,7 @@ export default {
}
],
"signUpInWorkspace": [
- 274,
+ 275,
{
"email": [
1,
@@ -9943,31 +9990,31 @@ export default {
}
],
"signUpInNewWorkspace": [
- 274,
+ 275,
{
"input": [
- 546
+ 549
]
}
],
"uploadNewWorkspaceLogo": [
- 150,
+ 149,
{
"workspaceId": [
1,
"String!"
],
"file": [
- 412,
+ 413,
"Upload!"
]
}
],
"generateTransientToken": [
- 275
+ 276
],
"getAuthTokensFromLoginToken": [
- 281,
+ 282,
{
"loginToken": [
1,
@@ -9980,7 +10027,7 @@ export default {
}
],
"getAuthTokensFromSSOExchangeToken": [
- 281,
+ 282,
{
"ssoExchangeToken": [
1,
@@ -9989,7 +10036,7 @@ export default {
}
],
"authorizeApp": [
- 267,
+ 268,
{
"clientId": [
1,
@@ -10014,7 +10061,7 @@ export default {
}
],
"renewToken": [
- 281,
+ 282,
{
"appToken": [
1,
@@ -10031,7 +10078,7 @@ export default {
}
],
"generateApiKeyToken": [
- 280,
+ 281,
{
"apiKeyId": [
3,
@@ -10047,7 +10094,7 @@ export default {
11
],
"emailPasswordResetLink": [
- 270,
+ 271,
{
"email": [
1,
@@ -10062,7 +10109,7 @@ export default {
}
],
"updatePasswordViaResetToken": [
- 272,
+ 273,
{
"passwordResetToken": [
1,
@@ -10075,7 +10122,7 @@ export default {
}
],
"initiateOTPProvisioning": [
- 265,
+ 266,
{
"loginToken": [
1,
@@ -10088,10 +10135,10 @@ export default {
}
],
"initiateOTPProvisioningForAuthenticatedUser": [
- 265
+ 266
],
"deleteTwoFactorAuthenticationMethod": [
- 264,
+ 265,
{
"twoFactorAuthenticationMethodId": [
3,
@@ -10100,7 +10147,7 @@ export default {
}
],
"verifyTwoFactorAuthenticationMethodForAuthenticatedUser": [
- 266,
+ 267,
{
"otp": [
1,
@@ -10109,10 +10156,10 @@ export default {
}
],
"deleteUser": [
- 73
+ 72
],
"deleteUserFromWorkspace": [
- 52,
+ 51,
{
"workspaceMemberIdToDelete": [
1,
@@ -10124,7 +10171,7 @@ export default {
8,
{
"input": [
- 547,
+ 550,
"UpdateWorkspaceMemberSettingsInput!"
]
}
@@ -10142,7 +10189,7 @@ export default {
}
],
"resendEmailVerificationToken": [
- 223,
+ 222,
{
"email": [
1,
@@ -10155,43 +10202,43 @@ export default {
}
],
"createOIDCIdentityProvider": [
- 228,
+ 227,
{
"input": [
- 548,
+ 551,
"SetupOIDCSsoInput!"
]
}
],
"createSAMLIdentityProvider": [
- 228,
+ 227,
{
"input": [
- 549,
+ 552,
"SetupSAMLSsoInput!"
]
}
],
"deleteSSOIdentityProvider": [
- 224,
+ 223,
{
"input": [
- 550,
+ 553,
"DeleteSsoInput!"
]
}
],
"editSSOIdentityProvider": [
- 225,
+ 224,
{
"input": [
- 551,
+ 554,
"EditSsoInput!"
]
}
],
"createObjectEvent": [
- 350,
+ 351,
{
"event": [
1,
@@ -10211,10 +10258,10 @@ export default {
}
],
"trackAnalytics": [
- 350,
+ 351,
{
"type": [
- 552,
+ 555,
"AnalyticsType!"
],
"name": [
@@ -10229,7 +10276,7 @@ export default {
}
],
"duplicateDashboard": [
- 348,
+ 349,
{
"id": [
3,
@@ -10238,7 +10285,7 @@ export default {
}
],
"impersonate": [
- 285,
+ 286,
{
"userId": [
3,
@@ -10251,28 +10298,28 @@ export default {
}
],
"stopImpersonation": [
- 286
+ 287
],
"createCalendarEvent": [
- 340,
+ 341,
{
"input": [
- 553,
+ 556,
"CreateCalendarEventInput!"
]
}
],
"sendEmail": [
- 349,
+ 350,
{
"input": [
- 554,
+ 557,
"SendEmailInput!"
]
}
],
"startChannelSync": [
- 339,
+ 340,
{
"connectedAccountId": [
3,
@@ -10281,14 +10328,14 @@ export default {
}
],
"saveImapSmtpCaldavAccount": [
- 334,
+ 335,
{
"handle": [
1,
"String!"
],
"connectionParameters": [
- 556,
+ 559,
"EmailAccountConnectionParameters!"
],
"id": [
@@ -10297,16 +10344,16 @@ export default {
}
],
"updateLabPublicFeatureFlag": [
- 189,
+ 188,
{
"input": [
- 558,
+ 561,
"UpdateLabPublicFeatureFlagInput!"
]
}
],
"createPublicDomain": [
- 302,
+ 303,
{
"domain": [
1,
@@ -10328,7 +10375,7 @@ export default {
}
],
"checkPublicDomainValidRecords": [
- 261,
+ 262,
{
"domain": [
1,
@@ -10337,7 +10384,7 @@ export default {
}
],
"createDevelopmentApplication": [
- 300,
+ 301,
{
"universalIdentifier": [
1,
@@ -10350,7 +10397,7 @@ export default {
}
],
"syncApplication": [
- 301,
+ 302,
{
"manifest": [
9,
@@ -10365,10 +10412,10 @@ export default {
}
],
"uploadApplicationFile": [
- 293,
+ 294,
{
"file": [
- 412,
+ 413,
"Upload!"
],
"applicationUniversalIdentifier": [
@@ -10376,7 +10423,7 @@ export default {
"String!"
],
"fileFolder": [
- 297,
+ 298,
"FileFolder!"
],
"filePath": [
@@ -10386,20 +10433,20 @@ export default {
}
],
"createApplicationFileUploads": [
- 299,
+ 300,
{
"applicationUniversalIdentifier": [
1,
"String!"
],
"files": [
- 559,
+ 562,
"[ApplicationFileUploadRequestInput!]!"
]
}
],
"completeApplicationFileUploads": [
- 295,
+ 296,
{
"applicationUniversalIdentifier": [
1,
@@ -10484,7 +10531,7 @@ export default {
3
],
"type": [
- 154
+ 153
],
"name": [
1
@@ -10516,7 +10563,7 @@ export default {
3
],
"update": [
- 411
+ 412
],
"__typename": [
1
@@ -10551,10 +10598,10 @@ export default {
"Upload": {},
"UpsertUsageLimitInput": {
"resourceType": [
- 176
+ 175
],
"operationType": [
- 177
+ 176
],
"spenderType": [
1
@@ -10575,10 +10622,10 @@ export default {
1
],
"limitValue": [
- 178
+ 177
],
"burstValue": [
- 178
+ 177
],
"__typename": [
1
@@ -10592,7 +10639,7 @@ export default {
3
],
"logicalOperator": [
- 57
+ 56
],
"positionInViewFilterGroup": [
15
@@ -10612,7 +10659,7 @@ export default {
3
],
"logicalOperator": [
- 57
+ 56
],
"positionInViewFilterGroup": [
15
@@ -10632,7 +10679,7 @@ export default {
3
],
"operand": [
- 59
+ 58
],
"value": [
9
@@ -10661,7 +10708,7 @@ export default {
3
],
"update": [
- 418
+ 419
],
"__typename": [
1
@@ -10672,7 +10719,7 @@ export default {
3
],
"operand": [
- 59
+ 58
],
"value": [
9
@@ -10720,10 +10767,10 @@ export default {
3
],
"type": [
- 65
+ 64
],
"key": [
- 66
+ 65
],
"icon": [
1
@@ -10741,10 +10788,10 @@ export default {
28
],
"openRecordIn": [
- 67
+ 66
],
"kanbanAggregateOperation": [
- 55
+ 54
],
"kanbanAggregateOperationFieldMetadataId": [
3
@@ -10753,7 +10800,7 @@ export default {
1
],
"calendarLayout": [
- 68
+ 67
],
"calendarFieldMetadataId": [
3
@@ -10765,7 +10812,7 @@ export default {
3
],
"visibility": [
- 69
+ 68
],
"__typename": [
1
@@ -10779,7 +10826,7 @@ export default {
1
],
"type": [
- 65
+ 64
],
"icon": [
1
@@ -10791,10 +10838,10 @@ export default {
8
],
"openRecordIn": [
- 67
+ 66
],
"kanbanAggregateOperation": [
- 55
+ 54
],
"kanbanAggregateOperationFieldMetadataId": [
3
@@ -10803,7 +10850,7 @@ export default {
1
],
"calendarLayout": [
- 68
+ 67
],
"calendarFieldMetadataId": [
3
@@ -10812,7 +10859,7 @@ export default {
3
],
"visibility": [
- 69
+ 68
],
"mainGroupByFieldMetadataId": [
3
@@ -10832,19 +10879,19 @@ export default {
3
],
"view": [
- 424
+ 425
],
"viewFields": [
- 425
+ 426
],
"viewFilters": [
- 426
+ 427
],
"viewFilterGroups": [
- 427
+ 428
],
"viewSorts": [
- 428
+ 429
],
"__typename": [
1
@@ -10852,7 +10899,7 @@ export default {
},
"UpsertViewWidgetViewSettingsInput": {
"type": [
- 65
+ 64
],
"mainGroupByFieldMetadataId": [
3
@@ -10861,10 +10908,10 @@ export default {
8
],
"openRecordIn": [
- 67
+ 66
],
"kanbanAggregateOperation": [
- 55
+ 54
],
"kanbanAggregateOperationFieldMetadataId": [
3
@@ -10873,7 +10920,7 @@ export default {
28
],
"calendarLayout": [
- 68
+ 67
],
"calendarFieldMetadataId": [
3
@@ -10902,7 +10949,7 @@ export default {
15
],
"aggregateOperation": [
- 55
+ 54
],
"__typename": [
1
@@ -10916,7 +10963,7 @@ export default {
3
],
"operand": [
- 59
+ 58
],
"value": [
9
@@ -10945,7 +10992,7 @@ export default {
3
],
"logicalOperator": [
- 57
+ 56
],
"positionInViewFilterGroup": [
15
@@ -10962,7 +11009,7 @@ export default {
3
],
"direction": [
- 62
+ 61
],
"__typename": [
1
@@ -10976,7 +11023,7 @@ export default {
3
],
"direction": [
- 62
+ 61
],
"subFieldName": [
1
@@ -10993,7 +11040,7 @@ export default {
3
],
"update": [
- 431
+ 432
],
"__typename": [
1
@@ -11001,7 +11048,7 @@ export default {
},
"UpdateViewSortInputUpdates": {
"direction": [
- 62
+ 61
],
"subFieldName": [
1
@@ -11031,7 +11078,7 @@ export default {
3
],
"update": [
- 435
+ 436
],
"__typename": [
1
@@ -11048,7 +11095,7 @@ export default {
15
],
"aggregateOperation": [
- 55
+ 54
],
"viewFieldGroupId": [
3
@@ -11077,7 +11124,7 @@ export default {
15
],
"aggregateOperation": [
- 55
+ 54
],
"viewFieldGroupId": [
3
@@ -11107,7 +11154,7 @@ export default {
3
],
"update": [
- 440
+ 441
],
"__typename": [
1
@@ -11171,10 +11218,10 @@ export default {
3
],
"groups": [
- 445
+ 446
],
"fields": [
- 446
+ 447
],
"__typename": [
1
@@ -11194,7 +11241,7 @@ export default {
8
],
"fields": [
- 446
+ 447
],
"__typename": [
1
@@ -11300,7 +11347,7 @@ export default {
3
],
"layoutMode": [
- 85
+ 84
],
"__typename": [
1
@@ -11317,7 +11364,7 @@ export default {
1
],
"layoutMode": [
- 85
+ 84
],
"__typename": [
1
@@ -11328,7 +11375,7 @@ export default {
1
],
"type": [
- 126
+ 125
],
"objectMetadataId": [
3
@@ -11342,7 +11389,7 @@ export default {
1
],
"type": [
- 126
+ 125
],
"objectMetadataId": [
3
@@ -11356,7 +11403,7 @@ export default {
1
],
"type": [
- 126
+ 125
],
"objectMetadataId": [
3
@@ -11365,7 +11412,7 @@ export default {
8
],
"tabs": [
- 458
+ 459
],
"__typename": [
1
@@ -11385,10 +11432,10 @@ export default {
1
],
"layoutMode": [
- 85
+ 84
],
"widgets": [
- 459
+ 460
],
"__typename": [
1
@@ -11405,7 +11452,7 @@ export default {
1
],
"type": [
- 82
+ 81
],
"objectMetadataId": [
3
@@ -11434,7 +11481,7 @@ export default {
1
],
"type": [
- 82
+ 81
],
"objectMetadataId": [
3
@@ -11457,7 +11504,7 @@ export default {
1
],
"type": [
- 82
+ 81
],
"objectMetadataId": [
3
@@ -11553,7 +11600,7 @@ export default {
},
"CreateOneObjectInput": {
"object": [
- 465
+ 466
],
"__typename": [
1
@@ -11613,7 +11660,7 @@ export default {
},
"UpdateOneObjectInput": {
"update": [
- 468
+ 469
],
"id": [
3
@@ -11666,7 +11713,7 @@ export default {
24
],
"translations": [
- 469
+ 470
],
"__typename": [
1
@@ -11688,7 +11735,7 @@ export default {
},
"CreateOneIndexInput": {
"index": [
- 471
+ 472
],
"__typename": [
1
@@ -11699,10 +11746,10 @@ export default {
3
],
"fields": [
- 472
+ 473
],
"indexType": [
- 250
+ 251
],
"__typename": [
1
@@ -11784,7 +11831,7 @@ export default {
3
],
"update": [
- 477
+ 478
],
"__typename": [
1
@@ -11950,7 +11997,7 @@ export default {
3
],
"update": [
- 482
+ 483
],
"__typename": [
1
@@ -11995,7 +12042,7 @@ export default {
8
],
"workspaceDiscoverability": [
- 71
+ 70
],
"allowImpersonation": [
8
@@ -12077,7 +12124,7 @@ export default {
1
],
"update": [
- 487
+ 488
],
"__typename": [
1
@@ -12131,7 +12178,7 @@ export default {
1
],
"update": [
- 490
+ 491
],
"__typename": [
1
@@ -12151,6 +12198,22 @@ export default {
1
]
},
+ "TriggerInstallApplicationJobInput": {
+ "universalIdentifier": [
+ 1
+ ],
+ "__typename": [
+ 1
+ ]
+ },
+ "TriggerUninstallApplicationJobInput": {
+ "universalIdentifier": [
+ 1
+ ],
+ "__typename": [
+ 1
+ ]
+ },
"UpdateApplicationInput": {
"autoUpgrade": [
8
@@ -12161,7 +12224,7 @@ export default {
},
"CreateOneFieldMetadataInput": {
"field": [
- 493
+ 496
],
"__typename": [
1
@@ -12169,7 +12232,7 @@ export default {
},
"CreateFieldInput": {
"type": [
- 242
+ 243
],
"name": [
1
@@ -12234,7 +12297,7 @@ export default {
3
],
"update": [
- 495
+ 498
],
"__typename": [
1
@@ -12293,7 +12356,7 @@ export default {
9
],
"translations": [
- 469
+ 470
],
"__typename": [
1
@@ -12332,7 +12395,7 @@ export default {
3
],
"update": [
- 499
+ 502
],
"__typename": [
1
@@ -12417,7 +12480,7 @@ export default {
},
"UpdateRoleInput": {
"update": [
- 504
+ 507
],
"id": [
3
@@ -12472,7 +12535,7 @@ export default {
3
],
"objectPermissions": [
- 506
+ 509
],
"__typename": [
1
@@ -12514,7 +12577,7 @@ export default {
3
],
"fieldPermissions": [
- 509
+ 512
],
"__typename": [
1
@@ -12545,10 +12608,10 @@ export default {
3
],
"predicates": [
- 511
+ 514
],
"predicateGroups": [
- 512
+ 515
],
"__typename": [
1
@@ -12693,7 +12756,7 @@ export default {
1
],
"visibility": [
- 327
+ 328
],
"__typename": [
1
@@ -12710,7 +12773,7 @@ export default {
1
],
"visibility": [
- 327
+ 328
],
"__typename": [
1
@@ -12721,7 +12784,7 @@ export default {
3
],
"update": [
- 521
+ 524
],
"__typename": [
1
@@ -12729,16 +12792,16 @@ export default {
},
"UpdateMessageChannelInputUpdates": {
"visibility": [
- 309
+ 310
],
"isContactAutoCreationEnabled": [
8
],
"contactAutoCreationPolicy": [
- 311
+ 312
],
"messageFolderImportPolicy": [
- 312
+ 313
],
"isSyncEnabled": [
8
@@ -12794,7 +12857,7 @@ export default {
3
],
"messages": [
- 526
+ 529
],
"__typename": [
1
@@ -12802,7 +12865,7 @@ export default {
},
"RunAgentMessageInput": {
"role": [
- 527
+ 530
],
"content": [
1
@@ -12837,7 +12900,7 @@ export default {
3
],
"update": [
- 530
+ 533
],
"__typename": [
1
@@ -12865,7 +12928,7 @@ export default {
3
],
"update": [
- 532
+ 535
],
"__typename": [
1
@@ -12884,7 +12947,7 @@ export default {
3
],
"update": [
- 532
+ 535
],
"__typename": [
1
@@ -12895,7 +12958,7 @@ export default {
3
],
"update": [
- 535
+ 538
],
"__typename": [
1
@@ -12903,13 +12966,13 @@ export default {
},
"UpdateCalendarChannelInputUpdates": {
"visibility": [
- 375
+ 376
],
"isContactAutoCreationEnabled": [
8
],
"contactAutoCreationPolicy": [
- 376
+ 377
],
"isSyncEnabled": [
8
@@ -12926,7 +12989,7 @@ export default {
9
],
"scope": [
- 371
+ 372
],
"__typename": [
1
@@ -12960,7 +13023,7 @@ export default {
9
],
"jobs": [
- 539
+ 542
],
"retryLimit": [
28
@@ -13071,7 +13134,7 @@ export default {
8
],
"translations": [
- 469
+ 470
],
"__typename": [
1
@@ -13163,7 +13226,7 @@ export default {
3
],
"status": [
- 198
+ 197
],
"__typename": [
1
@@ -13237,7 +13300,7 @@ export default {
1
],
"files": [
- 555
+ 558
],
"__typename": [
1
@@ -13259,13 +13322,13 @@ export default {
1
],
"IMAP": [
- 557
+ 560
],
"SMTP": [
- 557
+ 560
],
"CALDAV": [
- 557
+ 560
],
"__typename": [
1
@@ -13285,7 +13348,7 @@ export default {
1
],
"connectionSecurity": [
- 186
+ 185
],
"__typename": [
1
@@ -13304,7 +13367,7 @@ export default {
},
"ApplicationFileUploadRequestInput": {
"fileFolder": [
- 297
+ 298
],
"filePath": [
1
@@ -13318,7 +13381,7 @@ export default {
},
"Subscription": {
"onEventSubscription": [
- 163,
+ 162,
{
"eventStreamId": [
1,
@@ -13327,16 +13390,16 @@ export default {
}
],
"logicFunctionLogs": [
- 263,
+ 264,
{
"input": [
- 561,
+ 564,
"LogicFunctionLogsInput!"
]
}
],
"onAgentChatEvent": [
- 362,
+ 363,
{
"threadId": [
3,
@@ -13345,10 +13408,10 @@ export default {
}
],
"eventLogsLive": [
- 351,
+ 352,
{
"table": [
- 400,
+ 401,
"EventLogTable!"
]
}
diff --git a/packages/twenty-front/src/generated-metadata/graphql.ts b/packages/twenty-front/src/generated-metadata/graphql.ts
index 57117517804..85aacac3afb 100644
--- a/packages/twenty-front/src/generated-metadata/graphql.ts
+++ b/packages/twenty-front/src/generated-metadata/graphql.ts
@@ -318,7 +318,6 @@ export type Application = {
packageJsonChecksum?: Maybe<Scalars['String']['output']>;
packageJsonFileId?: Maybe<Scalars['UUID']['output']>;
settingsCustomTabFrontComponentId?: Maybe<Scalars['UUID']['output']>;
- state: ApplicationState;
universalIdentifier: Scalars['String']['output'];
version?: Maybe<Scalars['String']['output']>;
yarnLockChecksum?: Maybe<Scalars['String']['output']>;
@@ -483,13 +482,6 @@ export type ApplicationRegistrationVariable = {
value?: Maybe<Scalars['String']['output']>;
};
-export enum ApplicationState {
- INSTALLED = 'INSTALLED',
- INSTALLING = 'INSTALLING',
- UNINSTALLING = 'UNINSTALLING',
- UPGRADING = 'UPGRADING'
-}
-
export type ApplicationTokenPair = {
__typename?: 'ApplicationTokenPair';
applicationAccessToken: AuthToken;
@@ -3008,7 +3000,9 @@ export type Mutation = {
syncMarketplaceCatalog: Scalars['Boolean']['output'];
trackAnalytics: Analytics;
transferApplicationRegistrationOwnership: ApplicationRegistration;
+ triggerInstallApplicationJob: TriggerInstallApplicationJobResult;
triggerInstallAppsOnboardingStep: OnboardingStepSuccess;
+ triggerUninstallApplicationJob: TriggerUninstallApplicationJobResult;
unarchiveChatThread: AgentChatThread;
uninstallApplication: Scalars['Boolean']['output'];
updateApiKey?: Maybe<ApiKey>;
@@ -3975,12 +3969,22 @@ export type MutationTransferApplicationRegistrationOwnershipArgs = {
};
+export type MutationTriggerInstallApplicationJobArgs = {
+ input: TriggerInstallApplicationJobInput;
+};
+
+
export type MutationTriggerInstallAppsOnboardingStepArgs = {
isAutoSkipped?: Scalars['Boolean']['input'];
universalIdentifiers: Array<Scalars['String']['input']>;
};
+export type MutationTriggerUninstallApplicationJobArgs = {
+ input: TriggerUninstallApplicationJobInput;
+};
+
+
export type MutationUnarchiveChatThreadArgs = {
id: Scalars['UUID']['input'];
};
@@ -4861,6 +4865,7 @@ export type Query = {
findApplicationRegistrationStats: ApplicationRegistrationStats;
findApplicationRegistrationVariables: Array<ApplicationRegistrationVariable>;
findClaimableApplicationRegistration?: Maybe<ClaimableApplicationRegistration>;
+ findInstallApplicationJobStatus?: Maybe<JobStatus>;
findManyAgents: Array<Agent>;
findManyApplicationRegistrations: Array<ApplicationRegistration>;
findManyApplications: Array<Application>;
@@ -4872,6 +4877,7 @@ export type Query = {
findOneApplication: Application;
findOneApplicationRegistration: ApplicationRegistration;
findOneLogicFunction: LogicFunction;
+ findUninstallApplicationJobStatus?: Maybe<JobStatus>;
findWorkspaceAiStats: WorkspaceAiStats;
findWorkspaceFromInviteHash: Workspace;
findWorkspaceInvitations: Array<WorkspaceInvitation>;
@@ -5099,6 +5105,11 @@ export type QueryFindClaimableApplicationRegistrationArgs = {
};
+export type QueryFindInstallApplicationJobStatusArgs = {
+ universalIdentifier: Scalars['String']['input'];
+};
+
+
export type QueryFindManyMarketplaceAppsArgs = {
universalIdentifiers?: InputMaybe<Array<Scalars['String']['input']>>;
};
@@ -5130,6 +5141,11 @@ export type QueryFindOneLogicFunctionArgs = {
};
+export type QueryFindUninstallApplicationJobStatusArgs = {
+ universalIdentifier: Scalars['String']['input'];
+};
+
+
export type QueryFindWorkspaceFromInviteHashArgs = {
inviteHash: Scalars['String']['input'];
};
@@ -5900,6 +5916,24 @@ export type TransientToken = {
transientToken: AuthToken;
};
+export type TriggerInstallApplicationJobInput = {
+ universalIdentifier: Scalars['String']['input'];
+};
+
+export type TriggerInstallApplicationJobResult = {
+ __typename?: 'TriggerInstallApplicationJobResult';
+ jobId: Scalars['String']['output'];
+};
+
+export type TriggerUninstallApplicationJobInput = {
+ universalIdentifier: Scalars['String']['input'];
+};
+
+export type TriggerUninstallApplicationJobResult = {
+ __typename?: 'TriggerUninstallApplicationJobResult';
+ jobId: Scalars['String']['output'];
+};
+
export type TwoFactorAuthenticationMethodSummary = {
__typename?: 'TwoFactorAuthenticationMethodSummary';
status: Scalars['String']['output'];
@@ -7511,26 +7545,26 @@ export type TrackAnalyticsMutationVariables = Exact<{
export type TrackAnalyticsMutation = { __typename?: 'Mutation', trackAnalytics: { __typename?: 'Analytics', success: boolean } };
-export type ApplicationFieldsFragment = { __typename?: 'Application', id: string, name: string, description?: string | null, logoUrl?: string | null, version?: string | null, state: ApplicationState, universalIdentifier: string, applicationRegistrationId?: string | null, canBeUninstalled: boolean, autoUpgrade: boolean, defaultRoleId?: string | null, settingsCustomTabFrontComponentId?: string | null, availablePackages: any, applicationRegistration?: { __typename?: 'ApplicationRegistrationSummary', id: string, latestAvailableVersion?: string | null, sourceType: ApplicationRegistrationSourceType, logoUrl?: string | null } | null, applicationVariables: Array<{ __typename?: 'ApplicationVariable', id: string, key: string, value: string, description: string, label: string, isSecret: boolean, isDeprecated: boolean, type: string, options?: any | null }>, agents: Array<{ __typename?: 'Agent', id: string, name: string, label: string, description?: string | null, icon?: string | null, prompt: string, modelId: string, responseFormat?: any | null, roleId?: string | null, isCustom: boolean, modelConfiguration?: any | null, evaluationInputs: Array<string>, applicationId?: string | null, createdAt: string, updatedAt: string }>, frontComponents: Array<{ __typename?: 'FrontComponent', id: string, name: string, description?: string | null, applicationId: string, componentName: string, builtComponentChecksum: string, universalIdentifier?: string | null, isHeadless: boolean, usesSdkClient: boolean, frontComponentSharedDependenciesChecksum?: string | null, createdAt: string, updatedAt: string }>, commandMenuItems: Array<{ __typename?: 'CommandMenuItem', id: string, label: string, shortLabel?: string | null, icon?: string | null, isPinned: boolean, availabilityType: CommandMenuItemAvailabilityType, conditionalAvailabilityExpression?: string | null, frontComponentId?: string | null, universalIdentifier?: string | null, applicationId?: string | null, createdAt: string, updatedAt: string }>, objects: Array<{ __typename?: 'Object', id: string, universalIdentifier: string, nameSingular: string, namePlural: string, labelSingular: string, labelPlural: string, color?: string | null, description?: string | null, icon?: string | null, isRemote: boolean, isActive: boolean, isSystem: boolean, isUIEditable: boolean, isUICreatable: boolean, writability: MetadataWritability, createdAt: string, updatedAt: string, labelIdentifierFieldMetadataId?: string | null, imageIdentifierFieldMetadataId?: string | null, applicationId: string, shortcut?: string | null, isLabelSyncedWithName: boolean, isSearchable: boolean, openRecordIn: ObjectOpenRecordIn, duplicateCriteria?: Array<Array<string>> | null, searchFieldMetadataList: Array<{ __typename?: 'SearchField', id: string, fieldMetadataId: string, tsVectorFieldMetadataId: string, position: number, createdAt: string, updatedAt: string }>, indexMetadataList: Array<{ __typename?: 'Index', id: string, createdAt: string, updatedAt: string, name: string, indexWhereClause?: string | null, indexType: IndexType, isUnique: boolean, isCustom?: boolean | null, indexFieldMetadataList: Array<{ __typename?: 'IndexField', id: string, fieldMetadataId: string, subFieldName?: string | null, createdAt: string, updatedAt: string, order: number }> }>, fieldsList: Array<{ __typename?: 'Field', id: string, universalIdentifier: string, type: FieldMetadataType, name: string, label: string, description?: string | null, icon?: string | null, isActive?: boolean | null, isSystem?: boolean | null, isUIEditable?: boolean | null, writability?: MetadataWritability | null, isNullable?: boolean | null, isUnique?: boolean | null, createdAt: string, updatedAt: string, defaultValue?: any | null, options?: any | null, settings?: any | null, isLabelSyncedWithName?: boolean | null, morphId?: string | null, applicationId: string, relation?: { __typename?: 'Relation', type: RelationType, sourceObjectMetadata: { __typename?: 'Object', id: string, nameSingular: string, namePlural: string }, targetObjectMetadata: { __typename?: 'Object', id: string, nameSingular: string, namePlural: string }, sourceFieldMetadata: { __typename?: 'Field', id: string, name: string }, targetFieldMetadata: { __typename?: 'Field', id: string, name: string } } | null, morphRelations?: Array<{ __typename?: 'Relation', type: RelationType, sourceObjectMetadata: { __typename?: 'Object', id: string, nameSingular: string, namePlural: string }, targetObjectMetadata: { __typename?: 'Object', id: string, nameSingular: string, namePlural: string }, sourceFieldMetadata: { __typename?: 'Field', id: string, name: string }, targetFieldMetadata: { __typename?: 'Field', id: string, name: string } }> | null }> }>, logicFunctions: Array<{ __typename?: 'LogicFunction', id: string, name: string, description?: string | null, runtime: string, timeoutSeconds: number, executionMode: LogicFunctionExecutionMode, sourceHandlerPath: string, handlerName: string, cronTriggerSettings?: any | null, databaseEventTriggerSettings?: any | null, httpRouteTriggerSettings?: any | null, toolTriggerSettings?: any | null, workflowActionTriggerSettings?: any | null, applicationId?: string | null, universalIdentifier?: string | null, createdAt: string, updatedAt: string }> };
+export type ApplicationFieldsFragment = { __typename?: 'Application', id: string, name: string, description?: string | null, logoUrl?: string | null, version?: string | null, universalIdentifier: string, applicationRegistrationId?: string | null, canBeUninstalled: boolean, autoUpgrade: boolean, defaultRoleId?: string | null, settingsCustomTabFrontComponentId?: string | null, availablePackages: any, applicationRegistration?: { __typename?: 'ApplicationRegistrationSummary', id: string, latestAvailableVersion?: string | null, sourceType: ApplicationRegistrationSourceType, logoUrl?: string | null } | null, applicationVariables: Array<{ __typename?: 'ApplicationVariable', id: string, key: string, value: string, description: string, label: string, isSecret: boolean, isDeprecated: boolean, type: string, options?: any | null }>, agents: Array<{ __typename?: 'Agent', id: string, name: string, label: string, description?: string | null, icon?: string | null, prompt: string, modelId: string, responseFormat?: any | null, roleId?: string | null, isCustom: boolean, modelConfiguration?: any | null, evaluationInputs: Array<string>, applicationId?: string | null, createdAt: string, updatedAt: string }>, frontComponents: Array<{ __typename?: 'FrontComponent', id: string, name: string, description?: string | null, applicationId: string, componentName: string, builtComponentChecksum: string, universalIdentifier?: string | null, isHeadless: boolean, usesSdkClient: boolean, frontComponentSharedDependenciesChecksum?: string | null, createdAt: string, updatedAt: string }>, commandMenuItems: Array<{ __typename?: 'CommandMenuItem', id: string, label: string, shortLabel?: string | null, icon?: string | null, isPinned: boolean, availabilityType: CommandMenuItemAvailabilityType, conditionalAvailabilityExpression?: string | null, frontComponentId?: string | null, universalIdentifier?: string | null, applicationId?: string | null, createdAt: string, updatedAt: string }>, objects: Array<{ __typename?: 'Object', id: string, universalIdentifier: string, nameSingular: string, namePlural: string, labelSingular: string, labelPlural: string, color?: string | null, description?: string | null, icon?: string | null, isRemote: boolean, isActive: boolean, isSystem: boolean, isUIEditable: boolean, isUICreatable: boolean, writability: MetadataWritability, createdAt: string, updatedAt: string, labelIdentifierFieldMetadataId?: string | null, imageIdentifierFieldMetadataId?: string | null, applicationId: string, shortcut?: string | null, isLabelSyncedWithName: boolean, isSearchable: boolean, openRecordIn: ObjectOpenRecordIn, duplicateCriteria?: Array<Array<string>> | null, searchFieldMetadataList: Array<{ __typename?: 'SearchField', id: string, fieldMetadataId: string, tsVectorFieldMetadataId: string, position: number, createdAt: string, updatedAt: string }>, indexMetadataList: Array<{ __typename?: 'Index', id: string, createdAt: string, updatedAt: string, name: string, indexWhereClause?: string | null, indexType: IndexType, isUnique: boolean, isCustom?: boolean | null, indexFieldMetadataList: Array<{ __typename?: 'IndexField', id: string, fieldMetadataId: string, subFieldName?: string | null, createdAt: string, updatedAt: string, order: number }> }>, fieldsList: Array<{ __typename?: 'Field', id: string, universalIdentifier: string, type: FieldMetadataType, name: string, label: string, description?: string | null, icon?: string | null, isActive?: boolean | null, isSystem?: boolean | null, isUIEditable?: boolean | null, writability?: MetadataWritability | null, isNullable?: boolean | null, isUnique?: boolean | null, createdAt: string, updatedAt: string, defaultValue?: any | null, options?: any | null, settings?: any | null, isLabelSyncedWithName?: boolean | null, morphId?: string | null, applicationId: string, relation?: { __typename?: 'Relation', type: RelationType, sourceObjectMetadata: { __typename?: 'Object', id: string, nameSingular: string, namePlural: string }, targetObjectMetadata: { __typename?: 'Object', id: string, nameSingular: string, namePlural: string }, sourceFieldMetadata: { __typename?: 'Field', id: string, name: string }, targetFieldMetadata: { __typename?: 'Field', id: string, name: string } } | null, morphRelations?: Array<{ __typename?: 'Relation', type: RelationType, sourceObjectMetadata: { __typename?: 'Object', id: string, nameSingular: string, namePlural: string }, targetObjectMetadata: { __typename?: 'Object', id: string, nameSingular: string, namePlural: string }, sourceFieldMetadata: { __typename?: 'Field', id: string, name: string }, targetFieldMetadata: { __typename?: 'Field', id: string, name: string } }> | null }> }>, logicFunctions: Array<{ __typename?: 'LogicFunction', id: string, name: string, description?: string | null, runtime: string, timeoutSeconds: number, executionMode: LogicFunctionExecutionMode, sourceHandlerPath: string, handlerName: string, cronTriggerSettings?: any | null, databaseEventTriggerSettings?: any | null, httpRouteTriggerSettings?: any | null, toolTriggerSettings?: any | null, workflowActionTriggerSettings?: any | null, applicationId?: string | null, universalIdentifier?: string | null, createdAt: string, updatedAt: string }> };
export type FindManyApplicationsQueryVariables = Exact<{ [key: string]: never; }>;
-export type FindManyApplicationsQuery = { __typename?: 'Query', findManyApplications: Array<{ __typename?: 'Application', id: string, name: string, description?: string | null, logoUrl?: string | null, version?: string | null, state: ApplicationState, universalIdentifier: string, applicationRegistrationId?: string | null, applicationRegistration?: { __typename?: 'ApplicationRegistrationSummary', id: string, latestAvailableVersion?: string | null, sourceType: ApplicationRegistrationSourceType } | null }> };
+export type FindManyApplicationsQuery = { __typename?: 'Query', findManyApplications: Array<{ __typename?: 'Application', id: string, name: string, description?: string | null, logoUrl?: string | null, version?: string | null, universalIdentifier: string, applicationRegistrationId?: string | null, applicationRegistration?: { __typename?: 'ApplicationRegistrationSummary', id: string, latestAvailableVersion?: string | null, sourceType: ApplicationRegistrationSourceType } | null }> };
export type FindOneApplicationQueryVariables = Exact<{
id: Scalars['UUID']['input'];
}>;
-export type FindOneApplicationQuery = { __typename?: 'Query', findOneApplication: { __typename?: 'Application', id: string, name: string, description?: string | null, logoUrl?: string | null, version?: string | null, state: ApplicationState, universalIdentifier: string, applicationRegistrationId?: string | null, canBeUninstalled: boolean, autoUpgrade: boolean, defaultRoleId?: string | null, settingsCustomTabFrontComponentId?: string | null, availablePackages: any, applicationRegistration?: { __typename?: 'ApplicationRegistrationSummary', id: string, latestAvailableVersion?: string | null, sourceType: ApplicationRegistrationSourceType, logoUrl?: string | null } | null, applicationVariables: Array<{ __typename?: 'ApplicationVariable', id: string, key: string, value: string, description: string, label: string, isSecret: boolean, isDeprecated: boolean, type: string, options?: any | null }>, agents: Array<{ __typename?: 'Agent', id: string, name: string, label: string, description?: string | null, icon?: string | null, prompt: string, modelId: string, responseFormat?: any | null, roleId?: string | null, isCustom: boolean, modelConfiguration?: any | null, evaluationInputs: Array<string>, applicationId?: string | null, createdAt: string, updatedAt: string }>, frontComponents: Array<{ __typename?: 'FrontComponent', id: string, name: string, description?: string | null, applicationId: string, componentName: string, builtComponentChecksum: string, universalIdentifier?: string | null, isHeadless: boolean, usesSdkClient: boolean, frontComponentSharedDependenciesChecksum?: string | null, createdAt: string, updatedAt: string }>, commandMenuItems: Array<{ __typename?: 'CommandMenuItem', id: string, label: string, shortLabel?: string | null, icon?: string | null, isPinned: boolean, availabilityType: CommandMenuItemAvailabilityType, conditionalAvailabilityExpression?: string | null, frontComponentId?: string | null, universalIdentifier?: string | null, applicationId?: string | null, createdAt: string, updatedAt: string }>, objects: Array<{ __typename?: 'Object', id: string, universalIdentifier: string, nameSingular: string, namePlural: string, labelSingular: string, labelPlural: string, color?: string | null, description?: string | null, icon?: string | null, isRemote: boolean, isActive: boolean, isSystem: boolean, isUIEditable: boolean, isUICreatable: boolean, writability: MetadataWritability, createdAt: string, updatedAt: string, labelIdentifierFieldMetadataId?: string | null, imageIdentifierFieldMetadataId?: string | null, applicationId: string, shortcut?: string | null, isLabelSyncedWithName: boolean, isSearchable: boolean, openRecordIn: ObjectOpenRecordIn, duplicateCriteria?: Array<Array<string>> | null, searchFieldMetadataList: Array<{ __typename?: 'SearchField', id: string, fieldMetadataId: string, tsVectorFieldMetadataId: string, position: number, createdAt: string, updatedAt: string }>, indexMetadataList: Array<{ __typename?: 'Index', id: string, createdAt: string, updatedAt: string, name: string, indexWhereClause?: string | null, indexType: IndexType, isUnique: boolean, isCustom?: boolean | null, indexFieldMetadataList: Array<{ __typename?: 'IndexField', id: string, fieldMetadataId: string, subFieldName?: string | null, createdAt: string, updatedAt: string, order: number }> }>, fieldsList: Array<{ __typename?: 'Field', id: string, universalIdentifier: string, type: FieldMetadataType, name: string, label: string, description?: string | null, icon?: string | null, isActive?: boolean | null, isSystem?: boolean | null, isUIEditable?: boolean | null, writability?: MetadataWritability | null, isNullable?: boolean | null, isUnique?: boolean | null, createdAt: string, updatedAt: string, defaultValue?: any | null, options?: any | null, settings?: any | null, isLabelSyncedWithName?: boolean | null, morphId?: string | null, applicationId: string, relation?: { __typename?: 'Relation', type: RelationType, sourceObjectMetadata: { __typename?: 'Object', id: string, nameSingular: string, namePlural: string }, targetObjectMetadata: { __typename?: 'Object', id: string, nameSingular: string, namePlural: string }, sourceFieldMetadata: { __typename?: 'Field', id: string, name: string }, targetFieldMetadata: { __typename?: 'Field', id: string, name: string } } | null, morphRelations?: Array<{ __typename?: 'Relation', type: RelationType, sourceObjectMetadata: { __typename?: 'Object', id: string, nameSingular: string, namePlural: string }, targetObjectMetadata: { __typename?: 'Object', id: string, nameSingular: string, namePlural: string }, sourceFieldMetadata: { __typename?: 'Field', id: string, name: string }, targetFieldMetadata: { __typename?: 'Field', id: string, name: string } }> | null }> }>, logicFunctions: Array<{ __typename?: 'LogicFunction', id: string, name: string, description?: string | null, runtime: string, timeoutSeconds: number, executionMode: LogicFunctionExecutionMode, sourceHandlerPath: string, handlerName: string, cronTriggerSettings?: any | null, databaseEventTriggerSettings?: any | null, httpRouteTriggerSettings?: any | null, toolTriggerSettings?: any | null, workflowActionTriggerSettings?: any | null, applicationId?: string | null, universalIdentifier?: string | null, createdAt: string, updatedAt: string }> } };
+export type FindOneApplicationQuery = { __typename?: 'Query', findOneApplication: { __typename?: 'Application', id: string, name: string, description?: string | null, logoUrl?: string | null, version?: string | null, universalIdentifier: string, applicationRegistrationId?: string | null, canBeUninstalled: boolean, autoUpgrade: boolean, defaultRoleId?: string | null, settingsCustomTabFrontComponentId?: string | null, availablePackages: any, applicationRegistration?: { __typename?: 'ApplicationRegistrationSummary', id: string, latestAvailableVersion?: string | null, sourceType: ApplicationRegistrationSourceType, logoUrl?: string | null } | null, applicationVariables: Array<{ __typename?: 'ApplicationVariable', id: string, key: string, value: string, description: string, label: string, isSecret: boolean, isDeprecated: boolean, type: string, options?: any | null }>, agents: Array<{ __typename?: 'Agent', id: string, name: string, label: string, description?: string | null, icon?: string | null, prompt: string, modelId: string, responseFormat?: any | null, roleId?: string | null, isCustom: boolean, modelConfiguration?: any | null, evaluationInputs: Array<string>, applicationId?: string | null, createdAt: string, updatedAt: string }>, frontComponents: Array<{ __typename?: 'FrontComponent', id: string, name: string, description?: string | null, applicationId: string, componentName: string, builtComponentChecksum: string, universalIdentifier?: string | null, isHeadless: boolean, usesSdkClient: boolean, frontComponentSharedDependenciesChecksum?: string | null, createdAt: string, updatedAt: string }>, commandMenuItems: Array<{ __typename?: 'CommandMenuItem', id: string, label: string, shortLabel?: string | null, icon?: string | null, isPinned: boolean, availabilityType: CommandMenuItemAvailabilityType, conditionalAvailabilityExpression?: string | null, frontComponentId?: string | null, universalIdentifier?: string | null, applicationId?: string | null, createdAt: string, updatedAt: string }>, objects: Array<{ __typename?: 'Object', id: string, universalIdentifier: string, nameSingular: string, namePlural: string, labelSingular: string, labelPlural: string, color?: string | null, description?: string | null, icon?: string | null, isRemote: boolean, isActive: boolean, isSystem: boolean, isUIEditable: boolean, isUICreatable: boolean, writability: MetadataWritability, createdAt: string, updatedAt: string, labelIdentifierFieldMetadataId?: string | null, imageIdentifierFieldMetadataId?: string | null, applicationId: string, shortcut?: string | null, isLabelSyncedWithName: boolean, isSearchable: boolean, openRecordIn: ObjectOpenRecordIn, duplicateCriteria?: Array<Array<string>> | null, searchFieldMetadataList: Array<{ __typename?: 'SearchField', id: string, fieldMetadataId: string, tsVectorFieldMetadataId: string, position: number, createdAt: string, updatedAt: string }>, indexMetadataList: Array<{ __typename?: 'Index', id: string, createdAt: string, updatedAt: string, name: string, indexWhereClause?: string | null, indexType: IndexType, isUnique: boolean, isCustom?: boolean | null, indexFieldMetadataList: Array<{ __typename?: 'IndexField', id: string, fieldMetadataId: string, subFieldName?: string | null, createdAt: string, updatedAt: string, order: number }> }>, fieldsList: Array<{ __typename?: 'Field', id: string, universalIdentifier: string, type: FieldMetadataType, name: string, label: string, description?: string | null, icon?: string | null, isActive?: boolean | null, isSystem?: boolean | null, isUIEditable?: boolean | null, writability?: MetadataWritability | null, isNullable?: boolean | null, isUnique?: boolean | null, createdAt: string, updatedAt: string, defaultValue?: any | null, options?: any | null, settings?: any | null, isLabelSyncedWithName?: boolean | null, morphId?: string | null, applicationId: string, relation?: { __typename?: 'Relation', type: RelationType, sourceObjectMetadata: { __typename?: 'Object', id: string, nameSingular: string, namePlural: string }, targetObjectMetadata: { __typename?: 'Object', id: string, nameSingular: string, namePlural: string }, sourceFieldMetadata: { __typename?: 'Field', id: string, name: string }, targetFieldMetadata: { __typename?: 'Field', id: string, name: string } } | null, morphRelations?: Array<{ __typename?: 'Relation', type: RelationType, sourceObjectMetadata: { __typename?: 'Object', id: string, nameSingular: string, namePlural: string }, targetObjectMetadata: { __typename?: 'Object', id: string, nameSingular: string, namePlural: string }, sourceFieldMetadata: { __typename?: 'Field', id: string, name: string }, targetFieldMetadata: { __typename?: 'Field', id: string, name: string } }> | null }> }>, logicFunctions: Array<{ __typename?: 'LogicFunction', id: string, name: string, description?: string | null, runtime: string, timeoutSeconds: number, executionMode: LogicFunctionExecutionMode, sourceHandlerPath: string, handlerName: string, cronTriggerSettings?: any | null, databaseEventTriggerSettings?: any | null, httpRouteTriggerSettings?: any | null, toolTriggerSettings?: any | null, workflowActionTriggerSettings?: any | null, applicationId?: string | null, universalIdentifier?: string | null, createdAt: string, updatedAt: string }> } };
export type FindOneApplicationByUniversalIdentifierQueryVariables = Exact<{
universalIdentifier: Scalars['UUID']['input'];
}>;
-export type FindOneApplicationByUniversalIdentifierQuery = { __typename?: 'Query', findOneApplication: { __typename?: 'Application', id: string, universalIdentifier: string, name: string, version?: string | null, state: ApplicationState } };
+export type FindOneApplicationByUniversalIdentifierQuery = { __typename?: 'Query', findOneApplication: { __typename?: 'Application', id: string, universalIdentifier: string, name: string, logoUrl?: string | null, version?: string | null } };
export type FindOneApplicationNameQueryVariables = Exact<{
id: Scalars['UUID']['input'];
@@ -8109,6 +8143,13 @@ export type SyncMarketplaceCatalogMutationVariables = Exact<{ [key: string]: nev
export type SyncMarketplaceCatalogMutation = { __typename?: 'Mutation', syncMarketplaceCatalog: boolean };
+export type TriggerInstallApplicationJobMutationVariables = Exact<{
+ input: TriggerInstallApplicationJobInput;
+}>;
+
+
+export type TriggerInstallApplicationJobMutation = { __typename?: 'Mutation', triggerInstallApplicationJob: { __typename?: 'TriggerInstallApplicationJobResult', jobId: string } };
+
export type UpgradeApplicationMutationVariables = Exact<{
appRegistrationId: Scalars['String']['input'];
targetVersion: Scalars['String']['input'];
@@ -8117,6 +8158,13 @@ export type UpgradeApplicationMutationVariables = Exact<{
export type UpgradeApplicationMutation = { __typename?: 'Mutation', upgradeApplication: boolean };
+export type FindInstallApplicationJobStatusQueryVariables = Exact<{
+ universalIdentifier: Scalars['String']['input'];
+}>;
+
+
+export type FindInstallApplicationJobStatusQuery = { __typename?: 'Query', findInstallApplicationJobStatus?: { __typename?: 'JobStatus', jobId: string, state: JobState, failedReason?: string | null } | null };
+
export type FindManyMarketplaceAppsQueryVariables = Exact<{
universalIdentifiers?: InputMaybe<Array<Scalars['String']['input']> | Scalars['String']['input']>;
}>;
@@ -8759,6 +8807,13 @@ export type GithubClaimAuthorizationUrlQueryVariables = Exact<{
export type GithubClaimAuthorizationUrlQuery = { __typename?: 'Query', githubClaimAuthorizationUrl: string };
+export type TriggerUninstallApplicationJobMutationVariables = Exact<{
+ input: TriggerUninstallApplicationJobInput;
+}>;
+
+
+export type TriggerUninstallApplicationJobMutation = { __typename?: 'Mutation', triggerUninstallApplicationJob: { __typename?: 'TriggerUninstallApplicationJobResult', jobId: string } };
+
export type UninstallApplicationMutationVariables = Exact<{
universalIdentifier: Scalars['String']['input'];
}>;
@@ -8790,6 +8845,13 @@ export type ApplicationConnectionProvidersQueryVariables = Exact<{
export type ApplicationConnectionProvidersQuery = { __typename?: 'Query', applicationConnectionProviders: Array<{ __typename?: 'ApplicationConnectionProvider', id: string, applicationId: string, type: string, name: string, displayName: string, logoUrl?: string | null, oauth?: { __typename?: 'ApplicationConnectionProviderOAuthConfig', scopes: Array<string>, isClientCredentialsConfigured: boolean } | null }> };
+export type FindUninstallApplicationJobStatusQueryVariables = Exact<{
+ universalIdentifier: Scalars['String']['input'];
+}>;
+
+
+export type FindUninstallApplicationJobStatusQuery = { __typename?: 'Query', findUninstallApplicationJobStatus?: { __typename?: 'JobStatus', jobId: string, state: JobState, failedReason?: string | null } | null };
+
export type BillingPriceLicensedFragmentFragment = { __typename?: 'BillingPriceLicensed', stripePriceId: string, unitAmount: number, recurringInterval: SubscriptionInterval, priceUsageType: BillingUsageType, creditAmount?: number | null };
export type BillingPriceMeteredFragmentFragment = { __typename?: 'BillingPriceMetered', priceUsageType: BillingUsageType, recurringInterval: SubscriptionInterval, stripePriceId: string, tiers: Array<{ __typename?: 'BillingPriceTier', flatAmount?: number | null, unitAmount?: number | null, upTo?: number | null }> };
@@ -9637,7 +9699,7 @@ export const SkillFieldsFragmentDoc = {"kind":"Document","definitions":[{"kind":
export const AgentFieldsFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AgentFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Agent"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"label"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"icon"}},{"kind":"Field","name":{"kind":"Name","value":"prompt"}},{"kind":"Field","name":{"kind":"Name","value":"modelId"}},{"kind":"Field","name":{"kind":"Name","value":"responseFormat"}},{"kind":"Field","name":{"kind":"Name","value":"roleId"}},{"kind":"Field","name":{"kind":"Name","value":"isCustom"}},{"kind":"Field","name":{"kind":"Name","value":"modelConfiguration"}},{"kind":"Field","name":{"kind":"Name","value":"evaluationInputs"}},{"kind":"Field","name":{"kind":"Name","value":"applicationId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}}]} as unknown as DocumentNode<AgentFieldsFragment, unknown>;
export const ObjectMetadataFieldsFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ObjectMetadataFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Object"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"universalIdentifier"}},{"kind":"Field","name":{"kind":"Name","value":"nameSingular"}},{"kind":"Field","name":{"kind":"Name","value":"namePlural"}},{"kind":"Field","name":{"kind":"Name","value":"labelSingular"}},{"kind":"Field","name":{"kind":"Name","value":"labelPlural"}},{"kind":"Field","name":{"kind":"Name","value":"color"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"icon"}},{"kind":"Field","name":{"kind":"Name","value":"isRemote"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"isSystem"}},{"kind":"Field","name":{"kind":"Name","value":"isUIEditable"}},{"kind":"Field","name":{"kind":"Name","value":"isUICreatable"}},{"kind":"Field","name":{"kind":"Name","value":"writability"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"labelIdentifierFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"imageIdentifierFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"applicationId"}},{"kind":"Field","name":{"kind":"Name","value":"shortcut"}},{"kind":"Field","name":{"kind":"Name","value":"isLabelSyncedWithName"}},{"kind":"Field","name":{"kind":"Name","value":"isSearchable"}},{"kind":"Field","name":{"kind":"Name","value":"openRecordIn"}},{"kind":"Field","name":{"kind":"Name","value":"duplicateCriteria"}},{"kind":"Field","name":{"kind":"Name","value":"searchFieldMetadataList"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"fieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"tsVectorFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"position"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}},{"kind":"Field","name":{"kind":"Name","value":"indexMetadataList"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"indexWhereClause"}},{"kind":"Field","name":{"kind":"Name","value":"indexType"}},{"kind":"Field","name":{"kind":"Name","value":"isUnique"}},{"kind":"Field","name":{"kind":"Name","value":"isCustom"}},{"kind":"Field","name":{"kind":"Name","value":"indexFieldMetadataList"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"fieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"subFieldName"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"order"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"fieldsList"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"universalIdentifier"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"label"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"icon"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"isSystem"}},{"kind":"Field","name":{"kind":"Name","value":"isUIEditable"}},{"kind":"Field","name":{"kind":"Name","value":"writability"}},{"kind":"Field","name":{"kind":"Name","value":"isNullable"}},{"kind":"Field","name":{"kind":"Name","value":"isUnique"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"defaultValue"}},{"kind":"Field","name":{"kind":"Name","value":"options"}},{"kind":"Field","name":{"kind":"Name","value":"settings"}},{"kind":"Field","name":{"kind":"Name","value":"isLabelSyncedWithName"}},{"kind":"Field","name":{"kind":"Name","value":"morphId"}},{"kind":"Field","name":{"kind":"Name","value":"applicationId"}},{"kind":"Field","name":{"kind":"Name","value":"relation"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"sourceObjectMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"nameSingular"}},{"kind":"Field","name":{"kind":"Name","value":"namePlural"}}]}},{"kind":"Field","name":{"kind":"Name","value":"targetObjectMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"nameSingular"}},{"kind":"Field","name":{"kind":"Name","value":"namePlural"}}]}},{"kind":"Field","name":{"kind":"Name","value":"sourceFieldMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"targetFieldMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"morphRelations"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"sourceObjectMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"nameSingular"}},{"kind":"Field","name":{"kind":"Name","value":"namePlural"}}]}},{"kind":"Field","name":{"kind":"Name","value":"targetObjectMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"nameSingular"}},{"kind":"Field","name":{"kind":"Name","value":"namePlural"}}]}},{"kind":"Field","name":{"kind":"Name","value":"sourceFieldMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"targetFieldMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}}]}}]}}]}}]} as unknown as DocumentNode<ObjectMetadataFieldsFragment, unknown>;
export const LogicFunctionFieldsFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"LogicFunctionFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"LogicFunction"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"runtime"}},{"kind":"Field","name":{"kind":"Name","value":"timeoutSeconds"}},{"kind":"Field","name":{"kind":"Name","value":"executionMode"}},{"kind":"Field","name":{"kind":"Name","value":"sourceHandlerPath"}},{"kind":"Field","name":{"kind":"Name","value":"handlerName"}},{"kind":"Field","name":{"kind":"Name","value":"cronTriggerSettings"}},{"kind":"Field","name":{"kind":"Name","value":"databaseEventTriggerSettings"}},{"kind":"Field","name":{"kind":"Name","value":"httpRouteTriggerSettings"}},{"kind":"Field","name":{"kind":"Name","value":"toolTriggerSettings"}},{"kind":"Field","name":{"kind":"Name","value":"workflowActionTriggerSettings"}},{"kind":"Field","name":{"kind":"Name","value":"applicationId"}},{"kind":"Field","name":{"kind":"Name","value":"universalIdentifier"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}}]} as unknown as DocumentNode<LogicFunctionFieldsFragment, unknown>;
-export const ApplicationFieldsFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ApplicationFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Application"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"logoUrl"}},{"kind":"Field","name":{"kind":"Name","value":"version"}},{"kind":"Field","name":{"kind":"Name","value":"state"}},{"kind":"Field","name":{"kind":"Name","value":"universalIdentifier"}},{"kind":"Field","name":{"kind":"Name","value":"applicationRegistrationId"}},{"kind":"Field","name":{"kind":"Name","value":"applicationRegistration"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"latestAvailableVersion"}},{"kind":"Field","name":{"kind":"Name","value":"sourceType"}},{"kind":"Field","name":{"kind":"Name","value":"logoUrl"}}]}},{"kind":"Field","name":{"kind":"Name","value":"canBeUninstalled"}},{"kind":"Field","name":{"kind":"Name","value":"autoUpgrade"}},{"kind":"Field","name":{"kind":"Name","value":"defaultRoleId"}},{"kind":"Field","name":{"kind":"Name","value":"settingsCustomTabFrontComponentId"}},{"kind":"Field","name":{"kind":"Name","value":"availablePackages"}},{"kind":"Field","name":{"kind":"Name","value":"applicationVariables"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"key"}},{"kind":"Field","name":{"kind":"Name","value":"value"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"label"}},{"kind":"Field","name":{"kind":"Name","value":"isSecret"}},{"kind":"Field","name":{"kind":"Name","value":"isDeprecated"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"options"}}]}},{"kind":"Field","name":{"kind":"Name","value":"agents"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"AgentFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"frontComponents"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"applicationId"}},{"kind":"Field","name":{"kind":"Name","value":"componentName"}},{"kind":"Field","name":{"kind":"Name","value":"builtComponentChecksum"}},{"kind":"Field","name":{"kind":"Name","value":"universalIdentifier"}},{"kind":"Field","name":{"kind":"Name","value":"isHeadless"}},{"kind":"Field","name":{"kind":"Name","value":"usesSdkClient"}},{"kind":"Field","name":{"kind":"Name","value":"frontComponentSharedDependenciesChecksum"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}},{"kind":"Field","name":{"kind":"Name","value":"commandMenuItems"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"label"}},{"kind":"Field","name":{"kind":"Name","value":"shortLabel"}},{"kind":"Field","name":{"kind":"Name","value":"icon"}},{"kind":"Field","name":{"kind":"Name","value":"isPinned"}},{"kind":"Field","name":{"kind":"Name","value":"availabilityType"}},{"kind":"Field","name":{"kind":"Name","value":"conditionalAvailabilityExpression"}},{"kind":"Field","name":{"kind":"Name","value":"frontComponentId"}},{"kind":"Field","name":{"kind":"Name","value":"universalIdentifier"}},{"kind":"Field","name":{"kind":"Name","value":"applicationId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}},{"kind":"Field","name":{"kind":"Name","value":"objects"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ObjectMetadataFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"logicFunctions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"LogicFunctionFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AgentFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Agent"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"label"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"icon"}},{"kind":"Field","name":{"kind":"Name","value":"prompt"}},{"kind":"Field","name":{"kind":"Name","value":"modelId"}},{"kind":"Field","name":{"kind":"Name","value":"responseFormat"}},{"kind":"Field","name":{"kind":"Name","value":"roleId"}},{"kind":"Field","name":{"kind":"Name","value":"isCustom"}},{"kind":"Field","name":{"kind":"Name","value":"modelConfiguration"}},{"kind":"Field","name":{"kind":"Name","value":"evaluationInputs"}},{"kind":"Field","name":{"kind":"Name","value":"applicationId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ObjectMetadataFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Object"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"universalIdentifier"}},{"kind":"Field","name":{"kind":"Name","value":"nameSingular"}},{"kind":"Field","name":{"kind":"Name","value":"namePlural"}},{"kind":"Field","name":{"kind":"Name","value":"labelSingular"}},{"kind":"Field","name":{"kind":"Name","value":"labelPlural"}},{"kind":"Field","name":{"kind":"Name","value":"color"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"icon"}},{"kind":"Field","name":{"kind":"Name","value":"isRemote"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"isSystem"}},{"kind":"Field","name":{"kind":"Name","value":"isUIEditable"}},{"kind":"Field","name":{"kind":"Name","value":"isUICreatable"}},{"kind":"Field","name":{"kind":"Name","value":"writability"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"labelIdentifierFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"imageIdentifierFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"applicationId"}},{"kind":"Field","name":{"kind":"Name","value":"shortcut"}},{"kind":"Field","name":{"kind":"Name","value":"isLabelSyncedWithName"}},{"kind":"Field","name":{"kind":"Name","value":"isSearchable"}},{"kind":"Field","name":{"kind":"Name","value":"openRecordIn"}},{"kind":"Field","name":{"kind":"Name","value":"duplicateCriteria"}},{"kind":"Field","name":{"kind":"Name","value":"searchFieldMetadataList"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"fieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"tsVectorFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"position"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}},{"kind":"Field","name":{"kind":"Name","value":"indexMetadataList"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"indexWhereClause"}},{"kind":"Field","name":{"kind":"Name","value":"indexType"}},{"kind":"Field","name":{"kind":"Name","value":"isUnique"}},{"kind":"Field","name":{"kind":"Name","value":"isCustom"}},{"kind":"Field","name":{"kind":"Name","value":"indexFieldMetadataList"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"fieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"subFieldName"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"order"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"fieldsList"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"universalIdentifier"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"label"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"icon"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"isSystem"}},{"kind":"Field","name":{"kind":"Name","value":"isUIEditable"}},{"kind":"Field","name":{"kind":"Name","value":"writability"}},{"kind":"Field","name":{"kind":"Name","value":"isNullable"}},{"kind":"Field","name":{"kind":"Name","value":"isUnique"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"defaultValue"}},{"kind":"Field","name":{"kind":"Name","value":"options"}},{"kind":"Field","name":{"kind":"Name","value":"settings"}},{"kind":"Field","name":{"kind":"Name","value":"isLabelSyncedWithName"}},{"kind":"Field","name":{"kind":"Name","value":"morphId"}},{"kind":"Field","name":{"kind":"Name","value":"applicationId"}},{"kind":"Field","name":{"kind":"Name","value":"relation"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"sourceObjectMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"nameSingular"}},{"kind":"Field","name":{"kind":"Name","value":"namePlural"}}]}},{"kind":"Field","name":{"kind":"Name","value":"targetObjectMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"nameSingular"}},{"kind":"Field","name":{"kind":"Name","value":"namePlural"}}]}},{"kind":"Field","name":{"kind":"Name","value":"sourceFieldMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"targetFieldMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"morphRelations"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"sourceObjectMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"nameSingular"}},{"kind":"Field","name":{"kind":"Name","value":"namePlural"}}]}},{"kind":"Field","name":{"kind":"Name","value":"targetObjectMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"nameSingular"}},{"kind":"Field","name":{"kind":"Name","value":"namePlural"}}]}},{"kind":"Field","name":{"kind":"Name","value":"sourceFieldMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"targetFieldMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"LogicFunctionFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"LogicFunction"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"runtime"}},{"kind":"Field","name":{"kind":"Name","value":"timeoutSeconds"}},{"kind":"Field","name":{"kind":"Name","value":"executionMode"}},{"kind":"Field","name":{"kind":"Name","value":"sourceHandlerPath"}},{"kind":"Field","name":{"kind":"Name","value":"handlerName"}},{"kind":"Field","name":{"kind":"Name","value":"cronTriggerSettings"}},{"kind":"Field","name":{"kind":"Name","value":"databaseEventTriggerSettings"}},{"kind":"Field","name":{"kind":"Name","value":"httpRouteTriggerSettings"}},{"kind":"Field","name":{"kind":"Name","value":"toolTriggerSettings"}},{"kind":"Field","name":{"kind":"Name","value":"workflowActionTriggerSettings"}},{"kind":"Field","name":{"kind":"Name","value":"applicationId"}},{"kind":"Field","name":{"kind":"Name","value":"universalIdentifier"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}}]} as unknown as DocumentNode<ApplicationFieldsFragment, unknown>;
+export const ApplicationFieldsFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ApplicationFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Application"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"logoUrl"}},{"kind":"Field","name":{"kind":"Name","value":"version"}},{"kind":"Field","name":{"kind":"Name","value":"universalIdentifier"}},{"kind":"Field","name":{"kind":"Name","value":"applicationRegistrationId"}},{"kind":"Field","name":{"kind":"Name","value":"applicationRegistration"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"latestAvailableVersion"}},{"kind":"Field","name":{"kind":"Name","value":"sourceType"}},{"kind":"Field","name":{"kind":"Name","value":"logoUrl"}}]}},{"kind":"Field","name":{"kind":"Name","value":"canBeUninstalled"}},{"kind":"Field","name":{"kind":"Name","value":"autoUpgrade"}},{"kind":"Field","name":{"kind":"Name","value":"defaultRoleId"}},{"kind":"Field","name":{"kind":"Name","value":"settingsCustomTabFrontComponentId"}},{"kind":"Field","name":{"kind":"Name","value":"availablePackages"}},{"kind":"Field","name":{"kind":"Name","value":"applicationVariables"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"key"}},{"kind":"Field","name":{"kind":"Name","value":"value"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"label"}},{"kind":"Field","name":{"kind":"Name","value":"isSecret"}},{"kind":"Field","name":{"kind":"Name","value":"isDeprecated"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"options"}}]}},{"kind":"Field","name":{"kind":"Name","value":"agents"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"AgentFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"frontComponents"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"applicationId"}},{"kind":"Field","name":{"kind":"Name","value":"componentName"}},{"kind":"Field","name":{"kind":"Name","value":"builtComponentChecksum"}},{"kind":"Field","name":{"kind":"Name","value":"universalIdentifier"}},{"kind":"Field","name":{"kind":"Name","value":"isHeadless"}},{"kind":"Field","name":{"kind":"Name","value":"usesSdkClient"}},{"kind":"Field","name":{"kind":"Name","value":"frontComponentSharedDependenciesChecksum"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}},{"kind":"Field","name":{"kind":"Name","value":"commandMenuItems"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"label"}},{"kind":"Field","name":{"kind":"Name","value":"shortLabel"}},{"kind":"Field","name":{"kind":"Name","value":"icon"}},{"kind":"Field","name":{"kind":"Name","value":"isPinned"}},{"kind":"Field","name":{"kind":"Name","value":"availabilityType"}},{"kind":"Field","name":{"kind":"Name","value":"conditionalAvailabilityExpression"}},{"kind":"Field","name":{"kind":"Name","value":"frontComponentId"}},{"kind":"Field","name":{"kind":"Name","value":"universalIdentifier"}},{"kind":"Field","name":{"kind":"Name","value":"applicationId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}},{"kind":"Field","name":{"kind":"Name","value":"objects"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ObjectMetadataFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"logicFunctions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"LogicFunctionFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AgentFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Agent"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"label"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"icon"}},{"kind":"Field","name":{"kind":"Name","value":"prompt"}},{"kind":"Field","name":{"kind":"Name","value":"modelId"}},{"kind":"Field","name":{"kind":"Name","value":"responseFormat"}},{"kind":"Field","name":{"kind":"Name","value":"roleId"}},{"kind":"Field","name":{"kind":"Name","value":"isCustom"}},{"kind":"Field","name":{"kind":"Name","value":"modelConfiguration"}},{"kind":"Field","name":{"kind":"Name","value":"evaluationInputs"}},{"kind":"Field","name":{"kind":"Name","value":"applicationId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ObjectMetadataFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Object"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"universalIdentifier"}},{"kind":"Field","name":{"kind":"Name","value":"nameSingular"}},{"kind":"Field","name":{"kind":"Name","value":"namePlural"}},{"kind":"Field","name":{"kind":"Name","value":"labelSingular"}},{"kind":"Field","name":{"kind":"Name","value":"labelPlural"}},{"kind":"Field","name":{"kind":"Name","value":"color"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"icon"}},{"kind":"Field","name":{"kind":"Name","value":"isRemote"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"isSystem"}},{"kind":"Field","name":{"kind":"Name","value":"isUIEditable"}},{"kind":"Field","name":{"kind":"Name","value":"isUICreatable"}},{"kind":"Field","name":{"kind":"Name","value":"writability"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"labelIdentifierFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"imageIdentifierFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"applicationId"}},{"kind":"Field","name":{"kind":"Name","value":"shortcut"}},{"kind":"Field","name":{"kind":"Name","value":"isLabelSyncedWithName"}},{"kind":"Field","name":{"kind":"Name","value":"isSearchable"}},{"kind":"Field","name":{"kind":"Name","value":"openRecordIn"}},{"kind":"Field","name":{"kind":"Name","value":"duplicateCriteria"}},{"kind":"Field","name":{"kind":"Name","value":"searchFieldMetadataList"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"fieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"tsVectorFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"position"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}},{"kind":"Field","name":{"kind":"Name","value":"indexMetadataList"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"indexWhereClause"}},{"kind":"Field","name":{"kind":"Name","value":"indexType"}},{"kind":"Field","name":{"kind":"Name","value":"isUnique"}},{"kind":"Field","name":{"kind":"Name","value":"isCustom"}},{"kind":"Field","name":{"kind":"Name","value":"indexFieldMetadataList"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"fieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"subFieldName"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"order"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"fieldsList"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"universalIdentifier"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"label"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"icon"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"isSystem"}},{"kind":"Field","name":{"kind":"Name","value":"isUIEditable"}},{"kind":"Field","name":{"kind":"Name","value":"writability"}},{"kind":"Field","name":{"kind":"Name","value":"isNullable"}},{"kind":"Field","name":{"kind":"Name","value":"isUnique"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"defaultValue"}},{"kind":"Field","name":{"kind":"Name","value":"options"}},{"kind":"Field","name":{"kind":"Name","value":"settings"}},{"kind":"Field","name":{"kind":"Name","value":"isLabelSyncedWithName"}},{"kind":"Field","name":{"kind":"Name","value":"morphId"}},{"kind":"Field","name":{"kind":"Name","value":"applicationId"}},{"kind":"Field","name":{"kind":"Name","value":"relation"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"sourceObjectMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"nameSingular"}},{"kind":"Field","name":{"kind":"Name","value":"namePlural"}}]}},{"kind":"Field","name":{"kind":"Name","value":"targetObjectMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"nameSingular"}},{"kind":"Field","name":{"kind":"Name","value":"namePlural"}}]}},{"kind":"Field","name":{"kind":"Name","value":"sourceFieldMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"targetFieldMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"morphRelations"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"sourceObjectMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"nameSingular"}},{"kind":"Field","name":{"kind":"Name","value":"namePlural"}}]}},{"kind":"Field","name":{"kind":"Name","value":"targetObjectMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"nameSingular"}},{"kind":"Field","name":{"kind":"Name","value":"namePlural"}}]}},{"kind":"Field","name":{"kind":"Name","value":"sourceFieldMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"targetFieldMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"LogicFunctionFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"LogicFunction"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"runtime"}},{"kind":"Field","name":{"kind":"Name","value":"timeoutSeconds"}},{"kind":"Field","name":{"kind":"Name","value":"executionMode"}},{"kind":"Field","name":{"kind":"Name","value":"sourceHandlerPath"}},{"kind":"Field","name":{"kind":"Name","value":"handlerName"}},{"kind":"Field","name":{"kind":"Name","value":"cronTriggerSettings"}},{"kind":"Field","name":{"kind":"Name","value":"databaseEventTriggerSettings"}},{"kind":"Field","name":{"kind":"Name","value":"httpRouteTriggerSettings"}},{"kind":"Field","name":{"kind":"Name","value":"toolTriggerSettings"}},{"kind":"Field","name":{"kind":"Name","value":"workflowActionTriggerSettings"}},{"kind":"Field","name":{"kind":"Name","value":"applicationId"}},{"kind":"Field","name":{"kind":"Name","value":"universalIdentifier"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}}]} as unknown as DocumentNode<ApplicationFieldsFragment, unknown>;
export const AuthTokenFragmentFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AuthTokenFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AuthToken"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"token"}},{"kind":"Field","name":{"kind":"Name","value":"expiresAt"}}]}}]} as unknown as DocumentNode<AuthTokenFragmentFragment, unknown>;
export const AuthTokenPairFragmentFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AuthTokenPairFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AuthTokenPair"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"accessOrWorkspaceAgnosticToken"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"AuthTokenFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"refreshToken"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"AuthTokenFragment"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AuthTokenFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AuthToken"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"token"}},{"kind":"Field","name":{"kind":"Name","value":"expiresAt"}}]}}]} as unknown as DocumentNode<AuthTokenPairFragmentFragment, unknown>;
export const AvailableSsoIdentityProvidersFragmentFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AvailableSSOIdentityProvidersFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"FindAvailableSSOIDP"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"issuer"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"workspace"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}}]}}]}}]} as unknown as DocumentNode<AvailableSsoIdentityProvidersFragmentFragment, unknown>;
@@ -9724,9 +9786,9 @@ export const GetToolIndexDocument = {"kind":"Document","definitions":[{"kind":"O
export const GetToolInputSchemaDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetToolInputSchema"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"toolName"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"getToolInputSchema"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"toolName"},"value":{"kind":"Variable","name":{"kind":"Name","value":"toolName"}}}]}]}}]} as unknown as DocumentNode<GetToolInputSchemaQuery, GetToolInputSchemaQueryVariables>;
export const OnAgentChatEventDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"subscription","name":{"kind":"Name","value":"OnAgentChatEvent"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"threadId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UUID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"onAgentChatEvent"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"threadId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"threadId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"threadId"}},{"kind":"Field","name":{"kind":"Name","value":"event"}}]}}]}}]} as unknown as DocumentNode<OnAgentChatEventSubscription, OnAgentChatEventSubscriptionVariables>;
export const TrackAnalyticsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"TrackAnalytics"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"type"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"AnalyticsType"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"event"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"name"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"properties"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"JSON"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"trackAnalytics"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"type"},"value":{"kind":"Variable","name":{"kind":"Name","value":"type"}}},{"kind":"Argument","name":{"kind":"Name","value":"event"},"value":{"kind":"Variable","name":{"kind":"Name","value":"event"}}},{"kind":"Argument","name":{"kind":"Name","value":"name"},"value":{"kind":"Variable","name":{"kind":"Name","value":"name"}}},{"kind":"Argument","name":{"kind":"Name","value":"properties"},"value":{"kind":"Variable","name":{"kind":"Name","value":"properties"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"success"}}]}}]}}]} as unknown as DocumentNode<TrackAnalyticsMutation, TrackAnalyticsMutationVariables>;
-export const FindManyApplicationsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"FindManyApplications"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"findManyApplications"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"logoUrl"}},{"kind":"Field","name":{"kind":"Name","value":"version"}},{"kind":"Field","name":{"kind":"Name","value":"state"}},{"kind":"Field","name":{"kind":"Name","value":"universalIdentifier"}},{"kind":"Field","name":{"kind":"Name","value":"applicationRegistrationId"}},{"kind":"Field","name":{"kind":"Name","value":"applicationRegistration"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"latestAvailableVersion"}},{"kind":"Field","name":{"kind":"Name","value":"sourceType"}}]}}]}}]}}]} as unknown as DocumentNode<FindManyApplicationsQuery, FindManyApplicationsQueryVariables>;
-export const FindOneApplicationDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"FindOneApplication"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UUID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"findOneApplication"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ApplicationFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AgentFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Agent"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"label"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"icon"}},{"kind":"Field","name":{"kind":"Name","value":"prompt"}},{"kind":"Field","name":{"kind":"Name","value":"modelId"}},{"kind":"Field","name":{"kind":"Name","value":"responseFormat"}},{"kind":"Field","name":{"kind":"Name","value":"roleId"}},{"kind":"Field","name":{"kind":"Name","value":"isCustom"}},{"kind":"Field","name":{"kind":"Name","value":"modelConfiguration"}},{"kind":"Field","name":{"kind":"Name","value":"evaluationInputs"}},{"kind":"Field","name":{"kind":"Name","value":"applicationId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ObjectMetadataFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Object"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"universalIdentifier"}},{"kind":"Field","name":{"kind":"Name","value":"nameSingular"}},{"kind":"Field","name":{"kind":"Name","value":"namePlural"}},{"kind":"Field","name":{"kind":"Name","value":"labelSingular"}},{"kind":"Field","name":{"kind":"Name","value":"labelPlural"}},{"kind":"Field","name":{"kind":"Name","value":"color"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"icon"}},{"kind":"Field","name":{"kind":"Name","value":"isRemote"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"isSystem"}},{"kind":"Field","name":{"kind":"Name","value":"isUIEditable"}},{"kind":"Field","name":{"kind":"Name","value":"isUICreatable"}},{"kind":"Field","name":{"kind":"Name","value":"writability"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"labelIdentifierFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"imageIdentifierFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"applicationId"}},{"kind":"Field","name":{"kind":"Name","value":"shortcut"}},{"kind":"Field","name":{"kind":"Name","value":"isLabelSyncedWithName"}},{"kind":"Field","name":{"kind":"Name","value":"isSearchable"}},{"kind":"Field","name":{"kind":"Name","value":"openRecordIn"}},{"kind":"Field","name":{"kind":"Name","value":"duplicateCriteria"}},{"kind":"Field","name":{"kind":"Name","value":"searchFieldMetadataList"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"fieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"tsVectorFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"position"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}},{"kind":"Field","name":{"kind":"Name","value":"indexMetadataList"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"indexWhereClause"}},{"kind":"Field","name":{"kind":"Name","value":"indexType"}},{"kind":"Field","name":{"kind":"Name","value":"isUnique"}},{"kind":"Field","name":{"kind":"Name","value":"isCustom"}},{"kind":"Field","name":{"kind":"Name","value":"indexFieldMetadataList"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"fieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"subFieldName"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"order"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"fieldsList"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"universalIdentifier"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"label"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"icon"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"isSystem"}},{"kind":"Field","name":{"kind":"Name","value":"isUIEditable"}},{"kind":"Field","name":{"kind":"Name","value":"writability"}},{"kind":"Field","name":{"kind":"Name","value":"isNullable"}},{"kind":"Field","name":{"kind":"Name","value":"isUnique"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"defaultValue"}},{"kind":"Field","name":{"kind":"Name","value":"options"}},{"kind":"Field","name":{"kind":"Name","value":"settings"}},{"kind":"Field","name":{"kind":"Name","value":"isLabelSyncedWithName"}},{"kind":"Field","name":{"kind":"Name","value":"morphId"}},{"kind":"Field","name":{"kind":"Name","value":"applicationId"}},{"kind":"Field","name":{"kind":"Name","value":"relation"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"sourceObjectMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"nameSingular"}},{"kind":"Field","name":{"kind":"Name","value":"namePlural"}}]}},{"kind":"Field","name":{"kind":"Name","value":"targetObjectMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"nameSingular"}},{"kind":"Field","name":{"kind":"Name","value":"namePlural"}}]}},{"kind":"Field","name":{"kind":"Name","value":"sourceFieldMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"targetFieldMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"morphRelations"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"sourceObjectMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"nameSingular"}},{"kind":"Field","name":{"kind":"Name","value":"namePlural"}}]}},{"kind":"Field","name":{"kind":"Name","value":"targetObjectMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"nameSingular"}},{"kind":"Field","name":{"kind":"Name","value":"namePlural"}}]}},{"kind":"Field","name":{"kind":"Name","value":"sourceFieldMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"targetFieldMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"LogicFunctionFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"LogicFunction"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"runtime"}},{"kind":"Field","name":{"kind":"Name","value":"timeoutSeconds"}},{"kind":"Field","name":{"kind":"Name","value":"executionMode"}},{"kind":"Field","name":{"kind":"Name","value":"sourceHandlerPath"}},{"kind":"Field","name":{"kind":"Name","value":"handlerName"}},{"kind":"Field","name":{"kind":"Name","value":"cronTriggerSettings"}},{"kind":"Field","name":{"kind":"Name","value":"databaseEventTriggerSettings"}},{"kind":"Field","name":{"kind":"Name","value":"httpRouteTriggerSettings"}},{"kind":"Field","name":{"kind":"Name","value":"toolTriggerSettings"}},{"kind":"Field","name":{"kind":"Name","value":"workflowActionTriggerSettings"}},{"kind":"Field","name":{"kind":"Name","value":"applicationId"}},{"kind":"Field","name":{"kind":"Name","value":"universalIdentifier"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ApplicationFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Application"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"logoUrl"}},{"kind":"Field","name":{"kind":"Name","value":"version"}},{"kind":"Field","name":{"kind":"Name","value":"state"}},{"kind":"Field","name":{"kind":"Name","value":"universalIdentifier"}},{"kind":"Field","name":{"kind":"Name","value":"applicationRegistrationId"}},{"kind":"Field","name":{"kind":"Name","value":"applicationRegistration"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"latestAvailableVersion"}},{"kind":"Field","name":{"kind":"Name","value":"sourceType"}},{"kind":"Field","name":{"kind":"Name","value":"logoUrl"}}]}},{"kind":"Field","name":{"kind":"Name","value":"canBeUninstalled"}},{"kind":"Field","name":{"kind":"Name","value":"autoUpgrade"}},{"kind":"Field","name":{"kind":"Name","value":"defaultRoleId"}},{"kind":"Field","name":{"kind":"Name","value":"settingsCustomTabFrontComponentId"}},{"kind":"Field","name":{"kind":"Name","value":"availablePackages"}},{"kind":"Field","name":{"kind":"Name","value":"applicationVariables"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"key"}},{"kind":"Field","name":{"kind":"Name","value":"value"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"label"}},{"kind":"Field","name":{"kind":"Name","value":"isSecret"}},{"kind":"Field","name":{"kind":"Name","value":"isDeprecated"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"options"}}]}},{"kind":"Field","name":{"kind":"Name","value":"agents"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"AgentFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"frontComponents"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"applicationId"}},{"kind":"Field","name":{"kind":"Name","value":"componentName"}},{"kind":"Field","name":{"kind":"Name","value":"builtComponentChecksum"}},{"kind":"Field","name":{"kind":"Name","value":"universalIdentifier"}},{"kind":"Field","name":{"kind":"Name","value":"isHeadless"}},{"kind":"Field","name":{"kind":"Name","value":"usesSdkClient"}},{"kind":"Field","name":{"kind":"Name","value":"frontComponentSharedDependenciesChecksum"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}},{"kind":"Field","name":{"kind":"Name","value":"commandMenuItems"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"label"}},{"kind":"Field","name":{"kind":"Name","value":"shortLabel"}},{"kind":"Field","name":{"kind":"Name","value":"icon"}},{"kind":"Field","name":{"kind":"Name","value":"isPinned"}},{"kind":"Field","name":{"kind":"Name","value":"availabilityType"}},{"kind":"Field","name":{"kind":"Name","value":"conditionalAvailabilityExpression"}},{"kind":"Field","name":{"kind":"Name","value":"frontComponentId"}},{"kind":"Field","name":{"kind":"Name","value":"universalIdentifier"}},{"kind":"Field","name":{"kind":"Name","value":"applicationId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}},{"kind":"Field","name":{"kind":"Name","value":"objects"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ObjectMetadataFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"logicFunctions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"LogicFunctionFields"}}]}}]}}]} as unknown as DocumentNode<FindOneApplicationQuery, FindOneApplicationQueryVariables>;
-export const FindOneApplicationByUniversalIdentifierDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"FindOneApplicationByUniversalIdentifier"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"universalIdentifier"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UUID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"findOneApplication"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"universalIdentifier"},"value":{"kind":"Variable","name":{"kind":"Name","value":"universalIdentifier"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"universalIdentifier"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"version"}},{"kind":"Field","name":{"kind":"Name","value":"state"}}]}}]}}]} as unknown as DocumentNode<FindOneApplicationByUniversalIdentifierQuery, FindOneApplicationByUniversalIdentifierQueryVariables>;
+export const FindManyApplicationsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"FindManyApplications"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"findManyApplications"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"logoUrl"}},{"kind":"Field","name":{"kind":"Name","value":"version"}},{"kind":"Field","name":{"kind":"Name","value":"universalIdentifier"}},{"kind":"Field","name":{"kind":"Name","value":"applicationRegistrationId"}},{"kind":"Field","name":{"kind":"Name","value":"applicationRegistration"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"latestAvailableVersion"}},{"kind":"Field","name":{"kind":"Name","value":"sourceType"}}]}}]}}]}}]} as unknown as DocumentNode<FindManyApplicationsQuery, FindManyApplicationsQueryVariables>;
+export const FindOneApplicationDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"FindOneApplication"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UUID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"findOneApplication"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ApplicationFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AgentFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Agent"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"label"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"icon"}},{"kind":"Field","name":{"kind":"Name","value":"prompt"}},{"kind":"Field","name":{"kind":"Name","value":"modelId"}},{"kind":"Field","name":{"kind":"Name","value":"responseFormat"}},{"kind":"Field","name":{"kind":"Name","value":"roleId"}},{"kind":"Field","name":{"kind":"Name","value":"isCustom"}},{"kind":"Field","name":{"kind":"Name","value":"modelConfiguration"}},{"kind":"Field","name":{"kind":"Name","value":"evaluationInputs"}},{"kind":"Field","name":{"kind":"Name","value":"applicationId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ObjectMetadataFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Object"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"universalIdentifier"}},{"kind":"Field","name":{"kind":"Name","value":"nameSingular"}},{"kind":"Field","name":{"kind":"Name","value":"namePlural"}},{"kind":"Field","name":{"kind":"Name","value":"labelSingular"}},{"kind":"Field","name":{"kind":"Name","value":"labelPlural"}},{"kind":"Field","name":{"kind":"Name","value":"color"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"icon"}},{"kind":"Field","name":{"kind":"Name","value":"isRemote"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"isSystem"}},{"kind":"Field","name":{"kind":"Name","value":"isUIEditable"}},{"kind":"Field","name":{"kind":"Name","value":"isUICreatable"}},{"kind":"Field","name":{"kind":"Name","value":"writability"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"labelIdentifierFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"imageIdentifierFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"applicationId"}},{"kind":"Field","name":{"kind":"Name","value":"shortcut"}},{"kind":"Field","name":{"kind":"Name","value":"isLabelSyncedWithName"}},{"kind":"Field","name":{"kind":"Name","value":"isSearchable"}},{"kind":"Field","name":{"kind":"Name","value":"openRecordIn"}},{"kind":"Field","name":{"kind":"Name","value":"duplicateCriteria"}},{"kind":"Field","name":{"kind":"Name","value":"searchFieldMetadataList"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"fieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"tsVectorFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"position"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}},{"kind":"Field","name":{"kind":"Name","value":"indexMetadataList"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"indexWhereClause"}},{"kind":"Field","name":{"kind":"Name","value":"indexType"}},{"kind":"Field","name":{"kind":"Name","value":"isUnique"}},{"kind":"Field","name":{"kind":"Name","value":"isCustom"}},{"kind":"Field","name":{"kind":"Name","value":"indexFieldMetadataList"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"fieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"subFieldName"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"order"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"fieldsList"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"universalIdentifier"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"label"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"icon"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"isSystem"}},{"kind":"Field","name":{"kind":"Name","value":"isUIEditable"}},{"kind":"Field","name":{"kind":"Name","value":"writability"}},{"kind":"Field","name":{"kind":"Name","value":"isNullable"}},{"kind":"Field","name":{"kind":"Name","value":"isUnique"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"defaultValue"}},{"kind":"Field","name":{"kind":"Name","value":"options"}},{"kind":"Field","name":{"kind":"Name","value":"settings"}},{"kind":"Field","name":{"kind":"Name","value":"isLabelSyncedWithName"}},{"kind":"Field","name":{"kind":"Name","value":"morphId"}},{"kind":"Field","name":{"kind":"Name","value":"applicationId"}},{"kind":"Field","name":{"kind":"Name","value":"relation"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"sourceObjectMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"nameSingular"}},{"kind":"Field","name":{"kind":"Name","value":"namePlural"}}]}},{"kind":"Field","name":{"kind":"Name","value":"targetObjectMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"nameSingular"}},{"kind":"Field","name":{"kind":"Name","value":"namePlural"}}]}},{"kind":"Field","name":{"kind":"Name","value":"sourceFieldMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"targetFieldMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"morphRelations"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"sourceObjectMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"nameSingular"}},{"kind":"Field","name":{"kind":"Name","value":"namePlural"}}]}},{"kind":"Field","name":{"kind":"Name","value":"targetObjectMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"nameSingular"}},{"kind":"Field","name":{"kind":"Name","value":"namePlural"}}]}},{"kind":"Field","name":{"kind":"Name","value":"sourceFieldMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"targetFieldMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"LogicFunctionFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"LogicFunction"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"runtime"}},{"kind":"Field","name":{"kind":"Name","value":"timeoutSeconds"}},{"kind":"Field","name":{"kind":"Name","value":"executionMode"}},{"kind":"Field","name":{"kind":"Name","value":"sourceHandlerPath"}},{"kind":"Field","name":{"kind":"Name","value":"handlerName"}},{"kind":"Field","name":{"kind":"Name","value":"cronTriggerSettings"}},{"kind":"Field","name":{"kind":"Name","value":"databaseEventTriggerSettings"}},{"kind":"Field","name":{"kind":"Name","value":"httpRouteTriggerSettings"}},{"kind":"Field","name":{"kind":"Name","value":"toolTriggerSettings"}},{"kind":"Field","name":{"kind":"Name","value":"workflowActionTriggerSettings"}},{"kind":"Field","name":{"kind":"Name","value":"applicationId"}},{"kind":"Field","name":{"kind":"Name","value":"universalIdentifier"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ApplicationFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Application"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"logoUrl"}},{"kind":"Field","name":{"kind":"Name","value":"version"}},{"kind":"Field","name":{"kind":"Name","value":"universalIdentifier"}},{"kind":"Field","name":{"kind":"Name","value":"applicationRegistrationId"}},{"kind":"Field","name":{"kind":"Name","value":"applicationRegistration"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"latestAvailableVersion"}},{"kind":"Field","name":{"kind":"Name","value":"sourceType"}},{"kind":"Field","name":{"kind":"Name","value":"logoUrl"}}]}},{"kind":"Field","name":{"kind":"Name","value":"canBeUninstalled"}},{"kind":"Field","name":{"kind":"Name","value":"autoUpgrade"}},{"kind":"Field","name":{"kind":"Name","value":"defaultRoleId"}},{"kind":"Field","name":{"kind":"Name","value":"settingsCustomTabFrontComponentId"}},{"kind":"Field","name":{"kind":"Name","value":"availablePackages"}},{"kind":"Field","name":{"kind":"Name","value":"applicationVariables"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"key"}},{"kind":"Field","name":{"kind":"Name","value":"value"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"label"}},{"kind":"Field","name":{"kind":"Name","value":"isSecret"}},{"kind":"Field","name":{"kind":"Name","value":"isDeprecated"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"options"}}]}},{"kind":"Field","name":{"kind":"Name","value":"agents"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"AgentFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"frontComponents"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"applicationId"}},{"kind":"Field","name":{"kind":"Name","value":"componentName"}},{"kind":"Field","name":{"kind":"Name","value":"builtComponentChecksum"}},{"kind":"Field","name":{"kind":"Name","value":"universalIdentifier"}},{"kind":"Field","name":{"kind":"Name","value":"isHeadless"}},{"kind":"Field","name":{"kind":"Name","value":"usesSdkClient"}},{"kind":"Field","name":{"kind":"Name","value":"frontComponentSharedDependenciesChecksum"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}},{"kind":"Field","name":{"kind":"Name","value":"commandMenuItems"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"label"}},{"kind":"Field","name":{"kind":"Name","value":"shortLabel"}},{"kind":"Field","name":{"kind":"Name","value":"icon"}},{"kind":"Field","name":{"kind":"Name","value":"isPinned"}},{"kind":"Field","name":{"kind":"Name","value":"availabilityType"}},{"kind":"Field","name":{"kind":"Name","value":"conditionalAvailabilityExpression"}},{"kind":"Field","name":{"kind":"Name","value":"frontComponentId"}},{"kind":"Field","name":{"kind":"Name","value":"universalIdentifier"}},{"kind":"Field","name":{"kind":"Name","value":"applicationId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}},{"kind":"Field","name":{"kind":"Name","value":"objects"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ObjectMetadataFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"logicFunctions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"LogicFunctionFields"}}]}}]}}]} as unknown as DocumentNode<FindOneApplicationQuery, FindOneApplicationQueryVariables>;
+export const FindOneApplicationByUniversalIdentifierDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"FindOneApplicationByUniversalIdentifier"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"universalIdentifier"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UUID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"findOneApplication"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"universalIdentifier"},"value":{"kind":"Variable","name":{"kind":"Name","value":"universalIdentifier"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"universalIdentifier"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"logoUrl"}},{"kind":"Field","name":{"kind":"Name","value":"version"}}]}}]}}]} as unknown as DocumentNode<FindOneApplicationByUniversalIdentifierQuery, FindOneApplicationByUniversalIdentifierQueryVariables>;
export const FindOneApplicationNameDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"FindOneApplicationName"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UUID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"findOneApplication"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}}]}}]} as unknown as DocumentNode<FindOneApplicationNameQuery, FindOneApplicationNameQueryVariables>;
export const FindOneApplicationSummaryDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"FindOneApplicationSummary"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"universalIdentifier"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UUID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"findOneApplication"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"universalIdentifier"},"value":{"kind":"Variable","name":{"kind":"Name","value":"universalIdentifier"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}}]}}]} as unknown as DocumentNode<FindOneApplicationSummaryQuery, FindOneApplicationSummaryQueryVariables>;
export const IsApplicationStoppedDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"IsApplicationStopped"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"applicationUniversalIdentifier"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"isApplicationStopped"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"applicationUniversalIdentifier"},"value":{"kind":"Variable","name":{"kind":"Name","value":"applicationUniversalIdentifier"}}}]}]}}]} as unknown as DocumentNode<IsApplicationStoppedQuery, IsApplicationStoppedQueryVariables>;
@@ -9787,7 +9849,9 @@ export const FindOneLogicFunctionDocument = {"kind":"Document","definitions":[{"
export const GetLogicFunctionSourceCodeDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetLogicFunctionSourceCode"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"LogicFunctionIdInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"getLogicFunctionSourceCode"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}]}]}}]} as unknown as DocumentNode<GetLogicFunctionSourceCodeQuery, GetLogicFunctionSourceCodeQueryVariables>;
export const InstallApplicationDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"InstallApplication"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"universalIdentifier"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"installApplication"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"universalIdentifier"},"value":{"kind":"Variable","name":{"kind":"Name","value":"universalIdentifier"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"universalIdentifier"}},{"kind":"Field","name":{"kind":"Name","value":"logoUrl"}}]}}]}}]} as unknown as DocumentNode<InstallApplicationMutation, InstallApplicationMutationVariables>;
export const SyncMarketplaceCatalogDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"SyncMarketplaceCatalog"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"syncMarketplaceCatalog"}}]}}]} as unknown as DocumentNode<SyncMarketplaceCatalogMutation, SyncMarketplaceCatalogMutationVariables>;
+export const TriggerInstallApplicationJobDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"TriggerInstallApplicationJob"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"TriggerInstallApplicationJobInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"triggerInstallApplicationJob"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"jobId"}}]}}]}}]} as unknown as DocumentNode<TriggerInstallApplicationJobMutation, TriggerInstallApplicationJobMutationVariables>;
export const UpgradeApplicationDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"UpgradeApplication"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"appRegistrationId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"targetVersion"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"upgradeApplication"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"appRegistrationId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"appRegistrationId"}}},{"kind":"Argument","name":{"kind":"Name","value":"targetVersion"},"value":{"kind":"Variable","name":{"kind":"Name","value":"targetVersion"}}}]}]}}]} as unknown as DocumentNode<UpgradeApplicationMutation, UpgradeApplicationMutationVariables>;
+export const FindInstallApplicationJobStatusDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"FindInstallApplicationJobStatus"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"universalIdentifier"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"findInstallApplicationJobStatus"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"universalIdentifier"},"value":{"kind":"Variable","name":{"kind":"Name","value":"universalIdentifier"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"jobId"}},{"kind":"Field","name":{"kind":"Name","value":"state"}},{"kind":"Field","name":{"kind":"Name","value":"failedReason"}}]}}]}}]} as unknown as DocumentNode<FindInstallApplicationJobStatusQuery, FindInstallApplicationJobStatusQueryVariables>;
export const FindManyMarketplaceAppsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"FindManyMarketplaceApps"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"universalIdentifiers"}},"type":{"kind":"ListType","type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"findManyMarketplaceApps"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"universalIdentifiers"},"value":{"kind":"Variable","name":{"kind":"Name","value":"universalIdentifiers"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"MarketplaceAppFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"MarketplaceAppFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"MarketplaceApp"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"author"}},{"kind":"Field","name":{"kind":"Name","value":"category"}},{"kind":"Field","name":{"kind":"Name","value":"logoUrl"}},{"kind":"Field","name":{"kind":"Name","value":"sourcePackage"}},{"kind":"Field","name":{"kind":"Name","value":"isVetted"}}]}}]} as unknown as DocumentNode<FindManyMarketplaceAppsQuery, FindManyMarketplaceAppsQueryVariables>;
export const FindMarketplaceAppDetailDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"FindMarketplaceAppDetail"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"universalIdentifier"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"findMarketplaceAppDetail"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"universalIdentifier"},"value":{"kind":"Variable","name":{"kind":"Name","value":"universalIdentifier"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"MarketplaceAppDetailFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"MarketplaceAppDetailFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"MarketplaceAppDetail"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"universalIdentifier"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"sourceType"}},{"kind":"Field","name":{"kind":"Name","value":"sourcePackage"}},{"kind":"Field","name":{"kind":"Name","value":"latestAvailableVersion"}},{"kind":"Field","name":{"kind":"Name","value":"isListed"}},{"kind":"Field","name":{"kind":"Name","value":"isVetted"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"author"}},{"kind":"Field","name":{"kind":"Name","value":"category"}},{"kind":"Field","name":{"kind":"Name","value":"logoUrl"}},{"kind":"Field","name":{"kind":"Name","value":"websiteUrl"}},{"kind":"Field","name":{"kind":"Name","value":"aboutDescription"}},{"kind":"Field","name":{"kind":"Name","value":"pricingDescription"}},{"kind":"Field","name":{"kind":"Name","value":"termsUrl"}},{"kind":"Field","name":{"kind":"Name","value":"emailSupport"}},{"kind":"Field","name":{"kind":"Name","value":"issueReportUrl"}},{"kind":"Field","name":{"kind":"Name","value":"galleryImages"}},{"kind":"Field","name":{"kind":"Name","value":"defaultRoleUniversalIdentifier"}},{"kind":"Field","name":{"kind":"Name","value":"roles"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"universalIdentifier"}},{"kind":"Field","name":{"kind":"Name","value":"label"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"icon"}},{"kind":"Field","name":{"kind":"Name","value":"canUpdateAllSettings"}},{"kind":"Field","name":{"kind":"Name","value":"canAccessAllTools"}},{"kind":"Field","name":{"kind":"Name","value":"canReadAllObjectRecords"}},{"kind":"Field","name":{"kind":"Name","value":"canUpdateAllObjectRecords"}},{"kind":"Field","name":{"kind":"Name","value":"canSoftDeleteAllObjectRecords"}},{"kind":"Field","name":{"kind":"Name","value":"canDestroyAllObjectRecords"}},{"kind":"Field","name":{"kind":"Name","value":"permissionFlagUniversalIdentifiers"}},{"kind":"Field","name":{"kind":"Name","value":"objectPermissions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"universalIdentifier"}},{"kind":"Field","name":{"kind":"Name","value":"objectUniversalIdentifier"}},{"kind":"Field","name":{"kind":"Name","value":"canReadObjectRecords"}},{"kind":"Field","name":{"kind":"Name","value":"canUpdateObjectRecords"}},{"kind":"Field","name":{"kind":"Name","value":"canSoftDeleteObjectRecords"}},{"kind":"Field","name":{"kind":"Name","value":"canDestroyObjectRecords"}}]}},{"kind":"Field","name":{"kind":"Name","value":"fieldPermissions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"universalIdentifier"}},{"kind":"Field","name":{"kind":"Name","value":"objectUniversalIdentifier"}},{"kind":"Field","name":{"kind":"Name","value":"fieldUniversalIdentifier"}},{"kind":"Field","name":{"kind":"Name","value":"canReadFieldValue"}},{"kind":"Field","name":{"kind":"Name","value":"canUpdateFieldValue"}}]}}]}}]}}]} as unknown as DocumentNode<FindMarketplaceAppDetailQuery, FindMarketplaceAppDetailQueryVariables>;
export const FindMarketplaceAppManifestDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"FindMarketplaceAppManifest"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"universalIdentifier"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"findMarketplaceAppDetail"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"universalIdentifier"},"value":{"kind":"Variable","name":{"kind":"Name","value":"universalIdentifier"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"manifest"}}]}}]}}]} as unknown as DocumentNode<FindMarketplaceAppManifestQuery, FindMarketplaceAppManifestQueryVariables>;
@@ -9852,10 +9916,12 @@ export const FindClaimableApplicationRegistrationDocument = {"kind":"Document","
export const FindManyApplicationRegistrationsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"FindManyApplicationRegistrations"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"findManyApplicationRegistrations"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ApplicationRegistrationListItem"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ApplicationRegistrationListItem"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ApplicationRegistration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"universalIdentifier"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"sourceType"}},{"kind":"Field","name":{"kind":"Name","value":"logoUrl"}}]}}]} as unknown as DocumentNode<FindManyApplicationRegistrationsQuery, FindManyApplicationRegistrationsQueryVariables>;
export const FindOneApplicationRegistrationDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"FindOneApplicationRegistration"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"findOneApplicationRegistration"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ApplicationRegistrationFragment"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ApplicationRegistrationFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ApplicationRegistration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"universalIdentifier"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"logoUrl"}},{"kind":"Field","name":{"kind":"Name","value":"galleryImagesUrls"}},{"kind":"Field","name":{"kind":"Name","value":"oAuthClientId"}},{"kind":"Field","name":{"kind":"Name","value":"oAuthRedirectUris"}},{"kind":"Field","name":{"kind":"Name","value":"oAuthScopes"}},{"kind":"Field","name":{"kind":"Name","value":"sourceType"}},{"kind":"Field","name":{"kind":"Name","value":"sourcePackage"}},{"kind":"Field","name":{"kind":"Name","value":"latestAvailableVersion"}},{"kind":"Field","name":{"kind":"Name","value":"isListed"}},{"kind":"Field","name":{"kind":"Name","value":"isVetted"}},{"kind":"Field","name":{"kind":"Name","value":"isPreInstalled"}},{"kind":"Field","name":{"kind":"Name","value":"isConfigured"}},{"kind":"Field","name":{"kind":"Name","value":"ownerWorkspaceId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}}]} as unknown as DocumentNode<FindOneApplicationRegistrationQuery, FindOneApplicationRegistrationQueryVariables>;
export const GithubClaimAuthorizationUrlDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GithubClaimAuthorizationUrl"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"applicationRegistrationId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"githubClaimAuthorizationUrl"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"applicationRegistrationId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"applicationRegistrationId"}}}]}]}}]} as unknown as DocumentNode<GithubClaimAuthorizationUrlQuery, GithubClaimAuthorizationUrlQueryVariables>;
+export const TriggerUninstallApplicationJobDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"TriggerUninstallApplicationJob"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"TriggerUninstallApplicationJobInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"triggerUninstallApplicationJob"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"jobId"}}]}}]}}]} as unknown as DocumentNode<TriggerUninstallApplicationJobMutation, TriggerUninstallApplicationJobMutationVariables>;
export const UninstallApplicationDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"UninstallApplication"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"universalIdentifier"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"uninstallApplication"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"universalIdentifier"},"value":{"kind":"Variable","name":{"kind":"Name","value":"universalIdentifier"}}}]}]}}]} as unknown as DocumentNode<UninstallApplicationMutation, UninstallApplicationMutationVariables>;
export const UpdateApplicationDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"UpdateApplication"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UUID"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UpdateApplicationInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"updateApplication"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}},{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"autoUpgrade"}}]}}]}}]} as unknown as DocumentNode<UpdateApplicationMutation, UpdateApplicationMutationVariables>;
export const UpdateOneApplicationVariableDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"UpdateOneApplicationVariable"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"key"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"value"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"applicationId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UUID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"updateOneApplicationVariable"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"key"},"value":{"kind":"Variable","name":{"kind":"Name","value":"key"}}},{"kind":"Argument","name":{"kind":"Name","value":"value"},"value":{"kind":"Variable","name":{"kind":"Name","value":"value"}}},{"kind":"Argument","name":{"kind":"Name","value":"applicationId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"applicationId"}}}]}]}}]} as unknown as DocumentNode<UpdateOneApplicationVariableMutation, UpdateOneApplicationVariableMutationVariables>;
export const ApplicationConnectionProvidersDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"ApplicationConnectionProviders"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"applicationId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UUID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"applicationConnectionProviders"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"applicationId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"applicationId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"applicationId"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"logoUrl"}},{"kind":"Field","name":{"kind":"Name","value":"oauth"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"scopes"}},{"kind":"Field","name":{"kind":"Name","value":"isClientCredentialsConfigured"}}]}}]}}]}}]} as unknown as DocumentNode<ApplicationConnectionProvidersQuery, ApplicationConnectionProvidersQueryVariables>;
+export const FindUninstallApplicationJobStatusDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"FindUninstallApplicationJobStatus"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"universalIdentifier"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"findUninstallApplicationJobStatus"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"universalIdentifier"},"value":{"kind":"Variable","name":{"kind":"Name","value":"universalIdentifier"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"jobId"}},{"kind":"Field","name":{"kind":"Name","value":"state"}},{"kind":"Field","name":{"kind":"Name","value":"failedReason"}}]}}]}}]} as unknown as DocumentNode<FindUninstallApplicationJobStatusQuery, FindUninstallApplicationJobStatusQueryVariables>;
export const CancelSwitchBillingIntervalDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"CancelSwitchBillingInterval"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"cancelSwitchBillingInterval"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"currentBillingSubscription"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CurrentBillingSubscriptionFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"billingSubscriptions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BillingSubscriptionFragment"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseItemFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseItem"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"price"}},{"kind":"Field","name":{"kind":"Name","value":"quantity"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhase"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"start_date"}},{"kind":"Field","name":{"kind":"Name","value":"end_date"}},{"kind":"Field","name":{"kind":"Name","value":"items"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseItemFragment"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CurrentBillingSubscriptionFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BillingSubscription"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"interval"}},{"kind":"Field","name":{"kind":"Name","value":"metadata"}},{"kind":"Field","name":{"kind":"Name","value":"currentPeriodEnd"}},{"kind":"Field","name":{"kind":"Name","value":"cancelAt"}},{"kind":"Field","name":{"kind":"Name","value":"phases"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"billingSubscriptionItems"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"hasReachedCurrentPeriodCap"}},{"kind":"Field","name":{"kind":"Name","value":"quantity"}},{"kind":"Field","name":{"kind":"Name","value":"stripePriceId"}},{"kind":"Field","name":{"kind":"Name","value":"billingProduct"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"images"}},{"kind":"Field","name":{"kind":"Name","value":"metadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"productKey"}},{"kind":"Field","name":{"kind":"Name","value":"planKey"}},{"kind":"Field","name":{"kind":"Name","value":"priceUsageBased"}}]}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BillingSubscriptionFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BillingSubscription"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"metadata"}},{"kind":"Field","name":{"kind":"Name","value":"cancelAt"}},{"kind":"Field","name":{"kind":"Name","value":"phases"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseFragment"}}]}}]}}]} as unknown as DocumentNode<CancelSwitchBillingIntervalMutation, CancelSwitchBillingIntervalMutationVariables>;
export const CancelSwitchBillingPlanDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"CancelSwitchBillingPlan"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"cancelSwitchBillingPlan"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"currentBillingSubscription"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CurrentBillingSubscriptionFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"billingSubscriptions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BillingSubscriptionFragment"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseItemFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseItem"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"price"}},{"kind":"Field","name":{"kind":"Name","value":"quantity"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhase"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"start_date"}},{"kind":"Field","name":{"kind":"Name","value":"end_date"}},{"kind":"Field","name":{"kind":"Name","value":"items"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseItemFragment"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CurrentBillingSubscriptionFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BillingSubscription"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"interval"}},{"kind":"Field","name":{"kind":"Name","value":"metadata"}},{"kind":"Field","name":{"kind":"Name","value":"currentPeriodEnd"}},{"kind":"Field","name":{"kind":"Name","value":"cancelAt"}},{"kind":"Field","name":{"kind":"Name","value":"phases"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"billingSubscriptionItems"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"hasReachedCurrentPeriodCap"}},{"kind":"Field","name":{"kind":"Name","value":"quantity"}},{"kind":"Field","name":{"kind":"Name","value":"stripePriceId"}},{"kind":"Field","name":{"kind":"Name","value":"billingProduct"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"images"}},{"kind":"Field","name":{"kind":"Name","value":"metadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"productKey"}},{"kind":"Field","name":{"kind":"Name","value":"planKey"}},{"kind":"Field","name":{"kind":"Name","value":"priceUsageBased"}}]}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BillingSubscriptionFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BillingSubscription"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"metadata"}},{"kind":"Field","name":{"kind":"Name","value":"cancelAt"}},{"kind":"Field","name":{"kind":"Name","value":"phases"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseFragment"}}]}}]}}]} as unknown as DocumentNode<CancelSwitchBillingPlanMutation, CancelSwitchBillingPlanMutationVariables>;
export const CancelSwitchResourceCreditPriceDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"CancelSwitchResourceCreditPrice"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"cancelSwitchResourceCreditPrice"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"currentBillingSubscription"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CurrentBillingSubscriptionFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"billingSubscriptions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BillingSubscriptionFragment"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseItemFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseItem"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"price"}},{"kind":"Field","name":{"kind":"Name","value":"quantity"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhase"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"start_date"}},{"kind":"Field","name":{"kind":"Name","value":"end_date"}},{"kind":"Field","name":{"kind":"Name","value":"items"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseItemFragment"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CurrentBillingSubscriptionFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BillingSubscription"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"interval"}},{"kind":"Field","name":{"kind":"Name","value":"metadata"}},{"kind":"Field","name":{"kind":"Name","value":"currentPeriodEnd"}},{"kind":"Field","name":{"kind":"Name","value":"cancelAt"}},{"kind":"Field","name":{"kind":"Name","value":"phases"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"billingSubscriptionItems"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"hasReachedCurrentPeriodCap"}},{"kind":"Field","name":{"kind":"Name","value":"quantity"}},{"kind":"Field","name":{"kind":"Name","value":"stripePriceId"}},{"kind":"Field","name":{"kind":"Name","value":"billingProduct"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"images"}},{"kind":"Field","name":{"kind":"Name","value":"metadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"productKey"}},{"kind":"Field","name":{"kind":"Name","value":"planKey"}},{"kind":"Field","name":{"kind":"Name","value":"priceUsageBased"}}]}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BillingSubscriptionFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BillingSubscription"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"metadata"}},{"kind":"Field","name":{"kind":"Name","value":"cancelAt"}},{"kind":"Field","name":{"kind":"Name","value":"phases"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseFragment"}}]}}]}}]} as unknown as DocumentNode<CancelSwitchResourceCreditPriceMutation, CancelSwitchResourceCreditPriceMutationVariables>;
diff --git a/packages/twenty-front/src/modules/applications/components/ApplicationsLoadEffect.tsx b/packages/twenty-front/src/modules/applications/components/ApplicationsLoadEffect.tsx
index 6e6cd250d4f..bd3b3185efb 100644
--- a/packages/twenty-front/src/modules/applications/components/ApplicationsLoadEffect.tsx
+++ b/packages/twenty-front/src/modules/applications/components/ApplicationsLoadEffect.tsx
@@ -94,7 +94,6 @@ export const ApplicationsLoadEffect = () => {
name: application.name,
description: application.description,
version: application.version,
- state: application.state,
applicationRegistrationId: application.applicationRegistrationId,
}));
diff --git a/packages/twenty-front/src/modules/applications/graphql/fragments/applicationFragment.ts b/packages/twenty-front/src/modules/applications/graphql/fragments/applicationFragment.ts
index 06828848ec1..36f577144ff 100644
--- a/packages/twenty-front/src/modules/applications/graphql/fragments/applicationFragment.ts
+++ b/packages/twenty-front/src/modules/applications/graphql/fragments/applicationFragment.ts
@@ -13,7 +13,6 @@ export const APPLICATION_FRAGMENT = gql`
description
logoUrl
version
- state
universalIdentifier
applicationRegistrationId
applicationRegistration {
diff --git a/packages/twenty-front/src/modules/applications/graphql/queries/findManyApplications.ts b/packages/twenty-front/src/modules/applications/graphql/queries/findManyApplications.ts
index 94b3413058c..3dc8f243d98 100644
--- a/packages/twenty-front/src/modules/applications/graphql/queries/findManyApplications.ts
+++ b/packages/twenty-front/src/modules/applications/graphql/queries/findManyApplications.ts
@@ -8,7 +8,6 @@ export const FIND_MANY_APPLICATIONS = gql`
description
logoUrl
version
- state
universalIdentifier
applicationRegistrationId
applicationRegistration {
diff --git a/packages/twenty-front/src/modules/applications/graphql/queries/findOneApplicationByUniversalIdentifier.ts b/packages/twenty-front/src/modules/applications/graphql/queries/findOneApplicationByUniversalIdentifier.ts
index 49b27b4a266..16944011ec2 100644
--- a/packages/twenty-front/src/modules/applications/graphql/queries/findOneApplicationByUniversalIdentifier.ts
+++ b/packages/twenty-front/src/modules/applications/graphql/queries/findOneApplicationByUniversalIdentifier.ts
@@ -6,8 +6,8 @@ export const FIND_ONE_APPLICATION_BY_UNIVERSAL_IDENTIFIER = gql`
id
universalIdentifier
name
+ logoUrl
version
- state
}
}
`;
diff --git a/packages/twenty-front/src/modules/applications/hooks/useInstalledApplications.ts b/packages/twenty-front/src/modules/applications/hooks/useInstalledApplications.ts
index a5218629f0a..b2241b32699 100644
--- a/packages/twenty-front/src/modules/applications/hooks/useInstalledApplications.ts
+++ b/packages/twenty-front/src/modules/applications/hooks/useInstalledApplications.ts
@@ -1,4 +1,4 @@
-import { useRefetchOnApplicationLifecycleSettled } from '@/applications/hooks/useRefetchOnApplicationLifecycleSettled';
+import { useRefetchOnApplicationOperation } from '@/applications/hooks/useRefetchOnApplicationOperation';
import { useRefetchOnApplicationRegistrationChange } from '@/applications/hooks/useRefetchOnApplicationRegistrationChange';
import { applicationsSelector } from '@/applications/states/applicationsSelector';
import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';
@@ -9,7 +9,7 @@ import { type ApplicationWithoutRelation } from '~/pages/settings/applications/t
export const useInstalledApplications = (): ApplicationWithoutRelation[] => {
const { data, refetch } = useQuery(FindManyApplicationsDocument);
- useRefetchOnApplicationLifecycleSettled({ refetch });
+ useRefetchOnApplicationOperation({ refetch });
useRefetchOnApplicationRegistrationChange({ refetch });
const applications = useAtomStateValue(applicationsSelector);
diff --git a/packages/twenty-front/src/modules/applications/hooks/useRefetchOnApplicationLifecycleSettled.ts b/packages/twenty-front/src/modules/applications/hooks/useRefetchOnApplicationOperation.ts
similarity index 66%
rename from packages/twenty-front/src/modules/applications/hooks/useRefetchOnApplicationLifecycleSettled.ts
rename to packages/twenty-front/src/modules/applications/hooks/useRefetchOnApplicationOperation.ts
index 0f6c3c869d3..35f90a2d3f4 100644
--- a/packages/twenty-front/src/modules/applications/hooks/useRefetchOnApplicationLifecycleSettled.ts
+++ b/packages/twenty-front/src/modules/applications/hooks/useRefetchOnApplicationOperation.ts
@@ -3,19 +3,18 @@ import { type MetadataOperationBrowserEventDetail } from '@/browser-event/types/
import { type FlatApplication } from '@/metadata-store/types/FlatApplication';
import { useCallback } from 'react';
import { isDefined } from 'twenty-shared/utils';
-import { ApplicationState } from '~/generated-metadata/graphql';
-const QUERY_ONLY_APPLICATION_FIELDS = ['logo'];
+const REFETCH_TRIGGERING_APPLICATION_FIELDS = ['logo', 'version'];
-type UseRefetchOnApplicationLifecycleSettledArgs = {
+type UseRefetchOnApplicationOperationArgs = {
applicationId?: string;
refetch: () => void;
};
-export const useRefetchOnApplicationLifecycleSettled = ({
+export const useRefetchOnApplicationOperation = ({
applicationId,
refetch,
-}: UseRefetchOnApplicationLifecycleSettledArgs) => {
+}: UseRefetchOnApplicationOperationArgs) => {
const onApplicationOperation = useCallback(
({ operation }: MetadataOperationBrowserEventDetail<FlatApplication>) => {
if (operation.type === 'delete') {
@@ -37,21 +36,15 @@ export const useRefetchOnApplicationLifecycleSettled = ({
return;
}
- if (application.state !== ApplicationState.INSTALLED) {
- return;
- }
-
const updatedFields =
operation.type === 'update' ? (operation.updatedFields ?? []) : [];
- const hasSettledOnThisEvent =
- operation.type === 'create' || updatedFields.includes('state');
-
- const hasChangedQueryOnlyField = updatedFields.some((updatedField) =>
- QUERY_ONLY_APPLICATION_FIELDS.includes(updatedField),
+ const hasChangedRefetchTriggeringField = updatedFields.some(
+ (updatedField) =>
+ REFETCH_TRIGGERING_APPLICATION_FIELDS.includes(updatedField),
);
- if (!hasSettledOnThisEvent && !hasChangedQueryOnlyField) {
+ if (operation.type !== 'create' && !hasChangedRefetchTriggeringField) {
return;
}
diff --git a/packages/twenty-front/src/modules/marketplace/graphql/mutations/triggerInstallApplicationJob.ts b/packages/twenty-front/src/modules/marketplace/graphql/mutations/triggerInstallApplicationJob.ts
new file mode 100644
index 00000000000..968f96827cb
--- /dev/null
+++ b/packages/twenty-front/src/modules/marketplace/graphql/mutations/triggerInstallApplicationJob.ts
@@ -0,0 +1,11 @@
+import gql from 'graphql-tag';
+
+export const TRIGGER_INSTALL_APPLICATION_JOB = gql`
+ mutation TriggerInstallApplicationJob(
+ $input: TriggerInstallApplicationJobInput!
+ ) {
+ triggerInstallApplicationJob(input: $input) {
+ jobId
+ }
+ }
+`;
diff --git a/packages/twenty-front/src/modules/marketplace/graphql/queries/findInstallApplicationJobStatus.ts b/packages/twenty-front/src/modules/marketplace/graphql/queries/findInstallApplicationJobStatus.ts
new file mode 100644
index 00000000000..7f9132381aa
--- /dev/null
+++ b/packages/twenty-front/src/modules/marketplace/graphql/queries/findInstallApplicationJobStatus.ts
@@ -0,0 +1,11 @@
+import gql from 'graphql-tag';
+
+export const FIND_INSTALL_APPLICATION_JOB_STATUS = gql`
+ query FindInstallApplicationJobStatus($universalIdentifier: String!) {
+ findInstallApplicationJobStatus(universalIdentifier: $universalIdentifier) {
+ jobId
+ state
+ failedReason
+ }
+ }
+`;
diff --git a/packages/twenty-front/src/modules/marketplace/hooks/__tests__/useInstallMarketplaceApp.test.tsx b/packages/twenty-front/src/modules/marketplace/hooks/__tests__/useInstallMarketplaceApp.test.tsx
new file mode 100644
index 00000000000..c476b2330e4
--- /dev/null
+++ b/packages/twenty-front/src/modules/marketplace/hooks/__tests__/useInstallMarketplaceApp.test.tsx
@@ -0,0 +1,111 @@
+import { type MockedResponse } from '@apollo/client/testing';
+import { MockedProvider } from '@apollo/client/testing/react';
+import { act, renderHook, waitFor } from '@testing-library/react';
+import { type ReactNode } from 'react';
+
+import { dispatchBrowserEvent } from '@/browser-event/utils/dispatchBrowserEvent';
+import { useInstallMarketplaceApp } from '@/marketplace/hooks/useInstallMarketplaceApp';
+import { QUEUE_JOB_BROWSER_EVENT_NAME } from '@/queue-job/constants/QueueJobBrowserEventName';
+import {
+ FindInstallApplicationJobStatusDocument,
+ JobState,
+ type JobStatus,
+ TriggerInstallApplicationJobDocument,
+} from '~/generated-metadata/graphql';
+
+const UNIVERSAL_IDENTIFIER = 'application-universal-identifier';
+const JOB_ID = `install-application.workspace-id.${UNIVERSAL_IDENTIFIER}`;
+const mockEnqueueErrorSnackBar = jest.fn();
+
+jest.mock('@/ui/feedback/snack-bar-manager/hooks/useSnackBar', () => ({
+ useSnackBar: () => ({
+ enqueueErrorSnackBar: mockEnqueueErrorSnackBar,
+ enqueueSuccessSnackBar: jest.fn(),
+ }),
+}));
+
+const triggerInstallMock = {
+ request: {
+ query: TriggerInstallApplicationJobDocument,
+ variables: { input: { universalIdentifier: UNIVERSAL_IDENTIFIER } },
+ },
+ result: {
+ data: { triggerInstallApplicationJob: { jobId: JOB_ID } },
+ },
+};
+
+const buildJobStatusMock = (
+ findInstallApplicationJobStatus: Partial<JobStatus> | null,
+) => ({
+ request: {
+ query: FindInstallApplicationJobStatusDocument,
+ variables: { universalIdentifier: UNIVERSAL_IDENTIFIER },
+ },
+ result: { data: { findInstallApplicationJobStatus } },
+});
+
+const buildWrapper =
+ (mocks: MockedResponse[]) =>
+ ({ children }: { children: ReactNode }) => (
+ <MockedProvider mocks={mocks}>{children}</MockedProvider>
+ );
+
+describe('useInstallMarketplaceApp', () => {
+ beforeEach(() => {
+ jest.clearAllMocks();
+ });
+
+ it('tracks the triggered job and surfaces a failed job reason', async () => {
+ const { result } = renderHook(
+ () =>
+ useInstallMarketplaceApp({
+ universalIdentifier: UNIVERSAL_IDENTIFIER,
+ }),
+ {
+ wrapper: buildWrapper([buildJobStatusMock(null), triggerInstallMock]),
+ },
+ );
+
+ await act(async () => {
+ await result.current.install();
+ });
+
+ expect(result.current.isInstalling).toBe(true);
+
+ act(() => {
+ dispatchBrowserEvent<JobStatus>(QUEUE_JOB_BROWSER_EVENT_NAME, {
+ jobId: JOB_ID,
+ state: JobState.FAILED,
+ attemptsMade: 1,
+ failedReason: 'Manifest validation failed',
+ enqueuedAt: 1,
+ });
+ });
+
+ await waitFor(() => expect(result.current.isInstalling).toBe(false));
+ expect(mockEnqueueErrorSnackBar).toHaveBeenCalledWith({
+ message: 'Manifest validation failed',
+ });
+ });
+
+ it('reports an installation still running on the server', async () => {
+ const { result } = renderHook(
+ () =>
+ useInstallMarketplaceApp({
+ universalIdentifier: UNIVERSAL_IDENTIFIER,
+ }),
+ {
+ wrapper: buildWrapper([
+ buildJobStatusMock({
+ __typename: 'JobStatus',
+ jobId: JOB_ID,
+ state: JobState.ACTIVE,
+ failedReason: null,
+ }),
+ ]),
+ },
+ );
+
+ await waitFor(() => expect(result.current.isInstalling).toBe(true));
+ });
+});
diff --git a/packages/twenty-front/src/modules/marketplace/hooks/useInstallMarketplaceApp.ts b/packages/twenty-front/src/modules/marketplace/hooks/useInstallMarketplaceApp.ts
index 7a666bac860..e3775902d97 100644
--- a/packages/twenty-front/src/modules/marketplace/hooks/useInstallMarketplaceApp.ts
+++ b/packages/twenty-front/src/modules/marketplace/hooks/useInstallMarketplaceApp.ts
@@ -1,69 +1,150 @@
import { currentWorkspaceState } from '@/auth/states/currentWorkspaceState';
+import { useTrackedQueueJob } from '@/queue-job/hooks/useTrackedQueueJob';
+import { type TrackedJobStatus } from '@/queue-job/types/TrackedJobStatus';
+import { isTerminalJobState } from '@/queue-job/utils/isTerminalJobState';
import { useSnackBar } from '@/ui/feedback/snack-bar-manager/hooks/useSnackBar';
import { useSetAtomState } from '@/ui/utilities/state/jotai/hooks/useSetAtomState';
-import { useMutation } from '@apollo/client/react';
+import { useLazyQuery, useMutation, useQuery } from '@apollo/client/react';
import { t } from '@lingui/core/macro';
-import { useState } from 'react';
+import { isNonEmptyString } from '@sniptt/guards';
+import { useCallback } from 'react';
import { isDefined } from 'twenty-shared/utils';
import {
- InstallApplicationDocument,
- type InstallApplicationMutation,
+ FindInstallApplicationJobStatusDocument,
+ FindOneApplicationByUniversalIdentifierDocument,
+ type FindOneApplicationByUniversalIdentifierQuery,
+ JobState,
+ TriggerInstallApplicationJobDocument,
} from '~/generated-metadata/graphql';
-export const useInstallMarketplaceApp = () => {
+type UseInstallMarketplaceAppArgs = {
+ universalIdentifier?: string;
+ onCompleted?: (
+ application: FindOneApplicationByUniversalIdentifierQuery['findOneApplication'],
+ ) => void;
+};
+
+export const useInstallMarketplaceApp = ({
+ universalIdentifier,
+ onCompleted,
+}: UseInstallMarketplaceAppArgs = {}) => {
const { enqueueErrorSnackBar, enqueueSuccessSnackBar } = useSnackBar();
- const [isInstalling, setIsInstalling] = useState(false);
- const [installApplicationMutation] = useMutation(InstallApplicationDocument);
+ const [triggerInstallApplicationJob, { loading: isTriggeringInstall }] =
+ useMutation(TriggerInstallApplicationJobDocument);
+ const [findInstalledApplication] = useLazyQuery(
+ FindOneApplicationByUniversalIdentifierDocument,
+ { fetchPolicy: 'network-only' },
+ );
const setCurrentWorkspace = useSetAtomState(currentWorkspaceState);
- const install = async (variables: {
- universalIdentifier: string;
- version?: string;
- }): Promise<InstallApplicationMutation | null> => {
- setIsInstalling(true);
+ const { data: jobStatusData } = useQuery(
+ FindInstallApplicationJobStatusDocument,
+ {
+ variables: { universalIdentifier: universalIdentifier ?? '' },
+ skip: !isDefined(universalIdentifier),
+ fetchPolicy: 'network-only',
+ },
+ );
- try {
- const result = await installApplicationMutation({ variables });
-
- if (isDefined(result.data)) {
- const installedApplication = result.data.installApplication;
-
- // the workspace carries the applications app chips resolve their logo
- // from, so the freshly installed one has to be added to it
- setCurrentWorkspace((currentWorkspace) =>
- isDefined(currentWorkspace)
- ? {
- ...currentWorkspace,
- installedApplications: [
- ...currentWorkspace.installedApplications.filter(
- (application) => application.id !== installedApplication.id,
- ),
- installedApplication,
- ],
- }
- : currentWorkspace,
- );
-
- enqueueSuccessSnackBar({
- message: t`Application installed successfully.`,
+ const runningJobStatus = jobStatusData?.findInstallApplicationJobStatus;
+ const runningJobId =
+ isDefined(runningJobStatus) && !isTerminalJobState(runningJobStatus.state)
+ ? runningJobStatus.jobId
+ : undefined;
+
+ const handleInstallJobSettled = useCallback(
+ async (jobStatus: TrackedJobStatus, trackedUniversalIdentifier: string) => {
+ if (jobStatus.state === JobState.FAILED) {
+ enqueueErrorSnackBar({
+ message: isNonEmptyString(jobStatus.failedReason)
+ ? jobStatus.failedReason
+ : t`Failed to install the application.`,
+ });
+ return;
+ }
+
+ let installedApplication:
+ | FindOneApplicationByUniversalIdentifierQuery['findOneApplication']
+ | undefined;
+
+ try {
+ const result = await findInstalledApplication({
+ variables: { universalIdentifier: trackedUniversalIdentifier },
});
- return result.data;
+ installedApplication = result.data?.findOneApplication;
+ } catch {
+ enqueueErrorSnackBar({ message: t`Failed to load the application.` });
+ return;
+ }
+
+ if (!isDefined(installedApplication)) {
+ enqueueErrorSnackBar({ message: t`Failed to load the application.` });
+ return;
}
- return null;
+ setCurrentWorkspace((currentWorkspace) =>
+ isDefined(currentWorkspace)
+ ? {
+ ...currentWorkspace,
+ installedApplications: [
+ ...currentWorkspace.installedApplications.filter(
+ (application) => application.id !== installedApplication.id,
+ ),
+ installedApplication,
+ ],
+ }
+ : currentWorkspace,
+ );
+
+ enqueueSuccessSnackBar({
+ message: t`Application installed successfully.`,
+ });
+ onCompleted?.(installedApplication);
+ },
+ [
+ enqueueErrorSnackBar,
+ enqueueSuccessSnackBar,
+ findInstalledApplication,
+ onCompleted,
+ setCurrentWorkspace,
+ ],
+ );
+
+ const { activeJobId, trackJob } = useTrackedQueueJob({
+ runningJob:
+ isDefined(runningJobId) && isDefined(universalIdentifier)
+ ? { jobId: runningJobId, context: universalIdentifier }
+ : undefined,
+ onQueueJobSettled: handleInstallJobSettled,
+ });
+
+ const install = async (): Promise<void> => {
+ if (!isDefined(universalIdentifier)) {
+ return;
+ }
+
+ try {
+ const { data } = await triggerInstallApplicationJob({
+ variables: { input: { universalIdentifier } },
+ });
+
+ const jobId = data?.triggerInstallApplicationJob.jobId;
+
+ if (isDefined(jobId)) {
+ trackJob({ jobId, context: universalIdentifier });
+ }
} catch (error) {
const graphqlMessage = error instanceof Error ? error.message : undefined;
enqueueErrorSnackBar({
message: graphqlMessage ?? t`Failed to install the application.`,
});
-
- return null;
- } finally {
- setIsInstalling(false);
}
};
- return { install, isInstalling };
+ return {
+ install,
+ isInstalling: isTriggeringInstall || isDefined(activeJobId),
+ };
};
diff --git a/packages/twenty-front/src/modules/marketplace/hooks/useInstallMarketplaceAppWithPermissionValidation.ts b/packages/twenty-front/src/modules/marketplace/hooks/useInstallMarketplaceAppWithPermissionValidation.ts
index 69bbe7007fa..096c65b40db 100644
--- a/packages/twenty-front/src/modules/marketplace/hooks/useInstallMarketplaceAppWithPermissionValidation.ts
+++ b/packages/twenty-front/src/modules/marketplace/hooks/useInstallMarketplaceAppWithPermissionValidation.ts
@@ -5,9 +5,15 @@ import { useCallback } from 'react';
const INSTALL_PERMISSION_VALIDATION_MODAL_ID =
'install-permission-validation-modal';
-export const useInstallMarketplaceAppWithPermissionValidation = () => {
+type UseInstallMarketplaceAppWithPermissionValidationArgs = Parameters<
+ typeof useInstallMarketplaceApp
+>[0];
+
+export const useInstallMarketplaceAppWithPermissionValidation = (
+ args?: UseInstallMarketplaceAppWithPermissionValidationArgs,
+) => {
const { openModal } = useModal();
- const { install, isInstalling } = useInstallMarketplaceApp();
+ const { install, isInstalling } = useInstallMarketplaceApp(args);
const requestInstall = useCallback(() => {
openModal(INSTALL_PERMISSION_VALIDATION_MODAL_ID);
diff --git a/packages/twenty-front/src/modules/metadata-store/types/FlatApplication.ts b/packages/twenty-front/src/modules/metadata-store/types/FlatApplication.ts
index befc7cea565..ca50c6d9d25 100644
--- a/packages/twenty-front/src/modules/metadata-store/types/FlatApplication.ts
+++ b/packages/twenty-front/src/modules/metadata-store/types/FlatApplication.ts
@@ -7,6 +7,5 @@ export type FlatApplication = Pick<
| 'name'
| 'description'
| 'version'
- | 'state'
| 'applicationRegistrationId'
>;
diff --git a/packages/twenty-front/src/modules/object-metadata/hooks/__tests__/constants/CustomWorkspaceApplicationMock.test.constant.ts b/packages/twenty-front/src/modules/object-metadata/hooks/__tests__/constants/CustomWorkspaceApplicationMock.test.constant.ts
index c54486f4f22..f5efdd22faf 100644
--- a/packages/twenty-front/src/modules/object-metadata/hooks/__tests__/constants/CustomWorkspaceApplicationMock.test.constant.ts
+++ b/packages/twenty-front/src/modules/object-metadata/hooks/__tests__/constants/CustomWorkspaceApplicationMock.test.constant.ts
@@ -1,7 +1,4 @@
-import {
- type Application,
- ApplicationState,
-} from '~/generated-metadata/graphql';
+import { type Application } from '~/generated-metadata/graphql';
export const CUSTOM_WORKSPACE_APPLICATION_MOCK = {
id: 'dc75f982-35a2-4c1b-a63d-bd1131215377',
@@ -18,5 +15,4 @@ export const CUSTOM_WORKSPACE_APPLICATION_MOCK = {
logicFunctions: [],
universalIdentifier: '66a698b6-f6c1-4d35-a6e7-20aeadc3cd95',
version: '1.0.0',
- state: ApplicationState.INSTALLED,
} as const satisfies Application;
diff --git a/packages/twenty-front/src/modules/queue-job/hooks/__tests__/useTrackedQueueJob.test.tsx b/packages/twenty-front/src/modules/queue-job/hooks/__tests__/useTrackedQueueJob.test.tsx
new file mode 100644
index 00000000000..98deea51fff
--- /dev/null
+++ b/packages/twenty-front/src/modules/queue-job/hooks/__tests__/useTrackedQueueJob.test.tsx
@@ -0,0 +1,147 @@
+import { act, renderHook } from '@testing-library/react';
+
+import { dispatchBrowserEvent } from '@/browser-event/utils/dispatchBrowserEvent';
+import { QUEUE_JOB_BROWSER_EVENT_NAME } from '@/queue-job/constants/QueueJobBrowserEventName';
+import { useTrackedQueueJob } from '@/queue-job/hooks/useTrackedQueueJob';
+import { JobState, type JobStatus } from '~/generated-metadata/graphql';
+
+type TrackedQueueJobProps = {
+ runningJob?: { jobId: string; context: string };
+};
+
+const FIRST_JOB_ID = 'install-application.workspace-id.application-first';
+const SECOND_JOB_ID = 'install-application.workspace-id.application-second';
+const CONTEXT = 'application-universal-identifier';
+
+const buildJobStatus = (jobId: string, state: JobState): JobStatus => ({
+ jobId,
+ state,
+ attemptsMade: 1,
+ enqueuedAt: 1,
+});
+
+const dispatchJobStatus = (jobId: string, state: JobState) => {
+ act(() => {
+ dispatchBrowserEvent<JobStatus>(
+ QUEUE_JOB_BROWSER_EVENT_NAME,
+ buildJobStatus(jobId, state),
+ );
+ });
+};
+
+describe('useTrackedQueueJob', () => {
+ it('settles a tracked job on its terminal browser event with its context', () => {
+ const onQueueJobSettled = jest.fn();
+
+ const { result } = renderHook(() =>
+ useTrackedQueueJob<string>({ onQueueJobSettled }),
+ );
+
+ act(() => {
+ result.current.trackJob({ jobId: FIRST_JOB_ID, context: CONTEXT });
+ });
+
+ expect(result.current.activeJobId).toBe(FIRST_JOB_ID);
+
+ dispatchJobStatus(FIRST_JOB_ID, JobState.ACTIVE);
+
+ expect(result.current.activeJobId).toBe(FIRST_JOB_ID);
+ expect(onQueueJobSettled).not.toHaveBeenCalled();
+
+ dispatchJobStatus(FIRST_JOB_ID, JobState.COMPLETED);
+
+ expect(result.current.activeJobId).toBeUndefined();
+ expect(onQueueJobSettled).toHaveBeenCalledWith(
+ buildJobStatus(FIRST_JOB_ID, JobState.COMPLETED),
+ CONTEXT,
+ );
+ });
+
+ it('tracks a job the server reports as running', () => {
+ const onQueueJobSettled = jest.fn();
+
+ const { result } = renderHook(() =>
+ useTrackedQueueJob<string>({
+ runningJob: { jobId: FIRST_JOB_ID, context: CONTEXT },
+ onQueueJobSettled,
+ }),
+ );
+
+ expect(result.current.activeJobId).toBe(FIRST_JOB_ID);
+
+ dispatchJobStatus(FIRST_JOB_ID, JobState.FAILED);
+
+ expect(result.current.activeJobId).toBeUndefined();
+ expect(onQueueJobSettled).toHaveBeenCalledWith(
+ buildJobStatus(FIRST_JOB_ID, JobState.FAILED),
+ CONTEXT,
+ );
+ });
+
+ it('ignores terminal events of other jobs', () => {
+ const onQueueJobSettled = jest.fn();
+
+ const { result } = renderHook(() =>
+ useTrackedQueueJob<string>({ onQueueJobSettled }),
+ );
+
+ act(() => {
+ result.current.trackJob({ jobId: FIRST_JOB_ID, context: CONTEXT });
+ });
+ dispatchJobStatus(SECOND_JOB_ID, JobState.COMPLETED);
+
+ expect(result.current.activeJobId).toBe(FIRST_JOB_ID);
+ expect(onQueueJobSettled).not.toHaveBeenCalled();
+ });
+
+ it('does not fall back to a settled running job after a retried job settles', () => {
+ const onQueueJobSettled = jest.fn();
+
+ const { result } = renderHook(() =>
+ useTrackedQueueJob<string>({
+ runningJob: { jobId: FIRST_JOB_ID, context: CONTEXT },
+ onQueueJobSettled,
+ }),
+ );
+
+ dispatchJobStatus(FIRST_JOB_ID, JobState.FAILED);
+
+ expect(result.current.activeJobId).toBeUndefined();
+
+ act(() => {
+ result.current.trackJob({ jobId: SECOND_JOB_ID, context: CONTEXT });
+ });
+
+ expect(result.current.activeJobId).toBe(SECOND_JOB_ID);
+
+ dispatchJobStatus(SECOND_JOB_ID, JobState.COMPLETED);
+
+ expect(result.current.activeJobId).toBeUndefined();
+ expect(onQueueJobSettled).toHaveBeenCalledTimes(2);
+ });
+
+ it('settles with the context the job was tracked with', () => {
+ const onQueueJobSettled = jest.fn();
+
+ const { result, rerender } = renderHook(
+ ({ runningJob }: TrackedQueueJobProps) =>
+ useTrackedQueueJob<string>({ runningJob, onQueueJobSettled }),
+ { initialProps: {} as TrackedQueueJobProps },
+ );
+
+ act(() => {
+ result.current.trackJob({ jobId: FIRST_JOB_ID, context: CONTEXT });
+ });
+
+ rerender({
+ runningJob: { jobId: SECOND_JOB_ID, context: 'other-application' },
+ });
+
+ dispatchJobStatus(FIRST_JOB_ID, JobState.COMPLETED);
+
+ expect(onQueueJobSettled).toHaveBeenCalledWith(
+ buildJobStatus(FIRST_JOB_ID, JobState.COMPLETED),
+ CONTEXT,
+ );
+ });
+});
diff --git a/packages/twenty-front/src/modules/queue-job/hooks/useTrackedQueueJob.ts b/packages/twenty-front/src/modules/queue-job/hooks/useTrackedQueueJob.ts
new file mode 100644
index 00000000000..34de034dc84
--- /dev/null
+++ b/packages/twenty-front/src/modules/queue-job/hooks/useTrackedQueueJob.ts
@@ -0,0 +1,69 @@
+import { useListenToQueueJob } from '@/queue-job/hooks/useListenToQueueJob';
+import { type TrackedJobStatus } from '@/queue-job/types/TrackedJobStatus';
+import { isTerminalJobState } from '@/queue-job/utils/isTerminalJobState';
+import { useCallback, useState } from 'react';
+import { isDefined } from 'twenty-shared/utils';
+
+type TrackedQueueJob<TContext> = {
+ jobId: string;
+ context: TContext;
+};
+
+type UseTrackedQueueJobArgs<TContext> = {
+ runningJob?: TrackedQueueJob<TContext>;
+ onQueueJobSettled: (
+ jobStatus: TrackedJobStatus,
+ context: TContext,
+ ) => void | Promise<void>;
+};
+
+export const useTrackedQueueJob = <TContext>({
+ runningJob,
+ onQueueJobSettled,
+}: UseTrackedQueueJobArgs<TContext>) => {
+ const [triggeredJob, setTriggeredJob] = useState<TrackedQueueJob<TContext>>();
+ const [settledJobIds, setSettledJobIds] = useState<string[]>([]);
+
+ const trackedJob = triggeredJob ?? runningJob;
+ const activeJob =
+ isDefined(trackedJob) && !settledJobIds.includes(trackedJob.jobId)
+ ? trackedJob
+ : undefined;
+ const activeJobId = activeJob?.jobId;
+ const activeJobContext = activeJob?.context;
+
+ const handleQueueJobEvent = useCallback(
+ (jobStatus: TrackedJobStatus) => {
+ if (
+ !isTerminalJobState(jobStatus.state) ||
+ !isDefined(activeJobId) ||
+ !isDefined(activeJobContext)
+ ) {
+ return;
+ }
+
+ setSettledJobIds((currentSettledJobIds) => [
+ ...currentSettledJobIds,
+ jobStatus.jobId,
+ ]);
+ setTriggeredJob((currentTriggeredJob) =>
+ currentTriggeredJob?.jobId === jobStatus.jobId
+ ? undefined
+ : currentTriggeredJob,
+ );
+ void onQueueJobSettled(jobStatus, activeJobContext);
+ },
+ [activeJobContext, activeJobId, onQueueJobSettled],
+ );
+
+ useListenToQueueJob({
+ jobId: activeJobId,
+ onQueueJobEvent: handleQueueJobEvent,
+ });
+
+ const trackJob = (job: TrackedQueueJob<TContext>) => {
+ setTriggeredJob(job);
+ };
+
+ return { activeJobId, trackJob };
+};
diff --git a/packages/twenty-front/src/modules/queue-job/types/TrackedJobStatus.ts b/packages/twenty-front/src/modules/queue-job/types/TrackedJobStatus.ts
new file mode 100644
index 00000000000..714d8456dad
--- /dev/null
+++ b/packages/twenty-front/src/modules/queue-job/types/TrackedJobStatus.ts
@@ -0,0 +1,6 @@
+import { type JobStatus } from '~/generated-metadata/graphql';
+
+export type TrackedJobStatus = Pick<
+ JobStatus,
+ 'jobId' | 'state' | 'failedReason'
+>;
diff --git a/packages/twenty-front/src/modules/queue-job/utils/isTerminalJobState.ts b/packages/twenty-front/src/modules/queue-job/utils/isTerminalJobState.ts
new file mode 100644
index 00000000000..9c3293ea37e
--- /dev/null
+++ b/packages/twenty-front/src/modules/queue-job/utils/isTerminalJobState.ts
@@ -0,0 +1,4 @@
+import { JobState } from '~/generated-metadata/graphql';
+
+export const isTerminalJobState = (state: JobState): boolean =>
+ state === JobState.COMPLETED || state === JobState.FAILED;
diff --git a/packages/twenty-front/src/modules/settings/applications/graphql/mutations/triggerUninstallApplicationJob.ts b/packages/twenty-front/src/modules/settings/applications/graphql/mutations/triggerUninstallApplicationJob.ts
new file mode 100644
index 00000000000..970ab828f03
--- /dev/null
+++ b/packages/twenty-front/src/modules/settings/applications/graphql/mutations/triggerUninstallApplicationJob.ts
@@ -0,0 +1,11 @@
+import gql from 'graphql-tag';
+
+export const TRIGGER_UNINSTALL_APPLICATION_JOB = gql`
+ mutation TriggerUninstallApplicationJob(
+ $input: TriggerUninstallApplicationJobInput!
+ ) {
+ triggerUninstallApplicationJob(input: $input) {
+ jobId
+ }
+ }
+`;
diff --git a/packages/twenty-front/src/modules/settings/applications/graphql/queries/findUninstallApplicationJobStatus.ts b/packages/twenty-front/src/modules/settings/applications/graphql/queries/findUninstallApplicationJobStatus.ts
new file mode 100644
index 00000000000..8c71e4db071
--- /dev/null
+++ b/packages/twenty-front/src/modules/settings/applications/graphql/queries/findUninstallApplicationJobStatus.ts
@@ -0,0 +1,13 @@
+import gql from 'graphql-tag';
+
+export const FIND_UNINSTALL_APPLICATION_JOB_STATUS = gql`
+ query FindUninstallApplicationJobStatus($universalIdentifier: String!) {
+ findUninstallApplicationJobStatus(
+ universalIdentifier: $universalIdentifier
+ ) {
+ jobId
+ state
+ failedReason
+ }
+ }
+`;
diff --git a/packages/twenty-front/src/modules/settings/applications/hooks/__tests__/useComputeObjectAndFieldsContentForApplication.test.tsx b/packages/twenty-front/src/modules/settings/applications/hooks/__tests__/useComputeObjectAndFieldsContentForApplication.test.tsx
index 21a083aff2f..82056eba3ad 100644
--- a/packages/twenty-front/src/modules/settings/applications/hooks/__tests__/useComputeObjectAndFieldsContentForApplication.test.tsx
+++ b/packages/twenty-front/src/modules/settings/applications/hooks/__tests__/useComputeObjectAndFieldsContentForApplication.test.tsx
@@ -2,7 +2,6 @@ import { renderHook } from '@testing-library/react';
import { useComputeObjectAndFieldsContentForApplication } from '@/settings/applications/hooks/useComputeObjectAndFieldsContentForApplication';
import { type Manifest } from 'twenty-shared/application';
-import { ApplicationState } from '~/generated-metadata/graphql';
import { getJestMetadataAndApolloMocksWrapper } from '~/testing/jest/getJestMetadataAndApolloMocksWrapper';
import { getTestEnrichedObjectMetadataItemsMock } from '~/testing/utils/getTestEnrichedObjectMetadataItemsMock';
@@ -30,7 +29,6 @@ describe('useComputeObjectAndFieldsContentForApplication', () => {
objects: [{ id: personObject.id }],
name: 'Test App',
logo: null,
- state: ApplicationState.INSTALLED,
canBeUninstalled: true,
autoUpgrade: false,
availablePackages: {},
@@ -62,7 +60,6 @@ describe('useComputeObjectAndFieldsContentForApplication', () => {
objects: [],
name: 'Test App',
logo: null,
- state: ApplicationState.INSTALLED,
canBeUninstalled: true,
autoUpgrade: false,
availablePackages: {},
@@ -92,7 +89,6 @@ describe('useComputeObjectAndFieldsContentForApplication', () => {
objects: [{ id: personObject.id }],
name: 'Test App',
logo: null,
- state: ApplicationState.INSTALLED,
canBeUninstalled: true,
autoUpgrade: false,
availablePackages: {},
@@ -123,7 +119,6 @@ describe('useComputeObjectAndFieldsContentForApplication', () => {
objects: [],
name: 'Test App',
logo: null,
- state: ApplicationState.INSTALLED,
canBeUninstalled: true,
autoUpgrade: false,
availablePackages: {},
@@ -282,7 +277,6 @@ describe('useComputeObjectAndFieldsContentForApplication', () => {
objects: [{ id: personObject.id }],
name: 'Test App',
logo: null,
- state: ApplicationState.INSTALLED,
canBeUninstalled: true,
autoUpgrade: false,
availablePackages: {},
diff --git a/packages/twenty-front/src/modules/settings/applications/hooks/__tests__/useUninstallApplication.test.tsx b/packages/twenty-front/src/modules/settings/applications/hooks/__tests__/useUninstallApplication.test.tsx
new file mode 100644
index 00000000000..f861562d0c9
--- /dev/null
+++ b/packages/twenty-front/src/modules/settings/applications/hooks/__tests__/useUninstallApplication.test.tsx
@@ -0,0 +1,145 @@
+import { type MockedResponse } from '@apollo/client/testing';
+import { MockedProvider } from '@apollo/client/testing/react';
+import { act, renderHook, waitFor } from '@testing-library/react';
+import { type ReactNode } from 'react';
+
+import { dispatchBrowserEvent } from '@/browser-event/utils/dispatchBrowserEvent';
+import { QUEUE_JOB_BROWSER_EVENT_NAME } from '@/queue-job/constants/QueueJobBrowserEventName';
+import { useUninstallApplication } from '@/settings/applications/hooks/useUninstallApplication';
+import {
+ FindUninstallApplicationJobStatusDocument,
+ JobState,
+ type JobStatus,
+ TriggerUninstallApplicationJobDocument,
+} from '~/generated-metadata/graphql';
+
+const UNIVERSAL_IDENTIFIER = 'application-universal-identifier';
+const JOB_ID = `uninstall-application.workspace-id.${UNIVERSAL_IDENTIFIER}-5c98b035-5b09-4550-a4fb-b52056c494d1`;
+const mockEnqueueErrorSnackBar = jest.fn();
+const mockEnqueueSuccessSnackBar = jest.fn();
+
+jest.mock('@/ui/feedback/snack-bar-manager/hooks/useSnackBar', () => ({
+ useSnackBar: () => ({
+ enqueueErrorSnackBar: mockEnqueueErrorSnackBar,
+ enqueueSuccessSnackBar: mockEnqueueSuccessSnackBar,
+ }),
+}));
+
+const triggerUninstallMock = {
+ request: {
+ query: TriggerUninstallApplicationJobDocument,
+ variables: { input: { universalIdentifier: UNIVERSAL_IDENTIFIER } },
+ },
+ result: {
+ data: { triggerUninstallApplicationJob: { jobId: JOB_ID } },
+ },
+};
+
+const buildJobStatusMock = (
+ findUninstallApplicationJobStatus: Partial<JobStatus> | null,
+) => ({
+ request: {
+ query: FindUninstallApplicationJobStatusDocument,
+ variables: { universalIdentifier: UNIVERSAL_IDENTIFIER },
+ },
+ result: { data: { findUninstallApplicationJobStatus } },
+});
+
+const buildWrapper =
+ (mocks: MockedResponse[]) =>
+ ({ children }: { children: ReactNode }) => (
+ <MockedProvider mocks={mocks}>{children}</MockedProvider>
+ );
+
+describe('useUninstallApplication', () => {
+ beforeEach(() => {
+ jest.clearAllMocks();
+ });
+
+ it('tracks the triggered job and reports its completion', async () => {
+ const onCompleted = jest.fn();
+ const { result } = renderHook(
+ () =>
+ useUninstallApplication({
+ universalIdentifier: UNIVERSAL_IDENTIFIER,
+ onCompleted,
+ }),
+ {
+ wrapper: buildWrapper([buildJobStatusMock(null), triggerUninstallMock]),
+ },
+ );
+
+ await act(async () => {
+ await result.current.uninstall();
+ });
+
+ expect(result.current.isUninstalling).toBe(true);
+
+ act(() => {
+ dispatchBrowserEvent<JobStatus>(QUEUE_JOB_BROWSER_EVENT_NAME, {
+ jobId: JOB_ID,
+ state: JobState.COMPLETED,
+ attemptsMade: 1,
+ enqueuedAt: 1,
+ });
+ });
+
+ await waitFor(() => expect(result.current.isUninstalling).toBe(false));
+ expect(mockEnqueueSuccessSnackBar).toHaveBeenCalledWith({
+ message: 'Application successfully uninstalled.',
+ });
+ expect(onCompleted).toHaveBeenCalledTimes(1);
+ });
+
+ it('surfaces the failure reason of a failed job', async () => {
+ const { result } = renderHook(
+ () =>
+ useUninstallApplication({
+ universalIdentifier: UNIVERSAL_IDENTIFIER,
+ }),
+ {
+ wrapper: buildWrapper([buildJobStatusMock(null), triggerUninstallMock]),
+ },
+ );
+
+ await act(async () => {
+ await result.current.uninstall();
+ });
+
+ act(() => {
+ dispatchBrowserEvent<JobStatus>(QUEUE_JOB_BROWSER_EVENT_NAME, {
+ jobId: JOB_ID,
+ state: JobState.FAILED,
+ attemptsMade: 1,
+ failedReason: 'This application cannot be uninstalled.',
+ enqueuedAt: 1,
+ });
+ });
+
+ await waitFor(() => expect(result.current.isUninstalling).toBe(false));
+ expect(mockEnqueueErrorSnackBar).toHaveBeenCalledWith({
+ message: 'This application cannot be uninstalled.',
+ });
+ });
+
+ it('reports an uninstallation still running on the server', async () => {
+ const { result } = renderHook(
+ () =>
+ useUninstallApplication({
+ universalIdentifier: UNIVERSAL_IDENTIFIER,
+ }),
+ {
+ wrapper: buildWrapper([
+ buildJobStatusMock({
+ __typename: 'JobStatus',
+ jobId: JOB_ID,
+ state: JobState.ACTIVE,
+ failedReason: null,
+ }),
+ ]),
+ },
+ );
+
+ await waitFor(() => expect(result.current.isUninstalling).toBe(true));
+ });
+});
diff --git a/packages/twenty-front/src/modules/settings/applications/hooks/useUninstallApplication.ts b/packages/twenty-front/src/modules/settings/applications/hooks/useUninstallApplication.ts
new file mode 100644
index 00000000000..8b7e4c7b296
--- /dev/null
+++ b/packages/twenty-front/src/modules/settings/applications/hooks/useUninstallApplication.ts
@@ -0,0 +1,121 @@
+import { currentWorkspaceState } from '@/auth/states/currentWorkspaceState';
+import { useTrackedQueueJob } from '@/queue-job/hooks/useTrackedQueueJob';
+import { type TrackedJobStatus } from '@/queue-job/types/TrackedJobStatus';
+import { isTerminalJobState } from '@/queue-job/utils/isTerminalJobState';
+import { useSnackBar } from '@/ui/feedback/snack-bar-manager/hooks/useSnackBar';
+import { useSetAtomState } from '@/ui/utilities/state/jotai/hooks/useSetAtomState';
+import { useMutation, useQuery } from '@apollo/client/react';
+import { t } from '@lingui/core/macro';
+import { isNonEmptyString } from '@sniptt/guards';
+import { useCallback } from 'react';
+import { isDefined } from 'twenty-shared/utils';
+import {
+ FindUninstallApplicationJobStatusDocument,
+ JobState,
+ TriggerUninstallApplicationJobDocument,
+} from '~/generated-metadata/graphql';
+
+type UseUninstallApplicationArgs = {
+ universalIdentifier?: string;
+ onCompleted?: () => void;
+};
+
+export const useUninstallApplication = ({
+ universalIdentifier,
+ onCompleted,
+}: UseUninstallApplicationArgs = {}) => {
+ const { enqueueErrorSnackBar, enqueueSuccessSnackBar } = useSnackBar();
+ const [triggerUninstallApplicationJob, { loading: isTriggeringUninstall }] =
+ useMutation(TriggerUninstallApplicationJobDocument);
+ const setCurrentWorkspace = useSetAtomState(currentWorkspaceState);
+
+ const { data: jobStatusData } = useQuery(
+ FindUninstallApplicationJobStatusDocument,
+ {
+ variables: { universalIdentifier: universalIdentifier ?? '' },
+ skip: !isDefined(universalIdentifier),
+ fetchPolicy: 'network-only',
+ },
+ );
+
+ const runningJobStatus = jobStatusData?.findUninstallApplicationJobStatus;
+ const runningJobId =
+ isDefined(runningJobStatus) && !isTerminalJobState(runningJobStatus.state)
+ ? runningJobStatus.jobId
+ : undefined;
+
+ const handleUninstallJobSettled = useCallback(
+ (jobStatus: TrackedJobStatus, trackedUninstallIdentifier: string) => {
+ if (jobStatus.state === JobState.FAILED) {
+ enqueueErrorSnackBar({
+ message: isNonEmptyString(jobStatus.failedReason)
+ ? jobStatus.failedReason
+ : t`Error uninstalling application.`,
+ });
+ return;
+ }
+
+ setCurrentWorkspace((currentWorkspace) =>
+ isDefined(currentWorkspace)
+ ? {
+ ...currentWorkspace,
+ installedApplications:
+ currentWorkspace.installedApplications.filter(
+ (application) =>
+ application.universalIdentifier !==
+ trackedUninstallIdentifier,
+ ),
+ }
+ : currentWorkspace,
+ );
+
+ enqueueSuccessSnackBar({
+ message: t`Application successfully uninstalled.`,
+ });
+ onCompleted?.();
+ },
+ [
+ enqueueErrorSnackBar,
+ enqueueSuccessSnackBar,
+ onCompleted,
+ setCurrentWorkspace,
+ ],
+ );
+
+ const { activeJobId, trackJob } = useTrackedQueueJob({
+ runningJob:
+ isDefined(runningJobId) && isDefined(universalIdentifier)
+ ? { jobId: runningJobId, context: universalIdentifier }
+ : undefined,
+ onQueueJobSettled: handleUninstallJobSettled,
+ });
+
+ const uninstall = async (): Promise<void> => {
+ if (!isDefined(universalIdentifier)) {
+ return;
+ }
+
+ try {
+ const { data } = await triggerUninstallApplicationJob({
+ variables: { input: { universalIdentifier } },
+ });
+
+ const jobId = data?.triggerUninstallApplicationJob.jobId;
+
+ if (isDefined(jobId)) {
+ trackJob({ jobId, context: universalIdentifier });
+ }
+ } catch (error) {
+ const graphqlMessage = error instanceof Error ? error.message : undefined;
+
+ enqueueErrorSnackBar({
+ message: graphqlMessage ?? t`Error uninstalling application.`,
+ });
+ }
+ };
+
+ return {
+ uninstall,
+ isUninstalling: isTriggeringUninstall || isDefined(activeJobId),
+ };
+};
diff --git a/packages/twenty-front/src/pages/settings/applications/SettingsApplicationDetails.tsx b/packages/twenty-front/src/pages/settings/applications/SettingsApplicationDetails.tsx
index 4519386e3ef..188101b6972 100644
--- a/packages/twenty-front/src/pages/settings/applications/SettingsApplicationDetails.tsx
+++ b/packages/twenty-front/src/pages/settings/applications/SettingsApplicationDetails.tsx
@@ -1,24 +1,25 @@
import { CurrentApplicationContext } from '@/applications/contexts/CurrentApplicationContext';
import { AppChip } from '@/applications/components/AppChip';
-import { useRefetchOnApplicationLifecycleSettled } from '@/applications/hooks/useRefetchOnApplicationLifecycleSettled';
+import { useRefetchOnApplicationOperation } from '@/applications/hooks/useRefetchOnApplicationOperation';
import { useResolvedApplicationDescription } from '@/applications/hooks/useResolvedApplicationDescription';
import { isTwentyStandardApplication } from '@/applications/utils/isTwentyStandardApplication';
import { isWorkspaceCustomApplication } from '@/applications/utils/isWorkspaceCustomApplication';
import { currentWorkspaceState } from '@/auth/states/currentWorkspaceState';
+import { useInstallMarketplaceApp } from '@/marketplace/hooks/useInstallMarketplaceApp';
import { useUpgradeApplication } from '@/marketplace/hooks/useUpgradeApplication';
import { objectMetadataItemsSelector } from '@/object-metadata/states/objectMetadataItemsSelector';
import { SettingsPageContainer } from '@/settings/components/SettingsPageContainer';
+import { useUninstallApplication } from '@/settings/applications/hooks/useUninstallApplication';
import { useHasPermissionFlag } from '@/settings/roles/hooks/useHasPermissionFlag';
-import { useSnackBar } from '@/ui/feedback/snack-bar-manager/hooks/useSnackBar';
import { SettingsPageLayout } from '@/settings/components/layout/SettingsPageLayout';
import { SettingsTabBar } from '@/settings/components/layout/SettingsTabBar';
import { activeTabIdComponentState } from '@/ui/layout/tab-list/states/activeTabIdComponentState';
import type { SingleTabProps } from '@/ui/layout/tab-list/types/SingleTabProps';
import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentStateValue';
import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';
-import { useMutation, useQuery } from '@apollo/client/react';
+import { useQuery } from '@apollo/client/react';
import { t } from '@lingui/core/macro';
-import { useMemo, useState } from 'react';
+import { useCallback, useMemo } from 'react';
import { useParams } from 'react-router-dom';
import { type Manifest } from 'twenty-shared/application';
import { SettingsPath } from 'twenty-shared/types';
@@ -41,7 +42,6 @@ import {
FindOneApplicationDocument,
IsApplicationStoppedDocument,
PermissionFlagType,
- UninstallApplicationDocument,
} from '~/generated-metadata/graphql';
import { isUpgradableApplicationSourceType } from '~/pages/settings/applications/utils/isUpgradableApplicationSourceType';
import { useNavigateSettings } from '~/hooks/useNavigateSettings';
@@ -72,7 +72,7 @@ export const SettingsApplicationDetails = () => {
skip: !applicationId,
});
- useRefetchOnApplicationLifecycleSettled({ applicationId, refetch });
+ useRefetchOnApplicationOperation({ applicationId, refetch });
const application = data?.findOneApplication;
@@ -132,6 +132,10 @@ export const SettingsApplicationDetails = () => {
const { upgrade, isUpgrading } = useUpgradeApplication();
+ const { isInstalling } = useInstallMarketplaceApp({
+ universalIdentifier: application?.universalIdentifier,
+ });
+
const canInstallMarketplaceApps = useHasPermissionFlag(
PermissionFlagType.APPLICATIONS,
);
@@ -160,29 +164,14 @@ export const SettingsApplicationDetails = () => {
});
};
- const [uninstallApplication] = useMutation(UninstallApplicationDocument);
- const [isUninstalling, setIsUninstalling] = useState(false);
- const { enqueueErrorSnackBar, enqueueSuccessSnackBar } = useSnackBar();
const navigate = useNavigateSettings();
-
- const handleUninstall = async () => {
- if (!isDefined(application)) return;
-
- setIsUninstalling(true);
- try {
- await uninstallApplication({
- variables: { universalIdentifier: application.universalIdentifier },
- });
- enqueueSuccessSnackBar({
- message: t`Application successfully uninstalled.`,
- });
- navigate(SettingsPath.Applications);
- } catch {
- enqueueErrorSnackBar({ message: t`Error uninstalling application.` });
- } finally {
- setIsUninstalling(false);
- }
- };
+ const handleUninstallCompleted = useCallback(() => {
+ navigate(SettingsPath.Applications);
+ }, [navigate]);
+ const { uninstall, isUninstalling } = useUninstallApplication({
+ universalIdentifier: application?.universalIdentifier,
+ onCompleted: handleUninstallCompleted,
+ });
const objectMetadataItems = useAtomStateValue(objectMetadataItemsSelector);
@@ -311,14 +300,14 @@ export const SettingsApplicationDetails = () => {
: undefined
}
isInstalled={true}
+ isInstalling={isInstalling}
canInstallMarketplaceApps={canInstallMarketplaceApps}
hasUpdate={hasUpdate}
onUpgrade={handleUpgrade}
isUpgrading={isUpgrading}
canBeUninstalled={application.canBeUninstalled}
- onUninstall={handleUninstall}
+ onUninstall={uninstall}
isUninstalling={isUninstalling}
- state={application.state}
/>
);
case 'content':
diff --git a/packages/twenty-front/src/pages/settings/applications/SettingsAvailableApplicationDetails.tsx b/packages/twenty-front/src/pages/settings/applications/SettingsAvailableApplicationDetails.tsx
index c7c1476f595..187714298b6 100644
--- a/packages/twenty-front/src/pages/settings/applications/SettingsAvailableApplicationDetails.tsx
+++ b/packages/twenty-front/src/pages/settings/applications/SettingsAvailableApplicationDetails.tsx
@@ -12,6 +12,7 @@ import { activeTabIdComponentState } from '@/ui/layout/tab-list/states/activeTab
import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentStateValue';
import { useQuery } from '@apollo/client/react';
import { t } from '@lingui/core/macro';
+import { useCallback } from 'react';
import { useParams } from 'react-router-dom';
import { useNavigateSettings } from '~/hooks/useNavigateSettings';
import { type Manifest } from 'twenty-shared/application';
@@ -51,8 +52,19 @@ export const SettingsAvailableApplicationDetails = () => {
}>();
const navigateSettings = useNavigateSettings();
+ const handleInstallCompleted = useCallback(
+ (installedApplication: { id: string }) => {
+ navigateSettings(SettingsPath.ApplicationDetail, {
+ applicationId: installedApplication.id,
+ });
+ },
+ [navigateSettings],
+ );
const { requestInstall, install, isInstalling, modalInstanceId } =
- useInstallMarketplaceAppWithPermissionValidation();
+ useInstallMarketplaceAppWithPermissionValidation({
+ universalIdentifier: availableApplicationId,
+ onCompleted: handleInstallCompleted,
+ });
const { upgrade, isUpgrading } = useUpgradeApplication();
const canInstallMarketplaceApps = useHasPermissionFlag(
@@ -109,22 +121,6 @@ export const SettingsAvailableApplicationDetails = () => {
isDefined(currentVersion) &&
isNewerSemver(latestAvailableVersion, currentVersion);
- const handleInstall = async () => {
- if (isDefined(detail)) {
- const data = await install({
- universalIdentifier: detail.universalIdentifier,
- });
-
- const applicationId = data?.installApplication?.id;
-
- if (isDefined(applicationId)) {
- navigateSettings(SettingsPath.ApplicationDetail, {
- applicationId,
- });
- }
- }
- };
-
const handleUpgrade = async () => {
if (!isDefined(registrationId) || !isDefined(latestAvailableVersion)) {
return;
@@ -247,7 +243,6 @@ export const SettingsAvailableApplicationDetails = () => {
hasUpdate={hasUpdate}
onUpgrade={handleUpgrade}
isUpgrading={isUpgrading}
- state={application?.state}
/>
);
case 'content':
@@ -327,7 +322,7 @@ export const SettingsAvailableApplicationDetails = () => {
appDisplayName={displayName}
appLogoUrl={detail?.logoUrl ?? undefined}
defaultRole={defaultRole}
- onAuthorize={handleInstall}
+ onAuthorize={install}
isInstalling={isInstalling}
/>
</CurrentApplicationContext.Provider>
diff --git a/packages/twenty-front/src/pages/settings/applications/components/SettingsApplicationRegistrationGeneralInfo.tsx b/packages/twenty-front/src/pages/settings/applications/components/SettingsApplicationRegistrationGeneralInfo.tsx
index 98ed0bbfa96..b5bc3e43f66 100644
--- a/packages/twenty-front/src/pages/settings/applications/components/SettingsApplicationRegistrationGeneralInfo.tsx
+++ b/packages/twenty-front/src/pages/settings/applications/components/SettingsApplicationRegistrationGeneralInfo.tsx
@@ -7,6 +7,7 @@ import {
} from 'twenty-ui/icon';
import { H2Title } from 'twenty-ui/typography';
import { Trans, useLingui } from '@lingui/react/macro';
+import { useRefetchOnApplicationOperation } from '@/applications/hooks/useRefetchOnApplicationOperation';
import {
SettingsTableCard,
type TableItem,
@@ -73,13 +74,13 @@ export const SettingsApplicationRegistrationGeneralInfo = ({
},
);
- const { data: applicationSummaryData } = useQuery(
- FindOneApplicationSummaryDocument,
- {
+ const { data: applicationSummaryData, refetch: refetchApplicationSummary } =
+ useQuery(FindOneApplicationSummaryDocument, {
variables: { universalIdentifier: registration.universalIdentifier },
skip: !registration.universalIdentifier,
- },
- );
+ });
+
+ useRefetchOnApplicationOperation({ refetch: refetchApplicationSummary });
const isApplicationInstalled = isDefined(
applicationSummaryData?.findOneApplication,
diff --git a/packages/twenty-front/src/pages/settings/applications/components/SettingsApplicationRegistrationShareLinkButtons.tsx b/packages/twenty-front/src/pages/settings/applications/components/SettingsApplicationRegistrationShareLinkButtons.tsx
index ed9e30db7a9..b3eefc6b20b 100644
--- a/packages/twenty-front/src/pages/settings/applications/components/SettingsApplicationRegistrationShareLinkButtons.tsx
+++ b/packages/twenty-front/src/pages/settings/applications/components/SettingsApplicationRegistrationShareLinkButtons.tsx
@@ -38,12 +38,14 @@ export const SettingsApplicationRegistrationShareLinkButtons = ({
const { copyToClipboard } = useCopyToClipboard();
- const { requestInstall, install, isInstalling, modalInstanceId } =
- useInstallMarketplaceAppWithPermissionValidation();
-
const installable =
isDefined(isInstalled) && isDefined(universalIdentifier) && !isInstalled;
+ const { requestInstall, install, isInstalling, modalInstanceId } =
+ useInstallMarketplaceAppWithPermissionValidation({
+ universalIdentifier,
+ });
+
const { data: detailData } = useQuery(FindMarketplaceAppDetailDocument, {
variables: { universalIdentifier: universalIdentifier ?? '' },
skip: !installable || !isDefined(universalIdentifier),
@@ -54,12 +56,6 @@ export const SettingsApplicationRegistrationShareLinkButtons = ({
const defaultRole = getMarketplaceAppDefaultRoleManifest(detail);
- const handleInstall = async () => {
- if (installable) {
- await install({ universalIdentifier });
- }
- };
-
return (
<StyledButtonGroup>
{installable && (
@@ -76,7 +72,7 @@ export const SettingsApplicationRegistrationShareLinkButtons = ({
appDisplayName={displayName}
appLogoUrl={detail?.logoUrl ?? undefined}
defaultRole={defaultRole}
- onAuthorize={handleInstall}
+ onAuthorize={install}
isInstalling={isInstalling}
/>
</>
diff --git a/packages/twenty-front/src/pages/settings/applications/hooks/__tests__/useUpdateOneApplicationVariable.test.tsx b/packages/twenty-front/src/pages/settings/applications/hooks/__tests__/useUpdateOneApplicationVariable.test.tsx
index c129c9d56d6..35af473c41b 100644
--- a/packages/twenty-front/src/pages/settings/applications/hooks/__tests__/useUpdateOneApplicationVariable.test.tsx
+++ b/packages/twenty-front/src/pages/settings/applications/hooks/__tests__/useUpdateOneApplicationVariable.test.tsx
@@ -5,7 +5,6 @@ import { type ReactNode } from 'react';
import {
type Application,
- ApplicationState,
FindOneApplicationDocument,
UpdateOneApplicationVariableDocument,
} from '~/generated-metadata/graphql';
@@ -34,7 +33,6 @@ const buildApplication = (variableValue: string): Application => ({
description: null,
version: '1.0.0',
universalIdentifier: 'test-app',
- state: ApplicationState.INSTALLED,
applicationRegistrationId: null,
applicationRegistration: null,
canBeUninstalled: true,
diff --git a/packages/twenty-front/src/pages/settings/applications/tabs/SettingsApplicationDetailAboutTab.tsx b/packages/twenty-front/src/pages/settings/applications/tabs/SettingsApplicationDetailAboutTab.tsx
index 755cafc9868..a70fb7b007b 100644
--- a/packages/twenty-front/src/pages/settings/applications/tabs/SettingsApplicationDetailAboutTab.tsx
+++ b/packages/twenty-front/src/pages/settings/applications/tabs/SettingsApplicationDetailAboutTab.tsx
@@ -15,7 +15,6 @@ import {
SettingsApplicationAboutSidebar,
} from '@/settings/applications/components/SettingsApplicationAboutSidebar';
import { SettingsApplicationScreenshotGallery } from '@/settings/applications/components/SettingsApplicationScreenshotGallery';
-import { ApplicationState } from '~/generated-metadata/graphql';
const UNINSTALL_APPLICATION_MODAL_ID = 'uninstall-application-modal';
@@ -41,7 +40,6 @@ type SettingsApplicationDetailAboutTabProps = {
canBeUninstalled?: boolean;
onUninstall?: () => void;
isUninstalling?: boolean;
- state?: ApplicationState;
};
const StyledContentContainer = styled.div`
@@ -119,7 +117,6 @@ export const SettingsApplicationDetailAboutTab = ({
canBeUninstalled,
onUninstall,
isUninstalling,
- state,
}: SettingsApplicationDetailAboutTabProps) => {
const { openModal } = useModal();
@@ -130,39 +127,12 @@ export const SettingsApplicationDetailAboutTab = ({
description ??
t`No description available for this application`;
- const getTransitionalAction = () => {
- switch (state) {
- case ApplicationState.INSTALLING:
- return { Icon: IconDownload, title: t`Installing...` };
- case ApplicationState.UPGRADING:
- return { Icon: IconUpload, title: t`Upgrading...` };
- case ApplicationState.UNINSTALLING:
- return { Icon: IconTrash, title: t`Uninstalling...` };
- default:
- return null;
- }
- };
-
const getActionButton = () => {
if (!canInstallMarketplaceApps) {
return null;
}
- const transitionalAction = getTransitionalAction();
-
- if (isDefined(transitionalAction)) {
- return (
- <Button
- Icon={transitionalAction.Icon}
- title={transitionalAction.title}
- variant={'secondary'}
- accent={'blue'}
- disabled={true}
- />
- );
- }
-
- if (!isInstalled) {
+ if (!isInstalled || isInstalling) {
return (
<Button
Icon={IconDownload}
diff --git a/packages/twenty-server/src/engine/core-modules/application/application-install/application-install.module.ts b/packages/twenty-server/src/engine/core-modules/application/application-install/application-install.module.ts
index 793c81c6ccd..13d7be759bb 100644
--- a/packages/twenty-server/src/engine/core-modules/application/application-install/application-install.module.ts
+++ b/packages/twenty-server/src/engine/core-modules/application/application-install/application-install.module.ts
@@ -13,6 +13,8 @@ import { MarketplaceModule } from 'src/engine/core-modules/application/applicati
import { ApplicationInstallResolver } from 'src/engine/core-modules/application/application-install/application-install.resolver';
import { ApplicationInstallService } from 'src/engine/core-modules/application/application-install/application-install.service';
import { InstallApplicationCommand } from 'src/engine/core-modules/application/application-install/commands/install-application.command';
+import { ApplicationLifecycleJobService } from 'src/engine/core-modules/application/application-install/services/application-lifecycle-job.service';
+import { ApplicationUninstallRunnerService } from 'src/engine/core-modules/application/application-install/services/application-uninstall-runner.service';
import { ApplicationEntity } from 'src/engine/core-modules/application/application.entity';
import { FileStorageModule } from 'src/engine/core-modules/file-storage/file-storage.module';
import { LogicFunctionModule } from 'src/engine/core-modules/logic-function/logic-function.module';
@@ -45,8 +47,10 @@ import { WorkspaceCacheModule } from 'src/engine/workspace-cache/workspace-cache
providers: [
ApplicationInstallResolver,
ApplicationInstallService,
+ ApplicationLifecycleJobService,
+ ApplicationUninstallRunnerService,
InstallApplicationCommand,
],
- exports: [ApplicationInstallService],
+ exports: [ApplicationInstallService, ApplicationUninstallRunnerService],
})
export class ApplicationInstallModule {}
diff --git a/packages/twenty-server/src/engine/core-modules/application/application-install/application-install.resolver.ts b/packages/twenty-server/src/engine/core-modules/application/application-install/application-install.resolver.ts
index e362869806f..374dacbfa36 100644
--- a/packages/twenty-server/src/engine/core-modules/application/application-install/application-install.resolver.ts
+++ b/packages/twenty-server/src/engine/core-modules/application/application-install/application-install.resolver.ts
@@ -13,18 +13,21 @@ import { MetadataResolver } from 'src/engine/api/graphql/graphql-config/decorato
import { UUIDScalarType } from 'src/engine/api/graphql/workspace-schema-builder/graphql-types/scalars';
import { ApplicationExceptionFilter } from 'src/engine/core-modules/application/application-exception-filter';
import { ApplicationInstallService } from 'src/engine/core-modules/application/application-install/application-install.service';
-import { ApplicationSyncService } from 'src/engine/core-modules/application/application-manifest/application-sync.service';
+import { TriggerInstallApplicationJobInput } from 'src/engine/core-modules/application/application-install/dtos/trigger-install-application-job.input';
+import { TriggerInstallApplicationJobResultDTO } from 'src/engine/core-modules/application/application-install/dtos/trigger-install-application-job-result.dto';
+import { TriggerUninstallApplicationJobInput } from 'src/engine/core-modules/application/application-install/dtos/trigger-uninstall-application-job.input';
+import { TriggerUninstallApplicationJobResultDTO } from 'src/engine/core-modules/application/application-install/dtos/trigger-uninstall-application-job-result.dto';
+import { ApplicationLifecycleJobService } from 'src/engine/core-modules/application/application-install/services/application-lifecycle-job.service';
+import { ApplicationUninstallRunnerService } from 'src/engine/core-modules/application/application-install/services/application-uninstall-runner.service';
import { UninstallApplicationInput } from 'src/engine/core-modules/application/application-manifest/dtos/uninstall-application.input';
import { MarketplaceQueryService } from 'src/engine/core-modules/application/application-marketplace/marketplace-query.service';
-import { ApplicationException } from 'src/engine/core-modules/application/application.exception';
import { ApplicationRegistrationExceptionFilter } from 'src/engine/core-modules/application/application-registration/application-registration-exception-filter';
import { ApplicationService } from 'src/engine/core-modules/application/application.service';
import { ApplicationDTO } from 'src/engine/core-modules/application/dtos/application.dto';
import { UpdateApplicationInput } from 'src/engine/core-modules/application/dtos/update-application.input';
import { AuthGraphqlApiExceptionFilter } from 'src/engine/core-modules/auth/filters/auth-graphql-api-exception.filter';
-import { MetricsService } from 'src/engine/core-modules/metrics/metrics.service';
-import { MetricsKeys } from 'src/engine/core-modules/metrics/types/metrics-keys.type';
import { ResolverValidationPipe } from 'src/engine/core-modules/graphql/pipes/resolver-validation.pipe';
+import { JobStatusDTO } from 'src/engine/core-modules/message-queue/dtos/job-status.dto';
import { type WorkspaceEntity } from 'src/engine/core-modules/workspace/workspace.entity';
import { AuthWorkspace } from 'src/engine/decorators/auth/auth-workspace.decorator';
import { SettingsPermissionGuard } from 'src/engine/guards/settings-permission.guard';
@@ -44,9 +47,9 @@ export class ApplicationInstallResolver {
constructor(
private readonly applicationService: ApplicationService,
private readonly applicationInstallService: ApplicationInstallService,
- private readonly applicationSyncService: ApplicationSyncService,
private readonly marketplaceQueryService: MarketplaceQueryService,
- private readonly metricsService: MetricsService,
+ private readonly applicationLifecycleJobService: ApplicationLifecycleJobService,
+ private readonly applicationUninstallRunnerService: ApplicationUninstallRunnerService,
) {}
@Query(() => [ApplicationDTO])
@@ -114,6 +117,53 @@ export class ApplicationInstallResolver {
});
}
+ @Mutation(() => TriggerInstallApplicationJobResultDTO)
+ @UseGuards(SettingsPermissionGuard(PermissionFlagType.APPLICATIONS))
+ async triggerInstallApplicationJob(
+ @Args('input') { universalIdentifier }: TriggerInstallApplicationJobInput,
+ @AuthWorkspace() workspace: WorkspaceEntity,
+ ): Promise<TriggerInstallApplicationJobResultDTO> {
+ return this.applicationLifecycleJobService.triggerInstallApplicationJob({
+ universalIdentifier,
+ workspaceId: workspace.id,
+ });
+ }
+
+ @Mutation(() => TriggerUninstallApplicationJobResultDTO)
+ @UseGuards(SettingsPermissionGuard(PermissionFlagType.APPLICATIONS))
+ async triggerUninstallApplicationJob(
+ @Args('input') { universalIdentifier }: TriggerUninstallApplicationJobInput,
+ @AuthWorkspace() workspace: WorkspaceEntity,
+ ): Promise<TriggerUninstallApplicationJobResultDTO> {
+ return this.applicationLifecycleJobService.triggerUninstallApplicationJob({
+ universalIdentifier,
+ workspaceId: workspace.id,
+ });
+ }
+
+ @Query(() => JobStatusDTO, { nullable: true })
+ @UseGuards(SettingsPermissionGuard(PermissionFlagType.APPLICATIONS))
+ async findInstallApplicationJobStatus(
+ @Args('universalIdentifier') universalIdentifier: string,
+ @AuthWorkspace() workspace: WorkspaceEntity,
+ ): Promise<JobStatusDTO | null> {
+ return this.applicationLifecycleJobService.findInstallApplicationJobStatus({
+ universalIdentifier,
+ workspaceId: workspace.id,
+ });
+ }
+
+ @Query(() => JobStatusDTO, { nullable: true })
+ @UseGuards(SettingsPermissionGuard(PermissionFlagType.APPLICATIONS))
+ async findUninstallApplicationJobStatus(
+ @Args('universalIdentifier') universalIdentifier: string,
+ @AuthWorkspace() workspace: WorkspaceEntity,
+ ): Promise<JobStatusDTO | null> {
+ return this.applicationLifecycleJobService.findUninstallApplicationJobStatus(
+ { universalIdentifier, workspaceId: workspace.id },
+ );
+ }
+
private async installRegisteredApplication(params: {
universalIdentifier: string;
version: string | undefined;
@@ -157,43 +207,9 @@ export class ApplicationInstallResolver {
@Args() { universalIdentifier }: UninstallApplicationInput,
@AuthWorkspace() { id: workspaceId }: WorkspaceEntity,
) {
- const application = await this.applicationService.findByUniversalIdentifier(
- {
- universalIdentifier,
- workspaceId,
- },
- );
-
- const attributes = {
- universal_identifier: universalIdentifier,
- app_name: application?.name ?? 'unknown',
- source_type: application?.sourceType ?? 'unknown',
- version: application?.version ?? 'unknown',
- };
-
- try {
- await this.applicationSyncService.uninstallApplication({
- applicationUniversalIdentifier: universalIdentifier,
- workspaceId,
- });
- } catch (error) {
- this.metricsService.incrementCounterBy({
- key: MetricsKeys.AppUninstallFailed,
- amount: 1,
- attributes: {
- ...attributes,
- error_code:
- error instanceof ApplicationException ? error.code : 'UNKNOWN',
- },
- });
-
- throw error;
- }
-
- this.metricsService.incrementCounterBy({
- key: MetricsKeys.AppUninstallSucceeded,
- amount: 1,
- attributes,
+ await this.applicationUninstallRunnerService.uninstallApplication({
+ universalIdentifier,
+ workspaceId,
});
return true;
diff --git a/packages/twenty-server/src/engine/core-modules/application/application-install/application-install.service.ts b/packages/twenty-server/src/engine/core-modules/application/application-install/application-install.service.ts
index 45800a740cd..7081951c79f 100644
--- a/packages/twenty-server/src/engine/core-modules/application/application-install/application-install.service.ts
+++ b/packages/twenty-server/src/engine/core-modules/application/application-install/application-install.service.ts
@@ -30,7 +30,8 @@ import {
ApplicationExceptionCode,
} from 'src/engine/core-modules/application/application.exception';
import { ApplicationService } from 'src/engine/core-modules/application/application.service';
-import { ApplicationState } from 'src/engine/core-modules/application/enums/application-state.enum';
+import { APPLICATION_LIFECYCLE_LOCK_OPTIONS } from 'src/engine/core-modules/application/application-install/constants/application-lifecycle-lock-options.constant';
+import { buildApplicationLifecycleLockKey } from 'src/engine/core-modules/application/application-install/utils/build-application-lifecycle-lock-key.util';
import { CacheLockService } from 'src/engine/core-modules/cache-lock/cache-lock.service';
import { FileStorageService } from 'src/engine/core-modules/file-storage/services/file-storage.service';
import { LogicFunctionExecutorService } from 'src/engine/core-modules/logic-function/logic-function-executor/logic-function-executor.service';
@@ -105,8 +106,6 @@ export class ApplicationInstallService {
return true;
}
- const lockKey = `app-install:${params.workspaceId}:${appRegistration.universalIdentifier}`;
-
return this.cacheLockService.withLock(
() =>
this.doInstallApplication(appRegistration, {
@@ -115,8 +114,11 @@ export class ApplicationInstallService {
skipWorkspaceCompatibilityCheck:
params.skipWorkspaceCompatibilityCheck,
}),
- lockKey,
- { ttl: 60_000, ms: 500, maxRetries: 120 },
+ buildApplicationLifecycleLockKey({
+ workspaceId: params.workspaceId,
+ universalIdentifier: appRegistration.universalIdentifier,
+ }),
+ APPLICATION_LIFECYCLE_LOCK_OPTIONS,
);
}
@@ -270,6 +272,9 @@ export class ApplicationInstallService {
const isVersionUpgrade = isDefined(existingApplication);
+ const hasNeverCompletedInstall =
+ isVersionUpgrade && !isDefined(existingApplication.version);
+
const previousVersion = existingApplication?.version ?? undefined;
const newVersion = resolvedPackage.packageJson.version;
@@ -294,25 +299,12 @@ export class ApplicationInstallService {
sourceType: appRegistration.sourceType,
});
- const isUpgradeOfInstalledApplication =
- isVersionUpgrade && application.state === ApplicationState.INSTALLED;
-
- const hasNeverCompletedInstall =
- isVersionUpgrade && application.state === ApplicationState.INSTALLING;
-
const incomingVersion = resolvedPackage.packageJson.version;
// Rollback is scoped to the work after the application row exists: reaching
// this catch means creation succeeded, so only an application that never
// finished installing needs uninstalling.
try {
- if (isUpgradeOfInstalledApplication) {
- await this.applicationService.update(application.id, {
- state: ApplicationState.UPGRADING,
- workspaceId: params.workspaceId,
- });
- }
-
if (
isVersionUpgrade &&
isDefined(application.version) &&
@@ -373,8 +365,21 @@ export class ApplicationInstallService {
applicationRegistrationId: appRegistration.id,
application,
forceSdkClientGeneration: true,
+ persistVersion: false,
});
+ const isPostInstallHookSynchronous =
+ resolvedPackage.manifest.application.postInstallLogicFunction
+ ?.shouldRunSynchronously === true;
+
+ if (!isPostInstallHookSynchronous) {
+ await this.markInstallCompleted({
+ applicationId: application.id,
+ version: newVersion,
+ workspaceId: params.workspaceId,
+ });
+ }
+
await this.runPostInstallHook({
manifest: resolvedPackage.manifest,
workspaceId: params.workspaceId,
@@ -384,6 +389,14 @@ export class ApplicationInstallService {
universalIdentifier,
});
+ if (isPostInstallHookSynchronous) {
+ await this.markInstallCompleted({
+ applicationId: application.id,
+ version: newVersion,
+ workspaceId: params.workspaceId,
+ });
+ }
+
await this.applicationManifestApplyService.refreshRegistrationFromManifest(
{
applicationRegistrationId: appRegistration.id,
@@ -393,11 +406,6 @@ export class ApplicationInstallService {
},
);
- await this.applicationService.update(application.id, {
- state: ApplicationState.INSTALLED,
- workspaceId: params.workspaceId,
- });
-
this.logger.log(
`Successfully installed app ${universalIdentifier} v${resolvedPackage.packageJson.version ?? 'unknown'}`,
);
@@ -408,14 +416,6 @@ export class ApplicationInstallService {
`Failed to install app ${appRegistration.universalIdentifier}: ${error}`,
);
- if (isUpgradeOfInstalledApplication) {
- await this.applicationService.revertStateToInstalledBestEffort({
- applicationId: application.id,
- universalIdentifier,
- workspaceId: params.workspaceId,
- });
- }
-
if (!isVersionUpgrade || hasNeverCompletedInstall) {
// Rollback of a failed fresh install: the app never finished
// installing, so the uninstall hook must not run.
@@ -517,6 +517,21 @@ export class ApplicationInstallService {
}
}
+ private async markInstallCompleted({
+ applicationId,
+ version,
+ workspaceId,
+ }: {
+ applicationId: string;
+ version: string;
+ workspaceId: string;
+ }): Promise<void> {
+ await this.applicationService.update(applicationId, {
+ version,
+ workspaceId,
+ });
+ }
+
private async runPostInstallHook(params: {
manifest: Manifest;
workspaceId: string;
@@ -753,7 +768,6 @@ export class ApplicationInstallService {
sourceType: params.sourceType,
applicationRegistrationId: params.applicationRegistrationId,
workspaceId: params.workspaceId,
- state: ApplicationState.INSTALLING,
});
}
}
diff --git a/packages/twenty-server/src/engine/core-modules/application/application-install/constants/application-lifecycle-lock-options.constant.ts b/packages/twenty-server/src/engine/core-modules/application/application-install/constants/application-lifecycle-lock-options.constant.ts
new file mode 100644
index 00000000000..9ff268acddc
--- /dev/null
+++ b/packages/twenty-server/src/engine/core-modules/application/application-install/constants/application-lifecycle-lock-options.constant.ts
@@ -0,0 +1,7 @@
+import { type CacheLockOptions } from 'src/engine/core-modules/cache-lock/cache-lock.service';
+
+export const APPLICATION_LIFECYCLE_LOCK_OPTIONS: CacheLockOptions = {
+ ttl: 60_000,
+ ms: 500,
+ maxRetries: 120,
+};
diff --git a/packages/twenty-server/src/engine/core-modules/application/application-install/dtos/trigger-install-application-job-result.dto.ts b/packages/twenty-server/src/engine/core-modules/application/application-install/dtos/trigger-install-application-job-result.dto.ts
new file mode 100644
index 00000000000..57eb79999d0
--- /dev/null
+++ b/packages/twenty-server/src/engine/core-modules/application/application-install/dtos/trigger-install-application-job-result.dto.ts
@@ -0,0 +1,7 @@
+import { Field, ObjectType } from '@nestjs/graphql';
+
+@ObjectType('TriggerInstallApplicationJobResult')
+export class TriggerInstallApplicationJobResultDTO {
+ @Field()
+ jobId: string;
+}
diff --git a/packages/twenty-server/src/engine/core-modules/application/application-install/dtos/trigger-install-application-job.input.ts b/packages/twenty-server/src/engine/core-modules/application/application-install/dtos/trigger-install-application-job.input.ts
new file mode 100644
index 00000000000..840f738a0c2
--- /dev/null
+++ b/packages/twenty-server/src/engine/core-modules/application/application-install/dtos/trigger-install-application-job.input.ts
@@ -0,0 +1,11 @@
+import { Field, InputType } from '@nestjs/graphql';
+
+import { IsNotEmpty, IsString } from 'class-validator';
+
+@InputType('TriggerInstallApplicationJobInput')
+export class TriggerInstallApplicationJobInput {
+ @IsString()
+ @IsNotEmpty()
+ @Field()
+ universalIdentifier: string;
+}
diff --git a/packages/twenty-server/src/engine/core-modules/application/application-install/dtos/trigger-uninstall-application-job-result.dto.ts b/packages/twenty-server/src/engine/core-modules/application/application-install/dtos/trigger-uninstall-application-job-result.dto.ts
new file mode 100644
index 00000000000..1c272598448
--- /dev/null
+++ b/packages/twenty-server/src/engine/core-modules/application/application-install/dtos/trigger-uninstall-application-job-result.dto.ts
@@ -0,0 +1,7 @@
+import { Field, ObjectType } from '@nestjs/graphql';
+
+@ObjectType('TriggerUninstallApplicationJobResult')
+export class TriggerUninstallApplicationJobResultDTO {
+ @Field()
+ jobId: string;
+}
diff --git a/packages/twenty-server/src/engine/core-modules/application/application-install/dtos/trigger-uninstall-application-job.input.ts b/packages/twenty-server/src/engine/core-modules/application/application-install/dtos/trigger-uninstall-application-job.input.ts
new file mode 100644
index 00000000000..d003510b11c
--- /dev/null
+++ b/packages/twenty-server/src/engine/core-modules/application/application-install/dtos/trigger-uninstall-application-job.input.ts
@@ -0,0 +1,11 @@
+import { Field, InputType } from '@nestjs/graphql';
+
+import { IsNotEmpty, IsString } from 'class-validator';
+
+@InputType('TriggerUninstallApplicationJobInput')
+export class TriggerUninstallApplicationJobInput {
+ @IsString()
+ @IsNotEmpty()
+ @Field()
+ universalIdentifier: string;
+}
diff --git a/packages/twenty-server/src/engine/core-modules/application/application-install/jobs/__tests__/trigger-install-application.job.spec.ts b/packages/twenty-server/src/engine/core-modules/application/application-install/jobs/__tests__/trigger-install-application.job.spec.ts
new file mode 100644
index 00000000000..1e15b9fe793
--- /dev/null
+++ b/packages/twenty-server/src/engine/core-modules/application/application-install/jobs/__tests__/trigger-install-application.job.spec.ts
@@ -0,0 +1,41 @@
+import type { ApplicationInstallService } from 'src/engine/core-modules/application/application-install/application-install.service';
+import {
+ TriggerInstallApplicationJob,
+ type TriggerInstallApplicationJobData,
+} from 'src/engine/core-modules/application/application-install/jobs/trigger-install-application.job';
+
+describe('TriggerInstallApplicationJob', () => {
+ const applicationInstallService = {
+ installApplication: jest.fn(),
+ } as unknown as ApplicationInstallService;
+
+ const job = new TriggerInstallApplicationJob(applicationInstallService);
+
+ const jobData: TriggerInstallApplicationJobData = {
+ applicationRegistrationId: 'application-registration-id',
+ workspaceId: 'workspace-id',
+ };
+
+ beforeEach(() => {
+ jest.clearAllMocks();
+ });
+
+ it('installs the requested application', async () => {
+ await job.handle(jobData);
+
+ expect(applicationInstallService.installApplication).toHaveBeenCalledWith({
+ appRegistrationId: jobData.applicationRegistrationId,
+ workspaceId: jobData.workspaceId,
+ });
+ });
+
+ it('propagates installation failures to the queue', async () => {
+ const error = new Error('Installation failed');
+
+ jest
+ .spyOn(applicationInstallService, 'installApplication')
+ .mockRejectedValueOnce(error);
+
+ await expect(job.handle(jobData)).rejects.toThrow(error);
+ });
+});
diff --git a/packages/twenty-server/src/engine/core-modules/application/application-install/jobs/__tests__/trigger-uninstall-application.job.spec.ts b/packages/twenty-server/src/engine/core-modules/application/application-install/jobs/__tests__/trigger-uninstall-application.job.spec.ts
new file mode 100644
index 00000000000..120c989ff89
--- /dev/null
+++ b/packages/twenty-server/src/engine/core-modules/application/application-install/jobs/__tests__/trigger-uninstall-application.job.spec.ts
@@ -0,0 +1,42 @@
+import type { ApplicationUninstallRunnerService } from 'src/engine/core-modules/application/application-install/services/application-uninstall-runner.service';
+import {
+ TriggerUninstallApplicationJob,
+ type TriggerUninstallApplicationJobData,
+} from 'src/engine/core-modules/application/application-install/jobs/trigger-uninstall-application.job';
+
+describe('TriggerUninstallApplicationJob', () => {
+ const applicationUninstallRunnerService = {
+ uninstallApplication: jest.fn(),
+ } as unknown as ApplicationUninstallRunnerService;
+
+ const job = new TriggerUninstallApplicationJob(
+ applicationUninstallRunnerService,
+ );
+
+ const jobData: TriggerUninstallApplicationJobData = {
+ universalIdentifier: 'application-universal-identifier',
+ workspaceId: 'workspace-id',
+ };
+
+ beforeEach(() => {
+ jest.clearAllMocks();
+ });
+
+ it('uninstalls the requested application', async () => {
+ await job.handle(jobData);
+
+ expect(
+ applicationUninstallRunnerService.uninstallApplication,
+ ).toHaveBeenCalledWith(jobData);
+ });
+
+ it('propagates uninstallation failures to the queue', async () => {
+ const error = new Error('Uninstallation failed');
+
+ jest
+ .spyOn(applicationUninstallRunnerService, 'uninstallApplication')
+ .mockRejectedValueOnce(error);
+
+ await expect(job.handle(jobData)).rejects.toThrow(error);
+ });
+});
diff --git a/packages/twenty-server/src/engine/core-modules/application/application-install/jobs/trigger-install-application.job.ts b/packages/twenty-server/src/engine/core-modules/application/application-install/jobs/trigger-install-application.job.ts
new file mode 100644
index 00000000000..21f56c84561
--- /dev/null
+++ b/packages/twenty-server/src/engine/core-modules/application/application-install/jobs/trigger-install-application.job.ts
@@ -0,0 +1,24 @@
+import { ApplicationInstallService } from 'src/engine/core-modules/application/application-install/application-install.service';
+import { Process } from 'src/engine/core-modules/message-queue/decorators/process.decorator';
+import { Processor } from 'src/engine/core-modules/message-queue/decorators/processor.decorator';
+import { MessageQueue } from 'src/engine/core-modules/message-queue/message-queue.constants';
+
+export type TriggerInstallApplicationJobData = {
+ applicationRegistrationId: string;
+ workspaceId: string;
+};
+
+@Processor(MessageQueue.workspaceQueue)
+export class TriggerInstallApplicationJob {
+ constructor(
+ private readonly applicationInstallService: ApplicationInstallService,
+ ) {}
+
+ @Process(TriggerInstallApplicationJob.name)
+ async handle(data: TriggerInstallApplicationJobData): Promise<void> {
+ await this.applicationInstallService.installApplication({
+ appRegistrationId: data.applicationRegistrationId,
+ workspaceId: data.workspaceId,
+ });
+ }
+}
diff --git a/packages/twenty-server/src/engine/core-modules/application/application-install/jobs/trigger-uninstall-application.job.ts b/packages/twenty-server/src/engine/core-modules/application/application-install/jobs/trigger-uninstall-application.job.ts
new file mode 100644
index 00000000000..b37dae59178
--- /dev/null
+++ b/packages/twenty-server/src/engine/core-modules/application/application-install/jobs/trigger-uninstall-application.job.ts
@@ -0,0 +1,21 @@
+import { ApplicationUninstallRunnerService } from 'src/engine/core-modules/application/application-install/services/application-uninstall-runner.service';
+import { Process } from 'src/engine/core-modules/message-queue/decorators/process.decorator';
+import { Processor } from 'src/engine/core-modules/message-queue/decorators/processor.decorator';
+import { MessageQueue } from 'src/engine/core-modules/message-queue/message-queue.constants';
+
+export type TriggerUninstallApplicationJobData = {
+ universalIdentifier: string;
+ workspaceId: string;
+};
+
+@Processor(MessageQueue.workspaceQueue)
+export class TriggerUninstallApplicationJob {
+ constructor(
+ private readonly applicationUninstallRunnerService: ApplicationUninstallRunnerService,
+ ) {}
+
+ @Process(TriggerUninstallApplicationJob.name)
+ async handle(data: TriggerUninstallApplicationJobData): Promise<void> {
+ await this.applicationUninstallRunnerService.uninstallApplication(data);
+ }
+}
diff --git a/packages/twenty-server/src/engine/core-modules/application/application-install/services/__tests__/application-lifecycle-job.service.spec.ts b/packages/twenty-server/src/engine/core-modules/application/application-install/services/__tests__/application-lifecycle-job.service.spec.ts
new file mode 100644
index 00000000000..cc01ddd9618
--- /dev/null
+++ b/packages/twenty-server/src/engine/core-modules/application/application-install/services/__tests__/application-lifecycle-job.service.spec.ts
@@ -0,0 +1,201 @@
+import { ApplicationLifecycleJobService } from 'src/engine/core-modules/application/application-install/services/application-lifecycle-job.service';
+import { TriggerInstallApplicationJob } from 'src/engine/core-modules/application/application-install/jobs/trigger-install-application.job';
+import { TriggerUninstallApplicationJob } from 'src/engine/core-modules/application/application-install/jobs/trigger-uninstall-application.job';
+import type { MarketplaceQueryService } from 'src/engine/core-modules/application/application-marketplace/marketplace-query.service';
+import type { ApplicationService } from 'src/engine/core-modules/application/application.service';
+import type { CacheLockService } from 'src/engine/core-modules/cache-lock/cache-lock.service';
+import { JobStateEnum } from 'src/engine/core-modules/message-queue/enums/job-state.enum';
+import type { MessageQueueService } from 'src/engine/core-modules/message-queue/services/message-queue.service';
+
+const WORKSPACE_ID = 'workspace-id';
+const UNIVERSAL_IDENTIFIER = 'application-universal-identifier';
+const SUFFIX = '5c98b035-5b09-4550-a4fb-b52056c494d1';
+const INSTALL_JOB_ID_PREFIX = `install-application.${WORKSPACE_ID}.${UNIVERSAL_IDENTIFIER}`;
+const UNINSTALL_JOB_ID_PREFIX = `uninstall-application.${WORKSPACE_ID}.${UNIVERSAL_IDENTIFIER}`;
+const INSTALL_JOB_ID = `${INSTALL_JOB_ID_PREFIX}-${SUFFIX}`;
+const UNINSTALL_JOB_ID = `${UNINSTALL_JOB_ID_PREFIX}-${SUFFIX}`;
+const BROADCAST_TO = { workspaceId: WORKSPACE_ID };
+
+describe('ApplicationLifecycleJobService', () => {
+ const applicationService = {
+ findOneApplicationOrThrow: jest.fn().mockResolvedValue({}),
+ } as unknown as ApplicationService;
+ const marketplaceQueryService = {
+ findRegistrationByUniversalIdentifier: jest
+ .fn()
+ .mockResolvedValue({ id: 'application-registration-id' }),
+ } as unknown as MarketplaceQueryService;
+ const workspaceQueueService = {
+ add: jest.fn(),
+ getJobs: jest.fn(),
+ getInFlightJobs: jest.fn(),
+ } as unknown as MessageQueueService;
+
+ const cacheLockService = {
+ withLock: jest.fn((fn: () => Promise<unknown>) => fn()),
+ } as unknown as CacheLockService;
+
+ const service = new ApplicationLifecycleJobService(
+ applicationService,
+ marketplaceQueryService,
+ cacheLockService,
+ workspaceQueueService,
+ );
+
+ const target = {
+ universalIdentifier: UNIVERSAL_IDENTIFIER,
+ workspaceId: WORKSPACE_ID,
+ };
+
+ beforeEach(() => {
+ jest.clearAllMocks();
+ jest.spyOn(workspaceQueueService, 'getInFlightJobs').mockResolvedValue([]);
+ jest.spyOn(workspaceQueueService, 'getJobs').mockResolvedValue({});
+ });
+
+ describe('triggerInstallApplicationJob', () => {
+ it('queues an installation deduplicated on the workspace and application prefix', async () => {
+ jest
+ .spyOn(workspaceQueueService, 'add')
+ .mockResolvedValue(INSTALL_JOB_ID);
+
+ const result = await service.triggerInstallApplicationJob(target);
+
+ expect(result).toEqual({ jobId: INSTALL_JOB_ID });
+ expect(cacheLockService.withLock).toHaveBeenCalledWith(
+ expect.any(Function),
+ `application-lifecycle-job:${WORKSPACE_ID}:${UNIVERSAL_IDENTIFIER}`,
+ );
+ expect(workspaceQueueService.add).toHaveBeenCalledWith(
+ TriggerInstallApplicationJob.name,
+ {
+ applicationRegistrationId: 'application-registration-id',
+ workspaceId: WORKSPACE_ID,
+ },
+ { id: INSTALL_JOB_ID_PREFIX, broadcastTo: BROADCAST_TO },
+ );
+ });
+
+ it('reports the already waiting installation when the queue skips the add', async () => {
+ jest.spyOn(workspaceQueueService, 'add').mockResolvedValue(undefined);
+ jest.spyOn(workspaceQueueService, 'getInFlightJobs').mockResolvedValue([
+ {
+ id: `install-application.${WORKSPACE_ID}.other-application`,
+ data: {},
+ },
+ { id: INSTALL_JOB_ID, data: {} },
+ ]);
+
+ expect(await service.triggerInstallApplicationJob(target)).toEqual({
+ jobId: INSTALL_JOB_ID,
+ });
+ });
+
+ it('refuses to queue an installation while an uninstallation is in flight', async () => {
+ jest
+ .spyOn(workspaceQueueService, 'getInFlightJobs')
+ .mockResolvedValue([{ id: UNINSTALL_JOB_ID, data: {} }]);
+
+ await expect(
+ service.triggerInstallApplicationJob(target),
+ ).rejects.toThrow(
+ `Cannot install application ${UNIVERSAL_IDENTIFIER} while its uninstall is in progress`,
+ );
+ expect(workspaceQueueService.add).not.toHaveBeenCalled();
+ });
+
+ it('fails when the queue skipped the add and no installation is in flight', async () => {
+ jest.spyOn(workspaceQueueService, 'add').mockResolvedValue(undefined);
+
+ await expect(
+ service.triggerInstallApplicationJob(target),
+ ).rejects.toThrow(
+ `Could not queue the install of application ${UNIVERSAL_IDENTIFIER}`,
+ );
+ });
+ });
+
+ describe('triggerUninstallApplicationJob', () => {
+ it('queues an uninstallation of an installed application', async () => {
+ jest
+ .spyOn(workspaceQueueService, 'add')
+ .mockResolvedValue(UNINSTALL_JOB_ID);
+
+ const result = await service.triggerUninstallApplicationJob(target);
+
+ expect(result).toEqual({ jobId: UNINSTALL_JOB_ID });
+ expect(applicationService.findOneApplicationOrThrow).toHaveBeenCalledWith(
+ target,
+ );
+ expect(workspaceQueueService.add).toHaveBeenCalledWith(
+ TriggerUninstallApplicationJob.name,
+ target,
+ { id: UNINSTALL_JOB_ID_PREFIX, broadcastTo: BROADCAST_TO },
+ );
+ });
+
+ it('refuses to queue an uninstallation while an installation is in flight', async () => {
+ jest
+ .spyOn(workspaceQueueService, 'getInFlightJobs')
+ .mockResolvedValue([{ id: INSTALL_JOB_ID, data: {} }]);
+
+ await expect(
+ service.triggerUninstallApplicationJob(target),
+ ).rejects.toThrow(
+ `Cannot uninstall application ${UNIVERSAL_IDENTIFIER} while its install is in progress`,
+ );
+ expect(workspaceQueueService.add).not.toHaveBeenCalled();
+ });
+
+ it('does not queue anything when the application is not installed', async () => {
+ jest
+ .spyOn(applicationService, 'findOneApplicationOrThrow')
+ .mockRejectedValueOnce(new Error('Application not found'));
+
+ await expect(
+ service.triggerUninstallApplicationJob(target),
+ ).rejects.toThrow('Application not found');
+ expect(workspaceQueueService.add).not.toHaveBeenCalled();
+ });
+ });
+
+ describe('job status', () => {
+ it('reads back the in-flight job of the requested operation only', async () => {
+ jest.spyOn(workspaceQueueService, 'getInFlightJobs').mockResolvedValue([
+ { id: INSTALL_JOB_ID, data: {} },
+ { id: UNINSTALL_JOB_ID, data: {} },
+ ]);
+ jest.spyOn(workspaceQueueService, 'getJobs').mockResolvedValue({
+ [UNINSTALL_JOB_ID]: {
+ id: UNINSTALL_JOB_ID,
+ data: {},
+ state: 'active',
+ attemptsMade: 1,
+ timestamp: 1,
+ },
+ } as never);
+
+ expect(await service.findUninstallApplicationJobStatus(target)).toEqual({
+ jobId: UNINSTALL_JOB_ID,
+ state: JobStateEnum.ACTIVE,
+ attemptsMade: 1,
+ failedReason: undefined,
+ enqueuedAt: 1,
+ startedAt: undefined,
+ finishedAt: undefined,
+ });
+ expect(workspaceQueueService.getJobs).toHaveBeenCalledWith([
+ UNINSTALL_JOB_ID,
+ ]);
+ });
+
+ it('returns no status when no job of the operation is in flight', async () => {
+ jest
+ .spyOn(workspaceQueueService, 'getInFlightJobs')
+ .mockResolvedValue([{ id: UNINSTALL_JOB_ID, data: {} }]);
+
+ expect(await service.findInstallApplicationJobStatus(target)).toBeNull();
+ expect(workspaceQueueService.getJobs).not.toHaveBeenCalled();
+ });
+ });
+});
diff --git a/packages/twenty-server/src/engine/core-modules/application/application-install/services/__tests__/application-uninstall-runner.service.spec.ts b/packages/twenty-server/src/engine/core-modules/application/application-install/services/__tests__/application-uninstall-runner.service.spec.ts
new file mode 100644
index 00000000000..9275010b3ea
--- /dev/null
+++ b/packages/twenty-server/src/engine/core-modules/application/application-install/services/__tests__/application-uninstall-runner.service.spec.ts
@@ -0,0 +1,107 @@
+import type { ApplicationSyncService } from 'src/engine/core-modules/application/application-manifest/application-sync.service';
+import {
+ ApplicationException,
+ ApplicationExceptionCode,
+} from 'src/engine/core-modules/application/application.exception';
+import type { ApplicationService } from 'src/engine/core-modules/application/application.service';
+import { ApplicationUninstallRunnerService } from 'src/engine/core-modules/application/application-install/services/application-uninstall-runner.service';
+import type { CacheLockService } from 'src/engine/core-modules/cache-lock/cache-lock.service';
+import type { MetricsService } from 'src/engine/core-modules/metrics/metrics.service';
+import { MetricsKeys } from 'src/engine/core-modules/metrics/types/metrics-keys.type';
+
+describe('ApplicationUninstallRunnerService', () => {
+ const applicationService = {
+ findByUniversalIdentifier: jest.fn().mockResolvedValue({
+ name: 'Slack',
+ sourceType: 'NPM',
+ version: '1.2.0',
+ }),
+ } as unknown as ApplicationService;
+ const applicationSyncService = {
+ uninstallApplication: jest.fn(),
+ } as unknown as ApplicationSyncService;
+ const metricsService = {
+ incrementCounterBy: jest.fn(),
+ } as unknown as MetricsService;
+ const cacheLockService = {
+ withLock: jest.fn((fn: () => Promise<unknown>) => fn()),
+ } as unknown as CacheLockService;
+
+ const service = new ApplicationUninstallRunnerService(
+ applicationService,
+ applicationSyncService,
+ metricsService,
+ cacheLockService,
+ );
+
+ const target = {
+ universalIdentifier: 'application-universal-identifier',
+ workspaceId: 'workspace-id',
+ };
+
+ beforeEach(() => {
+ jest.clearAllMocks();
+ });
+
+ it('counts a lock acquisition failure as a failed uninstall', async () => {
+ jest
+ .spyOn(cacheLockService, 'withLock')
+ .mockRejectedValueOnce(new Error('Failed to acquire lock'));
+
+ await expect(service.uninstallApplication(target)).rejects.toThrow(
+ 'Failed to acquire lock',
+ );
+ expect(applicationSyncService.uninstallApplication).not.toHaveBeenCalled();
+ expect(metricsService.incrementCounterBy).toHaveBeenCalledWith(
+ expect.objectContaining({
+ key: MetricsKeys.AppUninstallFailed,
+ attributes: expect.objectContaining({ error_code: 'UNKNOWN' }),
+ }),
+ );
+ });
+
+ it('uninstalls the application under the lifecycle lock and counts the success', async () => {
+ await service.uninstallApplication(target);
+
+ expect(cacheLockService.withLock).toHaveBeenCalledWith(
+ expect.any(Function),
+ `application-lifecycle:${target.workspaceId}:${target.universalIdentifier}`,
+ { ttl: 60_000, ms: 500, maxRetries: 120 },
+ );
+ expect(applicationSyncService.uninstallApplication).toHaveBeenCalledWith({
+ applicationUniversalIdentifier: target.universalIdentifier,
+ workspaceId: target.workspaceId,
+ });
+ expect(metricsService.incrementCounterBy).toHaveBeenCalledWith({
+ key: MetricsKeys.AppUninstallSucceeded,
+ amount: 1,
+ attributes: {
+ universal_identifier: target.universalIdentifier,
+ app_name: 'Slack',
+ source_type: 'NPM',
+ version: '1.2.0',
+ },
+ });
+ });
+
+ it('counts the failure with its code and rethrows', async () => {
+ const error = new ApplicationException(
+ 'This application cannot be uninstalled.',
+ ApplicationExceptionCode.FORBIDDEN,
+ );
+
+ jest
+ .spyOn(applicationSyncService, 'uninstallApplication')
+ .mockRejectedValueOnce(error);
+
+ await expect(service.uninstallApplication(target)).rejects.toBe(error);
+ expect(metricsService.incrementCounterBy).toHaveBeenCalledWith(
+ expect.objectContaining({
+ key: MetricsKeys.AppUninstallFailed,
+ attributes: expect.objectContaining({
+ error_code: ApplicationExceptionCode.FORBIDDEN,
+ }),
+ }),
+ );
+ });
+});
diff --git a/packages/twenty-server/src/engine/core-modules/application/application-install/services/application-lifecycle-job.service.ts b/packages/twenty-server/src/engine/core-modules/application/application-install/services/application-lifecycle-job.service.ts
new file mode 100644
index 00000000000..4a787b62e22
--- /dev/null
+++ b/packages/twenty-server/src/engine/core-modules/application/application-install/services/application-lifecycle-job.service.ts
@@ -0,0 +1,217 @@
+import { Injectable } from '@nestjs/common';
+
+import { msg } from '@lingui/core/macro';
+import { isDefined } from 'twenty-shared/utils';
+
+import {
+ type ApplicationLifecycleOperation,
+ buildApplicationLifecycleJobId,
+} from 'src/engine/core-modules/application/application-install/utils/build-application-lifecycle-job-id.util';
+import {
+ TriggerInstallApplicationJob,
+ type TriggerInstallApplicationJobData,
+} from 'src/engine/core-modules/application/application-install/jobs/trigger-install-application.job';
+import {
+ TriggerUninstallApplicationJob,
+ type TriggerUninstallApplicationJobData,
+} from 'src/engine/core-modules/application/application-install/jobs/trigger-uninstall-application.job';
+import { MarketplaceQueryService } from 'src/engine/core-modules/application/application-marketplace/marketplace-query.service';
+import {
+ ApplicationException,
+ ApplicationExceptionCode,
+} from 'src/engine/core-modules/application/application.exception';
+import { ApplicationService } from 'src/engine/core-modules/application/application.service';
+import { CacheLockService } from 'src/engine/core-modules/cache-lock/cache-lock.service';
+import { type JobStatusDTO } from 'src/engine/core-modules/message-queue/dtos/job-status.dto';
+import { InjectMessageQueue } from 'src/engine/core-modules/message-queue/decorators/message-queue.decorator';
+import { type MessageQueueJobData } from 'src/engine/core-modules/message-queue/interfaces/message-queue-job.interface';
+import { MessageQueue } from 'src/engine/core-modules/message-queue/message-queue.constants';
+import { MessageQueueService } from 'src/engine/core-modules/message-queue/services/message-queue.service';
+import { buildJobStatus } from 'src/engine/core-modules/message-queue/utils/build-job-status.util';
+import { getQueueJobIdPrefix } from 'src/engine/core-modules/message-queue/utils/get-queue-job-id-prefix.util';
+
+type LifecycleJobTarget = {
+ universalIdentifier: string;
+ workspaceId: string;
+};
+
+const CONFLICTING_OPERATION: Record<
+ ApplicationLifecycleOperation,
+ ApplicationLifecycleOperation
+> = {
+ install: 'uninstall',
+ uninstall: 'install',
+};
+
+@Injectable()
+export class ApplicationLifecycleJobService {
+ constructor(
+ private readonly applicationService: ApplicationService,
+ private readonly marketplaceQueryService: MarketplaceQueryService,
+ private readonly cacheLockService: CacheLockService,
+ @InjectMessageQueue(MessageQueue.workspaceQueue)
+ private readonly workspaceQueueService: MessageQueueService,
+ ) {}
+
+ async triggerInstallApplicationJob({
+ universalIdentifier,
+ workspaceId,
+ }: LifecycleJobTarget): Promise<{ jobId: string }> {
+ const registration =
+ await this.marketplaceQueryService.findRegistrationByUniversalIdentifier(
+ universalIdentifier,
+ );
+
+ return this.triggerLifecycleJob<TriggerInstallApplicationJobData>({
+ operation: 'install',
+ jobName: TriggerInstallApplicationJob.name,
+ data: { applicationRegistrationId: registration.id, workspaceId },
+ universalIdentifier,
+ workspaceId,
+ });
+ }
+
+ async triggerUninstallApplicationJob({
+ universalIdentifier,
+ workspaceId,
+ }: LifecycleJobTarget): Promise<{ jobId: string }> {
+ await this.applicationService.findOneApplicationOrThrow({
+ universalIdentifier,
+ workspaceId,
+ });
+
+ return this.triggerLifecycleJob<TriggerUninstallApplicationJobData>({
+ operation: 'uninstall',
+ jobName: TriggerUninstallApplicationJob.name,
+ data: { universalIdentifier, workspaceId },
+ universalIdentifier,
+ workspaceId,
+ });
+ }
+
+ findInstallApplicationJobStatus(
+ target: LifecycleJobTarget,
+ ): Promise<JobStatusDTO | null> {
+ return this.findLifecycleJobStatus({ operation: 'install', ...target });
+ }
+
+ findUninstallApplicationJobStatus(
+ target: LifecycleJobTarget,
+ ): Promise<JobStatusDTO | null> {
+ return this.findLifecycleJobStatus({ operation: 'uninstall', ...target });
+ }
+
+ private triggerLifecycleJob<TData extends MessageQueueJobData>({
+ operation,
+ jobName,
+ data,
+ universalIdentifier,
+ workspaceId,
+ }: LifecycleJobTarget & {
+ operation: ApplicationLifecycleOperation;
+ jobName: string;
+ data: TData;
+ }): Promise<{ jobId: string }> {
+ return this.cacheLockService.withLock(
+ () =>
+ this.enqueueLifecycleJob({
+ operation,
+ jobName,
+ data,
+ universalIdentifier,
+ workspaceId,
+ }),
+ `application-lifecycle-job:${workspaceId}:${universalIdentifier}`,
+ );
+ }
+
+ private async enqueueLifecycleJob<TData extends MessageQueueJobData>({
+ operation,
+ jobName,
+ data,
+ universalIdentifier,
+ workspaceId,
+ }: LifecycleJobTarget & {
+ operation: ApplicationLifecycleOperation;
+ jobName: string;
+ data: TData;
+ }): Promise<{ jobId: string }> {
+ const conflictingOperation = CONFLICTING_OPERATION[operation];
+ const conflictingJobId = await this.findInFlightJobId(
+ buildApplicationLifecycleJobId({
+ operation: conflictingOperation,
+ workspaceId,
+ universalIdentifier,
+ }),
+ );
+
+ if (isDefined(conflictingJobId)) {
+ throw new ApplicationException(
+ `Cannot ${operation} application ${universalIdentifier} while its ${conflictingOperation} is in progress`,
+ ApplicationExceptionCode.INVALID_INPUT,
+ {
+ userFriendlyMessage:
+ operation === 'install'
+ ? msg`This application is being uninstalled. Please wait for it to finish before installing it again.`
+ : msg`This application is being installed. Please wait for it to finish before uninstalling it.`,
+ },
+ );
+ }
+
+ const jobIdPrefix = buildApplicationLifecycleJobId({
+ operation,
+ workspaceId,
+ universalIdentifier,
+ });
+
+ const jobId =
+ (await this.workspaceQueueService.add<TData>(jobName, data, {
+ id: jobIdPrefix,
+ broadcastTo: { workspaceId },
+ })) ?? (await this.findInFlightJobId(jobIdPrefix));
+
+ if (!isDefined(jobId)) {
+ throw new ApplicationException(
+ `Could not queue the ${operation} of application ${universalIdentifier}`,
+ ApplicationExceptionCode.APPLICATION_INSTALLATION_FAILED,
+ );
+ }
+
+ return { jobId };
+ }
+
+ private async findLifecycleJobStatus({
+ operation,
+ universalIdentifier,
+ workspaceId,
+ }: LifecycleJobTarget & {
+ operation: ApplicationLifecycleOperation;
+ }): Promise<JobStatusDTO | null> {
+ const jobId = await this.findInFlightJobId(
+ buildApplicationLifecycleJobId({
+ operation,
+ workspaceId,
+ universalIdentifier,
+ }),
+ );
+
+ if (!isDefined(jobId)) {
+ return null;
+ }
+
+ const job = (await this.workspaceQueueService.getJobs([jobId]))[jobId];
+
+ return isDefined(job) ? buildJobStatus({ jobId, job }) : null;
+ }
+
+ private async findInFlightJobId(
+ jobIdPrefix: string,
+ ): Promise<string | undefined> {
+ const inFlightJobs = await this.workspaceQueueService.getInFlightJobs();
+
+ return inFlightJobs
+ .map((job) => job.id)
+ .filter(isDefined)
+ .find((jobId) => getQueueJobIdPrefix(jobId) === jobIdPrefix);
+ }
+}
diff --git a/packages/twenty-server/src/engine/core-modules/application/application-install/services/application-uninstall-runner.service.ts b/packages/twenty-server/src/engine/core-modules/application/application-install/services/application-uninstall-runner.service.ts
new file mode 100644
index 00000000000..a30ce22894b
--- /dev/null
+++ b/packages/twenty-server/src/engine/core-modules/application/application-install/services/application-uninstall-runner.service.ts
@@ -0,0 +1,84 @@
+import { Injectable } from '@nestjs/common';
+
+import { ApplicationSyncService } from 'src/engine/core-modules/application/application-manifest/application-sync.service';
+import { ApplicationException } from 'src/engine/core-modules/application/application.exception';
+import { ApplicationService } from 'src/engine/core-modules/application/application.service';
+import { type ApplicationEntity } from 'src/engine/core-modules/application/application.entity';
+import { APPLICATION_LIFECYCLE_LOCK_OPTIONS } from 'src/engine/core-modules/application/application-install/constants/application-lifecycle-lock-options.constant';
+import { buildApplicationLifecycleLockKey } from 'src/engine/core-modules/application/application-install/utils/build-application-lifecycle-lock-key.util';
+import { CacheLockService } from 'src/engine/core-modules/cache-lock/cache-lock.service';
+import { MetricsService } from 'src/engine/core-modules/metrics/metrics.service';
+import { MetricsKeys } from 'src/engine/core-modules/metrics/types/metrics-keys.type';
+
+@Injectable()
+export class ApplicationUninstallRunnerService {
+ constructor(
+ private readonly applicationService: ApplicationService,
+ private readonly applicationSyncService: ApplicationSyncService,
+ private readonly metricsService: MetricsService,
+ private readonly cacheLockService: CacheLockService,
+ ) {}
+
+ async uninstallApplication({
+ universalIdentifier,
+ workspaceId,
+ }: {
+ universalIdentifier: string;
+ workspaceId: string;
+ }): Promise<void> {
+ let application: ApplicationEntity | null = null;
+
+ try {
+ application = await this.applicationService.findByUniversalIdentifier({
+ universalIdentifier,
+ workspaceId,
+ });
+
+ await this.cacheLockService.withLock(
+ () =>
+ this.applicationSyncService.uninstallApplication({
+ applicationUniversalIdentifier: universalIdentifier,
+ workspaceId,
+ }),
+ buildApplicationLifecycleLockKey({ workspaceId, universalIdentifier }),
+ APPLICATION_LIFECYCLE_LOCK_OPTIONS,
+ );
+ } catch (error) {
+ this.metricsService.incrementCounterBy({
+ key: MetricsKeys.AppUninstallFailed,
+ amount: 1,
+ attributes: {
+ ...this.buildMetricsAttributes({ universalIdentifier, application }),
+ error_code:
+ error instanceof ApplicationException ? error.code : 'UNKNOWN',
+ },
+ });
+
+ throw error;
+ }
+
+ this.metricsService.incrementCounterBy({
+ key: MetricsKeys.AppUninstallSucceeded,
+ amount: 1,
+ attributes: this.buildMetricsAttributes({
+ universalIdentifier,
+ application,
+ }),
+ });
+ }
+
+ private buildMetricsAttributes({
+ universalIdentifier,
+ application,
+ }: {
+ universalIdentifier: string;
+ application: ApplicationEntity | null;
+ }) {
+ return {
+ universal_identifier: universalIdentifier,
+ app_name: application?.name ?? 'unknown',
+ source_type: application?.sourceType ?? 'unknown',
+ version: application?.version ?? 'unknown',
+ };
+ }
+}
diff --git a/packages/twenty-server/src/engine/core-modules/application/application-install/utils/build-application-lifecycle-job-id.util.ts b/packages/twenty-server/src/engine/core-modules/application/application-install/utils/build-application-lifecycle-job-id.util.ts
new file mode 100644
index 00000000000..c5f5e0bf00d
--- /dev/null
+++ b/packages/twenty-server/src/engine/core-modules/application/application-install/utils/build-application-lifecycle-job-id.util.ts
@@ -0,0 +1,11 @@
+export type ApplicationLifecycleOperation = 'install' | 'uninstall';
+
+export const buildApplicationLifecycleJobId = ({
+ operation,
+ workspaceId,
+ universalIdentifier,
+}: {
+ operation: ApplicationLifecycleOperation;
+ workspaceId: string;
+ universalIdentifier: string;
+}): string => `${operation}-application.${workspaceId}.${universalIdentifier}`;
diff --git a/packages/twenty-server/src/engine/core-modules/application/application-install/utils/build-application-lifecycle-lock-key.util.ts b/packages/twenty-server/src/engine/core-modules/application/application-install/utils/build-application-lifecycle-lock-key.util.ts
new file mode 100644
index 00000000000..6cf54effa91
--- /dev/null
+++ b/packages/twenty-server/src/engine/core-modules/application/application-install/utils/build-application-lifecycle-lock-key.util.ts
@@ -0,0 +1,7 @@
+export const buildApplicationLifecycleLockKey = ({
+ workspaceId,
+ universalIdentifier,
+}: {
+ workspaceId: string;
+ universalIdentifier: string;
+}): string => `application-lifecycle:${workspaceId}:${universalIdentifier}`;
diff --git a/packages/twenty-server/src/engine/core-modules/application/application-job/services/application-job.service.ts b/packages/twenty-server/src/engine/core-modules/application/application-job/services/application-job.service.ts
index 7a229f67182..52031d49b68 100644
--- a/packages/twenty-server/src/engine/core-modules/application/application-job/services/application-job.service.ts
+++ b/packages/twenty-server/src/engine/core-modules/application/application-job/services/application-job.service.ts
@@ -8,7 +8,7 @@ import {
import { isDefined } from 'twenty-shared/utils';
import { v4 } from 'uuid';
-import { bullMQToJobStateEnum } from 'src/engine/core-modules/message-queue/enums/job-state.enum';
+import { buildJobStatus } from 'src/engine/core-modules/message-queue/utils/build-job-status.util';
import { ENQUEUE_JOB_DEFAULT_RETRY_LIMIT } from 'src/engine/core-modules/application/application-job/constants/enqueue-job-default-retry-limit.constant';
import { ENQUEUE_JOB_PRIORITY } from 'src/engine/core-modules/application/application-job/constants/enqueue-job-priority.constant';
import { MAX_JOBS_PER_STATUS_READ } from 'src/engine/core-modules/application/application-job/constants/max-jobs-per-status-read.constant';
@@ -163,17 +163,7 @@ export class ApplicationJobService {
return [];
}
- return [
- {
- jobId,
- state: bullMQToJobStateEnum[job.state],
- attemptsMade: job.attemptsMade,
- failedReason: job.failedReason,
- enqueuedAt: job.timestamp,
- startedAt: job.processedOn,
- finishedAt: job.finishedOn,
- },
- ];
+ return [buildJobStatus({ jobId, job })];
});
}
diff --git a/packages/twenty-server/src/engine/core-modules/application/application-manifest/application-manifest-apply.service.ts b/packages/twenty-server/src/engine/core-modules/application/application-manifest/application-manifest-apply.service.ts
index 58746af06bb..548dd44fdf0 100644
--- a/packages/twenty-server/src/engine/core-modules/application/application-manifest/application-manifest-apply.service.ts
+++ b/packages/twenty-server/src/engine/core-modules/application/application-manifest/application-manifest-apply.service.ts
@@ -27,6 +27,7 @@ export class ApplicationManifestApplyService {
application,
forceSdkClientGeneration = false,
inferDeletionFromMissingEntities = true,
+ persistVersion,
}: {
workspaceId: string;
manifest: Manifest;
@@ -40,6 +41,7 @@ export class ApplicationManifestApplyService {
// up SDK-level changes; dev sync relies on first-apply/schema-change to
// avoid regenerating on every save.
forceSdkClientGeneration?: boolean;
+ persistVersion?: boolean;
}): Promise<{
workspaceMigration: WorkspaceMigration;
hasSchemaMetadataChanged: boolean;
@@ -55,6 +57,7 @@ export class ApplicationManifestApplyService {
manifest,
applicationRegistrationId,
inferDeletionFromMissingEntities,
+ persistVersion,
});
if (forceSdkClientGeneration || isFirstApply || hasSchemaMetadataChanged) {
diff --git a/packages/twenty-server/src/engine/core-modules/application/application-manifest/application-sync.service.ts b/packages/twenty-server/src/engine/core-modules/application/application-manifest/application-sync.service.ts
index 4cf071058f9..49fbdb1e26f 100644
--- a/packages/twenty-server/src/engine/core-modules/application/application-manifest/application-sync.service.ts
+++ b/packages/twenty-server/src/engine/core-modules/application/application-manifest/application-sync.service.ts
@@ -62,12 +62,14 @@ export class ApplicationSyncService {
applicationRegistrationId,
dryRun = false,
inferDeletionFromMissingEntities = true,
+ persistVersion = true,
}: {
workspaceId: string;
manifest: Manifest;
applicationRegistrationId?: string;
dryRun?: boolean;
inferDeletionFromMissingEntities?: boolean;
+ persistVersion?: boolean;
}): Promise<{
workspaceMigration: WorkspaceMigration;
hasSchemaMetadataChanged: boolean;
@@ -78,6 +80,7 @@ export class ApplicationSyncService {
workspaceId,
manifest,
applicationRegistrationId,
+ persistVersion,
});
let syncResult: {
@@ -212,6 +215,7 @@ export class ApplicationSyncService {
workspaceId,
manifest,
applicationRegistrationId,
+ persistVersion: false,
});
const ownerFlatApplication: FlatApplication = application;
@@ -231,10 +235,12 @@ export class ApplicationSyncService {
workspaceId,
manifest,
applicationRegistrationId,
+ persistVersion,
}: {
workspaceId: string;
manifest: Manifest;
applicationRegistrationId?: string;
+ persistVersion: boolean;
}): Promise<ApplicationEntity> {
const name = manifest.application.displayName;
const packageJson = JSON.parse(
@@ -273,7 +279,7 @@ export class ApplicationSyncService {
name,
description: manifest.application.description,
logo: manifest.application.logo ?? manifest.application.logoUrl ?? null,
- version: packageJson.version,
+ ...(persistVersion ? { version: packageJson.version } : {}),
packageJsonChecksum: manifest.application.packageJsonChecksum,
yarnLockChecksum: manifest.application.yarnLockChecksum,
billing: manifest.application.billing ?? {},
@@ -356,34 +362,12 @@ export class ApplicationSyncService {
);
}
- const shouldTransitionState =
- application.state === ApplicationState.INSTALLED;
-
- try {
- if (shouldTransitionState) {
- await this.applicationService.update(application.id, {
- state: ApplicationState.UNINSTALLING,
- workspaceId,
- });
- }
-
- return await this.runUninstall({
- application,
- workspaceId,
- applicationUniversalIdentifier,
- shouldRunUninstallHook,
- });
- } catch (error) {
- if (shouldTransitionState) {
- await this.applicationService.revertStateToInstalledBestEffort({
- applicationId: application.id,
- universalIdentifier: applicationUniversalIdentifier,
- workspaceId,
- });
- }
-
- throw error;
- }
+ return await this.runUninstall({
+ application,
+ workspaceId,
+ applicationUniversalIdentifier,
+ shouldRunUninstallHook,
+ });
}
private async runUninstall({
diff --git a/packages/twenty-server/src/engine/core-modules/application/application.service.ts b/packages/twenty-server/src/engine/core-modules/application/application.service.ts
index c426ebbe520..eab3acb47f0 100644
--- a/packages/twenty-server/src/engine/core-modules/application/application.service.ts
+++ b/packages/twenty-server/src/engine/core-modules/application/application.service.ts
@@ -17,7 +17,6 @@ import {
ApplicationExceptionCode,
} from 'src/engine/core-modules/application/application.exception';
import { WORKSPACE_CUSTOM_APPLICATION_NAME } from 'src/engine/core-modules/application/constants/workspace-custom-application.constant';
-import { ApplicationState } from 'src/engine/core-modules/application/enums/application-state.enum';
import { type FlatApplication } from 'src/engine/core-modules/application/types/flat-application.type';
import { FileStorageService } from 'src/engine/core-modules/file-storage/services/file-storage.service';
import { WorkspaceEntity } from 'src/engine/core-modules/workspace/workspace.entity';
@@ -681,27 +680,6 @@ export class ApplicationService {
return updatedApplication;
}
- async revertStateToInstalledBestEffort({
- applicationId,
- universalIdentifier,
- workspaceId,
- }: {
- applicationId: string;
- universalIdentifier: string;
- workspaceId: string;
- }): Promise<void> {
- try {
- await this.update(applicationId, {
- state: ApplicationState.INSTALLED,
- workspaceId,
- });
- } catch (error) {
- this.logger.warn(
- `State revert to INSTALLED did not complete for application ${universalIdentifier} in workspace ${workspaceId}, the row may or may not have been updated: ${error instanceof Error ? error.message : String(error)}`,
- );
- }
- }
-
async delete(universalIdentifier: string, workspaceId: string) {
const application = await this.findByUniversalIdentifier({
universalIdentifier,
diff --git a/packages/twenty-server/src/engine/core-modules/application/dtos/application.dto.ts b/packages/twenty-server/src/engine/core-modules/application/dtos/application.dto.ts
index 0f9ad175000..b5d3d56664b 100644
--- a/packages/twenty-server/src/engine/core-modules/application/dtos/application.dto.ts
+++ b/packages/twenty-server/src/engine/core-modules/application/dtos/application.dto.ts
@@ -12,7 +12,6 @@ import GraphQLJSON from 'graphql-type-json';
import { UUIDScalarType } from 'src/engine/api/graphql/workspace-schema-builder/graphql-types/scalars';
import { ApplicationRegistrationSummaryDTO } from 'src/engine/core-modules/application/application-registration/dtos/application-registration-summary.dto';
import { ApplicationVariableEntityDTO } from 'src/engine/core-modules/application/application-variable/dtos/application-variable.dto';
-import { ApplicationState } from 'src/engine/core-modules/application/enums/application-state.enum';
import { AgentDTO } from 'src/engine/metadata-modules/ai/ai-agent/dtos/agent.dto';
import { CommandMenuItemDTO } from 'src/engine/metadata-modules/command-menu-item/dtos/command-menu-item.dto';
import { FrontComponentDTO } from 'src/engine/metadata-modules/front-component/dtos/front-component.dto';
@@ -56,9 +55,6 @@ export class ApplicationDTO {
@Field()
universalIdentifier: string;
- @Field(() => ApplicationState)
- state: ApplicationState;
-
@IsOptional()
@IsString()
@Field({ nullable: true })
diff --git a/packages/twenty-server/src/engine/core-modules/application/enums/application-state.enum.ts b/packages/twenty-server/src/engine/core-modules/application/enums/application-state.enum.ts
index c694604e93c..22ae2267c74 100644
--- a/packages/twenty-server/src/engine/core-modules/application/enums/application-state.enum.ts
+++ b/packages/twenty-server/src/engine/core-modules/application/enums/application-state.enum.ts
@@ -1,12 +1,6 @@
-import { registerEnumType } from '@nestjs/graphql';
-
export enum ApplicationState {
INSTALLING = 'INSTALLING',
INSTALLED = 'INSTALLED',
UPGRADING = 'UPGRADING',
UNINSTALLING = 'UNINSTALLING',
}
-
-registerEnumType(ApplicationState, {
- name: 'ApplicationState',
-});
diff --git a/packages/twenty-server/src/engine/core-modules/application/utils/__tests__/serialize-application-for-broadcast.util.spec.ts b/packages/twenty-server/src/engine/core-modules/application/utils/__tests__/serialize-application-for-broadcast.util.spec.ts
index afb1ff3a7a8..fe502ff886e 100644
--- a/packages/twenty-server/src/engine/core-modules/application/utils/__tests__/serialize-application-for-broadcast.util.spec.ts
+++ b/packages/twenty-server/src/engine/core-modules/application/utils/__tests__/serialize-application-for-broadcast.util.spec.ts
@@ -1,4 +1,3 @@
-import { ApplicationState } from 'src/engine/core-modules/application/enums/application-state.enum';
import { serializeApplicationForBroadcast } from 'src/engine/core-modules/application/utils/serialize-application-for-broadcast.util';
type SerializableApplication = Parameters<
@@ -13,7 +12,6 @@ const buildApplication = (
name: 'Test application',
description: 'A test application',
version: '1.0.0',
- state: ApplicationState.INSTALLING,
applicationRegistrationId: 'ce4b7b8e-9e5b-4b7c-bd7a-5f2f61f0a9d2',
sdkClientCoreChecksum: 'checksum',
...overrides,
@@ -27,7 +25,6 @@ describe('serializeApplicationForBroadcast', () => {
name: 'Test application',
description: 'A test application',
version: '1.0.0',
- state: ApplicationState.INSTALLING,
applicationRegistrationId: 'ce4b7b8e-9e5b-4b7c-bd7a-5f2f61f0a9d2',
sdkClientCoreChecksum: 'checksum',
});
diff --git a/packages/twenty-server/src/engine/core-modules/application/utils/from-flat-application-to-application-dto.util.ts b/packages/twenty-server/src/engine/core-modules/application/utils/from-flat-application-to-application-dto.util.ts
index fb1b72bbb74..21b5db023b0 100644
--- a/packages/twenty-server/src/engine/core-modules/application/utils/from-flat-application-to-application-dto.util.ts
+++ b/packages/twenty-server/src/engine/core-modules/application/utils/from-flat-application-to-application-dto.util.ts
@@ -1,5 +1,4 @@
import { type ApplicationDTO } from 'src/engine/core-modules/application/dtos/application.dto';
-import { ApplicationState } from 'src/engine/core-modules/application/enums/application-state.enum';
import { type FlatApplication } from 'src/engine/core-modules/application/types/flat-application.type';
export const fromFlatApplicationToApplicationDto = ({
@@ -16,7 +15,6 @@ export const fromFlatApplicationToApplicationDto = ({
availablePackages,
universalIdentifier,
version,
- state,
settingsCustomTabFrontComponentId,
}: FlatApplication): ApplicationDTO => {
return {
@@ -34,7 +32,6 @@ export const fromFlatApplicationToApplicationDto = ({
availablePackages: availablePackages ?? {},
universalIdentifier,
version: version ?? undefined,
- state: state ?? ApplicationState.INSTALLED,
settingsCustomTabFrontComponentId:
settingsCustomTabFrontComponentId ?? undefined,
};
diff --git a/packages/twenty-server/src/engine/core-modules/application/utils/serialize-application-for-broadcast.util.ts b/packages/twenty-server/src/engine/core-modules/application/utils/serialize-application-for-broadcast.util.ts
index 59004f81500..e6c7be41ebf 100644
--- a/packages/twenty-server/src/engine/core-modules/application/utils/serialize-application-for-broadcast.util.ts
+++ b/packages/twenty-server/src/engine/core-modules/application/utils/serialize-application-for-broadcast.util.ts
@@ -7,7 +7,6 @@ type SerializableApplication = Pick<
| 'name'
| 'description'
| 'version'
- | 'state'
| 'applicationRegistrationId'
| 'sdkClientCoreChecksum'
>;
@@ -20,7 +19,6 @@ export const serializeApplicationForBroadcast = (
name: application.name,
description: application.description ?? null,
version: application.version ?? null,
- state: application.state,
applicationRegistrationId: application.applicationRegistrationId ?? null,
sdkClientCoreChecksum: application.sdkClientCoreChecksum ?? null,
});
diff --git a/packages/twenty-server/src/engine/core-modules/message-queue/drivers/__tests__/bullmq.driver.spec.ts b/packages/twenty-server/src/engine/core-modules/message-queue/drivers/__tests__/bullmq.driver.spec.ts
new file mode 100644
index 00000000000..11be5aa0102
--- /dev/null
+++ b/packages/twenty-server/src/engine/core-modules/message-queue/drivers/__tests__/bullmq.driver.spec.ts
@@ -0,0 +1,130 @@
+import { BullMQDriver } from 'src/engine/core-modules/message-queue/drivers/bullmq.driver';
+import { MessageQueue } from 'src/engine/core-modules/message-queue/message-queue.constants';
+
+const mockGetJobs = jest.fn();
+const mockAdd = jest.fn();
+const mockAddBulk = jest.fn();
+
+jest.mock('bullmq', () => ({
+ Queue: jest.fn().mockImplementation(() => ({
+ getJobs: mockGetJobs,
+ add: mockAdd,
+ addBulk: mockAddBulk,
+ })),
+ Worker: jest.fn(),
+ MetricsTime: { ONE_WEEK: 1 },
+}));
+
+jest.mock('uuid', () => ({ v4: () => 'generated-uuid-000000000000000000000' }));
+
+const WAITING_JOB_ID = 'sync-catalog-ws-1-5c98b035-5b09-4550-a4fb-b52056c494d1';
+
+describe('BullMQDriver deduplication', () => {
+ const driver = new BullMQDriver(
+ {} as never,
+ {} as never,
+ {} as never,
+ {} as never,
+ );
+
+ driver.register(MessageQueue.workspaceQueue);
+
+ beforeEach(() => {
+ jest.clearAllMocks();
+ mockGetJobs.mockResolvedValue([{ id: WAITING_JOB_ID }]);
+ mockAdd.mockImplementation(async (_name, _data, opts) => ({
+ id: opts.jobId,
+ }));
+ mockAddBulk.mockImplementation(async (jobs) =>
+ jobs.map((job: { opts: { jobId?: string } }, index: number) => ({
+ id: job.opts.jobId ?? `auto-${index}`,
+ })),
+ );
+ });
+
+ describe('add', () => {
+ it('skips a job whose id prefix is already waiting', async () => {
+ const jobId = await driver.add(
+ MessageQueue.workspaceQueue,
+ 'job',
+ {},
+ { id: 'sync-catalog-ws-1' },
+ );
+
+ expect(jobId).toBeUndefined();
+ expect(mockAdd).not.toHaveBeenCalled();
+ });
+
+ it('suffixes the id so a finished job never blocks the next one', async () => {
+ const jobId = await driver.add(
+ MessageQueue.workspaceQueue,
+ 'job',
+ {},
+ { id: 'install-application-ws-1-app-1' },
+ );
+
+ expect(jobId).toBe(
+ 'install-application-ws-1-app-1-generated-uuid-000000000000000000000',
+ );
+ });
+ });
+
+ describe('bulkAdd', () => {
+ it('does not read the waiting jobs when no job carries an id', async () => {
+ await driver.bulkAdd(MessageQueue.workspaceQueue, 'job', [
+ { data: {} },
+ { data: {} },
+ ]);
+
+ expect(mockGetJobs).not.toHaveBeenCalled();
+ expect(mockAddBulk).toHaveBeenCalledTimes(1);
+ expect(mockAddBulk.mock.calls[0][0]).toHaveLength(2);
+ });
+
+ it('reads the waiting jobs once and drops the jobs already waiting', async () => {
+ mockGetJobs.mockResolvedValue([
+ { id: WAITING_JOB_ID },
+ { id: 'ws-1.exact-job-id' },
+ ]);
+
+ const jobIds = await driver.bulkAdd(MessageQueue.workspaceQueue, 'job', [
+ { data: {}, jobId: 'ws-1.exact-job-id' },
+ { data: {}, jobId: 'sync-catalog-ws-1' },
+ { data: {}, jobId: 'ws-1.new-job-id' },
+ { data: {} },
+ ]);
+
+ expect(mockGetJobs).toHaveBeenCalledTimes(1);
+ expect(mockGetJobs).toHaveBeenCalledWith(['waiting', 'prioritized']);
+ expect(
+ mockAddBulk.mock.calls[0][0].map(
+ (job: { opts: { jobId?: string } }) => job.opts.jobId,
+ ),
+ ).toEqual(['ws-1.new-job-id', undefined]);
+ expect(jobIds).toEqual(['ws-1.new-job-id', 'auto-1']);
+ });
+
+ it('adds nothing when every job is already waiting', async () => {
+ mockGetJobs.mockResolvedValue([{ id: 'ws-1.exact-job-id' }]);
+
+ const jobIds = await driver.bulkAdd(MessageQueue.workspaceQueue, 'job', [
+ { data: {}, jobId: 'ws-1.exact-job-id' },
+ ]);
+
+ expect(jobIds).toEqual([]);
+ expect(mockAddBulk).not.toHaveBeenCalled();
+ });
+
+ it('skips the deduplication when duplicated prefixes are allowed', async () => {
+ await driver.bulkAdd(
+ MessageQueue.workspaceQueue,
+ 'job',
+ [{ data: {}, jobId: 'ws-1.exact-job-id' }],
+ { allowDuplicatedPrefixes: true },
+ );
+
+ expect(mockGetJobs).not.toHaveBeenCalled();
+ expect(mockAddBulk).toHaveBeenCalledTimes(1);
+ });
+ });
+});
diff --git a/packages/twenty-server/src/engine/core-modules/message-queue/drivers/bullmq.driver.ts b/packages/twenty-server/src/engine/core-modules/message-queue/drivers/bullmq.driver.ts
index d0163ec3e97..8cff3468a51 100644
--- a/packages/twenty-server/src/engine/core-modules/message-queue/drivers/bullmq.driver.ts
+++ b/packages/twenty-server/src/engine/core-modules/message-queue/drivers/bullmq.driver.ts
@@ -41,6 +41,8 @@ import { MESSAGE_QUEUE_WORKER_CONFIG } from 'src/engine/core-modules/message-que
import { type MessageQueue } from 'src/engine/core-modules/message-queue/message-queue.constants';
import { type QueueJobChangedEvent } from 'src/engine/core-modules/message-queue/types/queue-job-changed-event.type';
import { getJobKey } from 'src/engine/core-modules/message-queue/utils/get-job-key.util';
+import { buildQueueJobIdWithSuffix } from 'src/engine/core-modules/message-queue/utils/build-queue-job-id-with-suffix.util';
+import { isQueueJobIdAlreadyWaiting } from 'src/engine/core-modules/message-queue/utils/is-queue-job-id-already-waiting.util';
import { type MetricsService } from 'src/engine/core-modules/metrics/metrics.service';
import { MetricsKeys } from 'src/engine/core-modules/metrics/types/metrics-keys.type';
import { applyWorkspaceSentryContextFromJobData } from 'src/engine/core-modules/sentry/utils/apply-workspace-sentry-context-from-job-data.util';
@@ -52,8 +54,6 @@ type BullMQJobsOptions = JobsOptions & {
broadcastTo?: QueueJobRecipient;
};
-const V4_LENGTH = 36;
-
export class BullMQDriver
implements MessageQueueDriver, OnModuleDestroy, OnModuleInit
{
@@ -391,8 +391,9 @@ export class BullMQDriver
options?: QueueJobOptions;
}): BullMQJobsOptions {
return {
- // We suffix the id with V4() to make sure ids are unique so we can add a waiting job when a job related with the same option.id is running
- jobId: options?.id ? `${options.id}-${v4()}` : undefined,
+ jobId: options?.id
+ ? buildQueueJobIdWithSuffix({ jobIdPrefix: options.id, suffix: v4() })
+ : undefined,
priority:
options?.priority ?? MESSAGE_QUEUE_WORKER_CONFIG[queueName].priority,
attempts: 1 + (options?.retryLimit || 0),
@@ -430,13 +431,11 @@ export class BullMQDriver
// This ensures only one waiting job can be queued for a specific option.id
if (options?.id && !options?.allowDuplicatedPrefixes) {
- const waitingJobs = await this.queueMap[queueName].getJobs(['waiting']);
+ const waitingJobIds = await this.getWaitingJobIds(queueName);
- const isJobAlreadyWaiting = waitingJobs.some(
- (job) => job.id?.slice(0, -(V4_LENGTH + 1)) === options.id,
- );
-
- if (isJobAlreadyWaiting) {
+ if (
+ isQueueJobIdAlreadyWaiting({ waitingJobIds, jobIdOrPrefix: options.id })
+ ) {
return;
}
}
@@ -448,6 +447,32 @@ export class BullMQDriver
return job.id;
}
+ private async getWaitingJobIds(queueName: MessageQueue): Promise<string[]> {
+ const waitingJobs = await this.queueMap[queueName].getJobs([
+ 'waiting',
+ 'prioritized',
+ ]);
+
+ return waitingJobs.map((job) => job.id).filter(isDefined);
+ }
+
+ private async filterOutAlreadyWaitingJobs<T extends MessageQueueJobData>(
+ queueName: MessageQueue,
+ jobs: QueueJobToAdd<T>[],
+ ): Promise<QueueJobToAdd<T>[]> {
+ if (!jobs.some((job) => isDefined(job.jobId))) {
+ return jobs;
+ }
+
+ const waitingJobIds = await this.getWaitingJobIds(queueName);
+
+ return jobs.filter(
+ ({ jobId }) =>
+ !isDefined(jobId) ||
+ !isQueueJobIdAlreadyWaiting({ waitingJobIds, jobIdOrPrefix: jobId }),
+ );
+ }
+
async bulkAdd<T extends MessageQueueJobData>(
queueName: MessageQueue,
jobName: string,
@@ -460,14 +485,18 @@ export class BullMQDriver
);
}
- if (jobs.length === 0) {
+ const jobsToAdd = options?.allowDuplicatedPrefixes
+ ? jobs
+ : await this.filterOutAlreadyWaitingJobs(queueName, jobs);
+
+ if (jobsToAdd.length === 0) {
return [];
}
const queueOptions = this.buildJobsOptions({ queueName, options });
const addedJobs = await this.queueMap[queueName].addBulk(
- jobs.map(({ data, jobId }, index) => ({
+ jobsToAdd.map(({ data, jobId }, index) => ({
name: jobName,
data,
opts: {
diff --git a/packages/twenty-server/src/engine/core-modules/message-queue/drivers/interfaces/job-options.interface.ts b/packages/twenty-server/src/engine/core-modules/message-queue/drivers/interfaces/job-options.interface.ts
index 64370774efe..9e283e10d4f 100644
--- a/packages/twenty-server/src/engine/core-modules/message-queue/drivers/interfaces/job-options.interface.ts
+++ b/packages/twenty-server/src/engine/core-modules/message-queue/drivers/interfaces/job-options.interface.ts
@@ -6,7 +6,7 @@ export type QueueJobBackoffOptions = {
export type QueueJobRecipient = {
workspaceId: string;
- userWorkspaceId: string;
+ userWorkspaceId?: string;
};
export interface QueueJobOptions {
diff --git a/packages/twenty-server/src/engine/core-modules/message-queue/jobs.module.ts b/packages/twenty-server/src/engine/core-modules/message-queue/jobs.module.ts
index 9f98863050f..be433cd75c3 100644
--- a/packages/twenty-server/src/engine/core-modules/message-queue/jobs.module.ts
+++ b/packages/twenty-server/src/engine/core-modules/message-queue/jobs.module.ts
@@ -15,6 +15,8 @@ import { BillingReminderModule } from 'src/engine/core-modules/billing/reminders
import { BillingReminderCronJob } from 'src/engine/core-modules/billing/reminders/crons/billing-reminder.cron.job';
import { StripeModule } from 'src/engine/core-modules/billing/stripe/stripe.module';
import { ApplicationInstallModule } from 'src/engine/core-modules/application/application-install/application-install.module';
+import { TriggerInstallApplicationJob } from 'src/engine/core-modules/application/application-install/jobs/trigger-install-application.job';
+import { TriggerUninstallApplicationJob } from 'src/engine/core-modules/application/application-install/jobs/trigger-uninstall-application.job';
import { ApplicationManifestModule } from 'src/engine/core-modules/application/application-manifest/application-manifest.module';
import { ApplicationRegistrationModule } from 'src/engine/core-modules/application/application-registration/application-registration.module';
import { ApplicationUpgradeModule } from 'src/engine/core-modules/application/application-upgrade/application-upgrade.module';
@@ -131,6 +133,8 @@ import { WorkflowModule } from 'src/modules/workflow/workflow.module';
UpgradeApplicationsJob,
InstallOnboardingAppsJob,
InstallPreInstalledAppsJob,
+ TriggerInstallApplicationJob,
+ TriggerUninstallApplicationJob,
],
})
export class JobsModule {
diff --git a/packages/twenty-server/src/engine/core-modules/message-queue/utils/__tests__/get-queue-job-id-prefix.util.spec.ts b/packages/twenty-server/src/engine/core-modules/message-queue/utils/__tests__/get-queue-job-id-prefix.util.spec.ts
new file mode 100644
index 00000000000..9c6261163dd
--- /dev/null
+++ b/packages/twenty-server/src/engine/core-modules/message-queue/utils/__tests__/get-queue-job-id-prefix.util.spec.ts
@@ -0,0 +1,25 @@
+import { buildQueueJobIdWithSuffix } from 'src/engine/core-modules/message-queue/utils/build-queue-job-id-with-suffix.util';
+import { getQueueJobIdPrefix } from 'src/engine/core-modules/message-queue/utils/get-queue-job-id-prefix.util';
+
+const PREFIX = 'install-application.workspace-id.application-id';
+const SUFFIX = '5c98b035-5b09-4550-a4fb-b52056c494d1';
+
+describe('getQueueJobIdPrefix', () => {
+ it('strips the v4 suffix added by add', () => {
+ expect(
+ getQueueJobIdPrefix(
+ buildQueueJobIdWithSuffix({ jobIdPrefix: PREFIX, suffix: SUFFIX }),
+ ),
+ ).toBe(PREFIX);
+ });
+
+ it('strips the v4 and batch index added by bulkAdd', () => {
+ expect(getQueueJobIdPrefix(`${PREFIX}-${SUFFIX}-12`)).toBe(PREFIX);
+ });
+
+ it('leaves an id without a generated suffix unchanged', () => {
+ expect(getQueueJobIdPrefix('workspace-id.custom-job-id')).toBe(
+ 'workspace-id.custom-job-id',
+ );
+ });
+});
diff --git a/packages/twenty-server/src/engine/core-modules/message-queue/utils/__tests__/is-queue-job-id-already-waiting.util.spec.ts b/packages/twenty-server/src/engine/core-modules/message-queue/utils/__tests__/is-queue-job-id-already-waiting.util.spec.ts
new file mode 100644
index 00000000000..1f5ca037939
--- /dev/null
+++ b/packages/twenty-server/src/engine/core-modules/message-queue/utils/__tests__/is-queue-job-id-already-waiting.util.spec.ts
@@ -0,0 +1,32 @@
+import { isQueueJobIdAlreadyWaiting } from 'src/engine/core-modules/message-queue/utils/is-queue-job-id-already-waiting.util';
+
+const PREFIX = 'install-application.workspace-id.application-id';
+const SUFFIX = '5c98b035-5b09-4550-a4fb-b52056c494d1';
+
+describe('isQueueJobIdAlreadyWaiting', () => {
+ const waitingJobIds = [`${PREFIX}-${SUFFIX}`, 'workspace-id.custom-job-id'];
+
+ it('matches a waiting job generated from the prefix', () => {
+ expect(
+ isQueueJobIdAlreadyWaiting({ waitingJobIds, jobIdOrPrefix: PREFIX }),
+ ).toBe(true);
+ });
+
+ it('matches a waiting job on its exact id', () => {
+ expect(
+ isQueueJobIdAlreadyWaiting({
+ waitingJobIds,
+ jobIdOrPrefix: 'workspace-id.custom-job-id',
+ }),
+ ).toBe(true);
+ });
+
+ it('does not match another prefix', () => {
+ expect(
+ isQueueJobIdAlreadyWaiting({
+ waitingJobIds,
+ jobIdOrPrefix: 'install-application.workspace-id.other-application',
+ }),
+ ).toBe(false);
+ });
+});
diff --git a/packages/twenty-server/src/engine/core-modules/message-queue/utils/build-job-status.util.ts b/packages/twenty-server/src/engine/core-modules/message-queue/utils/build-job-status.util.ts
new file mode 100644
index 00000000000..9e493ef9942
--- /dev/null
+++ b/packages/twenty-server/src/engine/core-modules/message-queue/utils/build-job-status.util.ts
@@ -0,0 +1,20 @@
+import { type JobStatusDTO } from 'src/engine/core-modules/message-queue/dtos/job-status.dto';
+import { type QueueJobDetails } from 'src/engine/core-modules/message-queue/drivers/interfaces/message-queue-driver.interface';
+import { bullMQToJobStateEnum } from 'src/engine/core-modules/message-queue/enums/job-state.enum';
+import { type MessageQueueJobData } from 'src/engine/core-modules/message-queue/interfaces/message-queue-job.interface';
+
+export const buildJobStatus = ({
+ jobId,
+ job,
+}: {
+ jobId: string;
+ job: QueueJobDetails<MessageQueueJobData>;
+}): JobStatusDTO => ({
+ jobId,
+ state: bullMQToJobStateEnum[job.state],
+ attemptsMade: job.attemptsMade,
+ failedReason: job.failedReason,
+ enqueuedAt: job.timestamp,
+ startedAt: job.processedOn,
+ finishedAt: job.finishedOn,
+});
diff --git a/packages/twenty-server/src/engine/core-modules/message-queue/utils/build-queue-job-id-with-suffix.util.ts b/packages/twenty-server/src/engine/core-modules/message-queue/utils/build-queue-job-id-with-suffix.util.ts
new file mode 100644
index 00000000000..173e6139c47
--- /dev/null
+++ b/packages/twenty-server/src/engine/core-modules/message-queue/utils/build-queue-job-id-with-suffix.util.ts
@@ -0,0 +1,7 @@
+export const buildQueueJobIdWithSuffix = ({
+ jobIdPrefix,
+ suffix,
+}: {
+ jobIdPrefix: string;
+ suffix: string;
+}): string => `${jobIdPrefix}-${suffix}`;
diff --git a/packages/twenty-server/src/engine/core-modules/message-queue/utils/get-queue-job-id-prefix.util.ts b/packages/twenty-server/src/engine/core-modules/message-queue/utils/get-queue-job-id-prefix.util.ts
new file mode 100644
index 00000000000..118a024d764
--- /dev/null
+++ b/packages/twenty-server/src/engine/core-modules/message-queue/utils/get-queue-job-id-prefix.util.ts
@@ -0,0 +1,5 @@
+const GENERATED_JOB_ID_SUFFIX_PATTERN =
+ /-[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}(?:-\d+)?$/i;
+
+export const getQueueJobIdPrefix = (jobId: string): string =>
+ jobId.replace(GENERATED_JOB_ID_SUFFIX_PATTERN, '');
diff --git a/packages/twenty-server/src/engine/core-modules/message-queue/utils/is-queue-job-id-already-waiting.util.ts b/packages/twenty-server/src/engine/core-modules/message-queue/utils/is-queue-job-id-already-waiting.util.ts
new file mode 100644
index 00000000000..0290776243e
--- /dev/null
+++ b/packages/twenty-server/src/engine/core-modules/message-queue/utils/is-queue-job-id-already-waiting.util.ts
@@ -0,0 +1,14 @@
+import { getQueueJobIdPrefix } from 'src/engine/core-modules/message-queue/utils/get-queue-job-id-prefix.util';
+
+export const isQueueJobIdAlreadyWaiting = ({
+ waitingJobIds,
+ jobIdOrPrefix,
+}: {
+ waitingJobIds: string[];
+ jobIdOrPrefix: string;
+}): boolean =>
+ waitingJobIds.some(
+ (waitingJobId) =>
+ waitingJobId === jobIdOrPrefix ||
+ getQueueJobIdPrefix(waitingJobId) === jobIdOrPrefix,
+ );
diff --git a/packages/twenty-server/src/engine/subscriptions/workspace-event-broadcaster/workspace-event-broadcaster.service.ts b/packages/twenty-server/src/engine/subscriptions/workspace-event-broadcaster/workspace-event-broadcaster.service.ts
index 06533eed2d2..b16adf7d453 100644
--- a/packages/twenty-server/src/engine/subscriptions/workspace-event-broadcaster/workspace-event-broadcaster.service.ts
+++ b/packages/twenty-server/src/engine/subscriptions/workspace-event-broadcaster/workspace-event-broadcaster.service.ts
@@ -71,10 +71,11 @@ export class WorkspaceEventBroadcaster {
queueJobEvent,
}: {
workspaceId: string;
- userWorkspaceId: string;
+ userWorkspaceId?: string;
queueJobEvent: QueueJobEvent;
}): Promise<void> {
await this.publishToActiveStreams(workspaceId, (streamData) =>
+ !isDefined(userWorkspaceId) ||
streamData.authContext.userWorkspaceId === userWorkspaceId
? {
objectRecordEventsWithQueryIds: [],
diff --git a/packages/twenty-server/test/integration/metadata/suites/application/application-broadcast-events.integration-spec.ts b/packages/twenty-server/test/integration/metadata/suites/application/application-broadcast-events.integration-spec.ts
index 47ce1089c5b..c49cfc70842 100644
--- a/packages/twenty-server/test/integration/metadata/suites/application/application-broadcast-events.integration-spec.ts
+++ b/packages/twenty-server/test/integration/metadata/suites/application/application-broadcast-events.integration-spec.ts
@@ -17,7 +17,6 @@ const APPLICATION_PAYLOAD_KEYS = [
'id',
'name',
'sdkClientCoreChecksum',
- 'state',
'universalIdentifier',
'version',
];
@@ -108,7 +107,6 @@ describe('Application broadcast events', () => {
expect(applicationCreatedEvent?.properties.after).toMatchObject({
id: applicationCreatedEvent?.recordId,
name: 'Broadcast test application',
- state: expect.any(String),
});
const applicationRegistrationId = registrationCreatedEvent?.recordId;
diff --git a/packages/twenty-server/test/integration/metadata/suites/application/application-lifecycle-job.integration-spec.ts b/packages/twenty-server/test/integration/metadata/suites/application/application-lifecycle-job.integration-spec.ts
new file mode 100644
index 00000000000..2b42108f611
--- /dev/null
+++ b/packages/twenty-server/test/integration/metadata/suites/application/application-lifecycle-job.integration-spec.ts
@@ -0,0 +1,168 @@
+import { Queue } from 'bullmq';
+import gql from 'graphql-tag';
+import IORedis from 'ioredis';
+import { findManyApplications } from 'test/integration/graphql/utils/find-many-applications.util';
+import { buildBaseManifest } from 'test/integration/metadata/suites/application/utils/build-base-manifest.util';
+import { cleanupApplicationAndAppRegistration } from 'test/integration/metadata/suites/application/utils/cleanup-application-and-app-registration.util';
+import { setupApplicationForSync } from 'test/integration/metadata/suites/application/utils/setup-application-for-sync.util';
+import { syncApplication } from 'test/integration/metadata/suites/application/utils/sync-application.util';
+import { makeMetadataAPIRequest } from 'test/integration/metadata/suites/utils/make-metadata-api-request.util';
+import { waitForAllJobsToFinish } from 'test/integration/utils/wait-for-all-jobs-to-finish.util';
+import { v4 as uuidv4 } from 'uuid';
+
+import { JobStateEnum } from 'src/engine/core-modules/message-queue/enums/job-state.enum';
+import { MessageQueue } from 'src/engine/core-modules/message-queue/message-queue.constants';
+import { getQueueJobIdPrefix } from 'src/engine/core-modules/message-queue/utils/get-queue-job-id-prefix.util';
+import { SEED_APPLE_WORKSPACE_ID } from 'src/engine/workspace-manager/dev-seeder/core/constants/seeder-workspaces.constant';
+
+const TRIGGER_INSTALL_APPLICATION_JOB = gql`
+ mutation TriggerInstallApplicationJob(
+ $input: TriggerInstallApplicationJobInput!
+ ) {
+ triggerInstallApplicationJob(input: $input) {
+ jobId
+ }
+ }
+`;
+
+const TRIGGER_UNINSTALL_APPLICATION_JOB = gql`
+ mutation TriggerUninstallApplicationJob(
+ $input: TriggerUninstallApplicationJobInput!
+ ) {
+ triggerUninstallApplicationJob(input: $input) {
+ jobId
+ }
+ }
+`;
+
+const FIND_UNINSTALL_APPLICATION_JOB_STATUS = gql`
+ query FindUninstallApplicationJobStatus($universalIdentifier: String!) {
+ findUninstallApplicationJobStatus(
+ universalIdentifier: $universalIdentifier
+ ) {
+ jobId
+ state
+ failedReason
+ }
+ }
+`;
+
+describe('Application lifecycle jobs', () => {
+ let appId: string;
+ let roleId: string;
+ let redisConnection: IORedis;
+ let workspaceQueue: Queue;
+
+ const triggerUninstallApplicationJob = async () => {
+ const response = await makeMetadataAPIRequest({
+ query: TRIGGER_UNINSTALL_APPLICATION_JOB,
+ variables: { input: { universalIdentifier: appId } },
+ });
+
+ expect(response.body.errors).toBeUndefined();
+
+ return response.body.data.triggerUninstallApplicationJob.jobId as string;
+ };
+
+ const findUninstallApplicationJobStatus = async () => {
+ const response = await makeMetadataAPIRequest({
+ query: FIND_UNINSTALL_APPLICATION_JOB_STATUS,
+ variables: { universalIdentifier: appId },
+ });
+
+ expect(response.body.errors).toBeUndefined();
+
+ return response.body.data.findUninstallApplicationJobStatus;
+ };
+
+ beforeAll(() => {
+ redisConnection = new IORedis(
+ process.env.REDIS_QUEUE_URL ??
+ process.env.REDIS_URL ??
+ 'redis://localhost:6379',
+ { maxRetriesPerRequest: null },
+ );
+ workspaceQueue = new Queue(MessageQueue.workspaceQueue, {
+ connection: redisConnection,
+ });
+ });
+
+ afterAll(async () => {
+ await workspaceQueue.close();
+ await redisConnection.quit();
+ });
+
+ beforeEach(async () => {
+ appId = uuidv4();
+ roleId = uuidv4();
+
+ await setupApplicationForSync({
+ applicationUniversalIdentifier: appId,
+ name: 'Lifecycle job test application',
+ description: 'App for testing install and uninstall jobs',
+ sourcePath: 'test-lifecycle-jobs',
+ });
+
+ await syncApplication({
+ manifest: buildBaseManifest({ appId, roleId }),
+ expectToFail: false,
+ });
+
+ jest.useRealTimers();
+ }, 60000);
+
+ afterEach(async () => {
+ await cleanupApplicationAndAppRegistration({
+ applicationUniversalIdentifier: appId,
+ });
+ });
+
+ it('uninstalls an installed application through a queue job and reads the job back', async () => {
+ const jobId = await triggerUninstallApplicationJob();
+
+ expect(getQueueJobIdPrefix(jobId)).toBe(
+ `uninstall-application.${SEED_APPLE_WORKSPACE_ID}.${appId}`,
+ );
+
+ await waitForAllJobsToFinish();
+
+ expect(await findUninstallApplicationJobStatus()).toBeNull();
+
+ const { data } = await findManyApplications({ expectToFail: false });
+
+ expect(
+ data.findManyApplications.some(
+ (application) => application.universalIdentifier === appId,
+ ),
+ ).toBe(false);
+ }, 60000);
+
+ it('reports the waiting uninstall job and refuses a conflicting install', async () => {
+ await workspaceQueue.pause();
+
+ try {
+ const jobId = await triggerUninstallApplicationJob();
+
+ expect(await findUninstallApplicationJobStatus()).toMatchObject({
+ jobId,
+ state: JobStateEnum.PRIORITIZED,
+ });
+
+ expect(await triggerUninstallApplicationJob()).toBe(jobId);
+
+ const installResponse = await makeMetadataAPIRequest({
+ query: TRIGGER_INSTALL_APPLICATION_JOB,
+ variables: { input: { universalIdentifier: appId } },
+ });
+
+ expect(installResponse.body.errors).toHaveLength(1);
+ expect(installResponse.body.errors[0].message).toBe(
+ `Cannot install application ${appId} while its uninstall is in progress`,
+ );
+ } finally {
+ await workspaceQueue.resume();
+ }
+
+ await waitForAllJobsToFinish();
+ }, 60000);
+});