Skip to content

The open alternative to Salesforce, designed for AI.

Let apps report their own configuration state with defineHealthCheck (#26277)

martmull294b38f1eb43
diff --git a/packages/create-twenty-app/src/constants/template/src/constants/universal-identifiers.ts b/packages/create-twenty-app/src/constants/template/src/constants/universal-identifiers.ts
index 766a081002d..d6dde8dd5c4 100644
--- a/packages/create-twenty-app/src/constants/template/src/constants/universal-identifiers.ts
+++ b/packages/create-twenty-app/src/constants/template/src/constants/universal-identifiers.ts
@@ -2,6 +2,7 @@ export const APP_DISPLAY_NAME = 'DISPLAY-NAME-TO-BE-GENERATED';
export const APP_DESCRIPTION = 'DESCRIPTION-TO-BE-GENERATED';
export const APPLICATION_UNIVERSAL_IDENTIFIER = 'UUID-TO-BE-GENERATED';
export const DEFAULT_ROLE_UNIVERSAL_IDENTIFIER = 'UUID-TO-BE-GENERATED';
+export const HEALTH_CHECK_UNIVERSAL_IDENTIFIER = 'UUID-TO-BE-GENERATED';
export const MAIN_PAGE_FRONT_COMPONENT_UNIVERSAL_IDENTIFIER =
'UUID-TO-BE-GENERATED';
export const MAIN_PAGE_LAYOUT_UNIVERSAL_IDENTIFIER = 'UUID-TO-BE-GENERATED';
diff --git a/packages/create-twenty-app/src/constants/template/src/logic-functions/health-check.ts b/packages/create-twenty-app/src/constants/template/src/logic-functions/health-check.ts
new file mode 100644
index 00000000000..f50c8a9567c
--- /dev/null
+++ b/packages/create-twenty-app/src/constants/template/src/logic-functions/health-check.ts
@@ -0,0 +1,11 @@
+import { defineHealthCheck } from 'twenty-sdk/define';
+
+import { HEALTH_CHECK_UNIVERSAL_IDENTIFIER } from 'src/constants/universal-identifiers';
+
+export default defineHealthCheck({
+ universalIdentifier: HEALTH_CHECK_UNIVERSAL_IDENTIFIER,
+ name: 'health-check',
+ handler: async () => {
+ return { status: 'OK' };
+ },
+});
diff --git a/packages/twenty-agent-skills/references/develop-app/logic.md b/packages/twenty-agent-skills/references/develop-app/logic.md
index 79d14317779..aefd7d768cf 100644
--- a/packages/twenty-agent-skills/references/develop-app/logic.md
+++ b/packages/twenty-agent-skills/references/develop-app/logic.md
@@ -109,3 +109,22 @@ Use `defineUninstallLogicFunction` for best-effort cleanup of external resources
Uninstall hook files live alongside other logic functions (typically `src/logic-functions/uninstall.ts`). Kebab-case filename, one export per file.
The hook runs before the app's metadata, data, and code are removed, so handlers can still query the app's objects and records. Handlers receive `UninstallPayload` (`{ version?: string }`).
+
+## Health Check
+
+Use `defineHealthCheck` to report whether the app is actually able to run. It covers what only the app can know: a key that is present but revoked, an account on the wrong plan, a webhook that was never registered. A required variable nobody filled in is already covered by `isRequired` and needs no code.
+
+Health check files live alongside other logic functions (typically `src/logic-functions/health-check.ts`). Only one health check is allowed per app; declaring more than one fails the build.
+
+The config takes `universalIdentifier` and `handler`. The handler takes no arguments and runs server-side, so it reads secret variables like any other logic function.
+
+The handler returns `ApplicationHealthCheckResult`, a discriminated union:
+
+- `{ status: 'OK' }`
+- `{ status: 'SUCCESS' | 'INFO' | 'WARNING' | 'ERROR' | 'NEUTRAL'; title: string; description?: string; action?: { label: string; location?: string } }`
+
+The statuses come from `ApplicationHealthStatus`, exported from `twenty-sdk/define`, so `ApplicationHealthStatus.WARNING` and `'WARNING'` are interchangeable. `UNKNOWN` belongs to Twenty and an app cannot report it.
+
+`title` and the optional `description` are the two lines of a banner on the app's settings page. `action` renders a button labelled `label` that redirects to `location`: a path inside Twenty such as `/settings/billing`, optionally with a hash to select a tab, or a hash alone such as `#variables` to move to a tab of the app's own settings page; omitting it lands on the app's configuration tab. The button is omitted when the location leaves Twenty, and when there is no location and no configuration tab to fall back to.
+
+Twenty runs the check when the app's settings page opens and shows the result. Nothing is stored. A check that throws, times out, or returns a shape Twenty cannot read is treated as unknown, never as an error, and no banner is shown.
diff --git a/packages/twenty-agent-skills/skills/create-app/SKILL.md b/packages/twenty-agent-skills/skills/create-app/SKILL.md
index ed0e3804234..b29f601ed8e 100644
--- a/packages/twenty-agent-skills/skills/create-app/SKILL.md
+++ b/packages/twenty-agent-skills/skills/create-app/SKILL.md
@@ -81,6 +81,8 @@ Report to the user that the app was created successfully and is ready for develo
The scaffolder generates a placeholder page at `src/front-components/main-page.tsx` plus its page layout and navigation menu item. In `develop-app`, delete all three before the first deploy unless the app actually needs UI. Do not stack additional pages on top of the placeholder.
+It also generates a health check at `src/logic-functions/health-check.ts` that reports `OK`. Customise that file when the app gains something worth reporting; do not add a second one, since an app may declare only one health check and a second fails the build.
+
## Docker Fallback Troubleshooting
Use this only when the user opted into the Docker fallback and it fails because Docker is missing or not running.
diff --git a/packages/twenty-client-sdk/src/metadata/generated/schema.graphql b/packages/twenty-client-sdk/src/metadata/generated/schema.graphql
index e72fb311538..9927ce6949b 100644
--- a/packages/twenty-client-sdk/src/metadata/generated/schema.graphql
+++ b/packages/twenty-client-sdk/src/metadata/generated/schema.graphql
@@ -548,6 +548,7 @@ type Application {
autoUpgrade: Boolean!
defaultRoleId: String
settingsCustomTabFrontComponentId: UUID
+ healthCheckLogicFunctionId: UUID
defaultLogicFunctionRole: Role
agents: [Agent!]!
frontComponents: [FrontComponent!]!
@@ -2357,6 +2358,28 @@ type DeletedWorkspaceMember {
userWorkspaceId: UUID
}
+type ApplicationHealthCheckAction {
+ label: String!
+ location: String
+}
+
+type ApplicationHealthCheckResult {
+ status: ApplicationHealthStatus!
+ title: String
+ description: String
+ action: ApplicationHealthCheckAction
+}
+
+enum ApplicationHealthStatus {
+ OK
+ SUCCESS
+ INFO
+ WARNING
+ ERROR
+ NEUTRAL
+ UNKNOWN
+}
+
type MarketplaceApp {
id: String!
name: String!
@@ -4062,6 +4085,7 @@ type Mutation {
updateApplication(id: UUID!, input: UpdateApplicationInput!): Application!
uninstallApplication(universalIdentifier: String!): Boolean!
syncMarketplaceCatalog: Boolean!
+ runApplicationHealthCheck(applicationId: UUID!): ApplicationHealthCheckResult
createOneField(input: CreateOneFieldMetadataInput!): Field!
updateOneField(input: UpdateOneFieldMetadataInput!): Field!
deleteOneField(input: DeleteOneFieldInput!): Field!
diff --git a/packages/twenty-client-sdk/src/metadata/generated/schema.ts b/packages/twenty-client-sdk/src/metadata/generated/schema.ts
index 39289fb74df..47782ce1b5b 100644
--- a/packages/twenty-client-sdk/src/metadata/generated/schema.ts
+++ b/packages/twenty-client-sdk/src/metadata/generated/schema.ts
@@ -363,6 +363,7 @@ export interface Application {
autoUpgrade: Scalars['Boolean']
defaultRoleId?: Scalars['String']
settingsCustomTabFrontComponentId?: Scalars['UUID']
+ healthCheckLogicFunctionId?: Scalars['UUID']
defaultLogicFunctionRole?: Role
agents: Agent[]
frontComponents: FrontComponent[]
@@ -1982,6 +1983,22 @@ export interface DeletedWorkspaceMember {
__typename: 'DeletedWorkspaceMember'
}
+export interface ApplicationHealthCheckAction {
+ label: Scalars['String']
+ location?: Scalars['String']
+ __typename: 'ApplicationHealthCheckAction'
+}
+
+export interface ApplicationHealthCheckResult {
+ status: ApplicationHealthStatus
+ title?: Scalars['String']
+ description?: Scalars['String']
+ action?: ApplicationHealthCheckAction
+ __typename: 'ApplicationHealthCheckResult'
+}
+
+export type ApplicationHealthStatus = 'OK' | 'SUCCESS' | 'INFO' | 'WARNING' | 'ERROR' | 'NEUTRAL' | 'UNKNOWN'
+
export interface MarketplaceApp {
id: Scalars['String']
name: Scalars['String']
@@ -3485,6 +3502,7 @@ export interface Mutation {
updateApplication: Application
uninstallApplication: Scalars['Boolean']
syncMarketplaceCatalog: Scalars['Boolean']
+ runApplicationHealthCheck?: ApplicationHealthCheckResult
createOneField: Field
updateOneField: Field
deleteOneField: Field
@@ -4007,6 +4025,7 @@ export interface ApplicationGenqlSelection{
autoUpgrade?: boolean | number
defaultRoleId?: boolean | number
settingsCustomTabFrontComponentId?: boolean | number
+ healthCheckLogicFunctionId?: boolean | number
defaultLogicFunctionRole?: RoleGenqlSelection
agents?: AgentGenqlSelection
frontComponents?: FrontComponentGenqlSelection
@@ -5684,6 +5703,22 @@ export interface DeletedWorkspaceMemberGenqlSelection{
__scalar?: boolean | number
}
+export interface ApplicationHealthCheckActionGenqlSelection{
+ label?: boolean | number
+ location?: boolean | number
+ __typename?: boolean | number
+ __scalar?: boolean | number
+}
+
+export interface ApplicationHealthCheckResultGenqlSelection{
+ status?: boolean | number
+ title?: boolean | number
+ description?: boolean | number
+ action?: ApplicationHealthCheckActionGenqlSelection
+ __typename?: boolean | number
+ __scalar?: boolean | number
+}
+
export interface MarketplaceAppGenqlSelection{
id?: boolean | number
name?: boolean | number
@@ -7298,6 +7333,7 @@ export interface MutationGenqlSelection{
updateApplication?: (ApplicationGenqlSelection & { __args: {id: Scalars['UUID'], input: UpdateApplicationInput} })
uninstallApplication?: { __args: {universalIdentifier: Scalars['String']} }
syncMarketplaceCatalog?: boolean | number
+ runApplicationHealthCheck?: (ApplicationHealthCheckResultGenqlSelection & { __args: {applicationId: Scalars['UUID']} })
createOneField?: (FieldGenqlSelection & { __args: {input: CreateOneFieldMetadataInput} })
updateOneField?: (FieldGenqlSelection & { __args: {input: UpdateOneFieldMetadataInput} })
deleteOneField?: (FieldGenqlSelection & { __args: {input: DeleteOneFieldInput} })
@@ -9216,6 +9252,22 @@ export interface CreateRecordExportInput {objectMetadataId: Scalars['UUID'],fiel
+ const ApplicationHealthCheckAction_possibleTypes: string[] = ['ApplicationHealthCheckAction']
+ export const isApplicationHealthCheckAction = (obj?: { __typename?: any } | null): obj is ApplicationHealthCheckAction => {
+ if (!obj?.__typename) throw new Error('__typename is missing in "isApplicationHealthCheckAction"')
+ return ApplicationHealthCheckAction_possibleTypes.includes(obj.__typename)
+ }
+
+
+
+ const ApplicationHealthCheckResult_possibleTypes: string[] = ['ApplicationHealthCheckResult']
+ export const isApplicationHealthCheckResult = (obj?: { __typename?: any } | null): obj is ApplicationHealthCheckResult => {
+ if (!obj?.__typename) throw new Error('__typename is missing in "isApplicationHealthCheckResult"')
+ return ApplicationHealthCheckResult_possibleTypes.includes(obj.__typename)
+ }
+
+
+
const MarketplaceApp_possibleTypes: string[] = ['MarketplaceApp']
export const isMarketplaceApp = (obj?: { __typename?: any } | null): obj is MarketplaceApp => {
if (!obj?.__typename) throw new Error('__typename is missing in "isMarketplaceApp"')
@@ -10881,6 +10933,16 @@ export const enumCaptchaDriverType = {
TURNSTILE: 'TURNSTILE' as const
}
+export const enumApplicationHealthStatus = {
+ OK: 'OK' as const,
+ SUCCESS: 'SUCCESS' as const,
+ INFO: 'INFO' as const,
+ WARNING: 'WARNING' as const,
+ ERROR: 'ERROR' as const,
+ NEUTRAL: 'NEUTRAL' as const,
+ UNKNOWN: 'UNKNOWN' as const
+}
+
export const enumWorkspaceCompanyEnrichmentOutcome = {
matched: 'matched' as const,
unavailable: 'unavailable' 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 4a5f6638bbc..e8cb9b67ad1 100644
--- a/packages/twenty-client-sdk/src/metadata/generated/types.ts
+++ b/packages/twenty-client-sdk/src/metadata/generated/types.ts
@@ -69,41 +69,42 @@ export default {
216,
219,
230,
- 249,
- 250,
+ 243,
252,
- 257,
+ 253,
+ 255,
260,
- 269,
- 300,
- 307,
- 315,
- 316,
- 317,
+ 263,
+ 272,
+ 303,
+ 310,
+ 318,
319,
320,
- 321,
322,
323,
324,
325,
- 335,
- 336,
+ 326,
+ 327,
+ 328,
+ 338,
339,
- 378,
- 385,
- 387,
+ 342,
+ 381,
388,
- 389,
390,
+ 391,
392,
- 394,
- 399,
- 416,
- 428,
- 548,
- 552,
- 579
+ 393,
+ 395,
+ 397,
+ 402,
+ 419,
+ 431,
+ 551,
+ 555,
+ 582
],
"types": {
"BillingProductDTO": {
@@ -588,7 +589,7 @@ export default {
1
],
"fields": [
- 264,
+ 267,
{
"paging": [
27,
@@ -601,7 +602,7 @@ export default {
}
],
"indexMetadatas": [
- 265,
+ 268,
{
"paging": [
27,
@@ -614,13 +615,13 @@ export default {
}
],
"fieldsList": [
- 251
+ 254
],
"indexMetadataList": [
- 259
+ 262
],
"searchFieldMetadataList": [
- 267
+ 270
],
"__typename": [
1
@@ -1086,6 +1087,9 @@ export default {
"settingsCustomTabFrontComponentId": [
3
],
+ "healthCheckLogicFunctionId": [
+ 3
+ ],
"defaultLogicFunctionRole": [
48
],
@@ -1675,7 +1679,7 @@ export default {
93
],
"billingEntitlements": [
- 268
+ 271
],
"hasValidSignedEnterpriseKey": [
8
@@ -4661,6 +4665,35 @@ export default {
1
]
},
+ "ApplicationHealthCheckAction": {
+ "label": [
+ 1
+ ],
+ "location": [
+ 1
+ ],
+ "__typename": [
+ 1
+ ]
+ },
+ "ApplicationHealthCheckResult": {
+ "status": [
+ 243
+ ],
+ "title": [
+ 1
+ ],
+ "description": [
+ 1
+ ],
+ "action": [
+ 241
+ ],
+ "__typename": [
+ 1
+ ]
+ },
+ "ApplicationHealthStatus": {},
"MarketplaceApp": {
"id": [
1
@@ -4768,10 +4801,10 @@ export default {
1
],
"objectPermissions": [
- 242
+ 245
],
"fieldPermissions": [
- 243
+ 246
],
"__typename": [
1
@@ -4845,7 +4878,7 @@ export default {
1
],
"roles": [
- 244
+ 247
],
"manifest": [
9
@@ -4872,13 +4905,13 @@ export default {
},
"WorkspaceCompanyEnrichmentResult": {
"outcome": [
- 249
+ 252
],
"enrichment": [
9
],
"personOutcome": [
- 250
+ 253
],
"personEnrichment": [
9
@@ -4900,7 +4933,7 @@ export default {
1
],
"type": [
- 252
+ 255
],
"name": [
1
@@ -4972,10 +5005,10 @@ export default {
23
],
"relation": [
- 256
+ 259
],
"morphRelations": [
- 256
+ 259
],
"__typename": [
1
@@ -5001,7 +5034,7 @@ export default {
},
"FieldEdge": {
"node": [
- 251
+ 254
],
"cursor": [
29
@@ -5012,10 +5045,10 @@ export default {
},
"FieldConnection": {
"pageInfo": [
- 253
+ 256
],
"edges": [
- 254
+ 257
],
"__typename": [
1
@@ -5023,7 +5056,7 @@ export default {
},
"Relation": {
"type": [
- 257
+ 260
],
"sourceObjectMetadata": [
23
@@ -5032,10 +5065,10 @@ export default {
23
],
"sourceFieldMetadata": [
- 251
+ 254
],
"targetFieldMetadata": [
- 251
+ 254
],
"__typename": [
1
@@ -5082,7 +5115,7 @@ export default {
1
],
"indexType": [
- 260
+ 263
],
"createdAt": [
4
@@ -5091,7 +5124,7 @@ export default {
4
],
"indexFieldMetadataList": [
- 258
+ 261
],
"__typename": [
1
@@ -5100,7 +5133,7 @@ export default {
"IndexType": {},
"IndexEdge": {
"node": [
- 259
+ 262
],
"cursor": [
29
@@ -5122,10 +5155,10 @@ export default {
},
"ObjectConnection": {
"pageInfo": [
- 253
+ 256
],
"edges": [
- 262
+ 265
],
"__typename": [
1
@@ -5133,10 +5166,10 @@ export default {
},
"ObjectFieldsConnection": {
"pageInfo": [
- 253
+ 256
],
"edges": [
- 254
+ 257
],
"__typename": [
1
@@ -5144,10 +5177,10 @@ export default {
},
"ObjectIndexMetadatasConnection": {
"pageInfo": [
- 253
+ 256
],
"edges": [
- 261
+ 264
],
"__typename": [
1
@@ -5189,7 +5222,7 @@ export default {
},
"BillingEntitlement": {
"key": [
- 269
+ 272
],
"value": [
8
@@ -5227,7 +5260,7 @@ export default {
1
],
"records": [
- 270
+ 273
],
"isCustomDomainEnabled": [
8
@@ -5300,7 +5333,7 @@ export default {
},
"AvailableWorkspacesAndAccessTokens": {
"tokens": [
- 278
+ 281
],
"availableWorkspaces": [
239
@@ -5355,7 +5388,7 @@ export default {
11
],
"workspace": [
- 283
+ 286
],
"__typename": [
1
@@ -5432,7 +5465,7 @@ export default {
},
"AuthTokens": {
"tokens": [
- 278
+ 281
],
"__typename": [
1
@@ -5473,7 +5506,7 @@ export default {
11
],
"workspace": [
- 283
+ 286
],
"__typename": [
1
@@ -5541,7 +5574,7 @@ export default {
1
],
"status": [
- 300
+ 303
],
"reason": [
1
@@ -5567,16 +5600,16 @@ export default {
},
"ApplicationExport": {
"application": [
- 298
+ 301
],
"manifest": [
9
],
"coverage": [
- 299
+ 302
],
"files": [
- 301
+ 304
],
"__typename": [
1
@@ -5612,10 +5645,10 @@ export default {
},
"CompleteApplicationFileUploadsResult": {
"files": [
- 303
+ 306
],
"errors": [
- 304
+ 307
],
"__typename": [
1
@@ -5626,7 +5659,7 @@ export default {
3
],
"fileFolder": [
- 307
+ 310
],
"filePath": [
1
@@ -5647,7 +5680,7 @@ export default {
"FileFolder": {},
"ApplicationFileUploadError": {
"fileFolder": [
- 307
+ 310
],
"filePath": [
1
@@ -5661,10 +5694,10 @@ export default {
},
"CreateApplicationFileUploadsResult": {
"targets": [
- 306
+ 309
],
"errors": [
- 308
+ 311
],
"__typename": [
1
@@ -5746,16 +5779,16 @@ export default {
1
],
"status": [
- 315
+ 318
],
"tenantStatus": [
- 316
+ 319
],
"unsubscribeHostnameStatus": [
- 317
+ 320
],
"verificationRecords": [
- 313
+ 316
],
"verifiedAt": [
4
@@ -5772,7 +5805,7 @@ export default {
3
],
"visibility": [
- 319
+ 322
],
"handle": [
1
@@ -5781,16 +5814,16 @@ export default {
1
],
"type": [
- 320
+ 323
],
"isContactAutoCreationEnabled": [
8
],
"contactAutoCreationPolicy": [
- 321
+ 324
],
"messageFolderImportPolicy": [
- 322
+ 325
],
"excludeNonProfessionalEmails": [
8
@@ -5799,7 +5832,7 @@ export default {
8
],
"pendingGroupEmailsAction": [
- 323
+ 326
],
"isSyncEnabled": [
8
@@ -5808,10 +5841,10 @@ export default {
4
],
"syncStatus": [
- 324
+ 327
],
"syncStage": [
- 325
+ 328
],
"syncStageStartedAt": [
4
@@ -5861,7 +5894,7 @@ export default {
},
"IngestAppMessagesOutput": {
"messages": [
- 326
+ 329
],
"__typename": [
1
@@ -5869,7 +5902,7 @@ export default {
},
"CreateEmailGroupChannelOutput": {
"messageChannel": [
- 318
+ 321
],
"forwardingAddress": [
1
@@ -5934,7 +5967,7 @@ export default {
28
],
"audience": [
- 329
+ 332
],
"__typename": [
1
@@ -5977,10 +6010,10 @@ export default {
1
],
"reason": [
- 335
+ 338
],
"source": [
- 336
+ 339
],
"unsubscribeTopicId": [
3
@@ -5993,7 +6026,7 @@ export default {
"MessageSuppressionSource": {},
"MessageSuppressionList": {
"records": [
- 334
+ 337
],
"totalCount": [
28
@@ -6019,7 +6052,7 @@ export default {
1
],
"visibility": [
- 339
+ 342
],
"__typename": [
1
@@ -6065,7 +6098,7 @@ export default {
1
],
"location": [
- 341
+ 344
],
"__typename": [
1
@@ -6093,13 +6126,13 @@ export default {
1
],
"IMAP": [
- 343
+ 346
],
"SMTP": [
- 343
+ 346
],
"CALDAV": [
- 343
+ 346
],
"__typename": [
1
@@ -6119,7 +6152,7 @@ export default {
3
],
"connectionParameters": [
- 344
+ 347
],
"__typename": [
1
@@ -6350,7 +6383,7 @@ export default {
1
],
"series": [
- 353
+ 356
],
"xAxisLabel": [
1
@@ -6399,7 +6432,7 @@ export default {
1
],
"data": [
- 355
+ 358
],
"__typename": [
1
@@ -6407,7 +6440,7 @@ export default {
},
"LineChartData": {
"series": [
- 356
+ 359
],
"xAxisLabel": [
1
@@ -6444,7 +6477,7 @@ export default {
},
"PieChartData": {
"data": [
- 358
+ 361
],
"showLegend": [
8
@@ -6549,13 +6582,13 @@ export default {
},
"EventLogQueryResult": {
"records": [
- 363
+ 366
],
"totalCount": [
28
],
"pageInfo": [
- 364
+ 367
],
"__typename": [
1
@@ -6656,7 +6689,7 @@ export default {
1
],
"parts": [
- 349
+ 352
],
"processedAt": [
4
@@ -6728,7 +6761,7 @@ export default {
},
"AiSystemPromptPreview": {
"sections": [
- 371
+ 374
],
"estimatedTokenCount": [
28
@@ -6756,7 +6789,7 @@ export default {
28
],
"error": [
- 373
+ 376
],
"__typename": [
1
@@ -6789,10 +6822,10 @@ export default {
},
"StartWorkspaceSetupChatResult": {
"outcome": [
- 378
+ 381
],
"thread": [
- 370
+ 373
],
"__typename": [
1
@@ -6830,10 +6863,10 @@ export default {
3
],
"evaluations": [
- 379
+ 382
],
"messages": [
- 369
+ 372
],
"createdAt": [
4
@@ -6895,7 +6928,7 @@ export default {
9
],
"scope": [
- 385
+ 388
],
"__typename": [
1
@@ -6910,19 +6943,19 @@ export default {
1
],
"syncStatus": [
- 387
+ 390
],
"syncStage": [
- 388
+ 391
],
"visibility": [
- 389
+ 392
],
"isContactAutoCreationEnabled": [
8
],
"contactAutoCreationPolicy": [
- 390
+ 393
],
"isSyncEnabled": [
8
@@ -6973,7 +7006,7 @@ export default {
1
],
"pendingSyncAction": [
- 392
+ 395
],
"messageChannelId": [
3
@@ -7015,7 +7048,7 @@ export default {
1
],
"provenance": [
- 394
+ 397
],
"__typename": [
1
@@ -7044,7 +7077,7 @@ export default {
3
],
"through": [
- 395
+ 398
],
"__typename": [
1
@@ -7064,7 +7097,7 @@ export default {
1
],
"emit": [
- 396
+ 399
],
"action": [
1
@@ -7099,7 +7132,7 @@ export default {
},
"CollectionHash": {
"collectionName": [
- 399
+ 402
],
"hash": [
1
@@ -7163,13 +7196,13 @@ export default {
},
"MinimalMetadata": {
"objectMetadataItems": [
- 400
+ 403
],
"views": [
- 401
+ 404
],
"collectionHashes": [
- 398
+ 401
],
"__typename": [
1
@@ -7238,7 +7271,7 @@ export default {
157,
{
"input": [
- 404,
+ 407,
"UsageQuotaScopeInput!"
]
}
@@ -7247,7 +7280,7 @@ export default {
183,
{
"input": [
- 405
+ 408
]
}
],
@@ -7369,7 +7402,7 @@ export default {
2,
{
"input": [
- 406,
+ 409,
"GetApiKeyInput!"
]
}
@@ -7487,20 +7520,20 @@ export default {
10,
{
"input": [
- 407,
+ 410,
"AgentIdInput!"
]
}
],
"objects": [
- 263,
+ 266,
{
"paging": [
27,
"CursorPaging!"
],
"filter": [
- 408,
+ 411,
"ObjectFilter!"
]
}
@@ -7515,7 +7548,7 @@ export default {
}
],
"objectRecordCounts": [
- 266
+ 269
],
"mostlyEmptyFieldMetadataIds": [
3,
@@ -7530,7 +7563,7 @@ export default {
21,
{
"input": [
- 409,
+ 412,
"LogicFunctionIdInput!"
]
}
@@ -7542,7 +7575,7 @@ export default {
9,
{
"input": [
- 409,
+ 412,
"LogicFunctionIdInput!"
]
}
@@ -7551,7 +7584,7 @@ export default {
1,
{
"input": [
- 409,
+ 412,
"LogicFunctionIdInput!"
]
}
@@ -7710,7 +7743,7 @@ export default {
}
],
"findManyMarketplaceApps": [
- 241,
+ 244,
{
"universalIdentifiers": [
1,
@@ -7719,7 +7752,7 @@ export default {
}
],
"findMarketplaceAppDetail": [
- 245,
+ 248,
{
"universalIdentifier": [
1,
@@ -7728,7 +7761,7 @@ export default {
}
],
"publicMarketplaceApps": [
- 241,
+ 244,
{
"isVetted": [
8,
@@ -7737,7 +7770,7 @@ export default {
}
],
"publicMarketplaceAppDetail": [
- 245,
+ 248,
{
"universalIdentifier": [
1,
@@ -7746,7 +7779,7 @@ export default {
}
],
"fields": [
- 255,
+ 258,
{
"paging": [
27,
@@ -7759,7 +7792,7 @@ export default {
}
],
"field": [
- 251,
+ 254,
{
"id": [
3,
@@ -7788,28 +7821,28 @@ export default {
48
],
"previewMessageCampaignAudience": [
- 329,
+ 332,
{
"input": [
- 410,
+ 413,
"PreviewMessageCampaignAudienceInput!"
]
}
],
"messageSuppressions": [
- 337,
+ 340,
{
"input": [
- 411,
+ 414,
"FindMessageSuppressionsInput!"
]
}
],
"unsubscribeTopics": [
- 338
+ 341
],
"myMessageChannels": [
- 318,
+ 321,
{
"connectedAccountId": [
3
@@ -7817,18 +7850,18 @@ export default {
}
],
"appMessageChannels": [
- 318,
+ 321,
{
"filter": [
- 412
+ 415
]
}
],
"getEmailingDomains": [
- 314
+ 317
],
"getToolIndex": [
- 348
+ 351
],
"getToolInputSchema": [
9,
@@ -7840,10 +7873,10 @@ export default {
}
],
"webhooks": [
- 347
+ 350
],
"webhook": [
- 347,
+ 350,
{
"id": [
3,
@@ -7852,7 +7885,7 @@ export default {
}
],
"myMessageFolders": [
- 391,
+ 394,
{
"messageChannelId": [
3
@@ -7860,7 +7893,7 @@ export default {
}
],
"myCalendarChannels": [
- 386,
+ 389,
{
"connectedAccountId": [
3
@@ -7868,17 +7901,17 @@ export default {
}
],
"minimalMetadata": [
- 402
+ 405
],
"appKeyValue": [
- 384,
+ 387,
{
"key": [
1,
"String!"
],
"scope": [
- 385
+ 388
]
}
],
@@ -7895,7 +7928,7 @@ export default {
229,
{
"filter": [
- 413
+ 416
]
}
],
@@ -7909,16 +7942,16 @@ export default {
}
],
"findWorkspaceAiStats": [
- 381
+ 384
],
"aiChatUsage": [
- 367
+ 370
],
"chatThreads": [
- 370
+ 373
],
"chatThread": [
- 370,
+ 373,
{
"id": [
3,
@@ -7927,7 +7960,7 @@ export default {
}
],
"chatMessages": [
- 369,
+ 372,
{
"threadId": [
3,
@@ -7936,7 +7969,7 @@ export default {
}
],
"chatStreamCatchupChunks": [
- 374,
+ 377,
{
"threadId": [
3,
@@ -7945,13 +7978,13 @@ export default {
}
],
"getAiSystemPromptPreview": [
- 372
+ 375
],
"skills": [
- 368
+ 371
],
"skill": [
- 368,
+ 371,
{
"id": [
3,
@@ -7960,7 +7993,7 @@ export default {
}
],
"agentTurns": [
- 380,
+ 383,
{
"agentId": [
3,
@@ -7969,19 +8002,19 @@ export default {
}
],
"timelineActivityTypes": [
- 397
+ 400
],
"metadataTranslations": [
- 393,
+ 396,
{
"input": [
- 414,
+ 417,
"MetadataTranslationsInput!"
]
}
],
"checkUserExists": [
- 293,
+ 296,
{
"email": [
1,
@@ -7993,7 +8026,7 @@ export default {
}
],
"checkWorkspaceInviteHashIsValid": [
- 294,
+ 297,
{
"inviteHash": [
1,
@@ -8011,7 +8044,7 @@ export default {
}
],
"checkWorkspaceSubdomainAvailability": [
- 288,
+ 291,
{
"subdomain": [
1,
@@ -8020,10 +8053,10 @@ export default {
}
],
"getWorkspaceCreationDefaults": [
- 289
+ 292
],
"validatePasswordResetToken": [
- 286,
+ 289,
{
"passwordResetToken": [
1,
@@ -8038,37 +8071,37 @@ export default {
235
],
"eventLogs": [
- 365,
+ 368,
{
"input": [
- 415,
+ 418,
"EventLogQueryInput!"
]
}
],
"pieChartData": [
- 359,
+ 362,
{
"input": [
- 419,
+ 422,
"PieChartDataInput!"
]
}
],
"lineChartData": [
- 357,
+ 360,
{
"input": [
- 420,
+ 423,
"LineChartDataInput!"
]
}
],
"barChartData": [
- 354,
+ 357,
{
"input": [
- 421,
+ 424,
"BarChartDataInput!"
]
}
@@ -8083,7 +8116,7 @@ export default {
}
],
"getConnectedImapSmtpCaldavAccount": [
- 345,
+ 348,
{
"id": [
3,
@@ -8092,7 +8125,7 @@ export default {
}
],
"getAutoCompleteAddress": [
- 340,
+ 343,
{
"address": [
1,
@@ -8111,7 +8144,7 @@ export default {
}
],
"getAddressDetails": [
- 342,
+ 345,
{
"placeId": [
1,
@@ -8124,10 +8157,10 @@ export default {
}
],
"findManyPublicDomains": [
- 312
+ 315
],
"exportApplication": [
- 302,
+ 305,
{
"universalIdentifier": [
3,
@@ -8136,7 +8169,7 @@ export default {
}
],
"currentUserApplicationAuthorizations": [
- 297
+ 300
],
"__typename": [
1
@@ -8200,10 +8233,10 @@ export default {
},
"ObjectFilter": {
"and": [
- 408
+ 411
],
"or": [
- 408
+ 411
],
"id": [
31
@@ -8257,7 +8290,7 @@ export default {
},
"FindMessageSuppressionsInput": {
"reason": [
- 335
+ 338
],
"searchTerm": [
1
@@ -8313,10 +8346,10 @@ export default {
},
"EventLogQueryInput": {
"table": [
- 416
+ 419
],
"filters": [
- 417
+ 420
],
"first": [
28
@@ -8337,7 +8370,7 @@ export default {
1
],
"dateRange": [
- 418
+ 421
],
"recordId": [
1
@@ -8398,7 +8431,7 @@ export default {
8,
{
"input": [
- 423,
+ 426,
"AddQuerySubscriptionInput!"
]
}
@@ -8407,7 +8440,7 @@ export default {
8,
{
"input": [
- 424,
+ 427,
"RemoveQueryFromEventStreamInput!"
]
}
@@ -8416,7 +8449,7 @@ export default {
162,
{
"inputs": [
- 425,
+ 428,
"[CreateNavigationMenuItemInput!]!"
]
}
@@ -8425,7 +8458,7 @@ export default {
162,
{
"input": [
- 425,
+ 428,
"CreateNavigationMenuItemInput!"
]
}
@@ -8434,7 +8467,7 @@ export default {
162,
{
"inputs": [
- 426,
+ 429,
"[UpdateOneNavigationMenuItemInput!]!"
]
}
@@ -8443,7 +8476,7 @@ export default {
162,
{
"input": [
- 426,
+ 429,
"UpdateOneNavigationMenuItemInput!"
]
}
@@ -8478,7 +8511,7 @@ export default {
"Float!"
],
"fileFolder": [
- 307,
+ 310,
"FileFolder!"
],
"fieldMetadataId": [
@@ -8517,7 +8550,7 @@ export default {
159,
{
"file": [
- 428,
+ 431,
"Upload!"
]
}
@@ -8526,7 +8559,7 @@ export default {
159,
{
"file": [
- 428,
+ 431,
"Upload!"
]
}
@@ -8535,7 +8568,7 @@ export default {
159,
{
"file": [
- 428,
+ 431,
"Upload!"
],
"fieldMetadataUniversalIdentifier": [
@@ -8548,7 +8581,7 @@ export default {
158,
{
"input": [
- 429,
+ 432,
"CreateUsageLimitInput!"
]
}
@@ -8557,7 +8590,7 @@ export default {
158,
{
"input": [
- 430,
+ 433,
"UpdateUsageLimitInput!"
]
}
@@ -8575,7 +8608,7 @@ export default {
55,
{
"input": [
- 431,
+ 434,
"CreateViewFilterGroupInput!"
]
}
@@ -8588,7 +8621,7 @@ export default {
"String!"
],
"input": [
- 432,
+ 435,
"UpdateViewFilterGroupInput!"
]
}
@@ -8615,7 +8648,7 @@ export default {
57,
{
"input": [
- 433,
+ 436,
"CreateViewFilterInput!"
]
}
@@ -8624,7 +8657,7 @@ export default {
57,
{
"input": [
- 434,
+ 437,
"UpdateViewFilterInput!"
]
}
@@ -8633,7 +8666,7 @@ export default {
57,
{
"input": [
- 436,
+ 439,
"DeleteViewFilterInput!"
]
}
@@ -8642,7 +8675,7 @@ export default {
57,
{
"input": [
- 437,
+ 440,
"DestroyViewFilterInput!"
]
}
@@ -8651,7 +8684,7 @@ export default {
63,
{
"input": [
- 438,
+ 441,
"CreateViewInput!"
]
}
@@ -8664,7 +8697,7 @@ export default {
"String!"
],
"input": [
- 439,
+ 442,
"UpdateViewInput!"
]
}
@@ -8691,7 +8724,7 @@ export default {
63,
{
"input": [
- 440,
+ 443,
"UpsertViewWidgetInput!"
]
}
@@ -8700,7 +8733,7 @@ export default {
60,
{
"input": [
- 446,
+ 449,
"CreateViewSortInput!"
]
}
@@ -8709,7 +8742,7 @@ export default {
60,
{
"input": [
- 447,
+ 450,
"UpdateViewSortInput!"
]
}
@@ -8718,7 +8751,7 @@ export default {
8,
{
"input": [
- 449,
+ 452,
"DeleteViewSortInput!"
]
}
@@ -8727,7 +8760,7 @@ export default {
8,
{
"input": [
- 450,
+ 453,
"DestroyViewSortInput!"
]
}
@@ -8736,7 +8769,7 @@ export default {
53,
{
"input": [
- 451,
+ 454,
"UpdateViewFieldInput!"
]
}
@@ -8745,7 +8778,7 @@ export default {
53,
{
"input": [
- 453,
+ 456,
"CreateViewFieldInput!"
]
}
@@ -8754,7 +8787,7 @@ export default {
53,
{
"inputs": [
- 453,
+ 456,
"[CreateViewFieldInput!]!"
]
}
@@ -8763,7 +8796,7 @@ export default {
53,
{
"input": [
- 454,
+ 457,
"DeleteViewFieldInput!"
]
}
@@ -8772,7 +8805,7 @@ export default {
53,
{
"input": [
- 455,
+ 458,
"DestroyViewFieldInput!"
]
}
@@ -8781,7 +8814,7 @@ export default {
62,
{
"input": [
- 456,
+ 459,
"UpdateViewFieldGroupInput!"
]
}
@@ -8790,7 +8823,7 @@ export default {
62,
{
"input": [
- 458,
+ 461,
"CreateViewFieldGroupInput!"
]
}
@@ -8799,7 +8832,7 @@ export default {
62,
{
"inputs": [
- 458,
+ 461,
"[CreateViewFieldGroupInput!]!"
]
}
@@ -8808,7 +8841,7 @@ export default {
62,
{
"input": [
- 459,
+ 462,
"DeleteViewFieldGroupInput!"
]
}
@@ -8817,7 +8850,7 @@ export default {
62,
{
"input": [
- 460,
+ 463,
"DestroyViewFieldGroupInput!"
]
}
@@ -8826,7 +8859,7 @@ export default {
63,
{
"input": [
- 461,
+ 464,
"UpsertFieldsWidgetInput!"
]
}
@@ -8835,7 +8868,7 @@ export default {
2,
{
"input": [
- 464,
+ 467,
"CreateApiKeyInput!"
]
}
@@ -8844,7 +8877,7 @@ export default {
2,
{
"input": [
- 465,
+ 468,
"UpdateApiKeyInput!"
]
}
@@ -8853,7 +8886,7 @@ export default {
2,
{
"input": [
- 466,
+ 469,
"RevokeApiKeyInput!"
]
}
@@ -9054,7 +9087,7 @@ export default {
184,
{
"input": [
- 467,
+ 470,
"CreateApprovedAccessDomainInput!"
]
}
@@ -9063,7 +9096,7 @@ export default {
8,
{
"input": [
- 468,
+ 471,
"DeleteApprovedAccessDomainInput!"
]
}
@@ -9072,7 +9105,7 @@ export default {
184,
{
"input": [
- 469,
+ 472,
"ValidateApprovedAccessDomainInput!"
]
}
@@ -9081,7 +9114,7 @@ export default {
142,
{
"input": [
- 470,
+ 473,
"CreatePageLayoutTabInput!"
]
}
@@ -9094,7 +9127,7 @@ export default {
"String!"
],
"input": [
- 471,
+ 474,
"UpdatePageLayoutTabInput!"
]
}
@@ -9112,7 +9145,7 @@ export default {
143,
{
"input": [
- 472,
+ 475,
"CreatePageLayoutInput!"
]
}
@@ -9125,7 +9158,7 @@ export default {
"String!"
],
"input": [
- 473,
+ 476,
"UpdatePageLayoutInput!"
]
}
@@ -9147,7 +9180,7 @@ export default {
"String!"
],
"input": [
- 474,
+ 477,
"UpdatePageLayoutWithTabsInput!"
]
}
@@ -9183,7 +9216,7 @@ export default {
98,
{
"input": [
- 477,
+ 480,
"CreatePageLayoutWidgetInput!"
]
}
@@ -9196,7 +9229,7 @@ export default {
"String!"
],
"input": [
- 478,
+ 481,
"UpdatePageLayoutWidgetInput!"
]
}
@@ -9214,7 +9247,7 @@ export default {
10,
{
"input": [
- 479,
+ 482,
"CreateAgentInput!"
]
}
@@ -9223,7 +9256,7 @@ export default {
10,
{
"input": [
- 480,
+ 483,
"UpdateAgentInput!"
]
}
@@ -9232,7 +9265,7 @@ export default {
10,
{
"input": [
- 407,
+ 410,
"AgentIdInput!"
]
}
@@ -9241,7 +9274,7 @@ export default {
23,
{
"input": [
- 481,
+ 484,
"CreateOneObjectInput!"
]
}
@@ -9250,7 +9283,7 @@ export default {
23,
{
"input": [
- 483,
+ 486,
"DeleteOneObjectInput!"
]
}
@@ -9259,7 +9292,7 @@ export default {
23,
{
"input": [
- 484,
+ 487,
"UpdateOneObjectInput!"
]
}
@@ -9268,25 +9301,25 @@ export default {
23,
{
"inputs": [
- 484,
+ 487,
"[UpdateOneObjectInput!]!"
]
}
],
"createOneIndex": [
- 259,
+ 262,
{
"input": [
- 487,
+ 490,
"CreateOneIndexInput!"
]
}
],
"deleteOneIndex": [
- 259,
+ 262,
{
"input": [
- 490,
+ 493,
"DeleteOneIndexInput!"
]
}
@@ -9295,7 +9328,7 @@ export default {
21,
{
"input": [
- 409,
+ 412,
"LogicFunctionIdInput!"
]
}
@@ -9304,7 +9337,7 @@ export default {
21,
{
"input": [
- 491,
+ 494,
"CreateLogicFunctionFromSourceInput!"
]
}
@@ -9313,7 +9346,7 @@ export default {
147,
{
"input": [
- 492,
+ 495,
"ExecuteOneLogicFunctionInput!"
]
}
@@ -9322,7 +9355,7 @@ export default {
8,
{
"input": [
- 493,
+ 496,
"UpdateLogicFunctionFromSourceInput!"
]
}
@@ -9331,7 +9364,7 @@ export default {
14,
{
"input": [
- 495,
+ 498,
"CreateCommandMenuItemInput!"
]
}
@@ -9340,7 +9373,7 @@ export default {
14,
{
"input": [
- 496,
+ 499,
"UpdateCommandMenuItemInput!"
]
}
@@ -9367,7 +9400,7 @@ export default {
13,
{
"input": [
- 497,
+ 500,
"CreateFrontComponentInput!"
]
}
@@ -9376,7 +9409,7 @@ export default {
13,
{
"input": [
- 498,
+ 501,
"UpdateFrontComponentInput!"
]
}
@@ -9394,7 +9427,7 @@ export default {
69,
{
"data": [
- 500,
+ 503,
"ActivateWorkspaceInput!"
]
}
@@ -9403,7 +9436,7 @@ export default {
69,
{
"data": [
- 501,
+ 504,
"UpdateWorkspaceInput!"
]
}
@@ -9412,10 +9445,10 @@ export default {
69
],
"checkCustomDomainValidRecords": [
- 271
+ 274
],
"enrichWorkspaceCompany": [
- 248
+ 251
],
"upgradeApplication": [
8,
@@ -9434,7 +9467,7 @@ export default {
226,
{
"input": [
- 502,
+ 505,
"CreateApplicationRegistrationInput!"
]
}
@@ -9443,7 +9476,7 @@ export default {
76,
{
"input": [
- 503,
+ 506,
"UpdateApplicationRegistrationInput!"
]
}
@@ -9470,7 +9503,7 @@ export default {
198,
{
"input": [
- 505,
+ 508,
"CreateApplicationRegistrationVariableInput!"
]
}
@@ -9479,7 +9512,7 @@ export default {
198,
{
"input": [
- 506,
+ 509,
"UpdateApplicationRegistrationVariableInput!"
]
}
@@ -9497,7 +9530,7 @@ export default {
76,
{
"file": [
- 428,
+ 431,
"Upload!"
],
"universalIdentifier": [
@@ -9552,19 +9585,19 @@ export default {
}
],
"triggerInstallApplicationJob": [
- 246,
+ 249,
{
"input": [
- 508,
+ 511,
"TriggerInstallApplicationJobInput!"
]
}
],
"triggerUninstallApplicationJob": [
- 247,
+ 250,
{
"input": [
- 509,
+ 512,
"TriggerUninstallApplicationJobInput!"
]
}
@@ -9577,7 +9610,7 @@ export default {
"UUID!"
],
"input": [
- 510,
+ 513,
"UpdateApplicationInput!"
]
}
@@ -9594,29 +9627,38 @@ export default {
"syncMarketplaceCatalog": [
8
],
+ "runApplicationHealthCheck": [
+ 242,
+ {
+ "applicationId": [
+ 3,
+ "UUID!"
+ ]
+ }
+ ],
"createOneField": [
- 251,
+ 254,
{
"input": [
- 511,
+ 514,
"CreateOneFieldMetadataInput!"
]
}
],
"updateOneField": [
- 251,
+ 254,
{
"input": [
- 513,
+ 516,
"UpdateOneFieldMetadataInput!"
]
}
],
"deleteOneField": [
- 251,
+ 254,
{
"input": [
- 515,
+ 518,
"DeleteOneFieldInput!"
]
}
@@ -9625,7 +9667,7 @@ export default {
59,
{
"input": [
- 516,
+ 519,
"CreateViewGroupInput!"
]
}
@@ -9634,7 +9676,7 @@ export default {
59,
{
"inputs": [
- 516,
+ 519,
"[CreateViewGroupInput!]!"
]
}
@@ -9643,7 +9685,7 @@ export default {
59,
{
"input": [
- 517,
+ 520,
"UpdateViewGroupInput!"
]
}
@@ -9652,7 +9694,7 @@ export default {
59,
{
"inputs": [
- 517,
+ 520,
"[UpdateViewGroupInput!]!"
]
}
@@ -9661,7 +9703,7 @@ export default {
59,
{
"input": [
- 519,
+ 522,
"DeleteViewGroupInput!"
]
}
@@ -9670,7 +9712,7 @@ export default {
59,
{
"input": [
- 520,
+ 523,
"DestroyViewGroupInput!"
]
}
@@ -9692,7 +9734,7 @@ export default {
48,
{
"createRoleInput": [
- 521,
+ 524,
"CreateRoleInput!"
]
}
@@ -9701,7 +9743,7 @@ export default {
48,
{
"updateRoleInput": [
- 522,
+ 525,
"UpdateRoleInput!"
]
}
@@ -9719,7 +9761,7 @@ export default {
45,
{
"upsertObjectPermissionsInput": [
- 524,
+ 527,
"UpsertObjectPermissionsInput!"
]
}
@@ -9728,7 +9770,7 @@ export default {
46,
{
"upsertPermissionFlagsInput": [
- 526,
+ 529,
"UpsertPermissionFlagsInput!"
]
}
@@ -9737,16 +9779,16 @@ export default {
40,
{
"upsertFieldPermissionsInput": [
- 527,
+ 530,
"UpsertFieldPermissionsInput!"
]
}
],
"upsertRowLevelPermissionPredicates": [
- 272,
+ 275,
{
"input": [
- 529,
+ 532,
"UpsertRowLevelPermissionPredicatesInput!"
]
}
@@ -9774,43 +9816,43 @@ export default {
}
],
"sendEmailViaEmailingDomain": [
- 331,
+ 334,
{
"input": [
- 532,
+ 535,
"SendEmailViaDomainInput!"
]
}
],
"sendMessageCampaign": [
- 332,
+ 335,
{
"input": [
- 533,
+ 536,
"SendMessageCampaignInput!"
]
}
],
"cancelMessageCampaign": [
- 330,
+ 333,
{
"input": [
- 534,
+ 537,
"CancelMessageCampaignInput!"
]
}
],
"sendMessageCampaignTest": [
- 331,
+ 334,
{
"input": [
- 535,
+ 538,
"SendMessageCampaignTestInput!"
]
}
],
"duplicateMessageList": [
- 333,
+ 336,
{
"id": [
3,
@@ -9819,10 +9861,10 @@ export default {
}
],
"createMessageSuppression": [
- 334,
+ 337,
{
"input": [
- 536,
+ 539,
"CreateMessageSuppressionInput!"
]
}
@@ -9837,19 +9879,19 @@ export default {
}
],
"createUnsubscribeTopic": [
- 338,
+ 341,
{
"input": [
- 537,
+ 540,
"CreateUnsubscribeTopicInput!"
]
}
],
"updateUnsubscribeTopic": [
- 338,
+ 341,
{
"input": [
- 538,
+ 541,
"UpdateUnsubscribeTopicInput!"
]
}
@@ -9864,34 +9906,34 @@ export default {
}
],
"updateMessageChannel": [
- 318,
+ 321,
{
"input": [
- 539,
+ 542,
"UpdateMessageChannelInput!"
]
}
],
"createEmailGroupChannel": [
- 328,
+ 331,
{
"input": [
- 541,
+ 544,
"CreateEmailGroupChannelInput!"
]
}
],
"updateEmailGroupChannel": [
- 318,
+ 321,
{
"input": [
- 542,
+ 545,
"UpdateEmailGroupChannelInput!"
]
}
],
"deleteEmailGroupChannel": [
- 318,
+ 321,
{
"id": [
3,
@@ -9900,25 +9942,25 @@ export default {
}
],
"createAppMessageChannel": [
- 318,
+ 321,
{
"input": [
- 543,
+ 546,
"CreateAppMessageChannelInput!"
]
}
],
"updateAppMessageChannel": [
- 318,
+ 321,
{
"input": [
- 544,
+ 547,
"UpdateAppMessageChannelInput!"
]
}
],
"deleteAppMessageChannel": [
- 318,
+ 321,
{
"id": [
3,
@@ -9927,19 +9969,19 @@ export default {
}
],
"ingestAppMessages": [
- 327,
+ 330,
{
"input": [
- 545,
+ 548,
"IngestAppMessagesInput!"
]
}
],
"createEmailingDomain": [
- 314,
+ 317,
{
"input": [
- 549,
+ 552,
"CreateEmailingDomainInput!"
]
}
@@ -9954,7 +9996,7 @@ export default {
}
],
"verifyEmailingDomain": [
- 314,
+ 317,
{
"id": [
1,
@@ -9963,34 +10005,34 @@ export default {
}
],
"runAgent": [
- 350,
+ 353,
{
"input": [
- 550,
+ 553,
"RunAgentInput!"
]
}
],
"createWebhook": [
- 347,
+ 350,
{
"input": [
- 554,
+ 557,
"CreateWebhookInput!"
]
}
],
"updateWebhook": [
- 347,
+ 350,
{
"input": [
- 555,
+ 558,
"UpdateWebhookInput!"
]
}
],
"deleteWebhook": [
- 347,
+ 350,
{
"id": [
3,
@@ -9999,37 +10041,37 @@ export default {
}
],
"updateMessageFolder": [
- 391,
+ 394,
{
"input": [
- 557,
+ 560,
"UpdateMessageFolderInput!"
]
}
],
"updateMessageFolders": [
- 391,
+ 394,
{
"input": [
- 559,
+ 562,
"UpdateMessageFoldersInput!"
]
}
],
"updateCalendarChannel": [
- 386,
+ 389,
{
"input": [
- 560,
+ 563,
"UpdateCalendarChannelInput!"
]
}
],
"setAppKeyValue": [
- 384,
+ 387,
{
"input": [
- 562,
+ 565,
"SetAppKeyValueInput!"
]
}
@@ -10042,24 +10084,24 @@ export default {
"String!"
],
"scope": [
- 385
+ 388
]
}
],
"enqueueJob": [
- 382,
+ 385,
{
"input": [
- 563,
+ 566,
"EnqueueJobInput!"
]
}
],
"enqueueJobs": [
- 383,
+ 386,
{
"input": [
- 564,
+ 567,
"EnqueueJobsInput!"
]
}
@@ -10068,16 +10110,16 @@ export default {
8,
{
"input": [
- 566,
+ 569,
"ReportAppConnectionAuthFailureInput!"
]
}
],
"createChatThread": [
- 370
+ 373
],
"sendChatMessage": [
- 375,
+ 378,
{
"threadId": [
3,
@@ -10098,13 +10140,13 @@ export default {
1
],
"fileAttachments": [
- 567,
+ 570,
"[FileAttachmentInput!]"
]
}
],
"retryChatMessage": [
- 375,
+ 378,
{
"threadId": [
3,
@@ -10116,7 +10158,7 @@ export default {
}
],
"answerAgentChatQuestion": [
- 375,
+ 378,
{
"threadId": [
3,
@@ -10127,14 +10169,14 @@ export default {
"UUID!"
],
"answers": [
- 568,
+ 571,
"[AgentChatQuestionAnswerInput!]!"
],
"modelId": [
1
],
"fileAttachments": [
- 567,
+ 570,
"[FileAttachmentInput!]"
]
}
@@ -10149,7 +10191,7 @@ export default {
}
],
"renameChatThread": [
- 370,
+ 373,
{
"id": [
3,
@@ -10162,7 +10204,7 @@ export default {
}
],
"archiveChatThread": [
- 370,
+ 373,
{
"id": [
3,
@@ -10171,7 +10213,7 @@ export default {
}
],
"unarchiveChatThread": [
- 370,
+ 373,
{
"id": [
3,
@@ -10198,7 +10240,7 @@ export default {
}
],
"startWorkspaceSetupChat": [
- 377,
+ 380,
{
"companyContext": [
9
@@ -10209,25 +10251,25 @@ export default {
}
],
"createSkill": [
- 368,
+ 371,
{
"input": [
- 569,
+ 572,
"CreateSkillInput!"
]
}
],
"updateSkill": [
- 368,
+ 371,
{
"input": [
- 570,
+ 573,
"UpdateSkillInput!"
]
}
],
"deleteSkill": [
- 368,
+ 371,
{
"id": [
3,
@@ -10236,7 +10278,7 @@ export default {
}
],
"activateSkill": [
- 368,
+ 371,
{
"id": [
3,
@@ -10245,7 +10287,7 @@ export default {
}
],
"deactivateSkill": [
- 368,
+ 371,
{
"id": [
3,
@@ -10254,7 +10296,7 @@ export default {
}
],
"evaluateAgentTurn": [
- 379,
+ 382,
{
"turnId": [
3,
@@ -10263,7 +10305,7 @@ export default {
}
],
"runEvaluationInput": [
- 380,
+ 383,
{
"agentId": [
3,
@@ -10276,16 +10318,16 @@ export default {
}
],
"updateTimelineActivityType": [
- 397,
+ 400,
{
"input": [
- 571,
+ 574,
"UpdateTimelineActivityTypeInput!"
]
}
],
"resetTimelineActivityType": [
- 397,
+ 400,
{
"id": [
3,
@@ -10294,16 +10336,16 @@ export default {
}
],
"getAuthorizationUrlForSSO": [
- 281,
+ 284,
{
"input": [
- 572,
+ 575,
"GetAuthorizationUrlForSSOInput!"
]
}
],
"getLoginTokenFromCredentials": [
- 292,
+ 295,
{
"email": [
1,
@@ -10329,7 +10371,7 @@ export default {
}
],
"signIn": [
- 279,
+ 282,
{
"email": [
1,
@@ -10351,7 +10393,7 @@ export default {
}
],
"verifyEmailAndGetLoginToken": [
- 287,
+ 290,
{
"emailVerificationToken": [
1,
@@ -10371,7 +10413,7 @@ export default {
}
],
"verifyEmailAndGetWorkspaceAgnosticToken": [
- 279,
+ 282,
{
"emailVerificationToken": [
1,
@@ -10387,7 +10429,7 @@ export default {
}
],
"getAuthTokensFromOTP": [
- 291,
+ 294,
{
"otp": [
1,
@@ -10407,7 +10449,7 @@ export default {
}
],
"signUp": [
- 279,
+ 282,
{
"email": [
1,
@@ -10429,7 +10471,7 @@ export default {
}
],
"signUpInWorkspace": [
- 284,
+ 287,
{
"email": [
1,
@@ -10460,10 +10502,10 @@ export default {
}
],
"signUpInNewWorkspace": [
- 284,
+ 287,
{
"input": [
- 573
+ 576
]
}
],
@@ -10475,16 +10517,16 @@ export default {
"String!"
],
"file": [
- 428,
+ 431,
"Upload!"
]
}
],
"generateTransientToken": [
- 285
+ 288
],
"getAuthTokensFromLoginToken": [
- 291,
+ 294,
{
"loginToken": [
1,
@@ -10497,7 +10539,7 @@ export default {
}
],
"getAuthTokensFromSSOExchangeToken": [
- 291,
+ 294,
{
"ssoExchangeToken": [
1,
@@ -10506,7 +10548,7 @@ export default {
}
],
"authorizeApp": [
- 277,
+ 280,
{
"clientId": [
1,
@@ -10531,7 +10573,7 @@ export default {
}
],
"renewToken": [
- 291,
+ 294,
{
"appToken": [
1,
@@ -10548,7 +10590,7 @@ export default {
}
],
"generateApiKeyToken": [
- 290,
+ 293,
{
"apiKeyId": [
3,
@@ -10564,7 +10606,7 @@ export default {
11
],
"emailPasswordResetLink": [
- 280,
+ 283,
{
"email": [
1,
@@ -10579,7 +10621,7 @@ export default {
}
],
"updatePasswordViaResetToken": [
- 282,
+ 285,
{
"passwordResetToken": [
1,
@@ -10592,7 +10634,7 @@ export default {
}
],
"initiateOTPProvisioning": [
- 275,
+ 278,
{
"loginToken": [
1,
@@ -10605,10 +10647,10 @@ export default {
}
],
"initiateOTPProvisioningForAuthenticatedUser": [
- 275
+ 278
],
"deleteTwoFactorAuthenticationMethod": [
- 274,
+ 277,
{
"twoFactorAuthenticationMethodId": [
3,
@@ -10617,7 +10659,7 @@ export default {
}
],
"verifyTwoFactorAuthenticationMethodForAuthenticatedUser": [
- 276,
+ 279,
{
"otp": [
1,
@@ -10641,7 +10683,7 @@ export default {
8,
{
"input": [
- 574,
+ 577,
"UpdateWorkspaceMemberSettingsInput!"
]
}
@@ -10675,7 +10717,7 @@ export default {
236,
{
"input": [
- 575,
+ 578,
"SetupOIDCSsoInput!"
]
}
@@ -10684,7 +10726,7 @@ export default {
236,
{
"input": [
- 576,
+ 579,
"SetupSAMLSsoInput!"
]
}
@@ -10693,7 +10735,7 @@ export default {
232,
{
"input": [
- 577,
+ 580,
"DeleteSsoInput!"
]
}
@@ -10702,13 +10744,13 @@ export default {
233,
{
"input": [
- 578,
+ 581,
"EditSsoInput!"
]
}
],
"createObjectEvent": [
- 362,
+ 365,
{
"event": [
1,
@@ -10728,10 +10770,10 @@ export default {
}
],
"trackAnalytics": [
- 362,
+ 365,
{
"type": [
- 579,
+ 582,
"AnalyticsType!"
],
"name": [
@@ -10746,7 +10788,7 @@ export default {
}
],
"duplicateDashboard": [
- 360,
+ 363,
{
"id": [
3,
@@ -10755,7 +10797,7 @@ export default {
}
],
"impersonate": [
- 295,
+ 298,
{
"userId": [
3,
@@ -10768,28 +10810,28 @@ export default {
}
],
"stopImpersonation": [
- 296
+ 299
],
"createCalendarEvent": [
- 352,
+ 355,
{
"input": [
- 580,
+ 583,
"CreateCalendarEventInput!"
]
}
],
"sendEmail": [
- 361,
+ 364,
{
"input": [
- 581,
+ 584,
"SendEmailInput!"
]
}
],
"startChannelSync": [
- 351,
+ 354,
{
"connectedAccountId": [
3,
@@ -10798,14 +10840,14 @@ export default {
}
],
"saveImapSmtpCaldavAccount": [
- 346,
+ 349,
{
"handle": [
1,
"String!"
],
"connectionParameters": [
- 583,
+ 586,
"EmailAccountConnectionParameters!"
],
"id": [
@@ -10817,13 +10859,13 @@ export default {
195,
{
"input": [
- 585,
+ 588,
"UpdateLabPublicFeatureFlagInput!"
]
}
],
"createPublicDomain": [
- 312,
+ 315,
{
"domain": [
1,
@@ -10845,7 +10887,7 @@ export default {
}
],
"checkPublicDomainValidRecords": [
- 271,
+ 274,
{
"domain": [
1,
@@ -10854,7 +10896,7 @@ export default {
}
],
"createDevelopmentApplication": [
- 310,
+ 313,
{
"universalIdentifier": [
1,
@@ -10867,7 +10909,7 @@ export default {
}
],
"syncApplication": [
- 311,
+ 314,
{
"manifest": [
9,
@@ -10882,10 +10924,10 @@ export default {
}
],
"uploadApplicationFile": [
- 303,
+ 306,
{
"file": [
- 428,
+ 431,
"Upload!"
],
"applicationUniversalIdentifier": [
@@ -10893,7 +10935,7 @@ export default {
"String!"
],
"fileFolder": [
- 307,
+ 310,
"FileFolder!"
],
"filePath": [
@@ -10903,20 +10945,20 @@ export default {
}
],
"createApplicationFileUploads": [
- 309,
+ 312,
{
"applicationUniversalIdentifier": [
1,
"String!"
],
"files": [
- 586,
+ 589,
"[ApplicationFileUploadRequestInput!]!"
]
}
],
"completeApplicationFileUploads": [
- 305,
+ 308,
{
"applicationUniversalIdentifier": [
1,
@@ -11033,7 +11075,7 @@ export default {
3
],
"update": [
- 427
+ 430
],
"__typename": [
1
@@ -11106,7 +11148,7 @@ export default {
3
],
"payload": [
- 429
+ 432
],
"__typename": [
1
@@ -11189,7 +11231,7 @@ export default {
3
],
"update": [
- 435
+ 438
],
"__typename": [
1
@@ -11360,19 +11402,19 @@ export default {
3
],
"view": [
- 441
+ 444
],
"viewFields": [
- 442
+ 445
],
"viewFilters": [
- 443
+ 446
],
"viewFilterGroups": [
- 444
+ 447
],
"viewSorts": [
- 445
+ 448
],
"__typename": [
1
@@ -11521,7 +11563,7 @@ export default {
3
],
"update": [
- 448
+ 451
],
"__typename": [
1
@@ -11559,7 +11601,7 @@ export default {
3
],
"update": [
- 452
+ 455
],
"__typename": [
1
@@ -11635,7 +11677,7 @@ export default {
3
],
"update": [
- 457
+ 460
],
"__typename": [
1
@@ -11699,10 +11741,10 @@ export default {
3
],
"groups": [
- 462
+ 465
],
"fields": [
- 463
+ 466
],
"__typename": [
1
@@ -11722,7 +11764,7 @@ export default {
8
],
"fields": [
- 463
+ 466
],
"__typename": [
1
@@ -11893,7 +11935,7 @@ export default {
8
],
"tabs": [
- 475
+ 478
],
"__typename": [
1
@@ -11916,7 +11958,7 @@ export default {
102
],
"widgets": [
- 476
+ 479
],
"__typename": [
1
@@ -12081,7 +12123,7 @@ export default {
},
"CreateOneObjectInput": {
"object": [
- 482
+ 485
],
"__typename": [
1
@@ -12141,7 +12183,7 @@ export default {
},
"UpdateOneObjectInput": {
"update": [
- 485
+ 488
],
"id": [
3
@@ -12194,7 +12236,7 @@ export default {
24
],
"translations": [
- 486
+ 489
],
"__typename": [
1
@@ -12216,7 +12258,7 @@ export default {
},
"CreateOneIndexInput": {
"index": [
- 488
+ 491
],
"__typename": [
1
@@ -12227,10 +12269,10 @@ export default {
3
],
"fields": [
- 489
+ 492
],
"indexType": [
- 260
+ 263
],
"__typename": [
1
@@ -12312,7 +12354,7 @@ export default {
3
],
"update": [
- 494
+ 497
],
"__typename": [
1
@@ -12481,7 +12523,7 @@ export default {
3
],
"update": [
- 499
+ 502
],
"__typename": [
1
@@ -12611,7 +12653,7 @@ export default {
1
],
"update": [
- 504
+ 507
],
"__typename": [
1
@@ -12656,7 +12698,7 @@ export default {
1
],
"update": [
- 507
+ 510
],
"__typename": [
1
@@ -12702,7 +12744,7 @@ export default {
},
"CreateOneFieldMetadataInput": {
"field": [
- 512
+ 515
],
"__typename": [
1
@@ -12710,7 +12752,7 @@ export default {
},
"CreateFieldInput": {
"type": [
- 252
+ 255
],
"name": [
1
@@ -12781,7 +12823,7 @@ export default {
3
],
"update": [
- 514
+ 517
],
"__typename": [
1
@@ -12846,7 +12888,7 @@ export default {
9
],
"translations": [
- 486
+ 489
],
"__typename": [
1
@@ -12885,7 +12927,7 @@ export default {
3
],
"update": [
- 518
+ 521
],
"__typename": [
1
@@ -12970,7 +13012,7 @@ export default {
},
"UpdateRoleInput": {
"update": [
- 523
+ 526
],
"id": [
3
@@ -13025,7 +13067,7 @@ export default {
3
],
"objectPermissions": [
- 525
+ 528
],
"__typename": [
1
@@ -13067,7 +13109,7 @@ export default {
3
],
"fieldPermissions": [
- 528
+ 531
],
"__typename": [
1
@@ -13098,10 +13140,10 @@ export default {
3
],
"predicates": [
- 530
+ 533
],
"predicateGroups": [
- 531
+ 534
],
"__typename": [
1
@@ -13249,7 +13291,7 @@ export default {
1
],
"visibility": [
- 339
+ 342
],
"__typename": [
1
@@ -13266,7 +13308,7 @@ export default {
1
],
"visibility": [
- 339
+ 342
],
"__typename": [
1
@@ -13277,7 +13319,7 @@ export default {
3
],
"update": [
- 540
+ 543
],
"__typename": [
1
@@ -13285,16 +13327,16 @@ export default {
},
"UpdateMessageChannelInputUpdates": {
"visibility": [
- 319
+ 322
],
"isContactAutoCreationEnabled": [
8
],
"contactAutoCreationPolicy": [
- 321
+ 324
],
"messageFolderImportPolicy": [
- 322
+ 325
],
"isSyncEnabled": [
8
@@ -13342,7 +13384,7 @@ export default {
1
],
"visibility": [
- 319
+ 322
],
"__typename": [
1
@@ -13356,7 +13398,7 @@ export default {
1
],
"visibility": [
- 319
+ 322
],
"isSyncEnabled": [
8
@@ -13370,7 +13412,7 @@ export default {
3
],
"messages": [
- 546
+ 549
],
"__typename": [
1
@@ -13393,7 +13435,7 @@ export default {
4
],
"participants": [
- 547
+ 550
],
"__typename": [
1
@@ -13401,7 +13443,7 @@ export default {
},
"AppMessageParticipantInput": {
"role": [
- 548
+ 551
],
"handle": [
1
@@ -13439,7 +13481,7 @@ export default {
3
],
"messages": [
- 551
+ 554
],
"__typename": [
1
@@ -13447,13 +13489,13 @@ export default {
},
"RunAgentMessageInput": {
"role": [
- 552
+ 555
],
"content": [
1
],
"attachments": [
- 553
+ 556
],
"__typename": [
1
@@ -13496,7 +13538,7 @@ export default {
3
],
"update": [
- 556
+ 559
],
"__typename": [
1
@@ -13524,7 +13566,7 @@ export default {
3
],
"update": [
- 558
+ 561
],
"__typename": [
1
@@ -13543,7 +13585,7 @@ export default {
3
],
"update": [
- 558
+ 561
],
"__typename": [
1
@@ -13554,7 +13596,7 @@ export default {
3
],
"update": [
- 561
+ 564
],
"__typename": [
1
@@ -13562,13 +13604,13 @@ export default {
},
"UpdateCalendarChannelInputUpdates": {
"visibility": [
- 389
+ 392
],
"isContactAutoCreationEnabled": [
8
],
"contactAutoCreationPolicy": [
- 390
+ 393
],
"isSyncEnabled": [
8
@@ -13585,7 +13627,7 @@ export default {
9
],
"scope": [
- 385
+ 388
],
"__typename": [
1
@@ -13619,7 +13661,7 @@ export default {
9
],
"jobs": [
- 565
+ 568
],
"retryLimit": [
28
@@ -13741,7 +13783,7 @@ export default {
8
],
"translations": [
- 486
+ 489
],
"__typename": [
1
@@ -13907,7 +13949,7 @@ export default {
1
],
"files": [
- 582
+ 585
],
"__typename": [
1
@@ -13929,13 +13971,13 @@ export default {
1
],
"IMAP": [
- 584
+ 587
],
"SMTP": [
- 584
+ 587
],
"CALDAV": [
- 584
+ 587
],
"__typename": [
1
@@ -13974,7 +14016,7 @@ export default {
},
"ApplicationFileUploadRequestInput": {
"fileFolder": [
- 307
+ 310
],
"filePath": [
1
@@ -13997,16 +14039,16 @@ export default {
}
],
"logicFunctionLogs": [
- 273,
+ 276,
{
"input": [
- 588,
+ 591,
"LogicFunctionLogsInput!"
]
}
],
"onAgentChatEvent": [
- 376,
+ 379,
{
"threadId": [
3,
@@ -14015,19 +14057,19 @@ export default {
}
],
"eventLogsLive": [
- 363,
+ 366,
{
"table": [
- 416,
+ 419,
"EventLogTable!"
]
}
],
"exportRecords": [
- 366,
+ 369,
{
"input": [
- 589,
+ 592,
"CreateRecordExportInput!"
]
}
diff --git a/packages/twenty-docs/developers/extend/apps/config/application.mdx b/packages/twenty-docs/developers/extend/apps/config/application.mdx
index 8776d9550e1..6c5f8f105eb 100644
--- a/packages/twenty-docs/developers/extend/apps/config/application.mdx
+++ b/packages/twenty-docs/developers/extend/apps/config/application.mdx
@@ -44,9 +44,10 @@ Notes:
- `applicationVariables` become environment variables for your functions and front components. In logic functions (server-side), they are available as `process.env.VARIABLE_NAME`. In front components, use `getApplicationVariable('VARIABLE_NAME')` from `twenty-sdk/front-component`. Variables marked with `isSecret: true` are only injected into logic functions. Front components receive only non-secret variables.
- Your app can also read and update its own variable values at runtime, which is how a custom settings component saves what the user typed: see [Reading and updating variables at runtime](/developers/extend/apps/layout/front-components#reading-and-updating-variables-at-runtime). An application only ever reaches its own variables, in its own workspace.
- The default role is detected automatically from the role file marked with [`defineApplicationRole()`](/developers/extend/apps/config/roles) — you do not need to reference it from `defineApplication()`.
-- Pre-install, post-install, and uninstall functions are detected automatically during the manifest build — you do not need to reference them in `defineApplication()`.
+- Pre-install, post-install, and uninstall functions, and the health check, are detected automatically during the manifest build — you do not need to reference them in `defineApplication()`.
- Passing `defaultRoleUniversalIdentifier` explicitly is still supported for backward compatibility, but is deprecated in favor of `defineApplicationRole()`.
- `serverVariables` are instance-scoped configuration and secrets (e.g. API keys). Unlike `applicationVariables`, they declare no value in the manifest — the workspace operator fills them in from the app's settings, and they are injected into logic functions only once set.
+- An app can report its own configuration state with [`defineHealthCheck()`](/developers/extend/apps/logic/logic-functions#health-check), for what only the app can know — a key that is present but revoked, a third-party account on the wrong plan. `isRequired` covers what Twenty can see by itself; the health check covers the rest.
- Both kinds of variable accept `isRequired: true`. A required variable the workspace has not filled in yet leaves the app unconfigured: its settings page shows a banner naming the missing variables, with a button that jumps to the tab where they are set. Mark as required only what the app genuinely cannot run without — an optional variable with a sensible default should stay optional.
- Both kinds of variable accept `isDeprecated: true`. Use it to retire a variable instead of deleting it: keeping the key declared preserves the stored value (deleting it destroys the value the operator entered), and the variable is still injected, so your code can fall back to it — `process.env.NEW_API_KEY ?? process.env.API_KEY`. A deprecated variable disappears from the app's settings once it has no value, and never counts toward the app's configuration check, so `isDeprecated` beats `isRequired`.
- To render a custom configuration UI as the app's **Settings** tab (in place of the default **Variables** tab), declare a front component with [`defineSettingsFrontComponent()`](/developers/extend/apps/layout/front-components#custom-settings-component) in its own file. Only one is allowed per app. System-managed sections (auto-upgrade, App URL, connections) stay in the app's **General** tab, where App URL only shows with **Advanced mode** on.
diff --git a/packages/twenty-docs/developers/extend/apps/getting-started/project-structure.mdx b/packages/twenty-docs/developers/extend/apps/getting-started/project-structure.mdx
index 9abc10826c7..0d8340980b1 100644
--- a/packages/twenty-docs/developers/extend/apps/getting-started/project-structure.mdx
+++ b/packages/twenty-docs/developers/extend/apps/getting-started/project-structure.mdx
@@ -16,6 +16,8 @@ my-twenty-app/
universal-identifiers.ts # Auto-generated UUIDs and metadata
front-components/
main-page.tsx # Welcome page component
+ logic-functions/
+ health-check.ts # Reports whether the app can run
navigation-menu-items/
main-page.navigation-menu-item.ts # Sidebar entry for the welcome page
page-layouts/
@@ -47,6 +49,7 @@ my-twenty-app/
| `src/default-role.ts` | Default role controlling what your logic functions can access. |
| `src/constants/universal-identifiers.ts` | Auto-generated UUIDs and metadata (display name, description). |
| `src/front-components/`, `src/navigation-menu-items/`, `src/page-layouts/` | A starter welcome page: a front component rendered by a standalone page layout, reachable from the sidebar. |
+| `src/logic-functions/health-check.ts` | A starter [health check](/developers/extend/apps/logic/logic-functions#health-check) reporting `ok`. Fill it in to surface configuration problems only your app can detect. |
| `src/__tests__/` | A unit test plus an integration test (with its global setup) that syncs the app against a real server. |
| `public/` | Static assets (images, fonts) served with your app. |
| `locales/` | Translation catalogs. `en.json` is the source catalog `dev:translations-extract` fills in; the set of files here is what a sync publishes, so an empty folder declares no translations. `locales/compiled/` is written by `pull` for entries whose source strings are not in the tree yet, is published by a sync too, and is not meant to be edited by hand. |
diff --git a/packages/twenty-docs/developers/extend/apps/logic/logic-functions.mdx b/packages/twenty-docs/developers/extend/apps/logic/logic-functions.mdx
index 2650f2f3e0b..7f5ebf07299 100644
--- a/packages/twenty-docs/developers/extend/apps/logic/logic-functions.mdx
+++ b/packages/twenty-docs/developers/extend/apps/logic/logic-functions.mdx
@@ -818,6 +818,62 @@ const handler = async (params: { parentMessageId?: string }) => {
**Install hooks** — pre-install, post-install, and uninstall handlers — share this runtime but are declared with their own define functions and don't take trigger settings. See [Install Hooks](/developers/extend/apps/config/install-hooks) for `definePreInstallLogicFunction`, `definePostInstallLogicFunction`, and `defineUninstallLogicFunction`.
</Note>
+## Health check
+
+Declare a health check with `defineHealthCheck` to report whether your app is actually able to run. It is for what only the app can know: a key that is present but revoked, an account on the wrong plan, a webhook that was never registered. What Twenty can see by itself — a required variable nobody filled in — is covered by [`isRequired`](/developers/extend/apps/config/application) and needs no code.
+
+It runs server-side, so it reads secret variables like any other logic function. The handler takes no arguments.
+
+```ts src/logic-functions/health-check.ts
+import { defineHealthCheck } from 'twenty-sdk/define';
+
+export default defineHealthCheck({
+ universalIdentifier: 'f3b6a4d2-9c81-4e0a-b5c7-2d1e8f4a6b03',
+ name: 'health-check',
+ handler: async () => {
+ const response = await fetch('https://api.stripe.com/v1/account', {
+ headers: { Authorization: `Bearer ${process.env.API_KEY}` },
+ });
+
+ if (response.status === 401) {
+ return {
+ status: 'ERROR',
+ title: 'Your Stripe key was revoked',
+ description: 'Generate a new one from the Stripe dashboard.',
+ action: { label: 'Add a key', location: '/settings/billing' },
+ };
+ }
+
+ return { status: 'OK' };
+ },
+});
+```
+
+The result is a discriminated union, not a boolean:
+
+| Field | Required | Description |
+| --- | --- | --- |
+| `status` | Yes | `OK` when there is nothing to report, otherwise `SUCCESS`, `INFO`, `WARNING`, `ERROR` or `NEUTRAL` |
+| `title` | For every status but `OK` | The banner's first line on the app's settings page |
+| `description` | No | A second line under the title, for what to do about it |
+| `action` | No | `{ label, location }` for the banner's button. `location` is where the button redirects to: a path inside Twenty such as `/settings/billing`, optionally with a hash to select a tab, or a hash alone such as `#variables` to move to a tab of your own settings page; omit it to land on the app's configuration tab |
+
+`OK` shows no banner at all; every other status renders the title in a banner coloured after it, so pick the one that matches how much the person needs to act. The statuses are Twenty's own `ApplicationHealthStatus`, so the plain string and the enum member are interchangeable:
+
+```ts
+import { ApplicationHealthStatus } from 'twenty-sdk/define';
+
+return { status: ApplicationHealthStatus.WARNING, title: 'Quota almost reached' };
+```
+
+Twenty runs the check when the app's settings page opens and shows the result in a banner there. Nothing is stored, so what you report is always what the check just returned.
+
+A check that throws, times out or returns a shape Twenty cannot read is treated as **unknown**, never as an error, and no banner is shown. A third-party outage should not paint every installed app red — if it did, people would learn to ignore the signal.
+
+The location has to stay inside Twenty, so it starts with `/` or `#`: an external, protocol-relative or relative one loses its button rather than becoming a redirect somewhere else. The button is also dropped when the app reports no location and has no configuration tab to fall back to, so a check on an app with no variables and no custom settings tab shows its title without a dead button.
+
+Only one health check is allowed per app; declaring more than one fails the build.
+
## Create a timeline activity
Use `createTimelineActivity()` to publish an explicit domain event from a logic function. Define the event first as a [timeline activity type](/developers/extend/apps/data/timeline-activity-types), then address the type and objects by their stable universal identifiers:
diff --git a/packages/twenty-docs/developers/extend/apps/logic/overview.mdx b/packages/twenty-docs/developers/extend/apps/logic/overview.mdx
index 89cd3fba3d9..d5cdf59b5e7 100644
--- a/packages/twenty-docs/developers/extend/apps/logic/overview.mdx
+++ b/packages/twenty-docs/developers/extend/apps/logic/overview.mdx
@@ -64,4 +64,6 @@ Functions run sandboxed in isolated Node.js processes and access the workspace t
<Note>
**Install-time hooks** — code that runs before or after the install — share this runtime but use their own define functions and live under [Config → Install Hooks](/developers/extend/apps/config/install-hooks).
+
+The [**health check**](/developers/extend/apps/logic/logic-functions#health-check) shares it too. It declares no trigger: Twenty calls it on demand when the app's settings page opens.
</Note>
diff --git a/packages/twenty-front/src/generated-metadata/graphql.ts b/packages/twenty-front/src/generated-metadata/graphql.ts
index ff9ec6865a7..27ea9728714 100644
--- a/packages/twenty-front/src/generated-metadata/graphql.ts
+++ b/packages/twenty-front/src/generated-metadata/graphql.ts
@@ -345,6 +345,7 @@ export type Application = {
defaultRoleId?: Maybe<Scalars['String']['output']>;
description?: Maybe<Scalars['String']['output']>;
frontComponents: Array<FrontComponent>;
+ healthCheckLogicFunctionId?: Maybe<Scalars['UUID']['output']>;
id: Scalars['UUID']['output'];
logicFunctions: Array<LogicFunction>;
logoFileId?: Maybe<Scalars['UUID']['output']>;
@@ -481,6 +482,30 @@ export type ApplicationFileUploadTarget = {
uploadUrl: Scalars['String']['output'];
};
+export type ApplicationHealthCheckAction = {
+ __typename?: 'ApplicationHealthCheckAction';
+ label: Scalars['String']['output'];
+ location?: Maybe<Scalars['String']['output']>;
+};
+
+export type ApplicationHealthCheckResult = {
+ __typename?: 'ApplicationHealthCheckResult';
+ action?: Maybe<ApplicationHealthCheckAction>;
+ description?: Maybe<Scalars['String']['output']>;
+ status: ApplicationHealthStatus;
+ title?: Maybe<Scalars['String']['output']>;
+};
+
+export enum ApplicationHealthStatus {
+ ERROR = 'ERROR',
+ INFO = 'INFO',
+ NEUTRAL = 'NEUTRAL',
+ OK = 'OK',
+ SUCCESS = 'SUCCESS',
+ UNKNOWN = 'UNKNOWN',
+ WARNING = 'WARNING'
+}
+
export type ApplicationRegistration = {
__typename?: 'ApplicationRegistration';
createdAt: Scalars['DateTime']['output'];
@@ -3142,6 +3167,7 @@ export type Mutation = {
revokeUserSession: Scalars['Boolean']['output'];
rotateApplicationRegistrationClientSecret: RotateClientSecret;
runAgent: RunAgentResult;
+ runApplicationHealthCheck?: Maybe<ApplicationHealthCheckResult>;
runEvaluationInput: AgentTurn;
saveImapSmtpCaldavAccount: ImapSmtpCaldavConnectionSuccess;
sendChatMessage: SendChatMessageResult;
@@ -4019,6 +4045,11 @@ export type MutationRunAgentArgs = {
};
+export type MutationRunApplicationHealthCheckArgs = {
+ applicationId: Scalars['UUID']['input'];
+};
+
+
export type MutationRunEvaluationInputArgs = {
agentId: Scalars['UUID']['input'];
input: Scalars['String']['input'];
@@ -7873,7 +7904,14 @@ 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, 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, isRequired: 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, isSearchable?: 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, healthCheckLogicFunctionId?: 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, isRequired: 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, isSearchable?: 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 RunApplicationHealthCheckMutationVariables = Exact<{
+ applicationId: Scalars['UUID']['input'];
+}>;
+
+
+export type RunApplicationHealthCheckMutation = { __typename?: 'Mutation', runApplicationHealthCheck?: { __typename?: 'ApplicationHealthCheckResult', status: ApplicationHealthStatus, title?: string | null, description?: string | null, action?: { __typename?: 'ApplicationHealthCheckAction', label: string, location?: string | null } | null } | null };
export type FindManyApplicationsQueryVariables = Exact<{ [key: string]: never; }>;
@@ -7885,7 +7923,7 @@ export type FindOneApplicationQueryVariables = Exact<{
}>;
-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, isRequired: 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, isSearchable?: 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, healthCheckLogicFunctionId?: 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, isRequired: 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, isSearchable?: 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'];
@@ -10100,7 +10138,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":"isSearchable"}},{"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":"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":"isRequired"}},{"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":"isSearchable"}},{"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":"healthCheckLogicFunctionId"}},{"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":"isRequired"}},{"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":"isSearchable"}},{"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>;
@@ -10189,8 +10227,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 RunApplicationHealthCheckDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"RunApplicationHealthCheck"},"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":"runApplicationHealthCheck"},"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":"status"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"action"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"label"}},{"kind":"Field","name":{"kind":"Name","value":"location"}}]}}]}}]}}]} as unknown as DocumentNode<RunApplicationHealthCheckMutation, RunApplicationHealthCheckMutationVariables>;
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":"isSearchable"}},{"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":"isRequired"}},{"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 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":"isSearchable"}},{"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":"healthCheckLogicFunctionId"}},{"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":"isRequired"}},{"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>;
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 b0aa1d6b2ea..4d024aba919 100644
--- a/packages/twenty-front/src/modules/applications/graphql/fragments/applicationFragment.ts
+++ b/packages/twenty-front/src/modules/applications/graphql/fragments/applicationFragment.ts
@@ -25,6 +25,7 @@ export const APPLICATION_FRAGMENT = gql`
autoUpgrade
defaultRoleId
settingsCustomTabFrontComponentId
+ healthCheckLogicFunctionId
availablePackages
applicationVariables {
id
diff --git a/packages/twenty-front/src/modules/applications/graphql/mutations/runApplicationHealthCheck.ts b/packages/twenty-front/src/modules/applications/graphql/mutations/runApplicationHealthCheck.ts
new file mode 100644
index 00000000000..e9fa438b656
--- /dev/null
+++ b/packages/twenty-front/src/modules/applications/graphql/mutations/runApplicationHealthCheck.ts
@@ -0,0 +1,15 @@
+import { gql } from '@apollo/client';
+
+export const RUN_APPLICATION_HEALTH_CHECK = gql`
+ mutation RunApplicationHealthCheck($applicationId: UUID!) {
+ runApplicationHealthCheck(applicationId: $applicationId) {
+ status
+ title
+ description
+ action {
+ label
+ location
+ }
+ }
+ }
+`;
diff --git a/packages/twenty-front/src/modules/auth/utils/isValidReturnToPath.ts b/packages/twenty-front/src/modules/auth/utils/isValidReturnToPath.ts
index 9f7f908e11a..4e0b1d864e6 100644
--- a/packages/twenty-front/src/modules/auth/utils/isValidReturnToPath.ts
+++ b/packages/twenty-front/src/modules/auth/utils/isValidReturnToPath.ts
@@ -12,7 +12,9 @@ const EXCLUDED_PATH_PREFIXES = [
].map(extractPathPrefix);
export const isValidReturnToPath = (path: string): boolean => {
- if (!isSafeInternalPath(path) || path === '/') {
+ // Redirecting after login needs a page to land on, so the hash-only paths
+ // isSafeInternalPath allows are not valid here.
+ if (!isSafeInternalPath(path) || !path.startsWith('/') || path === '/') {
return false;
}
diff --git a/packages/twenty-front/src/modules/ui/navigation/utils/isSafeInternalPath.ts b/packages/twenty-front/src/modules/ui/navigation/utils/isSafeInternalPath.ts
index 055decf3b5c..361fa1f3711 100644
--- a/packages/twenty-front/src/modules/ui/navigation/utils/isSafeInternalPath.ts
+++ b/packages/twenty-front/src/modules/ui/navigation/utils/isSafeInternalPath.ts
@@ -1,8 +1,10 @@
import { isNonEmptyString } from '@sniptt/guards';
+// A leading '#' keeps the current page and only moves the hash, so it cannot
+// leave the app either.
export const isSafeInternalPath = (path: string): boolean =>
isNonEmptyString(path) &&
- path.startsWith('/') &&
+ (path.startsWith('/') || path.startsWith('#')) &&
!path.startsWith('//') &&
!path.includes('\\') &&
!/[\u0000-\u001f\u007f]/u.test(path);
diff --git a/packages/twenty-front/src/pages/settings/applications/SettingsApplicationDetails.tsx b/packages/twenty-front/src/pages/settings/applications/SettingsApplicationDetails.tsx
index 374e23cd034..8d5855b27db 100644
--- a/packages/twenty-front/src/pages/settings/applications/SettingsApplicationDetails.tsx
+++ b/packages/twenty-front/src/pages/settings/applications/SettingsApplicationDetails.tsx
@@ -14,12 +14,11 @@ 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 { useSetAtomComponentState } from '@/ui/utilities/state/jotai/hooks/useSetAtomComponentState';
import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';
import { useQuery } from '@apollo/client/react';
import { t } from '@lingui/core/macro';
import { useCallback } from 'react';
-import { useParams } from 'react-router-dom';
+import { useNavigate, useParams } from 'react-router-dom';
import { SettingsPath } from 'twenty-shared/types';
import {
getSettingsPath,
@@ -43,12 +42,15 @@ import {
import { useNavigateSettings } from '~/hooks/useNavigateSettings';
import { CUSTOM_APPLICATION_ILLUSTRATIONS } from '~/pages/settings/applications/constants/CustomApplicationIllustrations';
import { STANDARD_APPLICATION_ILLUSTRATIONS } from '~/pages/settings/applications/constants/StandardApplicationIllustrations';
+import { useApplicationHealthCheck } from '~/pages/settings/applications/hooks/useApplicationHealthCheck';
import { useApplicationVariablesDraft } from '~/pages/settings/applications/hooks/useApplicationVariablesDraft';
+import { SettingsApplicationHealthBanner } from '~/pages/settings/applications/components/SettingsApplicationHealthBanner';
import { SettingsApplicationMissingConfigurationBanner } from '~/pages/settings/applications/components/SettingsApplicationMissingConfigurationBanner';
import { SettingsApplicationCustomSettingsSection } from '~/pages/settings/applications/tabs/SettingsApplicationCustomSettingsSection';
import { SettingsApplicationDetailGeneralTab } from '~/pages/settings/applications/tabs/SettingsApplicationDetailGeneralTab';
import { SettingsApplicationDetailVariablesTab } from '~/pages/settings/applications/tabs/SettingsApplicationDetailVariablesTab';
import { getApplicationDescriptionSummary } from '~/pages/settings/applications/utils/getApplicationDescriptionSummary';
+import { getApplicationHealthBanner } from '~/pages/settings/applications/utils/getApplicationHealthBanner';
import { getDisplayedApplicationVariables } from '~/pages/settings/applications/utils/getDisplayedApplicationVariables';
import { getMissingRequiredApplicationVariables } from '~/pages/settings/applications/utils/getMissingRequiredApplicationVariables';
import { isNewerSemver } from '~/pages/settings/applications/utils/isNewerSemver';
@@ -60,6 +62,8 @@ const GENERAL_TAB_ID = 'general';
const VARIABLES_TAB_ID = 'variables';
const CUSTOM_SETTINGS_TAB_ID = 'settings';
+const CONFIGURATION_TAB_IDS = [CUSTOM_SETTINGS_TAB_ID, VARIABLES_TAB_ID];
+
export const SettingsApplicationDetails = () => {
const { applicationId = '' } = useParams<{ applicationId: string }>();
@@ -68,11 +72,6 @@ export const SettingsApplicationDetails = () => {
APPLICATION_DETAIL_ID,
);
- const setActiveTabId = useSetAtomComponentState(
- activeTabIdComponentState,
- APPLICATION_DETAIL_ID,
- );
-
const { data, refetch } = useQuery(FindOneApplicationDocument, {
variables: { id: applicationId },
skip: !applicationId,
@@ -150,6 +149,7 @@ export const SettingsApplicationDetails = () => {
};
const navigate = useNavigateSettings();
+ const redirect = useNavigate();
const handleUninstallCompleted = useCallback(() => {
navigate(SettingsPath.Applications);
}, [navigate]);
@@ -180,15 +180,24 @@ export const SettingsApplicationDetails = () => {
const missingRequiredApplicationVariables =
getMissingRequiredApplicationVariables(displayedApplicationVariables);
- const configurationTabId = hasCustomSettingsTab
- ? CUSTOM_SETTINGS_TAB_ID
- : VARIABLES_TAB_ID;
+ const hasVariablesTab =
+ !hasCustomSettingsTab && displayedApplicationVariables.length > 0;
+
+ const { healthCheckResult, runHealthCheck } = useApplicationHealthCheck({
+ applicationId,
+ healthCheckLogicFunctionId: application?.healthCheckLogicFunctionId,
+ });
+
+ const saveApplicationVariablesAndRecheckHealth = async () => {
+ await saveApplicationVariables();
+ await runHealthCheck();
+ };
const tabs: SingleTabProps[] = [
{ id: GENERAL_TAB_ID, title: t`General`, Icon: IconSettings },
// A custom settings tab lays out the application variables itself, so
// exposing them again would duplicate the same fields.
- ...(!hasCustomSettingsTab && displayedApplicationVariables.length > 0
+ ...(hasVariablesTab
? [{ id: VARIABLES_TAB_ID, title: t`Variables`, Icon: IconVariable }]
: []),
...(hasCustomSettingsTab
@@ -202,6 +211,38 @@ export const SettingsApplicationDetails = () => {
: []),
];
+ const configurationTabId = tabs.find((tab) =>
+ CONFIGURATION_TAB_IDS.includes(tab.id),
+ )?.id;
+
+ const configurationTabLocation = isDefined(configurationTabId)
+ ? getSettingsPath(
+ SettingsPath.ApplicationDetail,
+ { applicationId },
+ undefined,
+ configurationTabId,
+ )
+ : undefined;
+
+ const goToConfigurationTab = isDefined(configurationTabLocation)
+ ? () => redirect(configurationTabLocation)
+ : undefined;
+
+ const healthBanner = isNonEmptyArray(missingRequiredApplicationVariables)
+ ? undefined
+ : getApplicationHealthBanner({
+ healthCheckResult,
+ fallbackLocation: configurationTabLocation,
+ });
+
+ const healthBannerAction = healthBanner?.action;
+ const healthBannerButton = isDefined(healthBannerAction)
+ ? {
+ label: healthBannerAction.label,
+ onClick: () => redirect(healthBannerAction.to),
+ }
+ : undefined;
+
const renderActiveTabContent = () => {
if (!isDefined(application)) {
return <SettingsSectionSkeletonLoader />;
@@ -277,7 +318,7 @@ export const SettingsApplicationDetails = () => {
variant="solid"
color="accent"
size="sm"
- onClick={saveApplicationVariables}
+ onClick={saveApplicationVariablesAndRecheckHealth}
disabled={
!hasUnsavedApplicationVariables || isSavingApplicationVariables
}
@@ -293,10 +334,21 @@ export const SettingsApplicationDetails = () => {
}
>
<SettingsPageContainer overflow="visible">
- {isNonEmptyArray(missingRequiredApplicationVariables) && (
- <SettingsApplicationMissingConfigurationBanner
- missingApplicationVariables={missingRequiredApplicationVariables}
- onConfigure={() => setActiveTabId(configurationTabId)}
+ {isNonEmptyArray(missingRequiredApplicationVariables) &&
+ isDefined(goToConfigurationTab) && (
+ <SettingsApplicationMissingConfigurationBanner
+ missingApplicationVariables={
+ missingRequiredApplicationVariables
+ }
+ onConfigure={goToConfigurationTab}
+ />
+ )}
+ {isDefined(healthBanner) && (
+ <SettingsApplicationHealthBanner
+ healthStatus={healthBanner.status}
+ title={healthBanner.title}
+ description={healthBanner.description}
+ action={healthBannerButton}
/>
)}
{isApplicationStopped && (
diff --git a/packages/twenty-front/src/pages/settings/applications/components/SettingsApplicationHealthBanner.tsx b/packages/twenty-front/src/pages/settings/applications/components/SettingsApplicationHealthBanner.tsx
new file mode 100644
index 00000000000..a0d3577e397
--- /dev/null
+++ b/packages/twenty-front/src/pages/settings/applications/components/SettingsApplicationHealthBanner.tsx
@@ -0,0 +1,35 @@
+import { isDefined } from 'twenty-shared/utils';
+import { Callout } from 'twenty-ui/primitives/feedback';
+import { type ApplicationHealthStatus } from '~/generated-metadata/graphql';
+import { getApplicationHealthBannerAppearance } from '~/pages/settings/applications/utils/getApplicationHealthBannerAppearance';
+
+type SettingsApplicationHealthBannerProps = {
+ healthStatus: ApplicationHealthStatus;
+ title: string;
+ description?: string;
+ action?: { label: string; onClick: () => void };
+};
+
+export const SettingsApplicationHealthBanner = ({
+ healthStatus,
+ title,
+ description,
+ action,
+}: SettingsApplicationHealthBannerProps) => {
+ const appearance = getApplicationHealthBannerAppearance(healthStatus);
+
+ if (!isDefined(appearance)) {
+ return null;
+ }
+
+ return (
+ <Callout
+ variant={appearance.variant}
+ Icon={appearance.Icon}
+ title={title}
+ description={description}
+ action={action}
+ fullWidth
+ />
+ );
+};
diff --git a/packages/twenty-front/src/pages/settings/applications/components/__tests__/SettingsApplicationHealthBanner.test.tsx b/packages/twenty-front/src/pages/settings/applications/components/__tests__/SettingsApplicationHealthBanner.test.tsx
new file mode 100644
index 00000000000..25375a6aeae
--- /dev/null
+++ b/packages/twenty-front/src/pages/settings/applications/components/__tests__/SettingsApplicationHealthBanner.test.tsx
@@ -0,0 +1,57 @@
+import { i18n } from '@lingui/core';
+import { I18nProvider } from '@lingui/react';
+import { render, screen } from '@testing-library/react';
+
+import { ApplicationHealthStatus } from '~/generated-metadata/graphql';
+import { SettingsApplicationHealthBanner } from '~/pages/settings/applications/components/SettingsApplicationHealthBanner';
+
+const renderBanner = ({
+ healthStatus = ApplicationHealthStatus.ERROR,
+ hasAction = true,
+}: {
+ healthStatus?: ApplicationHealthStatus;
+ hasAction?: boolean;
+}) =>
+ render(
+ <I18nProvider i18n={i18n}>
+ <SettingsApplicationHealthBanner
+ healthStatus={healthStatus}
+ title="Your key was revoked"
+ description="Generate a new one from the provider dashboard."
+ action={
+ hasAction ? { label: 'Reconnect', onClick: jest.fn() } : undefined
+ }
+ />
+ </I18nProvider>,
+ );
+
+describe('SettingsApplicationHealthBanner', () => {
+ it('should use the action label reported by the app', () => {
+ renderBanner({});
+
+ expect(
+ screen.getByRole('button', { name: /Reconnect/ }),
+ ).toBeInTheDocument();
+ });
+
+ it('should render the title without a button when the app reports no action', () => {
+ renderBanner({ hasAction: false });
+
+ expect(screen.getByText('Your key was revoked')).toBeInTheDocument();
+ expect(
+ screen.getByText('Generate a new one from the provider dashboard.'),
+ ).toBeInTheDocument();
+ expect(screen.queryByRole('button')).not.toBeInTheDocument();
+ });
+
+ it.each([ApplicationHealthStatus.OK, ApplicationHealthStatus.UNKNOWN])(
+ 'should render nothing for %s',
+ (healthStatus) => {
+ renderBanner({ healthStatus });
+
+ expect(
+ screen.queryByText('Your key was revoked'),
+ ).not.toBeInTheDocument();
+ },
+ );
+});
diff --git a/packages/twenty-front/src/pages/settings/applications/hooks/useApplicationHealthCheck.ts b/packages/twenty-front/src/pages/settings/applications/hooks/useApplicationHealthCheck.ts
new file mode 100644
index 00000000000..877ddb21df6
--- /dev/null
+++ b/packages/twenty-front/src/pages/settings/applications/hooks/useApplicationHealthCheck.ts
@@ -0,0 +1,44 @@
+import { useMutation } from '@apollo/client/react';
+import { useCallback, useEffect, useState } from 'react';
+import { isDefined } from 'twenty-shared/utils';
+import {
+ type ApplicationHealthCheckResult,
+ RunApplicationHealthCheckDocument,
+} from '~/generated-metadata/graphql';
+
+export const useApplicationHealthCheck = ({
+ applicationId,
+ healthCheckLogicFunctionId,
+}: {
+ applicationId: string;
+ healthCheckLogicFunctionId?: string | null;
+}) => {
+ const [runApplicationHealthCheck] = useMutation(
+ RunApplicationHealthCheckDocument,
+ );
+
+ const [healthCheckResult, setHealthCheckResult] =
+ useState<ApplicationHealthCheckResult | null>(null);
+
+ const runHealthCheck = useCallback(async () => {
+ if (!isDefined(healthCheckLogicFunctionId)) {
+ return;
+ }
+
+ try {
+ const { data } = await runApplicationHealthCheck({
+ variables: { applicationId },
+ });
+
+ setHealthCheckResult(data?.runApplicationHealthCheck ?? null);
+ } catch {
+ setHealthCheckResult(null);
+ }
+ }, [applicationId, healthCheckLogicFunctionId, runApplicationHealthCheck]);
+
+ useEffect(() => {
+ runHealthCheck();
+ }, [runHealthCheck]);
+
+ return { healthCheckResult, runHealthCheck };
+};
diff --git a/packages/twenty-front/src/pages/settings/applications/utils/__tests__/getApplicationHealthBanner.test.ts b/packages/twenty-front/src/pages/settings/applications/utils/__tests__/getApplicationHealthBanner.test.ts
new file mode 100644
index 00000000000..bccee6e9ab0
--- /dev/null
+++ b/packages/twenty-front/src/pages/settings/applications/utils/__tests__/getApplicationHealthBanner.test.ts
@@ -0,0 +1,123 @@
+import { ApplicationHealthStatus } from '~/generated-metadata/graphql';
+import { getApplicationHealthBanner } from '~/pages/settings/applications/utils/getApplicationHealthBanner';
+
+const FALLBACK_LOCATION = '/settings/applications/app-id#variables';
+
+// Assembled rather than written out, since oxlint rejects a script url literal.
+const SCRIPT_URL = ['java', 'script:alert(1)'].join('');
+
+const buildResult = (
+ overrides: Partial<{
+ status: ApplicationHealthStatus;
+ title: string | null;
+ description: string | null;
+ action: { label: string; location?: string | null } | null;
+ }> = {},
+) => ({
+ __typename: 'ApplicationHealthCheckResult' as const,
+ status: ApplicationHealthStatus.ERROR,
+ title: 'Your key was revoked',
+ description: null,
+ action: null,
+ ...overrides,
+});
+
+describe('getApplicationHealthBanner', () => {
+ it('should return nothing when there is no result', () => {
+ expect(
+ getApplicationHealthBanner({ healthCheckResult: null }),
+ ).toBeUndefined();
+ });
+
+ it('should return nothing when the result carries no title', () => {
+ expect(
+ getApplicationHealthBanner({
+ healthCheckResult: buildResult({ title: null }),
+ }),
+ ).toBeUndefined();
+ });
+
+ it('should carry the description when the app reports one', () => {
+ expect(
+ getApplicationHealthBanner({
+ healthCheckResult: buildResult({
+ description: 'Generate a new one from the provider dashboard.',
+ }),
+ })?.description,
+ ).toBe('Generate a new one from the provider dashboard.');
+ });
+
+ it('should leave the description out when the app reports none', () => {
+ expect(
+ getApplicationHealthBanner({ healthCheckResult: buildResult() }),
+ ).not.toHaveProperty('description');
+ });
+
+ it('should send the action to the location reported by the app', () => {
+ expect(
+ getApplicationHealthBanner({
+ healthCheckResult: buildResult({
+ action: { label: 'Add credits', location: '/settings/billing' },
+ }),
+ })?.action,
+ ).toEqual({ label: 'Add credits', to: '/settings/billing' });
+ });
+
+ it('should keep the hash the app reported so it can point at a tab', () => {
+ expect(
+ getApplicationHealthBanner({
+ healthCheckResult: buildResult({
+ action: {
+ label: 'Reconnect',
+ location: '/settings/applications/app-id#variables',
+ },
+ }),
+ })?.action?.to,
+ ).toBe('/settings/applications/app-id#variables');
+ });
+
+ it('should keep a hash-only location, which moves to a tab on the current page', () => {
+ expect(
+ getApplicationHealthBanner({
+ healthCheckResult: buildResult({
+ action: { label: 'Configure', location: '#variables' },
+ }),
+ fallbackLocation: FALLBACK_LOCATION,
+ })?.action,
+ ).toEqual({ label: 'Configure', to: '#variables' });
+ });
+
+ it("should fall back to the app's configuration tab when it reports no location", () => {
+ expect(
+ getApplicationHealthBanner({
+ healthCheckResult: buildResult({ action: { label: 'Configure' } }),
+ fallbackLocation: FALLBACK_LOCATION,
+ })?.action,
+ ).toEqual({ label: 'Configure', to: FALLBACK_LOCATION });
+ });
+
+ it.each([
+ ['an absolute url', 'https://evil.example.com'],
+ ['a protocol-relative url', '//evil.example.com'],
+ ['a script url', SCRIPT_URL],
+ ['a relative path', 'settings/billing'],
+ ])('should drop the action when the location is %s', (_label, location) => {
+ const banner = getApplicationHealthBanner({
+ healthCheckResult: buildResult({
+ action: { label: 'Reconnect', location },
+ }),
+ fallbackLocation: FALLBACK_LOCATION,
+ });
+
+ expect(banner?.title).toBe('Your key was revoked');
+ expect(banner?.action).toBeUndefined();
+ });
+
+ it('should drop the action when there is no location and no fallback', () => {
+ expect(
+ getApplicationHealthBanner({
+ healthCheckResult: buildResult({ action: { label: 'Configure' } }),
+ })?.action,
+ ).toBeUndefined();
+ });
+});
diff --git a/packages/twenty-front/src/pages/settings/applications/utils/__tests__/getApplicationHealthBannerAppearance.test.ts b/packages/twenty-front/src/pages/settings/applications/utils/__tests__/getApplicationHealthBannerAppearance.test.ts
new file mode 100644
index 00000000000..bc04bdd6bbb
--- /dev/null
+++ b/packages/twenty-front/src/pages/settings/applications/utils/__tests__/getApplicationHealthBannerAppearance.test.ts
@@ -0,0 +1,25 @@
+import { ApplicationHealthStatus } from '~/generated-metadata/graphql';
+import { getApplicationHealthBannerAppearance } from '~/pages/settings/applications/utils/getApplicationHealthBannerAppearance';
+
+describe('getApplicationHealthBannerAppearance', () => {
+ it.each([
+ [ApplicationHealthStatus.SUCCESS, 'success'],
+ [ApplicationHealthStatus.INFO, 'info'],
+ [ApplicationHealthStatus.WARNING, 'warning'],
+ [ApplicationHealthStatus.ERROR, 'error'],
+ [ApplicationHealthStatus.NEUTRAL, 'neutral'],
+ ])('should map %s to the %s callout variant', (healthStatus, variant) => {
+ expect(getApplicationHealthBannerAppearance(healthStatus)?.variant).toBe(
+ variant,
+ );
+ });
+
+ it.each([ApplicationHealthStatus.OK, ApplicationHealthStatus.UNKNOWN])(
+ 'should return nothing for %s',
+ (healthStatus) => {
+ expect(
+ getApplicationHealthBannerAppearance(healthStatus),
+ ).toBeUndefined();
+ },
+ );
+});
diff --git a/packages/twenty-front/src/pages/settings/applications/utils/getApplicationHealthBanner.ts b/packages/twenty-front/src/pages/settings/applications/utils/getApplicationHealthBanner.ts
new file mode 100644
index 00000000000..f543f88072f
--- /dev/null
+++ b/packages/twenty-front/src/pages/settings/applications/utils/getApplicationHealthBanner.ts
@@ -0,0 +1,55 @@
+import { isNonEmptyString } from '@sniptt/guards';
+import { isDefined } from 'twenty-shared/utils';
+import { isSafeInternalPath } from '@/ui/navigation/utils/isSafeInternalPath';
+import { type RunApplicationHealthCheckMutation } from '~/generated-metadata/graphql';
+
+type ApplicationHealthCheckResult = NonNullable<
+ RunApplicationHealthCheckMutation['runApplicationHealthCheck']
+>;
+
+type ApplicationHealthBanner = {
+ status: ApplicationHealthCheckResult['status'];
+ title: string;
+ description?: string;
+ action?: { label: string; to: string };
+};
+
+export const getApplicationHealthBanner = ({
+ healthCheckResult,
+ fallbackLocation,
+}: {
+ healthCheckResult?: ApplicationHealthCheckResult | null;
+ fallbackLocation?: string;
+}): ApplicationHealthBanner | undefined => {
+ if (!isDefined(healthCheckResult)) {
+ return undefined;
+ }
+
+ const { status, title, description, action } = healthCheckResult;
+
+ if (!isNonEmptyString(title)) {
+ return undefined;
+ }
+
+ const banner = {
+ status,
+ title,
+ ...(isNonEmptyString(description) ? { description } : {}),
+ };
+
+ if (!isDefined(action)) {
+ return banner;
+ }
+
+ const to = isNonEmptyString(action.location)
+ ? action.location
+ : fallbackLocation;
+
+ // An app supplies this string, so anything that could leave the workspace
+ // loses its button rather than becoming a redirect to somewhere else.
+ if (!isDefined(to) || !isSafeInternalPath(to)) {
+ return banner;
+ }
+
+ return { ...banner, action: { label: action.label, to } };
+};
diff --git a/packages/twenty-front/src/pages/settings/applications/utils/getApplicationHealthBannerAppearance.ts b/packages/twenty-front/src/pages/settings/applications/utils/getApplicationHealthBannerAppearance.ts
new file mode 100644
index 00000000000..7142d49c930
--- /dev/null
+++ b/packages/twenty-front/src/pages/settings/applications/utils/getApplicationHealthBannerAppearance.ts
@@ -0,0 +1,45 @@
+import {
+ IconAlertCircle,
+ IconAlertTriangle,
+ IconCheck,
+ IconHelp,
+ IconInfoCircle,
+ type IconComponent,
+} from 'twenty-ui/icon';
+import { type CalloutVariant } from 'twenty-ui/primitives/feedback';
+import { ApplicationHealthStatus } from '~/generated-metadata/graphql';
+
+type ApplicationHealthBannerAppearance = {
+ variant: CalloutVariant;
+ Icon: IconComponent;
+};
+
+const APPEARANCE_BY_STATUS: Partial<
+ Record<ApplicationHealthStatus, ApplicationHealthBannerAppearance>
+> = {
+ [ApplicationHealthStatus.SUCCESS]: {
+ variant: 'success',
+ Icon: IconCheck,
+ },
+ [ApplicationHealthStatus.INFO]: {
+ variant: 'info',
+ Icon: IconInfoCircle,
+ },
+ [ApplicationHealthStatus.WARNING]: {
+ variant: 'warning',
+ Icon: IconAlertTriangle,
+ },
+ [ApplicationHealthStatus.ERROR]: {
+ variant: 'error',
+ Icon: IconAlertCircle,
+ },
+ [ApplicationHealthStatus.NEUTRAL]: {
+ variant: 'neutral',
+ Icon: IconHelp,
+ },
+};
+
+export const getApplicationHealthBannerAppearance = (
+ healthStatus: ApplicationHealthStatus,
+): ApplicationHealthBannerAppearance | undefined =>
+ APPEARANCE_BY_STATUS[healthStatus];
diff --git a/packages/twenty-sdk/src/cli/utilities/build/common/plugins/__tests__/__snapshots__/stub-twenty-sdk-define.plugin.spec.ts.snap b/packages/twenty-sdk/src/cli/utilities/build/common/plugins/__tests__/__snapshots__/stub-twenty-sdk-define.plugin.spec.ts.snap
index 24598471017..258616712cd 100644
--- a/packages/twenty-sdk/src/cli/utilities/build/common/plugins/__tests__/__snapshots__/stub-twenty-sdk-define.plugin.spec.ts.snap
+++ b/packages/twenty-sdk/src/cli/utilities/build/common/plugins/__tests__/__snapshots__/stub-twenty-sdk-define.plugin.spec.ts.snap
@@ -3,41 +3,10 @@
exports[`stub-twenty-sdk-define plugin > matches the recorded export partition 1`] = `
{
"any": [
- "AggregateOperations",
- "CommandMenuItemAvailabilityType",
- "DateDisplayFormat",
- "FieldMetadataSettingsOnClickAction",
- "FieldType",
- "HTTPMethod",
- "IndexType",
- "MetadataReadability",
- "MetadataWritability",
- "NavigationMenuItemType",
- "NumberDataType",
- "ObjectOpenRecordIn",
- "ObjectRecordGroupByDateGranularity",
- "OnDeleteAction",
- "PageLayoutTabLayoutMode",
- "PageLayoutType",
- "PageLayoutWidgetVerticalListHeightBehavior",
- "RelationType",
- "RowLevelPermissionPredicateGroupLogicalOperator",
- "RowLevelPermissionPredicateOperand",
"STANDARD_OBJECT",
"STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS",
"STANDARD_PAGE_LAYOUT",
"STANDARD_PAGE_LAYOUT_UNIVERSAL_IDENTIFIERS",
- "SYSTEM_VIEW_KEYS",
- "SystemPermissionFlag",
- "ViewCalendarLayout",
- "ViewFilterGroupLogicalOperator",
- "ViewFilterOperand",
- "ViewKey",
- "ViewOpenRecordIn",
- "ViewSortDirection",
- "ViewType",
- "ViewVisibility",
- "WidgetType",
"canAccessFullAdminPanel",
"canImpersonate",
"every",
@@ -86,6 +55,7 @@ exports[`stub-twenty-sdk-define plugin > matches the recorded export partition 1
"defineConnectionProvider",
"defineField",
"defineFrontComponent",
+ "defineHealthCheck",
"defineIndex",
"defineLogicFunction",
"defineNavigationMenuItem",
@@ -104,5 +74,39 @@ exports[`stub-twenty-sdk-define plugin > matches the recorded export partition 1
"defineView",
"defineViewField",
],
+ "plainData": [
+ "AggregateOperations",
+ "ApplicationHealthStatus",
+ "CommandMenuItemAvailabilityType",
+ "DateDisplayFormat",
+ "FieldMetadataSettingsOnClickAction",
+ "FieldType",
+ "HTTPMethod",
+ "IndexType",
+ "MetadataReadability",
+ "MetadataWritability",
+ "NavigationMenuItemType",
+ "NumberDataType",
+ "ObjectOpenRecordIn",
+ "ObjectRecordGroupByDateGranularity",
+ "OnDeleteAction",
+ "PageLayoutTabLayoutMode",
+ "PageLayoutType",
+ "PageLayoutWidgetVerticalListHeightBehavior",
+ "RelationType",
+ "RowLevelPermissionPredicateGroupLogicalOperator",
+ "RowLevelPermissionPredicateOperand",
+ "SYSTEM_VIEW_KEYS",
+ "SystemPermissionFlag",
+ "ViewCalendarLayout",
+ "ViewFilterGroupLogicalOperator",
+ "ViewFilterOperand",
+ "ViewKey",
+ "ViewOpenRecordIn",
+ "ViewSortDirection",
+ "ViewType",
+ "ViewVisibility",
+ "WidgetType",
+ ],
}
`;
diff --git a/packages/twenty-sdk/src/cli/utilities/build/common/plugins/__tests__/stub-twenty-sdk-define.plugin.spec.ts b/packages/twenty-sdk/src/cli/utilities/build/common/plugins/__tests__/stub-twenty-sdk-define.plugin.spec.ts
index f6f299e1dc5..54adc612b52 100644
--- a/packages/twenty-sdk/src/cli/utilities/build/common/plugins/__tests__/stub-twenty-sdk-define.plugin.spec.ts
+++ b/packages/twenty-sdk/src/cli/utilities/build/common/plugins/__tests__/stub-twenty-sdk-define.plugin.spec.ts
@@ -1,6 +1,7 @@
import * as twentySdkDefine from '@/sdk/define';
import {
TWENTY_SDK_DEFINE_STUBBED_EXPORTS,
+ buildStubModuleSource,
isDefineFactoryExportName,
} from '@/cli/utilities/build/common/plugins/stub-twenty-sdk-define.plugin';
@@ -8,6 +9,7 @@ describe('stub-twenty-sdk-define plugin', () => {
const realExports = Object.keys(twentySdkDefine).sort();
const stubbedExports = [
...TWENTY_SDK_DEFINE_STUBBED_EXPORTS.factories,
+ ...TWENTY_SDK_DEFINE_STUBBED_EXPORTS.plainData,
...TWENTY_SDK_DEFINE_STUBBED_EXPORTS.any,
].sort();
@@ -34,6 +36,23 @@ describe('stub-twenty-sdk-define plugin', () => {
}
});
+ it('keeps enums an app can read at runtime out of the proxy bucket', () => {
+ expect(TWENTY_SDK_DEFINE_STUBBED_EXPORTS.plainData).toContain(
+ 'ApplicationHealthStatus',
+ );
+ expect(TWENTY_SDK_DEFINE_STUBBED_EXPORTS.any).not.toContain(
+ 'ApplicationHealthStatus',
+ );
+ });
+
+ it('emits the real value of a plain data export', () => {
+ expect(buildStubModuleSource()).toContain(
+ `export const ApplicationHealthStatus = ${JSON.stringify(
+ twentySdkDefine.ApplicationHealthStatus,
+ )};`,
+ );
+ });
+
// Snapshot to surface new exports in PR review. Update with
// `npx vitest -u` when intentional.
it('matches the recorded export partition', () => {
diff --git a/packages/twenty-sdk/src/cli/utilities/build/common/plugins/stub-twenty-sdk-define.plugin.ts b/packages/twenty-sdk/src/cli/utilities/build/common/plugins/stub-twenty-sdk-define.plugin.ts
index 8893d51fd1d..dc772911d30 100644
--- a/packages/twenty-sdk/src/cli/utilities/build/common/plugins/stub-twenty-sdk-define.plugin.ts
+++ b/packages/twenty-sdk/src/cli/utilities/build/common/plugins/stub-twenty-sdk-define.plugin.ts
@@ -1,5 +1,7 @@
import type * as esbuild from 'esbuild';
+import { isPlainObject } from 'twenty-shared/utils';
+
import * as twentySdkDefine from '@/sdk/define';
// Everything in twenty-sdk/define is build-time metadata for the manifest
@@ -9,25 +11,44 @@ import * as twentySdkDefine from '@/sdk/define';
// Exports are derived from `Object.keys(twentySdkDefine)` so new ones land
// in the stub automatically; the unit test snapshots the partition.
// Factories must keep the `(config) => ({ config, ... })` shape so the
-// manifest extractor can still read `.config`; anything else can be a Proxy.
+// manifest extractor can still read `.config`, and plain data keeps its real
+// value since a handler may read it at runtime; anything else can be a Proxy.
export const isDefineFactoryExportName = (name: string): boolean =>
/^define[A-Z]/.test(name) || name === 'createValidationResult';
+const isPrimitive = (value: unknown): boolean =>
+ typeof value === 'string' ||
+ typeof value === 'number' ||
+ typeof value === 'boolean';
+
+// An enum or a flat constant map an app can read at runtime, so a Proxy would
+// hand it nonsense where it expects the real value.
+export const isPlainDataExport = (value: unknown): boolean =>
+ isPrimitive(value) ||
+ (isPlainObject(value) && Object.values(value).every(isPrimitive));
+
const partitionDefineExports = (
mod: Record<string, unknown>,
-): { factories: readonly string[]; any: readonly string[] } => {
+): {
+ factories: readonly string[];
+ plainData: readonly string[];
+ any: readonly string[];
+} => {
const factories: string[] = [];
+ const plainData: string[] = [];
const any: string[] = [];
for (const name of Object.keys(mod).sort()) {
if (isDefineFactoryExportName(name)) {
factories.push(name);
+ } else if (isPlainDataExport(mod[name])) {
+ plainData.push(name);
} else {
any.push(name);
}
}
- return { factories, any };
+ return { factories, plainData, any };
};
export const TWENTY_SDK_DEFINE_STUBBED_EXPORTS = partitionDefineExports(
@@ -61,12 +82,17 @@ const __anyHandler = {
const __anyStub = new Proxy(() => undefined, __anyHandler);
`;
-const buildStubModuleSource = (): string => {
+export const buildStubModuleSource = (): string => {
const exportLines: string[] = [];
for (const name of TWENTY_SDK_DEFINE_STUBBED_EXPORTS.factories) {
exportLines.push(`export const ${name} = __defineFactoryStub;`);
}
+ for (const name of TWENTY_SDK_DEFINE_STUBBED_EXPORTS.plainData) {
+ const value = (twentySdkDefine as unknown as Record<string, unknown>)[name];
+
+ exportLines.push(`export const ${name} = ${JSON.stringify(value)};`);
+ }
for (const name of TWENTY_SDK_DEFINE_STUBBED_EXPORTS.any) {
exportLines.push(`export const ${name} = __anyStub;`);
}
diff --git a/packages/twenty-sdk/src/cli/utilities/build/manifest/manifest-build.ts b/packages/twenty-sdk/src/cli/utilities/build/manifest/manifest-build.ts
index 105fbc9aeaa..4fd7ab0a68a 100644
--- a/packages/twenty-sdk/src/cli/utilities/build/manifest/manifest-build.ts
+++ b/packages/twenty-sdk/src/cli/utilities/build/manifest/manifest-build.ts
@@ -48,6 +48,7 @@ import {
type PostInstallLogicFunctionApplicationManifest,
type PreInstallLogicFunctionApplicationManifest,
type UninstallLogicFunctionApplicationManifest,
+ type HealthCheckLogicFunctionApplicationManifest,
type RoleManifest,
type SkillManifest,
type StandalonePageLayoutWidgetManifest,
@@ -129,6 +130,8 @@ export const buildManifest = async (
[];
const uninstallLogicFunctions: UninstallLogicFunctionApplicationManifest[] =
[];
+ const healthCheckLogicFunctions: HealthCheckLogicFunctionApplicationManifest[] =
+ [];
const settingsFrontComponentUniversalIdentifiers: string[] = [];
const applicationRoleUniversalIdentifiers: string[] = [];
const applicationFilePaths: string[] = [];
@@ -359,6 +362,12 @@ export const buildManifest = async (
});
}
+ if (targetFunctionName === TargetFunction.DefineHealthCheck) {
+ healthCheckLogicFunctions.push({
+ universalIdentifier: extract.config.universalIdentifier,
+ });
+ }
+
break;
}
case ManifestEntityKey.FrontComponents: {
@@ -609,6 +618,10 @@ export const buildManifest = async (
errors.push('Only one uninstall logic function is allowed per application');
}
+ if (healthCheckLogicFunctions.length > 1) {
+ errors.push('Only one health check is allowed per application');
+ }
+
if (settingsFrontComponentUniversalIdentifiers.length > 1) {
errors.push('Only one settings front component is allowed per application');
}
@@ -670,6 +683,9 @@ export const buildManifest = async (
...(uninstallLogicFunctions.length >= 1
? { uninstallLogicFunction: uninstallLogicFunctions[0] }
: {}),
+ ...(healthCheckLogicFunctions.length >= 1
+ ? { healthCheckLogicFunction: healthCheckLogicFunctions[0] }
+ : {}),
...(settingsFrontComponentUniversalIdentifiers.length >= 1
? {
settingsFrontComponent: {
diff --git a/packages/twenty-sdk/src/cli/utilities/build/manifest/manifest-extract-config.ts b/packages/twenty-sdk/src/cli/utilities/build/manifest/manifest-extract-config.ts
index 49987260045..31f10448e09 100644
--- a/packages/twenty-sdk/src/cli/utilities/build/manifest/manifest-extract-config.ts
+++ b/packages/twenty-sdk/src/cli/utilities/build/manifest/manifest-extract-config.ts
@@ -9,6 +9,7 @@ export enum TargetFunction {
DefinePostInstallLogicFunction = 'definePostInstallLogicFunction',
DefinePreInstallLogicFunction = 'definePreInstallLogicFunction',
DefineUninstallLogicFunction = 'defineUninstallLogicFunction',
+ DefineHealthCheck = 'defineHealthCheck',
DefineObject = 'defineObject',
DefinePermissionFlag = 'definePermissionFlag',
DefineRole = 'defineRole',
@@ -67,6 +68,7 @@ export const TARGET_FUNCTION_TO_ENTITY_KEY_MAPPING: Record<
ManifestEntityKey.LogicFunctions,
[TargetFunction.DefineUninstallLogicFunction]:
ManifestEntityKey.LogicFunctions,
+ [TargetFunction.DefineHealthCheck]: ManifestEntityKey.LogicFunctions,
[TargetFunction.DefineObject]: ManifestEntityKey.Objects,
[TargetFunction.DefinePermissionFlag]: ManifestEntityKey.PermissionFlags,
[TargetFunction.DefineRole]: ManifestEntityKey.Roles,
diff --git a/packages/twenty-sdk/src/cli/utilities/build/manifest/manifest-validate.ts b/packages/twenty-sdk/src/cli/utilities/build/manifest/manifest-validate.ts
index 31aabe2834e..ded2686c9a6 100644
--- a/packages/twenty-sdk/src/cli/utilities/build/manifest/manifest-validate.ts
+++ b/packages/twenty-sdk/src/cli/utilities/build/manifest/manifest-validate.ts
@@ -61,6 +61,7 @@ const findUniversalIdentifiers = (obj: object): string[] => {
key === 'postInstallLogicFunction' ||
key === 'preInstallLogicFunction' ||
key === 'uninstallLogicFunction' ||
+ key === 'healthCheckLogicFunction' ||
key === 'onConnectLogicFunction' ||
key === 'onDisconnectLogicFunction' ||
key === 'settingsFrontComponent'
diff --git a/packages/twenty-sdk/src/cli/utilities/pull/build-pull-entities.ts b/packages/twenty-sdk/src/cli/utilities/pull/build-pull-entities.ts
index 8ca358a6f3c..ef9edb1e1bc 100644
--- a/packages/twenty-sdk/src/cli/utilities/pull/build-pull-entities.ts
+++ b/packages/twenty-sdk/src/cli/utilities/pull/build-pull-entities.ts
@@ -81,6 +81,7 @@ const APPLICATION_PROPERTIES_TO_STRIP = [
'postInstallLogicFunction',
'preInstallLogicFunction',
'uninstallLogicFunction',
+ 'healthCheckLogicFunction',
'settingsFrontComponent',
'settingsCustomTabFrontComponentUniversalIdentifier',
'frontComponentSharedDependencies',
diff --git a/packages/twenty-sdk/src/sdk/define/index.ts b/packages/twenty-sdk/src/sdk/define/index.ts
index b876cb90682..d44d337e887 100644
--- a/packages/twenty-sdk/src/sdk/define/index.ts
+++ b/packages/twenty-sdk/src/sdk/define/index.ts
@@ -88,6 +88,7 @@ export type {
IndexManifest,
} from 'twenty-shared/application';
+export { defineHealthCheck } from '@/sdk/define/logic-functions/define-health-check';
export { defineLogicFunction } from '@/sdk/define/logic-functions/define-logic-function';
export { definePostInstallLogicFunction } from '@/sdk/define/logic-functions/define-post-install-logic-function';
export { definePreInstallLogicFunction } from '@/sdk/define/logic-functions/define-pre-install-logic-function';
@@ -100,6 +101,13 @@ export type {
UninstallHandler,
UninstallPayload,
} from '@/sdk/define/logic-functions/uninstall-payload-type';
+export type { HealthCheckHandler } from '@/sdk/define/logic-functions/health-check-handler-type';
+export type { HealthCheckLogicFunctionConfig } from '@/sdk/define/logic-functions/health-check-logic-function-config';
+export type {
+ ApplicationHealthCheckAction,
+ ApplicationHealthCheckResult,
+} from 'twenty-shared/application';
+export { ApplicationHealthStatus } from 'twenty-shared/application';
export type {
LogicFunctionConfig,
LogicFunctionHandler,
diff --git a/packages/twenty-sdk/src/sdk/define/logic-functions/__tests__/define-health-check.spec.ts b/packages/twenty-sdk/src/sdk/define/logic-functions/__tests__/define-health-check.spec.ts
new file mode 100644
index 00000000000..f3caf048bbf
--- /dev/null
+++ b/packages/twenty-sdk/src/sdk/define/logic-functions/__tests__/define-health-check.spec.ts
@@ -0,0 +1,50 @@
+import { defineHealthCheck } from '@/sdk/define';
+
+describe('defineHealthCheck', () => {
+ const validConfig = {
+ universalIdentifier: '7f1c2d3e-4a5b-4c6d-8e9f-0a1b2c3d4e5f',
+ name: 'health-check',
+ handler: async () => ({ status: 'OK' as const }),
+ };
+
+ it('should return successful validation result when valid', () => {
+ const result = defineHealthCheck(validConfig);
+
+ expect(result.success).toBe(true);
+ expect(result.config).toEqual(validConfig);
+ expect(result.errors).toEqual([]);
+ });
+
+ it('should return error when universalIdentifier is missing', () => {
+ const result = defineHealthCheck({
+ name: 'health-check',
+ handler: async () => ({ status: 'OK' as const }),
+ } as any);
+
+ expect(result.success).toBe(false);
+ expect(result.errors).toContain(
+ 'Health check must have a universalIdentifier',
+ );
+ });
+
+ it('should return error when handler is missing', () => {
+ const result = defineHealthCheck({
+ universalIdentifier: '7f1c2d3e-4a5b-4c6d-8e9f-0a1b2c3d4e5f',
+ name: 'health-check',
+ } as any);
+
+ expect(result.success).toBe(false);
+ expect(result.errors).toEqual(['Health check must have a handler']);
+ });
+
+ it('should return error when handler is not a function', () => {
+ const result = defineHealthCheck({
+ universalIdentifier: '7f1c2d3e-4a5b-4c6d-8e9f-0a1b2c3d4e5f',
+ name: 'health-check',
+ handler: 'not-a-function',
+ } as any);
+
+ expect(result.success).toBe(false);
+ expect(result.errors).toContain('Health check handler must be a function');
+ });
+});
diff --git a/packages/twenty-sdk/src/sdk/define/logic-functions/define-health-check.ts b/packages/twenty-sdk/src/sdk/define/logic-functions/define-health-check.ts
new file mode 100644
index 00000000000..3ef95ef4447
--- /dev/null
+++ b/packages/twenty-sdk/src/sdk/define/logic-functions/define-health-check.ts
@@ -0,0 +1,24 @@
+import type { DefineEntity } from '@/sdk/define/common/types/define-entity.type';
+import { createValidationResult } from '@/sdk/define/common/utils/create-validation-result';
+import { type HealthCheckLogicFunctionConfig } from '@/sdk/define/logic-functions/health-check-logic-function-config';
+
+export const defineHealthCheck: DefineEntity<HealthCheckLogicFunctionConfig> = (
+ config,
+) => {
+ const errors = [];
+
+ if (!config.universalIdentifier) {
+ errors.push('Health check must have a universalIdentifier');
+ }
+
+ if (!config.handler) {
+ errors.push('Health check must have a handler');
+ } else if (typeof config.handler !== 'function') {
+ errors.push('Health check handler must be a function');
+ }
+
+ return createValidationResult({
+ config,
+ errors,
+ });
+};
diff --git a/packages/twenty-sdk/src/sdk/define/logic-functions/health-check-handler-type.ts b/packages/twenty-sdk/src/sdk/define/logic-functions/health-check-handler-type.ts
new file mode 100644
index 00000000000..878efbe09e4
--- /dev/null
+++ b/packages/twenty-sdk/src/sdk/define/logic-functions/health-check-handler-type.ts
@@ -0,0 +1,5 @@
+import type { ApplicationHealthCheckResult } from 'twenty-shared/application';
+
+export type HealthCheckHandler = () =>
+ | ApplicationHealthCheckResult
+ | Promise<ApplicationHealthCheckResult>;
diff --git a/packages/twenty-sdk/src/sdk/define/logic-functions/health-check-logic-function-config.ts b/packages/twenty-sdk/src/sdk/define/logic-functions/health-check-logic-function-config.ts
new file mode 100644
index 00000000000..5da3a29ad01
--- /dev/null
+++ b/packages/twenty-sdk/src/sdk/define/logic-functions/health-check-logic-function-config.ts
@@ -0,0 +1,15 @@
+import type { HealthCheckHandler } from '@/sdk/define/logic-functions/health-check-handler-type';
+import type { LogicFunctionConfig } from '@/sdk/define/logic-functions/logic-function-config';
+
+export type HealthCheckLogicFunctionConfig = Omit<
+ LogicFunctionConfig,
+ | 'cronTriggerSettings'
+ | 'databaseEventTriggerSettings'
+ | 'httpRouteTriggerSettings'
+ | 'toolTriggerSettings'
+ | 'workflowActionTriggerSettings'
+ | 'serverRouteTriggerSettings'
+ | 'handler'
+> & {
+ handler: HealthCheckHandler;
+};
diff --git a/packages/twenty-server/src/database/commands/upgrade-version-command/2-42/2-42-instance-command-fast-1790088275000-add-health-check-to-application.ts b/packages/twenty-server/src/database/commands/upgrade-version-command/2-42/2-42-instance-command-fast-1790088275000-add-health-check-to-application.ts
new file mode 100644
index 00000000000..46c764641b8
--- /dev/null
+++ b/packages/twenty-server/src/database/commands/upgrade-version-command/2-42/2-42-instance-command-fast-1790088275000-add-health-check-to-application.ts
@@ -0,0 +1,23 @@
+import { QueryRunner } from 'typeorm';
+
+import { RegisteredInstanceCommand } from 'src/engine/core-modules/upgrade/decorators/registered-instance-command.decorator';
+import { FastInstanceCommand } from 'src/engine/core-modules/upgrade/interfaces/fast-instance-command.interface';
+
+@RegisteredInstanceCommand('2.42.0', 1790088275000)
+export class AddHealthCheckToApplicationFastInstanceCommand
+ implements FastInstanceCommand
+{
+ public async up(queryRunner: QueryRunner): Promise<void> {
+ await queryRunner.query(
+ `ALTER TABLE "core"."application"
+ ADD COLUMN IF NOT EXISTS "healthCheckLogicFunctionId" uuid`,
+ );
+ }
+
+ public async down(queryRunner: QueryRunner): Promise<void> {
+ await queryRunner.query(
+ `ALTER TABLE "core"."application"
+ DROP COLUMN IF EXISTS "healthCheckLogicFunctionId"`,
+ );
+ }
+}
diff --git a/packages/twenty-server/src/database/commands/upgrade-version-command/2-42/add-health-check-to-application-upgrade-command-name.constant.ts b/packages/twenty-server/src/database/commands/upgrade-version-command/2-42/add-health-check-to-application-upgrade-command-name.constant.ts
new file mode 100644
index 00000000000..6dfd8cdad3d
--- /dev/null
+++ b/packages/twenty-server/src/database/commands/upgrade-version-command/2-42/add-health-check-to-application-upgrade-command-name.constant.ts
@@ -0,0 +1,2 @@
+export const ADD_HEALTH_CHECK_TO_APPLICATION_UPGRADE_COMMAND_NAME =
+ '2.42.0_AddHealthCheckToApplicationFastInstanceCommand_1790088275000';
diff --git a/packages/twenty-server/src/database/commands/upgrade-version-command/instance-commands.constant.ts b/packages/twenty-server/src/database/commands/upgrade-version-command/instance-commands.constant.ts
index 97dd1328946..ecfaac47e08 100644
--- a/packages/twenty-server/src/database/commands/upgrade-version-command/instance-commands.constant.ts
+++ b/packages/twenty-server/src/database/commands/upgrade-version-command/instance-commands.constant.ts
@@ -200,6 +200,7 @@ import { AddWorkflowVisibilityFastInstanceCommand } from 'src/database/commands/
import { AddAiEvaluationModelToWorkspaceFastInstanceCommand } from 'src/database/commands/upgrade-version-command/2-42/2-42-instance-command-fast-1789918648347-add-ai-evaluation-model-to-workspace';
import { AddIsRequiredToApplicationVariablesFastInstanceCommand } from 'src/database/commands/upgrade-version-command/2-42/2-42-instance-command-fast-1789920900000-add-is-required-to-application-variables';
import { AddDeferredWorkspaceMigrationActionTableFastInstanceCommand } from 'src/database/commands/upgrade-version-command/2-42/2-42-instance-command-fast-1790085198967-add-deferred-workspace-migration-action-table';
+import { AddHealthCheckToApplicationFastInstanceCommand } from 'src/database/commands/upgrade-version-command/2-42/2-42-instance-command-fast-1790088275000-add-health-check-to-application';
export const INSTANCE_COMMANDS = [
AddViewFieldGroupIdIndexOnViewFieldFastInstanceCommand,
@@ -402,4 +403,5 @@ export const INSTANCE_COMMANDS = [
AddAiEvaluationModelToWorkspaceFastInstanceCommand,
AddIsRequiredToApplicationVariablesFastInstanceCommand,
AddDeferredWorkspaceMigrationActionTableFastInstanceCommand,
+ AddHealthCheckToApplicationFastInstanceCommand,
];
diff --git a/packages/twenty-server/src/engine/core-modules/application/application-health/__tests__/application-health-check.service.spec.ts b/packages/twenty-server/src/engine/core-modules/application/application-health/__tests__/application-health-check.service.spec.ts
new file mode 100644
index 00000000000..6acfe0761f7
--- /dev/null
+++ b/packages/twenty-server/src/engine/core-modules/application/application-health/__tests__/application-health-check.service.spec.ts
@@ -0,0 +1,127 @@
+import { ApplicationHealthCheckService } from 'src/engine/core-modules/application/application-health/application-health-check.service';
+import { ApplicationHealthStatus } from 'twenty-shared/application';
+
+const APPLICATION_ID = 'a7d3f1c2-1111-4222-8333-444455556666';
+const WORKSPACE_ID = 'b7d3f1c2-1111-4222-8333-444455556666';
+const HEALTH_CHECK_ID = 'c7d3f1c2-1111-4222-8333-444455556666';
+
+const buildService = ({
+ healthCheckLogicFunctionId = HEALTH_CHECK_ID,
+ execute = jest.fn(),
+}: {
+ healthCheckLogicFunctionId?: string | null;
+ execute?: jest.Mock;
+} = {}) => {
+ const applicationService = {
+ findOneApplicationWithRelationsOrThrow: jest.fn().mockResolvedValue({
+ id: APPLICATION_ID,
+ version: '1.0.0',
+ healthCheckLogicFunctionId,
+ }),
+ };
+
+ const service = new ApplicationHealthCheckService(
+ applicationService as never,
+ { execute } as never,
+ );
+
+ return { service, execute };
+};
+
+const run = (service: ApplicationHealthCheckService) =>
+ service.run({ applicationId: APPLICATION_ID, workspaceId: WORKSPACE_ID });
+
+describe('ApplicationHealthCheckService', () => {
+ it('should do nothing when the application declares no health check', async () => {
+ const { service, execute } = buildService({
+ healthCheckLogicFunctionId: null,
+ });
+
+ expect(await run(service)).toBeNull();
+ expect(execute).not.toHaveBeenCalled();
+ });
+
+ it('should report OK without a title when the app reports ok', async () => {
+ const { service } = buildService({
+ execute: jest.fn().mockResolvedValue({ data: { status: 'OK' } }),
+ });
+
+ expect(await run(service)).toEqual({
+ status: ApplicationHealthStatus.OK,
+ title: null,
+ description: null,
+ action: null,
+ });
+ });
+
+ it('should report the reported title, description and action label', async () => {
+ const { service } = buildService({
+ execute: jest.fn().mockResolvedValue({
+ data: {
+ status: 'ERROR',
+ title: 'Your key was revoked',
+ description: 'Generate a new one from the provider dashboard.',
+ action: { label: 'Reconnect', location: '#variables' },
+ },
+ }),
+ });
+
+ expect(await run(service)).toEqual({
+ status: ApplicationHealthStatus.ERROR,
+ title: 'Your key was revoked',
+ description: 'Generate a new one from the provider dashboard.',
+ action: { label: 'Reconnect', location: '#variables' },
+ });
+ });
+
+ it.each([
+ [ApplicationHealthStatus.SUCCESS],
+ [ApplicationHealthStatus.INFO],
+ [ApplicationHealthStatus.WARNING],
+ [ApplicationHealthStatus.ERROR],
+ [ApplicationHealthStatus.NEUTRAL],
+ ])('should report a reported %s as is', async (reportedStatus) => {
+ const { service } = buildService({
+ execute: jest.fn().mockResolvedValue({
+ data: { status: reportedStatus, title: 'Expiring' },
+ }),
+ });
+
+ expect(await run(service)).toEqual({
+ status: reportedStatus,
+ title: 'Expiring',
+ description: null,
+ action: null,
+ });
+ });
+
+ it.each([
+ ['the execution errored', { data: null, error: { errorMessage: 'boom' } }],
+ ['the result is unreadable', { data: { status: 'NOPE' } }],
+ ['the result has no title', { data: { status: 'ERROR' } }],
+ ])('should fall back to UNKNOWN when %s', async (_label, executionResult) => {
+ const { service } = buildService({
+ execute: jest.fn().mockResolvedValue(executionResult),
+ });
+
+ expect(await run(service)).toEqual({
+ status: ApplicationHealthStatus.UNKNOWN,
+ title: null,
+ description: null,
+ action: null,
+ });
+ });
+
+ it('should fall back to UNKNOWN when the executor throws', async () => {
+ const { service } = buildService({
+ execute: jest.fn().mockRejectedValue(new Error('unreachable')),
+ });
+
+ expect(await run(service)).toEqual({
+ status: ApplicationHealthStatus.UNKNOWN,
+ title: null,
+ description: null,
+ action: null,
+ });
+ });
+});
diff --git a/packages/twenty-server/src/engine/core-modules/application/application-health/application-health-check.service.ts b/packages/twenty-server/src/engine/core-modules/application/application-health/application-health-check.service.ts
new file mode 100644
index 00000000000..7111eee8fec
--- /dev/null
+++ b/packages/twenty-server/src/engine/core-modules/application/application-health/application-health-check.service.ts
@@ -0,0 +1,97 @@
+import { Injectable } from '@nestjs/common';
+
+import {
+ ApplicationHealthStatus,
+ isApplicationHealthCheckResult,
+} from 'twenty-shared/application';
+import { isDefined } from 'twenty-shared/utils';
+
+import { ApplicationService } from 'src/engine/core-modules/application/application.service';
+import { type ApplicationHealthCheckResultDTO } from 'src/engine/core-modules/application/dtos/application-health-check-result.dto';
+import { LogicFunctionExecutorService } from 'src/engine/core-modules/logic-function/logic-function-executor/logic-function-executor.service';
+
+const UNKNOWN_HEALTH: ApplicationHealthCheckResultDTO = {
+ status: ApplicationHealthStatus.UNKNOWN,
+ title: null,
+ description: null,
+ action: null,
+};
+
+@Injectable()
+export class ApplicationHealthCheckService {
+ constructor(
+ private readonly applicationService: ApplicationService,
+ private readonly logicFunctionExecutorService: LogicFunctionExecutorService,
+ ) {}
+
+ async run({
+ applicationId,
+ workspaceId,
+ }: {
+ applicationId: string;
+ workspaceId: string;
+ }): Promise<ApplicationHealthCheckResultDTO | null> {
+ const application =
+ await this.applicationService.findOneApplicationWithRelationsOrThrow({
+ id: applicationId,
+ workspaceId,
+ });
+
+ const { healthCheckLogicFunctionId } = application;
+
+ if (!isDefined(healthCheckLogicFunctionId)) {
+ return null;
+ }
+
+ return await this.executeHealthCheck({
+ healthCheckLogicFunctionId,
+ workspaceId,
+ });
+ }
+
+ private async executeHealthCheck({
+ healthCheckLogicFunctionId,
+ workspaceId,
+ }: {
+ healthCheckLogicFunctionId: string;
+ workspaceId: string;
+ }): Promise<ApplicationHealthCheckResultDTO> {
+ const executionResult = await this.logicFunctionExecutorService
+ .execute({
+ logicFunctionId: healthCheckLogicFunctionId,
+ workspaceId,
+ payload: {},
+ })
+ .catch(() => null);
+
+ if (!isDefined(executionResult) || isDefined(executionResult.error)) {
+ return UNKNOWN_HEALTH;
+ }
+
+ const { data } = executionResult;
+
+ if (!isApplicationHealthCheckResult(data)) {
+ return UNKNOWN_HEALTH;
+ }
+
+ if (data.status === ApplicationHealthStatus.OK) {
+ return {
+ status: ApplicationHealthStatus.OK,
+ title: null,
+ description: null,
+ action: null,
+ };
+ }
+
+ const { action } = data;
+
+ return {
+ status: ApplicationHealthStatus[data.status],
+ title: data.title,
+ description: data.description ?? null,
+ action: isDefined(action)
+ ? { label: action.label, location: action.location ?? null }
+ : null,
+ };
+ }
+}
diff --git a/packages/twenty-server/src/engine/core-modules/application/application-health/application-health.module.ts b/packages/twenty-server/src/engine/core-modules/application/application-health/application-health.module.ts
new file mode 100644
index 00000000000..665681431d2
--- /dev/null
+++ b/packages/twenty-server/src/engine/core-modules/application/application-health/application-health.module.ts
@@ -0,0 +1,14 @@
+import { Module } from '@nestjs/common';
+
+import { ApplicationHealthCheckService } from 'src/engine/core-modules/application/application-health/application-health-check.service';
+import { ApplicationHealthResolver } from 'src/engine/core-modules/application/application-health/application-health.resolver';
+import { ApplicationModule } from 'src/engine/core-modules/application/application.module';
+import { LogicFunctionExecutorModule } from 'src/engine/core-modules/logic-function/logic-function-executor/logic-function-executor.module';
+import { PermissionsModule } from 'src/engine/metadata-modules/permissions/permissions.module';
+
+@Module({
+ imports: [ApplicationModule, LogicFunctionExecutorModule, PermissionsModule],
+ providers: [ApplicationHealthCheckService, ApplicationHealthResolver],
+ exports: [ApplicationHealthCheckService],
+})
+export class ApplicationHealthModule {}
diff --git a/packages/twenty-server/src/engine/core-modules/application/application-health/application-health.resolver.ts b/packages/twenty-server/src/engine/core-modules/application/application-health/application-health.resolver.ts
new file mode 100644
index 00000000000..b7586ad459b
--- /dev/null
+++ b/packages/twenty-server/src/engine/core-modules/application/application-health/application-health.resolver.ts
@@ -0,0 +1,40 @@
+import { UseFilters, UseGuards } from '@nestjs/common';
+import { Args, Mutation } from '@nestjs/graphql';
+
+import { PermissionFlagType } from 'twenty-shared/constants';
+
+import { MetadataResolver } from 'src/engine/api/graphql/graphql-config/decorators/metadata-resolver.decorator';
+import { UUIDScalarType } from 'src/engine/api/graphql/workspace-schema-builder/graphql-types/scalars';
+import { ApplicationHealthCheckService } from 'src/engine/core-modules/application/application-health/application-health-check.service';
+import { ApplicationExceptionFilter } from 'src/engine/core-modules/application/application-exception-filter';
+import { ApplicationHealthCheckResultDTO } from 'src/engine/core-modules/application/dtos/application-health-check-result.dto';
+import { ApplicationDTO } from 'src/engine/core-modules/application/dtos/application.dto';
+import { AuthGraphqlApiExceptionFilter } from 'src/engine/core-modules/auth/filters/auth-graphql-api-exception.filter';
+import { 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';
+import { WorkspaceAuthGuard } from 'src/engine/guards/workspace-auth.guard';
+
+@UseGuards(
+ WorkspaceAuthGuard,
+ SettingsPermissionGuard(PermissionFlagType.APPLICATIONS),
+)
+@MetadataResolver(() => ApplicationDTO)
+@UseFilters(ApplicationExceptionFilter, AuthGraphqlApiExceptionFilter)
+export class ApplicationHealthResolver {
+ constructor(
+ private readonly applicationHealthCheckService: ApplicationHealthCheckService,
+ ) {}
+
+ @Mutation(() => ApplicationHealthCheckResultDTO, { nullable: true })
+ async runApplicationHealthCheck(
+ @Args('applicationId', { type: () => UUIDScalarType })
+ applicationId: string,
+ @AuthWorkspace() { id: workspaceId }: WorkspaceEntity,
+ ): Promise<ApplicationHealthCheckResultDTO | null> {
+ return await this.applicationHealthCheckService.run({
+ applicationId,
+ workspaceId,
+ });
+ }
+}
diff --git a/packages/twenty-server/src/engine/core-modules/application/application-manifest/application-manifest-migration.service.ts b/packages/twenty-server/src/engine/core-modules/application/application-manifest/application-manifest-migration.service.ts
index 50ecba9c4b2..9d52a8be4a8 100644
--- a/packages/twenty-server/src/engine/core-modules/application/application-manifest/application-manifest-migration.service.ts
+++ b/packages/twenty-server/src/engine/core-modules/application/application-manifest/application-manifest-migration.service.ts
@@ -332,6 +332,21 @@ export class ApplicationManifestMigrationService {
})
: null;
+ const healthCheckLogicFunctionUniversalIdentifier =
+ manifest.application.healthCheckLogicFunction?.universalIdentifier;
+
+ const healthCheckLogicFunctionId = isDefined(
+ healthCheckLogicFunctionUniversalIdentifier,
+ )
+ ? resolveApplicationReferenceIdOrThrow({
+ flatEntityMaps: refreshedFlatLogicFunctionMaps,
+ universalIdentifier: healthCheckLogicFunctionUniversalIdentifier,
+ referenceLabel: 'health check logic function',
+ exceptionCode: ApplicationExceptionCode.LOGIC_FUNCTION_NOT_FOUND,
+ ownerApplicationId: ownerFlatApplication.id,
+ })
+ : null;
+
const uninstallLogicFunctionUniversalIdentifier =
manifest.application.uninstallLogicFunction?.universalIdentifier;
@@ -357,6 +372,10 @@ export class ApplicationManifestMigrationService {
inferDeletionFromMissingEntities
? { uninstallLogicFunctionId }
: {}),
+ ...(isDefined(healthCheckLogicFunctionId) ||
+ inferDeletionFromMissingEntities
+ ? { healthCheckLogicFunctionId }
+ : {}),
...(isDefined(defaultRoleId) ? { defaultRoleId } : {}),
});
}
diff --git a/packages/twenty-server/src/engine/core-modules/application/application-manifest/application-manifest.module.ts b/packages/twenty-server/src/engine/core-modules/application/application-manifest/application-manifest.module.ts
index 67e3f7478c1..f27f7ab7da3 100644
--- a/packages/twenty-server/src/engine/core-modules/application/application-manifest/application-manifest.module.ts
+++ b/packages/twenty-server/src/engine/core-modules/application/application-manifest/application-manifest.module.ts
@@ -9,6 +9,7 @@ import { ApplicationManifestExportService } from 'src/engine/core-modules/applic
import { ApplicationUninstallService } from 'src/engine/core-modules/application/application-manifest/services/application-uninstall.service';
import { ComputeApplicationManifestAllUniversalFlatEntityMapsService } from 'src/engine/core-modules/application/application-manifest/services/compute-application-manifest-all-universal-flat-entity-maps.service';
import { ApplicationSyncService } from 'src/engine/core-modules/application/application-manifest/application-sync.service';
+import { ApplicationHealthModule } from 'src/engine/core-modules/application/application-health/application-health.module';
import { ApplicationRegistrationModule } from 'src/engine/core-modules/application/application-registration/application-registration.module';
import { ApplicationTranslationModule } from 'src/engine/core-modules/application/application-translation/application-translation.module';
import { ApplicationVariableEntityModule } from 'src/engine/core-modules/application/application-variable/application-variable.module';
@@ -27,6 +28,7 @@ import { provideWorkspaceScopedRepository } from 'src/engine/twenty-orm/workspac
imports: [
TypeOrmModule.forFeature([ApplicationEntity, FrontComponentEntity]),
ApplicationModule,
+ ApplicationHealthModule,
ApplicationRegistrationModule,
ApplicationTranslationModule,
ApplicationVariableEntityModule,
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 fabbea6ce9c..8633fc93eb4 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
@@ -179,6 +179,7 @@ export class ApplicationSyncService {
defaultRole: null,
settingsCustomTabFrontComponentId: null,
uninstallLogicFunctionId: null,
+ healthCheckLogicFunctionId: null,
uninstallHookCompletedForRequestedAt: null,
canBeUninstalled: true,
autoUpgrade: false,
diff --git a/packages/twenty-server/src/engine/core-modules/application/application.entity.ts b/packages/twenty-server/src/engine/core-modules/application/application.entity.ts
index 6927b75ea0d..17985f0f66f 100644
--- a/packages/twenty-server/src/engine/core-modules/application/application.entity.ts
+++ b/packages/twenty-server/src/engine/core-modules/application/application.entity.ts
@@ -22,6 +22,7 @@ import { ApplicationState } from 'src/engine/core-modules/application/enums/appl
import { FileEntity } from 'src/engine/core-modules/file/entities/file.entity';
import { ApplicationVariableEntity } from 'src/engine/core-modules/application/application-variable/application-variable.entity';
import { PublicDomainEntity } from 'src/engine/core-modules/public-domain/public-domain.entity';
+import { ADD_HEALTH_CHECK_TO_APPLICATION_UPGRADE_COMMAND_NAME } from 'src/database/commands/upgrade-version-command/2-42/add-health-check-to-application-upgrade-command-name.constant';
import { WasIntroducedInUpgrade } from 'src/engine/core-modules/upgrade/decorators/was-introduced-in-upgrade.decorator';
import { AgentEntity } from 'src/engine/metadata-modules/ai/ai-agent/entities/agent.entity';
import { CommandMenuItemEntity } from 'src/engine/metadata-modules/command-menu-item/entities/command-menu-item.entity';
@@ -153,6 +154,12 @@ export class ApplicationEntity extends WorkspaceRelatedEntity {
})
uninstallHookCompletedForRequestedAt: Date | null;
+ @Column({ nullable: true, type: 'uuid' })
+ @WasIntroducedInUpgrade({
+ upgradeCommandName: ADD_HEALTH_CHECK_TO_APPLICATION_UPGRADE_COMMAND_NAME,
+ })
+ healthCheckLogicFunctionId: string | null;
+
@Column({ nullable: false, type: 'boolean', default: true })
canBeUninstalled: boolean;
diff --git a/packages/twenty-server/src/engine/core-modules/application/dtos/application-health-check-result.dto.ts b/packages/twenty-server/src/engine/core-modules/application/dtos/application-health-check-result.dto.ts
new file mode 100644
index 00000000000..3c37b069d44
--- /dev/null
+++ b/packages/twenty-server/src/engine/core-modules/application/dtos/application-health-check-result.dto.ts
@@ -0,0 +1,31 @@
+import { Field, ObjectType, registerEnumType } from '@nestjs/graphql';
+
+import { ApplicationHealthStatus } from 'twenty-shared/application';
+
+registerEnumType(ApplicationHealthStatus, {
+ name: 'ApplicationHealthStatus',
+});
+
+@ObjectType('ApplicationHealthCheckAction')
+export class ApplicationHealthCheckActionDTO {
+ @Field(() => String)
+ label: string;
+
+ @Field(() => String, { nullable: true })
+ location: string | null;
+}
+
+@ObjectType('ApplicationHealthCheckResult')
+export class ApplicationHealthCheckResultDTO {
+ @Field(() => ApplicationHealthStatus)
+ status: ApplicationHealthStatus;
+
+ @Field(() => String, { nullable: true })
+ title: string | null;
+
+ @Field(() => String, { nullable: true })
+ description: string | null;
+
+ @Field(() => ApplicationHealthCheckActionDTO, { nullable: true })
+ action: ApplicationHealthCheckActionDTO | null;
+}
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 b5d3d56664b..065af9292fe 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
@@ -101,6 +101,11 @@ export class ApplicationDTO {
@Field(() => UUIDScalarType, { nullable: true })
settingsCustomTabFrontComponentId?: string;
+ @IsOptional()
+ @IsUUID()
+ @Field(() => UUIDScalarType, { nullable: true })
+ healthCheckLogicFunctionId?: string;
+
@IsOptional()
@Field(() => RoleDTO, { nullable: true })
defaultLogicFunctionRole?: RoleDTO;
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 21b5db023b0..dd23f1e1e97 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
@@ -16,6 +16,7 @@ export const fromFlatApplicationToApplicationDto = ({
universalIdentifier,
version,
settingsCustomTabFrontComponentId,
+ healthCheckLogicFunctionId,
}: FlatApplication): ApplicationDTO => {
return {
canBeUninstalled,
@@ -34,5 +35,6 @@ export const fromFlatApplicationToApplicationDto = ({
version: version ?? undefined,
settingsCustomTabFrontComponentId:
settingsCustomTabFrontComponentId ?? undefined,
+ healthCheckLogicFunctionId: healthCheckLogicFunctionId ?? undefined,
};
};
diff --git a/packages/twenty-server/src/engine/metadata-modules/flat-field-metadata/__tests__/morph-relation-from-create-field-input-to-flat-field-metadatas-to-create.spec.ts b/packages/twenty-server/src/engine/metadata-modules/flat-field-metadata/__tests__/morph-relation-from-create-field-input-to-flat-field-metadatas-to-create.spec.ts
index 062fe39d266..3b8e92dada5 100644
--- a/packages/twenty-server/src/engine/metadata-modules/flat-field-metadata/__tests__/morph-relation-from-create-field-input-to-flat-field-metadatas-to-create.spec.ts
+++ b/packages/twenty-server/src/engine/metadata-modules/flat-field-metadata/__tests__/morph-relation-from-create-field-input-to-flat-field-metadatas-to-create.spec.ts
@@ -43,6 +43,7 @@ const MOCK_FLAT_APPLICATION: FlatApplication = {
defaultRoleId: null,
defaultRole: null,
settingsCustomTabFrontComponentId: null,
+ healthCheckLogicFunctionId: null,
uninstallLogicFunctionId: null,
uninstallHookCompletedForRequestedAt: null,
canBeUninstalled: false,
diff --git a/packages/twenty-server/src/engine/metadata-modules/flat-field-metadata/utils/__tests__/generate-morph-or-relation-flat-field-metadata-pair.spec.ts b/packages/twenty-server/src/engine/metadata-modules/flat-field-metadata/utils/__tests__/generate-morph-or-relation-flat-field-metadata-pair.spec.ts
index 3bfe8b8171c..699181ca1dd 100644
--- a/packages/twenty-server/src/engine/metadata-modules/flat-field-metadata/utils/__tests__/generate-morph-or-relation-flat-field-metadata-pair.spec.ts
+++ b/packages/twenty-server/src/engine/metadata-modules/flat-field-metadata/utils/__tests__/generate-morph-or-relation-flat-field-metadata-pair.spec.ts
@@ -38,6 +38,7 @@ const MOCK_FLAT_APPLICATION: FlatApplication = {
defaultRoleId: null,
defaultRole: null,
settingsCustomTabFrontComponentId: null,
+ healthCheckLogicFunctionId: null,
uninstallLogicFunctionId: null,
uninstallHookCompletedForRequestedAt: null,
canBeUninstalled: false,
diff --git a/packages/twenty-shared/src/application/__tests__/applicationHealthType.spec.ts b/packages/twenty-shared/src/application/__tests__/applicationHealthType.spec.ts
new file mode 100644
index 00000000000..91f0e3dee1a
--- /dev/null
+++ b/packages/twenty-shared/src/application/__tests__/applicationHealthType.spec.ts
@@ -0,0 +1,67 @@
+import { ApplicationHealthStatus } from '@/application/applicationHealthStatus';
+import { isApplicationHealthCheckResult } from '@/application/applicationHealthType';
+
+describe('isApplicationHealthCheckResult', () => {
+ it.each([
+ [{ status: 'OK' }],
+ [{ status: ApplicationHealthStatus.OK }],
+ [{ status: 'SUCCESS', title: 'Connected as acme' }],
+ [
+ {
+ status: ApplicationHealthStatus.WARNING,
+ title: 'Quota almost reached',
+ },
+ ],
+ [{ status: 'INFO', title: 'Key expires soon' }],
+ [{ status: 'WARNING', title: 'Quota almost reached' }],
+ [{ status: 'NEUTRAL', title: 'Nothing synced yet' }],
+ [
+ {
+ status: 'ERROR',
+ title: 'Key revoked',
+ action: { label: 'Fix', location: '/settings/billing' },
+ },
+ ],
+ [{ status: 'ERROR', title: 'Key revoked', action: { label: 'Fix' } }],
+ [
+ {
+ status: 'ERROR',
+ title: 'Key revoked',
+ description: 'Generate a new one from the provider dashboard.',
+ },
+ ],
+ ])('should accept %p', (value) => {
+ expect(isApplicationHealthCheckResult(value)).toBe(true);
+ });
+
+ it.each([
+ [null],
+ ['ok'],
+ [{}],
+ [{ status: 'UNKNOWN' }],
+ [{ status: 'error', title: 'Boom' }],
+ [{ status: 'ERROR' }],
+ [{ status: 'ERROR', title: '' }],
+ [{ status: 'ERROR', title: 'Boom', description: '' }],
+ [{ status: 'ERROR', title: 'Boom', description: 2 }],
+ [{ status: 'ERROR', title: 'Boom', action: {} }],
+ [{ status: 'ERROR', title: 'Boom', action: { label: 2 } }],
+ [{ status: 'ERROR', title: 'Boom', action: { label: '' } }],
+ [
+ {
+ status: 'ERROR',
+ title: 'Boom',
+ action: { label: 'Fix', location: 2 },
+ },
+ ],
+ [
+ {
+ status: 'ERROR',
+ title: 'Boom',
+ action: { label: 'Fix', location: '' },
+ },
+ ],
+ ])('should reject %p', (value) => {
+ expect(isApplicationHealthCheckResult(value)).toBe(false);
+ });
+});
diff --git a/packages/twenty-shared/src/application/applicationHealthStatus.ts b/packages/twenty-shared/src/application/applicationHealthStatus.ts
new file mode 100644
index 00000000000..a152229511f
--- /dev/null
+++ b/packages/twenty-shared/src/application/applicationHealthStatus.ts
@@ -0,0 +1,10 @@
+// An enum rather than a literal union because it is exposed as a GraphQL enum.
+export enum ApplicationHealthStatus {
+ OK = 'OK',
+ SUCCESS = 'SUCCESS',
+ INFO = 'INFO',
+ WARNING = 'WARNING',
+ ERROR = 'ERROR',
+ NEUTRAL = 'NEUTRAL',
+ UNKNOWN = 'UNKNOWN',
+}
diff --git a/packages/twenty-shared/src/application/applicationHealthType.ts b/packages/twenty-shared/src/application/applicationHealthType.ts
new file mode 100644
index 00000000000..ca69e45b252
--- /dev/null
+++ b/packages/twenty-shared/src/application/applicationHealthType.ts
@@ -0,0 +1,88 @@
+import { isNonEmptyString, isObject } from '@sniptt/guards';
+
+import { ApplicationHealthStatus } from './applicationHealthStatus';
+
+// The string form of the enum, so an app can write either 'WARNING' or
+// ApplicationHealthStatus.WARNING. UNKNOWN is Twenty's answer to a check it
+// could not read, never something an app reports.
+export type ApplicationHealthCheckReportedStatus = Exclude<
+ `${ApplicationHealthStatus}`,
+ `${ApplicationHealthStatus.UNKNOWN}`
+>;
+
+export type ApplicationHealthCheckReportedBannerStatus = Exclude<
+ ApplicationHealthCheckReportedStatus,
+ `${ApplicationHealthStatus.OK}`
+>;
+
+const APPLICATION_HEALTH_CHECK_REPORTED_BANNER_STATUSES: readonly string[] =
+ Object.values(ApplicationHealthStatus).filter(
+ (status) =>
+ status !== ApplicationHealthStatus.OK &&
+ status !== ApplicationHealthStatus.UNKNOWN,
+ );
+
+export type ApplicationHealthCheckAction = {
+ label: string;
+ location?: string;
+};
+
+export type ApplicationHealthCheckResult =
+ | { status: `${ApplicationHealthStatus.OK}` }
+ | {
+ status: ApplicationHealthCheckReportedBannerStatus;
+ title: string;
+ description?: string;
+ action?: ApplicationHealthCheckAction;
+ };
+
+const isApplicationHealthCheckReportedBannerStatus = (
+ value: unknown,
+): value is ApplicationHealthCheckReportedBannerStatus =>
+ isNonEmptyString(value) &&
+ APPLICATION_HEALTH_CHECK_REPORTED_BANNER_STATUSES.includes(value);
+
+export const isApplicationHealthCheckResult = (
+ value: unknown,
+): value is ApplicationHealthCheckResult => {
+ if (!isObject(value)) {
+ return false;
+ }
+
+ const { status, title, description, action } = value as Record<
+ string,
+ unknown
+ >;
+
+ if (status === ApplicationHealthStatus.OK) {
+ return true;
+ }
+
+ if (!isApplicationHealthCheckReportedBannerStatus(status)) {
+ return false;
+ }
+
+ if (!isNonEmptyString(title)) {
+ return false;
+ }
+
+ if (description !== undefined && !isNonEmptyString(description)) {
+ return false;
+ }
+
+ if (action === undefined) {
+ return true;
+ }
+
+ if (!isObject(action)) {
+ return false;
+ }
+
+ const { label, location } = action as Record<string, unknown>;
+
+ if (!isNonEmptyString(label)) {
+ return false;
+ }
+
+ return location === undefined || isNonEmptyString(location);
+};
diff --git a/packages/twenty-shared/src/application/applicationType.ts b/packages/twenty-shared/src/application/applicationType.ts
index f8976af0b57..510879e7b1a 100644
--- a/packages/twenty-shared/src/application/applicationType.ts
+++ b/packages/twenty-shared/src/application/applicationType.ts
@@ -1,3 +1,4 @@
+import { type HealthCheckLogicFunctionApplicationManifest } from '@/application/healthCheckLogicFunctionApplicationType';
import { type PostInstallLogicFunctionApplicationManifest } from '@/application/postInstallLogicFunctionApplicationType';
import { type PreInstallLogicFunctionApplicationManifest } from '@/application/preInstallLogicFunctionApplicationType';
import { type SettingsFrontComponentApplicationManifest } from '@/application/settingsFrontComponentApplicationType';
@@ -36,6 +37,7 @@ export type ApplicationManifest = SyncableEntityOptions & {
postInstallLogicFunction?: PostInstallLogicFunctionApplicationManifest;
preInstallLogicFunction?: PreInstallLogicFunctionApplicationManifest;
uninstallLogicFunction?: UninstallLogicFunctionApplicationManifest;
+ healthCheckLogicFunction?: HealthCheckLogicFunctionApplicationManifest;
settingsFrontComponent?: SettingsFrontComponentApplicationManifest;
frontComponentSharedDependencies?: FrontComponentSharedDependenciesManifest;
/**
diff --git a/packages/twenty-shared/src/application/healthCheckLogicFunctionApplicationType.ts b/packages/twenty-shared/src/application/healthCheckLogicFunctionApplicationType.ts
new file mode 100644
index 00000000000..58553cec8d4
--- /dev/null
+++ b/packages/twenty-shared/src/application/healthCheckLogicFunctionApplicationType.ts
@@ -0,0 +1,3 @@
+import type { SyncableEntityOptions } from '@/application/syncableEntityOptionsType';
+
+export type HealthCheckLogicFunctionApplicationManifest = SyncableEntityOptions;
diff --git a/packages/twenty-shared/src/application/index.ts b/packages/twenty-shared/src/application/index.ts
index e7e0c35d3b5..4be60b6529f 100644
--- a/packages/twenty-shared/src/application/index.ts
+++ b/packages/twenty-shared/src/application/index.ts
@@ -36,6 +36,14 @@ export {
APPLICATION_CATEGORIES,
isKnownApplicationCategory,
} from './applicationCategoryType';
+export { ApplicationHealthStatus } from './applicationHealthStatus';
+export type {
+ ApplicationHealthCheckReportedStatus,
+ ApplicationHealthCheckReportedBannerStatus,
+ ApplicationHealthCheckAction,
+ ApplicationHealthCheckResult,
+} from './applicationHealthType';
+export { isApplicationHealthCheckResult } from './applicationHealthType';
export type { ApplicationManifest } from './applicationType';
export type {
ApplicationVariableType,
@@ -140,6 +148,7 @@ export type {
FrontComponentManifest,
} from './frontComponentManifestType';
export type { FrontComponentSharedDependenciesManifest } from './frontComponentSharedDependenciesManifestType';
+export type { HealthCheckLogicFunctionApplicationManifest } from './healthCheckLogicFunctionApplicationType';
export type { IndexFieldManifest } from './indexFieldManifestType';
export type { IndexManifest } from './indexManifestType';
export type {
diff --git a/packages/twenty-ui/src/primitives/feedback/Callout/Callout.module.scss b/packages/twenty-ui/src/primitives/feedback/Callout/Callout.module.scss
index c27d536b8a3..895bc8e25fa 100644
--- a/packages/twenty-ui/src/primitives/feedback/Callout/Callout.module.scss
+++ b/packages/twenty-ui/src/primitives/feedback/Callout/Callout.module.scss
@@ -11,6 +11,10 @@
width: 100%;
}
+.containerFullWidth {
+ max-width: none;
+}
+
.containerInfo {
background-color: var(--t-accent-accent1);
border-color: var(--t-accent-accent6);
diff --git a/packages/twenty-ui/src/primitives/feedback/Callout/Callout.module.scss.d.ts b/packages/twenty-ui/src/primitives/feedback/Callout/Callout.module.scss.d.ts
index 42c7d07542b..d75f25220cd 100644
--- a/packages/twenty-ui/src/primitives/feedback/Callout/Callout.module.scss.d.ts
+++ b/packages/twenty-ui/src/primitives/feedback/Callout/Callout.module.scss.d.ts
@@ -1,6 +1,7 @@
declare const classNames: {
readonly closeButton: 'closeButton';
readonly container: 'container';
+ readonly containerFullWidth: 'containerFullWidth';
readonly containerInfo: 'containerInfo';
readonly containerWarning: 'containerWarning';
readonly containerSuccess: 'containerSuccess';
diff --git a/packages/twenty-ui/src/primitives/feedback/Callout/Callout.tsx b/packages/twenty-ui/src/primitives/feedback/Callout/Callout.tsx
index a8f76065f2b..779c718cf9c 100644
--- a/packages/twenty-ui/src/primitives/feedback/Callout/Callout.tsx
+++ b/packages/twenty-ui/src/primitives/feedback/Callout/Callout.tsx
@@ -1,5 +1,6 @@
import { clsx } from 'clsx';
import { useState } from 'react';
+import { isNonEmptyString } from '@sniptt/guards';
import { isDefined } from '@ui/utilities/utils/isDefined';
import { IconHelp, IconX } from '@ui/icon/components/TablerIcons';
@@ -34,7 +35,8 @@ const CALLOUT_ICON_VARIANT_CLASS_NAMES: Record<CalloutVariant, string> = {
export type CalloutProps = {
variant: CalloutVariant;
title: string;
- description: string;
+ description?: string;
+ fullWidth?: boolean;
Icon?: IconComponent;
action?: {
label: string;
@@ -48,6 +50,7 @@ export const Callout = ({
variant,
title,
description,
+ fullWidth = false,
Icon = IconHelp,
action,
isClosable = false,
@@ -73,6 +76,7 @@ export const Callout = ({
className={clsx(
styles.container,
CALLOUT_CONTAINER_VARIANT_CLASS_NAMES[variant],
+ fullWidth && styles.containerFullWidth,
)}
>
<div className={styles.header}>
@@ -96,14 +100,16 @@ export const Callout = ({
/>
)}
</div>
- <div
- className={clsx(
- styles.descriptionWrapper,
- isDefined(action) && styles.descriptionWrapperWithAction,
- )}
- >
- <div className={styles.description}>{description}</div>
- </div>
+ {isNonEmptyString(description) && (
+ <div
+ className={clsx(
+ styles.descriptionWrapper,
+ isDefined(action) && styles.descriptionWrapperWithAction,
+ )}
+ >
+ <div className={styles.description}>{description}</div>
+ </div>
+ )}
{isDefined(action) && (
<div className={styles.footer}>
<Button
diff --git a/packages/twenty-ui/src/primitives/feedback/Callout/__stories__/Callout.stories.tsx b/packages/twenty-ui/src/primitives/feedback/Callout/__stories__/Callout.stories.tsx
index f314b61685a..0b01b94b4a8 100644
--- a/packages/twenty-ui/src/primitives/feedback/Callout/__stories__/Callout.stories.tsx
+++ b/packages/twenty-ui/src/primitives/feedback/Callout/__stories__/Callout.stories.tsx
@@ -32,6 +32,20 @@ export const Default: Story = {
decorators: [ComponentDecorator],
};
+export const FullWidth: Story = {
+ parameters: { a11y: A11Y_DEFER_COLOR_CONTRAST },
+ args: {
+ variant: 'error',
+ title: 'Your Postcard provider key was revoked.',
+ fullWidth: true,
+ action: {
+ label: 'Reconnect',
+ onClick: () => {},
+ },
+ },
+ decorators: [ComponentDecorator],
+};
+
export const Catalog: CatalogStory<Story, typeof Callout> = {
args: {
title: 'This form will appear in workflow runs.',