diff --git a/packages/twenty-client-sdk/src/metadata/generated/schema.graphql b/packages/twenty-client-sdk/src/metadata/generated/schema.graphql index 4b95d1ae5e..09f35091ad 100644 --- a/packages/twenty-client-sdk/src/metadata/generated/schema.graphql +++ b/packages/twenty-client-sdk/src/metadata/generated/schema.graphql @@ -441,6 +441,7 @@ type LogicFunction { description: String runtime: String! timeoutSeconds: Float! + executionMode: LogicFunctionExecutionMode! sourceHandlerPath: String! handlerName: String! cronTriggerSettings: JSON @@ -454,6 +455,11 @@ type LogicFunction { updatedAt: DateTime! } +enum LogicFunctionExecutionMode { + LIVE + PREBUILT +} + type StandardOverrides { label: String description: String @@ -1779,6 +1785,7 @@ enum FeatureFlagKey { IS_EMAIL_GROUP_ENABLED IS_JUNCTION_RELATIONS_ENABLED IS_REST_METADATA_API_NEW_FORMAT_DIRECT + IS_LOGIC_FUNCTION_PREBUILT_MODE_ENABLED IS_SETTINGS_DISCOVERY_HERO_ENABLED } diff --git a/packages/twenty-client-sdk/src/metadata/generated/schema.ts b/packages/twenty-client-sdk/src/metadata/generated/schema.ts index 446464d971..e2bda1803c 100644 --- a/packages/twenty-client-sdk/src/metadata/generated/schema.ts +++ b/packages/twenty-client-sdk/src/metadata/generated/schema.ts @@ -326,6 +326,7 @@ export interface LogicFunction { description?: Scalars['String'] runtime: Scalars['String'] timeoutSeconds: Scalars['Float'] + executionMode: LogicFunctionExecutionMode sourceHandlerPath: Scalars['String'] handlerName: Scalars['String'] cronTriggerSettings?: Scalars['JSON'] @@ -340,6 +341,8 @@ export interface LogicFunction { __typename: 'LogicFunction' } +export type LogicFunctionExecutionMode = 'LIVE' | 'PREBUILT' + export interface StandardOverrides { label?: Scalars['String'] description?: Scalars['String'] @@ -1411,7 +1414,7 @@ export interface FeatureFlag { __typename: 'FeatureFlag' } -export type FeatureFlagKey = 'IS_UNIQUE_INDEXES_ENABLED' | 'IS_JSON_FILTER_ENABLED' | 'IS_MARKETPLACE_SETTING_TAB_VISIBLE' | 'IS_PUBLIC_DOMAIN_ENABLED' | 'IS_EMAIL_GROUP_ENABLED' | 'IS_JUNCTION_RELATIONS_ENABLED' | 'IS_REST_METADATA_API_NEW_FORMAT_DIRECT' | 'IS_SETTINGS_DISCOVERY_HERO_ENABLED' +export type FeatureFlagKey = 'IS_UNIQUE_INDEXES_ENABLED' | 'IS_JSON_FILTER_ENABLED' | 'IS_MARKETPLACE_SETTING_TAB_VISIBLE' | 'IS_PUBLIC_DOMAIN_ENABLED' | 'IS_EMAIL_GROUP_ENABLED' | 'IS_JUNCTION_RELATIONS_ENABLED' | 'IS_REST_METADATA_API_NEW_FORMAT_DIRECT' | 'IS_LOGIC_FUNCTION_PREBUILT_MODE_ENABLED' | 'IS_SETTINGS_DISCOVERY_HERO_ENABLED' export interface WorkspaceUrls { customUrl?: Scalars['String'] @@ -3204,6 +3207,7 @@ export interface LogicFunctionGenqlSelection{ description?: boolean | number runtime?: boolean | number timeoutSeconds?: boolean | number + executionMode?: boolean | number sourceHandlerPath?: boolean | number handlerName?: boolean | number cronTriggerSettings?: boolean | number @@ -8422,6 +8426,11 @@ export const enumCommandMenuItemAvailabilityType = { FALLBACK: 'FALLBACK' as const } +export const enumLogicFunctionExecutionMode = { + LIVE: 'LIVE' as const, + PREBUILT: 'PREBUILT' as const +} + export const enumFieldMetadataType = { ACTOR: 'ACTOR' as const, ADDRESS: 'ADDRESS' as const, @@ -8733,6 +8742,7 @@ export const enumFeatureFlagKey = { IS_EMAIL_GROUP_ENABLED: 'IS_EMAIL_GROUP_ENABLED' as const, IS_JUNCTION_RELATIONS_ENABLED: 'IS_JUNCTION_RELATIONS_ENABLED' as const, IS_REST_METADATA_API_NEW_FORMAT_DIRECT: 'IS_REST_METADATA_API_NEW_FORMAT_DIRECT' as const, + IS_LOGIC_FUNCTION_PREBUILT_MODE_ENABLED: 'IS_LOGIC_FUNCTION_PREBUILT_MODE_ENABLED' as const, IS_SETTINGS_DISCOVERY_HERO_ENABLED: 'IS_SETTINGS_DISCOVERY_HERO_ENABLED' 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 1562ee2da9..b1330e150b 100644 --- a/packages/twenty-client-sdk/src/metadata/generated/types.ts +++ b/packages/twenty-client-sdk/src/metadata/generated/types.ts @@ -16,70 +16,71 @@ export default { 24, 36, 37, - 44, - 47, - 49, - 60, - 62, - 64, - 67, - 70, + 42, + 45, + 48, + 50, + 61, + 63, + 65, + 68, 71, 72, 73, 74, - 76, - 79, + 75, + 77, 80, - 85, - 88, - 93, - 96, + 81, + 86, + 89, + 94, 97, - 99, - 102, + 98, + 100, 103, - 109, - 123, - 131, + 104, + 110, + 124, 132, - 139, + 133, 140, 141, - 143, - 151, - 162, - 165, - 167, - 171, - 173, - 178, + 142, + 144, + 152, + 163, + 166, + 168, + 172, + 174, 179, - 186, - 189, - 192, - 205, - 230, - 293, - 303, + 180, + 187, + 190, + 193, + 206, + 231, + 294, 304, 305, 306, - 308, + 307, 309, 310, 311, 312, 313, 314, - 317, - 319, - 328, - 335, - 342, - 378, - 460, - 472 + 315, + 318, + 320, + 329, + 336, + 343, + 379, + 461, + 473 ], "types": { "BillingProductDTO": { @@ -93,13 +94,13 @@ export default { 1 ], "metadata": [ - 138 + 139 ], "on_BillingLicensedProduct": [ - 147 + 148 ], "on_BillingMeteredProduct": [ - 148 + 149 ], "__typename": [ 1 @@ -334,7 +335,7 @@ export default { 3 ], "user": [ - 78 + 79 ], "userId": [ 3 @@ -824,6 +825,9 @@ export default { "timeoutSeconds": [ 11 ], + "executionMode": [ + 42 + ], "sourceHandlerPath": [ 1 ], @@ -861,6 +865,7 @@ export default { 1 ] }, + "LogicFunctionExecutionMode": {}, "StandardOverrides": { "label": [ 1 @@ -886,7 +891,7 @@ export default { 1 ], "type": [ - 44 + 45 ], "name": [ 1 @@ -901,7 +906,7 @@ export default { 1 ], "standardOverrides": [ - 42 + 43 ], "isCustom": [ 6 @@ -949,13 +954,13 @@ export default { 3 ], "relation": [ - 204 + 205 ], "morphRelations": [ - 204 + 205 ], "object": [ - 55 + 56 ], "__typename": [ 1 @@ -1002,7 +1007,7 @@ export default { 1 ], "indexType": [ - 47 + 48 ], "createdAt": [ 4 @@ -1011,30 +1016,30 @@ export default { 4 ], "indexFieldMetadataList": [ - 45 + 46 ], "objectMetadata": [ - 212, + 213, { "paging": [ - 48, + 49, "CursorPaging!" ], "filter": [ - 50, + 51, "ObjectFilter!" ] } ], "indexFieldMetadatas": [ - 210, + 211, { "paging": [ - 48, + 49, "CursorPaging!" ], "filter": [ - 53, + 54, "IndexFieldFilter!" ] } @@ -1046,10 +1051,10 @@ export default { "IndexType": {}, "CursorPaging": { "before": [ - 49 + 50 ], "after": [ - 49 + 50 ], "first": [ 21 @@ -1064,31 +1069,31 @@ export default { "ConnectionCursor": {}, "ObjectFilter": { "and": [ - 50 - ], - "or": [ - 50 - ], - "id": [ 51 ], - "isCustom": [ + "or": [ + 51 + ], + "id": [ 52 ], + "isCustom": [ + 53 + ], "isRemote": [ - 52 + 53 ], "isActive": [ - 52 + 53 ], "isSystem": [ - 52 + 53 ], "isUIReadOnly": [ - 52 + 53 ], "isSearchable": [ - 52 + 53 ], "__typename": [ 1 @@ -1154,16 +1159,16 @@ export default { }, "IndexFieldFilter": { "and": [ - 53 + 54 ], "or": [ - 53 + 54 ], "id": [ - 51 + 52 ], "fieldMetadataId": [ - 51 + 52 ], "__typename": [ 1 @@ -1218,7 +1223,7 @@ export default { 1 ], "standardOverrides": [ - 54 + 55 ], "shortcut": [ 1 @@ -1266,33 +1271,33 @@ export default { 1 ], "fieldsList": [ - 43 + 44 ], "indexMetadataList": [ - 46 + 47 ], "fields": [ - 217, + 218, { "paging": [ - 48, + 49, "CursorPaging!" ], "filter": [ - 56, + 57, "FieldFilter!" ] } ], "indexMetadatas": [ - 215, + 216, { "paging": [ - 48, + 49, "CursorPaging!" ], "filter": [ - 57, + 58, "IndexFilter!" ] } @@ -1303,28 +1308,28 @@ export default { }, "FieldFilter": { "and": [ - 56 + 57 ], "or": [ - 56 + 57 ], "id": [ - 51 + 52 ], "isCustom": [ - 52 + 53 ], "isActive": [ - 52 + 53 ], "isSystem": [ - 52 + 53 ], "isUIReadOnly": [ - 52 + 53 ], "objectMetadataId": [ - 51 + 52 ], "__typename": [ 1 @@ -1332,16 +1337,16 @@ export default { }, "IndexFilter": { "and": [ - 57 + 58 ], "or": [ - 57 + 58 ], "id": [ - 51 + 52 ], "isCustom": [ - 52 + 53 ], "__typename": [ 1 @@ -1409,7 +1414,7 @@ export default { 41 ], "objects": [ - 55 + 56 ], "applicationVariables": [ 31 @@ -1438,7 +1443,7 @@ export default { 11 ], "aggregateOperation": [ - 60 + 61 ], "viewId": [ 3 @@ -1477,7 +1482,7 @@ export default { 3 ], "logicalOperator": [ - 62 + 63 ], "positionInViewFilterGroup": [ 11 @@ -1510,7 +1515,7 @@ export default { 3 ], "operand": [ - 64 + 65 ], "value": [ 15 @@ -1587,7 +1592,7 @@ export default { 3 ], "direction": [ - 67 + 68 ], "subFieldName": [ 1 @@ -1644,7 +1649,7 @@ export default { 4 ], "viewFields": [ - 59 + 60 ], "isOverridden": [ 6 @@ -1664,10 +1669,10 @@ export default { 3 ], "type": [ - 70 + 71 ], "key": [ - 71 + 72 ], "icon": [ 1 @@ -1682,10 +1687,10 @@ export default { 6 ], "openRecordIn": [ - 72 + 73 ], "kanbanAggregateOperation": [ - 60 + 61 ], "kanbanAggregateOperationFieldMetadataId": [ 3 @@ -1706,7 +1711,7 @@ export default { 1 ], "calendarLayout": [ - 73 + 74 ], "createdAt": [ 4 @@ -1718,25 +1723,25 @@ export default { 4 ], "viewFields": [ - 59 + 60 ], "viewFilters": [ - 63 + 64 ], "viewFilterGroups": [ - 61 + 62 ], "viewSorts": [ - 66 + 67 ], "viewGroups": [ - 65 + 66 ], "viewFieldGroups": [ - 68 + 69 ], "visibility": [ - 74 + 75 ], "createdByUserWorkspaceId": [ 3 @@ -1791,25 +1796,25 @@ export default { 11 ], "activationStatus": [ - 76 + 77 ], "views": [ - 69 + 70 ], "viewFields": [ - 59 + 60 ], "viewFilters": [ - 63 + 64 ], "viewFilterGroups": [ - 61 + 62 ], "viewGroups": [ - 65 + 66 ], "viewSorts": [ - 66 + 67 ], "metadataVersion": [ 11 @@ -1875,22 +1880,22 @@ export default { 1 ], "workspaceCustomApplication": [ - 58 + 59 ], "featureFlags": [ - 172 + 173 ], "billingSubscriptions": [ - 150 + 151 ], "installedApplications": [ - 58 + 59 ], "currentBillingSubscription": [ - 150 + 151 ], "billingEntitlements": [ - 229 + 230 ], "hasValidEnterpriseKey": [ 6 @@ -1902,7 +1907,7 @@ export default { 6 ], "workspaceUrls": [ - 174 + 175 ], "workspaceCustomApplicationId": [ 1 @@ -1976,22 +1981,22 @@ export default { 17 ], "onboardingStatus": [ - 79 + 80 ], "currentWorkspace": [ - 75 + 76 ], "currentUserWorkspace": [ 17 ], "userVars": [ - 80 + 81 ], "workspaceMembers": [ 20 ], "deletedWorkspaceMembers": [ - 228 + 229 ], "hasPassword": [ 6 @@ -2003,7 +2008,7 @@ export default { 17 ], "availableWorkspaces": [ - 227 + 228 ], "__typename": [ 1 @@ -2064,19 +2069,19 @@ export default { 1 ], "type": [ - 85 + 86 ], "objectMetadataId": [ 3 ], "gridPosition": [ - 83 + 84 ], "position": [ - 86 + 87 ], "configuration": [ - 91 + 92 ], "conditionalDisplay": [ 15 @@ -2106,13 +2111,13 @@ export default { "WidgetType": {}, "PageLayoutWidgetPosition": { "on_PageLayoutWidgetGridPosition": [ - 87 + 88 ], "on_PageLayoutWidgetVerticalListPosition": [ - 89 + 90 ], "on_PageLayoutWidgetCanvasPosition": [ - 90 + 91 ], "__typename": [ 1 @@ -2120,7 +2125,7 @@ export default { }, "PageLayoutWidgetGridPosition": { "layoutMode": [ - 88 + 89 ], "row": [ 21 @@ -2141,7 +2146,7 @@ export default { "PageLayoutTabLayoutMode": {}, "PageLayoutWidgetVerticalListPosition": { "layoutMode": [ - 88 + 89 ], "index": [ 21 @@ -2152,7 +2157,7 @@ export default { }, "PageLayoutWidgetCanvasPosition": { "layoutMode": [ - 88 + 89 ], "__typename": [ 1 @@ -2160,84 +2165,84 @@ export default { }, "WidgetConfiguration": { "on_AggregateChartConfiguration": [ - 92 + 93 ], "on_StandaloneRichTextConfiguration": [ - 94 - ], - "on_PieChartConfiguration": [ 95 ], + "on_PieChartConfiguration": [ + 96 + ], "on_LineChartConfiguration": [ - 98 + 99 ], "on_IframeConfiguration": [ - 100 - ], - "on_BarChartConfiguration": [ 101 ], - "on_CalendarConfiguration": [ - 104 + "on_BarChartConfiguration": [ + 102 ], - "on_FrontComponentConfiguration": [ + "on_CalendarConfiguration": [ 105 ], - "on_EmailsConfiguration": [ + "on_FrontComponentConfiguration": [ 106 ], - "on_EmailThreadConfiguration": [ + "on_EmailsConfiguration": [ 107 ], - "on_FieldConfiguration": [ + "on_EmailThreadConfiguration": [ 108 ], - "on_FieldRichTextConfiguration": [ - 110 + "on_FieldConfiguration": [ + 109 ], - "on_FieldsConfiguration": [ + "on_FieldRichTextConfiguration": [ 111 ], - "on_FilesConfiguration": [ + "on_FieldsConfiguration": [ 112 ], - "on_NotesConfiguration": [ + "on_FilesConfiguration": [ 113 ], - "on_TasksConfiguration": [ + "on_NotesConfiguration": [ 114 ], - "on_TimelineConfiguration": [ + "on_TasksConfiguration": [ 115 ], - "on_ViewConfiguration": [ + "on_TimelineConfiguration": [ 116 ], - "on_RecordTableConfiguration": [ + "on_ViewConfiguration": [ 117 ], - "on_WorkflowConfiguration": [ + "on_RecordTableConfiguration": [ 118 ], - "on_WorkflowRunConfiguration": [ + "on_WorkflowConfiguration": [ 119 ], - "on_WorkflowVersionConfiguration": [ + "on_WorkflowRunConfiguration": [ 120 ], + "on_WorkflowVersionConfiguration": [ + 121 + ], "__typename": [ 1 ] }, "AggregateChartConfiguration": { "configurationType": [ - 93 + 94 ], "aggregateFieldMetadataId": [ 3 ], "aggregateOperation": [ - 60 + 61 ], "label": [ 1 @@ -2267,7 +2272,7 @@ export default { 1 ], "ratioAggregateConfig": [ - 81 + 82 ], "__typename": [ 1 @@ -2276,10 +2281,10 @@ export default { "WidgetConfigurationType": {}, "StandaloneRichTextConfiguration": { "configurationType": [ - 93 + 94 ], "body": [ - 82 + 83 ], "__typename": [ 1 @@ -2287,13 +2292,13 @@ export default { }, "PieChartConfiguration": { "configurationType": [ - 93 + 94 ], "aggregateFieldMetadataId": [ 3 ], "aggregateOperation": [ - 60 + 61 ], "groupByFieldMetadataId": [ 3 @@ -2302,10 +2307,10 @@ export default { 1 ], "dateGranularity": [ - 96 + 97 ], "orderBy": [ - 97 + 98 ], "manualSortOrder": [ 1 @@ -2348,13 +2353,13 @@ export default { "GraphOrderBy": {}, "LineChartConfiguration": { "configurationType": [ - 93 + 94 ], "aggregateFieldMetadataId": [ 3 ], "aggregateOperation": [ - 60 + 61 ], "primaryAxisGroupByFieldMetadataId": [ 3 @@ -2363,10 +2368,10 @@ export default { 1 ], "primaryAxisDateGranularity": [ - 96 + 97 ], "primaryAxisOrderBy": [ - 97 + 98 ], "primaryAxisManualSortOrder": [ 1 @@ -2378,10 +2383,10 @@ export default { 1 ], "secondaryAxisGroupByDateGranularity": [ - 96 + 97 ], "secondaryAxisOrderBy": [ - 97 + 98 ], "secondaryAxisManualSortOrder": [ 1 @@ -2393,7 +2398,7 @@ export default { 6 ], "axisNameDisplay": [ - 99 + 100 ], "displayDataLabel": [ 6 @@ -2435,7 +2440,7 @@ export default { "AxisNameDisplay": {}, "IframeConfiguration": { "configurationType": [ - 93 + 94 ], "url": [ 1 @@ -2446,13 +2451,13 @@ export default { }, "BarChartConfiguration": { "configurationType": [ - 93 + 94 ], "aggregateFieldMetadataId": [ 3 ], "aggregateOperation": [ - 60 + 61 ], "primaryAxisGroupByFieldMetadataId": [ 3 @@ -2461,10 +2466,10 @@ export default { 1 ], "primaryAxisDateGranularity": [ - 96 + 97 ], "primaryAxisOrderBy": [ - 97 + 98 ], "primaryAxisManualSortOrder": [ 1 @@ -2476,10 +2481,10 @@ export default { 1 ], "secondaryAxisGroupByDateGranularity": [ - 96 + 97 ], "secondaryAxisOrderBy": [ - 97 + 98 ], "secondaryAxisManualSortOrder": [ 1 @@ -2491,7 +2496,7 @@ export default { 6 ], "axisNameDisplay": [ - 99 + 100 ], "displayDataLabel": [ 6 @@ -2515,10 +2520,10 @@ export default { 15 ], "groupMode": [ - 102 + 103 ], "layout": [ - 103 + 104 ], "isCumulative": [ 6 @@ -2537,7 +2542,7 @@ export default { "BarChartLayout": {}, "CalendarConfiguration": { "configurationType": [ - 93 + 94 ], "__typename": [ 1 @@ -2545,7 +2550,7 @@ export default { }, "FrontComponentConfiguration": { "configurationType": [ - 93 + 94 ], "frontComponentId": [ 3 @@ -2556,7 +2561,7 @@ export default { }, "EmailsConfiguration": { "configurationType": [ - 93 + 94 ], "__typename": [ 1 @@ -2564,7 +2569,7 @@ export default { }, "EmailThreadConfiguration": { "configurationType": [ - 93 + 94 ], "__typename": [ 1 @@ -2572,13 +2577,13 @@ export default { }, "FieldConfiguration": { "configurationType": [ - 93 + 94 ], "fieldMetadataId": [ 1 ], "fieldDisplayMode": [ - 109 + 110 ], "viewId": [ 1 @@ -2590,7 +2595,7 @@ export default { "FieldDisplayMode": {}, "FieldRichTextConfiguration": { "configurationType": [ - 93 + 94 ], "__typename": [ 1 @@ -2598,7 +2603,7 @@ export default { }, "FieldsConfiguration": { "configurationType": [ - 93 + 94 ], "viewId": [ 1 @@ -2615,7 +2620,7 @@ export default { }, "FilesConfiguration": { "configurationType": [ - 93 + 94 ], "__typename": [ 1 @@ -2623,7 +2628,7 @@ export default { }, "NotesConfiguration": { "configurationType": [ - 93 + 94 ], "__typename": [ 1 @@ -2631,7 +2636,7 @@ export default { }, "TasksConfiguration": { "configurationType": [ - 93 + 94 ], "__typename": [ 1 @@ -2639,7 +2644,7 @@ export default { }, "TimelineConfiguration": { "configurationType": [ - 93 + 94 ], "__typename": [ 1 @@ -2647,7 +2652,7 @@ export default { }, "ViewConfiguration": { "configurationType": [ - 93 + 94 ], "__typename": [ 1 @@ -2655,7 +2660,7 @@ export default { }, "RecordTableConfiguration": { "configurationType": [ - 93 + 94 ], "viewId": [ 1 @@ -2666,7 +2671,7 @@ export default { }, "WorkflowConfiguration": { "configurationType": [ - 93 + 94 ], "__typename": [ 1 @@ -2674,7 +2679,7 @@ export default { }, "WorkflowRunConfiguration": { "configurationType": [ - 93 + 94 ], "__typename": [ 1 @@ -2682,7 +2687,7 @@ export default { }, "WorkflowVersionConfiguration": { "configurationType": [ - 93 + 94 ], "__typename": [ 1 @@ -2705,13 +2710,13 @@ export default { 3 ], "widgets": [ - 84 + 85 ], "icon": [ 1 ], "layoutMode": [ - 88 + 89 ], "createdAt": [ 4 @@ -2740,13 +2745,13 @@ export default { 1 ], "type": [ - 123 + 124 ], "objectMetadataId": [ 3 ], "tabs": [ - 121 + 122 ], "defaultTabToFocusOnMobileAndSidePanelId": [ 3 @@ -2796,7 +2801,7 @@ export default { 1 ], "oauth": [ - 124 + 125 ], "__typename": [ 1 @@ -2881,13 +2886,13 @@ export default { 1 ], "driver": [ - 131 - ], - "status": [ 132 ], + "status": [ + 133 + ], "verificationRecords": [ - 129 + 130 ], "verifiedAt": [ 4 @@ -2962,7 +2967,7 @@ export default { 11 ], "items": [ - 136 + 137 ], "__typename": [ 1 @@ -2970,14 +2975,14 @@ export default { }, "BillingProductMetadata": { "planKey": [ - 139 - ], - "priceUsageBased": [ 140 ], - "productKey": [ + "priceUsageBased": [ 141 ], + "productKey": [ + 142 + ], "__typename": [ 1 ] @@ -2987,7 +2992,7 @@ export default { "BillingProductKey": {}, "BillingPriceLicensed": { "recurringInterval": [ - 143 + 144 ], "unitAmount": [ 11 @@ -2996,7 +3001,7 @@ export default { 1 ], "priceUsageType": [ - 140 + 141 ], "creditAmount": [ 11 @@ -3022,16 +3027,16 @@ export default { }, "BillingPriceMetered": { "tiers": [ - 144 + 145 ], "recurringInterval": [ - 143 + 144 ], "stripePriceId": [ 1 ], "priceUsageType": [ - 140 + 141 ], "__typename": [ 1 @@ -3048,7 +3053,7 @@ export default { 1 ], "metadata": [ - 138 + 139 ], "__typename": [ 1 @@ -3065,10 +3070,10 @@ export default { 1 ], "metadata": [ - 138 + 139 ], "prices": [ - 142 + 143 ], "__typename": [ 1 @@ -3085,10 +3090,10 @@ export default { 1 ], "metadata": [ - 138 + 139 ], "prices": [ - 145 + 146 ], "__typename": [ 1 @@ -3119,13 +3124,13 @@ export default { 3 ], "status": [ - 151 + 152 ], "interval": [ - 143 + 144 ], "billingSubscriptionItems": [ - 149 + 150 ], "currentPeriodEnd": [ 4 @@ -3134,7 +3139,7 @@ export default { 15 ], "phases": [ - 137 + 138 ], "__typename": [ 1 @@ -3143,7 +3148,7 @@ export default { "SubscriptionStatus": {}, "BillingEndTrialPeriod": { "status": [ - 151 + 152 ], "hasPaymentMethod": [ 6 @@ -3157,7 +3162,7 @@ export default { }, "BillingResourceCreditUsage": { "productKey": [ - 141 + 142 ], "periodStart": [ 4 @@ -3186,16 +3191,16 @@ export default { }, "BillingPlan": { "planKey": [ - 139 + 140 ], "baseProducts": [ - 147 + 148 ], "resourceCreditProducts": [ - 147 + 148 ], "meteredProducts": [ - 148 + 149 ], "__typename": [ 1 @@ -3211,10 +3216,10 @@ export default { }, "BillingUpdate": { "currentBillingSubscription": [ - 150 + 151 ], "billingSubscriptions": [ - 150 + 151 ], "__typename": [ 1 @@ -3253,7 +3258,7 @@ export default { 1 ], "result": [ - 158 + 159 ], "__typename": [ 1 @@ -3290,7 +3295,7 @@ export default { 3 ], "type": [ - 162 + 163 ], "name": [ 1 @@ -3323,7 +3328,7 @@ export default { 4 ], "targetRecordIdentifier": [ - 160 + 161 ], "__typename": [ 1 @@ -3349,7 +3354,7 @@ export default { }, "MetadataEvent": { "type": [ - 165 + 166 ], "metadataName": [ 1 @@ -3358,7 +3363,7 @@ export default { 1 ], "properties": [ - 163 + 164 ], "updatedCollectionHash": [ 1 @@ -3370,7 +3375,7 @@ export default { "MetadataEventAction": {}, "ObjectRecordEvent": { "action": [ - 167 + 168 ], "objectNameSingular": [ 1 @@ -3385,7 +3390,7 @@ export default { 1 ], "properties": [ - 163 + 164 ], "__typename": [ 1 @@ -3397,7 +3402,7 @@ export default { 1 ], "objectRecordEvent": [ - 166 + 167 ], "__typename": [ 1 @@ -3408,10 +3413,10 @@ export default { 1 ], "objectRecordEventsWithQueryIds": [ - 168 + 169 ], "metadataEvents": [ - 164 + 165 ], "__typename": [ 1 @@ -3428,7 +3433,7 @@ export default { 11 ], "status": [ - 171 + 172 ], "error": [ 15 @@ -3440,7 +3445,7 @@ export default { "LogicFunctionExecutionStatus": {}, "FeatureFlag": { "key": [ - 173 + 174 ], "value": [ 6 @@ -3512,10 +3517,10 @@ export default { 1 ], "type": [ - 178 + 179 ], "status": [ - 179 + 180 ], "issuer": [ 1 @@ -3528,7 +3533,7 @@ export default { "SSOIdentityProviderStatus": {}, "AuthProviders": { "sso": [ - 177 + 178 ], "google": [ 6 @@ -3565,10 +3570,10 @@ export default { 3 ], "authProviders": [ - 180 + 181 ], "authBypassProviders": [ - 181 + 182 ], "logo": [ 1 @@ -3577,7 +3582,7 @@ export default { 1 ], "workspaceUrls": [ - 174 + 175 ], "__typename": [ 1 @@ -3616,7 +3621,7 @@ export default { 1 ], "modelFamily": [ - 186 + 187 ], "modelFamilyLabel": [ 1 @@ -3631,7 +3636,7 @@ export default { 11 ], "nativeCapabilities": [ - 184 + 185 ], "isDeprecated": [ 6 @@ -3667,7 +3672,7 @@ export default { 1 ], "trialPeriods": [ - 176 + 177 ], "__typename": [ 1 @@ -3675,7 +3680,7 @@ export default { }, "Support": { "supportDriver": [ - 189 + 190 ], "supportFrontChatId": [ 1 @@ -3701,7 +3706,7 @@ export default { }, "Captcha": { "provider": [ - 192 + 193 ], "siteKey": [ 1 @@ -3735,10 +3740,10 @@ export default { }, "PublicFeatureFlag": { "key": [ - 173 + 174 ], "metadata": [ - 194 + 195 ], "__typename": [ 1 @@ -3763,13 +3768,13 @@ export default { 1 ], "authProviders": [ - 180 + 181 ], "billing": [ - 187 + 188 ], "aiModels": [ - 185 + 186 ], "signInPrefilled": [ 6 @@ -3790,25 +3795,25 @@ export default { 6 ], "support": [ - 188 + 189 ], "isAttachmentPreviewEnabled": [ 6 ], "sentry": [ - 190 - ], - "captcha": [ 191 ], + "captcha": [ + 192 + ], "api": [ - 193 + 194 ], "canManageFeatureFlags": [ 6 ], "publicFeatureFlags": [ - 195 + 196 ], "isMicrosoftMessagingEnabled": [ 6 @@ -3847,7 +3852,7 @@ export default { 6 ], "maintenance": [ - 196 + 197 ], "__typename": [ 1 @@ -3886,7 +3891,7 @@ export default { 1 ], "versionDistribution": [ - 199 + 200 ], "__typename": [ 1 @@ -3933,19 +3938,19 @@ export default { }, "Relation": { "type": [ - 205 + 206 ], "sourceObjectMetadata": [ - 55 + 56 ], "targetObjectMetadata": [ - 55 + 56 ], "sourceFieldMetadata": [ - 43 + 44 ], "targetFieldMetadata": [ - 43 + 44 ], "__typename": [ 1 @@ -3954,10 +3959,10 @@ export default { "RelationType": {}, "IndexEdge": { "node": [ - 46 + 47 ], "cursor": [ - 49 + 50 ], "__typename": [ 1 @@ -3971,10 +3976,10 @@ export default { 6 ], "startCursor": [ - 49 + 50 ], "endCursor": [ - 49 + 50 ], "__typename": [ 1 @@ -3982,10 +3987,10 @@ export default { }, "IndexConnection": { "pageInfo": [ - 207 + 208 ], "edges": [ - 206 + 207 ], "__typename": [ 1 @@ -3993,10 +3998,10 @@ export default { }, "IndexFieldEdge": { "node": [ - 45 + 46 ], "cursor": [ - 49 + 50 ], "__typename": [ 1 @@ -4004,10 +4009,10 @@ export default { }, "IndexIndexFieldMetadatasConnection": { "pageInfo": [ - 207 + 208 ], "edges": [ - 209 + 210 ], "__typename": [ 1 @@ -4015,10 +4020,10 @@ export default { }, "ObjectEdge": { "node": [ - 55 + 56 ], "cursor": [ - 49 + 50 ], "__typename": [ 1 @@ -4026,10 +4031,10 @@ export default { }, "IndexObjectMetadataConnection": { "pageInfo": [ - 207 + 208 ], "edges": [ - 211 + 212 ], "__typename": [ 1 @@ -4048,10 +4053,10 @@ export default { }, "ObjectConnection": { "pageInfo": [ - 207 + 208 ], "edges": [ - 211 + 212 ], "__typename": [ 1 @@ -4059,10 +4064,10 @@ export default { }, "ObjectIndexMetadatasConnection": { "pageInfo": [ - 207 + 208 ], "edges": [ - 206 + 207 ], "__typename": [ 1 @@ -4070,10 +4075,10 @@ export default { }, "FieldEdge": { "node": [ - 43 + 44 ], "cursor": [ - 49 + 50 ], "__typename": [ 1 @@ -4081,10 +4086,10 @@ export default { }, "ObjectFieldsConnection": { "pageInfo": [ - 207 + 208 ], "edges": [ - 216 + 217 ], "__typename": [ 1 @@ -4092,10 +4097,10 @@ export default { }, "FieldConnection": { "pageInfo": [ - 207 + 208 ], "edges": [ - 216 + 217 ], "__typename": [ 1 @@ -4122,7 +4127,7 @@ export default { 3 ], "type": [ - 178 + 179 ], "issuer": [ 1 @@ -4131,7 +4136,7 @@ export default { 1 ], "status": [ - 179 + 180 ], "__typename": [ 1 @@ -4150,7 +4155,7 @@ export default { }, "FindAvailableSSOIDP": { "type": [ - 178 + 179 ], "id": [ 3 @@ -4162,10 +4167,10 @@ export default { 1 ], "status": [ - 179 + 180 ], "workspace": [ - 222 + 223 ], "__typename": [ 1 @@ -4176,7 +4181,7 @@ export default { 3 ], "type": [ - 178 + 179 ], "issuer": [ 1 @@ -4185,7 +4190,7 @@ export default { 1 ], "status": [ - 179 + 180 ], "__typename": [ 1 @@ -4193,7 +4198,7 @@ export default { }, "SSOConnection": { "type": [ - 178 + 179 ], "id": [ 3 @@ -4205,7 +4210,7 @@ export default { 1 ], "status": [ - 179 + 180 ], "__typename": [ 1 @@ -4228,13 +4233,13 @@ export default { 1 ], "workspaceUrls": [ - 174 + 175 ], "logo": [ 1 ], "sso": [ - 225 + 226 ], "__typename": [ 1 @@ -4242,10 +4247,10 @@ export default { }, "AvailableWorkspaces": { "availableWorkspacesForSignIn": [ - 226 + 227 ], "availableWorkspacesForSignUp": [ - 226 + 227 ], "__typename": [ 1 @@ -4273,7 +4278,7 @@ export default { }, "BillingEntitlement": { "key": [ - 230 + 231 ], "value": [ 6 @@ -4311,7 +4316,7 @@ export default { 1 ], "records": [ - 231 + 232 ], "__typename": [ 1 @@ -4381,10 +4386,10 @@ export default { }, "AvailableWorkspacesAndAccessTokens": { "tokens": [ - 239 + 240 ], "availableWorkspaces": [ - 227 + 228 ], "__typename": [ 1 @@ -4422,7 +4427,7 @@ export default { }, "WorkspaceUrlsAndId": { "workspaceUrls": [ - 174 + 175 ], "id": [ 3 @@ -4436,7 +4441,7 @@ export default { 32 ], "workspace": [ - 244 + 245 ], "__typename": [ 1 @@ -4469,7 +4474,7 @@ export default { 32 ], "workspaceUrls": [ - 174 + 175 ], "__typename": [ 1 @@ -4485,7 +4490,7 @@ export default { }, "AuthTokens": { "tokens": [ - 239 + 240 ], "__typename": [ 1 @@ -4526,7 +4531,7 @@ export default { 32 ], "workspace": [ - 244 + 245 ], "__typename": [ 1 @@ -4548,7 +4553,7 @@ export default { 1 ], "dailyUsage": [ - 255 + 256 ], "__typename": [ 1 @@ -4556,16 +4561,16 @@ export default { }, "UsageAnalytics": { "usageByUser": [ - 198 + 199 ], "usageByOperationType": [ - 198 + 199 ], "usageByModel": [ - 198 + 199 ], "timeSeries": [ - 255 + 256 ], "periodStart": [ 4 @@ -4574,7 +4579,7 @@ export default { 4 ], "userDailyUsage": [ - 256 + 257 ], "__typename": [ 1 @@ -4739,7 +4744,7 @@ export default { 1 ], "location": [ - 265 + 266 ], "__typename": [ 1 @@ -4764,13 +4769,13 @@ export default { }, "PublicImapSmtpCaldavConnectionParameters": { "IMAP": [ - 267 + 268 ], "SMTP": [ - 267 + 268 ], "CALDAV": [ - 267 + 268 ], "__typename": [ 1 @@ -4823,7 +4828,7 @@ export default { 4 ], "connectionParameters": [ - 268 + 269 ], "__typename": [ 1 @@ -4848,13 +4853,13 @@ export default { }, "ImapSmtpCaldavPublicConnectionParameters": { "IMAP": [ - 270 + 271 ], "SMTP": [ - 270 + 271 ], "CALDAV": [ - 270 + 271 ], "__typename": [ 1 @@ -4874,7 +4879,7 @@ export default { 3 ], "connectionParameters": [ - 271 + 272 ], "__typename": [ 1 @@ -5062,7 +5067,7 @@ export default { 1 ], "series": [ - 278 + 279 ], "xAxisLabel": [ 1 @@ -5077,10 +5082,10 @@ export default { 6 ], "layout": [ - 103 + 104 ], "groupMode": [ - 102 + 103 ], "hasTooManyGroups": [ 6 @@ -5111,7 +5116,7 @@ export default { 1 ], "data": [ - 280 + 281 ], "__typename": [ 1 @@ -5119,7 +5124,7 @@ export default { }, "LineChartData": { "series": [ - 281 + 282 ], "xAxisLabel": [ 1 @@ -5156,7 +5161,7 @@ export default { }, "PieChartData": { "data": [ - 283 + 284 ], "showLegend": [ 6 @@ -5250,13 +5255,13 @@ export default { }, "EventLogQueryResult": { "records": [ - 287 + 288 ], "totalCount": [ 21 ], "pageInfo": [ - 288 + 289 ], "__typename": [ 1 @@ -5320,7 +5325,7 @@ export default { 1 ], "parts": [ - 276 + 277 ], "processedAt": [ 4 @@ -5334,7 +5339,7 @@ export default { }, "AgentChatThread": { "id": [ - 293 + 294 ], "title": [ 1 @@ -5390,7 +5395,7 @@ export default { }, "AiSystemPromptPreview": { "sections": [ - 294 + 295 ], "estimatedTokenCount": [ 21 @@ -5466,10 +5471,10 @@ export default { 3 ], "evaluations": [ - 299 + 300 ], "messages": [ - 291 + 292 ], "createdAt": [ 4 @@ -5500,19 +5505,19 @@ export default { 1 ], "syncStatus": [ - 303 - ], - "syncStage": [ 304 ], - "visibility": [ + "syncStage": [ 305 ], + "visibility": [ + 306 + ], "isContactAutoCreationEnabled": [ 6 ], "contactAutoCreationPolicy": [ - 306 + 307 ], "isSyncEnabled": [ 6 @@ -5548,22 +5553,22 @@ export default { 3 ], "visibility": [ - 308 + 309 ], "handle": [ 1 ], "type": [ - 309 + 310 ], "isContactAutoCreationEnabled": [ 6 ], "contactAutoCreationPolicy": [ - 310 + 311 ], "messageFolderImportPolicy": [ - 311 + 312 ], "excludeNonProfessionalEmails": [ 6 @@ -5572,7 +5577,7 @@ export default { 6 ], "pendingGroupEmailsAction": [ - 312 + 313 ], "isSyncEnabled": [ 6 @@ -5581,10 +5586,10 @@ export default { 4 ], "syncStatus": [ - 313 + 314 ], "syncStage": [ - 314 + 315 ], "syncStageStartedAt": [ 4 @@ -5605,7 +5610,7 @@ export default { 4 ], "connectedAccount": [ - 269 + 270 ], "__typename": [ 1 @@ -5620,7 +5625,7 @@ export default { "MessageChannelSyncStage": {}, "CreateEmailGroupChannelOutput": { "messageChannel": [ - 307 + 308 ], "forwardingAddress": [ 1 @@ -5649,7 +5654,7 @@ export default { 1 ], "pendingSyncAction": [ - 317 + 318 ], "messageChannelId": [ 3 @@ -5667,7 +5672,7 @@ export default { "MessageFolderPendingSyncAction": {}, "CollectionHash": { "collectionName": [ - 319 + 320 ], "hash": [ 1 @@ -5720,10 +5725,10 @@ export default { 3 ], "type": [ - 70 + 71 ], "key": [ - 71 + 72 ], "objectMetadataId": [ 3 @@ -5734,13 +5739,13 @@ export default { }, "MinimalMetadata": { "objectMetadataItems": [ - 320 - ], - "views": [ 321 ], + "views": [ + 322 + ], "collectionHashes": [ - 318 + 319 ], "__typename": [ 1 @@ -5748,10 +5753,10 @@ export default { }, "Query": { "navigationMenuItems": [ - 161 + 162 ], "navigationMenuItem": [ - 161, + 162, { "id": [ 3, @@ -5776,10 +5781,10 @@ export default { } ], "enterpriseSubscriptionStatus": [ - 127 + 128 ], "getViewFilterGroups": [ - 61, + 62, { "viewId": [ 1 @@ -5787,7 +5792,7 @@ export default { } ], "getViewFilterGroup": [ - 61, + 62, { "id": [ 1, @@ -5796,7 +5801,7 @@ export default { } ], "getViewFilters": [ - 63, + 64, { "viewId": [ 1 @@ -5804,7 +5809,7 @@ export default { } ], "getViewFilter": [ - 63, + 64, { "id": [ 1, @@ -5813,19 +5818,19 @@ export default { } ], "getViews": [ - 69, + 70, { "objectMetadataId": [ 1 ], "viewTypes": [ - 70, + 71, "[ViewType!]" ] } ], "getView": [ - 69, + 70, { "id": [ 1, @@ -5834,7 +5839,7 @@ export default { } ], "getViewSorts": [ - 66, + 67, { "viewId": [ 1 @@ -5842,7 +5847,7 @@ export default { } ], "getViewSort": [ - 66, + 67, { "id": [ 1, @@ -5851,7 +5856,7 @@ export default { } ], "getViewFields": [ - 59, + 60, { "viewId": [ 1, @@ -5860,7 +5865,7 @@ export default { } ], "getViewField": [ - 59, + 60, { "id": [ 1, @@ -5869,7 +5874,7 @@ export default { } ], "getViewFieldGroups": [ - 68, + 69, { "viewId": [ 1, @@ -5878,7 +5883,7 @@ export default { } ], "getViewFieldGroup": [ - 68, + 69, { "id": [ 1, @@ -5893,13 +5898,13 @@ export default { 2, { "input": [ - 324, + 325, "GetApiKeyInput!" ] } ], "billingPortalSession": [ - 155, + 156, { "returnUrlPath": [ 1 @@ -5907,19 +5912,19 @@ export default { } ], "listPlans": [ - 154 + 155 ], "getResourceCreditUsage": [ - 153 + 154 ], "findWorkspaceInvitations": [ - 158 + 159 ], "getApprovedAccessDomains": [ - 134 + 135 ], "getPageLayoutTabs": [ - 121, + 122, { "pageLayoutId": [ 1, @@ -5928,7 +5933,7 @@ export default { } ], "getPageLayoutTab": [ - 121, + 122, { "id": [ 1, @@ -5937,18 +5942,18 @@ export default { } ], "getPageLayouts": [ - 122, + 123, { "objectMetadataId": [ 1 ], "pageLayoutType": [ - 123 + 124 ] } ], "getPageLayout": [ - 122, + 123, { "id": [ 1, @@ -5957,10 +5962,10 @@ export default { } ], "getEmailingDomains": [ - 130 + 131 ], "applicationConnectionProviders": [ - 125, + 126, { "applicationId": [ 3, @@ -5969,7 +5974,7 @@ export default { } ], "getPageLayoutWidgets": [ - 84, + 85, { "pageLayoutTabId": [ 1, @@ -5978,7 +5983,7 @@ export default { } ], "getPageLayoutWidget": [ - 84, + 85, { "id": [ 1, @@ -5990,7 +5995,7 @@ export default { 41, { "input": [ - 325, + 326, "LogicFunctionIdInput!" ] } @@ -6002,7 +6007,7 @@ export default { 15, { "input": [ - 325, + 326, "LogicFunctionIdInput!" ] } @@ -6011,7 +6016,7 @@ export default { 1, { "input": [ - 325, + 326, "LogicFunctionIdInput!" ] } @@ -6041,10 +6046,10 @@ export default { } ], "objectRecordCounts": [ - 213 + 214 ], "object": [ - 55, + 56, { "id": [ 3, @@ -6053,20 +6058,20 @@ export default { } ], "objects": [ - 214, + 215, { "paging": [ - 48, + 49, "CursorPaging!" ], "filter": [ - 50, + 51, "ObjectFilter!" ] } ], "index": [ - 46, + 47, { "id": [ 3, @@ -6075,14 +6080,14 @@ export default { } ], "indexMetadatas": [ - 208, + 209, { "paging": [ - 48, + 49, "CursorPaging!" ], "filter": [ - 57, + 58, "IndexFilter!" ] } @@ -6094,7 +6099,7 @@ export default { 25, { "input": [ - 326, + 327, "AgentIdInput!" ] } @@ -6103,7 +6108,7 @@ export default { 29 ], "getToolIndex": [ - 275 + 276 ], "getToolInputSchema": [ 15, @@ -6115,10 +6120,10 @@ export default { } ], "webhooks": [ - 274 + 275 ], "webhook": [ - 274, + 275, { "id": [ 3, @@ -6127,7 +6132,7 @@ export default { } ], "field": [ - 43, + 44, { "id": [ 3, @@ -6136,20 +6141,20 @@ export default { } ], "fields": [ - 218, + 219, { "paging": [ - 48, + 49, "CursorPaging!" ], "filter": [ - 56, + 57, "FieldFilter!" ] } ], "getViewGroups": [ - 65, + 66, { "viewId": [ 1 @@ -6157,7 +6162,7 @@ export default { } ], "getViewGroup": [ - 65, + 66, { "id": [ 1, @@ -6166,7 +6171,7 @@ export default { } ], "myMessageFolders": [ - 316, + 317, { "messageChannelId": [ 3 @@ -6174,7 +6179,7 @@ export default { } ], "myMessageChannels": [ - 307, + 308, { "connectedAccountId": [ 3 @@ -6182,10 +6187,10 @@ export default { } ], "myConnectedAccounts": [ - 269 + 270 ], "myCalendarChannels": [ - 302, + 303, { "connectedAccountId": [ 3 @@ -6193,16 +6198,16 @@ export default { } ], "minimalMetadata": [ - 322 + 323 ], "findWorkspaceAiStats": [ - 301 + 302 ], "chatThreads": [ - 292 + 293 ], "chatThread": [ - 292, + 293, { "id": [ 3, @@ -6211,7 +6216,7 @@ export default { } ], "chatMessages": [ - 291, + 292, { "threadId": [ 3, @@ -6220,7 +6225,7 @@ export default { } ], "chatStreamCatchupChunks": [ - 296, + 297, { "threadId": [ 3, @@ -6229,13 +6234,13 @@ export default { } ], "getAiSystemPromptPreview": [ - 295 + 296 ], "skills": [ - 290 + 291 ], "skill": [ - 290, + 291, { "id": [ 3, @@ -6244,7 +6249,7 @@ export default { } ], "agentTurns": [ - 300, + 301, { "agentId": [ 3, @@ -6253,7 +6258,7 @@ export default { } ], "checkUserExists": [ - 252, + 253, { "email": [ 1, @@ -6265,7 +6270,7 @@ export default { } ], "checkWorkspaceInviteHashIsValid": [ - 253, + 254, { "inviteHash": [ 1, @@ -6274,7 +6279,7 @@ export default { } ], "findWorkspaceFromInviteHash": [ - 75, + 76, { "inviteHash": [ 1, @@ -6283,7 +6288,7 @@ export default { } ], "validatePasswordResetToken": [ - 247, + 248, { "passwordResetToken": [ 1, @@ -6292,7 +6297,7 @@ export default { } ], "findApplicationRegistrationByClientId": [ - 202, + 203, { "clientId": [ 1, @@ -6322,7 +6327,7 @@ export default { } ], "findApplicationRegistrationStats": [ - 200, + 201, { "id": [ 1, @@ -6331,7 +6336,7 @@ export default { } ], "findApplicationRegistrationVariables": [ - 175, + 176, { "applicationRegistrationId": [ 1, @@ -6349,13 +6354,13 @@ export default { } ], "currentUser": [ - 78 + 79 ], "currentWorkspace": [ - 75 + 76 ], "getPublicWorkspaceDataByDomain": [ - 182, + 183, { "origin": [ 1 @@ -6363,7 +6368,7 @@ export default { } ], "getPublicWorkspaceDataById": [ - 183, + 184, { "id": [ 3, @@ -6372,10 +6377,10 @@ export default { } ], "findManyApplications": [ - 58 + 59 ], "findOneApplication": [ - 58, + 59, { "id": [ 3 @@ -6386,46 +6391,46 @@ export default { } ], "getSSOIdentityProviders": [ - 223 + 224 ], "eventLogs": [ - 289, + 290, { "input": [ - 327, + 328, "EventLogQueryInput!" ] } ], "pieChartData": [ - 284, + 285, { "input": [ - 331, + 332, "PieChartDataInput!" ] } ], "lineChartData": [ - 282, + 283, { "input": [ - 332, + 333, "LineChartDataInput!" ] } ], "barChartData": [ - 279, + 280, { "input": [ - 333, + 334, "BarChartDataInput!" ] } ], "getConnectedImapSmtpCaldavAccount": [ - 272, + 273, { "id": [ 3, @@ -6434,7 +6439,7 @@ export default { } ], "getAutoCompleteAddress": [ - 264, + 265, { "address": [ 1, @@ -6453,7 +6458,7 @@ export default { } ], "getAddressDetails": [ - 266, + 267, { "placeId": [ 1, @@ -6466,21 +6471,21 @@ export default { } ], "getUsageAnalytics": [ - 257, + 258, { "input": [ - 334 + 335 ] } ], "findManyPublicDomains": [ - 263 + 264 ], "findManyMarketplaceApps": [ - 261 + 262 ], "findMarketplaceAppDetail": [ - 262, + 263, { "universalIdentifier": [ 1, @@ -6502,7 +6507,7 @@ export default { }, "LogicFunctionIdInput": { "id": [ - 293 + 294 ], "__typename": [ 1 @@ -6518,10 +6523,10 @@ export default { }, "EventLogQueryInput": { "table": [ - 328 + 329 ], "filters": [ - 329 + 330 ], "first": [ 21 @@ -6542,7 +6547,7 @@ export default { 1 ], "dateRange": [ - 330 + 331 ], "recordId": [ 1 @@ -6609,7 +6614,7 @@ export default { 1 ], "operationTypes": [ - 335 + 336 ], "__typename": [ 1 @@ -6621,7 +6626,7 @@ export default { 6, { "input": [ - 337, + 338, "AddQuerySubscriptionInput!" ] } @@ -6630,49 +6635,49 @@ export default { 6, { "input": [ - 338, + 339, "RemoveQueryFromEventStreamInput!" ] } ], "createManyNavigationMenuItems": [ - 161, + 162, { "inputs": [ - 339, + 340, "[CreateNavigationMenuItemInput!]!" ] } ], "createNavigationMenuItem": [ - 161, + 162, { "input": [ - 339, + 340, "CreateNavigationMenuItemInput!" ] } ], "updateManyNavigationMenuItems": [ - 161, + 162, { "inputs": [ - 340, + 341, "[UpdateOneNavigationMenuItemInput!]!" ] } ], "updateNavigationMenuItem": [ - 161, + 162, { "input": [ - 340, + 341, "UpdateOneNavigationMenuItemInput!" ] } ], "deleteManyNavigationMenuItems": [ - 161, + 162, { "ids": [ 3, @@ -6681,7 +6686,7 @@ export default { } ], "deleteNavigationMenuItem": [ - 161, + 162, { "id": [ 3, @@ -6690,10 +6695,10 @@ export default { } ], "uploadEmailAttachmentFile": [ - 135, + 136, { "file": [ - 342, + 343, "Upload!" ] } @@ -6702,7 +6707,7 @@ export default { 6 ], "setEnterpriseKey": [ - 126, + 127, { "enterpriseKey": [ 1, @@ -6711,46 +6716,46 @@ export default { } ], "uploadAiChatFile": [ - 135, + 136, { "file": [ - 342, + 343, "Upload!" ] } ], "uploadWorkflowFile": [ - 135, + 136, { "file": [ - 342, + 343, "Upload!" ] } ], "uploadWorkspaceLogo": [ - 135, + 136, { "file": [ - 342, + 343, "Upload!" ] } ], "uploadWorkspaceMemberProfilePicture": [ - 135, + 136, { "file": [ - 342, + 343, "Upload!" ] } ], "uploadFilesFieldFile": [ - 135, + 136, { "file": [ - 342, + 343, "Upload!" ], "fieldMetadataId": [ @@ -6760,10 +6765,10 @@ export default { } ], "uploadFilesFieldFileByUniversalIdentifier": [ - 135, + 136, { "file": [ - 342, + 343, "Upload!" ], "fieldMetadataUniversalIdentifier": [ @@ -6773,23 +6778,23 @@ export default { } ], "createViewFilterGroup": [ - 61, + 62, { "input": [ - 343, + 344, "CreateViewFilterGroupInput!" ] } ], "updateViewFilterGroup": [ - 61, + 62, { "id": [ 1, "String!" ], "input": [ - 344, + 345, "UpdateViewFilterGroupInput!" ] } @@ -6813,59 +6818,59 @@ export default { } ], "createViewFilter": [ - 63, + 64, { "input": [ - 345, + 346, "CreateViewFilterInput!" ] } ], "updateViewFilter": [ - 63, + 64, { "input": [ - 346, + 347, "UpdateViewFilterInput!" ] } ], "deleteViewFilter": [ - 63, + 64, { "input": [ - 348, + 349, "DeleteViewFilterInput!" ] } ], "destroyViewFilter": [ - 63, + 64, { "input": [ - 349, + 350, "DestroyViewFilterInput!" ] } ], "createView": [ - 69, + 70, { "input": [ - 350, + 351, "CreateViewInput!" ] } ], "updateView": [ - 69, + 70, { "id": [ 1, "String!" ], "input": [ - 351, + 352, "UpdateViewInput!" ] } @@ -6889,28 +6894,28 @@ export default { } ], "upsertViewWidget": [ - 69, + 70, { "input": [ - 352, + 353, "UpsertViewWidgetInput!" ] } ], "createViewSort": [ - 66, + 67, { "input": [ - 357, + 358, "CreateViewSortInput!" ] } ], "updateViewSort": [ - 66, + 67, { "input": [ - 358, + 359, "UpdateViewSortInput!" ] } @@ -6919,7 +6924,7 @@ export default { 6, { "input": [ - 360, + 361, "DeleteViewSortInput!" ] } @@ -6928,106 +6933,106 @@ export default { 6, { "input": [ - 361, + 362, "DestroyViewSortInput!" ] } ], "updateViewField": [ - 59, + 60, { "input": [ - 362, + 363, "UpdateViewFieldInput!" ] } ], "createViewField": [ - 59, + 60, { "input": [ - 364, + 365, "CreateViewFieldInput!" ] } ], "createManyViewFields": [ - 59, + 60, { "inputs": [ - 364, + 365, "[CreateViewFieldInput!]!" ] } ], "deleteViewField": [ - 59, + 60, { "input": [ - 365, + 366, "DeleteViewFieldInput!" ] } ], "destroyViewField": [ - 59, + 60, { "input": [ - 366, + 367, "DestroyViewFieldInput!" ] } ], "updateViewFieldGroup": [ - 68, + 69, { "input": [ - 367, + 368, "UpdateViewFieldGroupInput!" ] } ], "createViewFieldGroup": [ - 68, + 69, { "input": [ - 369, + 370, "CreateViewFieldGroupInput!" ] } ], "createManyViewFieldGroups": [ - 68, + 69, { "inputs": [ - 369, + 370, "[CreateViewFieldGroupInput!]!" ] } ], "deleteViewFieldGroup": [ - 68, + 69, { "input": [ - 370, + 371, "DeleteViewFieldGroupInput!" ] } ], "destroyViewFieldGroup": [ - 68, + 69, { "input": [ - 371, + 372, "DestroyViewFieldGroupInput!" ] } ], "upsertFieldsWidget": [ - 69, + 70, { "input": [ - 372, + 373, "UpsertFieldsWidgetInput!" ] } @@ -7036,7 +7041,7 @@ export default { 2, { "input": [ - 375, + 376, "CreateApiKeyInput!" ] } @@ -7045,7 +7050,7 @@ export default { 2, { "input": [ - 376, + 377, "UpdateApiKeyInput!" ] } @@ -7054,7 +7059,7 @@ export default { 2, { "input": [ - 377, + 378, "RevokeApiKeyInput!" ] } @@ -7073,7 +7078,7 @@ export default { } ], "createObjectEvent": [ - 128, + 129, { "event": [ 1, @@ -7093,10 +7098,10 @@ export default { } ], "trackAnalytics": [ - 128, + 129, { "type": [ - 378, + 379, "AnalyticsType!" ], "name": [ @@ -7111,20 +7116,20 @@ export default { } ], "skipSyncEmailOnboardingStep": [ - 157 + 158 ], "skipBookOnboardingStep": [ - 157 + 158 ], "checkoutSession": [ - 155, + 156, { "recurringInterval": [ - 143, + 144, "SubscriptionInterval!" ], "plan": [ - 139, + 140, "BillingPlanKey!" ], "requirePaymentMethod": [ @@ -7137,19 +7142,19 @@ export default { } ], "switchSubscriptionInterval": [ - 156 + 157 ], "switchBillingPlan": [ - 156 + 157 ], "cancelSwitchBillingPlan": [ - 156 + 157 ], "cancelSwitchBillingInterval": [ - 156 + 157 ], "setResourceCreditSubscriptionPrice": [ - 156, + 157, { "priceId": [ 1, @@ -7158,10 +7163,10 @@ export default { } ], "endSubscriptionTrialPeriod": [ - 152 + 153 ], "cancelSwitchResourceCreditPrice": [ - 156 + 157 ], "deleteWorkspaceInvitation": [ 1, @@ -7173,7 +7178,7 @@ export default { } ], "resendWorkspaceInvitation": [ - 159, + 160, { "appTokenId": [ 1, @@ -7182,7 +7187,7 @@ export default { } ], "sendInvitations": [ - 159, + 160, { "emails": [ 1, @@ -7194,10 +7199,10 @@ export default { } ], "createApprovedAccessDomain": [ - 134, + 135, { "input": [ - 379, + 380, "CreateApprovedAccessDomainInput!" ] } @@ -7206,38 +7211,38 @@ export default { 6, { "input": [ - 380, + 381, "DeleteApprovedAccessDomainInput!" ] } ], "validateApprovedAccessDomain": [ - 134, + 135, { "input": [ - 381, + 382, "ValidateApprovedAccessDomainInput!" ] } ], "createPageLayoutTab": [ - 121, + 122, { "input": [ - 382, + 383, "CreatePageLayoutTabInput!" ] } ], "updatePageLayoutTab": [ - 121, + 122, { "id": [ 1, "String!" ], "input": [ - 383, + 384, "UpdatePageLayoutTabInput!" ] } @@ -7252,23 +7257,23 @@ export default { } ], "createPageLayout": [ - 122, + 123, { "input": [ - 384, + 385, "CreatePageLayoutInput!" ] } ], "updatePageLayout": [ - 122, + 123, { "id": [ 1, "String!" ], "input": [ - 385, + 386, "UpdatePageLayoutInput!" ] } @@ -7283,20 +7288,20 @@ export default { } ], "updatePageLayoutWithTabsAndWidgets": [ - 122, + 123, { "id": [ 1, "String!" ], "input": [ - 386, + 387, "UpdatePageLayoutWithTabsInput!" ] } ], "resetPageLayoutToDefault": [ - 122, + 123, { "id": [ 1, @@ -7305,7 +7310,7 @@ export default { } ], "resetPageLayoutWidgetToDefault": [ - 84, + 85, { "id": [ 1, @@ -7314,7 +7319,7 @@ export default { } ], "resetPageLayoutTabToDefault": [ - 121, + 122, { "id": [ 1, @@ -7323,14 +7328,14 @@ export default { } ], "createEmailingDomain": [ - 130, + 131, { "domain": [ 1, "String!" ], "driver": [ - 131, + 132, "EmailingDomainDriver!" ] } @@ -7345,7 +7350,7 @@ export default { } ], "verifyEmailingDomain": [ - 130, + 131, { "id": [ 1, @@ -7354,10 +7359,10 @@ export default { } ], "sendEmailViaEmailingDomain": [ - 133, + 134, { "input": [ - 390, + 391, "SendEmailViaDomainInput!" ] } @@ -7380,23 +7385,23 @@ export default { } ], "createPageLayoutWidget": [ - 84, + 85, { "input": [ - 391, + 392, "CreatePageLayoutWidgetInput!" ] } ], "updatePageLayoutWidget": [ - 84, + 85, { "id": [ 1, "String!" ], "input": [ - 392, + 393, "UpdatePageLayoutWidgetInput!" ] } @@ -7414,7 +7419,7 @@ export default { 41, { "input": [ - 325, + 326, "LogicFunctionIdInput!" ] } @@ -7423,16 +7428,16 @@ export default { 41, { "input": [ - 393, + 394, "CreateLogicFunctionFromSourceInput!" ] } ], "executeOneLogicFunction": [ - 170, + 171, { "input": [ - 394, + 395, "ExecuteOneLogicFunctionInput!" ] } @@ -7441,7 +7446,7 @@ export default { 6, { "input": [ - 395, + 396, "UpdateLogicFunctionFromSourceInput!" ] } @@ -7450,7 +7455,7 @@ export default { 35, { "input": [ - 397, + 398, "CreateCommandMenuItemInput!" ] } @@ -7459,7 +7464,7 @@ export default { 35, { "input": [ - 398, + 399, "UpdateCommandMenuItemInput!" ] } @@ -7477,7 +7482,7 @@ export default { 34, { "input": [ - 399, + 400, "CreateFrontComponentInput!" ] } @@ -7486,7 +7491,7 @@ export default { 34, { "input": [ - 400, + 401, "UpdateFrontComponentInput!" ] } @@ -7501,46 +7506,46 @@ export default { } ], "createOneObject": [ - 55, + 56, { "input": [ - 402, + 403, "CreateOneObjectInput!" ] } ], "deleteOneObject": [ - 55, + 56, { "input": [ - 404, + 405, "DeleteOneObjectInput!" ] } ], "updateOneObject": [ - 55, + 56, { "input": [ - 405, + 406, "UpdateOneObjectInput!" ] } ], "createOneIndex": [ - 46, + 47, { "input": [ - 407, + 408, "CreateOneIndexInput!" ] } ], "deleteOneIndex": [ - 46, + 47, { "input": [ - 410, + 411, "DeleteOneIndexInput!" ] } @@ -7549,7 +7554,7 @@ export default { 25, { "input": [ - 411, + 412, "CreateAgentInput!" ] } @@ -7558,7 +7563,7 @@ export default { 25, { "input": [ - 412, + 413, "UpdateAgentInput!" ] } @@ -7567,7 +7572,7 @@ export default { 25, { "input": [ - 326, + 327, "AgentIdInput!" ] } @@ -7589,7 +7594,7 @@ export default { 29, { "createRoleInput": [ - 413, + 414, "CreateRoleInput!" ] } @@ -7598,7 +7603,7 @@ export default { 29, { "updateRoleInput": [ - 414, + 415, "UpdateRoleInput!" ] } @@ -7616,7 +7621,7 @@ export default { 16, { "upsertObjectPermissionsInput": [ - 416, + 417, "UpsertObjectPermissionsInput!" ] } @@ -7625,7 +7630,7 @@ export default { 27, { "upsertPermissionFlagsInput": [ - 418, + 419, "UpsertPermissionFlagsInput!" ] } @@ -7634,16 +7639,16 @@ export default { 26, { "upsertFieldPermissionsInput": [ - 419, + 420, "UpsertFieldPermissionsInput!" ] } ], "upsertRowLevelPermissionPredicates": [ - 233, + 234, { "input": [ - 421, + 422, "UpsertRowLevelPermissionPredicatesInput!" ] } @@ -7671,25 +7676,25 @@ export default { } ], "createWebhook": [ - 274, + 275, { "input": [ - 424, + 425, "CreateWebhookInput!" ] } ], "updateWebhook": [ - 274, + 275, { "input": [ - 425, + 426, "UpdateWebhookInput!" ] } ], "deleteWebhook": [ - 274, + 275, { "id": [ 3, @@ -7698,124 +7703,124 @@ export default { } ], "createOneField": [ - 43, + 44, { "input": [ - 427, + 428, "CreateOneFieldMetadataInput!" ] } ], "updateOneField": [ - 43, + 44, { "input": [ - 429, + 430, "UpdateOneFieldMetadataInput!" ] } ], "deleteOneField": [ - 43, + 44, { "input": [ - 431, + 432, "DeleteOneFieldInput!" ] } ], "createViewGroup": [ - 65, + 66, { "input": [ - 432, + 433, "CreateViewGroupInput!" ] } ], "createManyViewGroups": [ - 65, + 66, { "inputs": [ - 432, + 433, "[CreateViewGroupInput!]!" ] } ], "updateViewGroup": [ - 65, + 66, { "input": [ - 433, + 434, "UpdateViewGroupInput!" ] } ], "updateManyViewGroups": [ - 65, + 66, { "inputs": [ - 433, + 434, "[UpdateViewGroupInput!]!" ] } ], "deleteViewGroup": [ - 65, + 66, { "input": [ - 435, + 436, "DeleteViewGroupInput!" ] } ], "destroyViewGroup": [ - 65, + 66, { "input": [ - 436, + 437, "DestroyViewGroupInput!" ] } ], "updateMessageFolder": [ - 316, + 317, { "input": [ - 437, + 438, "UpdateMessageFolderInput!" ] } ], "updateMessageFolders": [ - 316, + 317, { "input": [ - 439, + 440, "UpdateMessageFoldersInput!" ] } ], "updateMessageChannel": [ - 307, + 308, { "input": [ - 440, + 441, "UpdateMessageChannelInput!" ] } ], "createEmailGroupChannel": [ - 315, + 316, { "input": [ - 442, + 443, "CreateEmailGroupChannelInput!" ] } ], "deleteEmailGroupChannel": [ - 307, + 308, { "id": [ 3, @@ -7824,7 +7829,7 @@ export default { } ], "deleteConnectedAccount": [ - 269, + 270, { "id": [ 3, @@ -7833,19 +7838,19 @@ export default { } ], "updateCalendarChannel": [ - 302, + 303, { "input": [ - 443, + 444, "UpdateCalendarChannelInput!" ] } ], "createChatThread": [ - 292 + 293 ], "sendChatMessage": [ - 297, + 298, { "threadId": [ 3, @@ -7866,7 +7871,7 @@ export default { 1 ], "fileAttachments": [ - 445, + 446, "[FileAttachmentInput!]" ] } @@ -7881,7 +7886,7 @@ export default { } ], "renameChatThread": [ - 292, + 293, { "id": [ 3, @@ -7894,7 +7899,7 @@ export default { } ], "archiveChatThread": [ - 292, + 293, { "id": [ 3, @@ -7903,7 +7908,7 @@ export default { } ], "unarchiveChatThread": [ - 292, + 293, { "id": [ 3, @@ -7930,25 +7935,25 @@ export default { } ], "createSkill": [ - 290, + 291, { "input": [ - 446, + 447, "CreateSkillInput!" ] } ], "updateSkill": [ - 290, + 291, { "input": [ - 447, + 448, "UpdateSkillInput!" ] } ], "deleteSkill": [ - 290, + 291, { "id": [ 3, @@ -7957,7 +7962,7 @@ export default { } ], "activateSkill": [ - 290, + 291, { "id": [ 3, @@ -7966,7 +7971,7 @@ export default { } ], "deactivateSkill": [ - 290, + 291, { "id": [ 3, @@ -7975,7 +7980,7 @@ export default { } ], "evaluateAgentTurn": [ - 299, + 300, { "turnId": [ 3, @@ -7984,7 +7989,7 @@ export default { } ], "runEvaluationInput": [ - 300, + 301, { "agentId": [ 3, @@ -7997,16 +8002,16 @@ export default { } ], "getAuthorizationUrlForSSO": [ - 242, + 243, { "input": [ - 448, + 449, "GetAuthorizationUrlForSSOInput!" ] } ], "getLoginTokenFromCredentials": [ - 251, + 252, { "email": [ 1, @@ -8032,7 +8037,7 @@ export default { } ], "signIn": [ - 240, + 241, { "email": [ 1, @@ -8054,7 +8059,7 @@ export default { } ], "verifyEmailAndGetLoginToken": [ - 248, + 249, { "emailVerificationToken": [ 1, @@ -8074,7 +8079,7 @@ export default { } ], "verifyEmailAndGetWorkspaceAgnosticToken": [ - 240, + 241, { "emailVerificationToken": [ 1, @@ -8090,7 +8095,7 @@ export default { } ], "getAuthTokensFromOTP": [ - 250, + 251, { "otp": [ 1, @@ -8110,7 +8115,7 @@ export default { } ], "signUp": [ - 240, + 241, { "email": [ 1, @@ -8132,7 +8137,7 @@ export default { } ], "signUpInWorkspace": [ - 245, + 246, { "email": [ 1, @@ -8163,13 +8168,13 @@ export default { } ], "signUpInNewWorkspace": [ - 245 - ], - "generateTransientToken": [ 246 ], + "generateTransientToken": [ + 247 + ], "getAuthTokensFromLoginToken": [ - 250, + 251, { "loginToken": [ 1, @@ -8182,7 +8187,7 @@ export default { } ], "authorizeApp": [ - 238, + 239, { "clientId": [ 1, @@ -8204,7 +8209,7 @@ export default { } ], "renewToken": [ - 250, + 251, { "appToken": [ 1, @@ -8213,7 +8218,7 @@ export default { } ], "generateApiKeyToken": [ - 249, + 250, { "apiKeyId": [ 3, @@ -8229,7 +8234,7 @@ export default { 32 ], "emailPasswordResetLink": [ - 241, + 242, { "email": [ 1, @@ -8241,7 +8246,7 @@ export default { } ], "updatePasswordViaResetToken": [ - 243, + 244, { "passwordResetToken": [ 1, @@ -8254,10 +8259,10 @@ export default { } ], "createApplicationRegistration": [ - 201, + 202, { "input": [ - 449, + 450, "CreateApplicationRegistrationInput!" ] } @@ -8266,7 +8271,7 @@ export default { 7, { "input": [ - 450, + 451, "UpdateApplicationRegistrationInput!" ] } @@ -8281,7 +8286,7 @@ export default { } ], "rotateApplicationRegistrationClientSecret": [ - 203, + 204, { "id": [ 1, @@ -8293,7 +8298,7 @@ export default { 5, { "input": [ - 452, + 453, "CreateApplicationRegistrationVariableInput!" ] } @@ -8302,7 +8307,7 @@ export default { 5, { "input": [ - 453, + 454, "UpdateApplicationRegistrationVariableInput!" ] } @@ -8320,7 +8325,7 @@ export default { 7, { "file": [ - 342, + 343, "Upload!" ], "universalIdentifier": [ @@ -8342,7 +8347,7 @@ export default { } ], "initiateOTPProvisioning": [ - 236, + 237, { "loginToken": [ 1, @@ -8355,10 +8360,10 @@ export default { } ], "initiateOTPProvisioningForAuthenticatedUser": [ - 236 + 237 ], "deleteTwoFactorAuthenticationMethod": [ - 235, + 236, { "twoFactorAuthenticationMethodId": [ 3, @@ -8367,7 +8372,7 @@ export default { } ], "verifyTwoFactorAuthenticationMethodForAuthenticatedUser": [ - 237, + 238, { "otp": [ 1, @@ -8376,7 +8381,7 @@ export default { } ], "deleteUser": [ - 78 + 79 ], "deleteUserFromWorkspace": [ 17, @@ -8391,7 +8396,7 @@ export default { 6, { "input": [ - 455, + 456, "UpdateWorkspaceMemberSettingsInput!" ] } @@ -8409,7 +8414,7 @@ export default { } ], "resendEmailVerificationToken": [ - 219, + 220, { "email": [ 1, @@ -8422,34 +8427,34 @@ export default { } ], "activateWorkspace": [ - 75, + 76, { "data": [ - 456, + 457, "ActivateWorkspaceInput!" ] } ], "updateWorkspace": [ - 75, + 76, { "data": [ - 457, + 458, "UpdateWorkspaceInput!" ] } ], "deleteCurrentWorkspace": [ - 75 + 76 ], "checkCustomDomainValidRecords": [ - 232 + 233 ], "runWorkspaceMigration": [ 6, { "workspaceMigration": [ - 458, + 459, "WorkspaceMigrationInput!" ] } @@ -8464,43 +8469,43 @@ export default { } ], "createOIDCIdentityProvider": [ - 224, + 225, { "input": [ - 461, + 462, "SetupOIDCSsoInput!" ] } ], "createSAMLIdentityProvider": [ - 224, + 225, { "input": [ - 462, + 463, "SetupSAMLSsoInput!" ] } ], "deleteSSOIdentityProvider": [ - 220, + 221, { "input": [ - 463, + 464, "DeleteSsoInput!" ] } ], "editSSOIdentityProvider": [ - 221, + 222, { "input": [ - 464, + 465, "EditSsoInput!" ] } ], "duplicateDashboard": [ - 285, + 286, { "id": [ 3, @@ -8509,7 +8514,7 @@ export default { } ], "impersonate": [ - 254, + 255, { "userId": [ 3, @@ -8522,16 +8527,16 @@ export default { } ], "sendEmail": [ - 286, + 287, { "input": [ - 465, + 466, "SendEmailInput!" ] } ], "startChannelSync": [ - 277, + 278, { "connectedAccountId": [ 3, @@ -8540,14 +8545,14 @@ export default { } ], "saveImapSmtpCaldavAccount": [ - 273, + 274, { "handle": [ 1, "String!" ], "connectionParameters": [ - 467, + 468, "EmailAccountConnectionParameters!" ], "id": [ @@ -8556,16 +8561,16 @@ export default { } ], "updateLabPublicFeatureFlag": [ - 172, + 173, { "input": [ - 469, + 470, "UpdateLabPublicFeatureFlagInput!" ] } ], "createPublicDomain": [ - 263, + 264, { "domain": [ 1, @@ -8577,7 +8582,7 @@ export default { } ], "updatePublicDomain": [ - 263, + 264, { "domain": [ 1, @@ -8598,7 +8603,7 @@ export default { } ], "checkPublicDomainValidRecords": [ - 232, + 233, { "domain": [ 1, @@ -8607,10 +8612,10 @@ export default { } ], "createOneAppToken": [ - 77, + 78, { "input": [ - 470, + 471, "CreateOneAppTokenInput!" ] } @@ -8628,7 +8633,7 @@ export default { } ], "installApplication": [ - 58, + 59, { "universalIdentifier": [ 1, @@ -8643,7 +8648,7 @@ export default { 6 ], "createDevelopmentApplication": [ - 258, + 259, { "universalIdentifier": [ 1, @@ -8665,7 +8670,7 @@ export default { } ], "syncApplication": [ - 259, + 260, { "manifest": [ 15, @@ -8674,10 +8679,10 @@ export default { } ], "uploadApplicationFile": [ - 260, + 261, { "file": [ - 342, + 343, "Upload!" ], "applicationUniversalIdentifier": [ @@ -8685,7 +8690,7 @@ export default { "String!" ], "fileFolder": [ - 472, + 473, "FileFolder!" ], "filePath": [ @@ -8762,7 +8767,7 @@ export default { 3 ], "type": [ - 162 + 163 ], "name": [ 1 @@ -8794,7 +8799,7 @@ export default { 3 ], "update": [ - 341 + 342 ], "__typename": [ 1 @@ -8835,7 +8840,7 @@ export default { 3 ], "logicalOperator": [ - 62 + 63 ], "positionInViewFilterGroup": [ 11 @@ -8855,7 +8860,7 @@ export default { 3 ], "logicalOperator": [ - 62 + 63 ], "positionInViewFilterGroup": [ 11 @@ -8875,7 +8880,7 @@ export default { 3 ], "operand": [ - 64 + 65 ], "value": [ 15 @@ -8904,7 +8909,7 @@ export default { 3 ], "update": [ - 347 + 348 ], "__typename": [ 1 @@ -8915,7 +8920,7 @@ export default { 3 ], "operand": [ - 64 + 65 ], "value": [ 15 @@ -8963,10 +8968,10 @@ export default { 3 ], "type": [ - 70 + 71 ], "key": [ - 71 + 72 ], "icon": [ 1 @@ -8981,10 +8986,10 @@ export default { 6 ], "openRecordIn": [ - 72 + 73 ], "kanbanAggregateOperation": [ - 60 + 61 ], "kanbanAggregateOperationFieldMetadataId": [ 3 @@ -8993,7 +8998,7 @@ export default { 1 ], "calendarLayout": [ - 73 + 74 ], "calendarFieldMetadataId": [ 3 @@ -9002,7 +9007,7 @@ export default { 3 ], "visibility": [ - 74 + 75 ], "__typename": [ 1 @@ -9016,7 +9021,7 @@ export default { 1 ], "type": [ - 70 + 71 ], "icon": [ 1 @@ -9028,10 +9033,10 @@ export default { 6 ], "openRecordIn": [ - 72 + 73 ], "kanbanAggregateOperation": [ - 60 + 61 ], "kanbanAggregateOperationFieldMetadataId": [ 3 @@ -9040,13 +9045,13 @@ export default { 1 ], "calendarLayout": [ - 73 + 74 ], "calendarFieldMetadataId": [ 3 ], "visibility": [ - 74 + 75 ], "mainGroupByFieldMetadataId": [ 3 @@ -9063,17 +9068,17 @@ export default { 3 ], "viewFields": [ - 353 - ], - "viewFilters": [ 354 ], - "viewFilterGroups": [ + "viewFilters": [ 355 ], - "viewSorts": [ + "viewFilterGroups": [ 356 ], + "viewSorts": [ + 357 + ], "__typename": [ 1 ] @@ -9106,7 +9111,7 @@ export default { 3 ], "operand": [ - 64 + 65 ], "value": [ 15 @@ -9135,7 +9140,7 @@ export default { 3 ], "logicalOperator": [ - 62 + 63 ], "positionInViewFilterGroup": [ 11 @@ -9152,7 +9157,7 @@ export default { 3 ], "direction": [ - 67 + 68 ], "__typename": [ 1 @@ -9166,7 +9171,7 @@ export default { 3 ], "direction": [ - 67 + 68 ], "subFieldName": [ 1 @@ -9183,7 +9188,7 @@ export default { 3 ], "update": [ - 359 + 360 ], "__typename": [ 1 @@ -9191,7 +9196,7 @@ export default { }, "UpdateViewSortInputUpdates": { "direction": [ - 67 + 68 ], "subFieldName": [ 1 @@ -9221,7 +9226,7 @@ export default { 3 ], "update": [ - 363 + 364 ], "__typename": [ 1 @@ -9238,7 +9243,7 @@ export default { 11 ], "aggregateOperation": [ - 60 + 61 ], "viewFieldGroupId": [ 3 @@ -9267,7 +9272,7 @@ export default { 11 ], "aggregateOperation": [ - 60 + 61 ], "viewFieldGroupId": [ 3 @@ -9297,7 +9302,7 @@ export default { 3 ], "update": [ - 368 + 369 ], "__typename": [ 1 @@ -9361,10 +9366,10 @@ export default { 3 ], "groups": [ - 373 + 374 ], "fields": [ - 374 + 375 ], "__typename": [ 1 @@ -9384,7 +9389,7 @@ export default { 6 ], "fields": [ - 374 + 375 ], "__typename": [ 1 @@ -9491,7 +9496,7 @@ export default { 3 ], "layoutMode": [ - 88 + 89 ], "__typename": [ 1 @@ -9508,7 +9513,7 @@ export default { 1 ], "layoutMode": [ - 88 + 89 ], "__typename": [ 1 @@ -9519,7 +9524,7 @@ export default { 1 ], "type": [ - 123 + 124 ], "objectMetadataId": [ 3 @@ -9533,7 +9538,7 @@ export default { 1 ], "type": [ - 123 + 124 ], "objectMetadataId": [ 3 @@ -9547,13 +9552,13 @@ export default { 1 ], "type": [ - 123 + 124 ], "objectMetadataId": [ 3 ], "tabs": [ - 387 + 388 ], "__typename": [ 1 @@ -9573,10 +9578,10 @@ export default { 1 ], "layoutMode": [ - 88 + 89 ], "widgets": [ - 388 + 389 ], "__typename": [ 1 @@ -9593,13 +9598,13 @@ export default { 1 ], "type": [ - 85 + 86 ], "objectMetadataId": [ 3 ], "gridPosition": [ - 389 + 390 ], "position": [ 15 @@ -9674,13 +9679,13 @@ export default { 1 ], "type": [ - 85 + 86 ], "objectMetadataId": [ 3 ], "gridPosition": [ - 389 + 390 ], "position": [ 15 @@ -9700,13 +9705,13 @@ export default { 1 ], "type": [ - 85 + 86 ], "objectMetadataId": [ 3 ], "gridPosition": [ - 389 + 390 ], "position": [ 15 @@ -9778,7 +9783,7 @@ export default { 3 ], "update": [ - 396 + 397 ], "__typename": [ 1 @@ -9938,7 +9943,7 @@ export default { 3 ], "update": [ - 401 + 402 ], "__typename": [ 1 @@ -9957,7 +9962,7 @@ export default { }, "CreateOneObjectInput": { "object": [ - 403 + 404 ], "__typename": [ 1 @@ -10017,7 +10022,7 @@ export default { }, "UpdateOneObjectInput": { "update": [ - 406 + 407 ], "id": [ 3 @@ -10072,7 +10077,7 @@ export default { }, "CreateOneIndexInput": { "index": [ - 408 + 409 ], "__typename": [ 1 @@ -10083,10 +10088,10 @@ export default { 3 ], "fields": [ - 409 + 410 ], "indexType": [ - 47 + 48 ], "__typename": [ 1 @@ -10230,7 +10235,7 @@ export default { }, "UpdateRoleInput": { "update": [ - 415 + 416 ], "id": [ 3 @@ -10285,7 +10290,7 @@ export default { 3 ], "objectPermissions": [ - 417 + 418 ], "__typename": [ 1 @@ -10327,7 +10332,7 @@ export default { 3 ], "fieldPermissions": [ - 420 + 421 ], "__typename": [ 1 @@ -10358,10 +10363,10 @@ export default { 3 ], "predicates": [ - 422 + 423 ], "predicateGroups": [ - 423 + 424 ], "__typename": [ 1 @@ -10444,7 +10449,7 @@ export default { 3 ], "update": [ - 426 + 427 ], "__typename": [ 1 @@ -10469,7 +10474,7 @@ export default { }, "CreateOneFieldMetadataInput": { "field": [ - 428 + 429 ], "__typename": [ 1 @@ -10477,7 +10482,7 @@ export default { }, "CreateFieldInput": { "type": [ - 44 + 45 ], "name": [ 1 @@ -10542,7 +10547,7 @@ export default { 3 ], "update": [ - 430 + 431 ], "__typename": [ 1 @@ -10634,7 +10639,7 @@ export default { 3 ], "update": [ - 434 + 435 ], "__typename": [ 1 @@ -10678,7 +10683,7 @@ export default { 3 ], "update": [ - 438 + 439 ], "__typename": [ 1 @@ -10697,7 +10702,7 @@ export default { 3 ], "update": [ - 438 + 439 ], "__typename": [ 1 @@ -10708,7 +10713,7 @@ export default { 3 ], "update": [ - 441 + 442 ], "__typename": [ 1 @@ -10716,16 +10721,16 @@ export default { }, "UpdateMessageChannelInputUpdates": { "visibility": [ - 308 + 309 ], "isContactAutoCreationEnabled": [ 6 ], "contactAutoCreationPolicy": [ - 310 + 311 ], "messageFolderImportPolicy": [ - 311 + 312 ], "isSyncEnabled": [ 6 @@ -10753,7 +10758,7 @@ export default { 3 ], "update": [ - 444 + 445 ], "__typename": [ 1 @@ -10761,13 +10766,13 @@ export default { }, "UpdateCalendarChannelInputUpdates": { "visibility": [ - 305 + 306 ], "isContactAutoCreationEnabled": [ 6 ], "contactAutoCreationPolicy": [ - 306 + 307 ], "isSyncEnabled": [ 6 @@ -10869,7 +10874,7 @@ export default { 1 ], "update": [ - 451 + 452 ], "__typename": [ 1 @@ -10917,7 +10922,7 @@ export default { 1 ], "update": [ - 454 + 455 ], "__typename": [ 1 @@ -11035,7 +11040,7 @@ export default { }, "WorkspaceMigrationInput": { "actions": [ - 459 + 460 ], "__typename": [ 1 @@ -11043,10 +11048,10 @@ export default { }, "WorkspaceMigrationDeleteActionInput": { "type": [ - 460 + 461 ], "metadataName": [ - 319 + 320 ], "universalIdentifier": [ 1 @@ -11109,7 +11114,7 @@ export default { 3 ], "status": [ - 179 + 180 ], "__typename": [ 1 @@ -11138,7 +11143,7 @@ export default { 1 ], "files": [ - 466 + 467 ], "__typename": [ 1 @@ -11157,13 +11162,13 @@ export default { }, "EmailAccountConnectionParameters": { "IMAP": [ - 468 + 469 ], "SMTP": [ - 468 + 469 ], "CALDAV": [ - 468 + 469 ], "__typename": [ 1 @@ -11202,7 +11207,7 @@ export default { }, "CreateOneAppTokenInput": { "appToken": [ - 471 + 472 ], "__typename": [ 1 @@ -11219,7 +11224,7 @@ export default { "FileFolder": {}, "Subscription": { "onEventSubscription": [ - 169, + 170, { "eventStreamId": [ 1, @@ -11228,16 +11233,16 @@ export default { } ], "logicFunctionLogs": [ - 234, + 235, { "input": [ - 474, + 475, "LogicFunctionLogsInput!" ] } ], "onAgentChatEvent": [ - 298, + 299, { "threadId": [ 3, diff --git a/packages/twenty-front/src/generated-admin/graphql.ts b/packages/twenty-front/src/generated-admin/graphql.ts index e7f04a0980..9a2c9d520b 100644 --- a/packages/twenty-front/src/generated-admin/graphql.ts +++ b/packages/twenty-front/src/generated-admin/graphql.ts @@ -286,6 +286,7 @@ export enum FeatureFlagKey { IS_EMAIL_GROUP_ENABLED = 'IS_EMAIL_GROUP_ENABLED', IS_JSON_FILTER_ENABLED = 'IS_JSON_FILTER_ENABLED', IS_JUNCTION_RELATIONS_ENABLED = 'IS_JUNCTION_RELATIONS_ENABLED', + IS_LOGIC_FUNCTION_PREBUILT_MODE_ENABLED = 'IS_LOGIC_FUNCTION_PREBUILT_MODE_ENABLED', IS_MARKETPLACE_SETTING_TAB_VISIBLE = 'IS_MARKETPLACE_SETTING_TAB_VISIBLE', IS_PUBLIC_DOMAIN_ENABLED = 'IS_PUBLIC_DOMAIN_ENABLED', IS_REST_METADATA_API_NEW_FORMAT_DIRECT = 'IS_REST_METADATA_API_NEW_FORMAT_DIRECT', diff --git a/packages/twenty-front/src/generated-metadata/graphql.ts b/packages/twenty-front/src/generated-metadata/graphql.ts index ce5eea32df..73a254a2be 100644 --- a/packages/twenty-front/src/generated-metadata/graphql.ts +++ b/packages/twenty-front/src/generated-metadata/graphql.ts @@ -1638,6 +1638,7 @@ export enum FeatureFlagKey { IS_EMAIL_GROUP_ENABLED = 'IS_EMAIL_GROUP_ENABLED', IS_JSON_FILTER_ENABLED = 'IS_JSON_FILTER_ENABLED', IS_JUNCTION_RELATIONS_ENABLED = 'IS_JUNCTION_RELATIONS_ENABLED', + IS_LOGIC_FUNCTION_PREBUILT_MODE_ENABLED = 'IS_LOGIC_FUNCTION_PREBUILT_MODE_ENABLED', IS_MARKETPLACE_SETTING_TAB_VISIBLE = 'IS_MARKETPLACE_SETTING_TAB_VISIBLE', IS_PUBLIC_DOMAIN_ENABLED = 'IS_PUBLIC_DOMAIN_ENABLED', IS_REST_METADATA_API_NEW_FORMAT_DIRECT = 'IS_REST_METADATA_API_NEW_FORMAT_DIRECT', @@ -2127,6 +2128,7 @@ export type LogicFunction = { cronTriggerSettings?: Maybe; databaseEventTriggerSettings?: Maybe; description?: Maybe; + executionMode: LogicFunctionExecutionMode; handlerName: Scalars['String']; httpRouteTriggerSettings?: Maybe; id: Scalars['UUID']; @@ -2140,6 +2142,11 @@ export type LogicFunction = { workflowActionTriggerSettings?: Maybe; }; +export enum LogicFunctionExecutionMode { + LIVE = 'LIVE', + PREBUILT = 'PREBUILT' +} + export type LogicFunctionExecutionResult = { __typename?: 'LogicFunctionExecutionResult'; /** Execution result in JSON format */ @@ -6298,7 +6305,7 @@ 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, logo?: string | null, version?: string | null, universalIdentifier: string, applicationRegistrationId?: string | null, canBeUninstalled: 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, isSecret: boolean }>, 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, 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, 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, isCustom: boolean, isRemote: boolean, isActive: boolean, isSystem: boolean, isUIReadOnly: boolean, createdAt: string, updatedAt: string, labelIdentifierFieldMetadataId?: string | null, imageIdentifierFieldMetadataId?: string | null, applicationId: string, shortcut?: string | null, isLabelSyncedWithName: boolean, isSearchable: boolean, duplicateCriteria?: Array> | null, 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, isCustom?: boolean | null, isActive?: boolean | null, isSystem?: boolean | null, isUIReadOnly?: boolean | null, isNullable?: boolean | null, isUnique?: boolean | null, createdAt: string, updatedAt: string, defaultValue?: any | null, options?: any | null, settings?: any | null, isLabelSyncedWithName?: boolean | null, morphId?: string | null, applicationId: string, relation?: { __typename?: 'Relation', type: RelationType, sourceObjectMetadata: { __typename?: 'Object', id: string, nameSingular: string, namePlural: string }, targetObjectMetadata: { __typename?: 'Object', id: string, nameSingular: string, namePlural: string }, sourceFieldMetadata: { __typename?: 'Field', id: string, name: string }, targetFieldMetadata: { __typename?: 'Field', id: string, name: string } } | null, morphRelations?: Array<{ __typename?: 'Relation', type: RelationType, sourceObjectMetadata: { __typename?: 'Object', id: string, nameSingular: string, namePlural: string }, targetObjectMetadata: { __typename?: 'Object', id: string, nameSingular: string, namePlural: string }, sourceFieldMetadata: { __typename?: 'Field', id: string, name: string }, targetFieldMetadata: { __typename?: 'Field', id: string, name: string } }> | null }> }>, logicFunctions: Array<{ __typename?: 'LogicFunction', id: string, name: string, description?: string | null, runtime: string, timeoutSeconds: number, 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, logo?: string | null, version?: string | null, universalIdentifier: string, applicationRegistrationId?: string | null, canBeUninstalled: 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, isSecret: boolean }>, 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, 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, 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, isCustom: boolean, isRemote: boolean, isActive: boolean, isSystem: boolean, isUIReadOnly: boolean, createdAt: string, updatedAt: string, labelIdentifierFieldMetadataId?: string | null, imageIdentifierFieldMetadataId?: string | null, applicationId: string, shortcut?: string | null, isLabelSyncedWithName: boolean, isSearchable: boolean, duplicateCriteria?: Array> | null, 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, isCustom?: boolean | null, isActive?: boolean | null, isSystem?: boolean | null, isUIReadOnly?: boolean | null, isNullable?: boolean | null, isUnique?: boolean | null, createdAt: string, updatedAt: string, defaultValue?: any | null, options?: any | null, settings?: any | null, isLabelSyncedWithName?: boolean | null, morphId?: string | null, applicationId: string, relation?: { __typename?: 'Relation', type: RelationType, sourceObjectMetadata: { __typename?: 'Object', id: string, nameSingular: string, namePlural: string }, targetObjectMetadata: { __typename?: 'Object', id: string, nameSingular: string, namePlural: string }, sourceFieldMetadata: { __typename?: 'Field', id: string, name: string }, targetFieldMetadata: { __typename?: 'Field', id: string, name: string } } | null, morphRelations?: Array<{ __typename?: 'Relation', type: RelationType, sourceObjectMetadata: { __typename?: 'Object', id: string, nameSingular: string, namePlural: string }, targetObjectMetadata: { __typename?: 'Object', id: string, nameSingular: string, namePlural: string }, sourceFieldMetadata: { __typename?: 'Field', id: string, name: string }, targetFieldMetadata: { __typename?: 'Field', id: string, name: string } }> | null }> }>, logicFunctions: Array<{ __typename?: 'LogicFunction', id: string, name: string, description?: string | null, runtime: string, timeoutSeconds: number, executionMode: LogicFunctionExecutionMode, sourceHandlerPath: string, handlerName: string, cronTriggerSettings?: any | null, databaseEventTriggerSettings?: any | null, httpRouteTriggerSettings?: any | null, toolTriggerSettings?: any | null, workflowActionTriggerSettings?: any | null, applicationId?: string | null, universalIdentifier?: string | null, createdAt: string, updatedAt: string }> }; export type FindManyApplicationsQueryVariables = Exact<{ [key: string]: never; }>; @@ -6310,14 +6317,14 @@ export type FindOneApplicationQueryVariables = Exact<{ }>; -export type FindOneApplicationQuery = { __typename?: 'Query', findOneApplication: { __typename?: 'Application', id: string, name: string, description?: string | null, logo?: string | null, version?: string | null, universalIdentifier: string, applicationRegistrationId?: string | null, canBeUninstalled: 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, isSecret: boolean }>, 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, 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, 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, isCustom: boolean, isRemote: boolean, isActive: boolean, isSystem: boolean, isUIReadOnly: boolean, createdAt: string, updatedAt: string, labelIdentifierFieldMetadataId?: string | null, imageIdentifierFieldMetadataId?: string | null, applicationId: string, shortcut?: string | null, isLabelSyncedWithName: boolean, isSearchable: boolean, duplicateCriteria?: Array> | null, 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, isCustom?: boolean | null, isActive?: boolean | null, isSystem?: boolean | null, isUIReadOnly?: boolean | null, isNullable?: boolean | null, isUnique?: boolean | null, createdAt: string, updatedAt: string, defaultValue?: any | null, options?: any | null, settings?: any | null, isLabelSyncedWithName?: boolean | null, morphId?: string | null, applicationId: string, relation?: { __typename?: 'Relation', type: RelationType, sourceObjectMetadata: { __typename?: 'Object', id: string, nameSingular: string, namePlural: string }, targetObjectMetadata: { __typename?: 'Object', id: string, nameSingular: string, namePlural: string }, sourceFieldMetadata: { __typename?: 'Field', id: string, name: string }, targetFieldMetadata: { __typename?: 'Field', id: string, name: string } } | null, morphRelations?: Array<{ __typename?: 'Relation', type: RelationType, sourceObjectMetadata: { __typename?: 'Object', id: string, nameSingular: string, namePlural: string }, targetObjectMetadata: { __typename?: 'Object', id: string, nameSingular: string, namePlural: string }, sourceFieldMetadata: { __typename?: 'Field', id: string, name: string }, targetFieldMetadata: { __typename?: 'Field', id: string, name: string } }> | null }> }>, logicFunctions: Array<{ __typename?: 'LogicFunction', id: string, name: string, description?: string | null, runtime: string, timeoutSeconds: number, 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, logo?: string | null, version?: string | null, universalIdentifier: string, applicationRegistrationId?: string | null, canBeUninstalled: 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, isSecret: boolean }>, 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, 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, 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, isCustom: boolean, isRemote: boolean, isActive: boolean, isSystem: boolean, isUIReadOnly: boolean, createdAt: string, updatedAt: string, labelIdentifierFieldMetadataId?: string | null, imageIdentifierFieldMetadataId?: string | null, applicationId: string, shortcut?: string | null, isLabelSyncedWithName: boolean, isSearchable: boolean, duplicateCriteria?: Array> | null, 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, isCustom?: boolean | null, isActive?: boolean | null, isSystem?: boolean | null, isUIReadOnly?: boolean | null, isNullable?: boolean | null, isUnique?: boolean | null, createdAt: string, updatedAt: string, defaultValue?: any | null, options?: any | null, settings?: any | null, isLabelSyncedWithName?: boolean | null, morphId?: string | null, applicationId: string, relation?: { __typename?: 'Relation', type: RelationType, sourceObjectMetadata: { __typename?: 'Object', id: string, nameSingular: string, namePlural: string }, targetObjectMetadata: { __typename?: 'Object', id: string, nameSingular: string, namePlural: string }, sourceFieldMetadata: { __typename?: 'Field', id: string, name: string }, targetFieldMetadata: { __typename?: 'Field', id: string, name: string } } | null, morphRelations?: Array<{ __typename?: 'Relation', type: RelationType, sourceObjectMetadata: { __typename?: 'Object', id: string, nameSingular: string, namePlural: string }, targetObjectMetadata: { __typename?: 'Object', id: string, nameSingular: string, namePlural: string }, sourceFieldMetadata: { __typename?: 'Field', id: string, name: string }, targetFieldMetadata: { __typename?: 'Field', id: string, name: string } }> | null }> }>, logicFunctions: Array<{ __typename?: 'LogicFunction', id: string, name: string, description?: string | null, runtime: string, timeoutSeconds: number, executionMode: LogicFunctionExecutionMode, sourceHandlerPath: string, handlerName: string, cronTriggerSettings?: any | null, databaseEventTriggerSettings?: any | null, httpRouteTriggerSettings?: any | null, toolTriggerSettings?: any | null, workflowActionTriggerSettings?: any | null, applicationId?: string | null, universalIdentifier?: string | null, createdAt: string, updatedAt: string }> } }; export type FindOneApplicationByUniversalIdentifierQueryVariables = Exact<{ universalIdentifier: Scalars['UUID']; }>; -export type FindOneApplicationByUniversalIdentifierQuery = { __typename?: 'Query', findOneApplication: { __typename?: 'Application', id: string, name: string, description?: string | null, logo?: string | null, version?: string | null, universalIdentifier: string, applicationRegistrationId?: string | null, canBeUninstalled: 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, isSecret: boolean }>, 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, 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, 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, isCustom: boolean, isRemote: boolean, isActive: boolean, isSystem: boolean, isUIReadOnly: boolean, createdAt: string, updatedAt: string, labelIdentifierFieldMetadataId?: string | null, imageIdentifierFieldMetadataId?: string | null, applicationId: string, shortcut?: string | null, isLabelSyncedWithName: boolean, isSearchable: boolean, duplicateCriteria?: Array> | null, 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, isCustom?: boolean | null, isActive?: boolean | null, isSystem?: boolean | null, isUIReadOnly?: boolean | null, isNullable?: boolean | null, isUnique?: boolean | null, createdAt: string, updatedAt: string, defaultValue?: any | null, options?: any | null, settings?: any | null, isLabelSyncedWithName?: boolean | null, morphId?: string | null, applicationId: string, relation?: { __typename?: 'Relation', type: RelationType, sourceObjectMetadata: { __typename?: 'Object', id: string, nameSingular: string, namePlural: string }, targetObjectMetadata: { __typename?: 'Object', id: string, nameSingular: string, namePlural: string }, sourceFieldMetadata: { __typename?: 'Field', id: string, name: string }, targetFieldMetadata: { __typename?: 'Field', id: string, name: string } } | null, morphRelations?: Array<{ __typename?: 'Relation', type: RelationType, sourceObjectMetadata: { __typename?: 'Object', id: string, nameSingular: string, namePlural: string }, targetObjectMetadata: { __typename?: 'Object', id: string, nameSingular: string, namePlural: string }, sourceFieldMetadata: { __typename?: 'Field', id: string, name: string }, targetFieldMetadata: { __typename?: 'Field', id: string, name: string } }> | null }> }>, logicFunctions: Array<{ __typename?: 'LogicFunction', id: string, name: string, description?: string | null, runtime: string, timeoutSeconds: number, 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 FindOneApplicationByUniversalIdentifierQuery = { __typename?: 'Query', findOneApplication: { __typename?: 'Application', id: string, name: string, description?: string | null, logo?: string | null, version?: string | null, universalIdentifier: string, applicationRegistrationId?: string | null, canBeUninstalled: 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, isSecret: boolean }>, 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, 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, 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, isCustom: boolean, isRemote: boolean, isActive: boolean, isSystem: boolean, isUIReadOnly: boolean, createdAt: string, updatedAt: string, labelIdentifierFieldMetadataId?: string | null, imageIdentifierFieldMetadataId?: string | null, applicationId: string, shortcut?: string | null, isLabelSyncedWithName: boolean, isSearchable: boolean, duplicateCriteria?: Array> | null, 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, isCustom?: boolean | null, isActive?: boolean | null, isSystem?: boolean | null, isUIReadOnly?: boolean | null, isNullable?: boolean | null, isUnique?: boolean | null, createdAt: string, updatedAt: string, defaultValue?: any | null, options?: any | null, settings?: any | null, isLabelSyncedWithName?: boolean | null, morphId?: string | null, applicationId: string, relation?: { __typename?: 'Relation', type: RelationType, sourceObjectMetadata: { __typename?: 'Object', id: string, nameSingular: string, namePlural: string }, targetObjectMetadata: { __typename?: 'Object', id: string, nameSingular: string, namePlural: string }, sourceFieldMetadata: { __typename?: 'Field', id: string, name: string }, targetFieldMetadata: { __typename?: 'Field', id: string, name: string } } | null, morphRelations?: Array<{ __typename?: 'Relation', type: RelationType, sourceObjectMetadata: { __typename?: 'Object', id: string, nameSingular: string, namePlural: string }, targetObjectMetadata: { __typename?: 'Object', id: string, nameSingular: string, namePlural: string }, sourceFieldMetadata: { __typename?: 'Field', id: string, name: string }, targetFieldMetadata: { __typename?: 'Field', id: string, name: string } }> | null }> }>, logicFunctions: Array<{ __typename?: 'LogicFunction', id: string, name: string, description?: string | null, runtime: string, timeoutSeconds: number, executionMode: LogicFunctionExecutionMode, sourceHandlerPath: string, handlerName: string, cronTriggerSettings?: any | null, databaseEventTriggerSettings?: any | null, httpRouteTriggerSettings?: any | null, toolTriggerSettings?: any | null, workflowActionTriggerSettings?: any | null, applicationId?: string | null, universalIdentifier?: string | null, createdAt: string, updatedAt: string }> } }; export type FindOneApplicationSummaryQueryVariables = Exact<{ universalIdentifier: Scalars['UUID']; @@ -6625,21 +6632,21 @@ export type FindOneFrontComponentQueryVariables = Exact<{ export type FindOneFrontComponentQuery = { __typename?: 'Query', frontComponent?: { __typename?: 'FrontComponent', id: string, name: string, applicationId: string, builtComponentChecksum: string, isHeadless: boolean, usesSdkClient: boolean, applicationVariables?: any | null, applicationTokenPair?: { __typename?: 'ApplicationTokenPair', applicationAccessToken: { __typename?: 'AuthToken', token: string, expiresAt: string }, applicationRefreshToken: { __typename?: 'AuthToken', token: string, expiresAt: string } } | null } | null }; -export type LogicFunctionFieldsFragment = { __typename?: 'LogicFunction', id: string, name: string, description?: string | null, runtime: string, timeoutSeconds: number, 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 LogicFunctionFieldsFragment = { __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 CreateOneLogicFunctionMutationVariables = Exact<{ input: CreateLogicFunctionFromSourceInput; }>; -export type CreateOneLogicFunctionMutation = { __typename?: 'Mutation', createOneLogicFunction: { __typename?: 'LogicFunction', id: string, name: string, description?: string | null, runtime: string, timeoutSeconds: number, 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 CreateOneLogicFunctionMutation = { __typename?: 'Mutation', createOneLogicFunction: { __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 DeleteOneLogicFunctionMutationVariables = Exact<{ input: LogicFunctionIdInput; }>; -export type DeleteOneLogicFunctionMutation = { __typename?: 'Mutation', deleteOneLogicFunction: { __typename?: 'LogicFunction', id: string, name: string, description?: string | null, runtime: string, timeoutSeconds: number, 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 DeleteOneLogicFunctionMutation = { __typename?: 'Mutation', deleteOneLogicFunction: { __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 ExecuteOneLogicFunctionMutationVariables = Exact<{ input: ExecuteOneLogicFunctionInput; @@ -6665,14 +6672,14 @@ export type FindManyAvailablePackagesQuery = { __typename?: 'Query', getAvailabl export type FindManyLogicFunctionsQueryVariables = Exact<{ [key: string]: never; }>; -export type FindManyLogicFunctionsQuery = { __typename?: 'Query', findManyLogicFunctions: Array<{ __typename?: 'LogicFunction', id: string, name: string, description?: string | null, runtime: string, timeoutSeconds: number, 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 FindManyLogicFunctionsQuery = { __typename?: 'Query', findManyLogicFunctions: 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 FindOneLogicFunctionQueryVariables = Exact<{ input: LogicFunctionIdInput; }>; -export type FindOneLogicFunctionQuery = { __typename?: 'Query', findOneLogicFunction: { __typename?: 'LogicFunction', id: string, name: string, description?: string | null, runtime: string, timeoutSeconds: number, 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 FindOneLogicFunctionQuery = { __typename?: 'Query', findOneLogicFunction: { __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 GetLogicFunctionSourceCodeQueryVariables = Exact<{ input: LogicFunctionIdInput; @@ -7968,8 +7975,8 @@ export type GetWorkspaceFromInviteHashQuery = { __typename?: 'Query', findWorksp export const SkillFieldsFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SkillFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Skill"}},"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":"content"}},{"kind":"Field","name":{"kind":"Name","value":"isCustom"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}}]} as unknown as DocumentNode; 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; 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":"isCustom"}},{"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":"isUIReadOnly"}},{"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":"duplicateCriteria"}},{"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":"isCustom"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"isSystem"}},{"kind":"Field","name":{"kind":"Name","value":"isUIReadOnly"}},{"kind":"Field","name":{"kind":"Name","value":"isNullable"}},{"kind":"Field","name":{"kind":"Name","value":"isUnique"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"defaultValue"}},{"kind":"Field","name":{"kind":"Name","value":"options"}},{"kind":"Field","name":{"kind":"Name","value":"settings"}},{"kind":"Field","name":{"kind":"Name","value":"isLabelSyncedWithName"}},{"kind":"Field","name":{"kind":"Name","value":"morphId"}},{"kind":"Field","name":{"kind":"Name","value":"applicationId"}},{"kind":"Field","name":{"kind":"Name","value":"relation"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"sourceObjectMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"nameSingular"}},{"kind":"Field","name":{"kind":"Name","value":"namePlural"}}]}},{"kind":"Field","name":{"kind":"Name","value":"targetObjectMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"nameSingular"}},{"kind":"Field","name":{"kind":"Name","value":"namePlural"}}]}},{"kind":"Field","name":{"kind":"Name","value":"sourceFieldMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"targetFieldMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"morphRelations"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"sourceObjectMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"nameSingular"}},{"kind":"Field","name":{"kind":"Name","value":"namePlural"}}]}},{"kind":"Field","name":{"kind":"Name","value":"targetObjectMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"nameSingular"}},{"kind":"Field","name":{"kind":"Name","value":"namePlural"}}]}},{"kind":"Field","name":{"kind":"Name","value":"sourceFieldMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"targetFieldMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}}]}}]}}]}}]} as unknown as DocumentNode; -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":"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; -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":"logo"}},{"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":"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":"isSecret"}}]}},{"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":"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":"isCustom"}},{"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":"isUIReadOnly"}},{"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":"duplicateCriteria"}},{"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":"isCustom"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"isSystem"}},{"kind":"Field","name":{"kind":"Name","value":"isUIReadOnly"}},{"kind":"Field","name":{"kind":"Name","value":"isNullable"}},{"kind":"Field","name":{"kind":"Name","value":"isUnique"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"defaultValue"}},{"kind":"Field","name":{"kind":"Name","value":"options"}},{"kind":"Field","name":{"kind":"Name","value":"settings"}},{"kind":"Field","name":{"kind":"Name","value":"isLabelSyncedWithName"}},{"kind":"Field","name":{"kind":"Name","value":"morphId"}},{"kind":"Field","name":{"kind":"Name","value":"applicationId"}},{"kind":"Field","name":{"kind":"Name","value":"relation"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"sourceObjectMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"nameSingular"}},{"kind":"Field","name":{"kind":"Name","value":"namePlural"}}]}},{"kind":"Field","name":{"kind":"Name","value":"targetObjectMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"nameSingular"}},{"kind":"Field","name":{"kind":"Name","value":"namePlural"}}]}},{"kind":"Field","name":{"kind":"Name","value":"sourceFieldMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"targetFieldMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"morphRelations"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"sourceObjectMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"nameSingular"}},{"kind":"Field","name":{"kind":"Name","value":"namePlural"}}]}},{"kind":"Field","name":{"kind":"Name","value":"targetObjectMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"nameSingular"}},{"kind":"Field","name":{"kind":"Name","value":"namePlural"}}]}},{"kind":"Field","name":{"kind":"Name","value":"sourceFieldMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"targetFieldMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"LogicFunctionFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"LogicFunction"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"runtime"}},{"kind":"Field","name":{"kind":"Name","value":"timeoutSeconds"}},{"kind":"Field","name":{"kind":"Name","value":"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; +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; +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":"logo"}},{"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":"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":"isSecret"}}]}},{"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":"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":"isCustom"}},{"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":"isUIReadOnly"}},{"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":"duplicateCriteria"}},{"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":"isCustom"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"isSystem"}},{"kind":"Field","name":{"kind":"Name","value":"isUIReadOnly"}},{"kind":"Field","name":{"kind":"Name","value":"isNullable"}},{"kind":"Field","name":{"kind":"Name","value":"isUnique"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"defaultValue"}},{"kind":"Field","name":{"kind":"Name","value":"options"}},{"kind":"Field","name":{"kind":"Name","value":"settings"}},{"kind":"Field","name":{"kind":"Name","value":"isLabelSyncedWithName"}},{"kind":"Field","name":{"kind":"Name","value":"morphId"}},{"kind":"Field","name":{"kind":"Name","value":"applicationId"}},{"kind":"Field","name":{"kind":"Name","value":"relation"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"sourceObjectMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"nameSingular"}},{"kind":"Field","name":{"kind":"Name","value":"namePlural"}}]}},{"kind":"Field","name":{"kind":"Name","value":"targetObjectMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"nameSingular"}},{"kind":"Field","name":{"kind":"Name","value":"namePlural"}}]}},{"kind":"Field","name":{"kind":"Name","value":"sourceFieldMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"targetFieldMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"morphRelations"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"sourceObjectMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"nameSingular"}},{"kind":"Field","name":{"kind":"Name","value":"namePlural"}}]}},{"kind":"Field","name":{"kind":"Name","value":"targetObjectMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"nameSingular"}},{"kind":"Field","name":{"kind":"Name","value":"namePlural"}}]}},{"kind":"Field","name":{"kind":"Name","value":"sourceFieldMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"targetFieldMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"LogicFunctionFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"LogicFunction"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"runtime"}},{"kind":"Field","name":{"kind":"Name","value":"timeoutSeconds"}},{"kind":"Field","name":{"kind":"Name","value":"executionMode"}},{"kind":"Field","name":{"kind":"Name","value":"sourceHandlerPath"}},{"kind":"Field","name":{"kind":"Name","value":"handlerName"}},{"kind":"Field","name":{"kind":"Name","value":"cronTriggerSettings"}},{"kind":"Field","name":{"kind":"Name","value":"databaseEventTriggerSettings"}},{"kind":"Field","name":{"kind":"Name","value":"httpRouteTriggerSettings"}},{"kind":"Field","name":{"kind":"Name","value":"toolTriggerSettings"}},{"kind":"Field","name":{"kind":"Name","value":"workflowActionTriggerSettings"}},{"kind":"Field","name":{"kind":"Name","value":"applicationId"}},{"kind":"Field","name":{"kind":"Name","value":"universalIdentifier"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}}]} as unknown as DocumentNode; 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; 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; 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; @@ -8046,8 +8053,8 @@ export const GetToolInputSchemaDocument = {"kind":"Document","definitions":[{"ki 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; 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; 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":"logo"}},{"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; -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":"isCustom"}},{"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":"isUIReadOnly"}},{"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":"duplicateCriteria"}},{"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":"isCustom"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"isSystem"}},{"kind":"Field","name":{"kind":"Name","value":"isUIReadOnly"}},{"kind":"Field","name":{"kind":"Name","value":"isNullable"}},{"kind":"Field","name":{"kind":"Name","value":"isUnique"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"defaultValue"}},{"kind":"Field","name":{"kind":"Name","value":"options"}},{"kind":"Field","name":{"kind":"Name","value":"settings"}},{"kind":"Field","name":{"kind":"Name","value":"isLabelSyncedWithName"}},{"kind":"Field","name":{"kind":"Name","value":"morphId"}},{"kind":"Field","name":{"kind":"Name","value":"applicationId"}},{"kind":"Field","name":{"kind":"Name","value":"relation"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"sourceObjectMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"nameSingular"}},{"kind":"Field","name":{"kind":"Name","value":"namePlural"}}]}},{"kind":"Field","name":{"kind":"Name","value":"targetObjectMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"nameSingular"}},{"kind":"Field","name":{"kind":"Name","value":"namePlural"}}]}},{"kind":"Field","name":{"kind":"Name","value":"sourceFieldMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"targetFieldMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"morphRelations"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"sourceObjectMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"nameSingular"}},{"kind":"Field","name":{"kind":"Name","value":"namePlural"}}]}},{"kind":"Field","name":{"kind":"Name","value":"targetObjectMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"nameSingular"}},{"kind":"Field","name":{"kind":"Name","value":"namePlural"}}]}},{"kind":"Field","name":{"kind":"Name","value":"sourceFieldMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"targetFieldMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"LogicFunctionFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"LogicFunction"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"runtime"}},{"kind":"Field","name":{"kind":"Name","value":"timeoutSeconds"}},{"kind":"Field","name":{"kind":"Name","value":"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":"logo"}},{"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":"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":"isSecret"}}]}},{"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":"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; -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":"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":"isCustom"}},{"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":"isUIReadOnly"}},{"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":"duplicateCriteria"}},{"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":"isCustom"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"isSystem"}},{"kind":"Field","name":{"kind":"Name","value":"isUIReadOnly"}},{"kind":"Field","name":{"kind":"Name","value":"isNullable"}},{"kind":"Field","name":{"kind":"Name","value":"isUnique"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"defaultValue"}},{"kind":"Field","name":{"kind":"Name","value":"options"}},{"kind":"Field","name":{"kind":"Name","value":"settings"}},{"kind":"Field","name":{"kind":"Name","value":"isLabelSyncedWithName"}},{"kind":"Field","name":{"kind":"Name","value":"morphId"}},{"kind":"Field","name":{"kind":"Name","value":"applicationId"}},{"kind":"Field","name":{"kind":"Name","value":"relation"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"sourceObjectMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"nameSingular"}},{"kind":"Field","name":{"kind":"Name","value":"namePlural"}}]}},{"kind":"Field","name":{"kind":"Name","value":"targetObjectMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"nameSingular"}},{"kind":"Field","name":{"kind":"Name","value":"namePlural"}}]}},{"kind":"Field","name":{"kind":"Name","value":"sourceFieldMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"targetFieldMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"morphRelations"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"sourceObjectMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"nameSingular"}},{"kind":"Field","name":{"kind":"Name","value":"namePlural"}}]}},{"kind":"Field","name":{"kind":"Name","value":"targetObjectMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"nameSingular"}},{"kind":"Field","name":{"kind":"Name","value":"namePlural"}}]}},{"kind":"Field","name":{"kind":"Name","value":"sourceFieldMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"targetFieldMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"LogicFunctionFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"LogicFunction"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"runtime"}},{"kind":"Field","name":{"kind":"Name","value":"timeoutSeconds"}},{"kind":"Field","name":{"kind":"Name","value":"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":"logo"}},{"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":"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":"isSecret"}}]}},{"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":"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; +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":"isCustom"}},{"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":"isUIReadOnly"}},{"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":"duplicateCriteria"}},{"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":"isCustom"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"isSystem"}},{"kind":"Field","name":{"kind":"Name","value":"isUIReadOnly"}},{"kind":"Field","name":{"kind":"Name","value":"isNullable"}},{"kind":"Field","name":{"kind":"Name","value":"isUnique"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"defaultValue"}},{"kind":"Field","name":{"kind":"Name","value":"options"}},{"kind":"Field","name":{"kind":"Name","value":"settings"}},{"kind":"Field","name":{"kind":"Name","value":"isLabelSyncedWithName"}},{"kind":"Field","name":{"kind":"Name","value":"morphId"}},{"kind":"Field","name":{"kind":"Name","value":"applicationId"}},{"kind":"Field","name":{"kind":"Name","value":"relation"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"sourceObjectMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"nameSingular"}},{"kind":"Field","name":{"kind":"Name","value":"namePlural"}}]}},{"kind":"Field","name":{"kind":"Name","value":"targetObjectMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"nameSingular"}},{"kind":"Field","name":{"kind":"Name","value":"namePlural"}}]}},{"kind":"Field","name":{"kind":"Name","value":"sourceFieldMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"targetFieldMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"morphRelations"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"sourceObjectMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"nameSingular"}},{"kind":"Field","name":{"kind":"Name","value":"namePlural"}}]}},{"kind":"Field","name":{"kind":"Name","value":"targetObjectMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"nameSingular"}},{"kind":"Field","name":{"kind":"Name","value":"namePlural"}}]}},{"kind":"Field","name":{"kind":"Name","value":"sourceFieldMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"targetFieldMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"LogicFunctionFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"LogicFunction"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"runtime"}},{"kind":"Field","name":{"kind":"Name","value":"timeoutSeconds"}},{"kind":"Field","name":{"kind":"Name","value":"executionMode"}},{"kind":"Field","name":{"kind":"Name","value":"sourceHandlerPath"}},{"kind":"Field","name":{"kind":"Name","value":"handlerName"}},{"kind":"Field","name":{"kind":"Name","value":"cronTriggerSettings"}},{"kind":"Field","name":{"kind":"Name","value":"databaseEventTriggerSettings"}},{"kind":"Field","name":{"kind":"Name","value":"httpRouteTriggerSettings"}},{"kind":"Field","name":{"kind":"Name","value":"toolTriggerSettings"}},{"kind":"Field","name":{"kind":"Name","value":"workflowActionTriggerSettings"}},{"kind":"Field","name":{"kind":"Name","value":"applicationId"}},{"kind":"Field","name":{"kind":"Name","value":"universalIdentifier"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ApplicationFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Application"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"logo"}},{"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":"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":"isSecret"}}]}},{"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":"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; +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":"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":"isCustom"}},{"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":"isUIReadOnly"}},{"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":"duplicateCriteria"}},{"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":"isCustom"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"isSystem"}},{"kind":"Field","name":{"kind":"Name","value":"isUIReadOnly"}},{"kind":"Field","name":{"kind":"Name","value":"isNullable"}},{"kind":"Field","name":{"kind":"Name","value":"isUnique"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"defaultValue"}},{"kind":"Field","name":{"kind":"Name","value":"options"}},{"kind":"Field","name":{"kind":"Name","value":"settings"}},{"kind":"Field","name":{"kind":"Name","value":"isLabelSyncedWithName"}},{"kind":"Field","name":{"kind":"Name","value":"morphId"}},{"kind":"Field","name":{"kind":"Name","value":"applicationId"}},{"kind":"Field","name":{"kind":"Name","value":"relation"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"sourceObjectMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"nameSingular"}},{"kind":"Field","name":{"kind":"Name","value":"namePlural"}}]}},{"kind":"Field","name":{"kind":"Name","value":"targetObjectMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"nameSingular"}},{"kind":"Field","name":{"kind":"Name","value":"namePlural"}}]}},{"kind":"Field","name":{"kind":"Name","value":"sourceFieldMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"targetFieldMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"morphRelations"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"sourceObjectMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"nameSingular"}},{"kind":"Field","name":{"kind":"Name","value":"namePlural"}}]}},{"kind":"Field","name":{"kind":"Name","value":"targetObjectMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"nameSingular"}},{"kind":"Field","name":{"kind":"Name","value":"namePlural"}}]}},{"kind":"Field","name":{"kind":"Name","value":"sourceFieldMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"targetFieldMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"LogicFunctionFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"LogicFunction"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"runtime"}},{"kind":"Field","name":{"kind":"Name","value":"timeoutSeconds"}},{"kind":"Field","name":{"kind":"Name","value":"executionMode"}},{"kind":"Field","name":{"kind":"Name","value":"sourceHandlerPath"}},{"kind":"Field","name":{"kind":"Name","value":"handlerName"}},{"kind":"Field","name":{"kind":"Name","value":"cronTriggerSettings"}},{"kind":"Field","name":{"kind":"Name","value":"databaseEventTriggerSettings"}},{"kind":"Field","name":{"kind":"Name","value":"httpRouteTriggerSettings"}},{"kind":"Field","name":{"kind":"Name","value":"toolTriggerSettings"}},{"kind":"Field","name":{"kind":"Name","value":"workflowActionTriggerSettings"}},{"kind":"Field","name":{"kind":"Name","value":"applicationId"}},{"kind":"Field","name":{"kind":"Name","value":"universalIdentifier"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ApplicationFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Application"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"logo"}},{"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":"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":"isSecret"}}]}},{"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":"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; 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; export const AuthorizeAppDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"authorizeApp"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"clientId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"codeChallenge"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"redirectUrl"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"state"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"authorizeApp"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"clientId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"clientId"}}},{"kind":"Argument","name":{"kind":"Name","value":"codeChallenge"},"value":{"kind":"Variable","name":{"kind":"Name","value":"codeChallenge"}}},{"kind":"Argument","name":{"kind":"Name","value":"redirectUrl"},"value":{"kind":"Variable","name":{"kind":"Name","value":"redirectUrl"}}},{"kind":"Argument","name":{"kind":"Name","value":"state"},"value":{"kind":"Variable","name":{"kind":"Name","value":"state"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"redirectUrl"}}]}}]}}]} as unknown as DocumentNode; export const EmailPasswordResetLinkDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"EmailPasswordResetLink"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"email"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"workspaceId"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"UUID"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"emailPasswordResetLink"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"email"},"value":{"kind":"Variable","name":{"kind":"Name","value":"email"}}},{"kind":"Argument","name":{"kind":"Name","value":"workspaceId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"workspaceId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"success"}}]}}]}}]} as unknown as DocumentNode; @@ -8086,13 +8093,13 @@ export const UploadWorkflowFileDocument = {"kind":"Document","definitions":[{"ki export const RenewApplicationTokenDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"RenewApplicationToken"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"applicationRefreshToken"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"renewApplicationToken"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"applicationRefreshToken"},"value":{"kind":"Variable","name":{"kind":"Name","value":"applicationRefreshToken"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"applicationAccessToken"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"token"}},{"kind":"Field","name":{"kind":"Name","value":"expiresAt"}}]}},{"kind":"Field","name":{"kind":"Name","value":"applicationRefreshToken"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"token"}},{"kind":"Field","name":{"kind":"Name","value":"expiresAt"}}]}}]}}]}}]} as unknown as DocumentNode; export const FindManyFrontComponentsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"FindManyFrontComponents"},"selectionSet":{"kind":"SelectionSet","selections":[{"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":"applicationId"}},{"kind":"Field","name":{"kind":"Name","value":"builtComponentChecksum"}},{"kind":"Field","name":{"kind":"Name","value":"builtComponentPath"}},{"kind":"Field","name":{"kind":"Name","value":"componentName"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"isHeadless"}},{"kind":"Field","name":{"kind":"Name","value":"sourceComponentPath"}},{"kind":"Field","name":{"kind":"Name","value":"universalIdentifier"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"usesSdkClient"}}]}}]}}]} as unknown as DocumentNode; export const FindOneFrontComponentDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"FindOneFrontComponent"},"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":"frontComponent"},"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"}},{"kind":"Field","name":{"kind":"Name","value":"applicationId"}},{"kind":"Field","name":{"kind":"Name","value":"builtComponentChecksum"}},{"kind":"Field","name":{"kind":"Name","value":"isHeadless"}},{"kind":"Field","name":{"kind":"Name","value":"usesSdkClient"}},{"kind":"Field","name":{"kind":"Name","value":"applicationVariables"}},{"kind":"Field","name":{"kind":"Name","value":"applicationTokenPair"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"applicationAccessToken"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"token"}},{"kind":"Field","name":{"kind":"Name","value":"expiresAt"}}]}},{"kind":"Field","name":{"kind":"Name","value":"applicationRefreshToken"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"token"}},{"kind":"Field","name":{"kind":"Name","value":"expiresAt"}}]}}]}}]}}]}}]} as unknown as DocumentNode; -export const CreateOneLogicFunctionDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"CreateOneLogicFunction"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"CreateLogicFunctionFromSourceInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"createOneLogicFunction"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"LogicFunctionFields"}}]}}]}},{"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":"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; -export const DeleteOneLogicFunctionDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"DeleteOneLogicFunction"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"LogicFunctionIdInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"deleteOneLogicFunction"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"LogicFunctionFields"}}]}}]}},{"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":"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; +export const CreateOneLogicFunctionDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"CreateOneLogicFunction"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"CreateLogicFunctionFromSourceInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"createOneLogicFunction"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"LogicFunctionFields"}}]}}]}},{"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; +export const DeleteOneLogicFunctionDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"DeleteOneLogicFunction"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"LogicFunctionIdInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"deleteOneLogicFunction"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"LogicFunctionFields"}}]}}]}},{"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; export const ExecuteOneLogicFunctionDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"ExecuteOneLogicFunction"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ExecuteOneLogicFunctionInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"executeOneLogicFunction"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"data"}},{"kind":"Field","name":{"kind":"Name","value":"logs"}},{"kind":"Field","name":{"kind":"Name","value":"duration"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"error"}}]}}]}}]} as unknown as DocumentNode; export const UpdateOneLogicFunctionDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"UpdateOneLogicFunction"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UpdateLogicFunctionFromSourceInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"updateOneLogicFunction"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}]}]}}]} as unknown as DocumentNode; export const FindManyAvailablePackagesDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"FindManyAvailablePackages"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"LogicFunctionIdInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"getAvailablePackages"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}]}]}}]} as unknown as DocumentNode; -export const FindManyLogicFunctionsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"FindManyLogicFunctions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"findManyLogicFunctions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"LogicFunctionFields"}}]}}]}},{"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":"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; -export const FindOneLogicFunctionDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"FindOneLogicFunction"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"LogicFunctionIdInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"findOneLogicFunction"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"LogicFunctionFields"}}]}}]}},{"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":"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; +export const FindManyLogicFunctionsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"FindManyLogicFunctions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"findManyLogicFunctions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"LogicFunctionFields"}}]}}]}},{"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; +export const FindOneLogicFunctionDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"FindOneLogicFunction"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"LogicFunctionIdInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"findOneLogicFunction"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"LogicFunctionFields"}}]}}]}},{"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; export const GetLogicFunctionSourceCodeDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetLogicFunctionSourceCode"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"LogicFunctionIdInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"getLogicFunctionSourceCode"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}]}]}}]} as unknown as DocumentNode; export const InstallApplicationDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"InstallApplication"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"universalIdentifier"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"installApplication"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"universalIdentifier"},"value":{"kind":"Variable","name":{"kind":"Name","value":"universalIdentifier"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}}]}}]} as unknown as DocumentNode; export const UpgradeApplicationDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"UpgradeApplication"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"appRegistrationId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"targetVersion"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"upgradeApplication"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"appRegistrationId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"appRegistrationId"}}},{"kind":"Argument","name":{"kind":"Name","value":"targetVersion"},"value":{"kind":"Variable","name":{"kind":"Name","value":"targetVersion"}}}]}]}}]} as unknown as DocumentNode; diff --git a/packages/twenty-front/src/modules/logic-functions/graphql/fragments/logicFunctionFragment.ts b/packages/twenty-front/src/modules/logic-functions/graphql/fragments/logicFunctionFragment.ts index 399d2f994a..4f19411d96 100644 --- a/packages/twenty-front/src/modules/logic-functions/graphql/fragments/logicFunctionFragment.ts +++ b/packages/twenty-front/src/modules/logic-functions/graphql/fragments/logicFunctionFragment.ts @@ -7,6 +7,7 @@ export const LOGIC_FUNCTION_FRAGMENT = gql` description runtime timeoutSeconds + executionMode sourceHandlerPath handlerName cronTriggerSettings diff --git a/packages/twenty-server/src/database/commands/upgrade-version-command/2-9/2-9-instance-command-fast-1799000030000-add-logic-function-execution-mode.ts b/packages/twenty-server/src/database/commands/upgrade-version-command/2-9/2-9-instance-command-fast-1799000030000-add-logic-function-execution-mode.ts new file mode 100644 index 0000000000..8c7de410b7 --- /dev/null +++ b/packages/twenty-server/src/database/commands/upgrade-version-command/2-9/2-9-instance-command-fast-1799000030000-add-logic-function-execution-mode.ts @@ -0,0 +1,25 @@ +import { type QueryRunner } from 'typeorm'; + +import { RegisteredInstanceCommand } from 'src/engine/core-modules/upgrade/decorators/registered-instance-command.decorator'; +import { type FastInstanceCommand } from 'src/engine/core-modules/upgrade/interfaces/fast-instance-command.interface'; + +@RegisteredInstanceCommand('2.9.0', 1799000030000) +export class AddLogicFunctionExecutionModeFastInstanceCommand implements FastInstanceCommand { + public async up(queryRunner: QueryRunner): Promise { + await queryRunner.query( + `CREATE TYPE "core"."logicFunction_executionmode_enum" AS ENUM('LIVE', 'PREBUILT')`, + ); + await queryRunner.query( + `ALTER TABLE "core"."logicFunction" ADD "executionMode" "core"."logicFunction_executionmode_enum" NOT NULL DEFAULT 'LIVE'`, + ); + } + + public async down(queryRunner: QueryRunner): Promise { + await queryRunner.query( + `ALTER TABLE "core"."logicFunction" DROP COLUMN "executionMode"`, + ); + await queryRunner.query( + `DROP TYPE "core"."logicFunction_executionmode_enum"`, + ); + } +} 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 65514a2900..d494eceb61 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 @@ -56,6 +56,7 @@ import { EncryptConnectionParametersSlowInstanceCommand } from 'src/database/com import { AddSubFieldNameToIndexFieldMetadataFastInstanceCommand } from 'src/database/commands/upgrade-version-command/2-8/2-8-instance-command-fast-1798200000000-add-sub-field-name-to-index-field-metadata'; import { DropFieldMetadataIsUniqueColumnFastInstanceCommand } from 'src/database/commands/upgrade-version-command/2-8/2-8-instance-command-fast-1798300000000-drop-field-metadata-is-unique-column'; import { EmailingDomainTenantStatusAndGlobalUniquenessFastInstanceCommand } from 'src/database/commands/upgrade-version-command/2-9/2-9-instance-command-fast-1799000020000-emailing-domain-tenant-status-and-global-uniqueness'; +import { AddLogicFunctionExecutionModeFastInstanceCommand } from 'src/database/commands/upgrade-version-command/2-9/2-9-instance-command-fast-1799000030000-add-logic-function-execution-mode'; import { EncryptNonSecretApplicationVariableSlowInstanceCommand } from 'src/database/commands/upgrade-version-command/2-9/2-9-instance-command-slow-1798400000000-encrypt-non-secret-application-variable'; import { MigrateAiModelPreferencesSlowInstanceCommand } from 'src/database/commands/upgrade-version-command/2-9/2-9-instance-command-slow-1799000010000-migrate-ai-model-preferences'; @@ -116,6 +117,7 @@ export const INSTANCE_COMMANDS = [ FinalizeRolePermissionFlagCutoverFastInstanceCommand, AddSubFieldNameToIndexFieldMetadataFastInstanceCommand, DropFieldMetadataIsUniqueColumnFastInstanceCommand, + AddLogicFunctionExecutionModeFastInstanceCommand, MigrateAiModelPreferencesSlowInstanceCommand, EncryptNonSecretApplicationVariableSlowInstanceCommand, ]; diff --git a/packages/twenty-server/src/engine/core-modules/application/application-manifest/converters/from-logic-function-manifest-to-universal-flat-logic-function.util.ts b/packages/twenty-server/src/engine/core-modules/application/application-manifest/converters/from-logic-function-manifest-to-universal-flat-logic-function.util.ts index 84bfecfe13..6769337604 100644 --- a/packages/twenty-server/src/engine/core-modules/application/application-manifest/converters/from-logic-function-manifest-to-universal-flat-logic-function.util.ts +++ b/packages/twenty-server/src/engine/core-modules/application/application-manifest/converters/from-logic-function-manifest-to-universal-flat-logic-function.util.ts @@ -2,7 +2,10 @@ import { parse } from 'path'; import { type LogicFunctionManifest } from 'twenty-shared/application'; -import { LogicFunctionRuntime } from 'src/engine/metadata-modules/logic-function/logic-function.entity'; +import { + LogicFunctionExecutionMode, + LogicFunctionRuntime, +} from 'src/engine/metadata-modules/logic-function/logic-function.entity'; import { type UniversalFlatLogicFunction } from 'src/engine/workspace-manager/workspace-migration/universal-flat-entity/types/universal-flat-logic-function.type'; export const fromLogicFunctionManifestToUniversalFlatLogicFunction = ({ @@ -37,6 +40,7 @@ export const fromLogicFunctionManifestToUniversalFlatLogicFunction = ({ workflowActionTriggerSettings: logicFunctionManifest.workflowActionTriggerSettings ?? null, isBuildUpToDate: true, + executionMode: LogicFunctionExecutionMode.PREBUILT, createdAt: now, updatedAt: now, deletedAt: null, diff --git a/packages/twenty-server/src/engine/core-modules/logic-function/logic-function-drivers/constants/executor/index.mjs b/packages/twenty-server/src/engine/core-modules/logic-function/logic-function-drivers/constants/executor/index.mjs index c6b1696796..3519af43fd 100644 --- a/packages/twenty-server/src/engine/core-modules/logic-function/logic-function-drivers/constants/executor/index.mjs +++ b/packages/twenty-server/src/engine/core-modules/logic-function/logic-function-drivers/constants/executor/index.mjs @@ -4,6 +4,29 @@ import { createHash } from 'crypto'; export const handler = async (event) => { const { code, params, env, handlerName } = event; + // oxlint-disable-next-line no-undef + const oldProcessEnv = { ...process.env }; + + try { + // oxlint-disable-next-line no-undef + process.env = { ...process.env, ...(env ?? {}) }; + + const mainFile = code + ? await loadFromPayload(code) + : await import('./prebuilt-logic-function.mjs'); + + const handlerFn = handlerName + .split('.') + .reduce((obj, key) => obj[key], mainFile); + + return await handlerFn(params); + } finally { + // oxlint-disable-next-line no-undef + process.env = oldProcessEnv; + } +}; + +const loadFromPayload = async (code) => { // Use a content-hash filename so identical code is written once per // warm container and Node's ESM module cache can short-circuit subsequent // `import(mainPath)` calls. With random names, every warm invocation @@ -23,31 +46,13 @@ export const handler = async (event) => { const codeHash = createHash('sha256').update(code).digest('hex'); const mainPath = `/tmp/${codeHash}.mjs`; - // oxlint-disable-next-line no-undef - const oldProcessEnv = { ...process.env }; - try { - try { - await fs.access(mainPath); - } catch { - await fs.writeFile(mainPath, code, 'utf8'); - } - - // oxlint-disable-next-line no-undef - process.env = { ...process.env, ...(env ?? {}) }; - - const mainFile = await import(mainPath); - - const handlerFn = handlerName - .split('.') - .reduce((obj, key) => obj[key], mainFile); - - return await handlerFn(params); - } finally { - // Intentionally NOT removing `mainPath` here so subsequent warm - // invocations hit Node's ESM cache (see comment above). - - // oxlint-disable-next-line no-undef - process.env = oldProcessEnv; + await fs.access(mainPath); + } catch { + await fs.writeFile(mainPath, code, 'utf8'); } + + // Intentionally NOT removing `mainPath` after import so subsequent warm + // invocations hit Node's ESM cache (see comment above). + return import(mainPath); }; diff --git a/packages/twenty-server/src/engine/core-modules/logic-function/logic-function-drivers/constants/logic-function-driver-factory.token.ts b/packages/twenty-server/src/engine/core-modules/logic-function/logic-function-drivers/constants/logic-function-driver-factory.token.ts new file mode 100644 index 0000000000..a7d7e58f54 --- /dev/null +++ b/packages/twenty-server/src/engine/core-modules/logic-function/logic-function-drivers/constants/logic-function-driver-factory.token.ts @@ -0,0 +1,2 @@ +export const LOGIC_FUNCTION_DRIVER_FACTORY_TOKEN = + 'LOGIC_FUNCTION_DRIVER_FACTORY'; diff --git a/packages/twenty-server/src/engine/core-modules/logic-function/logic-function-drivers/drivers/disabled.driver.ts b/packages/twenty-server/src/engine/core-modules/logic-function/logic-function-drivers/drivers/disabled.driver.ts index c83f2beca7..6edeb52175 100644 --- a/packages/twenty-server/src/engine/core-modules/logic-function/logic-function-drivers/drivers/disabled.driver.ts +++ b/packages/twenty-server/src/engine/core-modules/logic-function/logic-function-drivers/drivers/disabled.driver.ts @@ -27,4 +27,15 @@ export class DisabledDriver implements LogicFunctionDriver { LogicFunctionExceptionCode.LOGIC_FUNCTION_DISABLED, ); } + + async installPrebuiltBundle(): Promise { + throw new LogicFunctionException( + 'Logic function prebuilt install is disabled. Set LOGIC_FUNCTION_TYPE to LOCAL or LAMBDA to enable.', + LogicFunctionExceptionCode.LOGIC_FUNCTION_DISABLED, + ); + } + + async getInstalledBundleChecksum(): Promise { + return null; + } } diff --git a/packages/twenty-server/src/engine/core-modules/logic-function/logic-function-drivers/drivers/lambda.driver.ts b/packages/twenty-server/src/engine/core-modules/logic-function/logic-function-drivers/drivers/lambda.driver.ts index 7e291edcb8..f8ec03710c 100644 --- a/packages/twenty-server/src/engine/core-modules/logic-function/logic-function-drivers/drivers/lambda.driver.ts +++ b/packages/twenty-server/src/engine/core-modules/logic-function/logic-function-drivers/drivers/lambda.driver.ts @@ -18,6 +18,8 @@ import { LogType, PublishLayerVersionCommand, ResourceNotFoundException, + TagResourceCommand, + UpdateFunctionCodeCommand, UpdateFunctionConfigurationCommand, waitUntilFunctionActiveV2, waitUntilFunctionUpdatedV2, @@ -32,6 +34,7 @@ import { type LogicFunctionDriver, type LogicFunctionExecuteParams, type LogicFunctionExecuteResult, + type LogicFunctionInstallPrebuiltBundleParams, type LogicFunctionTranspileParams, type LogicFunctionTranspileResult, } from 'src/engine/core-modules/logic-function/logic-function-drivers/interfaces/logic-function-driver.interface'; @@ -50,12 +53,16 @@ import { TemporaryDirManager } from 'src/engine/core-modules/logic-function/logi import { type LogicFunctionResourceService } from 'src/engine/core-modules/logic-function/logic-function-resource/logic-function-resource.service'; import { type SdkClientArchiveService } from 'src/engine/core-modules/sdk-client/sdk-client-archive.service'; import { LogicFunctionExecutionStatus } from 'src/engine/metadata-modules/logic-function/dtos/logic-function-execution-result.dto'; -import { LogicFunctionRuntime } from 'src/engine/metadata-modules/logic-function/logic-function.entity'; +import { + LogicFunctionExecutionMode, + LogicFunctionRuntime, +} from 'src/engine/metadata-modules/logic-function/logic-function.entity'; import { LogicFunctionException, LogicFunctionExceptionCode, } from 'src/engine/metadata-modules/logic-function/logic-function.exception'; import { type FlatLogicFunction } from 'src/engine/metadata-modules/logic-function/types/flat-logic-function.type'; +import { isLogicFunctionReadyForPrebuiltInstall } from 'src/engine/metadata-modules/logic-function/utils/is-logic-function-ready-for-prebuilt-install.util'; enum LambdaExecutionPhase { BUILD = 'build', @@ -88,8 +95,16 @@ const BUILDER_HANDLER_PATH = resolve( ), ); +const LAMBDA_PREBUILT_BUNDLE_CHECKSUM_TAG = 'twenty:bundle-checksum'; + +const PREBUILT_BUNDLE_FILE_NAME = 'prebuilt-logic-function.mjs'; + +const PREBUILT_INSTALL_LOCK_TTL_MS = 180_000; +const PREBUILT_INSTALL_LOCK_RETRY_MS = 1_000; +const PREBUILT_INSTALL_LOCK_MAX_RETRIES = 180; + type LambdaDriverExecutorPayload = { - code: string; + code?: string; params: object; env: Record; handlerName: string; @@ -1164,7 +1179,20 @@ export class LambdaDriver implements LogicFunctionDriver { payload, env, timeoutMs = 900_000, + forceExecutionMode, }: LogicFunctionExecuteParams): Promise { + const executionMode = forceExecutionMode ?? flatLogicFunction.executionMode; + + if ( + executionMode === LogicFunctionExecutionMode.PREBUILT && + !isLogicFunctionReadyForPrebuiltInstall(flatLogicFunction) + ) { + throw new LogicFunctionException( + `Cannot run logic function '${flatLogicFunction.id}' in PREBUILT mode: bundle is not installed`, + LogicFunctionExceptionCode.LOGIC_FUNCTION_PREBUILT_BUNDLE_NOT_INSTALLED, + ); + } + let currentPhase: LambdaExecutionPhase = LambdaExecutionPhase.BUILD; let buildExecutorMs = 0; let getBuiltCodeMs = 0; @@ -1180,26 +1208,28 @@ export class LambdaDriver implements LogicFunctionDriver { buildExecutorMs = Date.now() - buildStart; currentPhase = LambdaExecutionPhase.FETCH_CODE; - const fetchStart = Date.now(); - - const compiledCode = await this.logicFunctionResourceService.getBuiltCode( - { - workspaceId: flatLogicFunction.workspaceId, - applicationUniversalIdentifier, - builtHandlerPath: flatLogicFunction.builtHandlerPath, - }, - ); - getBuiltCodeMs = Date.now() - fetchStart; - - currentPhase = LambdaExecutionPhase.INVOKE; + const invokeFlowStart = Date.now(); const executorPayload: LambdaDriverExecutorPayload = { params: payload, - code: compiledCode, env: env ?? {}, handlerName: flatLogicFunction.handlerName, }; + if (executionMode === LogicFunctionExecutionMode.LIVE) { + const fetchStart = Date.now(); + + executorPayload.code = + await this.logicFunctionResourceService.getBuiltCode({ + workspaceId: flatLogicFunction.workspaceId, + applicationUniversalIdentifier, + builtHandlerPath: flatLogicFunction.builtHandlerPath, + }); + getBuiltCodeMs = Date.now() - fetchStart; + } + + currentPhase = LambdaExecutionPhase.INVOKE; + const payloadString = JSON.stringify(executorPayload); const params: InvokeCommandInput = { FunctionName: flatLogicFunction.id, @@ -1228,10 +1258,10 @@ export class LambdaDriver implements LogicFunctionDriver { coldStart, } = this.parseLambdaLogResult(result.LogResult); - const duration = Date.now() - fetchStart; + const duration = Date.now() - invokeFlowStart; this.logger.log( - `[lambda-timing] fnId=${flatLogicFunction.id} totalMs=${Date.now() - buildStart} buildExecutorMs=${buildExecutorMs} getBuiltCodeMs=${getBuiltCodeMs} payloadBytes=${Buffer.byteLength(payloadString, 'utf8')} invokeSendMs=${invokeSendMs} reportDurationMs=${reportDurationMs ?? 'n/a'} billedMs=${billedDurationMs ?? 'n/a'} initDurationMs=${initDurationMs ?? 'n/a'} coldStart=${coldStart}`, + `[lambda-timing] fnId=${flatLogicFunction.id} executionMode=${executionMode} totalMs=${Date.now() - buildStart} buildExecutorMs=${buildExecutorMs} getBuiltCodeMs=${getBuiltCodeMs} payloadBytes=${Buffer.byteLength(payloadString, 'utf8')} invokeSendMs=${invokeSendMs} reportDurationMs=${reportDurationMs ?? 'n/a'} billedMs=${billedDurationMs ?? 'n/a'} initDurationMs=${initDurationMs ?? 'n/a'} coldStart=${coldStart}`, ); if (result.FunctionError) { @@ -1287,4 +1317,109 @@ export class LambdaDriver implements LogicFunctionDriver { ); } } + + private getPrebuiltInstallLockKey(flatLogicFunction: FlatLogicFunction) { + return `lambda-install:${flatLogicFunction.id}`; + } + + async installPrebuiltBundle({ + flatLogicFunction, + flatApplication, + applicationUniversalIdentifier, + }: LogicFunctionInstallPrebuiltBundleParams): Promise { + if (!isNonEmptyString(flatLogicFunction.checksum)) { + throw new LogicFunctionException( + `Cannot install prebuilt bundle for function '${flatLogicFunction.id}' without a checksum`, + LogicFunctionExceptionCode.LOGIC_FUNCTION_PREBUILT_BUNDLE_NOT_INSTALLED, + ); + } + + const checksum = flatLogicFunction.checksum; + + await this.buildLambdaExecutor({ + flatLogicFunction, + flatApplication, + applicationUniversalIdentifier, + }); + + await this.cacheLockService.withLock( + async () => { + const compiledCode = + await this.logicFunctionResourceService.getBuiltCode({ + workspaceId: flatLogicFunction.workspaceId, + applicationUniversalIdentifier, + builtHandlerPath: flatLogicFunction.builtHandlerPath, + }); + + const temporaryDirManager = new TemporaryDirManager(); + const { sourceTemporaryDir, lambdaZipPath } = + await temporaryDirManager.init(); + + try { + await copyExecutor(sourceTemporaryDir); + await fs.writeFile( + join(sourceTemporaryDir, PREBUILT_BUNDLE_FILE_NAME), + compiledCode, + 'utf8', + ); + await createZipFile(sourceTemporaryDir, lambdaZipPath); + + const lambdaClient = await this.getLambdaClient(); + + const updateResult = await lambdaClient.send( + new UpdateFunctionCodeCommand({ + FunctionName: flatLogicFunction.id, + ZipFile: await fs.readFile(lambdaZipPath), + }), + ); + + await this.waitFunctionUpdated(flatLogicFunction.id); + + const functionArn = updateResult.FunctionArn; + + if (!isNonEmptyString(functionArn)) { + throw new LogicFunctionException( + `UpdateFunctionCode did not return a FunctionArn for '${flatLogicFunction.id}'`, + LogicFunctionExceptionCode.LOGIC_FUNCTION_PREBUILT_BUNDLE_NOT_INSTALLED, + ); + } + + await lambdaClient.send( + new TagResourceCommand({ + Resource: functionArn, + Tags: { + [LAMBDA_PREBUILT_BUNDLE_CHECKSUM_TAG]: checksum, + }, + }), + ); + } catch (error) { + this.logger.error( + `Failed to install prebuilt bundle for function ${flatLogicFunction.id}: ${error instanceof Error ? error.message : String(error)}`, + error instanceof Error ? error.stack : undefined, + ); + throw error; + } finally { + await temporaryDirManager.clean(); + } + }, + this.getPrebuiltInstallLockKey(flatLogicFunction), + { + ttl: PREBUILT_INSTALL_LOCK_TTL_MS, + ms: PREBUILT_INSTALL_LOCK_RETRY_MS, + maxRetries: PREBUILT_INSTALL_LOCK_MAX_RETRIES, + }, + ); + } + + async getInstalledBundleChecksum( + flatLogicFunction: FlatLogicFunction, + ): Promise { + const lambdaExecutor = await this.getLambdaExecutor(flatLogicFunction); + + if (!isDefined(lambdaExecutor)) { + return null; + } + + return lambdaExecutor.Tags?.[LAMBDA_PREBUILT_BUNDLE_CHECKSUM_TAG] ?? null; + } } diff --git a/packages/twenty-server/src/engine/core-modules/logic-function/logic-function-drivers/drivers/local.driver.ts b/packages/twenty-server/src/engine/core-modules/logic-function/logic-function-drivers/drivers/local.driver.ts index b02d83e2c7..1f7b7c8470 100644 --- a/packages/twenty-server/src/engine/core-modules/logic-function/logic-function-drivers/drivers/local.driver.ts +++ b/packages/twenty-server/src/engine/core-modules/logic-function/logic-function-drivers/drivers/local.driver.ts @@ -9,10 +9,12 @@ import { type LogicFunctionExecuteParams, type LogicFunctionExecuteResult, type LogicFunctionDriver, + type LogicFunctionInstallPrebuiltBundleParams, type LogicFunctionTranspileParams, type LogicFunctionTranspileResult, } from 'src/engine/core-modules/logic-function/logic-function-drivers/interfaces/logic-function-driver.interface'; +import { isNonEmptyString } from '@sniptt/guards'; import { type FlatApplication } from 'src/engine/core-modules/application/types/flat-application.type'; import { type CacheLockService } from 'src/engine/core-modules/cache-lock/cache-lock.service'; import { LOGIC_FUNCTION_EXECUTOR_TMPDIR_FOLDER } from 'src/engine/core-modules/logic-function/logic-function-drivers/constants/logic-function-executor-tmpdir-folder'; @@ -20,6 +22,13 @@ import { ConsoleListener } from 'src/engine/core-modules/logic-function/logic-fu import { TemporaryDirManager } from 'src/engine/core-modules/logic-function/logic-function-drivers/utils/temporary-dir-manager'; import { HANDLER_NAME_REGEX } from 'src/engine/metadata-modules/logic-function/constants/handler.contant'; import { LogicFunctionExecutionStatus } from 'src/engine/metadata-modules/logic-function/dtos/logic-function-execution-result.dto'; +import { LogicFunctionExecutionMode } from 'src/engine/metadata-modules/logic-function/logic-function.entity'; +import { + LogicFunctionException, + LogicFunctionExceptionCode, +} from 'src/engine/metadata-modules/logic-function/logic-function.exception'; +import { type FlatLogicFunction } from 'src/engine/metadata-modules/logic-function/types/flat-logic-function.type'; +import { isLogicFunctionReadyForPrebuiltInstall } from 'src/engine/metadata-modules/logic-function/utils/is-logic-function-ready-for-prebuilt-install.util'; import { copyYarnEngineAndBuildDependencies } from 'src/engine/core-modules/application/application-package/utils/copy-yarn-engine-and-build-dependencies'; import type { LogicFunctionResourceService } from 'src/engine/core-modules/logic-function/logic-function-resource/logic-function-resource.service'; import type { SdkClientArchiveService } from 'src/engine/core-modules/sdk-client/sdk-client-archive.service'; @@ -30,6 +39,13 @@ const LAYER_BUILD_LOCK_RETRY_MS = 500; const LAYER_BUILD_LOCK_MAX_RETRIES = 240; const LAYER_BUILD_READY_SENTINEL = '.twenty-layer-ready'; +const PREBUILT_BUNDLE_FILE_NAME = 'prebuilt-logic-function.mjs'; +const PREBUILT_CHECKSUM_FILE_NAME = 'prebuilt-bundle.checksum'; + +const PREBUILT_INSTALL_LOCK_TTL_MS = 180_000; +const PREBUILT_INSTALL_LOCK_RETRY_MS = 1_000; +const PREBUILT_INSTALL_LOCK_MAX_RETRIES = 180; + export interface LocalDriverOptions { logicFunctionResourceService: LogicFunctionResourceService; sdkClientArchiveService: SdkClientArchiveService; @@ -283,7 +299,20 @@ export class LocalDriver implements LogicFunctionDriver { payload, env, timeoutMs = 900_000, + forceExecutionMode, }: LogicFunctionExecuteParams): Promise { + const executionMode = forceExecutionMode ?? flatLogicFunction.executionMode; + + if ( + executionMode === LogicFunctionExecutionMode.PREBUILT && + !isLogicFunctionReadyForPrebuiltInstall(flatLogicFunction) + ) { + throw new LogicFunctionException( + `Cannot run logic function '${flatLogicFunction.id}' in PREBUILT mode: bundle is not installed`, + LogicFunctionExceptionCode.LOGIC_FUNCTION_PREBUILT_BUNDLE_NOT_INSTALLED, + ); + } + await this.createLayerIfNotExist({ flatApplication, applicationUniversalIdentifier, @@ -300,20 +329,25 @@ export class LocalDriver implements LogicFunctionDriver { try { const { sourceTemporaryDir } = await temporaryDirManager.init(); - const inMemoryBuiltHandlerPath = - await this.logicFunctionResourceService.copyBuiltCodeInMemory({ - workspaceId: flatLogicFunction.workspaceId, - applicationUniversalIdentifier, - builtHandlerPath: flatLogicFunction.builtHandlerPath, - inMemoryDestinationPath: sourceTemporaryDir, - }); - await this.assembleNodeModules({ sourceTemporaryDir, flatApplication, applicationUniversalIdentifier, }); + const inMemoryBuiltHandlerPath = + executionMode === LogicFunctionExecutionMode.PREBUILT + ? await this.copyPrebuiltBundleIntoExecutionDir({ + flatLogicFunction, + sourceTemporaryDir, + }) + : await this.logicFunctionResourceService.copyBuiltCodeInMemory({ + workspaceId: flatLogicFunction.workspaceId, + applicationUniversalIdentifier, + builtHandlerPath: flatLogicFunction.builtHandlerPath, + inMemoryDestinationPath: sourceTemporaryDir, + }); + let logs = ''; const consoleListener = new ConsoleListener(); @@ -561,4 +595,114 @@ export class LocalDriver implements LogicFunctionDriver { child.on('close', () => clearTimeout(t)); }); } + + private getPrebuiltBundleDir(flatLogicFunction: FlatLogicFunction): string { + return join( + LOGIC_FUNCTION_EXECUTOR_TMPDIR_FOLDER, + 'prebuilt', + flatLogicFunction.id, + ); + } + + private getInstalledBundlePath(flatLogicFunction: FlatLogicFunction): string { + return join( + this.getPrebuiltBundleDir(flatLogicFunction), + PREBUILT_BUNDLE_FILE_NAME, + ); + } + + private async copyPrebuiltBundleIntoExecutionDir({ + flatLogicFunction, + sourceTemporaryDir, + }: { + flatLogicFunction: FlatLogicFunction; + sourceTemporaryDir: string; + }): Promise { + const installedBundlePath = this.getInstalledBundlePath(flatLogicFunction); + const localBundlePath = join(sourceTemporaryDir, PREBUILT_BUNDLE_FILE_NAME); + + await fs.copyFile(installedBundlePath, localBundlePath); + + return localBundlePath; + } + + private getInstalledChecksumPath( + flatLogicFunction: FlatLogicFunction, + ): string { + return join( + this.getPrebuiltBundleDir(flatLogicFunction), + PREBUILT_CHECKSUM_FILE_NAME, + ); + } + + private getPrebuiltInstallLockKey(flatLogicFunction: FlatLogicFunction) { + return `local-install:${flatLogicFunction.id}`; + } + + async installPrebuiltBundle({ + flatLogicFunction, + applicationUniversalIdentifier, + }: LogicFunctionInstallPrebuiltBundleParams): Promise { + if (!isNonEmptyString(flatLogicFunction.checksum)) { + throw new LogicFunctionException( + `Cannot install prebuilt bundle for function '${flatLogicFunction.id}' without a checksum`, + LogicFunctionExceptionCode.LOGIC_FUNCTION_PREBUILT_BUNDLE_NOT_INSTALLED, + ); + } + + const checksum = flatLogicFunction.checksum; + + await this.cacheLockService.withLock( + async () => { + const prebuiltDir = this.getPrebuiltBundleDir(flatLogicFunction); + + await fs.mkdir(prebuiltDir, { recursive: true }); + + await this.logicFunctionResourceService.copyBuiltCodeInMemory({ + workspaceId: flatLogicFunction.workspaceId, + applicationUniversalIdentifier, + builtHandlerPath: flatLogicFunction.builtHandlerPath, + inMemoryDestinationPath: prebuiltDir, + }); + + const downloadedPath = join( + prebuiltDir, + flatLogicFunction.builtHandlerPath, + ); + const targetPath = this.getInstalledBundlePath(flatLogicFunction); + + if (downloadedPath !== targetPath) { + await fs.mkdir(dirname(targetPath), { recursive: true }); + await fs.rename(downloadedPath, targetPath); + } + + await fs.writeFile( + this.getInstalledChecksumPath(flatLogicFunction), + checksum, + 'utf8', + ); + }, + this.getPrebuiltInstallLockKey(flatLogicFunction), + { + ttl: PREBUILT_INSTALL_LOCK_TTL_MS, + ms: PREBUILT_INSTALL_LOCK_RETRY_MS, + maxRetries: PREBUILT_INSTALL_LOCK_MAX_RETRIES, + }, + ); + } + + async getInstalledBundleChecksum( + flatLogicFunction: FlatLogicFunction, + ): Promise { + try { + const checksum = await fs.readFile( + this.getInstalledChecksumPath(flatLogicFunction), + 'utf8', + ); + + return checksum.trim() || null; + } catch { + return null; + } + } } diff --git a/packages/twenty-server/src/engine/core-modules/logic-function/logic-function-drivers/interfaces/logic-function-driver.interface.ts b/packages/twenty-server/src/engine/core-modules/logic-function/logic-function-drivers/interfaces/logic-function-driver.interface.ts index fe02053f3b..10b2094ced 100644 --- a/packages/twenty-server/src/engine/core-modules/logic-function/logic-function-drivers/interfaces/logic-function-driver.interface.ts +++ b/packages/twenty-server/src/engine/core-modules/logic-function/logic-function-drivers/interfaces/logic-function-driver.interface.ts @@ -1,5 +1,6 @@ import { type FlatApplication } from 'src/engine/core-modules/application/types/flat-application.type'; import { type LogicFunctionExecutionStatus } from 'src/engine/metadata-modules/logic-function/dtos/logic-function-execution-result.dto'; +import { type LogicFunctionExecutionMode } from 'src/engine/metadata-modules/logic-function/logic-function.entity'; import { type FlatLogicFunction } from 'src/engine/metadata-modules/logic-function/types/flat-logic-function.type'; export type LogicFunctionExecuteError = { @@ -23,6 +24,13 @@ export type LogicFunctionExecuteParams = { payload: object; env?: Record; timeoutMs?: number; + forceExecutionMode?: LogicFunctionExecutionMode; +}; + +export type LogicFunctionInstallPrebuiltBundleParams = { + flatLogicFunction: FlatLogicFunction; + flatApplication: FlatApplication; + applicationUniversalIdentifier: string; }; export type LogicFunctionTranspileParams = { @@ -43,6 +51,12 @@ export interface LogicFunctionDriver { transpile( params: LogicFunctionTranspileParams, ): Promise; + installPrebuiltBundle( + params: LogicFunctionInstallPrebuiltBundleParams, + ): Promise; + getInstalledBundleChecksum( + flatLogicFunction: FlatLogicFunction, + ): Promise; } export enum LogicFunctionDriverType { diff --git a/packages/twenty-server/src/engine/core-modules/logic-function/logic-function-executor/logic-function-executor.module.ts b/packages/twenty-server/src/engine/core-modules/logic-function/logic-function-executor/logic-function-executor.module.ts index a5b020283a..2697f7049f 100644 --- a/packages/twenty-server/src/engine/core-modules/logic-function/logic-function-executor/logic-function-executor.module.ts +++ b/packages/twenty-server/src/engine/core-modules/logic-function/logic-function-executor/logic-function-executor.module.ts @@ -5,6 +5,7 @@ import { ApplicationRegistrationVariableEntity } from 'src/engine/core-modules/a import { AuditModule } from 'src/engine/core-modules/audit/audit.module'; import { TokenModule } from 'src/engine/core-modules/auth/token/token.module'; import { BillingModule } from 'src/engine/core-modules/billing/billing.module'; +import { FeatureFlagModule } from 'src/engine/core-modules/feature-flag/feature-flag.module'; import { LogicFunctionExecutorService } from 'src/engine/core-modules/logic-function/logic-function-executor/logic-function-executor.service'; import { SecretEncryptionModule } from 'src/engine/core-modules/secret-encryption/secret-encryption.module'; import { ThrottlerModule } from 'src/engine/core-modules/throttler/throttler.module'; @@ -20,6 +21,7 @@ import { WorkspaceCacheModule } from 'src/engine/workspace-cache/workspace-cache SubscriptionsModule, WorkspaceCacheModule, BillingModule, + FeatureFlagModule, TypeOrmModule.forFeature([ApplicationRegistrationVariableEntity]), ], providers: [LogicFunctionExecutorService], diff --git a/packages/twenty-server/src/engine/core-modules/logic-function/logic-function-executor/logic-function-executor.service.ts b/packages/twenty-server/src/engine/core-modules/logic-function/logic-function-executor/logic-function-executor.service.ts index 719f8ff5c4..db019b68c5 100644 --- a/packages/twenty-server/src/engine/core-modules/logic-function/logic-function-executor/logic-function-executor.service.ts +++ b/packages/twenty-server/src/engine/core-modules/logic-function/logic-function-executor/logic-function-executor.service.ts @@ -6,6 +6,7 @@ import { DEFAULT_API_URL_NAME, DEFAULT_APP_ACCESS_TOKEN_NAME, } from 'twenty-shared/application'; +import { FeatureFlagKey } from 'twenty-shared/types'; import { isDefined } from 'twenty-shared/utils'; import { Not, Repository } from 'typeorm'; import { v4 } from 'uuid'; @@ -26,6 +27,7 @@ import { LOGIC_FUNCTION_EXECUTED_EVENT } from 'src/engine/core-modules/audit/uti import { ApplicationTokenService } from 'src/engine/core-modules/auth/token/services/application-token.service'; import { BillingUsageService } from 'src/engine/core-modules/billing/services/billing-usage.service'; import { BillingService } from 'src/engine/core-modules/billing/services/billing.service'; +import { FeatureFlagService } from 'src/engine/core-modules/feature-flag/services/feature-flag.service'; import { LogicFunctionDriverFactory } from 'src/engine/core-modules/logic-function/logic-function-drivers/logic-function-driver.factory'; import { buildEnvVar } from 'src/engine/core-modules/logic-function/logic-function-executor/utils/build-env-var'; import { SecretEncryptionService } from 'src/engine/core-modules/secret-encryption/secret-encryption.service'; @@ -37,6 +39,11 @@ import { UsageResourceType } from 'src/engine/core-modules/usage/enums/usage-res import { UsageUnit } from 'src/engine/core-modules/usage/enums/usage-unit.enum'; import { type UsageEvent } from 'src/engine/core-modules/usage/types/usage-event.type'; import { findFlatEntityByIdInFlatEntityMaps } from 'src/engine/metadata-modules/flat-entity/utils/find-flat-entity-by-id-in-flat-entity-maps.util'; +import { LogicFunctionExecutionMode } from 'src/engine/metadata-modules/logic-function/logic-function.entity'; +import { + LogicFunctionException, + LogicFunctionExceptionCode, +} from 'src/engine/metadata-modules/logic-function/logic-function.exception'; import { FlatLogicFunction } from 'src/engine/metadata-modules/logic-function/types/flat-logic-function.type'; import { SubscriptionChannel } from 'src/engine/subscriptions/enums/subscription-channel.enum'; import { SubscriptionService } from 'src/engine/subscriptions/subscription.service'; @@ -76,6 +83,7 @@ export class LogicFunctionExecutorService { private readonly workspaceEventEmitter: WorkspaceEventEmitter, private readonly billingService: BillingService, private readonly billingUsageService: BillingUsageService, + private readonly featureFlagService: FeatureFlagService, @InjectRepository(ApplicationRegistrationVariableEntity) private readonly applicationRegistrationVariableRepository: Repository, ) {} @@ -86,12 +94,14 @@ export class LogicFunctionExecutorService { payload, userId, userWorkspaceId, + executionMode, }: { logicFunctionId: string; workspaceId: string; payload: object; userId?: string; userWorkspaceId?: string; + executionMode?: LogicFunctionExecutionMode; }): Promise { await this.throttleExecution(workspaceId); @@ -111,6 +121,19 @@ export class LogicFunctionExecutorService { const driver = this.logicFunctionDriverFactory.getCurrentDriver(); + const effectiveExecutionMode = await this.resolveEffectiveExecutionMode({ + workspaceId, + flatLogicFunction, + callerOverride: executionMode, + }); + + if (effectiveExecutionMode === LogicFunctionExecutionMode.PREBUILT) { + await this.assertPrebuiltBundleInstalled({ + driver, + flatLogicFunction, + }); + } + let resultLogicFunction: LogicFunctionExecuteResult; try { @@ -121,13 +144,15 @@ export class LogicFunctionExecutorService { payload, env: envVariables, timeoutMs: flatLogicFunction.timeoutSeconds * 1_000, + forceExecutionMode: effectiveExecutionMode, }); } catch (error) { this.logger.error( `Logic function execution failed: ` + `functionId=${logicFunctionId}, ` + `workspaceId=${workspaceId}, ` + - `driver=${driver.constructor.name}: ` + + `driver=${driver.constructor.name}, ` + + `mode=${effectiveExecutionMode}: ` + `${error instanceof Error ? error.message : String(error)}`, error instanceof Error ? error.stack : undefined, ); @@ -144,6 +169,52 @@ export class LogicFunctionExecutorService { return resultLogicFunction; } + private async resolveEffectiveExecutionMode({ + workspaceId, + flatLogicFunction, + callerOverride, + }: { + workspaceId: string; + flatLogicFunction: FlatLogicFunction; + callerOverride?: LogicFunctionExecutionMode; + }): Promise { + if (isDefined(callerOverride)) { + return callerOverride; + } + + const isPrebuiltModeEnabled = + await this.featureFlagService.isFeatureEnabled( + FeatureFlagKey.IS_LOGIC_FUNCTION_PREBUILT_MODE_ENABLED, + workspaceId, + ); + + if (!isPrebuiltModeEnabled) { + return LogicFunctionExecutionMode.LIVE; + } + + return flatLogicFunction.executionMode ?? LogicFunctionExecutionMode.LIVE; + } + + private async assertPrebuiltBundleInstalled({ + driver, + flatLogicFunction, + }: { + driver: ReturnType; + flatLogicFunction: FlatLogicFunction; + }): Promise { + const installedChecksum = + await driver.getInstalledBundleChecksum(flatLogicFunction); + + if (installedChecksum !== flatLogicFunction.checksum) { + throw new LogicFunctionException( + `Prebuilt bundle is not installed for function '${flatLogicFunction.id}' ` + + `(installed=${installedChecksum ?? 'none'}, expected=${flatLogicFunction.checksum ?? 'none'}). ` + + `Rebuild and try again.`, + LogicFunctionExceptionCode.LOGIC_FUNCTION_PREBUILT_BUNDLE_NOT_INSTALLED, + ); + } + } + async transpile( params: LogicFunctionTranspileParams, ): Promise { diff --git a/packages/twenty-server/src/engine/core-modules/logic-function/logic-function.module.ts b/packages/twenty-server/src/engine/core-modules/logic-function/logic-function.module.ts index 5ec3c9fb43..cb4bbb25d3 100644 --- a/packages/twenty-server/src/engine/core-modules/logic-function/logic-function.module.ts +++ b/packages/twenty-server/src/engine/core-modules/logic-function/logic-function.module.ts @@ -1,6 +1,7 @@ import { type DynamicModule, Global, Module } from '@nestjs/common'; import { CacheLockModule } from 'src/engine/core-modules/cache-lock/cache-lock.module'; +import { LOGIC_FUNCTION_DRIVER_FACTORY_TOKEN } from 'src/engine/core-modules/logic-function/logic-function-drivers/constants/logic-function-driver-factory.token'; import { LogicFunctionDriverFactory } from 'src/engine/core-modules/logic-function/logic-function-drivers/logic-function-driver.factory'; import { LogicFunctionResourceModule } from 'src/engine/core-modules/logic-function/logic-function-resource/logic-function-resource.module'; import { LogicFunctionTriggerModule } from 'src/engine/core-modules/logic-function/logic-function-trigger/logic-function-trigger.module'; @@ -24,9 +25,16 @@ export class LogicFunctionModule { SdkClientModule, WorkspaceCacheModule, ], - providers: [LogicFunctionDriverFactory], + providers: [ + LogicFunctionDriverFactory, + { + provide: LOGIC_FUNCTION_DRIVER_FACTORY_TOKEN, + useExisting: LogicFunctionDriverFactory, + }, + ], exports: [ LogicFunctionDriverFactory, + LOGIC_FUNCTION_DRIVER_FACTORY_TOKEN, LogicFunctionResourceModule, LogicFunctionTriggerModule, LogicFunctionExecutorModule, diff --git a/packages/twenty-server/src/engine/metadata-modules/flat-entity/constant/__tests__/__snapshots__/all-universal-flat-entity-properties-to-compare-and-stringify.constant.spec.ts.snap b/packages/twenty-server/src/engine/metadata-modules/flat-entity/constant/__tests__/__snapshots__/all-universal-flat-entity-properties-to-compare-and-stringify.constant.spec.ts.snap index 89be729f4e..7fd9d451bb 100644 --- a/packages/twenty-server/src/engine/metadata-modules/flat-entity/constant/__tests__/__snapshots__/all-universal-flat-entity-properties-to-compare-and-stringify.constant.spec.ts.snap +++ b/packages/twenty-server/src/engine/metadata-modules/flat-entity/constant/__tests__/__snapshots__/all-universal-flat-entity-properties-to-compare-and-stringify.constant.spec.ts.snap @@ -123,6 +123,7 @@ exports[`ALL_UNIVERSAL_FLAT_ENTITY_PROPERTIES_TO_COMPARE_AND_STRINGIFY should ma "sourceHandlerPath", "handlerName", "isBuildUpToDate", + "executionMode", "deletedAt", "cronTriggerSettings", "databaseEventTriggerSettings", diff --git a/packages/twenty-server/src/engine/metadata-modules/flat-entity/constant/all-entity-properties-configuration-by-metadata-name.constant.ts b/packages/twenty-server/src/engine/metadata-modules/flat-entity/constant/all-entity-properties-configuration-by-metadata-name.constant.ts index af1aca2508..2b2d707bfb 100644 --- a/packages/twenty-server/src/engine/metadata-modules/flat-entity/constant/all-entity-properties-configuration-by-metadata-name.constant.ts +++ b/packages/twenty-server/src/engine/metadata-modules/flat-entity/constant/all-entity-properties-configuration-by-metadata-name.constant.ts @@ -587,6 +587,11 @@ export const ALL_ENTITY_PROPERTIES_CONFIGURATION_BY_METADATA_NAME = { toStringify: false, universalProperty: undefined, }, + executionMode: { + toCompare: true, + toStringify: false, + universalProperty: undefined, + }, deletedAt: { toCompare: true, toStringify: false, diff --git a/packages/twenty-server/src/engine/metadata-modules/logic-function/dtos/logic-function.dto.ts b/packages/twenty-server/src/engine/metadata-modules/logic-function/dtos/logic-function.dto.ts index e851ce7419..1c618a668d 100644 --- a/packages/twenty-server/src/engine/metadata-modules/logic-function/dtos/logic-function.dto.ts +++ b/packages/twenty-server/src/engine/metadata-modules/logic-function/dtos/logic-function.dto.ts @@ -1,4 +1,9 @@ -import { Field, HideField, ObjectType } from '@nestjs/graphql'; +import { + Field, + HideField, + ObjectType, + registerEnumType, +} from '@nestjs/graphql'; import { Authorize, @@ -7,6 +12,7 @@ import { } from '@ptc-org/nestjs-query-graphql'; import { IsDateString, + IsEnum, IsNotEmpty, IsNumber, IsObject, @@ -24,6 +30,11 @@ import { } from 'twenty-shared/application'; import { UUIDScalarType } from 'src/engine/api/graphql/workspace-schema-builder/graphql-types/scalars'; +import { LogicFunctionExecutionMode } from 'src/engine/metadata-modules/logic-function/logic-function.entity'; + +registerEnumType(LogicFunctionExecutionMode, { + name: 'LogicFunctionExecutionMode', +}); @ObjectType('LogicFunction') @Authorize({ @@ -59,6 +70,10 @@ export class LogicFunctionDTO { @Field() timeoutSeconds: number; + @IsEnum(LogicFunctionExecutionMode) + @Field(() => LogicFunctionExecutionMode) + executionMode: LogicFunctionExecutionMode; + @IsString() @Field() sourceHandlerPath: string; diff --git a/packages/twenty-server/src/engine/metadata-modules/logic-function/logic-function.entity.ts b/packages/twenty-server/src/engine/metadata-modules/logic-function/logic-function.entity.ts index c199863820..26e25ea5bd 100644 --- a/packages/twenty-server/src/engine/metadata-modules/logic-function/logic-function.entity.ts +++ b/packages/twenty-server/src/engine/metadata-modules/logic-function/logic-function.entity.ts @@ -26,6 +26,11 @@ export enum LogicFunctionRuntime { NODE22 = 'nodejs22.x', } +export enum LogicFunctionExecutionMode { + LIVE = 'LIVE', + PREBUILT = 'PREBUILT', +} + @Entity('logicFunction') @Index('IDX_LOGIC_FUNCTION_ID_DELETED_AT', ['id', 'deletedAt']) export class LogicFunctionEntity @@ -63,6 +68,14 @@ export class LogicFunctionEntity @Column({ nullable: false, type: 'boolean', default: true }) isBuildUpToDate: boolean; + @Column({ + type: 'enum', + enum: LogicFunctionExecutionMode, + default: LogicFunctionExecutionMode.LIVE, + nullable: false, + }) + executionMode: LogicFunctionExecutionMode; + @Column({ nullable: true, type: 'jsonb' }) cronTriggerSettings: JsonbProperty | null; diff --git a/packages/twenty-server/src/engine/metadata-modules/logic-function/logic-function.exception.ts b/packages/twenty-server/src/engine/metadata-modules/logic-function/logic-function.exception.ts index ab16047553..11ac2ca633 100644 --- a/packages/twenty-server/src/engine/metadata-modules/logic-function/logic-function.exception.ts +++ b/packages/twenty-server/src/engine/metadata-modules/logic-function/logic-function.exception.ts @@ -19,6 +19,7 @@ export enum LogicFunctionExceptionCode { LOGIC_FUNCTION_DISABLED = 'LOGIC_FUNCTION_DISABLED', LOGIC_FUNCTION_INVALID_SEED_PROJECT = 'LOGIC_FUNCTION_INVALID_SEED_PROJECT', INVALID_LOGIC_FUNCTION_INPUT = 'INVALID_LOGIC_FUNCTION_INPUT', + LOGIC_FUNCTION_PREBUILT_BUNDLE_NOT_INSTALLED = 'LOGIC_FUNCTION_PREBUILT_BUNDLE_NOT_INSTALLED', } const getLogicFunctionExceptionUserFriendlyMessage = ( @@ -53,6 +54,8 @@ const getLogicFunctionExceptionUserFriendlyMessage = ( return msg`Invalid seed project configuration.`; case LogicFunctionExceptionCode.INVALID_LOGIC_FUNCTION_INPUT: return msg`Invalid logic function input.`; + case LogicFunctionExceptionCode.LOGIC_FUNCTION_PREBUILT_BUNDLE_NOT_INSTALLED: + return msg`Prebuilt bundle is not installed on the function. Rebuild and try again.`; default: assertUnreachable(code); } diff --git a/packages/twenty-server/src/engine/metadata-modules/logic-function/logic-function.module.ts b/packages/twenty-server/src/engine/metadata-modules/logic-function/logic-function.module.ts index f52746eb4a..9717b38ef5 100644 --- a/packages/twenty-server/src/engine/metadata-modules/logic-function/logic-function.module.ts +++ b/packages/twenty-server/src/engine/metadata-modules/logic-function/logic-function.module.ts @@ -46,6 +46,9 @@ import { WorkspaceMigrationModule } from 'src/engine/workspace-manager/workspace LogicFunctionResolver, WorkspaceFlatLogicFunctionMapCacheService, ], - exports: [LogicFunctionFromSourceService], + exports: [ + LogicFunctionFromSourceService, + LogicFunctionFromSourceHelperService, + ], }) export class LogicFunctionModule {} diff --git a/packages/twenty-server/src/engine/metadata-modules/logic-function/services/logic-function-from-source.service.ts b/packages/twenty-server/src/engine/metadata-modules/logic-function/services/logic-function-from-source.service.ts index 92e4f0269a..6e1f0122bd 100644 --- a/packages/twenty-server/src/engine/metadata-modules/logic-function/services/logic-function-from-source.service.ts +++ b/packages/twenty-server/src/engine/metadata-modules/logic-function/services/logic-function-from-source.service.ts @@ -14,6 +14,7 @@ import { findFlatEntityByIdInFlatEntityMapsOrThrow } from 'src/engine/metadata-m import { CreateLogicFunctionFromSourceInput } from 'src/engine/metadata-modules/logic-function/dtos/create-logic-function-from-source.input'; import { LogicFunctionExecutionResultDTO } from 'src/engine/metadata-modules/logic-function/dtos/logic-function-execution-result.dto'; import { LogicFunctionDTO } from 'src/engine/metadata-modules/logic-function/dtos/logic-function.dto'; +import { LogicFunctionExecutionMode } from 'src/engine/metadata-modules/logic-function/logic-function.entity'; import { LogicFunctionException, LogicFunctionExceptionCode, @@ -169,6 +170,7 @@ export class LogicFunctionFromSourceService { timeoutSeconds: existingLogicFunction.timeoutSeconds, isBuildUpToDate: existingLogicFunction.isBuildUpToDate, checksum: existingLogicFunction.checksum, + executionMode: LogicFunctionExecutionMode.LIVE, handlerName: existingLogicFunction.handlerName, sourceHandlerPath: toSourceHandlerPath, builtHandlerPath: toBuiltHandlerPath, @@ -365,6 +367,7 @@ export class LogicFunctionFromSourceService { logicFunctionId: id, workspaceId, payload, + executionMode: LogicFunctionExecutionMode.LIVE, }); return { diff --git a/packages/twenty-server/src/engine/metadata-modules/logic-function/utils/build-universal-flat-logic-function-to-create.util.ts b/packages/twenty-server/src/engine/metadata-modules/logic-function/utils/build-universal-flat-logic-function-to-create.util.ts index af7f5ec62d..571c7fd2f5 100644 --- a/packages/twenty-server/src/engine/metadata-modules/logic-function/utils/build-universal-flat-logic-function-to-create.util.ts +++ b/packages/twenty-server/src/engine/metadata-modules/logic-function/utils/build-universal-flat-logic-function-to-create.util.ts @@ -1,6 +1,9 @@ import { v4 } from 'uuid'; -import { LogicFunctionRuntime } from 'src/engine/metadata-modules/logic-function/logic-function.entity'; +import { + LogicFunctionExecutionMode, + LogicFunctionRuntime, +} from 'src/engine/metadata-modules/logic-function/logic-function.entity'; import { type UniversalFlatLogicFunction } from 'src/engine/workspace-manager/workspace-migration/universal-flat-entity/types/universal-flat-logic-function.type'; type AutoGeneratedFields = 'createdAt' | 'updatedAt' | 'deletedAt' | 'runtime'; @@ -40,6 +43,7 @@ export const buildUniversalFlatLogicFunctionToCreate = ( timeoutSeconds: input.timeoutSeconds ?? 300, checksum: input.checksum ?? null, isBuildUpToDate: input.isBuildUpToDate, + executionMode: input.executionMode ?? LogicFunctionExecutionMode.LIVE, handlerName: input.handlerName, sourceHandlerPath: input.sourceHandlerPath, builtHandlerPath: input.builtHandlerPath, diff --git a/packages/twenty-server/src/engine/metadata-modules/logic-function/utils/from-create-logic-function-from-source-input-to-universal-flat-logic-function-to-create.util.ts b/packages/twenty-server/src/engine/metadata-modules/logic-function/utils/from-create-logic-function-from-source-input-to-universal-flat-logic-function-to-create.util.ts index fe2ba7eb26..d0d6b1a6aa 100644 --- a/packages/twenty-server/src/engine/metadata-modules/logic-function/utils/from-create-logic-function-from-source-input-to-universal-flat-logic-function-to-create.util.ts +++ b/packages/twenty-server/src/engine/metadata-modules/logic-function/utils/from-create-logic-function-from-source-input-to-universal-flat-logic-function-to-create.util.ts @@ -1,7 +1,10 @@ import { trimAndRemoveDuplicatedWhitespacesFromObjectStringProperties } from 'twenty-shared/utils'; import { v4 } from 'uuid'; -import { LogicFunctionRuntime } from 'src/engine/metadata-modules/logic-function/logic-function.entity'; +import { + LogicFunctionExecutionMode, + LogicFunctionRuntime, +} from 'src/engine/metadata-modules/logic-function/logic-function.entity'; import { type CreateLogicFunctionFromSourceInput } from 'src/engine/metadata-modules/logic-function/dtos/create-logic-function-from-source.input'; import { type UniversalFlatLogicFunction } from 'src/engine/workspace-manager/workspace-migration/universal-flat-entity/types/universal-flat-logic-function.type'; @@ -43,6 +46,7 @@ export const fromCreateLogicFunctionFromSourceInputToUniversalFlatLogicFunctionT timeoutSeconds: createLogicFunctionFromSourceInput.timeoutSeconds ?? 300, checksum, isBuildUpToDate, + executionMode: LogicFunctionExecutionMode.LIVE, handlerName, sourceHandlerPath, builtHandlerPath, diff --git a/packages/twenty-server/src/engine/metadata-modules/logic-function/utils/from-flat-logic-function-to-logic-function-dto.util.ts b/packages/twenty-server/src/engine/metadata-modules/logic-function/utils/from-flat-logic-function-to-logic-function-dto.util.ts index f02cde29e0..e8fdbe3dee 100644 --- a/packages/twenty-server/src/engine/metadata-modules/logic-function/utils/from-flat-logic-function-to-logic-function-dto.util.ts +++ b/packages/twenty-server/src/engine/metadata-modules/logic-function/utils/from-flat-logic-function-to-logic-function-dto.util.ts @@ -13,6 +13,7 @@ export const fromFlatLogicFunctionToLogicFunctionDto = ({ description: flatLogicFunction.description ?? undefined, runtime: flatLogicFunction.runtime, timeoutSeconds: flatLogicFunction.timeoutSeconds, + executionMode: flatLogicFunction.executionMode, sourceHandlerPath: flatLogicFunction.sourceHandlerPath, handlerName: flatLogicFunction.handlerName, applicationId: flatLogicFunction.applicationId ?? undefined, diff --git a/packages/twenty-server/src/engine/metadata-modules/logic-function/utils/is-logic-function-ready-for-prebuilt-install.util.ts b/packages/twenty-server/src/engine/metadata-modules/logic-function/utils/is-logic-function-ready-for-prebuilt-install.util.ts new file mode 100644 index 0000000000..add7b0cdcc --- /dev/null +++ b/packages/twenty-server/src/engine/metadata-modules/logic-function/utils/is-logic-function-ready-for-prebuilt-install.util.ts @@ -0,0 +1,16 @@ +import { isNonEmptyString } from '@sniptt/guards'; + +import { LogicFunctionExecutionMode } from 'src/engine/metadata-modules/logic-function/logic-function.entity'; +import { type FlatLogicFunction } from 'src/engine/metadata-modules/logic-function/types/flat-logic-function.type'; + +export type LogicFunctionPrebuiltStateFields = Pick< + FlatLogicFunction, + 'executionMode' | 'isBuildUpToDate' | 'checksum' +>; + +export const isLogicFunctionReadyForPrebuiltInstall = ( + flatLogicFunction: LogicFunctionPrebuiltStateFields, +): boolean => + flatLogicFunction.executionMode === LogicFunctionExecutionMode.PREBUILT && + flatLogicFunction.isBuildUpToDate === true && + isNonEmptyString(flatLogicFunction.checksum); diff --git a/packages/twenty-server/src/engine/metadata-modules/logic-function/utils/logic-function-graphql-api-exception-handler.utils.ts b/packages/twenty-server/src/engine/metadata-modules/logic-function/utils/logic-function-graphql-api-exception-handler.utils.ts index 15a8209b45..8a193d8ec0 100644 --- a/packages/twenty-server/src/engine/metadata-modules/logic-function/utils/logic-function-graphql-api-exception-handler.utils.ts +++ b/packages/twenty-server/src/engine/metadata-modules/logic-function/utils/logic-function-graphql-api-exception-handler.utils.ts @@ -36,6 +36,7 @@ export const logicFunctionGraphQLApiExceptionHandler = (error: any) => { case LogicFunctionExceptionCode.INVALID_LOGIC_FUNCTION_INPUT: throw new UserInputError(error); case LogicFunctionExceptionCode.LOGIC_FUNCTION_DISABLED: + case LogicFunctionExceptionCode.LOGIC_FUNCTION_PREBUILT_BUNDLE_NOT_INSTALLED: throw new ForbiddenError(error); default: { return assertUnreachable(error.code); diff --git a/packages/twenty-server/src/engine/metadata-modules/logic-function/utils/should-reinstall-logic-function-prebuilt-bundle.util.ts b/packages/twenty-server/src/engine/metadata-modules/logic-function/utils/should-reinstall-logic-function-prebuilt-bundle.util.ts new file mode 100644 index 0000000000..bb048bea6b --- /dev/null +++ b/packages/twenty-server/src/engine/metadata-modules/logic-function/utils/should-reinstall-logic-function-prebuilt-bundle.util.ts @@ -0,0 +1,27 @@ +import { LogicFunctionExecutionMode } from 'src/engine/metadata-modules/logic-function/logic-function.entity'; +import { + isLogicFunctionReadyForPrebuiltInstall, + type LogicFunctionPrebuiltStateFields, +} from 'src/engine/metadata-modules/logic-function/utils/is-logic-function-ready-for-prebuilt-install.util'; + +export const shouldReinstallLogicFunctionPrebuiltBundle = ({ + existingLogicFunction, + newLogicFunction, +}: { + existingLogicFunction: LogicFunctionPrebuiltStateFields; + newLogicFunction: LogicFunctionPrebuiltStateFields; +}): boolean => { + if (!isLogicFunctionReadyForPrebuiltInstall(newLogicFunction)) { + return false; + } + + if ( + existingLogicFunction.executionMode === + LogicFunctionExecutionMode.PREBUILT && + existingLogicFunction.checksum === newLogicFunction.checksum + ) { + return false; + } + + return true; +}; diff --git a/packages/twenty-server/src/engine/twenty-orm/entity-manager/workspace-entity-manager.spec.ts b/packages/twenty-server/src/engine/twenty-orm/entity-manager/workspace-entity-manager.spec.ts index 1e5e293499..fc3da96b4e 100644 --- a/packages/twenty-server/src/engine/twenty-orm/entity-manager/workspace-entity-manager.spec.ts +++ b/packages/twenty-server/src/engine/twenty-orm/entity-manager/workspace-entity-manager.spec.ts @@ -237,6 +237,7 @@ describe('WorkspaceEntityManager', () => { IS_EMAIL_GROUP_ENABLED: false, IS_JUNCTION_RELATIONS_ENABLED: false, IS_REST_METADATA_API_NEW_FORMAT_DIRECT: false, + IS_LOGIC_FUNCTION_PREBUILT_MODE_ENABLED: false, IS_SETTINGS_DISCOVERY_HERO_ENABLED: false, }, userWorkspaceRoleMap: {}, diff --git a/packages/twenty-server/src/engine/workspace-manager/workspace-migration/workspace-migration-builder/validators/services/flat-logic-function-validator.service.ts b/packages/twenty-server/src/engine/workspace-manager/workspace-migration/workspace-migration-builder/validators/services/flat-logic-function-validator.service.ts index e91cf0a955..f1e8a1c534 100644 --- a/packages/twenty-server/src/engine/workspace-manager/workspace-migration/workspace-migration-builder/validators/services/flat-logic-function-validator.service.ts +++ b/packages/twenty-server/src/engine/workspace-manager/workspace-migration/workspace-migration-builder/validators/services/flat-logic-function-validator.service.ts @@ -7,7 +7,9 @@ import { isDefined } from 'twenty-shared/utils'; import { validateFilePath } from 'src/engine/core-modules/file-storage/utils/validate-file-path.util'; import { findFlatEntityByUniversalIdentifier } from 'src/engine/metadata-modules/flat-entity/utils/find-flat-entity-by-universal-identifier.util'; +import { LogicFunctionExecutionMode } from 'src/engine/metadata-modules/logic-function/logic-function.entity'; import { LogicFunctionExceptionCode } from 'src/engine/metadata-modules/logic-function/logic-function.exception'; +import { isLogicFunctionReadyForPrebuiltInstall } from 'src/engine/metadata-modules/logic-function/utils/is-logic-function-ready-for-prebuilt-install.util'; import { type FailedFlatEntityValidation } from 'src/engine/workspace-manager/workspace-migration/workspace-migration-builder/builders/types/failed-flat-entity-validation.type'; import { getEmptyFlatEntityValidationError } from 'src/engine/workspace-manager/workspace-migration/workspace-migration-builder/builders/utils/get-flat-entity-validation-error.util'; import { type FlatEntityUpdateValidationArgs } from 'src/engine/workspace-manager/workspace-migration/workspace-migration-builder/types/universal-flat-entity-update-validation-args.type'; @@ -79,6 +81,31 @@ export class FlatLogicFunctionValidatorService { } } + const mergedPrebuiltState = { + executionMode: + flatEntityUpdate.executionMode ?? + existingFlatLogicFunction.executionMode, + isBuildUpToDate: + flatEntityUpdate.isBuildUpToDate ?? + existingFlatLogicFunction.isBuildUpToDate, + checksum: + flatEntityUpdate.checksum !== undefined + ? flatEntityUpdate.checksum + : existingFlatLogicFunction.checksum, + }; + + if ( + mergedPrebuiltState.executionMode === + LogicFunctionExecutionMode.PREBUILT && + !isLogicFunctionReadyForPrebuiltInstall(mergedPrebuiltState) + ) { + validationResult.errors.push({ + code: LogicFunctionExceptionCode.INVALID_LOGIC_FUNCTION_INPUT, + message: t`Logic function cannot be in PREBUILT mode without a fresh build and a checksum`, + userFriendlyMessage: msg`Logic function cannot be in PREBUILT mode without a fresh build and a checksum`, + }); + } + return validationResult; } @@ -175,6 +202,18 @@ export class FlatLogicFunctionValidatorService { } } + if ( + flatLogicFunctionToValidate.executionMode === + LogicFunctionExecutionMode.PREBUILT && + !isLogicFunctionReadyForPrebuiltInstall(flatLogicFunctionToValidate) + ) { + validationResult.errors.push({ + code: LogicFunctionExceptionCode.INVALID_LOGIC_FUNCTION_INPUT, + message: t`Logic function cannot be in PREBUILT mode without a fresh build and a checksum`, + userFriendlyMessage: msg`Logic function cannot be in PREBUILT mode without a fresh build and a checksum`, + }); + } + return validationResult; } } diff --git a/packages/twenty-server/src/engine/workspace-manager/workspace-migration/workspace-migration-runner/action-handlers/logic-function/services/create-logic-function-action-handler.service.ts b/packages/twenty-server/src/engine/workspace-manager/workspace-migration/workspace-migration-runner/action-handlers/logic-function/services/create-logic-function-action-handler.service.ts index d41a28ecd4..8aa6fa55d3 100644 --- a/packages/twenty-server/src/engine/workspace-manager/workspace-migration/workspace-migration-runner/action-handlers/logic-function/services/create-logic-function-action-handler.service.ts +++ b/packages/twenty-server/src/engine/workspace-manager/workspace-migration/workspace-migration-runner/action-handlers/logic-function/services/create-logic-function-action-handler.service.ts @@ -1,9 +1,13 @@ -import { Injectable } from '@nestjs/common'; +import { Inject, Injectable } from '@nestjs/common'; import { v4 } from 'uuid'; import { WorkspaceMigrationRunnerActionHandler } from 'src/engine/workspace-manager/workspace-migration/workspace-migration-runner/interfaces/workspace-migration-runner-action-handler-service.interface'; +import { LOGIC_FUNCTION_DRIVER_FACTORY_TOKEN } from 'src/engine/core-modules/logic-function/logic-function-drivers/constants/logic-function-driver-factory.token'; +import { isLogicFunctionReadyForPrebuiltInstall } from 'src/engine/metadata-modules/logic-function/utils/is-logic-function-ready-for-prebuilt-install.util'; + +import type { LogicFunctionDriverFactory } from 'src/engine/core-modules/logic-function/logic-function-drivers/logic-function-driver.factory'; import { getUniversalFlatEntityEmptyForeignKeyAggregators } from 'src/engine/workspace-manager/workspace-migration/universal-flat-entity/utils/reset-universal-flat-entity-foreign-key-aggregators.util'; import { FlatCreateLogicFunctionAction, @@ -19,6 +23,13 @@ export class CreateLogicFunctionActionHandlerService extends WorkspaceMigrationR 'create', 'logicFunction', ) { + constructor( + @Inject(LOGIC_FUNCTION_DRIVER_FACTORY_TOKEN) + private readonly logicFunctionDriverFactory: LogicFunctionDriverFactory, + ) { + super(); + } + override async transpileUniversalActionToFlatAction({ action, flatApplication, @@ -44,13 +55,42 @@ export class CreateLogicFunctionActionHandlerService extends WorkspaceMigrationR async executeForMetadata( context: WorkspaceMigrationActionRunnerContext, ): Promise { - const { flatAction, queryRunner } = context; + const { flatAction, queryRunner, flatApplication } = context; const { flatEntity: logicFunction } = flatAction; await this.insertFlatEntitiesInRepository({ queryRunner, flatEntities: [logicFunction], }); + + if (isLogicFunctionReadyForPrebuiltInstall(logicFunction)) { + const driver = this.logicFunctionDriverFactory.getCurrentDriver(); + + const installStart = Date.now(); + + try { + await driver.installPrebuiltBundle({ + flatLogicFunction: logicFunction, + flatApplication, + applicationUniversalIdentifier: flatApplication.universalIdentifier, + }); + + this.logger.log( + `[lambda-timing] event=install_prebuilt fnId=${logicFunction.id} ` + + `reason=app_install install_duration_ms=${Date.now() - installStart}`, + CreateLogicFunctionActionHandlerService.name, + ); + } catch (error) { + this.logger.error( + `Failed to install prebuilt bundle on app-install for function ${logicFunction.id} ` + + `after ${Date.now() - installStart}ms: ` + + `${error instanceof Error ? error.message : String(error)}`, + CreateLogicFunctionActionHandlerService.name, + error instanceof Error ? error.stack : undefined, + ); + throw error; + } + } } async rollbackForMetadata( diff --git a/packages/twenty-server/src/engine/workspace-manager/workspace-migration/workspace-migration-runner/action-handlers/logic-function/services/update-logic-function-action-handler.service.ts b/packages/twenty-server/src/engine/workspace-manager/workspace-migration/workspace-migration-runner/action-handlers/logic-function/services/update-logic-function-action-handler.service.ts index 25ced4363a..0f5a9bf03d 100644 --- a/packages/twenty-server/src/engine/workspace-manager/workspace-migration/workspace-migration-runner/action-handlers/logic-function/services/update-logic-function-action-handler.service.ts +++ b/packages/twenty-server/src/engine/workspace-manager/workspace-migration/workspace-migration-runner/action-handlers/logic-function/services/update-logic-function-action-handler.service.ts @@ -1,4 +1,4 @@ -import { Injectable } from '@nestjs/common'; +import { Inject, Injectable } from '@nestjs/common'; import { FileFolder } from 'twenty-shared/types'; import { isDefined } from 'twenty-shared/utils'; @@ -6,9 +6,17 @@ import { isDefined } from 'twenty-shared/utils'; import { WorkspaceMigrationRunnerActionHandler } from 'src/engine/workspace-manager/workspace-migration/workspace-migration-runner/interfaces/workspace-migration-runner-action-handler-service.interface'; import { FileStorageService } from 'src/engine/core-modules/file-storage/file-storage.service'; +import { LOGIC_FUNCTION_DRIVER_FACTORY_TOKEN } from 'src/engine/core-modules/logic-function/logic-function-drivers/constants/logic-function-driver-factory.token'; import { findFlatEntityByIdInFlatEntityMapsOrThrow } from 'src/engine/metadata-modules/flat-entity/utils/find-flat-entity-by-id-in-flat-entity-maps-or-throw.util'; + +import type { LogicFunctionDriverFactory } from 'src/engine/core-modules/logic-function/logic-function-drivers/logic-function-driver.factory'; import { findFlatEntityByUniversalIdentifierOrThrow } from 'src/engine/metadata-modules/flat-entity/utils/find-flat-entity-by-universal-identifier-or-throw.util'; -import { LogicFunctionEntity } from 'src/engine/metadata-modules/logic-function/logic-function.entity'; +import { + LogicFunctionEntity, + LogicFunctionExecutionMode, +} from 'src/engine/metadata-modules/logic-function/logic-function.entity'; +import { type FlatLogicFunction } from 'src/engine/metadata-modules/logic-function/types/flat-logic-function.type'; +import { shouldReinstallLogicFunctionPrebuiltBundle } from 'src/engine/metadata-modules/logic-function/utils/should-reinstall-logic-function-prebuilt-bundle.util'; import { resolveUniversalUpdateRelationIdentifiersToIds } from 'src/engine/workspace-manager/workspace-migration/universal-flat-entity/utils/resolve-universal-update-relation-identifiers-to-ids.util'; import { FlatUpdateLogicFunctionAction, @@ -24,7 +32,11 @@ export class UpdateLogicFunctionActionHandlerService extends WorkspaceMigrationR 'update', 'logicFunction', ) { - constructor(private readonly fileStorageService: FileStorageService) { + constructor( + private readonly fileStorageService: FileStorageService, + @Inject(LOGIC_FUNCTION_DRIVER_FACTORY_TOKEN) + private readonly logicFunctionDriverFactory: LogicFunctionDriverFactory, + ) { super(); } @@ -64,10 +76,11 @@ export class UpdateLogicFunctionActionHandlerService extends WorkspaceMigrationR } = context; const { entityId, update } = flatAction; - const existingLogicFunction = findFlatEntityByIdInFlatEntityMapsOrThrow({ - flatEntityMaps: allFlatEntityMaps.flatLogicFunctionMaps, - flatEntityId: entityId, - }); + const existingLogicFunction = + findFlatEntityByIdInFlatEntityMapsOrThrow({ + flatEntityMaps: allFlatEntityMaps.flatLogicFunctionMaps, + flatEntityId: entityId, + }); const applicationUniversalIdentifier = flatApplication.universalIdentifier; @@ -85,6 +98,13 @@ export class UpdateLogicFunctionActionHandlerService extends WorkspaceMigrationR update as Parameters[1], ); + await this.installPrebuiltBundleIfNeeded({ + existingLogicFunction, + update, + applicationUniversalIdentifier, + context, + }); + if (builtPathChanged) { await this.fileStorageService.deleteFile({ workspaceId, @@ -94,4 +114,71 @@ export class UpdateLogicFunctionActionHandlerService extends WorkspaceMigrationR }); } } + + private async installPrebuiltBundleIfNeeded({ + existingLogicFunction, + update, + applicationUniversalIdentifier, + context, + }: { + existingLogicFunction: FlatLogicFunction; + update: FlatUpdateLogicFunctionAction['update']; + applicationUniversalIdentifier: string; + context: WorkspaceMigrationActionRunnerContext; + }): Promise { + const newLogicFunction: FlatLogicFunction = { + ...existingLogicFunction, + ...update, + executionMode: + update.executionMode ?? existingLogicFunction.executionMode, + isBuildUpToDate: + update.isBuildUpToDate ?? existingLogicFunction.isBuildUpToDate, + checksum: update.checksum ?? existingLogicFunction.checksum, + }; + + if ( + !shouldReinstallLogicFunctionPrebuiltBundle({ + existingLogicFunction, + newLogicFunction, + }) + ) { + return; + } + + const becamePrebuilt = + existingLogicFunction.executionMode !== + LogicFunctionExecutionMode.PREBUILT; + + const driver = this.logicFunctionDriverFactory.getCurrentDriver(); + + const installStart = Date.now(); + + try { + await driver.installPrebuiltBundle({ + flatLogicFunction: { + ...newLogicFunction, + executionMode: LogicFunctionExecutionMode.PREBUILT, + isBuildUpToDate: true, + }, + flatApplication: context.flatApplication, + applicationUniversalIdentifier, + }); + + this.logger.log( + `[lambda-timing] event=install_prebuilt fnId=${existingLogicFunction.id} ` + + `reason=${becamePrebuilt ? 'mode_flip' : 'checksum_change'} ` + + `install_duration_ms=${Date.now() - installStart}`, + UpdateLogicFunctionActionHandlerService.name, + ); + } catch (error) { + this.logger.error( + `Failed to install prebuilt bundle for function ${existingLogicFunction.id} ` + + `after ${Date.now() - installStart}ms: ` + + `${error instanceof Error ? error.message : String(error)}`, + UpdateLogicFunctionActionHandlerService.name, + error instanceof Error ? error.stack : undefined, + ); + throw error; + } + } } diff --git a/packages/twenty-server/src/modules/workflow/workflow-builder/workflow-version-step/code-step/code-step-build.module.ts b/packages/twenty-server/src/modules/workflow/workflow-builder/workflow-version-step/code-step/code-step-build.module.ts index 0498d45953..0e403113a8 100644 --- a/packages/twenty-server/src/modules/workflow/workflow-builder/workflow-version-step/code-step/code-step-build.module.ts +++ b/packages/twenty-server/src/modules/workflow/workflow-builder/workflow-version-step/code-step/code-step-build.module.ts @@ -1,6 +1,7 @@ import { Module } from '@nestjs/common'; import { ApplicationModule } from 'src/engine/core-modules/application/application.module'; +import { FeatureFlagModule } from 'src/engine/core-modules/feature-flag/feature-flag.module'; import { WorkspaceManyOrAllFlatEntityMapsCacheModule } from 'src/engine/metadata-modules/flat-entity/services/workspace-many-or-all-flat-entity-maps-cache.module'; import { LogicFunctionModule } from 'src/engine/metadata-modules/logic-function/logic-function.module'; @@ -11,6 +12,7 @@ import { CodeStepBuildService } from './services/code-step-build.service'; ApplicationModule, WorkspaceManyOrAllFlatEntityMapsCacheModule, LogicFunctionModule, + FeatureFlagModule, ], providers: [CodeStepBuildService], exports: [CodeStepBuildService], diff --git a/packages/twenty-server/src/modules/workflow/workflow-builder/workflow-version-step/code-step/services/code-step-build.service.ts b/packages/twenty-server/src/modules/workflow/workflow-builder/workflow-version-step/code-step/services/code-step-build.service.ts index f7ac89fc3e..c168ca8a08 100644 --- a/packages/twenty-server/src/modules/workflow/workflow-builder/workflow-version-step/code-step/services/code-step-build.service.ts +++ b/packages/twenty-server/src/modules/workflow/workflow-builder/workflow-version-step/code-step/services/code-step-build.service.ts @@ -1,21 +1,31 @@ -import { Injectable } from '@nestjs/common'; +import { Injectable, Logger } from '@nestjs/common'; import { SEED_WORKFLOW_ACTION_TRIGGER_SETTINGS } from 'twenty-shared/logic-function'; +import { FeatureFlagKey } from 'twenty-shared/types'; import { isDefined } from 'twenty-shared/utils'; +import { FeatureFlagService } from 'src/engine/core-modules/feature-flag/services/feature-flag.service'; import { WorkspaceManyOrAllFlatEntityMapsCacheService } from 'src/engine/metadata-modules/flat-entity/services/workspace-many-or-all-flat-entity-maps-cache.service'; import { findFlatEntityByIdInFlatEntityMaps } from 'src/engine/metadata-modules/flat-entity/utils/find-flat-entity-by-id-in-flat-entity-maps.util'; +import { LogicFunctionExecutionMode } from 'src/engine/metadata-modules/logic-function/logic-function.entity'; +import { LogicFunctionFromSourceHelperService } from 'src/engine/metadata-modules/logic-function/services/logic-function-from-source-helper.service'; import { LogicFunctionFromSourceService } from 'src/engine/metadata-modules/logic-function/services/logic-function-from-source.service'; +import { extractCodeStepLogicFunctionIdsFromWorkflowSteps } from 'src/modules/workflow/workflow-builder/workflow-version-step/code-step/utils/extract-code-step-logic-function-ids-from-workflow-steps.util'; +import { type WorkflowAction } from 'src/modules/workflow/workflow-executor/workflow-actions/types/workflow-action.type'; import { - WorkflowActionType, - type WorkflowAction, -} from 'src/modules/workflow/workflow-executor/workflow-actions/types/workflow-action.type'; + WorkflowTriggerException, + WorkflowTriggerExceptionCode, +} from 'src/modules/workflow/workflow-trigger/exceptions/workflow-trigger.exception'; @Injectable() export class CodeStepBuildService { + private readonly logger = new Logger(CodeStepBuildService.name); + constructor( private readonly workspaceManyOrAllFlatEntityMapsCacheService: WorkspaceManyOrAllFlatEntityMapsCacheService, private readonly logicFunctionFromSourceService: LogicFunctionFromSourceService, + private readonly logicFunctionFromSourceHelperService: LogicFunctionFromSourceHelperService, + private readonly featureFlagService: FeatureFlagService, ) {} async createCodeStepLogicFunction({ @@ -56,21 +66,10 @@ export class CodeStepBuildService { workspaceId: string; steps: WorkflowAction[]; }): Promise { - const codeSteps = steps.filter( - ( - step, - ): step is WorkflowAction & { - type: typeof WorkflowActionType.CODE; - settings: { input: { logicFunctionId: string } }; - } => - step.type === WorkflowActionType.CODE && - isDefined( - (step.settings?.input as { logicFunctionId?: string }) - ?.logicFunctionId, - ), - ); + const logicFunctionIds = + extractCodeStepLogicFunctionIdsFromWorkflowSteps(steps); - if (codeSteps.length === 0) { + if (logicFunctionIds.length === 0) { return; } @@ -82,8 +81,7 @@ export class CodeStepBuildService { }, ); - for (const step of codeSteps) { - const logicFunctionId = step.settings.input.logicFunctionId; + for (const logicFunctionId of logicFunctionIds) { const flatLogicFunction = findFlatEntityByIdInFlatEntityMaps({ flatEntityId: logicFunctionId, flatEntityMaps: flatLogicFunctionMaps, @@ -105,6 +103,11 @@ export class CodeStepBuildService { : undefined; if (!isDefined(applicationUniversalIdentifier)) { + this.logger.warn( + `Skipping build for logic function '${logicFunctionId}' (workspace=${workspaceId}): ` + + `applicationId=${flatLogicFunction.applicationId ?? 'null'} did not resolve to an application. ` + + `The function will not be rebuilt and may stay out of date.`, + ); continue; } @@ -114,4 +117,94 @@ export class CodeStepBuildService { }); } } + + async switchCodeStepLogicFunctionsToPrebuilt({ + workspaceId, + steps, + }: { + workspaceId: string; + steps: WorkflowAction[]; + }): Promise { + const isPrebuiltModeEnabled = + await this.featureFlagService.isFeatureEnabled( + FeatureFlagKey.IS_LOGIC_FUNCTION_PREBUILT_MODE_ENABLED, + workspaceId, + ); + + if (!isPrebuiltModeEnabled) { + return; + } + + const logicFunctionIds = + extractCodeStepLogicFunctionIdsFromWorkflowSteps(steps); + + if (logicFunctionIds.length === 0) { + return; + } + + const { flatLogicFunctionMaps, flatApplicationMaps } = + await this.workspaceManyOrAllFlatEntityMapsCacheService.getOrRecomputeManyOrAllFlatEntityMaps( + { + workspaceId, + flatMapsKeys: ['flatLogicFunctionMaps', 'flatApplicationMaps'], + }, + ); + + for (const logicFunctionId of logicFunctionIds) { + const flatLogicFunction = findFlatEntityByIdInFlatEntityMaps({ + flatEntityId: logicFunctionId, + flatEntityMaps: flatLogicFunctionMaps, + }); + + if ( + !isDefined(flatLogicFunction) || + isDefined(flatLogicFunction.deletedAt) + ) { + throw new WorkflowTriggerException( + `CODE step references logic function '${logicFunctionId}' that is missing or deleted`, + WorkflowTriggerExceptionCode.INVALID_WORKFLOW_VERSION, + ); + } + + if ( + !flatLogicFunction.isBuildUpToDate || + !isDefined(flatLogicFunction.checksum) + ) { + throw new WorkflowTriggerException( + `Logic function '${logicFunctionId}' has no fresh build or checksum after the build step`, + WorkflowTriggerExceptionCode.INTERNAL_ERROR, + ); + } + + if ( + flatLogicFunction.executionMode === LogicFunctionExecutionMode.PREBUILT + ) { + continue; + } + + const applicationUniversalIdentifier = isDefined( + flatLogicFunction.applicationId, + ) + ? flatApplicationMaps.byId[flatLogicFunction.applicationId] + ?.universalIdentifier + : undefined; + + if (!isDefined(applicationUniversalIdentifier)) { + throw new WorkflowTriggerException( + `Logic function '${logicFunctionId}' references applicationId='${flatLogicFunction.applicationId ?? 'null'}' that did not resolve to an application`, + WorkflowTriggerExceptionCode.INTERNAL_ERROR, + ); + } + + await this.logicFunctionFromSourceHelperService.updateOneFromMetadata({ + flatLogicFunctionToUpdate: { + ...flatLogicFunction, + executionMode: LogicFunctionExecutionMode.PREBUILT, + updatedAt: new Date().toISOString(), + }, + workspaceId, + applicationUniversalIdentifier, + }); + } + } } diff --git a/packages/twenty-server/src/modules/workflow/workflow-builder/workflow-version-step/code-step/utils/__tests__/extract-code-step-logic-function-ids-from-workflow-steps.util.spec.ts b/packages/twenty-server/src/modules/workflow/workflow-builder/workflow-version-step/code-step/utils/__tests__/extract-code-step-logic-function-ids-from-workflow-steps.util.spec.ts new file mode 100644 index 0000000000..c6f4ac4923 --- /dev/null +++ b/packages/twenty-server/src/modules/workflow/workflow-builder/workflow-version-step/code-step/utils/__tests__/extract-code-step-logic-function-ids-from-workflow-steps.util.spec.ts @@ -0,0 +1,69 @@ +import { WorkflowVersionStepException } from 'src/modules/workflow/common/exceptions/workflow-version-step.exception'; +import { + type CodeStepForLogicFunctionIdExtraction, + extractCodeStepLogicFunctionIdsFromWorkflowSteps, + type NonCodeStepForLogicFunctionIdExtraction, +} from 'src/modules/workflow/workflow-builder/workflow-version-step/code-step/utils/extract-code-step-logic-function-ids-from-workflow-steps.util'; +import { WorkflowActionType } from 'src/modules/workflow/workflow-executor/workflow-actions/types/workflow-action.type'; + +const buildCodeStep = ( + logicFunctionId: string, +): CodeStepForLogicFunctionIdExtraction => ({ + id: 'step-id', + type: WorkflowActionType.CODE, + settings: { + input: { + logicFunctionId, + }, + }, +}); + +const buildNonCodeStep = (): NonCodeStepForLogicFunctionIdExtraction => ({ + id: 'send-email-id', + type: WorkflowActionType.SEND_EMAIL, +}); + +describe('extractCodeStepLogicFunctionIdsFromWorkflowSteps', () => { + it('should return logic function ids of CODE steps', () => { + const steps = [ + buildCodeStep('logic-function-1'), + buildCodeStep('logic-function-2'), + ]; + + expect(extractCodeStepLogicFunctionIdsFromWorkflowSteps(steps)).toEqual([ + 'logic-function-1', + 'logic-function-2', + ]); + }); + + it('should ignore non-CODE steps', () => { + const steps = [ + buildCodeStep('logic-function-1'), + buildNonCodeStep(), + buildCodeStep('logic-function-2'), + ]; + + expect(extractCodeStepLogicFunctionIdsFromWorkflowSteps(steps)).toEqual([ + 'logic-function-1', + 'logic-function-2', + ]); + }); + + it('should throw when a CODE step has an empty logic function id', () => { + const steps = [buildCodeStep(''), buildCodeStep('logic-function-1')]; + + expect(() => + extractCodeStepLogicFunctionIdsFromWorkflowSteps(steps), + ).toThrow(WorkflowVersionStepException); + }); + + it('should return an empty array when there are no CODE steps', () => { + expect( + extractCodeStepLogicFunctionIdsFromWorkflowSteps([buildNonCodeStep()]), + ).toEqual([]); + }); + + it('should return an empty array for an empty list of steps', () => { + expect(extractCodeStepLogicFunctionIdsFromWorkflowSteps([])).toEqual([]); + }); +}); diff --git a/packages/twenty-server/src/modules/workflow/workflow-builder/workflow-version-step/code-step/utils/extract-code-step-logic-function-ids-from-workflow-steps.util.ts b/packages/twenty-server/src/modules/workflow/workflow-builder/workflow-version-step/code-step/utils/extract-code-step-logic-function-ids-from-workflow-steps.util.ts new file mode 100644 index 0000000000..fc3b58d8ea --- /dev/null +++ b/packages/twenty-server/src/modules/workflow/workflow-builder/workflow-version-step/code-step/utils/extract-code-step-logic-function-ids-from-workflow-steps.util.ts @@ -0,0 +1,54 @@ +import { isNonEmptyString } from '@sniptt/guards'; + +import { + WorkflowVersionStepException, + WorkflowVersionStepExceptionCode, +} from 'src/modules/workflow/common/exceptions/workflow-version-step.exception'; +import { type WorkflowCodeActionInput } from 'src/modules/workflow/workflow-executor/workflow-actions/code/types/workflow-code-action-input.type'; +import { + type WorkflowAction, + type WorkflowCodeAction, + WorkflowActionType, +} from 'src/modules/workflow/workflow-executor/workflow-actions/types/workflow-action.type'; + +export type CodeStepForLogicFunctionIdExtraction = Pick< + WorkflowCodeAction, + 'id' | 'type' +> & { + settings: { + input: Pick; + }; +}; + +export type NonCodeStepForLogicFunctionIdExtraction = Pick< + Exclude, + 'id' | 'type' +>; + +type WorkflowStepForLogicFunctionIdExtraction = + | CodeStepForLogicFunctionIdExtraction + | NonCodeStepForLogicFunctionIdExtraction; + +const isCodeStepForLogicFunction = ( + step: WorkflowStepForLogicFunctionIdExtraction, +): step is CodeStepForLogicFunctionIdExtraction => + step.type === WorkflowActionType.CODE; + +export const extractCodeStepLogicFunctionIdsFromWorkflowSteps = ( + steps: WorkflowStepForLogicFunctionIdExtraction[], +): string[] => [ + ...new Set( + steps.filter(isCodeStepForLogicFunction).map((step) => { + const logicFunctionId = step.settings.input.logicFunctionId; + + if (!isNonEmptyString(logicFunctionId)) { + throw new WorkflowVersionStepException( + `CODE step '${step.id}' has no logic function id`, + WorkflowVersionStepExceptionCode.INVALID_REQUEST, + ); + } + + return logicFunctionId; + }), + ), +]; diff --git a/packages/twenty-server/src/modules/workflow/workflow-trigger/workspace-services/workflow-trigger.workspace-service.ts b/packages/twenty-server/src/modules/workflow/workflow-trigger/workspace-services/workflow-trigger.workspace-service.ts index bb5791a779..f91b806ce3 100644 --- a/packages/twenty-server/src/modules/workflow/workflow-trigger/workspace-services/workflow-trigger.workspace-service.ts +++ b/packages/twenty-server/src/modules/workflow/workflow-trigger/workspace-services/workflow-trigger.workspace-service.ts @@ -136,6 +136,11 @@ export class WorkflowTriggerWorkspaceService { steps: workflowVersion.steps ?? [], }); + await this.codeStepBuildService.switchCodeStepLogicFunctionsToPrebuilt({ + workspaceId, + steps: workflowVersion.steps ?? [], + }); + await this.performActivationSteps( workflow, workflowVersion, diff --git a/packages/twenty-server/test/integration/graphql/suites/workflow/code-step-prebuilt-workflow.integration-spec.ts b/packages/twenty-server/test/integration/graphql/suites/workflow/code-step-prebuilt-workflow.integration-spec.ts new file mode 100644 index 0000000000..bb5cbcf845 --- /dev/null +++ b/packages/twenty-server/test/integration/graphql/suites/workflow/code-step-prebuilt-workflow.integration-spec.ts @@ -0,0 +1,314 @@ +import gql from 'graphql-tag'; +import request from 'supertest'; +import { + destroyWorkflowRun, + runWorkflowVersion, + waitForWorkflowCompletion, +} from 'test/integration/graphql/suites/workflow/utils/workflow-run-test.util'; +import { updateLogicFunctionSource } from 'test/integration/metadata/suites/logic-function/utils/update-logic-function-source.util'; +import { makeMetadataAPIRequest } from 'test/integration/metadata/suites/utils/make-metadata-api-request.util'; +import { updateFeatureFlag } from 'test/integration/metadata/suites/utils/update-feature-flag.util'; +import { FeatureFlagKey } from 'twenty-shared/types'; + +import { LogicFunctionExecutionMode } from 'src/engine/metadata-modules/logic-function/logic-function.entity'; + +const client = request(`http://localhost:${APP_PORT}`); + +const EXTERNAL_PACKAGES_FUNCTION_CODE = `import groupBy from 'lodash.groupby'; + +export const main = async (params: { items: Array<{ category: string; name: string }> }): Promise => { + const grouped = groupBy(params.items, 'category'); + return { + grouped, + categories: Object.keys(grouped), + }; +};`; + +describe('Code step workflow with PREBUILT logic function (e2e)', () => { + let createdWorkflowId: string | null = null; + let createdWorkflowVersionId: string | null = null; + let codeStepId: string | null = null; + let codeStepLogicFunctionId: string | null = null; + let createdWorkflowRunId: string | null = null; + + beforeAll(async () => { + await updateFeatureFlag({ + featureFlag: FeatureFlagKey.IS_LOGIC_FUNCTION_PREBUILT_MODE_ENABLED, + value: true, + expectToFail: false, + }); + + const createWorkflowResponse = await client + .post('/graphql') + .set('Authorization', `Bearer ${APPLE_JANE_ADMIN_ACCESS_TOKEN}`) + .send({ + query: ` + mutation CreateWorkflow { + createWorkflow(data: { + name: "Code Step PREBUILT Test" + }) { + id + } + } + `, + }); + + expect(createWorkflowResponse.body.errors).toBeUndefined(); + createdWorkflowId = createWorkflowResponse.body.data.createWorkflow.id; + + const getWorkflowResponse = await client + .post('/graphql') + .set('Authorization', `Bearer ${APPLE_JANE_ADMIN_ACCESS_TOKEN}`) + .send({ + query: ` + query GetWorkflow($id: UUID!) { + workflow(filter: { id: { eq: $id } }) { + id + versions { + edges { + node { + id + } + } + } + } + } + `, + variables: { id: createdWorkflowId }, + }); + + expect(getWorkflowResponse.body.errors).toBeUndefined(); + createdWorkflowVersionId = + getWorkflowResponse.body.data.workflow.versions.edges[0].node.id; + + const manualTrigger = { + name: 'Manual Trigger', + type: 'MANUAL', + settings: { + outputSchema: { + items: { isLeaf: true, type: 'array', value: undefined }, + }, + }, + nextStepIds: [], + position: { x: 0, y: 0 }, + }; + + const updateTriggerResponse = await client + .post('/graphql') + .set('Authorization', `Bearer ${APPLE_JANE_ADMIN_ACCESS_TOKEN}`) + .send({ + query: ` + mutation UpdateWorkflowVersion($id: UUID!, $data: WorkflowVersionUpdateInput!) { + updateWorkflowVersion(id: $id, data: $data) { + id + } + } + `, + variables: { + id: createdWorkflowVersionId, + data: { trigger: manualTrigger }, + }, + }); + + expect(updateTriggerResponse.body.errors).toBeUndefined(); + + const createCodeStepResponse = await client + .post('/graphql') + .set('Authorization', `Bearer ${APPLE_JANE_ADMIN_ACCESS_TOKEN}`) + .send({ + query: ` + mutation CreateWorkflowVersionStep($input: CreateWorkflowVersionStepInput!) { + createWorkflowVersionStep(input: $input) { + stepsDiff + } + } + `, + variables: { + input: { + workflowVersionId: createdWorkflowVersionId, + stepType: 'CODE', + parentStepId: 'trigger', + position: { x: 200, y: 0 }, + }, + }, + }); + + expect(createCodeStepResponse.body.errors).toBeUndefined(); + + const getStepsResponse = await client + .post('/graphql') + .set('Authorization', `Bearer ${APPLE_JANE_ADMIN_ACCESS_TOKEN}`) + .send({ + query: ` + query GetWorkflowVersion($id: UUID!) { + workflowVersion(filter: { id: { eq: $id } }) { + id + steps + } + } + `, + variables: { id: createdWorkflowVersionId }, + }); + + expect(getStepsResponse.body.errors).toBeUndefined(); + + const codeStep = getStepsResponse.body.data.workflowVersion.steps.find( + (step: { type: string }) => step.type === 'CODE', + ); + + expect(codeStep).toBeDefined(); + codeStepId = codeStep.id; + + const logicFunctionId = codeStep.settings.input.logicFunctionId; + + expect(logicFunctionId).toBeDefined(); + codeStepLogicFunctionId = logicFunctionId; + + const updateStepResponse = await client + .post('/graphql') + .set('Authorization', `Bearer ${APPLE_JANE_ADMIN_ACCESS_TOKEN}`) + .send({ + query: ` + mutation UpdateWorkflowVersionStep($input: UpdateWorkflowVersionStepInput!) { + updateWorkflowVersionStep(input: $input) { + id + } + } + `, + variables: { + input: { + workflowVersionId: createdWorkflowVersionId, + step: { + ...codeStep, + settings: { + ...codeStep.settings, + input: { + ...codeStep.settings.input, + logicFunctionInput: { items: '{{trigger.items}}' }, + }, + }, + }, + }, + }, + }); + + expect(updateStepResponse.body.errors).toBeUndefined(); + + const updateSourceResponse = await updateLogicFunctionSource({ + input: { + id: logicFunctionId, + update: { + sourceHandlerCode: EXTERNAL_PACKAGES_FUNCTION_CODE, + }, + }, + expectToFail: false, + }); + + expect(updateSourceResponse.errors).toBeUndefined(); + + const activateResponse = await client + .post('/graphql') + .set('Authorization', `Bearer ${APPLE_JANE_ADMIN_ACCESS_TOKEN}`) + .send({ + query: ` + mutation ActivateWorkflowVersion($workflowVersionId: UUID!) { + activateWorkflowVersion(workflowVersionId: $workflowVersionId) + } + `, + variables: { workflowVersionId: createdWorkflowVersionId }, + }); + + expect(activateResponse.body.errors).toBeUndefined(); + expect(activateResponse.body.data.activateWorkflowVersion).toBe(true); + }); + + afterAll(async () => { + if (createdWorkflowRunId) { + await destroyWorkflowRun(createdWorkflowRunId); + } + + if (createdWorkflowId) { + await client + .post('/graphql') + .set('Authorization', `Bearer ${APPLE_JANE_ADMIN_ACCESS_TOKEN}`) + .send({ + query: ` + mutation DestroyWorkflow($id: ID!) { + destroyWorkflow(id: $id) { + id + } + } + `, + variables: { id: createdWorkflowId }, + }); + } + + await updateFeatureFlag({ + featureFlag: FeatureFlagKey.IS_LOGIC_FUNCTION_PREBUILT_MODE_ENABLED, + value: false, + expectToFail: false, + }); + }); + + it('flips the underlying logic function to PREBUILT on workflow activation', async () => { + const findLogicFunctionResponse = await makeMetadataAPIRequest({ + query: gql` + query FindOneLogicFunction($input: LogicFunctionIdInput!) { + findOneLogicFunction(input: $input) { + id + executionMode + } + } + `, + variables: { input: { id: codeStepLogicFunctionId } }, + }); + + expect(findLogicFunctionResponse.body.errors).toBeUndefined(); + + const logicFunction = + findLogicFunctionResponse.body.data.findOneLogicFunction; + + expect(logicFunction.executionMode).toBe( + LogicFunctionExecutionMode.PREBUILT, + ); + }); + + it('runs the code step from its prebuilt bundle and resolves bare imports', async () => { + createdWorkflowRunId = await runWorkflowVersion({ + workflowVersionId: createdWorkflowVersionId!, + payload: { + items: [ + { category: 'fruit', name: 'apple' }, + { category: 'vegetable', name: 'carrot' }, + { category: 'fruit', name: 'banana' }, + ], + }, + }); + + const workflowRun = await waitForWorkflowCompletion(createdWorkflowRunId); + + expect(workflowRun?.status).toBe('COMPLETED'); + expect(workflowRun?.state?.stepInfos?.trigger?.status).toBe('SUCCESS'); + expect(workflowRun?.state?.stepInfos?.[codeStepId!]?.status).toBe( + 'SUCCESS', + ); + + const stepResult = workflowRun?.state?.stepInfos?.[codeStepId!]?.result as + | { + grouped?: Record>; + categories?: string[]; + } + | undefined; + + expect(stepResult?.grouped).toMatchObject({ + fruit: [ + { category: 'fruit', name: 'apple' }, + { category: 'fruit', name: 'banana' }, + ], + vegetable: [{ category: 'vegetable', name: 'carrot' }], + }); + expect(stepResult?.categories).toEqual( + expect.arrayContaining(['fruit', 'vegetable']), + ); + }); +}); diff --git a/packages/twenty-server/test/integration/metadata/suites/logic-function/logic-function-execution.integration-spec.ts b/packages/twenty-server/test/integration/metadata/suites/logic-function/logic-function-execution.integration-spec.ts index ce075df8fd..a177a6ac40 100644 --- a/packages/twenty-server/test/integration/metadata/suites/logic-function/logic-function-execution.integration-spec.ts +++ b/packages/twenty-server/test/integration/metadata/suites/logic-function/logic-function-execution.integration-spec.ts @@ -4,6 +4,7 @@ import { executeLogicFunction } from 'test/integration/metadata/suites/logic-fun import { updateLogicFunctionSource } from 'test/integration/metadata/suites/logic-function/utils/update-logic-function-source.util'; import { LogicFunctionExecutionStatus } from 'src/engine/metadata-modules/logic-function/dtos/logic-function-execution-result.dto'; +import { LogicFunctionExecutionMode } from 'src/engine/metadata-modules/logic-function/logic-function.entity'; // Default template function code that matches the expected behavior const DEFAULT_TEMPLATE_FUNCTION_CODE = `export const main = async (params: { a: string; b: number }): Promise => { @@ -58,6 +59,9 @@ describe('Logic Function Execution', () => { const functionId = createData?.createOneLogicFunction?.id; expect(functionId).toBeDefined(); + expect(createData?.createOneLogicFunction?.executionMode).toBe( + LogicFunctionExecutionMode.LIVE, + ); createdFunctionIds.push(functionId); await updateLogicFunctionSource({ @@ -290,4 +294,5 @@ describe('Logic Function Execution', () => { }); expect(errorResult?.data).toBeNull(); }); + }); diff --git a/packages/twenty-server/test/integration/metadata/suites/logic-function/utils/create-logic-function-query-factory.util.ts b/packages/twenty-server/test/integration/metadata/suites/logic-function/utils/create-logic-function-query-factory.util.ts index e999743782..7fff255551 100644 --- a/packages/twenty-server/test/integration/metadata/suites/logic-function/utils/create-logic-function-query-factory.util.ts +++ b/packages/twenty-server/test/integration/metadata/suites/logic-function/utils/create-logic-function-query-factory.util.ts @@ -11,6 +11,7 @@ const LOGIC_FUNCTION_GQL_FIELDS = ` name description runtime + executionMode createdAt updatedAt `; diff --git a/packages/twenty-shared/src/types/FeatureFlagKey.ts b/packages/twenty-shared/src/types/FeatureFlagKey.ts index 6ff204ea02..730d2ca623 100644 --- a/packages/twenty-shared/src/types/FeatureFlagKey.ts +++ b/packages/twenty-shared/src/types/FeatureFlagKey.ts @@ -6,5 +6,6 @@ export enum FeatureFlagKey { IS_EMAIL_GROUP_ENABLED = 'IS_EMAIL_GROUP_ENABLED', IS_JUNCTION_RELATIONS_ENABLED = 'IS_JUNCTION_RELATIONS_ENABLED', IS_REST_METADATA_API_NEW_FORMAT_DIRECT = 'IS_REST_METADATA_API_NEW_FORMAT_DIRECT', + IS_LOGIC_FUNCTION_PREBUILT_MODE_ENABLED = 'IS_LOGIC_FUNCTION_PREBUILT_MODE_ENABLED', IS_SETTINGS_DISCOVERY_HERO_ENABLED = 'IS_SETTINGS_DISCOVERY_HERO_ENABLED', }