Skip to content

The open alternative to Salesforce, designed for AI.

Allow going back to the previous onboarding step (#23716)

Raphaël Bosi40aeb4dd6de2
diff --git a/packages/twenty-client-sdk/src/metadata/generated/schema.graphql b/packages/twenty-client-sdk/src/metadata/generated/schema.graphql
index aa3a5d966da..12085b6c3de 100644
--- a/packages/twenty-client-sdk/src/metadata/generated/schema.graphql
+++ b/packages/twenty-client-sdk/src/metadata/generated/schema.graphql
@@ -872,6 +872,7 @@ type User {
workspaceMember: WorkspaceMember
userWorkspaces: [UserWorkspace!]!
onboardingStatus: OnboardingStatus
+ previousOnboardingStatus: OnboardingStatus
currentWorkspace: Workspace
currentUserWorkspace: UserWorkspace
userVars: JSONObject
@@ -1702,6 +1703,14 @@ type InviteSuggestion {
displayName: String
}
+type OnboardingStepNavigation {
+ """Onboarding status the user landed on"""
+ onboardingStatus: OnboardingStatus
+
+ """Step the user can go back to from there, if any"""
+ previousOnboardingStatus: OnboardingStatus
+}
+
type OnboardingStepSuccess {
"""Boolean that confirms query was dispatched"""
success: Boolean!
@@ -3510,9 +3519,10 @@ type Mutation {
assignRoleToApiKey(apiKeyId: UUID!, roleId: UUID!): Boolean!
revokeUserSession(userSessionId: UUID!): Boolean!
revokeAllOtherUserSessions: Int!
- skipSyncEmailOnboardingStep: OnboardingStepSuccess!
- completeBookCallOnboardingStep: OnboardingStepSuccess!
- triggerInstallAppsOnboardingStep(universalIdentifiers: [String!]!): OnboardingStepSuccess!
+ skipSyncEmailOnboardingStep(isAutoSkipped: Boolean! = false): OnboardingStepSuccess!
+ completeBookCallOnboardingStep(hasBookedCall: Boolean! = false, isAutoSkipped: Boolean! = false): OnboardingStepSuccess!
+ triggerInstallAppsOnboardingStep(universalIdentifiers: [String!]!, isAutoSkipped: Boolean! = false): OnboardingStepSuccess!
+ goBackToPreviousOnboardingStep: OnboardingStepNavigation!
updateOneApplicationVariable(key: String!, value: String!, applicationId: UUID!): Boolean!
checkoutSession(recurringInterval: SubscriptionInterval!, plan: BillingPlanKey! = PRO, requirePaymentMethod: Boolean! = true, successUrlPath: String): BillingSession!
createSubscriptionPaymentIntent(recurringInterval: SubscriptionInterval!, plan: BillingPlanKey! = PRO, requirePaymentMethod: Boolean! = true, successUrlPath: String, idempotencyKey: String!): BillingPaymentIntent!
diff --git a/packages/twenty-client-sdk/src/metadata/generated/schema.ts b/packages/twenty-client-sdk/src/metadata/generated/schema.ts
index 226e8a20097..1d2260da2b1 100644
--- a/packages/twenty-client-sdk/src/metadata/generated/schema.ts
+++ b/packages/twenty-client-sdk/src/metadata/generated/schema.ts
@@ -616,6 +616,7 @@ export interface User {
workspaceMember?: WorkspaceMember
userWorkspaces: UserWorkspace[]
onboardingStatus?: OnboardingStatus
+ previousOnboardingStatus?: OnboardingStatus
currentWorkspace?: Workspace
currentUserWorkspace?: UserWorkspace
userVars?: Scalars['JSONObject']
@@ -1367,6 +1368,14 @@ export interface InviteSuggestion {
__typename: 'InviteSuggestion'
}
+export interface OnboardingStepNavigation {
+ /** Onboarding status the user landed on */
+ onboardingStatus?: OnboardingStatus
+ /** Step the user can go back to from there, if any */
+ previousOnboardingStatus?: OnboardingStatus
+ __typename: 'OnboardingStepNavigation'
+}
+
export interface OnboardingStepSuccess {
/** Boolean that confirms query was dispatched */
success: Scalars['Boolean']
@@ -3018,6 +3027,7 @@ export interface Mutation {
skipSyncEmailOnboardingStep: OnboardingStepSuccess
completeBookCallOnboardingStep: OnboardingStepSuccess
triggerInstallAppsOnboardingStep: OnboardingStepSuccess
+ goBackToPreviousOnboardingStep: OnboardingStepNavigation
updateOneApplicationVariable: Scalars['Boolean']
checkoutSession: BillingSession
createSubscriptionPaymentIntent: BillingPaymentIntent
@@ -3841,6 +3851,7 @@ export interface UserGenqlSelection{
workspaceMember?: WorkspaceMemberGenqlSelection
userWorkspaces?: UserWorkspaceGenqlSelection
onboardingStatus?: boolean | number
+ previousOnboardingStatus?: boolean | number
currentWorkspace?: WorkspaceGenqlSelection
currentUserWorkspace?: UserWorkspaceGenqlSelection
userVars?: boolean | number
@@ -4630,6 +4641,15 @@ export interface InviteSuggestionGenqlSelection{
__scalar?: boolean | number
}
+export interface OnboardingStepNavigationGenqlSelection{
+ /** Onboarding status the user landed on */
+ onboardingStatus?: boolean | number
+ /** Step the user can go back to from there, if any */
+ previousOnboardingStatus?: boolean | number
+ __typename?: boolean | number
+ __scalar?: boolean | number
+}
+
export interface OnboardingStepSuccessGenqlSelection{
/** Boolean that confirms query was dispatched */
success?: boolean | number
@@ -6407,9 +6427,10 @@ export interface MutationGenqlSelection{
assignRoleToApiKey?: { __args: {apiKeyId: Scalars['UUID'], roleId: Scalars['UUID']} }
revokeUserSession?: { __args: {userSessionId: Scalars['UUID']} }
revokeAllOtherUserSessions?: boolean | number
- skipSyncEmailOnboardingStep?: OnboardingStepSuccessGenqlSelection
- completeBookCallOnboardingStep?: OnboardingStepSuccessGenqlSelection
- triggerInstallAppsOnboardingStep?: (OnboardingStepSuccessGenqlSelection & { __args: {universalIdentifiers: Scalars['String'][]} })
+ skipSyncEmailOnboardingStep?: (OnboardingStepSuccessGenqlSelection & { __args: {isAutoSkipped: Scalars['Boolean']} })
+ completeBookCallOnboardingStep?: (OnboardingStepSuccessGenqlSelection & { __args: {hasBookedCall: Scalars['Boolean'], isAutoSkipped: Scalars['Boolean']} })
+ triggerInstallAppsOnboardingStep?: (OnboardingStepSuccessGenqlSelection & { __args: {universalIdentifiers: Scalars['String'][], isAutoSkipped: Scalars['Boolean']} })
+ goBackToPreviousOnboardingStep?: OnboardingStepNavigationGenqlSelection
updateOneApplicationVariable?: { __args: {key: Scalars['String'], value: Scalars['String'], applicationId: Scalars['UUID']} }
checkoutSession?: (BillingSessionGenqlSelection & { __args: {recurringInterval: SubscriptionInterval, plan: BillingPlanKey, requirePaymentMethod: Scalars['Boolean'], successUrlPath?: (Scalars['String'] | null)} })
createSubscriptionPaymentIntent?: (BillingPaymentIntentGenqlSelection & { __args: {recurringInterval: SubscriptionInterval, plan: BillingPlanKey, requirePaymentMethod: Scalars['Boolean'], successUrlPath?: (Scalars['String'] | null), idempotencyKey: Scalars['String']} })
@@ -7884,6 +7905,14 @@ export interface LogicFunctionLogsInput {applicationId?: (Scalars['UUID'] | null
+ const OnboardingStepNavigation_possibleTypes: string[] = ['OnboardingStepNavigation']
+ export const isOnboardingStepNavigation = (obj?: { __typename?: any } | null): obj is OnboardingStepNavigation => {
+ if (!obj?.__typename) throw new Error('__typename is missing in "isOnboardingStepNavigation"')
+ return OnboardingStepNavigation_possibleTypes.includes(obj.__typename)
+ }
+
+
+
const OnboardingStepSuccess_possibleTypes: string[] = ['OnboardingStepSuccess']
export const isOnboardingStepSuccess = (obj?: { __typename?: any } | null): obj is OnboardingStepSuccess => {
if (!obj?.__typename) throw new Error('__typename is missing in "isOnboardingStepSuccess"')
diff --git a/packages/twenty-client-sdk/src/metadata/generated/types.ts b/packages/twenty-client-sdk/src/metadata/generated/types.ts
index 0eb47964907..578a4f06602 100644
--- a/packages/twenty-client-sdk/src/metadata/generated/types.ts
+++ b/packages/twenty-client-sdk/src/metadata/generated/types.ts
@@ -53,44 +53,44 @@ export default {
151,
154,
156,
- 171,
- 178,
+ 172,
179,
- 186,
- 189,
- 192,
- 204,
- 221,
- 223,
- 228,
- 231,
- 240,
- 246,
- 282,
- 284,
+ 180,
+ 187,
+ 190,
+ 193,
+ 205,
+ 222,
+ 224,
+ 229,
+ 232,
+ 241,
+ 247,
+ 283,
285,
286,
287,
288,
289,
290,
- 297,
+ 291,
298,
- 301,
- 338,
- 344,
- 346,
+ 299,
+ 302,
+ 339,
+ 345,
347,
348,
349,
- 351,
- 353,
- 366,
- 373,
- 380,
+ 350,
+ 352,
+ 354,
+ 367,
+ 374,
381,
- 493,
- 515
+ 382,
+ 494,
+ 516
],
"types": {
"BillingProductDTO": {
@@ -551,7 +551,7 @@ export default {
1
],
"fields": [
- 235,
+ 236,
{
"paging": [
25,
@@ -564,7 +564,7 @@ export default {
}
],
"indexMetadatas": [
- 236,
+ 237,
{
"paging": [
25,
@@ -577,13 +577,13 @@ export default {
}
],
"fieldsList": [
- 222
+ 223
],
"indexMetadataList": [
- 230
+ 231
],
"searchFieldMetadataList": [
- 238
+ 239
],
"__typename": [
1
@@ -1618,7 +1618,7 @@ export default {
47
],
"featureFlags": [
- 170
+ 171
],
"billingSubscriptions": [
140
@@ -1633,7 +1633,7 @@ export default {
139
],
"billingEntitlements": [
- 239
+ 240
],
"hasValidSignedEnterpriseKey": [
8
@@ -1642,7 +1642,7 @@ export default {
8
],
"workspaceUrls": [
- 172
+ 173
],
"workspaceCustomApplicationId": [
1
@@ -1699,6 +1699,9 @@ export default {
"onboardingStatus": [
71
],
+ "previousOnboardingStatus": [
+ 71
+ ],
"currentWorkspace": [
67
],
@@ -1712,7 +1715,7 @@ export default {
33
],
"deletedWorkspaceMembers": [
- 214
+ 215
],
"hasPassword": [
8
@@ -1727,7 +1730,7 @@ export default {
49
],
"availableWorkspaces": [
- 213
+ 214
],
"__typename": [
1
@@ -3301,6 +3304,17 @@ export default {
1
]
},
+ "OnboardingStepNavigation": {
+ "onboardingStatus": [
+ 71
+ ],
+ "previousOnboardingStatus": [
+ 71
+ ],
+ "__typename": [
+ 1
+ ]
+ },
"OnboardingStepSuccess": {
"success": [
8
@@ -3334,7 +3348,7 @@ export default {
1
],
"result": [
- 168
+ 169
],
"__typename": [
1
@@ -3342,7 +3356,7 @@ export default {
},
"FeatureFlag": {
"key": [
- 171
+ 172
],
"value": [
8
@@ -3423,7 +3437,7 @@ export default {
1
],
"versionDistribution": [
- 174
+ 175
],
"__typename": [
1
@@ -3448,10 +3462,10 @@ export default {
1
],
"type": [
- 178
+ 179
],
"status": [
- 179
+ 180
],
"issuer": [
1
@@ -3464,7 +3478,7 @@ export default {
"SSOIdentityProviderStatus": {},
"AuthProviders": {
"sso": [
- 177
+ 178
],
"google": [
8
@@ -3501,10 +3515,10 @@ export default {
3
],
"authProviders": [
- 180
+ 181
],
"authBypassProviders": [
- 181
+ 182
],
"logo": [
1
@@ -3513,7 +3527,7 @@ export default {
1
],
"workspaceUrls": [
- 172
+ 173
],
"__typename": [
1
@@ -3552,7 +3566,7 @@ export default {
1
],
"modelFamily": [
- 186
+ 187
],
"modelFamilyLabel": [
1
@@ -3567,7 +3581,7 @@ export default {
15
],
"nativeCapabilities": [
- 184
+ 185
],
"isDeprecated": [
8
@@ -3606,7 +3620,7 @@ export default {
1
],
"trialPeriods": [
- 176
+ 177
],
"__typename": [
1
@@ -3614,7 +3628,7 @@ export default {
},
"Support": {
"supportDriver": [
- 189
+ 190
],
"supportFrontChatId": [
1
@@ -3640,7 +3654,7 @@ export default {
},
"Captcha": {
"provider": [
- 192
+ 193
],
"siteKey": [
1
@@ -3677,10 +3691,10 @@ export default {
},
"PublicFeatureFlag": {
"key": [
- 171
+ 172
],
"metadata": [
- 194
+ 195
],
"__typename": [
1
@@ -3705,13 +3719,13 @@ export default {
1
],
"authProviders": [
- 180
+ 181
],
"billing": [
- 187
+ 188
],
"aiModels": [
- 185
+ 186
],
"signInPrefilled": [
8
@@ -3735,25 +3749,25 @@ export default {
8
],
"support": [
- 188
+ 189
],
"isAttachmentPreviewEnabled": [
8
],
"sentry": [
- 190
+ 191
],
"captcha": [
- 191
+ 192
],
"api": [
- 193
+ 194
],
"canManageFeatureFlags": [
8
],
"publicFeatureFlags": [
- 195
+ 196
],
"isCookieSessionEnabled": [
8
@@ -3807,7 +3821,7 @@ export default {
1
],
"maintenance": [
- 196
+ 197
],
"__typename": [
1
@@ -3897,7 +3911,7 @@ export default {
},
"AppConnection": {
"id": [
- 204
+ 205
],
"providerName": [
1
@@ -3949,7 +3963,7 @@ export default {
3
],
"type": [
- 178
+ 179
],
"issuer": [
1
@@ -3958,7 +3972,7 @@ export default {
1
],
"status": [
- 179
+ 180
],
"__typename": [
1
@@ -3977,7 +3991,7 @@ export default {
},
"FindAvailableSSOIDP": {
"type": [
- 178
+ 179
],
"id": [
3
@@ -3989,10 +4003,10 @@ export default {
1
],
"status": [
- 179
+ 180
],
"workspace": [
- 208
+ 209
],
"__typename": [
1
@@ -4003,7 +4017,7 @@ export default {
3
],
"type": [
- 178
+ 179
],
"issuer": [
1
@@ -4012,7 +4026,7 @@ export default {
1
],
"status": [
- 179
+ 180
],
"__typename": [
1
@@ -4020,7 +4034,7 @@ export default {
},
"SSOConnection": {
"type": [
- 178
+ 179
],
"id": [
3
@@ -4032,7 +4046,7 @@ export default {
1
],
"status": [
- 179
+ 180
],
"__typename": [
1
@@ -4055,13 +4069,13 @@ export default {
1
],
"workspaceUrls": [
- 172
+ 173
],
"logo": [
1
],
"sso": [
- 211
+ 212
],
"__typename": [
1
@@ -4069,10 +4083,10 @@ export default {
},
"AvailableWorkspaces": {
"availableWorkspacesForSignIn": [
- 212
+ 213
],
"availableWorkspacesForSignUp": [
- 212
+ 213
],
"__typename": [
1
@@ -4205,10 +4219,10 @@ export default {
1
],
"objectPermissions": [
- 216
+ 217
],
"fieldPermissions": [
- 217
+ 218
],
"__typename": [
1
@@ -4276,7 +4290,7 @@ export default {
1
],
"roles": [
- 218
+ 219
],
"manifest": [
9
@@ -4287,7 +4301,7 @@ export default {
},
"WorkspaceCompanyEnrichmentResult": {
"outcome": [
- 221
+ 222
],
"enrichment": [
9
@@ -4308,7 +4322,7 @@ export default {
1
],
"type": [
- 223
+ 224
],
"name": [
1
@@ -4371,10 +4385,10 @@ export default {
23
],
"relation": [
- 227
+ 228
],
"morphRelations": [
- 227
+ 228
],
"__typename": [
1
@@ -4400,7 +4414,7 @@ export default {
},
"FieldEdge": {
"node": [
- 222
+ 223
],
"cursor": [
27
@@ -4411,10 +4425,10 @@ export default {
},
"FieldConnection": {
"pageInfo": [
- 224
+ 225
],
"edges": [
- 225
+ 226
],
"__typename": [
1
@@ -4422,7 +4436,7 @@ export default {
},
"Relation": {
"type": [
- 228
+ 229
],
"sourceObjectMetadata": [
23
@@ -4431,10 +4445,10 @@ export default {
23
],
"sourceFieldMetadata": [
- 222
+ 223
],
"targetFieldMetadata": [
- 222
+ 223
],
"__typename": [
1
@@ -4481,7 +4495,7 @@ export default {
1
],
"indexType": [
- 231
+ 232
],
"createdAt": [
4
@@ -4490,7 +4504,7 @@ export default {
4
],
"indexFieldMetadataList": [
- 229
+ 230
],
"__typename": [
1
@@ -4499,7 +4513,7 @@ export default {
"IndexType": {},
"IndexEdge": {
"node": [
- 230
+ 231
],
"cursor": [
27
@@ -4521,10 +4535,10 @@ export default {
},
"ObjectConnection": {
"pageInfo": [
- 224
+ 225
],
"edges": [
- 233
+ 234
],
"__typename": [
1
@@ -4532,10 +4546,10 @@ export default {
},
"ObjectFieldsConnection": {
"pageInfo": [
- 224
+ 225
],
"edges": [
- 225
+ 226
],
"__typename": [
1
@@ -4543,10 +4557,10 @@ export default {
},
"ObjectIndexMetadatasConnection": {
"pageInfo": [
- 224
+ 225
],
"edges": [
- 232
+ 233
],
"__typename": [
1
@@ -4588,7 +4602,7 @@ export default {
},
"BillingEntitlement": {
"key": [
- 240
+ 241
],
"value": [
8
@@ -4626,7 +4640,7 @@ export default {
1
],
"records": [
- 241
+ 242
],
"isCustomDomainEnabled": [
8
@@ -4665,7 +4679,7 @@ export default {
1
],
"connectionSecurity": [
- 246
+ 247
],
"__typename": [
1
@@ -4674,13 +4688,13 @@ export default {
"EmailConnectionSecurity": {},
"PublicImapSmtpCaldavConnectionParameters": {
"IMAP": [
- 245
+ 246
],
"SMTP": [
- 245
+ 246
],
"CALDAV": [
- 245
+ 246
],
"__typename": [
1
@@ -4736,7 +4750,7 @@ export default {
4
],
"connectionParameters": [
- 247
+ 248
],
"__typename": [
1
@@ -4787,10 +4801,10 @@ export default {
},
"AvailableWorkspacesAndAccessTokens": {
"tokens": [
- 253
+ 254
],
"availableWorkspaces": [
- 213
+ 214
],
"__typename": [
1
@@ -4828,7 +4842,7 @@ export default {
},
"WorkspaceUrlsAndId": {
"workspaceUrls": [
- 172
+ 173
],
"id": [
3
@@ -4842,7 +4856,7 @@ export default {
11
],
"workspace": [
- 258
+ 259
],
"__typename": [
1
@@ -4875,7 +4889,7 @@ export default {
11
],
"workspaceUrls": [
- 172
+ 173
],
"__typename": [
1
@@ -4919,7 +4933,7 @@ export default {
},
"AuthTokens": {
"tokens": [
- 253
+ 254
],
"__typename": [
1
@@ -4960,7 +4974,7 @@ export default {
11
],
"workspace": [
- 258
+ 259
],
"__typename": [
1
@@ -4990,7 +5004,7 @@ export default {
1
],
"dailyUsage": [
- 272
+ 273
],
"__typename": [
1
@@ -4998,16 +5012,16 @@ export default {
},
"UsageAnalytics": {
"usageByUser": [
- 198
+ 199
],
"usageByOperationType": [
- 198
+ 199
],
"usageByModel": [
- 198
+ 199
],
"timeSeries": [
- 272
+ 273
],
"periodStart": [
4
@@ -5016,7 +5030,7 @@ export default {
4
],
"userDailyUsage": [
- 273
+ 274
],
"__typename": [
1
@@ -5147,10 +5161,10 @@ export default {
1
],
"status": [
- 282
+ 283
],
"verificationRecords": [
- 280
+ 281
],
"verifiedAt": [
4
@@ -5165,7 +5179,7 @@ export default {
3
],
"visibility": [
- 284
+ 285
],
"handle": [
1
@@ -5174,16 +5188,16 @@ export default {
1
],
"type": [
- 285
+ 286
],
"isContactAutoCreationEnabled": [
8
],
"contactAutoCreationPolicy": [
- 286
+ 287
],
"messageFolderImportPolicy": [
- 287
+ 288
],
"excludeNonProfessionalEmails": [
8
@@ -5192,7 +5206,7 @@ export default {
8
],
"pendingGroupEmailsAction": [
- 288
+ 289
],
"isSyncEnabled": [
8
@@ -5201,10 +5215,10 @@ export default {
4
],
"syncStatus": [
- 289
+ 290
],
"syncStage": [
- 290
+ 291
],
"syncStageStartedAt": [
4
@@ -5225,7 +5239,7 @@ export default {
4
],
"connectedAccount": [
- 248
+ 249
],
"__typename": [
1
@@ -5240,7 +5254,7 @@ export default {
"MessageChannelSyncStage": {},
"CreateEmailGroupChannelOutput": {
"messageChannel": [
- 283
+ 284
],
"forwardingAddress": [
1
@@ -5302,7 +5316,7 @@ export default {
26
],
"skipped": [
- 294
+ 295
],
"__typename": [
1
@@ -5319,10 +5333,10 @@ export default {
1
],
"reason": [
- 297
+ 298
],
"source": [
- 298
+ 299
],
"unsubscribeTopicId": [
3
@@ -5335,7 +5349,7 @@ export default {
"MessageSuppressionSource": {},
"MessageSuppressionList": {
"records": [
- 296
+ 297
],
"totalCount": [
26
@@ -5361,7 +5375,7 @@ export default {
1
],
"visibility": [
- 301
+ 302
],
"__typename": [
1
@@ -5407,7 +5421,7 @@ export default {
1
],
"location": [
- 303
+ 304
],
"__typename": [
1
@@ -5424,7 +5438,7 @@ export default {
1
],
"connectionSecurity": [
- 246
+ 247
],
"__typename": [
1
@@ -5435,13 +5449,13 @@ export default {
1
],
"IMAP": [
- 305
+ 306
],
"SMTP": [
- 305
+ 306
],
"CALDAV": [
- 305
+ 306
],
"__typename": [
1
@@ -5461,7 +5475,7 @@ export default {
3
],
"connectionParameters": [
- 306
+ 307
],
"__typename": [
1
@@ -5683,7 +5697,7 @@ export default {
1
],
"series": [
- 315
+ 316
],
"xAxisLabel": [
1
@@ -5732,7 +5746,7 @@ export default {
1
],
"data": [
- 317
+ 318
],
"__typename": [
1
@@ -5740,7 +5754,7 @@ export default {
},
"LineChartData": {
"series": [
- 318
+ 319
],
"xAxisLabel": [
1
@@ -5777,7 +5791,7 @@ export default {
},
"PieChartData": {
"data": [
- 320
+ 321
],
"showLegend": [
8
@@ -5882,13 +5896,13 @@ export default {
},
"EventLogQueryResult": {
"records": [
- 325
+ 326
],
"totalCount": [
26
],
"pageInfo": [
- 326
+ 327
],
"__typename": [
1
@@ -5952,7 +5966,7 @@ export default {
1
],
"parts": [
- 311
+ 312
],
"processedAt": [
4
@@ -5966,7 +5980,7 @@ export default {
},
"AgentChatThread": {
"id": [
- 204
+ 205
],
"title": [
1
@@ -6021,7 +6035,7 @@ export default {
},
"AiSystemPromptPreview": {
"sections": [
- 331
+ 332
],
"estimatedTokenCount": [
26
@@ -6049,7 +6063,7 @@ export default {
26
],
"error": [
- 333
+ 334
],
"__typename": [
1
@@ -6082,10 +6096,10 @@ export default {
},
"StartWorkspaceSetupChatResult": {
"outcome": [
- 338
+ 339
],
"thread": [
- 330
+ 331
],
"__typename": [
1
@@ -6123,10 +6137,10 @@ export default {
3
],
"evaluations": [
- 339
+ 340
],
"messages": [
- 329
+ 330
],
"createdAt": [
4
@@ -6168,7 +6182,7 @@ export default {
9
],
"scope": [
- 344
+ 345
],
"__typename": [
1
@@ -6183,19 +6197,19 @@ export default {
1
],
"syncStatus": [
- 346
+ 347
],
"syncStage": [
- 347
+ 348
],
"visibility": [
- 348
+ 349
],
"isContactAutoCreationEnabled": [
8
],
"contactAutoCreationPolicy": [
- 349
+ 350
],
"isSyncEnabled": [
8
@@ -6246,7 +6260,7 @@ export default {
1
],
"pendingSyncAction": [
- 351
+ 352
],
"messageChannelId": [
3
@@ -6264,7 +6278,7 @@ export default {
"MessageFolderPendingSyncAction": {},
"CollectionHash": {
"collectionName": [
- 353
+ 354
],
"hash": [
1
@@ -6328,13 +6342,13 @@ export default {
},
"MinimalMetadata": {
"objectMetadataItems": [
- 354
+ 355
],
"views": [
- 355
+ 356
],
"collectionHashes": [
- 352
+ 353
],
"__typename": [
1
@@ -6508,7 +6522,7 @@ export default {
2,
{
"input": [
- 358,
+ 359,
"GetApiKeyInput!"
]
}
@@ -6546,7 +6560,7 @@ export default {
161
],
"findWorkspaceInvitations": [
- 168
+ 169
],
"getApprovedAccessDomains": [
146
@@ -6614,20 +6628,20 @@ export default {
10,
{
"input": [
- 359,
+ 360,
"AgentIdInput!"
]
}
],
"objects": [
- 234,
+ 235,
{
"paging": [
25,
"CursorPaging!"
],
"filter": [
- 360,
+ 361,
"ObjectFilter!"
]
}
@@ -6642,7 +6656,7 @@ export default {
}
],
"objectRecordCounts": [
- 237
+ 238
],
"mostlyEmptyFieldMetadataIds": [
3,
@@ -6657,7 +6671,7 @@ export default {
21,
{
"input": [
- 361,
+ 362,
"LogicFunctionIdInput!"
]
}
@@ -6669,7 +6683,7 @@ export default {
9,
{
"input": [
- 361,
+ 362,
"LogicFunctionIdInput!"
]
}
@@ -6678,7 +6692,7 @@ export default {
1,
{
"input": [
- 361,
+ 362,
"LogicFunctionIdInput!"
]
}
@@ -6711,7 +6725,7 @@ export default {
67
],
"getPublicWorkspaceDataByDomain": [
- 182,
+ 183,
{
"origin": [
1
@@ -6719,7 +6733,7 @@ export default {
}
],
"getPublicWorkspaceDataById": [
- 183,
+ 184,
{
"id": [
3,
@@ -6728,7 +6742,7 @@ export default {
}
],
"findApplicationRegistrationByClientId": [
- 201,
+ 202,
{
"clientId": [
1,
@@ -6758,7 +6772,7 @@ export default {
}
],
"findApplicationRegistrationStats": [
- 175,
+ 176,
{
"id": [
1,
@@ -6767,7 +6781,7 @@ export default {
}
],
"findApplicationRegistrationVariables": [
- 173,
+ 174,
{
"applicationRegistrationId": [
1,
@@ -6785,7 +6799,7 @@ export default {
}
],
"findClaimableApplicationRegistration": [
- 199,
+ 200,
{
"sourcePackage": [
1
@@ -6819,7 +6833,7 @@ export default {
}
],
"findManyMarketplaceApps": [
- 215,
+ 216,
{
"universalIdentifiers": [
1,
@@ -6828,7 +6842,7 @@ export default {
}
],
"findMarketplaceAppDetail": [
- 219,
+ 220,
{
"universalIdentifier": [
1,
@@ -6837,7 +6851,7 @@ export default {
}
],
"publicMarketplaceApps": [
- 215,
+ 216,
{
"isVetted": [
8,
@@ -6846,7 +6860,7 @@ export default {
}
],
"publicMarketplaceAppDetail": [
- 219,
+ 220,
{
"universalIdentifier": [
1,
@@ -6855,7 +6869,7 @@ export default {
}
],
"fields": [
- 226,
+ 227,
{
"paging": [
25,
@@ -6868,7 +6882,7 @@ export default {
}
],
"field": [
- 222,
+ 223,
{
"id": [
3,
@@ -6897,28 +6911,28 @@ export default {
46
],
"previewMessageCampaignAudience": [
- 292,
+ 293,
{
"input": [
- 362,
+ 363,
"PreviewMessageCampaignAudienceInput!"
]
}
],
"messageSuppressions": [
- 299,
+ 300,
{
"input": [
- 363,
+ 364,
"FindMessageSuppressionsInput!"
]
}
],
"unsubscribeTopics": [
- 300
+ 301
],
"myMessageChannels": [
- 283,
+ 284,
{
"connectedAccountId": [
3
@@ -6926,13 +6940,13 @@ export default {
}
],
"getEmailingDomains": [
- 281
+ 282
],
"myConnectedAccounts": [
- 248
+ 249
],
"getToolIndex": [
- 310
+ 311
],
"getToolInputSchema": [
9,
@@ -6944,10 +6958,10 @@ export default {
}
],
"webhooks": [
- 309
+ 310
],
"webhook": [
- 309,
+ 310,
{
"id": [
3,
@@ -6956,7 +6970,7 @@ export default {
}
],
"myMessageFolders": [
- 350,
+ 351,
{
"messageChannelId": [
3
@@ -6964,7 +6978,7 @@ export default {
}
],
"myCalendarChannels": [
- 345,
+ 346,
{
"connectedAccountId": [
3
@@ -6972,45 +6986,45 @@ export default {
}
],
"minimalMetadata": [
- 356
+ 357
],
"appKeyValue": [
- 343,
+ 344,
{
"key": [
1,
"String!"
],
"scope": [
- 344
+ 345
]
}
],
"appConnections": [
- 203,
+ 204,
{
"filter": [
- 364
+ 365
]
}
],
"appConnection": [
- 203,
+ 204,
{
"id": [
- 204,
+ 205,
"ID!"
]
}
],
"findWorkspaceAiStats": [
- 341
+ 342
],
"chatThreads": [
- 330
+ 331
],
"chatThread": [
- 330,
+ 331,
{
"id": [
3,
@@ -7019,7 +7033,7 @@ export default {
}
],
"chatMessages": [
- 329,
+ 330,
{
"threadId": [
3,
@@ -7028,7 +7042,7 @@ export default {
}
],
"chatStreamCatchupChunks": [
- 334,
+ 335,
{
"threadId": [
3,
@@ -7037,13 +7051,13 @@ export default {
}
],
"getAiSystemPromptPreview": [
- 332
+ 333
],
"skills": [
- 328
+ 329
],
"skill": [
- 328,
+ 329,
{
"id": [
3,
@@ -7052,7 +7066,7 @@ export default {
}
],
"agentTurns": [
- 340,
+ 341,
{
"agentId": [
3,
@@ -7061,7 +7075,7 @@ export default {
}
],
"checkUserExists": [
- 268,
+ 269,
{
"email": [
1,
@@ -7073,7 +7087,7 @@ export default {
}
],
"checkWorkspaceInviteHashIsValid": [
- 269,
+ 270,
{
"inviteHash": [
1,
@@ -7091,7 +7105,7 @@ export default {
}
],
"checkWorkspaceSubdomainAvailability": [
- 263,
+ 264,
{
"subdomain": [
1,
@@ -7100,10 +7114,10 @@ export default {
}
],
"getWorkspaceCreationDefaults": [
- 264
+ 265
],
"validatePasswordResetToken": [
- 261,
+ 262,
{
"passwordResetToken": [
1,
@@ -7115,46 +7129,46 @@ export default {
70
],
"getSSOIdentityProviders": [
- 209
+ 210
],
"eventLogs": [
- 327,
+ 328,
{
"input": [
- 365,
+ 366,
"EventLogQueryInput!"
]
}
],
"pieChartData": [
- 321,
+ 322,
{
"input": [
- 369,
+ 370,
"PieChartDataInput!"
]
}
],
"lineChartData": [
- 319,
+ 320,
{
"input": [
- 370,
+ 371,
"LineChartDataInput!"
]
}
],
"barChartData": [
- 316,
+ 317,
{
"input": [
- 371,
+ 372,
"BarChartDataInput!"
]
}
],
"getConnectedImapSmtpCaldavAccount": [
- 307,
+ 308,
{
"id": [
3,
@@ -7163,7 +7177,7 @@ export default {
}
],
"getAutoCompleteAddress": [
- 302,
+ 303,
{
"address": [
1,
@@ -7182,7 +7196,7 @@ export default {
}
],
"getAddressDetails": [
- 304,
+ 305,
{
"placeId": [
1,
@@ -7195,18 +7209,18 @@ export default {
}
],
"getUsageAnalytics": [
- 274,
+ 275,
{
"input": [
- 372
+ 373
]
}
],
"findManyPublicDomains": [
- 279
+ 280
],
"currentUserApplicationAuthorizations": [
- 275
+ 276
],
"__typename": [
1
@@ -7230,10 +7244,10 @@ export default {
},
"ObjectFilter": {
"and": [
- 360
+ 361
],
"or": [
- 360
+ 361
],
"id": [
29
@@ -7265,7 +7279,7 @@ export default {
},
"LogicFunctionIdInput": {
"id": [
- 204
+ 205
],
"__typename": [
1
@@ -7284,7 +7298,7 @@ export default {
},
"FindMessageSuppressionsInput": {
"reason": [
- 297
+ 298
],
"searchTerm": [
1
@@ -7318,10 +7332,10 @@ export default {
},
"EventLogQueryInput": {
"table": [
- 366
+ 367
],
"filters": [
- 367
+ 368
],
"first": [
26
@@ -7342,7 +7356,7 @@ export default {
1
],
"dateRange": [
- 368
+ 369
],
"recordId": [
1
@@ -7409,7 +7423,7 @@ export default {
1
],
"operationTypes": [
- 373
+ 374
],
"__typename": [
1
@@ -7421,7 +7435,7 @@ export default {
8,
{
"input": [
- 375,
+ 376,
"AddQuerySubscriptionInput!"
]
}
@@ -7430,7 +7444,7 @@ export default {
8,
{
"input": [
- 376,
+ 377,
"RemoveQueryFromEventStreamInput!"
]
}
@@ -7439,7 +7453,7 @@ export default {
150,
{
"inputs": [
- 377,
+ 378,
"[CreateNavigationMenuItemInput!]!"
]
}
@@ -7448,7 +7462,7 @@ export default {
150,
{
"input": [
- 377,
+ 378,
"CreateNavigationMenuItemInput!"
]
}
@@ -7457,7 +7471,7 @@ export default {
150,
{
"inputs": [
- 378,
+ 379,
"[UpdateOneNavigationMenuItemInput!]!"
]
}
@@ -7466,7 +7480,7 @@ export default {
150,
{
"input": [
- 378,
+ 379,
"UpdateOneNavigationMenuItemInput!"
]
}
@@ -7501,7 +7515,7 @@ export default {
"Float!"
],
"fileFolder": [
- 380,
+ 381,
"FileFolder!"
],
"fieldMetadataId": [
@@ -7540,7 +7554,7 @@ export default {
147,
{
"file": [
- 381,
+ 382,
"Upload!"
]
}
@@ -7549,7 +7563,7 @@ export default {
147,
{
"file": [
- 381,
+ 382,
"Upload!"
]
}
@@ -7558,7 +7572,7 @@ export default {
147,
{
"file": [
- 381,
+ 382,
"Upload!"
]
}
@@ -7567,7 +7581,7 @@ export default {
147,
{
"file": [
- 381,
+ 382,
"Upload!"
]
}
@@ -7576,7 +7590,7 @@ export default {
147,
{
"file": [
- 381,
+ 382,
"Upload!"
]
}
@@ -7585,7 +7599,7 @@ export default {
147,
{
"file": [
- 381,
+ 382,
"Upload!"
],
"fieldMetadataId": [
@@ -7598,7 +7612,7 @@ export default {
147,
{
"file": [
- 381,
+ 382,
"Upload!"
],
"fieldMetadataUniversalIdentifier": [
@@ -7611,7 +7625,7 @@ export default {
53,
{
"input": [
- 382,
+ 383,
"CreateViewFilterGroupInput!"
]
}
@@ -7624,7 +7638,7 @@ export default {
"String!"
],
"input": [
- 383,
+ 384,
"UpdateViewFilterGroupInput!"
]
}
@@ -7651,7 +7665,7 @@ export default {
55,
{
"input": [
- 384,
+ 385,
"CreateViewFilterInput!"
]
}
@@ -7660,7 +7674,7 @@ export default {
55,
{
"input": [
- 385,
+ 386,
"UpdateViewFilterInput!"
]
}
@@ -7669,7 +7683,7 @@ export default {
55,
{
"input": [
- 387,
+ 388,
"DeleteViewFilterInput!"
]
}
@@ -7678,7 +7692,7 @@ export default {
55,
{
"input": [
- 388,
+ 389,
"DestroyViewFilterInput!"
]
}
@@ -7687,7 +7701,7 @@ export default {
61,
{
"input": [
- 389,
+ 390,
"CreateViewInput!"
]
}
@@ -7700,7 +7714,7 @@ export default {
"String!"
],
"input": [
- 390,
+ 391,
"UpdateViewInput!"
]
}
@@ -7727,7 +7741,7 @@ export default {
61,
{
"input": [
- 391,
+ 392,
"UpsertViewWidgetInput!"
]
}
@@ -7736,7 +7750,7 @@ export default {
58,
{
"input": [
- 397,
+ 398,
"CreateViewSortInput!"
]
}
@@ -7745,7 +7759,7 @@ export default {
58,
{
"input": [
- 398,
+ 399,
"UpdateViewSortInput!"
]
}
@@ -7754,7 +7768,7 @@ export default {
8,
{
"input": [
- 400,
+ 401,
"DeleteViewSortInput!"
]
}
@@ -7763,7 +7777,7 @@ export default {
8,
{
"input": [
- 401,
+ 402,
"DestroyViewSortInput!"
]
}
@@ -7772,7 +7786,7 @@ export default {
51,
{
"input": [
- 402,
+ 403,
"UpdateViewFieldInput!"
]
}
@@ -7781,7 +7795,7 @@ export default {
51,
{
"input": [
- 404,
+ 405,
"CreateViewFieldInput!"
]
}
@@ -7790,7 +7804,7 @@ export default {
51,
{
"inputs": [
- 404,
+ 405,
"[CreateViewFieldInput!]!"
]
}
@@ -7799,7 +7813,7 @@ export default {
51,
{
"input": [
- 405,
+ 406,
"DeleteViewFieldInput!"
]
}
@@ -7808,7 +7822,7 @@ export default {
51,
{
"input": [
- 406,
+ 407,
"DestroyViewFieldInput!"
]
}
@@ -7817,7 +7831,7 @@ export default {
60,
{
"input": [
- 407,
+ 408,
"UpdateViewFieldGroupInput!"
]
}
@@ -7826,7 +7840,7 @@ export default {
60,
{
"input": [
- 409,
+ 410,
"CreateViewFieldGroupInput!"
]
}
@@ -7835,7 +7849,7 @@ export default {
60,
{
"inputs": [
- 409,
+ 410,
"[CreateViewFieldGroupInput!]!"
]
}
@@ -7844,7 +7858,7 @@ export default {
60,
{
"input": [
- 410,
+ 411,
"DeleteViewFieldGroupInput!"
]
}
@@ -7853,7 +7867,7 @@ export default {
60,
{
"input": [
- 411,
+ 412,
"DestroyViewFieldGroupInput!"
]
}
@@ -7862,7 +7876,7 @@ export default {
61,
{
"input": [
- 412,
+ 413,
"UpsertFieldsWidgetInput!"
]
}
@@ -7871,7 +7885,7 @@ export default {
2,
{
"input": [
- 415,
+ 416,
"CreateApiKeyInput!"
]
}
@@ -7880,7 +7894,7 @@ export default {
2,
{
"input": [
- 416,
+ 417,
"UpdateApiKeyInput!"
]
}
@@ -7889,7 +7903,7 @@ export default {
2,
{
"input": [
- 417,
+ 418,
"RevokeApiKeyInput!"
]
}
@@ -7920,20 +7934,43 @@ export default {
26
],
"skipSyncEmailOnboardingStep": [
- 167
+ 168,
+ {
+ "isAutoSkipped": [
+ 8,
+ "Boolean!"
+ ]
+ }
],
"completeBookCallOnboardingStep": [
- 167
+ 168,
+ {
+ "hasBookedCall": [
+ 8,
+ "Boolean!"
+ ],
+ "isAutoSkipped": [
+ 8,
+ "Boolean!"
+ ]
+ }
],
"triggerInstallAppsOnboardingStep": [
- 167,
+ 168,
{
"universalIdentifiers": [
1,
"[String!]!"
+ ],
+ "isAutoSkipped": [
+ 8,
+ "Boolean!"
]
}
],
+ "goBackToPreviousOnboardingStep": [
+ 167
+ ],
"updateOneApplicationVariable": [
8,
{
@@ -8035,7 +8072,7 @@ export default {
}
],
"resendWorkspaceInvitation": [
- 169,
+ 170,
{
"appTokenId": [
1,
@@ -8044,7 +8081,7 @@ export default {
}
],
"sendInvitations": [
- 169,
+ 170,
{
"emails": [
1,
@@ -8059,7 +8096,7 @@ export default {
146,
{
"input": [
- 418,
+ 419,
"CreateApprovedAccessDomainInput!"
]
}
@@ -8068,7 +8105,7 @@ export default {
8,
{
"input": [
- 419,
+ 420,
"DeleteApprovedAccessDomainInput!"
]
}
@@ -8077,7 +8114,7 @@ export default {
146,
{
"input": [
- 420,
+ 421,
"ValidateApprovedAccessDomainInput!"
]
}
@@ -8086,7 +8123,7 @@ export default {
120,
{
"input": [
- 421,
+ 422,
"CreatePageLayoutTabInput!"
]
}
@@ -8099,7 +8136,7 @@ export default {
"String!"
],
"input": [
- 422,
+ 423,
"UpdatePageLayoutTabInput!"
]
}
@@ -8117,7 +8154,7 @@ export default {
121,
{
"input": [
- 423,
+ 424,
"CreatePageLayoutInput!"
]
}
@@ -8130,7 +8167,7 @@ export default {
"String!"
],
"input": [
- 424,
+ 425,
"UpdatePageLayoutInput!"
]
}
@@ -8152,7 +8189,7 @@ export default {
"String!"
],
"input": [
- 425,
+ 426,
"UpdatePageLayoutWithTabsInput!"
]
}
@@ -8188,7 +8225,7 @@ export default {
78,
{
"input": [
- 429,
+ 430,
"CreatePageLayoutWidgetInput!"
]
}
@@ -8201,7 +8238,7 @@ export default {
"String!"
],
"input": [
- 430,
+ 431,
"UpdatePageLayoutWidgetInput!"
]
}
@@ -8219,7 +8256,7 @@ export default {
10,
{
"input": [
- 431,
+ 432,
"CreateAgentInput!"
]
}
@@ -8228,7 +8265,7 @@ export default {
10,
{
"input": [
- 432,
+ 433,
"UpdateAgentInput!"
]
}
@@ -8237,7 +8274,7 @@ export default {
10,
{
"input": [
- 359,
+ 360,
"AgentIdInput!"
]
}
@@ -8246,7 +8283,7 @@ export default {
23,
{
"input": [
- 433,
+ 434,
"CreateOneObjectInput!"
]
}
@@ -8255,7 +8292,7 @@ export default {
23,
{
"input": [
- 435,
+ 436,
"DeleteOneObjectInput!"
]
}
@@ -8264,25 +8301,25 @@ export default {
23,
{
"input": [
- 436,
+ 437,
"UpdateOneObjectInput!"
]
}
],
"createOneIndex": [
- 230,
+ 231,
{
"input": [
- 438,
+ 439,
"CreateOneIndexInput!"
]
}
],
"deleteOneIndex": [
- 230,
+ 231,
{
"input": [
- 441,
+ 442,
"DeleteOneIndexInput!"
]
}
@@ -8291,7 +8328,7 @@ export default {
21,
{
"input": [
- 361,
+ 362,
"LogicFunctionIdInput!"
]
}
@@ -8300,7 +8337,7 @@ export default {
21,
{
"input": [
- 442,
+ 443,
"CreateLogicFunctionFromSourceInput!"
]
}
@@ -8309,7 +8346,7 @@ export default {
142,
{
"input": [
- 443,
+ 444,
"ExecuteOneLogicFunctionInput!"
]
}
@@ -8318,7 +8355,7 @@ export default {
8,
{
"input": [
- 444,
+ 445,
"UpdateLogicFunctionFromSourceInput!"
]
}
@@ -8327,7 +8364,7 @@ export default {
14,
{
"input": [
- 446,
+ 447,
"CreateCommandMenuItemInput!"
]
}
@@ -8336,7 +8373,7 @@ export default {
14,
{
"input": [
- 447,
+ 448,
"UpdateCommandMenuItemInput!"
]
}
@@ -8363,7 +8400,7 @@ export default {
13,
{
"input": [
- 448,
+ 449,
"CreateFrontComponentInput!"
]
}
@@ -8372,7 +8409,7 @@ export default {
13,
{
"input": [
- 449,
+ 450,
"UpdateFrontComponentInput!"
]
}
@@ -8390,7 +8427,7 @@ export default {
67,
{
"data": [
- 451,
+ 452,
"ActivateWorkspaceInput!"
]
}
@@ -8399,7 +8436,7 @@ export default {
67,
{
"data": [
- 452,
+ 453,
"UpdateWorkspaceInput!"
]
}
@@ -8408,10 +8445,10 @@ export default {
67
],
"checkCustomDomainValidRecords": [
- 242
+ 243
],
"enrichWorkspaceCompany": [
- 220
+ 221
],
"upgradeApplication": [
8,
@@ -8427,10 +8464,10 @@ export default {
}
],
"createApplicationRegistration": [
- 200,
+ 201,
{
"input": [
- 453,
+ 454,
"CreateApplicationRegistrationInput!"
]
}
@@ -8439,7 +8476,7 @@ export default {
73,
{
"input": [
- 454,
+ 455,
"UpdateApplicationRegistrationInput!"
]
}
@@ -8454,7 +8491,7 @@ export default {
}
],
"rotateApplicationRegistrationClientSecret": [
- 202,
+ 203,
{
"id": [
1,
@@ -8463,19 +8500,19 @@ export default {
}
],
"createApplicationRegistrationVariable": [
- 173,
+ 174,
{
"input": [
- 456,
+ 457,
"CreateApplicationRegistrationVariableInput!"
]
}
],
"updateApplicationRegistrationVariable": [
- 173,
+ 174,
{
"input": [
- 457,
+ 458,
"UpdateApplicationRegistrationVariableInput!"
]
}
@@ -8493,7 +8530,7 @@ export default {
73,
{
"file": [
- 381,
+ 382,
"Upload!"
],
"universalIdentifier": [
@@ -8555,7 +8592,7 @@ export default {
"UUID!"
],
"input": [
- 459,
+ 460,
"UpdateApplicationInput!"
]
}
@@ -8573,28 +8610,28 @@ export default {
8
],
"createOneField": [
- 222,
+ 223,
{
"input": [
- 460,
+ 461,
"CreateOneFieldMetadataInput!"
]
}
],
"updateOneField": [
- 222,
+ 223,
{
"input": [
- 462,
+ 463,
"UpdateOneFieldMetadataInput!"
]
}
],
"deleteOneField": [
- 222,
+ 223,
{
"input": [
- 464,
+ 465,
"DeleteOneFieldInput!"
]
}
@@ -8603,7 +8640,7 @@ export default {
57,
{
"input": [
- 465,
+ 466,
"CreateViewGroupInput!"
]
}
@@ -8612,7 +8649,7 @@ export default {
57,
{
"inputs": [
- 465,
+ 466,
"[CreateViewGroupInput!]!"
]
}
@@ -8621,7 +8658,7 @@ export default {
57,
{
"input": [
- 466,
+ 467,
"UpdateViewGroupInput!"
]
}
@@ -8630,7 +8667,7 @@ export default {
57,
{
"inputs": [
- 466,
+ 467,
"[UpdateViewGroupInput!]!"
]
}
@@ -8639,7 +8676,7 @@ export default {
57,
{
"input": [
- 468,
+ 469,
"DeleteViewGroupInput!"
]
}
@@ -8648,7 +8685,7 @@ export default {
57,
{
"input": [
- 469,
+ 470,
"DestroyViewGroupInput!"
]
}
@@ -8670,7 +8707,7 @@ export default {
46,
{
"createRoleInput": [
- 470,
+ 471,
"CreateRoleInput!"
]
}
@@ -8679,7 +8716,7 @@ export default {
46,
{
"updateRoleInput": [
- 471,
+ 472,
"UpdateRoleInput!"
]
}
@@ -8697,7 +8734,7 @@ export default {
43,
{
"upsertObjectPermissionsInput": [
- 473,
+ 474,
"UpsertObjectPermissionsInput!"
]
}
@@ -8706,7 +8743,7 @@ export default {
44,
{
"upsertPermissionFlagsInput": [
- 475,
+ 476,
"UpsertPermissionFlagsInput!"
]
}
@@ -8715,16 +8752,16 @@ export default {
38,
{
"upsertFieldPermissionsInput": [
- 476,
+ 477,
"UpsertFieldPermissionsInput!"
]
}
],
"upsertRowLevelPermissionPredicates": [
- 243,
+ 244,
{
"input": [
- 478,
+ 479,
"UpsertRowLevelPermissionPredicatesInput!"
]
}
@@ -8752,46 +8789,46 @@ export default {
}
],
"sendEmailViaEmailingDomain": [
- 293,
+ 294,
{
"input": [
- 481,
+ 482,
"SendEmailViaDomainInput!"
]
}
],
"sendMessageCampaign": [
- 295,
+ 296,
{
"input": [
- 482,
+ 483,
"SendMessageCampaignInput!"
]
}
],
"sendMessageCampaignTest": [
- 293,
+ 294,
{
"input": [
- 483,
+ 484,
"SendMessageCampaignTestInput!"
]
}
],
"createUnsubscribeTopic": [
- 300,
+ 301,
{
"input": [
- 484,
+ 485,
"CreateUnsubscribeTopicInput!"
]
}
],
"updateUnsubscribeTopic": [
- 300,
+ 301,
{
"input": [
- 485,
+ 486,
"UpdateUnsubscribeTopicInput!"
]
}
@@ -8806,34 +8843,34 @@ export default {
}
],
"updateMessageChannel": [
- 283,
+ 284,
{
"input": [
- 486,
+ 487,
"UpdateMessageChannelInput!"
]
}
],
"createEmailGroupChannel": [
- 291,
+ 292,
{
"input": [
- 488,
+ 489,
"CreateEmailGroupChannelInput!"
]
}
],
"updateEmailGroupChannel": [
- 283,
+ 284,
{
"input": [
- 489,
+ 490,
"UpdateEmailGroupChannelInput!"
]
}
],
"deleteEmailGroupChannel": [
- 283,
+ 284,
{
"id": [
3,
@@ -8842,10 +8879,10 @@ export default {
}
],
"createEmailingDomain": [
- 281,
+ 282,
{
"input": [
- 490,
+ 491,
"CreateEmailingDomainInput!"
]
}
@@ -8860,7 +8897,7 @@ export default {
}
],
"verifyEmailingDomain": [
- 281,
+ 282,
{
"id": [
1,
@@ -8869,7 +8906,7 @@ export default {
}
],
"deleteConnectedAccount": [
- 248,
+ 249,
{
"id": [
3,
@@ -8878,34 +8915,34 @@ export default {
}
],
"runAgent": [
- 312,
+ 313,
{
"input": [
- 491,
+ 492,
"RunAgentInput!"
]
}
],
"createWebhook": [
- 309,
+ 310,
{
"input": [
- 494,
+ 495,
"CreateWebhookInput!"
]
}
],
"updateWebhook": [
- 309,
+ 310,
{
"input": [
- 495,
+ 496,
"UpdateWebhookInput!"
]
}
],
"deleteWebhook": [
- 309,
+ 310,
{
"id": [
3,
@@ -8914,37 +8951,37 @@ export default {
}
],
"updateMessageFolder": [
- 350,
+ 351,
{
"input": [
- 497,
+ 498,
"UpdateMessageFolderInput!"
]
}
],
"updateMessageFolders": [
- 350,
+ 351,
{
"input": [
- 499,
+ 500,
"UpdateMessageFoldersInput!"
]
}
],
"updateCalendarChannel": [
- 345,
+ 346,
{
"input": [
- 500,
+ 501,
"UpdateCalendarChannelInput!"
]
}
],
"setAppKeyValue": [
- 343,
+ 344,
{
"input": [
- 502,
+ 503,
"SetAppKeyValueInput!"
]
}
@@ -8957,24 +8994,24 @@ export default {
"String!"
],
"scope": [
- 344
+ 345
]
}
],
"enqueueJob": [
- 342,
+ 343,
{
"input": [
- 503,
+ 504,
"EnqueueJobInput!"
]
}
],
"createChatThread": [
- 330
+ 331
],
"sendChatMessage": [
- 335,
+ 336,
{
"threadId": [
3,
@@ -8995,13 +9032,13 @@ export default {
1
],
"fileAttachments": [
- 504,
+ 505,
"[FileAttachmentInput!]"
]
}
],
"retryChatMessage": [
- 335,
+ 336,
{
"threadId": [
3,
@@ -9013,7 +9050,7 @@ export default {
}
],
"answerAgentChatQuestion": [
- 335,
+ 336,
{
"threadId": [
3,
@@ -9024,7 +9061,7 @@ export default {
"UUID!"
],
"answers": [
- 505,
+ 506,
"[AgentChatQuestionAnswerInput!]!"
],
"modelId": [
@@ -9042,7 +9079,7 @@ export default {
}
],
"renameChatThread": [
- 330,
+ 331,
{
"id": [
3,
@@ -9055,7 +9092,7 @@ export default {
}
],
"archiveChatThread": [
- 330,
+ 331,
{
"id": [
3,
@@ -9064,7 +9101,7 @@ export default {
}
],
"unarchiveChatThread": [
- 330,
+ 331,
{
"id": [
3,
@@ -9091,7 +9128,7 @@ export default {
}
],
"startWorkspaceSetupChat": [
- 337,
+ 338,
{
"companyContext": [
9
@@ -9099,25 +9136,25 @@ export default {
}
],
"createSkill": [
- 328,
+ 329,
{
"input": [
- 506,
+ 507,
"CreateSkillInput!"
]
}
],
"updateSkill": [
- 328,
+ 329,
{
"input": [
- 507,
+ 508,
"UpdateSkillInput!"
]
}
],
"deleteSkill": [
- 328,
+ 329,
{
"id": [
3,
@@ -9126,7 +9163,7 @@ export default {
}
],
"activateSkill": [
- 328,
+ 329,
{
"id": [
3,
@@ -9135,7 +9172,7 @@ export default {
}
],
"deactivateSkill": [
- 328,
+ 329,
{
"id": [
3,
@@ -9144,7 +9181,7 @@ export default {
}
],
"evaluateAgentTurn": [
- 339,
+ 340,
{
"turnId": [
3,
@@ -9153,7 +9190,7 @@ export default {
}
],
"runEvaluationInput": [
- 340,
+ 341,
{
"agentId": [
3,
@@ -9166,16 +9203,16 @@ export default {
}
],
"getAuthorizationUrlForSSO": [
- 256,
+ 257,
{
"input": [
- 508,
+ 509,
"GetAuthorizationUrlForSSOInput!"
]
}
],
"getLoginTokenFromCredentials": [
- 267,
+ 268,
{
"email": [
1,
@@ -9201,7 +9238,7 @@ export default {
}
],
"signIn": [
- 254,
+ 255,
{
"email": [
1,
@@ -9223,7 +9260,7 @@ export default {
}
],
"verifyEmailAndGetLoginToken": [
- 262,
+ 263,
{
"emailVerificationToken": [
1,
@@ -9243,7 +9280,7 @@ export default {
}
],
"verifyEmailAndGetWorkspaceAgnosticToken": [
- 254,
+ 255,
{
"emailVerificationToken": [
1,
@@ -9259,7 +9296,7 @@ export default {
}
],
"getAuthTokensFromOTP": [
- 266,
+ 267,
{
"otp": [
1,
@@ -9279,7 +9316,7 @@ export default {
}
],
"signUp": [
- 254,
+ 255,
{
"email": [
1,
@@ -9301,7 +9338,7 @@ export default {
}
],
"signUpInWorkspace": [
- 259,
+ 260,
{
"email": [
1,
@@ -9332,10 +9369,10 @@ export default {
}
],
"signUpInNewWorkspace": [
- 259,
+ 260,
{
"input": [
- 509
+ 510
]
}
],
@@ -9347,16 +9384,16 @@ export default {
"String!"
],
"file": [
- 381,
+ 382,
"Upload!"
]
}
],
"generateTransientToken": [
- 260
+ 261
],
"getAuthTokensFromLoginToken": [
- 266,
+ 267,
{
"loginToken": [
1,
@@ -9369,7 +9406,7 @@ export default {
}
],
"getAuthTokensFromSSOExchangeToken": [
- 266,
+ 267,
{
"ssoExchangeToken": [
1,
@@ -9378,7 +9415,7 @@ export default {
}
],
"authorizeApp": [
- 252,
+ 253,
{
"clientId": [
1,
@@ -9400,7 +9437,7 @@ export default {
}
],
"renewToken": [
- 266,
+ 267,
{
"appToken": [
1,
@@ -9417,7 +9454,7 @@ export default {
}
],
"generateApiKeyToken": [
- 265,
+ 266,
{
"apiKeyId": [
3,
@@ -9433,7 +9470,7 @@ export default {
11
],
"emailPasswordResetLink": [
- 255,
+ 256,
{
"email": [
1,
@@ -9448,7 +9485,7 @@ export default {
}
],
"updatePasswordViaResetToken": [
- 257,
+ 258,
{
"passwordResetToken": [
1,
@@ -9461,7 +9498,7 @@ export default {
}
],
"initiateOTPProvisioning": [
- 250,
+ 251,
{
"loginToken": [
1,
@@ -9474,10 +9511,10 @@ export default {
}
],
"initiateOTPProvisioningForAuthenticatedUser": [
- 250
+ 251
],
"deleteTwoFactorAuthenticationMethod": [
- 249,
+ 250,
{
"twoFactorAuthenticationMethodId": [
3,
@@ -9486,7 +9523,7 @@ export default {
}
],
"verifyTwoFactorAuthenticationMethodForAuthenticatedUser": [
- 251,
+ 252,
{
"otp": [
1,
@@ -9510,7 +9547,7 @@ export default {
8,
{
"input": [
- 510,
+ 511,
"UpdateWorkspaceMemberSettingsInput!"
]
}
@@ -9528,7 +9565,7 @@ export default {
}
],
"resendEmailVerificationToken": [
- 205,
+ 206,
{
"email": [
1,
@@ -9541,43 +9578,43 @@ export default {
}
],
"createOIDCIdentityProvider": [
- 210,
+ 211,
{
"input": [
- 511,
+ 512,
"SetupOIDCSsoInput!"
]
}
],
"createSAMLIdentityProvider": [
- 210,
+ 211,
{
"input": [
- 512,
+ 513,
"SetupSAMLSsoInput!"
]
}
],
"deleteSSOIdentityProvider": [
- 206,
+ 207,
{
"input": [
- 513,
+ 514,
"DeleteSsoInput!"
]
}
],
"editSSOIdentityProvider": [
- 207,
+ 208,
{
"input": [
- 514,
+ 515,
"EditSsoInput!"
]
}
],
"createObjectEvent": [
- 324,
+ 325,
{
"event": [
1,
@@ -9597,10 +9634,10 @@ export default {
}
],
"trackAnalytics": [
- 324,
+ 325,
{
"type": [
- 515,
+ 516,
"AnalyticsType!"
],
"name": [
@@ -9615,7 +9652,7 @@ export default {
}
],
"duplicateDashboard": [
- 322,
+ 323,
{
"id": [
3,
@@ -9624,7 +9661,7 @@ export default {
}
],
"impersonate": [
- 270,
+ 271,
{
"userId": [
3,
@@ -9637,28 +9674,28 @@ export default {
}
],
"stopImpersonation": [
- 271
+ 272
],
"createCalendarEvent": [
- 314,
+ 315,
{
"input": [
- 516,
+ 517,
"CreateCalendarEventInput!"
]
}
],
"sendEmail": [
- 323,
+ 324,
{
"input": [
- 517,
+ 518,
"SendEmailInput!"
]
}
],
"startChannelSync": [
- 313,
+ 314,
{
"connectedAccountId": [
3,
@@ -9667,14 +9704,14 @@ export default {
}
],
"saveImapSmtpCaldavAccount": [
- 308,
+ 309,
{
"handle": [
1,
"String!"
],
"connectionParameters": [
- 519,
+ 520,
"EmailAccountConnectionParameters!"
],
"id": [
@@ -9683,16 +9720,16 @@ export default {
}
],
"updateLabPublicFeatureFlag": [
- 170,
+ 171,
{
"input": [
- 521,
+ 522,
"UpdateLabPublicFeatureFlagInput!"
]
}
],
"createPublicDomain": [
- 279,
+ 280,
{
"domain": [
1,
@@ -9714,7 +9751,7 @@ export default {
}
],
"checkPublicDomainValidRecords": [
- 242,
+ 243,
{
"domain": [
1,
@@ -9723,7 +9760,7 @@ export default {
}
],
"createDevelopmentApplication": [
- 276,
+ 277,
{
"universalIdentifier": [
1,
@@ -9736,7 +9773,7 @@ export default {
}
],
"syncApplication": [
- 277,
+ 278,
{
"manifest": [
9,
@@ -9748,10 +9785,10 @@ export default {
}
],
"uploadApplicationFile": [
- 278,
+ 279,
{
"file": [
- 381,
+ 382,
"Upload!"
],
"applicationUniversalIdentifier": [
@@ -9759,7 +9796,7 @@ export default {
"String!"
],
"fileFolder": [
- 380,
+ 381,
"FileFolder!"
],
"filePath": [
@@ -9873,7 +9910,7 @@ export default {
3
],
"update": [
- 379
+ 380
],
"__typename": [
1
@@ -9984,7 +10021,7 @@ export default {
3
],
"update": [
- 386
+ 387
],
"__typename": [
1
@@ -10155,19 +10192,19 @@ export default {
3
],
"view": [
- 392
+ 393
],
"viewFields": [
- 393
+ 394
],
"viewFilters": [
- 394
+ 395
],
"viewFilterGroups": [
- 395
+ 396
],
"viewSorts": [
- 396
+ 397
],
"__typename": [
1
@@ -10316,7 +10353,7 @@ export default {
3
],
"update": [
- 399
+ 400
],
"__typename": [
1
@@ -10354,7 +10391,7 @@ export default {
3
],
"update": [
- 403
+ 404
],
"__typename": [
1
@@ -10430,7 +10467,7 @@ export default {
3
],
"update": [
- 408
+ 409
],
"__typename": [
1
@@ -10494,10 +10531,10 @@ export default {
3
],
"groups": [
- 413
+ 414
],
"fields": [
- 414
+ 415
],
"__typename": [
1
@@ -10517,7 +10554,7 @@ export default {
8
],
"fields": [
- 414
+ 415
],
"__typename": [
1
@@ -10685,7 +10722,7 @@ export default {
3
],
"tabs": [
- 426
+ 427
],
"__typename": [
1
@@ -10708,7 +10745,7 @@ export default {
82
],
"widgets": [
- 427
+ 428
],
"__typename": [
1
@@ -10731,7 +10768,7 @@ export default {
3
],
"gridPosition": [
- 428
+ 429
],
"position": [
9
@@ -10780,7 +10817,7 @@ export default {
3
],
"gridPosition": [
- 428
+ 429
],
"position": [
9
@@ -10806,7 +10843,7 @@ export default {
3
],
"gridPosition": [
- 428
+ 429
],
"position": [
9
@@ -10899,7 +10936,7 @@ export default {
},
"CreateOneObjectInput": {
"object": [
- 434
+ 435
],
"__typename": [
1
@@ -10959,7 +10996,7 @@ export default {
},
"UpdateOneObjectInput": {
"update": [
- 437
+ 438
],
"id": [
3
@@ -11017,7 +11054,7 @@ export default {
},
"CreateOneIndexInput": {
"index": [
- 439
+ 440
],
"__typename": [
1
@@ -11028,10 +11065,10 @@ export default {
3
],
"fields": [
- 440
+ 441
],
"indexType": [
- 231
+ 232
],
"__typename": [
1
@@ -11113,7 +11150,7 @@ export default {
3
],
"update": [
- 445
+ 446
],
"__typename": [
1
@@ -11273,7 +11310,7 @@ export default {
3
],
"update": [
- 450
+ 451
],
"__typename": [
1
@@ -11400,7 +11437,7 @@ export default {
1
],
"update": [
- 455
+ 456
],
"__typename": [
1
@@ -11454,7 +11491,7 @@ export default {
1
],
"update": [
- 458
+ 459
],
"__typename": [
1
@@ -11484,7 +11521,7 @@ export default {
},
"CreateOneFieldMetadataInput": {
"field": [
- 461
+ 462
],
"__typename": [
1
@@ -11492,7 +11529,7 @@ export default {
},
"CreateFieldInput": {
"type": [
- 223
+ 224
],
"name": [
1
@@ -11557,7 +11594,7 @@ export default {
3
],
"update": [
- 463
+ 464
],
"__typename": [
1
@@ -11652,7 +11689,7 @@ export default {
3
],
"update": [
- 467
+ 468
],
"__typename": [
1
@@ -11737,7 +11774,7 @@ export default {
},
"UpdateRoleInput": {
"update": [
- 472
+ 473
],
"id": [
3
@@ -11792,7 +11829,7 @@ export default {
3
],
"objectPermissions": [
- 474
+ 475
],
"__typename": [
1
@@ -11834,7 +11871,7 @@ export default {
3
],
"fieldPermissions": [
- 477
+ 478
],
"__typename": [
1
@@ -11865,10 +11902,10 @@ export default {
3
],
"predicates": [
- 479
+ 480
],
"predicateGroups": [
- 480
+ 481
],
"__typename": [
1
@@ -11994,7 +12031,7 @@ export default {
1
],
"visibility": [
- 301
+ 302
],
"__typename": [
1
@@ -12011,7 +12048,7 @@ export default {
1
],
"visibility": [
- 301
+ 302
],
"__typename": [
1
@@ -12022,7 +12059,7 @@ export default {
3
],
"update": [
- 487
+ 488
],
"__typename": [
1
@@ -12030,16 +12067,16 @@ export default {
},
"UpdateMessageChannelInputUpdates": {
"visibility": [
- 284
+ 285
],
"isContactAutoCreationEnabled": [
8
],
"contactAutoCreationPolicy": [
- 286
+ 287
],
"messageFolderImportPolicy": [
- 287
+ 288
],
"isSyncEnabled": [
8
@@ -12095,7 +12132,7 @@ export default {
3
],
"messages": [
- 492
+ 493
],
"__typename": [
1
@@ -12103,7 +12140,7 @@ export default {
},
"RunAgentMessageInput": {
"role": [
- 493
+ 494
],
"content": [
1
@@ -12138,7 +12175,7 @@ export default {
3
],
"update": [
- 496
+ 497
],
"__typename": [
1
@@ -12166,7 +12203,7 @@ export default {
3
],
"update": [
- 498
+ 499
],
"__typename": [
1
@@ -12185,7 +12222,7 @@ export default {
3
],
"update": [
- 498
+ 499
],
"__typename": [
1
@@ -12196,7 +12233,7 @@ export default {
3
],
"update": [
- 501
+ 502
],
"__typename": [
1
@@ -12204,13 +12241,13 @@ export default {
},
"UpdateCalendarChannelInputUpdates": {
"visibility": [
- 348
+ 349
],
"isContactAutoCreationEnabled": [
8
],
"contactAutoCreationPolicy": [
- 349
+ 350
],
"isSyncEnabled": [
8
@@ -12227,7 +12264,7 @@ export default {
9
],
"scope": [
- 344
+ 345
],
"__typename": [
1
@@ -12410,7 +12447,7 @@ export default {
3
],
"status": [
- 179
+ 180
],
"__typename": [
1
@@ -12481,7 +12518,7 @@ export default {
1
],
"files": [
- 518
+ 519
],
"__typename": [
1
@@ -12503,13 +12540,13 @@ export default {
1
],
"IMAP": [
- 520
+ 521
],
"SMTP": [
- 520
+ 521
],
"CALDAV": [
- 520
+ 521
],
"__typename": [
1
@@ -12529,7 +12566,7 @@ export default {
1
],
"connectionSecurity": [
- 246
+ 247
],
"__typename": [
1
@@ -12557,16 +12594,16 @@ export default {
}
],
"logicFunctionLogs": [
- 244,
+ 245,
{
"input": [
- 523,
+ 524,
"LogicFunctionLogsInput!"
]
}
],
"onAgentChatEvent": [
- 336,
+ 337,
{
"threadId": [
3,
@@ -12575,10 +12612,10 @@ export default {
}
],
"eventLogsLive": [
- 325,
+ 326,
{
"table": [
- 366,
+ 367,
"EventLogTable!"
]
}
diff --git a/packages/twenty-e2e-testing/tests/authentication/onboarding.spec.ts b/packages/twenty-e2e-testing/tests/authentication/onboarding.spec.ts
index d61d1752589..1c17a4b02f0 100644
--- a/packages/twenty-e2e-testing/tests/authentication/onboarding.spec.ts
+++ b/packages/twenty-e2e-testing/tests/authentication/onboarding.spec.ts
@@ -34,6 +34,8 @@ test('New workspace signup goes through every onboarding stage', async ({
await page.waitForURL('**/workspace-activation', { timeout: 90000 });
});
+ let hasSkippedSyncEmailStage = false;
+
await test.step('Sync-email stage (skip when shown)', async () => {
const syncEmailsHeading = page.getByText('Import your contacts');
const installAppsHeading = page.getByText('Install your first apps');
@@ -44,11 +46,28 @@ test('New workspace signup goes through every onboarding stage', async ({
if (await syncEmailsHeading.isVisible()) {
await loginPage.clickSkipOnboardingStep();
+ hasSkippedSyncEmailStage = true;
}
});
await test.step('Install-apps stage', async () => {
await expect(page.getByText('Install your first apps')).toBeVisible();
+
+ if (hasSkippedSyncEmailStage) {
+ await test.step('Goes back to the skipped sync-email stage', async () => {
+ await page.getByRole('button', { name: 'Go back' }).click();
+ await expect(page.getByText('Import your contacts')).toBeVisible();
+
+ await page.reload();
+ await expect(page.getByText('Import your contacts')).toBeVisible({
+ timeout: 30000,
+ });
+
+ await loginPage.clickSkipOnboardingStep();
+ await expect(page.getByText('Install your first apps')).toBeVisible();
+ });
+ }
+
await loginPage.clickSkipOnboardingStep();
});
diff --git a/packages/twenty-front/src/generated-metadata/graphql.ts b/packages/twenty-front/src/generated-metadata/graphql.ts
index a776db48f69..5cf94220395 100644
--- a/packages/twenty-front/src/generated-metadata/graphql.ts
+++ b/packages/twenty-front/src/generated-metadata/graphql.ts
@@ -2723,6 +2723,7 @@ export type Mutation = {
getAuthTokensFromSSOExchangeToken: AuthTokens;
getAuthorizationUrlForSSO: GetAuthorizationUrlForSso;
getLoginTokenFromCredentials: LoginToken;
+ goBackToPreviousOnboardingStep: OnboardingStepNavigation;
impersonate: Impersonate;
initiateOTPProvisioning: InitiateTwoFactorAuthenticationProvisioning;
initiateOTPProvisioningForAuthenticatedUser: InitiateTwoFactorAuthenticationProvisioning;
@@ -2911,6 +2912,12 @@ export type MutationClaimApplicationRegistrationOwnershipArgs = {
};
+export type MutationCompleteBookCallOnboardingStepArgs = {
+ hasBookedCall?: Scalars['Boolean']['input'];
+ isAutoSkipped?: Scalars['Boolean']['input'];
+};
+
+
export type MutationCompleteFileUploadArgs = {
fileId: Scalars['String']['input'];
};
@@ -3648,6 +3655,11 @@ export type MutationSignUpInWorkspaceArgs = {
};
+export type MutationSkipSyncEmailOnboardingStepArgs = {
+ isAutoSkipped?: Scalars['Boolean']['input'];
+};
+
+
export type MutationStartChannelSyncArgs = {
connectedAccountId: Scalars['UUID']['input'];
};
@@ -3684,6 +3696,7 @@ export type MutationTransferApplicationRegistrationOwnershipArgs = {
export type MutationTriggerInstallAppsOnboardingStepArgs = {
+ isAutoSkipped?: Scalars['Boolean']['input'];
universalIdentifiers: Array<Scalars['String']['input']>;
};
@@ -4251,6 +4264,14 @@ export enum OnboardingStatus {
WORKSPACE_ACTIVATION = 'WORKSPACE_ACTIVATION'
}
+export type OnboardingStepNavigation = {
+ __typename?: 'OnboardingStepNavigation';
+ /** Onboarding status the user landed on */
+ onboardingStatus?: Maybe<OnboardingStatus>;
+ /** Step the user can go back to from there, if any */
+ previousOnboardingStatus?: Maybe<OnboardingStatus>;
+};
+
export type OnboardingStepSuccess = {
__typename?: 'OnboardingStepSuccess';
/** Boolean that confirms query was dispatched */
@@ -6221,6 +6242,7 @@ export type User = {
lastName: Scalars['String']['output'];
locale: Scalars['String']['output'];
onboardingStatus?: Maybe<OnboardingStatus>;
+ previousOnboardingStatus?: Maybe<OnboardingStatus>;
supportUserHash?: Maybe<Scalars['String']['output']>;
updatedAt: Scalars['DateTime']['output'];
userVars?: Maybe<Scalars['JSONObject']['output']>;
@@ -7811,7 +7833,10 @@ export type MostlyEmptyFieldMetadataIdsQueryVariables = Exact<{
export type MostlyEmptyFieldMetadataIdsQuery = { __typename?: 'Query', mostlyEmptyFieldMetadataIds: Array<string> };
-export type CompleteBookCallOnboardingStepMutationVariables = Exact<{ [key: string]: never; }>;
+export type CompleteBookCallOnboardingStepMutationVariables = Exact<{
+ hasBookedCall: Scalars['Boolean']['input'];
+ isAutoSkipped: Scalars['Boolean']['input'];
+}>;
export type CompleteBookCallOnboardingStepMutation = { __typename?: 'Mutation', completeBookCallOnboardingStep: { __typename?: 'OnboardingStepSuccess', success: boolean } };
@@ -7821,7 +7846,14 @@ export type EnrichWorkspaceCompanyMutationVariables = Exact<{ [key: string]: nev
export type EnrichWorkspaceCompanyMutation = { __typename?: 'Mutation', enrichWorkspaceCompany: { __typename?: 'WorkspaceCompanyEnrichmentResult', outcome: WorkspaceCompanyEnrichmentOutcome, enrichment?: any | null, isBookCallOnboardingStepPending: boolean } };
-export type SkipSyncEmailOnboardingStepMutationVariables = Exact<{ [key: string]: never; }>;
+export type GoBackToPreviousOnboardingStepMutationVariables = Exact<{ [key: string]: never; }>;
+
+
+export type GoBackToPreviousOnboardingStepMutation = { __typename?: 'Mutation', goBackToPreviousOnboardingStep: { __typename?: 'OnboardingStepNavigation', onboardingStatus?: OnboardingStatus | null, previousOnboardingStatus?: OnboardingStatus | null } };
+
+export type SkipSyncEmailOnboardingStepMutationVariables = Exact<{
+ isAutoSkipped: Scalars['Boolean']['input'];
+}>;
export type SkipSyncEmailOnboardingStepMutation = { __typename?: 'Mutation', skipSyncEmailOnboardingStep: { __typename?: 'OnboardingStepSuccess', success: boolean } };
@@ -7835,6 +7867,7 @@ export type StartWorkspaceSetupChatMutation = { __typename?: 'Mutation', startWo
export type TriggerInstallAppsOnboardingStepMutationVariables = Exact<{
universalIdentifiers: Array<Scalars['String']['input']> | Scalars['String']['input'];
+ isAutoSkipped: Scalars['Boolean']['input'];
}>;
@@ -8907,7 +8940,7 @@ export type CurrentBillingSubscriptionFragmentFragment = { __typename?: 'Billing
| { __typename?: 'BillingMeteredProduct', name: string, description: string, images?: Array<string> | null, metadata: { __typename?: 'BillingProductMetadata', productKey: BillingProductKey, planKey: BillingPlanKey, priceUsageBased: BillingUsageType } }
}> | null };
-export type UserQueryFragmentFragment = { __typename?: 'User', id: string, firstName: string, lastName: string, email: string, hasPassword: boolean, canAccessFullAdminPanel: boolean, canImpersonate: boolean, supportUserHash?: string | null, onboardingStatus?: OnboardingStatus | null, isWorkspaceCreator?: boolean | null, userVars?: any | null, workspaceMember?: { __typename?: 'WorkspaceMember', id: string, colorScheme: string, openRecordIn: OpenRecordIn, avatarUrl?: string | null, locale?: string | null, userEmail: string, userWorkspaceId?: string | null, timeZone?: string | null, dateFormat?: WorkspaceMemberDateFormatEnum | null, timeFormat?: WorkspaceMemberTimeFormatEnum | null, calendarStartDay?: number | null, numberFormat?: WorkspaceMemberNumberFormatEnum | null, name: { __typename?: 'FullName', firstName: string, lastName: string } } | null, workspaceMembers?: Array<{ __typename?: 'WorkspaceMember', id: string, avatarUrl?: string | null, userEmail: string, userWorkspaceId?: string | null, name: { __typename?: 'FullName', firstName: string, lastName: string } }> | null, deletedWorkspaceMembers?: Array<{ __typename?: 'DeletedWorkspaceMember', id: string, avatarUrl?: string | null, userEmail: string, name: { __typename?: 'FullName', firstName: string, lastName: string } }> | null, currentUserWorkspace?: { __typename?: 'UserWorkspace', id: string, permissionFlags?: Array<PermissionFlagType> | null, isImpersonating?: boolean | null, objectsPermissions?: Array<{ __typename?: 'ObjectPermission', objectMetadataId: string, canReadObjectRecords?: boolean | null, canUpdateObjectRecords?: boolean | null, canSoftDeleteObjectRecords?: boolean | null, canDestroyObjectRecords?: boolean | null, restrictedFields?: any | null, rowLevelPermissionPredicates?: Array<{ __typename?: 'RowLevelPermissionPredicate', id: string, fieldMetadataId: string, objectMetadataId: string, operand: RowLevelPermissionPredicateOperand, subFieldName?: string | null, workspaceMemberFieldMetadataId?: string | null, workspaceMemberSubFieldName?: string | null, rowLevelPermissionPredicateGroupId?: string | null, positionInRowLevelPermissionPredicateGroup?: number | null, roleId: string, value?: any | null }> | null, rowLevelPermissionPredicateGroups?: Array<{ __typename?: 'RowLevelPermissionPredicateGroup', id: string, parentRowLevelPermissionPredicateGroupId?: string | null, logicalOperator: RowLevelPermissionPredicateGroupLogicalOperator, positionInRowLevelPermissionPredicateGroup?: number | null, roleId: string, objectMetadataId: string }> | null }> | null, twoFactorAuthenticationMethodSummary?: Array<{ __typename?: 'TwoFactorAuthenticationMethodSummary', twoFactorAuthenticationMethodId: string, status: string, strategy: string }> | null } | null, currentWorkspace?: { __typename?: 'Workspace', id: string, displayName?: string | null, logo?: string | null, inviteHash?: string | null, allowImpersonation: boolean, activationStatus: WorkspaceActivationStatus, isPublicInviteLinkEnabled: boolean, workspaceDiscoverability: WorkspaceDiscoverability, isGoogleAuthEnabled: boolean, isMicrosoftAuthEnabled: boolean, isPasswordAuthEnabled: boolean, isGoogleAuthBypassEnabled: boolean, isMicrosoftAuthBypassEnabled: boolean, isPasswordAuthBypassEnabled: boolean, subdomain: string, customDomain?: string | null, hasValidSignedEnterpriseKey: boolean, hasValidEnterpriseValidityToken: boolean, isCustomDomainEnabled: boolean, workspaceMembersCount?: number | null, fastModel: string, smartModel: string, aiAdditionalInstructions?: string | null, enabledAiModelIds?: Array<string> | null, useRecommendedModels: boolean, isTwoFactorAuthenticationEnforced: boolean, trashRetentionDays: number, eventLogRetentionDays: number, editableProfileFields?: Array<string> | null, isInternalMessagesImportEnabled: boolean, workspaceCustomApplication?: { __typename?: 'Application', id: string } | null, installedApplications: Array<{ __typename?: 'Application', id: string, name: string, universalIdentifier: string, logoUrl?: string | null }>, workspaceUrls: { __typename?: 'WorkspaceUrls', subdomainUrl: string, customUrl?: string | null }, featureFlags?: Array<{ __typename?: 'FeatureFlag', key: FeatureFlagKey, value: boolean }> | null, currentBillingSubscription?: { __typename?: 'BillingSubscription', id: string, status: SubscriptionStatus, interval?: SubscriptionInterval | null, metadata: any, currentPeriodEnd?: string | null, cancelAt?: string | null, phases: Array<{ __typename?: 'BillingSubscriptionSchedulePhase', start_date: number, end_date: number, items: Array<{ __typename?: 'BillingSubscriptionSchedulePhaseItem', price: string, quantity?: number | null }> }>, billingSubscriptionItems?: Array<{ __typename?: 'BillingSubscriptionItem', id: string, hasReachedCurrentPeriodCap: boolean, quantity?: number | null, stripePriceId: string, billingProduct:
+export type UserQueryFragmentFragment = { __typename?: 'User', id: string, firstName: string, lastName: string, email: string, hasPassword: boolean, canAccessFullAdminPanel: boolean, canImpersonate: boolean, supportUserHash?: string | null, onboardingStatus?: OnboardingStatus | null, previousOnboardingStatus?: OnboardingStatus | null, isWorkspaceCreator?: boolean | null, userVars?: any | null, workspaceMember?: { __typename?: 'WorkspaceMember', id: string, colorScheme: string, openRecordIn: OpenRecordIn, avatarUrl?: string | null, locale?: string | null, userEmail: string, userWorkspaceId?: string | null, timeZone?: string | null, dateFormat?: WorkspaceMemberDateFormatEnum | null, timeFormat?: WorkspaceMemberTimeFormatEnum | null, calendarStartDay?: number | null, numberFormat?: WorkspaceMemberNumberFormatEnum | null, name: { __typename?: 'FullName', firstName: string, lastName: string } } | null, workspaceMembers?: Array<{ __typename?: 'WorkspaceMember', id: string, avatarUrl?: string | null, userEmail: string, userWorkspaceId?: string | null, name: { __typename?: 'FullName', firstName: string, lastName: string } }> | null, deletedWorkspaceMembers?: Array<{ __typename?: 'DeletedWorkspaceMember', id: string, avatarUrl?: string | null, userEmail: string, name: { __typename?: 'FullName', firstName: string, lastName: string } }> | null, currentUserWorkspace?: { __typename?: 'UserWorkspace', id: string, permissionFlags?: Array<PermissionFlagType> | null, isImpersonating?: boolean | null, objectsPermissions?: Array<{ __typename?: 'ObjectPermission', objectMetadataId: string, canReadObjectRecords?: boolean | null, canUpdateObjectRecords?: boolean | null, canSoftDeleteObjectRecords?: boolean | null, canDestroyObjectRecords?: boolean | null, restrictedFields?: any | null, rowLevelPermissionPredicates?: Array<{ __typename?: 'RowLevelPermissionPredicate', id: string, fieldMetadataId: string, objectMetadataId: string, operand: RowLevelPermissionPredicateOperand, subFieldName?: string | null, workspaceMemberFieldMetadataId?: string | null, workspaceMemberSubFieldName?: string | null, rowLevelPermissionPredicateGroupId?: string | null, positionInRowLevelPermissionPredicateGroup?: number | null, roleId: string, value?: any | null }> | null, rowLevelPermissionPredicateGroups?: Array<{ __typename?: 'RowLevelPermissionPredicateGroup', id: string, parentRowLevelPermissionPredicateGroupId?: string | null, logicalOperator: RowLevelPermissionPredicateGroupLogicalOperator, positionInRowLevelPermissionPredicateGroup?: number | null, roleId: string, objectMetadataId: string }> | null }> | null, twoFactorAuthenticationMethodSummary?: Array<{ __typename?: 'TwoFactorAuthenticationMethodSummary', twoFactorAuthenticationMethodId: string, status: string, strategy: string }> | null } | null, currentWorkspace?: { __typename?: 'Workspace', id: string, displayName?: string | null, logo?: string | null, inviteHash?: string | null, allowImpersonation: boolean, activationStatus: WorkspaceActivationStatus, isPublicInviteLinkEnabled: boolean, workspaceDiscoverability: WorkspaceDiscoverability, isGoogleAuthEnabled: boolean, isMicrosoftAuthEnabled: boolean, isPasswordAuthEnabled: boolean, isGoogleAuthBypassEnabled: boolean, isMicrosoftAuthBypassEnabled: boolean, isPasswordAuthBypassEnabled: boolean, subdomain: string, customDomain?: string | null, hasValidSignedEnterpriseKey: boolean, hasValidEnterpriseValidityToken: boolean, isCustomDomainEnabled: boolean, workspaceMembersCount?: number | null, fastModel: string, smartModel: string, aiAdditionalInstructions?: string | null, enabledAiModelIds?: Array<string> | null, useRecommendedModels: boolean, isTwoFactorAuthenticationEnforced: boolean, trashRetentionDays: number, eventLogRetentionDays: number, editableProfileFields?: Array<string> | null, isInternalMessagesImportEnabled: boolean, workspaceCustomApplication?: { __typename?: 'Application', id: string } | null, installedApplications: Array<{ __typename?: 'Application', id: string, name: string, universalIdentifier: string, logoUrl?: string | null }>, workspaceUrls: { __typename?: 'WorkspaceUrls', subdomainUrl: string, customUrl?: string | null }, featureFlags?: Array<{ __typename?: 'FeatureFlag', key: FeatureFlagKey, value: boolean }> | null, currentBillingSubscription?: { __typename?: 'BillingSubscription', id: string, status: SubscriptionStatus, interval?: SubscriptionInterval | null, metadata: any, currentPeriodEnd?: string | null, cancelAt?: string | null, phases: Array<{ __typename?: 'BillingSubscriptionSchedulePhase', start_date: number, end_date: number, items: Array<{ __typename?: 'BillingSubscriptionSchedulePhaseItem', price: string, quantity?: number | null }> }>, billingSubscriptionItems?: Array<{ __typename?: 'BillingSubscriptionItem', id: string, hasReachedCurrentPeriodCap: boolean, quantity?: number | null, stripePriceId: string, billingProduct:
| { __typename?: 'BillingLicensedProduct', name: string, description: string, images?: Array<string> | null, metadata: { __typename?: 'BillingProductMetadata', productKey: BillingProductKey, planKey: BillingPlanKey, priceUsageBased: BillingUsageType } }
| { __typename?: 'BillingMeteredProduct', name: string, description: string, images?: Array<string> | null, metadata: { __typename?: 'BillingProductMetadata', productKey: BillingProductKey, planKey: BillingPlanKey, priceUsageBased: BillingUsageType } }
}> | null } | null, billingCustomer?: { __typename?: 'BillingCustomer', id: string, hasPaymentMethod?: boolean | null } | null, billingSubscriptions: Array<{ __typename?: 'BillingSubscription', id: string, status: SubscriptionStatus, metadata: any, cancelAt?: string | null, phases: Array<{ __typename?: 'BillingSubscriptionSchedulePhase', start_date: number, end_date: number, items: Array<{ __typename?: 'BillingSubscriptionSchedulePhaseItem', price: string, quantity?: number | null }> }> }>, billingEntitlements: Array<{ __typename?: 'BillingEntitlement', key: BillingEntitlementKey, value: boolean }>, defaultRole?: { __typename?: 'Role', id: string, label: string, description?: string | null, icon?: string | null, canUpdateAllSettings: boolean, canAccessAllTools: boolean, isEditable: boolean, canReadAllObjectRecords: boolean, canUpdateAllObjectRecords: boolean, canSoftDeleteAllObjectRecords: boolean, canDestroyAllObjectRecords: boolean, canBeAssignedToUsers: boolean, canBeAssignedToAgents: boolean, canBeAssignedToApiKeys: boolean } | null } | null, availableWorkspaces: { __typename?: 'AvailableWorkspaces', availableWorkspacesForSignIn: Array<{ __typename?: 'AvailableWorkspace', id: string, displayName?: string | null, loginToken?: string | null, inviteHash?: string | null, personalInviteToken?: string | null, logo?: string | null, workspaceUrls: { __typename?: 'WorkspaceUrls', subdomainUrl: string, customUrl?: string | null }, sso: Array<{ __typename?: 'SSOConnection', type: IdentityProviderType, id: string, issuer: string, name: string, status: SsoIdentityProviderStatus }> }>, availableWorkspacesForSignUp: Array<{ __typename?: 'AvailableWorkspace', id: string, displayName?: string | null, loginToken?: string | null, inviteHash?: string | null, personalInviteToken?: string | null, logo?: string | null, workspaceUrls: { __typename?: 'WorkspaceUrls', subdomainUrl: string, customUrl?: string | null }, sso: Array<{ __typename?: 'SSOConnection', type: IdentityProviderType, id: string, issuer: string, name: string, status: SsoIdentityProviderStatus }> }> } };
@@ -8929,7 +8962,7 @@ export type DeleteUserWorkspaceMutation = { __typename?: 'Mutation', deleteUserF
export type GetCurrentUserQueryVariables = Exact<{ [key: string]: never; }>;
-export type GetCurrentUserQuery = { __typename?: 'Query', currentUser: { __typename?: 'User', id: string, firstName: string, lastName: string, email: string, hasPassword: boolean, canAccessFullAdminPanel: boolean, canImpersonate: boolean, supportUserHash?: string | null, onboardingStatus?: OnboardingStatus | null, isWorkspaceCreator?: boolean | null, userVars?: any | null, workspaceMember?: { __typename?: 'WorkspaceMember', id: string, colorScheme: string, openRecordIn: OpenRecordIn, avatarUrl?: string | null, locale?: string | null, userEmail: string, userWorkspaceId?: string | null, timeZone?: string | null, dateFormat?: WorkspaceMemberDateFormatEnum | null, timeFormat?: WorkspaceMemberTimeFormatEnum | null, calendarStartDay?: number | null, numberFormat?: WorkspaceMemberNumberFormatEnum | null, name: { __typename?: 'FullName', firstName: string, lastName: string } } | null, workspaceMembers?: Array<{ __typename?: 'WorkspaceMember', id: string, avatarUrl?: string | null, userEmail: string, userWorkspaceId?: string | null, name: { __typename?: 'FullName', firstName: string, lastName: string } }> | null, deletedWorkspaceMembers?: Array<{ __typename?: 'DeletedWorkspaceMember', id: string, avatarUrl?: string | null, userEmail: string, name: { __typename?: 'FullName', firstName: string, lastName: string } }> | null, currentUserWorkspace?: { __typename?: 'UserWorkspace', id: string, permissionFlags?: Array<PermissionFlagType> | null, isImpersonating?: boolean | null, objectsPermissions?: Array<{ __typename?: 'ObjectPermission', objectMetadataId: string, canReadObjectRecords?: boolean | null, canUpdateObjectRecords?: boolean | null, canSoftDeleteObjectRecords?: boolean | null, canDestroyObjectRecords?: boolean | null, restrictedFields?: any | null, rowLevelPermissionPredicates?: Array<{ __typename?: 'RowLevelPermissionPredicate', id: string, fieldMetadataId: string, objectMetadataId: string, operand: RowLevelPermissionPredicateOperand, subFieldName?: string | null, workspaceMemberFieldMetadataId?: string | null, workspaceMemberSubFieldName?: string | null, rowLevelPermissionPredicateGroupId?: string | null, positionInRowLevelPermissionPredicateGroup?: number | null, roleId: string, value?: any | null }> | null, rowLevelPermissionPredicateGroups?: Array<{ __typename?: 'RowLevelPermissionPredicateGroup', id: string, parentRowLevelPermissionPredicateGroupId?: string | null, logicalOperator: RowLevelPermissionPredicateGroupLogicalOperator, positionInRowLevelPermissionPredicateGroup?: number | null, roleId: string, objectMetadataId: string }> | null }> | null, twoFactorAuthenticationMethodSummary?: Array<{ __typename?: 'TwoFactorAuthenticationMethodSummary', twoFactorAuthenticationMethodId: string, status: string, strategy: string }> | null } | null, currentWorkspace?: { __typename?: 'Workspace', id: string, displayName?: string | null, logo?: string | null, inviteHash?: string | null, allowImpersonation: boolean, activationStatus: WorkspaceActivationStatus, isPublicInviteLinkEnabled: boolean, workspaceDiscoverability: WorkspaceDiscoverability, isGoogleAuthEnabled: boolean, isMicrosoftAuthEnabled: boolean, isPasswordAuthEnabled: boolean, isGoogleAuthBypassEnabled: boolean, isMicrosoftAuthBypassEnabled: boolean, isPasswordAuthBypassEnabled: boolean, subdomain: string, customDomain?: string | null, hasValidSignedEnterpriseKey: boolean, hasValidEnterpriseValidityToken: boolean, isCustomDomainEnabled: boolean, workspaceMembersCount?: number | null, fastModel: string, smartModel: string, aiAdditionalInstructions?: string | null, enabledAiModelIds?: Array<string> | null, useRecommendedModels: boolean, isTwoFactorAuthenticationEnforced: boolean, trashRetentionDays: number, eventLogRetentionDays: number, editableProfileFields?: Array<string> | null, isInternalMessagesImportEnabled: boolean, workspaceCustomApplication?: { __typename?: 'Application', id: string } | null, installedApplications: Array<{ __typename?: 'Application', id: string, name: string, universalIdentifier: string, logoUrl?: string | null }>, workspaceUrls: { __typename?: 'WorkspaceUrls', subdomainUrl: string, customUrl?: string | null }, featureFlags?: Array<{ __typename?: 'FeatureFlag', key: FeatureFlagKey, value: boolean }> | null, currentBillingSubscription?: { __typename?: 'BillingSubscription', id: string, status: SubscriptionStatus, interval?: SubscriptionInterval | null, metadata: any, currentPeriodEnd?: string | null, cancelAt?: string | null, phases: Array<{ __typename?: 'BillingSubscriptionSchedulePhase', start_date: number, end_date: number, items: Array<{ __typename?: 'BillingSubscriptionSchedulePhaseItem', price: string, quantity?: number | null }> }>, billingSubscriptionItems?: Array<{ __typename?: 'BillingSubscriptionItem', id: string, hasReachedCurrentPeriodCap: boolean, quantity?: number | null, stripePriceId: string, billingProduct:
+export type GetCurrentUserQuery = { __typename?: 'Query', currentUser: { __typename?: 'User', id: string, firstName: string, lastName: string, email: string, hasPassword: boolean, canAccessFullAdminPanel: boolean, canImpersonate: boolean, supportUserHash?: string | null, onboardingStatus?: OnboardingStatus | null, previousOnboardingStatus?: OnboardingStatus | null, isWorkspaceCreator?: boolean | null, userVars?: any | null, workspaceMember?: { __typename?: 'WorkspaceMember', id: string, colorScheme: string, openRecordIn: OpenRecordIn, avatarUrl?: string | null, locale?: string | null, userEmail: string, userWorkspaceId?: string | null, timeZone?: string | null, dateFormat?: WorkspaceMemberDateFormatEnum | null, timeFormat?: WorkspaceMemberTimeFormatEnum | null, calendarStartDay?: number | null, numberFormat?: WorkspaceMemberNumberFormatEnum | null, name: { __typename?: 'FullName', firstName: string, lastName: string } } | null, workspaceMembers?: Array<{ __typename?: 'WorkspaceMember', id: string, avatarUrl?: string | null, userEmail: string, userWorkspaceId?: string | null, name: { __typename?: 'FullName', firstName: string, lastName: string } }> | null, deletedWorkspaceMembers?: Array<{ __typename?: 'DeletedWorkspaceMember', id: string, avatarUrl?: string | null, userEmail: string, name: { __typename?: 'FullName', firstName: string, lastName: string } }> | null, currentUserWorkspace?: { __typename?: 'UserWorkspace', id: string, permissionFlags?: Array<PermissionFlagType> | null, isImpersonating?: boolean | null, objectsPermissions?: Array<{ __typename?: 'ObjectPermission', objectMetadataId: string, canReadObjectRecords?: boolean | null, canUpdateObjectRecords?: boolean | null, canSoftDeleteObjectRecords?: boolean | null, canDestroyObjectRecords?: boolean | null, restrictedFields?: any | null, rowLevelPermissionPredicates?: Array<{ __typename?: 'RowLevelPermissionPredicate', id: string, fieldMetadataId: string, objectMetadataId: string, operand: RowLevelPermissionPredicateOperand, subFieldName?: string | null, workspaceMemberFieldMetadataId?: string | null, workspaceMemberSubFieldName?: string | null, rowLevelPermissionPredicateGroupId?: string | null, positionInRowLevelPermissionPredicateGroup?: number | null, roleId: string, value?: any | null }> | null, rowLevelPermissionPredicateGroups?: Array<{ __typename?: 'RowLevelPermissionPredicateGroup', id: string, parentRowLevelPermissionPredicateGroupId?: string | null, logicalOperator: RowLevelPermissionPredicateGroupLogicalOperator, positionInRowLevelPermissionPredicateGroup?: number | null, roleId: string, objectMetadataId: string }> | null }> | null, twoFactorAuthenticationMethodSummary?: Array<{ __typename?: 'TwoFactorAuthenticationMethodSummary', twoFactorAuthenticationMethodId: string, status: string, strategy: string }> | null } | null, currentWorkspace?: { __typename?: 'Workspace', id: string, displayName?: string | null, logo?: string | null, inviteHash?: string | null, allowImpersonation: boolean, activationStatus: WorkspaceActivationStatus, isPublicInviteLinkEnabled: boolean, workspaceDiscoverability: WorkspaceDiscoverability, isGoogleAuthEnabled: boolean, isMicrosoftAuthEnabled: boolean, isPasswordAuthEnabled: boolean, isGoogleAuthBypassEnabled: boolean, isMicrosoftAuthBypassEnabled: boolean, isPasswordAuthBypassEnabled: boolean, subdomain: string, customDomain?: string | null, hasValidSignedEnterpriseKey: boolean, hasValidEnterpriseValidityToken: boolean, isCustomDomainEnabled: boolean, workspaceMembersCount?: number | null, fastModel: string, smartModel: string, aiAdditionalInstructions?: string | null, enabledAiModelIds?: Array<string> | null, useRecommendedModels: boolean, isTwoFactorAuthenticationEnforced: boolean, trashRetentionDays: number, eventLogRetentionDays: number, editableProfileFields?: Array<string> | null, isInternalMessagesImportEnabled: boolean, workspaceCustomApplication?: { __typename?: 'Application', id: string } | null, installedApplications: Array<{ __typename?: 'Application', id: string, name: string, universalIdentifier: string, logoUrl?: string | null }>, workspaceUrls: { __typename?: 'WorkspaceUrls', subdomainUrl: string, customUrl?: string | null }, featureFlags?: Array<{ __typename?: 'FeatureFlag', key: FeatureFlagKey, value: boolean }> | null, currentBillingSubscription?: { __typename?: 'BillingSubscription', id: string, status: SubscriptionStatus, interval?: SubscriptionInterval | null, metadata: any, currentPeriodEnd?: string | null, cancelAt?: string | null, phases: Array<{ __typename?: 'BillingSubscriptionSchedulePhase', start_date: number, end_date: number, items: Array<{ __typename?: 'BillingSubscriptionSchedulePhaseItem', price: string, quantity?: number | null }> }>, billingSubscriptionItems?: Array<{ __typename?: 'BillingSubscriptionItem', id: string, hasReachedCurrentPeriodCap: boolean, quantity?: number | null, stripePriceId: string, billingProduct:
| { __typename?: 'BillingLicensedProduct', name: string, description: string, images?: Array<string> | null, metadata: { __typename?: 'BillingProductMetadata', productKey: BillingProductKey, planKey: BillingPlanKey, priceUsageBased: BillingUsageType } }
| { __typename?: 'BillingMeteredProduct', name: string, description: string, images?: Array<string> | null, metadata: { __typename?: 'BillingProductMetadata', productKey: BillingProductKey, planKey: BillingPlanKey, priceUsageBased: BillingUsageType } }
}> | null } | null, billingCustomer?: { __typename?: 'BillingCustomer', id: string, hasPaymentMethod?: boolean | null } | null, billingSubscriptions: Array<{ __typename?: 'BillingSubscription', id: string, status: SubscriptionStatus, metadata: any, cancelAt?: string | null, phases: Array<{ __typename?: 'BillingSubscriptionSchedulePhase', start_date: number, end_date: number, items: Array<{ __typename?: 'BillingSubscriptionSchedulePhaseItem', price: string, quantity?: number | null }> }> }>, billingEntitlements: Array<{ __typename?: 'BillingEntitlement', key: BillingEntitlementKey, value: boolean }>, defaultRole?: { __typename?: 'Role', id: string, label: string, description?: string | null, icon?: string | null, canUpdateAllSettings: boolean, canAccessAllTools: boolean, isEditable: boolean, canReadAllObjectRecords: boolean, canUpdateAllObjectRecords: boolean, canSoftDeleteAllObjectRecords: boolean, canDestroyAllObjectRecords: boolean, canBeAssignedToUsers: boolean, canBeAssignedToAgents: boolean, canBeAssignedToApiKeys: boolean } | null } | null, availableWorkspaces: { __typename?: 'AvailableWorkspaces', availableWorkspacesForSignIn: Array<{ __typename?: 'AvailableWorkspace', id: string, displayName?: string | null, loginToken?: string | null, inviteHash?: string | null, personalInviteToken?: string | null, logo?: string | null, workspaceUrls: { __typename?: 'WorkspaceUrls', subdomainUrl: string, customUrl?: string | null }, sso: Array<{ __typename?: 'SSOConnection', type: IdentityProviderType, id: string, issuer: string, name: string, status: SsoIdentityProviderStatus }> }>, availableWorkspacesForSignUp: Array<{ __typename?: 'AvailableWorkspace', id: string, displayName?: string | null, loginToken?: string | null, inviteHash?: string | null, personalInviteToken?: string | null, logo?: string | null, workspaceUrls: { __typename?: 'WorkspaceUrls', subdomainUrl: string, customUrl?: string | null }, sso: Array<{ __typename?: 'SSOConnection', type: IdentityProviderType, id: string, issuer: string, name: string, status: SsoIdentityProviderStatus }> }> } } };
@@ -9384,7 +9417,7 @@ export const BillingSubscriptionFragmentFragmentDoc = {"kind":"Document","defini
export const RoleFragmentFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RoleFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Role"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"label"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"icon"}},{"kind":"Field","name":{"kind":"Name","value":"canUpdateAllSettings"}},{"kind":"Field","name":{"kind":"Name","value":"canAccessAllTools"}},{"kind":"Field","name":{"kind":"Name","value":"isEditable"}},{"kind":"Field","name":{"kind":"Name","value":"canReadAllObjectRecords"}},{"kind":"Field","name":{"kind":"Name","value":"canUpdateAllObjectRecords"}},{"kind":"Field","name":{"kind":"Name","value":"canSoftDeleteAllObjectRecords"}},{"kind":"Field","name":{"kind":"Name","value":"canDestroyAllObjectRecords"}},{"kind":"Field","name":{"kind":"Name","value":"canBeAssignedToUsers"}},{"kind":"Field","name":{"kind":"Name","value":"canBeAssignedToAgents"}},{"kind":"Field","name":{"kind":"Name","value":"canBeAssignedToApiKeys"}}]}}]} as unknown as DocumentNode<RoleFragmentFragment, unknown>;
export const AvailableWorkspaceFragmentFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AvailableWorkspaceFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AvailableWorkspace"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"loginToken"}},{"kind":"Field","name":{"kind":"Name","value":"inviteHash"}},{"kind":"Field","name":{"kind":"Name","value":"personalInviteToken"}},{"kind":"Field","name":{"kind":"Name","value":"workspaceUrls"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"subdomainUrl"}},{"kind":"Field","name":{"kind":"Name","value":"customUrl"}}]}},{"kind":"Field","name":{"kind":"Name","value":"logo"}},{"kind":"Field","name":{"kind":"Name","value":"sso"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"type"}},{"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"}}]}}]}}]} as unknown as DocumentNode<AvailableWorkspaceFragmentFragment, unknown>;
export const AvailableWorkspacesFragmentFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AvailableWorkspacesFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AvailableWorkspaces"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"availableWorkspacesForSignIn"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"AvailableWorkspaceFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"availableWorkspacesForSignUp"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"AvailableWorkspaceFragment"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AvailableWorkspaceFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AvailableWorkspace"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"loginToken"}},{"kind":"Field","name":{"kind":"Name","value":"inviteHash"}},{"kind":"Field","name":{"kind":"Name","value":"personalInviteToken"}},{"kind":"Field","name":{"kind":"Name","value":"workspaceUrls"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"subdomainUrl"}},{"kind":"Field","name":{"kind":"Name","value":"customUrl"}}]}},{"kind":"Field","name":{"kind":"Name","value":"logo"}},{"kind":"Field","name":{"kind":"Name","value":"sso"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"type"}},{"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"}}]}}]}}]} as unknown as DocumentNode<AvailableWorkspacesFragmentFragment, unknown>;
-export const UserQueryFragmentFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"UserQueryFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"User"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"firstName"}},{"kind":"Field","name":{"kind":"Name","value":"lastName"}},{"kind":"Field","name":{"kind":"Name","value":"email"}},{"kind":"Field","name":{"kind":"Name","value":"hasPassword"}},{"kind":"Field","name":{"kind":"Name","value":"canAccessFullAdminPanel"}},{"kind":"Field","name":{"kind":"Name","value":"canImpersonate"}},{"kind":"Field","name":{"kind":"Name","value":"supportUserHash"}},{"kind":"Field","name":{"kind":"Name","value":"onboardingStatus"}},{"kind":"Field","name":{"kind":"Name","value":"isWorkspaceCreator"}},{"kind":"Field","name":{"kind":"Name","value":"workspaceMember"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"WorkspaceMemberQueryFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"workspaceMembers"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"PartialWorkspaceMemberQueryFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"deletedWorkspaceMembers"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"DeletedWorkspaceMemberQueryFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"currentUserWorkspace"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"permissionFlags"}},{"kind":"Field","name":{"kind":"Name","value":"isImpersonating"}},{"kind":"Field","name":{"kind":"Name","value":"objectsPermissions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ObjectPermissionFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"twoFactorAuthenticationMethodSummary"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"twoFactorAuthenticationMethodId"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"strategy"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"currentWorkspace"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"logo"}},{"kind":"Field","name":{"kind":"Name","value":"inviteHash"}},{"kind":"Field","name":{"kind":"Name","value":"allowImpersonation"}},{"kind":"Field","name":{"kind":"Name","value":"activationStatus"}},{"kind":"Field","name":{"kind":"Name","value":"isPublicInviteLinkEnabled"}},{"kind":"Field","name":{"kind":"Name","value":"workspaceDiscoverability"}},{"kind":"Field","name":{"kind":"Name","value":"isGoogleAuthEnabled"}},{"kind":"Field","name":{"kind":"Name","value":"isMicrosoftAuthEnabled"}},{"kind":"Field","name":{"kind":"Name","value":"isPasswordAuthEnabled"}},{"kind":"Field","name":{"kind":"Name","value":"isGoogleAuthBypassEnabled"}},{"kind":"Field","name":{"kind":"Name","value":"isMicrosoftAuthBypassEnabled"}},{"kind":"Field","name":{"kind":"Name","value":"isPasswordAuthBypassEnabled"}},{"kind":"Field","name":{"kind":"Name","value":"subdomain"}},{"kind":"Field","name":{"kind":"Name","value":"customDomain"}},{"kind":"Field","name":{"kind":"Name","value":"hasValidSignedEnterpriseKey"}},{"kind":"Field","name":{"kind":"Name","value":"hasValidEnterpriseValidityToken"}},{"kind":"Field","name":{"kind":"Name","value":"workspaceCustomApplication"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}},{"kind":"Field","name":{"kind":"Name","value":"installedApplications"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"universalIdentifier"}},{"kind":"Field","name":{"kind":"Name","value":"logoUrl"}}]}},{"kind":"Field","name":{"kind":"Name","value":"isCustomDomainEnabled"}},{"kind":"Field","name":{"kind":"Name","value":"workspaceUrls"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"WorkspaceUrlsFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"featureFlags"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"key"}},{"kind":"Field","name":{"kind":"Name","value":"value"}}]}},{"kind":"Field","name":{"kind":"Name","value":"currentBillingSubscription"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CurrentBillingSubscriptionFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"billingCustomer"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"hasPaymentMethod"}}]}},{"kind":"Field","name":{"kind":"Name","value":"billingSubscriptions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BillingSubscriptionFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"billingEntitlements"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"key"}},{"kind":"Field","name":{"kind":"Name","value":"value"}}]}},{"kind":"Field","name":{"kind":"Name","value":"workspaceMembersCount"}},{"kind":"Field","name":{"kind":"Name","value":"defaultRole"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RoleFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"fastModel"}},{"kind":"Field","name":{"kind":"Name","value":"smartModel"}},{"kind":"Field","name":{"kind":"Name","value":"aiAdditionalInstructions"}},{"kind":"Field","name":{"kind":"Name","value":"enabledAiModelIds"}},{"kind":"Field","name":{"kind":"Name","value":"useRecommendedModels"}},{"kind":"Field","name":{"kind":"Name","value":"isTwoFactorAuthenticationEnforced"}},{"kind":"Field","name":{"kind":"Name","value":"trashRetentionDays"}},{"kind":"Field","name":{"kind":"Name","value":"eventLogRetentionDays"}},{"kind":"Field","name":{"kind":"Name","value":"editableProfileFields"}},{"kind":"Field","name":{"kind":"Name","value":"isInternalMessagesImportEnabled"}}]}},{"kind":"Field","name":{"kind":"Name","value":"availableWorkspaces"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"AvailableWorkspacesFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"userVars"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RowLevelPermissionPredicateFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RowLevelPermissionPredicate"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"fieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"objectMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"operand"}},{"kind":"Field","name":{"kind":"Name","value":"subFieldName"}},{"kind":"Field","name":{"kind":"Name","value":"workspaceMemberFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"workspaceMemberSubFieldName"}},{"kind":"Field","name":{"kind":"Name","value":"rowLevelPermissionPredicateGroupId"}},{"kind":"Field","name":{"kind":"Name","value":"positionInRowLevelPermissionPredicateGroup"}},{"kind":"Field","name":{"kind":"Name","value":"roleId"}},{"kind":"Field","name":{"kind":"Name","value":"value"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RowLevelPermissionPredicateGroupFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RowLevelPermissionPredicateGroup"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"parentRowLevelPermissionPredicateGroupId"}},{"kind":"Field","name":{"kind":"Name","value":"logicalOperator"}},{"kind":"Field","name":{"kind":"Name","value":"positionInRowLevelPermissionPredicateGroup"}},{"kind":"Field","name":{"kind":"Name","value":"roleId"}},{"kind":"Field","name":{"kind":"Name","value":"objectMetadataId"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseItemFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseItem"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"price"}},{"kind":"Field","name":{"kind":"Name","value":"quantity"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhase"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"start_date"}},{"kind":"Field","name":{"kind":"Name","value":"end_date"}},{"kind":"Field","name":{"kind":"Name","value":"items"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseItemFragment"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AvailableWorkspaceFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AvailableWorkspace"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"loginToken"}},{"kind":"Field","name":{"kind":"Name","value":"inviteHash"}},{"kind":"Field","name":{"kind":"Name","value":"personalInviteToken"}},{"kind":"Field","name":{"kind":"Name","value":"workspaceUrls"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"subdomainUrl"}},{"kind":"Field","name":{"kind":"Name","value":"customUrl"}}]}},{"kind":"Field","name":{"kind":"Name","value":"logo"}},{"kind":"Field","name":{"kind":"Name","value":"sso"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"type"}},{"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":"FragmentDefinition","name":{"kind":"Name","value":"WorkspaceMemberQueryFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"WorkspaceMember"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"firstName"}},{"kind":"Field","name":{"kind":"Name","value":"lastName"}}]}},{"kind":"Field","name":{"kind":"Name","value":"colorScheme"}},{"kind":"Field","name":{"kind":"Name","value":"openRecordIn"}},{"kind":"Field","name":{"kind":"Name","value":"avatarUrl"}},{"kind":"Field","name":{"kind":"Name","value":"locale"}},{"kind":"Field","name":{"kind":"Name","value":"userEmail"}},{"kind":"Field","name":{"kind":"Name","value":"userWorkspaceId"}},{"kind":"Field","name":{"kind":"Name","value":"timeZone"}},{"kind":"Field","name":{"kind":"Name","value":"dateFormat"}},{"kind":"Field","name":{"kind":"Name","value":"timeFormat"}},{"kind":"Field","name":{"kind":"Name","value":"calendarStartDay"}},{"kind":"Field","name":{"kind":"Name","value":"numberFormat"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"PartialWorkspaceMemberQueryFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"WorkspaceMember"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"firstName"}},{"kind":"Field","name":{"kind":"Name","value":"lastName"}}]}},{"kind":"Field","name":{"kind":"Name","value":"avatarUrl"}},{"kind":"Field","name":{"kind":"Name","value":"userEmail"}},{"kind":"Field","name":{"kind":"Name","value":"userWorkspaceId"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"DeletedWorkspaceMemberQueryFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"DeletedWorkspaceMember"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"firstName"}},{"kind":"Field","name":{"kind":"Name","value":"lastName"}}]}},{"kind":"Field","name":{"kind":"Name","value":"avatarUrl"}},{"kind":"Field","name":{"kind":"Name","value":"userEmail"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ObjectPermissionFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ObjectPermission"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"objectMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"canReadObjectRecords"}},{"kind":"Field","name":{"kind":"Name","value":"canUpdateObjectRecords"}},{"kind":"Field","name":{"kind":"Name","value":"canSoftDeleteObjectRecords"}},{"kind":"Field","name":{"kind":"Name","value":"canDestroyObjectRecords"}},{"kind":"Field","name":{"kind":"Name","value":"restrictedFields"}},{"kind":"Field","name":{"kind":"Name","value":"rowLevelPermissionPredicates"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RowLevelPermissionPredicateFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"rowLevelPermissionPredicateGroups"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RowLevelPermissionPredicateGroupFragment"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"WorkspaceUrlsFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"WorkspaceUrls"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"subdomainUrl"}},{"kind":"Field","name":{"kind":"Name","value":"customUrl"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CurrentBillingSubscriptionFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BillingSubscription"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"interval"}},{"kind":"Field","name":{"kind":"Name","value":"metadata"}},{"kind":"Field","name":{"kind":"Name","value":"currentPeriodEnd"}},{"kind":"Field","name":{"kind":"Name","value":"cancelAt"}},{"kind":"Field","name":{"kind":"Name","value":"phases"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"billingSubscriptionItems"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"hasReachedCurrentPeriodCap"}},{"kind":"Field","name":{"kind":"Name","value":"quantity"}},{"kind":"Field","name":{"kind":"Name","value":"stripePriceId"}},{"kind":"Field","name":{"kind":"Name","value":"billingProduct"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"images"}},{"kind":"Field","name":{"kind":"Name","value":"metadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"productKey"}},{"kind":"Field","name":{"kind":"Name","value":"planKey"}},{"kind":"Field","name":{"kind":"Name","value":"priceUsageBased"}}]}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BillingSubscriptionFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BillingSubscription"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"metadata"}},{"kind":"Field","name":{"kind":"Name","value":"cancelAt"}},{"kind":"Field","name":{"kind":"Name","value":"phases"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseFragment"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RoleFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Role"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"label"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"icon"}},{"kind":"Field","name":{"kind":"Name","value":"canUpdateAllSettings"}},{"kind":"Field","name":{"kind":"Name","value":"canAccessAllTools"}},{"kind":"Field","name":{"kind":"Name","value":"isEditable"}},{"kind":"Field","name":{"kind":"Name","value":"canReadAllObjectRecords"}},{"kind":"Field","name":{"kind":"Name","value":"canUpdateAllObjectRecords"}},{"kind":"Field","name":{"kind":"Name","value":"canSoftDeleteAllObjectRecords"}},{"kind":"Field","name":{"kind":"Name","value":"canDestroyAllObjectRecords"}},{"kind":"Field","name":{"kind":"Name","value":"canBeAssignedToUsers"}},{"kind":"Field","name":{"kind":"Name","value":"canBeAssignedToAgents"}},{"kind":"Field","name":{"kind":"Name","value":"canBeAssignedToApiKeys"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AvailableWorkspacesFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AvailableWorkspaces"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"availableWorkspacesForSignIn"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"AvailableWorkspaceFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"availableWorkspacesForSignUp"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"AvailableWorkspaceFragment"}}]}}]}}]} as unknown as DocumentNode<UserQueryFragmentFragment, unknown>;
+export const UserQueryFragmentFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"UserQueryFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"User"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"firstName"}},{"kind":"Field","name":{"kind":"Name","value":"lastName"}},{"kind":"Field","name":{"kind":"Name","value":"email"}},{"kind":"Field","name":{"kind":"Name","value":"hasPassword"}},{"kind":"Field","name":{"kind":"Name","value":"canAccessFullAdminPanel"}},{"kind":"Field","name":{"kind":"Name","value":"canImpersonate"}},{"kind":"Field","name":{"kind":"Name","value":"supportUserHash"}},{"kind":"Field","name":{"kind":"Name","value":"onboardingStatus"}},{"kind":"Field","name":{"kind":"Name","value":"previousOnboardingStatus"}},{"kind":"Field","name":{"kind":"Name","value":"isWorkspaceCreator"}},{"kind":"Field","name":{"kind":"Name","value":"workspaceMember"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"WorkspaceMemberQueryFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"workspaceMembers"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"PartialWorkspaceMemberQueryFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"deletedWorkspaceMembers"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"DeletedWorkspaceMemberQueryFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"currentUserWorkspace"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"permissionFlags"}},{"kind":"Field","name":{"kind":"Name","value":"isImpersonating"}},{"kind":"Field","name":{"kind":"Name","value":"objectsPermissions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ObjectPermissionFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"twoFactorAuthenticationMethodSummary"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"twoFactorAuthenticationMethodId"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"strategy"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"currentWorkspace"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"logo"}},{"kind":"Field","name":{"kind":"Name","value":"inviteHash"}},{"kind":"Field","name":{"kind":"Name","value":"allowImpersonation"}},{"kind":"Field","name":{"kind":"Name","value":"activationStatus"}},{"kind":"Field","name":{"kind":"Name","value":"isPublicInviteLinkEnabled"}},{"kind":"Field","name":{"kind":"Name","value":"workspaceDiscoverability"}},{"kind":"Field","name":{"kind":"Name","value":"isGoogleAuthEnabled"}},{"kind":"Field","name":{"kind":"Name","value":"isMicrosoftAuthEnabled"}},{"kind":"Field","name":{"kind":"Name","value":"isPasswordAuthEnabled"}},{"kind":"Field","name":{"kind":"Name","value":"isGoogleAuthBypassEnabled"}},{"kind":"Field","name":{"kind":"Name","value":"isMicrosoftAuthBypassEnabled"}},{"kind":"Field","name":{"kind":"Name","value":"isPasswordAuthBypassEnabled"}},{"kind":"Field","name":{"kind":"Name","value":"subdomain"}},{"kind":"Field","name":{"kind":"Name","value":"customDomain"}},{"kind":"Field","name":{"kind":"Name","value":"hasValidSignedEnterpriseKey"}},{"kind":"Field","name":{"kind":"Name","value":"hasValidEnterpriseValidityToken"}},{"kind":"Field","name":{"kind":"Name","value":"workspaceCustomApplication"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}},{"kind":"Field","name":{"kind":"Name","value":"installedApplications"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"universalIdentifier"}},{"kind":"Field","name":{"kind":"Name","value":"logoUrl"}}]}},{"kind":"Field","name":{"kind":"Name","value":"isCustomDomainEnabled"}},{"kind":"Field","name":{"kind":"Name","value":"workspaceUrls"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"WorkspaceUrlsFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"featureFlags"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"key"}},{"kind":"Field","name":{"kind":"Name","value":"value"}}]}},{"kind":"Field","name":{"kind":"Name","value":"currentBillingSubscription"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CurrentBillingSubscriptionFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"billingCustomer"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"hasPaymentMethod"}}]}},{"kind":"Field","name":{"kind":"Name","value":"billingSubscriptions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BillingSubscriptionFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"billingEntitlements"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"key"}},{"kind":"Field","name":{"kind":"Name","value":"value"}}]}},{"kind":"Field","name":{"kind":"Name","value":"workspaceMembersCount"}},{"kind":"Field","name":{"kind":"Name","value":"defaultRole"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RoleFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"fastModel"}},{"kind":"Field","name":{"kind":"Name","value":"smartModel"}},{"kind":"Field","name":{"kind":"Name","value":"aiAdditionalInstructions"}},{"kind":"Field","name":{"kind":"Name","value":"enabledAiModelIds"}},{"kind":"Field","name":{"kind":"Name","value":"useRecommendedModels"}},{"kind":"Field","name":{"kind":"Name","value":"isTwoFactorAuthenticationEnforced"}},{"kind":"Field","name":{"kind":"Name","value":"trashRetentionDays"}},{"kind":"Field","name":{"kind":"Name","value":"eventLogRetentionDays"}},{"kind":"Field","name":{"kind":"Name","value":"editableProfileFields"}},{"kind":"Field","name":{"kind":"Name","value":"isInternalMessagesImportEnabled"}}]}},{"kind":"Field","name":{"kind":"Name","value":"availableWorkspaces"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"AvailableWorkspacesFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"userVars"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RowLevelPermissionPredicateFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RowLevelPermissionPredicate"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"fieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"objectMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"operand"}},{"kind":"Field","name":{"kind":"Name","value":"subFieldName"}},{"kind":"Field","name":{"kind":"Name","value":"workspaceMemberFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"workspaceMemberSubFieldName"}},{"kind":"Field","name":{"kind":"Name","value":"rowLevelPermissionPredicateGroupId"}},{"kind":"Field","name":{"kind":"Name","value":"positionInRowLevelPermissionPredicateGroup"}},{"kind":"Field","name":{"kind":"Name","value":"roleId"}},{"kind":"Field","name":{"kind":"Name","value":"value"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RowLevelPermissionPredicateGroupFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RowLevelPermissionPredicateGroup"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"parentRowLevelPermissionPredicateGroupId"}},{"kind":"Field","name":{"kind":"Name","value":"logicalOperator"}},{"kind":"Field","name":{"kind":"Name","value":"positionInRowLevelPermissionPredicateGroup"}},{"kind":"Field","name":{"kind":"Name","value":"roleId"}},{"kind":"Field","name":{"kind":"Name","value":"objectMetadataId"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseItemFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseItem"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"price"}},{"kind":"Field","name":{"kind":"Name","value":"quantity"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhase"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"start_date"}},{"kind":"Field","name":{"kind":"Name","value":"end_date"}},{"kind":"Field","name":{"kind":"Name","value":"items"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseItemFragment"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AvailableWorkspaceFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AvailableWorkspace"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"loginToken"}},{"kind":"Field","name":{"kind":"Name","value":"inviteHash"}},{"kind":"Field","name":{"kind":"Name","value":"personalInviteToken"}},{"kind":"Field","name":{"kind":"Name","value":"workspaceUrls"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"subdomainUrl"}},{"kind":"Field","name":{"kind":"Name","value":"customUrl"}}]}},{"kind":"Field","name":{"kind":"Name","value":"logo"}},{"kind":"Field","name":{"kind":"Name","value":"sso"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"type"}},{"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":"FragmentDefinition","name":{"kind":"Name","value":"WorkspaceMemberQueryFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"WorkspaceMember"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"firstName"}},{"kind":"Field","name":{"kind":"Name","value":"lastName"}}]}},{"kind":"Field","name":{"kind":"Name","value":"colorScheme"}},{"kind":"Field","name":{"kind":"Name","value":"openRecordIn"}},{"kind":"Field","name":{"kind":"Name","value":"avatarUrl"}},{"kind":"Field","name":{"kind":"Name","value":"locale"}},{"kind":"Field","name":{"kind":"Name","value":"userEmail"}},{"kind":"Field","name":{"kind":"Name","value":"userWorkspaceId"}},{"kind":"Field","name":{"kind":"Name","value":"timeZone"}},{"kind":"Field","name":{"kind":"Name","value":"dateFormat"}},{"kind":"Field","name":{"kind":"Name","value":"timeFormat"}},{"kind":"Field","name":{"kind":"Name","value":"calendarStartDay"}},{"kind":"Field","name":{"kind":"Name","value":"numberFormat"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"PartialWorkspaceMemberQueryFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"WorkspaceMember"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"firstName"}},{"kind":"Field","name":{"kind":"Name","value":"lastName"}}]}},{"kind":"Field","name":{"kind":"Name","value":"avatarUrl"}},{"kind":"Field","name":{"kind":"Name","value":"userEmail"}},{"kind":"Field","name":{"kind":"Name","value":"userWorkspaceId"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"DeletedWorkspaceMemberQueryFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"DeletedWorkspaceMember"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"firstName"}},{"kind":"Field","name":{"kind":"Name","value":"lastName"}}]}},{"kind":"Field","name":{"kind":"Name","value":"avatarUrl"}},{"kind":"Field","name":{"kind":"Name","value":"userEmail"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ObjectPermissionFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ObjectPermission"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"objectMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"canReadObjectRecords"}},{"kind":"Field","name":{"kind":"Name","value":"canUpdateObjectRecords"}},{"kind":"Field","name":{"kind":"Name","value":"canSoftDeleteObjectRecords"}},{"kind":"Field","name":{"kind":"Name","value":"canDestroyObjectRecords"}},{"kind":"Field","name":{"kind":"Name","value":"restrictedFields"}},{"kind":"Field","name":{"kind":"Name","value":"rowLevelPermissionPredicates"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RowLevelPermissionPredicateFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"rowLevelPermissionPredicateGroups"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RowLevelPermissionPredicateGroupFragment"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"WorkspaceUrlsFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"WorkspaceUrls"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"subdomainUrl"}},{"kind":"Field","name":{"kind":"Name","value":"customUrl"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CurrentBillingSubscriptionFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BillingSubscription"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"interval"}},{"kind":"Field","name":{"kind":"Name","value":"metadata"}},{"kind":"Field","name":{"kind":"Name","value":"currentPeriodEnd"}},{"kind":"Field","name":{"kind":"Name","value":"cancelAt"}},{"kind":"Field","name":{"kind":"Name","value":"phases"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"billingSubscriptionItems"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"hasReachedCurrentPeriodCap"}},{"kind":"Field","name":{"kind":"Name","value":"quantity"}},{"kind":"Field","name":{"kind":"Name","value":"stripePriceId"}},{"kind":"Field","name":{"kind":"Name","value":"billingProduct"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"images"}},{"kind":"Field","name":{"kind":"Name","value":"metadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"productKey"}},{"kind":"Field","name":{"kind":"Name","value":"planKey"}},{"kind":"Field","name":{"kind":"Name","value":"priceUsageBased"}}]}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BillingSubscriptionFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BillingSubscription"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"metadata"}},{"kind":"Field","name":{"kind":"Name","value":"cancelAt"}},{"kind":"Field","name":{"kind":"Name","value":"phases"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseFragment"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RoleFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Role"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"label"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"icon"}},{"kind":"Field","name":{"kind":"Name","value":"canUpdateAllSettings"}},{"kind":"Field","name":{"kind":"Name","value":"canAccessAllTools"}},{"kind":"Field","name":{"kind":"Name","value":"isEditable"}},{"kind":"Field","name":{"kind":"Name","value":"canReadAllObjectRecords"}},{"kind":"Field","name":{"kind":"Name","value":"canUpdateAllObjectRecords"}},{"kind":"Field","name":{"kind":"Name","value":"canSoftDeleteAllObjectRecords"}},{"kind":"Field","name":{"kind":"Name","value":"canDestroyAllObjectRecords"}},{"kind":"Field","name":{"kind":"Name","value":"canBeAssignedToUsers"}},{"kind":"Field","name":{"kind":"Name","value":"canBeAssignedToAgents"}},{"kind":"Field","name":{"kind":"Name","value":"canBeAssignedToApiKeys"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AvailableWorkspacesFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AvailableWorkspaces"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"availableWorkspacesForSignIn"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"AvailableWorkspaceFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"availableWorkspacesForSignUp"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"AvailableWorkspaceFragment"}}]}}]}}]} as unknown as DocumentNode<UserQueryFragmentFragment, unknown>;
export const ViewFieldFragmentFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ViewFieldFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ViewField"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"fieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"viewId"}},{"kind":"Field","name":{"kind":"Name","value":"isVisible"}},{"kind":"Field","name":{"kind":"Name","value":"position"}},{"kind":"Field","name":{"kind":"Name","value":"size"}},{"kind":"Field","name":{"kind":"Name","value":"aggregateOperation"}},{"kind":"Field","name":{"kind":"Name","value":"viewFieldGroupId"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"deletedAt"}}]}}]} as unknown as DocumentNode<ViewFieldFragmentFragment, unknown>;
export const ViewFieldGroupFragmentFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ViewFieldGroupFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ViewFieldGroup"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"position"}},{"kind":"Field","name":{"kind":"Name","value":"isVisible"}},{"kind":"Field","name":{"kind":"Name","value":"viewId"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"deletedAt"}},{"kind":"Field","name":{"kind":"Name","value":"viewFields"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ViewFieldFragment"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ViewFieldFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ViewField"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"fieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"viewId"}},{"kind":"Field","name":{"kind":"Name","value":"isVisible"}},{"kind":"Field","name":{"kind":"Name","value":"position"}},{"kind":"Field","name":{"kind":"Name","value":"size"}},{"kind":"Field","name":{"kind":"Name","value":"aggregateOperation"}},{"kind":"Field","name":{"kind":"Name","value":"viewFieldGroupId"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"deletedAt"}}]}}]} as unknown as DocumentNode<ViewFieldGroupFragmentFragment, unknown>;
export const ViewFilterFragmentFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ViewFilterFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ViewFilter"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"fieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"operand"}},{"kind":"Field","name":{"kind":"Name","value":"value"}},{"kind":"Field","name":{"kind":"Name","value":"viewFilterGroupId"}},{"kind":"Field","name":{"kind":"Name","value":"positionInViewFilterGroup"}},{"kind":"Field","name":{"kind":"Name","value":"subFieldName"}},{"kind":"Field","name":{"kind":"Name","value":"relationTargetFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"viewId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"deletedAt"}}]}}]} as unknown as DocumentNode<ViewFilterFragmentFragment, unknown>;
@@ -9518,11 +9551,12 @@ export const DeleteOneIndexMetadataItemDocument = {"kind":"Document","definition
export const ObjectMetadataItemsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"ObjectMetadataItems"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"objects"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"paging"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"first"},"value":{"kind":"IntValue","value":"1000"}}]}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"edges"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"node"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ObjectMetadataFields"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"pageInfo"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"hasNextPage"}},{"kind":"Field","name":{"kind":"Name","value":"hasPreviousPage"}},{"kind":"Field","name":{"kind":"Name","value":"startCursor"}},{"kind":"Field","name":{"kind":"Name","value":"endCursor"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ObjectMetadataFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Object"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"universalIdentifier"}},{"kind":"Field","name":{"kind":"Name","value":"nameSingular"}},{"kind":"Field","name":{"kind":"Name","value":"namePlural"}},{"kind":"Field","name":{"kind":"Name","value":"labelSingular"}},{"kind":"Field","name":{"kind":"Name","value":"labelPlural"}},{"kind":"Field","name":{"kind":"Name","value":"color"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"icon"}},{"kind":"Field","name":{"kind":"Name","value":"isRemote"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"isSystem"}},{"kind":"Field","name":{"kind":"Name","value":"isUIEditable"}},{"kind":"Field","name":{"kind":"Name","value":"isUICreatable"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"labelIdentifierFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"imageIdentifierFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"applicationId"}},{"kind":"Field","name":{"kind":"Name","value":"shortcut"}},{"kind":"Field","name":{"kind":"Name","value":"isLabelSyncedWithName"}},{"kind":"Field","name":{"kind":"Name","value":"isSearchable"}},{"kind":"Field","name":{"kind":"Name","value":"openRecordIn"}},{"kind":"Field","name":{"kind":"Name","value":"duplicateCriteria"}},{"kind":"Field","name":{"kind":"Name","value":"searchFieldMetadataList"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"fieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"tsVectorFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"position"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}},{"kind":"Field","name":{"kind":"Name","value":"indexMetadataList"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"indexWhereClause"}},{"kind":"Field","name":{"kind":"Name","value":"indexType"}},{"kind":"Field","name":{"kind":"Name","value":"isUnique"}},{"kind":"Field","name":{"kind":"Name","value":"isCustom"}},{"kind":"Field","name":{"kind":"Name","value":"indexFieldMetadataList"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"fieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"subFieldName"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"order"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"fieldsList"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"universalIdentifier"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"label"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"icon"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"isSystem"}},{"kind":"Field","name":{"kind":"Name","value":"isUIEditable"}},{"kind":"Field","name":{"kind":"Name","value":"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<ObjectMetadataItemsQuery, ObjectMetadataItemsQueryVariables>;
export const ObjectRecordCountsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"ObjectRecordCounts"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"objectRecordCounts"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"objectNamePlural"}},{"kind":"Field","name":{"kind":"Name","value":"totalCount"}}]}}]}}]} as unknown as DocumentNode<ObjectRecordCountsQuery, ObjectRecordCountsQueryVariables>;
export const MostlyEmptyFieldMetadataIdsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"MostlyEmptyFieldMetadataIds"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"objectMetadataId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UUID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"mostlyEmptyFieldMetadataIds"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"objectMetadataId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"objectMetadataId"}}}]}]}}]} as unknown as DocumentNode<MostlyEmptyFieldMetadataIdsQuery, MostlyEmptyFieldMetadataIdsQueryVariables>;
-export const CompleteBookCallOnboardingStepDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"CompleteBookCallOnboardingStep"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"completeBookCallOnboardingStep"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"success"}}]}}]}}]} as unknown as DocumentNode<CompleteBookCallOnboardingStepMutation, CompleteBookCallOnboardingStepMutationVariables>;
+export const CompleteBookCallOnboardingStepDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"CompleteBookCallOnboardingStep"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"hasBookedCall"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Boolean"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"isAutoSkipped"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Boolean"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"completeBookCallOnboardingStep"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"hasBookedCall"},"value":{"kind":"Variable","name":{"kind":"Name","value":"hasBookedCall"}}},{"kind":"Argument","name":{"kind":"Name","value":"isAutoSkipped"},"value":{"kind":"Variable","name":{"kind":"Name","value":"isAutoSkipped"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"success"}}]}}]}}]} as unknown as DocumentNode<CompleteBookCallOnboardingStepMutation, CompleteBookCallOnboardingStepMutationVariables>;
export const EnrichWorkspaceCompanyDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"EnrichWorkspaceCompany"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"enrichWorkspaceCompany"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"outcome"}},{"kind":"Field","name":{"kind":"Name","value":"enrichment"}},{"kind":"Field","name":{"kind":"Name","value":"isBookCallOnboardingStepPending"}}]}}]}}]} as unknown as DocumentNode<EnrichWorkspaceCompanyMutation, EnrichWorkspaceCompanyMutationVariables>;
-export const SkipSyncEmailOnboardingStepDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"SkipSyncEmailOnboardingStep"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"skipSyncEmailOnboardingStep"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"success"}}]}}]}}]} as unknown as DocumentNode<SkipSyncEmailOnboardingStepMutation, SkipSyncEmailOnboardingStepMutationVariables>;
+export const GoBackToPreviousOnboardingStepDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"GoBackToPreviousOnboardingStep"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"goBackToPreviousOnboardingStep"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"onboardingStatus"}},{"kind":"Field","name":{"kind":"Name","value":"previousOnboardingStatus"}}]}}]}}]} as unknown as DocumentNode<GoBackToPreviousOnboardingStepMutation, GoBackToPreviousOnboardingStepMutationVariables>;
+export const SkipSyncEmailOnboardingStepDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"SkipSyncEmailOnboardingStep"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"isAutoSkipped"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Boolean"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"skipSyncEmailOnboardingStep"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"isAutoSkipped"},"value":{"kind":"Variable","name":{"kind":"Name","value":"isAutoSkipped"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"success"}}]}}]}}]} as unknown as DocumentNode<SkipSyncEmailOnboardingStepMutation, SkipSyncEmailOnboardingStepMutationVariables>;
export const StartWorkspaceSetupChatDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"StartWorkspaceSetupChat"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"companyContext"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"JSON"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"startWorkspaceSetupChat"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"companyContext"},"value":{"kind":"Variable","name":{"kind":"Name","value":"companyContext"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"outcome"}},{"kind":"Field","name":{"kind":"Name","value":"thread"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"totalInputTokens"}},{"kind":"Field","name":{"kind":"Name","value":"totalOutputTokens"}},{"kind":"Field","name":{"kind":"Name","value":"contextWindowTokens"}},{"kind":"Field","name":{"kind":"Name","value":"conversationSize"}},{"kind":"Field","name":{"kind":"Name","value":"totalInputCredits"}},{"kind":"Field","name":{"kind":"Name","value":"totalOutputCredits"}},{"kind":"Field","name":{"kind":"Name","value":"deletedAt"}},{"kind":"Field","name":{"kind":"Name","value":"lastMessageAt"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}}]}}]}}]} as unknown as DocumentNode<StartWorkspaceSetupChatMutation, StartWorkspaceSetupChatMutationVariables>;
-export const TriggerInstallAppsOnboardingStepDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"TriggerInstallAppsOnboardingStep"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"universalIdentifiers"}},"type":{"kind":"NonNullType","type":{"kind":"ListType","type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"triggerInstallAppsOnboardingStep"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"universalIdentifiers"},"value":{"kind":"Variable","name":{"kind":"Name","value":"universalIdentifiers"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"success"}}]}}]}}]} as unknown as DocumentNode<TriggerInstallAppsOnboardingStepMutation, TriggerInstallAppsOnboardingStepMutationVariables>;
+export const TriggerInstallAppsOnboardingStepDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"TriggerInstallAppsOnboardingStep"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"universalIdentifiers"}},"type":{"kind":"NonNullType","type":{"kind":"ListType","type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"isAutoSkipped"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Boolean"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"triggerInstallAppsOnboardingStep"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"universalIdentifiers"},"value":{"kind":"Variable","name":{"kind":"Name","value":"universalIdentifiers"}}},{"kind":"Argument","name":{"kind":"Name","value":"isAutoSkipped"},"value":{"kind":"Variable","name":{"kind":"Name","value":"isAutoSkipped"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"success"}}]}}]}}]} as unknown as DocumentNode<TriggerInstallAppsOnboardingStepMutation, TriggerInstallAppsOnboardingStepMutationVariables>;
export const GetInviteSuggestionsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetInviteSuggestions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"getInviteSuggestions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"email"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}}]}}]}}]} as unknown as DocumentNode<GetInviteSuggestionsQuery, GetInviteSuggestionsQueryVariables>;
export const ResetPageLayoutTabToDefaultDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"ResetPageLayoutTabToDefault"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"resetPageLayoutTabToDefault"},"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":"PageLayoutTabFragment"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"PageLayoutWidgetFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"PageLayoutWidget"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"applicationId"}},{"kind":"Field","name":{"kind":"Name","value":"universalIdentifier"}},{"kind":"Field","name":{"kind":"Name","value":"isSystemSideEffect"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"objectMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"deletedAt"}},{"kind":"Field","name":{"kind":"Name","value":"conditionalDisplay"}},{"kind":"Field","name":{"kind":"Name","value":"conditionalAvailabilityExpression"}},{"kind":"Field","name":{"kind":"Name","value":"gridPosition"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"column"}},{"kind":"Field","name":{"kind":"Name","value":"columnSpan"}},{"kind":"Field","name":{"kind":"Name","value":"row"}},{"kind":"Field","name":{"kind":"Name","value":"rowSpan"}}]}},{"kind":"Field","name":{"kind":"Name","value":"position"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"PageLayoutWidgetGridPosition"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"layoutMode"}},{"kind":"Field","name":{"kind":"Name","value":"row"}},{"kind":"Field","name":{"kind":"Name","value":"column"}},{"kind":"Field","name":{"kind":"Name","value":"rowSpan"}},{"kind":"Field","name":{"kind":"Name","value":"columnSpan"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"PageLayoutWidgetVerticalListPosition"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"layoutMode"}},{"kind":"Field","name":{"kind":"Name","value":"index"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"PageLayoutWidgetCanvasPosition"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"layoutMode"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"configuration"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BarChartConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}},{"kind":"Field","name":{"kind":"Name","value":"aggregateFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"aggregateOperation"}},{"kind":"Field","name":{"kind":"Name","value":"primaryAxisGroupByFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"primaryAxisGroupBySubFieldName"}},{"kind":"Field","name":{"kind":"Name","value":"primaryAxisDateGranularity"}},{"kind":"Field","name":{"kind":"Name","value":"primaryAxisOrderBy"}},{"kind":"Field","name":{"kind":"Name","value":"primaryAxisManualSortOrder"}},{"kind":"Field","name":{"kind":"Name","value":"secondaryAxisGroupByFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"secondaryAxisGroupBySubFieldName"}},{"kind":"Field","name":{"kind":"Name","value":"secondaryAxisGroupByDateGranularity"}},{"kind":"Field","name":{"kind":"Name","value":"secondaryAxisOrderBy"}},{"kind":"Field","name":{"kind":"Name","value":"secondaryAxisManualSortOrder"}},{"kind":"Field","name":{"kind":"Name","value":"omitNullValues"}},{"kind":"Field","name":{"kind":"Name","value":"axisNameDisplay"}},{"kind":"Field","name":{"kind":"Name","value":"displayDataLabel"}},{"kind":"Field","name":{"kind":"Name","value":"displayLegend"}},{"kind":"Field","name":{"kind":"Name","value":"numberFormat"}},{"kind":"Field","name":{"kind":"Name","value":"rangeMin"}},{"kind":"Field","name":{"kind":"Name","value":"rangeMax"}},{"kind":"Field","name":{"kind":"Name","value":"color"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"filter"}},{"kind":"Field","name":{"kind":"Name","value":"groupMode"}},{"kind":"Field","name":{"kind":"Name","value":"layout"}},{"kind":"Field","name":{"kind":"Name","value":"isCumulative"}},{"kind":"Field","name":{"kind":"Name","value":"splitMultiValueFields"}},{"kind":"Field","name":{"kind":"Name","value":"timezone"}},{"kind":"Field","name":{"kind":"Name","value":"firstDayOfTheWeek"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"LineChartConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}},{"kind":"Field","name":{"kind":"Name","value":"aggregateFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"aggregateOperation"}},{"kind":"Field","name":{"kind":"Name","value":"primaryAxisGroupByFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"primaryAxisGroupBySubFieldName"}},{"kind":"Field","name":{"kind":"Name","value":"primaryAxisDateGranularity"}},{"kind":"Field","name":{"kind":"Name","value":"primaryAxisOrderBy"}},{"kind":"Field","name":{"kind":"Name","value":"primaryAxisManualSortOrder"}},{"kind":"Field","name":{"kind":"Name","value":"secondaryAxisGroupByFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"secondaryAxisGroupBySubFieldName"}},{"kind":"Field","name":{"kind":"Name","value":"secondaryAxisGroupByDateGranularity"}},{"kind":"Field","name":{"kind":"Name","value":"secondaryAxisOrderBy"}},{"kind":"Field","name":{"kind":"Name","value":"secondaryAxisManualSortOrder"}},{"kind":"Field","name":{"kind":"Name","value":"omitNullValues"}},{"kind":"Field","name":{"kind":"Name","value":"axisNameDisplay"}},{"kind":"Field","name":{"kind":"Name","value":"displayDataLabel"}},{"kind":"Field","name":{"kind":"Name","value":"displayLegend"}},{"kind":"Field","name":{"kind":"Name","value":"numberFormat"}},{"kind":"Field","name":{"kind":"Name","value":"rangeMin"}},{"kind":"Field","name":{"kind":"Name","value":"rangeMax"}},{"kind":"Field","name":{"kind":"Name","value":"color"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"filter"}},{"kind":"Field","name":{"kind":"Name","value":"isStacked"}},{"kind":"Field","name":{"kind":"Name","value":"isCumulative"}},{"kind":"Field","name":{"kind":"Name","value":"splitMultiValueFields"}},{"kind":"Field","name":{"kind":"Name","value":"timezone"}},{"kind":"Field","name":{"kind":"Name","value":"firstDayOfTheWeek"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"PieChartConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}},{"kind":"Field","name":{"kind":"Name","value":"groupByFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"aggregateFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"aggregateOperation"}},{"kind":"Field","name":{"kind":"Name","value":"groupBySubFieldName"}},{"kind":"Field","name":{"kind":"Name","value":"dateGranularity"}},{"kind":"Field","name":{"kind":"Name","value":"orderBy"}},{"kind":"Field","name":{"kind":"Name","value":"manualSortOrder"}},{"kind":"Field","name":{"kind":"Name","value":"displayDataLabel"}},{"kind":"Field","name":{"kind":"Name","value":"showCenterMetric"}},{"kind":"Field","name":{"kind":"Name","value":"displayLegend"}},{"kind":"Field","name":{"kind":"Name","value":"numberFormat"}},{"kind":"Field","name":{"kind":"Name","value":"hideEmptyCategory"}},{"kind":"Field","name":{"kind":"Name","value":"splitMultiValueFields"}},{"kind":"Field","name":{"kind":"Name","value":"color"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"filter"}},{"kind":"Field","name":{"kind":"Name","value":"timezone"}},{"kind":"Field","name":{"kind":"Name","value":"firstDayOfTheWeek"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AggregateChartConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}},{"kind":"Field","name":{"kind":"Name","value":"aggregateFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"aggregateOperation"}},{"kind":"Field","name":{"kind":"Name","value":"label"}},{"kind":"Field","name":{"kind":"Name","value":"displayDataLabel"}},{"kind":"Field","name":{"kind":"Name","value":"numberFormat"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"filter"}},{"kind":"Field","name":{"kind":"Name","value":"prefix"}},{"kind":"Field","name":{"kind":"Name","value":"suffix"}},{"kind":"Field","name":{"kind":"Name","value":"timezone"}},{"kind":"Field","name":{"kind":"Name","value":"firstDayOfTheWeek"}},{"kind":"Field","name":{"kind":"Name","value":"ratioAggregateConfig"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"fieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"optionValue"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"IframeConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}},{"kind":"Field","name":{"kind":"Name","value":"url"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"StandaloneRichTextConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}},{"kind":"Field","name":{"kind":"Name","value":"body"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"blocknote"}},{"kind":"Field","name":{"kind":"Name","value":"markdown"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"CalendarConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailsConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailThreadConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"CallRecordingSummaryConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"CallRecordingTranscriptConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"MessageCampaignBodyConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"MessageCampaignDetailsConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"FieldConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}},{"kind":"Field","name":{"kind":"Name","value":"fieldDisplayMode"}},{"kind":"Field","name":{"kind":"Name","value":"fieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"viewId"}},{"kind":"Field","name":{"kind":"Name","value":"nestedRelationFieldMetadataId"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"FieldRichTextConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"FieldsConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}},{"kind":"Field","name":{"kind":"Name","value":"viewId"}},{"kind":"Field","name":{"kind":"Name","value":"newFieldDefaultVisibility"}},{"kind":"Field","name":{"kind":"Name","value":"shouldAllowUserToSeeHiddenFields"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"FilesConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"NotesConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TasksConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TimelineConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ViewConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RecordTableConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}},{"kind":"Field","name":{"kind":"Name","value":"viewId"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"WorkflowConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"WorkflowRunConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"WorkflowVersionConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"FrontComponentConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}},{"kind":"Field","name":{"kind":"Name","value":"frontComponentId"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"pageLayoutTabId"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"PageLayoutTabFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"PageLayoutTab"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"applicationId"}},{"kind":"Field","name":{"kind":"Name","value":"universalIdentifier"}},{"kind":"Field","name":{"kind":"Name","value":"isSystemSideEffect"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"icon"}},{"kind":"Field","name":{"kind":"Name","value":"position"}},{"kind":"Field","name":{"kind":"Name","value":"layoutMode"}},{"kind":"Field","name":{"kind":"Name","value":"widgets"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"PageLayoutWidgetFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"pageLayoutId"}},{"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<ResetPageLayoutTabToDefaultMutation, ResetPageLayoutTabToDefaultMutationVariables>;
export const ResetPageLayoutToDefaultDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"ResetPageLayoutToDefault"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"resetPageLayoutToDefault"},"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":"PageLayoutFragment"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"PageLayoutWidgetFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"PageLayoutWidget"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"applicationId"}},{"kind":"Field","name":{"kind":"Name","value":"universalIdentifier"}},{"kind":"Field","name":{"kind":"Name","value":"isSystemSideEffect"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"objectMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"deletedAt"}},{"kind":"Field","name":{"kind":"Name","value":"conditionalDisplay"}},{"kind":"Field","name":{"kind":"Name","value":"conditionalAvailabilityExpression"}},{"kind":"Field","name":{"kind":"Name","value":"gridPosition"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"column"}},{"kind":"Field","name":{"kind":"Name","value":"columnSpan"}},{"kind":"Field","name":{"kind":"Name","value":"row"}},{"kind":"Field","name":{"kind":"Name","value":"rowSpan"}}]}},{"kind":"Field","name":{"kind":"Name","value":"position"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"PageLayoutWidgetGridPosition"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"layoutMode"}},{"kind":"Field","name":{"kind":"Name","value":"row"}},{"kind":"Field","name":{"kind":"Name","value":"column"}},{"kind":"Field","name":{"kind":"Name","value":"rowSpan"}},{"kind":"Field","name":{"kind":"Name","value":"columnSpan"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"PageLayoutWidgetVerticalListPosition"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"layoutMode"}},{"kind":"Field","name":{"kind":"Name","value":"index"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"PageLayoutWidgetCanvasPosition"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"layoutMode"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"configuration"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BarChartConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}},{"kind":"Field","name":{"kind":"Name","value":"aggregateFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"aggregateOperation"}},{"kind":"Field","name":{"kind":"Name","value":"primaryAxisGroupByFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"primaryAxisGroupBySubFieldName"}},{"kind":"Field","name":{"kind":"Name","value":"primaryAxisDateGranularity"}},{"kind":"Field","name":{"kind":"Name","value":"primaryAxisOrderBy"}},{"kind":"Field","name":{"kind":"Name","value":"primaryAxisManualSortOrder"}},{"kind":"Field","name":{"kind":"Name","value":"secondaryAxisGroupByFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"secondaryAxisGroupBySubFieldName"}},{"kind":"Field","name":{"kind":"Name","value":"secondaryAxisGroupByDateGranularity"}},{"kind":"Field","name":{"kind":"Name","value":"secondaryAxisOrderBy"}},{"kind":"Field","name":{"kind":"Name","value":"secondaryAxisManualSortOrder"}},{"kind":"Field","name":{"kind":"Name","value":"omitNullValues"}},{"kind":"Field","name":{"kind":"Name","value":"axisNameDisplay"}},{"kind":"Field","name":{"kind":"Name","value":"displayDataLabel"}},{"kind":"Field","name":{"kind":"Name","value":"displayLegend"}},{"kind":"Field","name":{"kind":"Name","value":"numberFormat"}},{"kind":"Field","name":{"kind":"Name","value":"rangeMin"}},{"kind":"Field","name":{"kind":"Name","value":"rangeMax"}},{"kind":"Field","name":{"kind":"Name","value":"color"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"filter"}},{"kind":"Field","name":{"kind":"Name","value":"groupMode"}},{"kind":"Field","name":{"kind":"Name","value":"layout"}},{"kind":"Field","name":{"kind":"Name","value":"isCumulative"}},{"kind":"Field","name":{"kind":"Name","value":"splitMultiValueFields"}},{"kind":"Field","name":{"kind":"Name","value":"timezone"}},{"kind":"Field","name":{"kind":"Name","value":"firstDayOfTheWeek"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"LineChartConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}},{"kind":"Field","name":{"kind":"Name","value":"aggregateFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"aggregateOperation"}},{"kind":"Field","name":{"kind":"Name","value":"primaryAxisGroupByFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"primaryAxisGroupBySubFieldName"}},{"kind":"Field","name":{"kind":"Name","value":"primaryAxisDateGranularity"}},{"kind":"Field","name":{"kind":"Name","value":"primaryAxisOrderBy"}},{"kind":"Field","name":{"kind":"Name","value":"primaryAxisManualSortOrder"}},{"kind":"Field","name":{"kind":"Name","value":"secondaryAxisGroupByFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"secondaryAxisGroupBySubFieldName"}},{"kind":"Field","name":{"kind":"Name","value":"secondaryAxisGroupByDateGranularity"}},{"kind":"Field","name":{"kind":"Name","value":"secondaryAxisOrderBy"}},{"kind":"Field","name":{"kind":"Name","value":"secondaryAxisManualSortOrder"}},{"kind":"Field","name":{"kind":"Name","value":"omitNullValues"}},{"kind":"Field","name":{"kind":"Name","value":"axisNameDisplay"}},{"kind":"Field","name":{"kind":"Name","value":"displayDataLabel"}},{"kind":"Field","name":{"kind":"Name","value":"displayLegend"}},{"kind":"Field","name":{"kind":"Name","value":"numberFormat"}},{"kind":"Field","name":{"kind":"Name","value":"rangeMin"}},{"kind":"Field","name":{"kind":"Name","value":"rangeMax"}},{"kind":"Field","name":{"kind":"Name","value":"color"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"filter"}},{"kind":"Field","name":{"kind":"Name","value":"isStacked"}},{"kind":"Field","name":{"kind":"Name","value":"isCumulative"}},{"kind":"Field","name":{"kind":"Name","value":"splitMultiValueFields"}},{"kind":"Field","name":{"kind":"Name","value":"timezone"}},{"kind":"Field","name":{"kind":"Name","value":"firstDayOfTheWeek"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"PieChartConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}},{"kind":"Field","name":{"kind":"Name","value":"groupByFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"aggregateFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"aggregateOperation"}},{"kind":"Field","name":{"kind":"Name","value":"groupBySubFieldName"}},{"kind":"Field","name":{"kind":"Name","value":"dateGranularity"}},{"kind":"Field","name":{"kind":"Name","value":"orderBy"}},{"kind":"Field","name":{"kind":"Name","value":"manualSortOrder"}},{"kind":"Field","name":{"kind":"Name","value":"displayDataLabel"}},{"kind":"Field","name":{"kind":"Name","value":"showCenterMetric"}},{"kind":"Field","name":{"kind":"Name","value":"displayLegend"}},{"kind":"Field","name":{"kind":"Name","value":"numberFormat"}},{"kind":"Field","name":{"kind":"Name","value":"hideEmptyCategory"}},{"kind":"Field","name":{"kind":"Name","value":"splitMultiValueFields"}},{"kind":"Field","name":{"kind":"Name","value":"color"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"filter"}},{"kind":"Field","name":{"kind":"Name","value":"timezone"}},{"kind":"Field","name":{"kind":"Name","value":"firstDayOfTheWeek"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AggregateChartConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}},{"kind":"Field","name":{"kind":"Name","value":"aggregateFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"aggregateOperation"}},{"kind":"Field","name":{"kind":"Name","value":"label"}},{"kind":"Field","name":{"kind":"Name","value":"displayDataLabel"}},{"kind":"Field","name":{"kind":"Name","value":"numberFormat"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"filter"}},{"kind":"Field","name":{"kind":"Name","value":"prefix"}},{"kind":"Field","name":{"kind":"Name","value":"suffix"}},{"kind":"Field","name":{"kind":"Name","value":"timezone"}},{"kind":"Field","name":{"kind":"Name","value":"firstDayOfTheWeek"}},{"kind":"Field","name":{"kind":"Name","value":"ratioAggregateConfig"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"fieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"optionValue"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"IframeConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}},{"kind":"Field","name":{"kind":"Name","value":"url"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"StandaloneRichTextConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}},{"kind":"Field","name":{"kind":"Name","value":"body"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"blocknote"}},{"kind":"Field","name":{"kind":"Name","value":"markdown"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"CalendarConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailsConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailThreadConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"CallRecordingSummaryConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"CallRecordingTranscriptConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"MessageCampaignBodyConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"MessageCampaignDetailsConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"FieldConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}},{"kind":"Field","name":{"kind":"Name","value":"fieldDisplayMode"}},{"kind":"Field","name":{"kind":"Name","value":"fieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"viewId"}},{"kind":"Field","name":{"kind":"Name","value":"nestedRelationFieldMetadataId"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"FieldRichTextConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"FieldsConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}},{"kind":"Field","name":{"kind":"Name","value":"viewId"}},{"kind":"Field","name":{"kind":"Name","value":"newFieldDefaultVisibility"}},{"kind":"Field","name":{"kind":"Name","value":"shouldAllowUserToSeeHiddenFields"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"FilesConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"NotesConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TasksConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TimelineConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ViewConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RecordTableConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}},{"kind":"Field","name":{"kind":"Name","value":"viewId"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"WorkflowConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"WorkflowRunConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"WorkflowVersionConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"FrontComponentConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}},{"kind":"Field","name":{"kind":"Name","value":"frontComponentId"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"pageLayoutTabId"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"PageLayoutTabFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"PageLayoutTab"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"applicationId"}},{"kind":"Field","name":{"kind":"Name","value":"universalIdentifier"}},{"kind":"Field","name":{"kind":"Name","value":"isSystemSideEffect"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"icon"}},{"kind":"Field","name":{"kind":"Name","value":"position"}},{"kind":"Field","name":{"kind":"Name","value":"layoutMode"}},{"kind":"Field","name":{"kind":"Name","value":"widgets"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"PageLayoutWidgetFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"pageLayoutId"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"PageLayoutFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"PageLayout"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"applicationId"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"objectMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"universalIdentifier"}},{"kind":"Field","name":{"kind":"Name","value":"isSystemSideEffect"}},{"kind":"Field","name":{"kind":"Name","value":"defaultTabToFocusOnMobileAndSidePanelId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"tabs"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"PageLayoutTabFragment"}}]}}]}}]} as unknown as DocumentNode<ResetPageLayoutToDefaultMutation, ResetPageLayoutToDefaultMutationVariables>;
@@ -9643,7 +9677,7 @@ export const RemoveQueryFromEventStreamDocument = {"kind":"Document","definition
export const OnEventSubscriptionDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"subscription","name":{"kind":"Name","value":"OnEventSubscription"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"eventStreamId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"onEventSubscription"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"eventStreamId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"eventStreamId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"eventStreamId"}},{"kind":"Field","name":{"kind":"Name","value":"objectRecordEventsWithQueryIds"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"objectRecordEvent"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"action"}},{"kind":"Field","name":{"kind":"Name","value":"objectNameSingular"}},{"kind":"Field","name":{"kind":"Name","value":"recordId"}},{"kind":"Field","name":{"kind":"Name","value":"userId"}},{"kind":"Field","name":{"kind":"Name","value":"workspaceMemberId"}},{"kind":"Field","name":{"kind":"Name","value":"properties"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"updatedFields"}},{"kind":"Field","name":{"kind":"Name","value":"before"}},{"kind":"Field","name":{"kind":"Name","value":"after"}},{"kind":"Field","name":{"kind":"Name","value":"diff"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"queryIds"}}]}},{"kind":"Field","name":{"kind":"Name","value":"metadataEvents"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"metadataName"}},{"kind":"Field","name":{"kind":"Name","value":"recordId"}},{"kind":"Field","name":{"kind":"Name","value":"updatedCollectionHash"}},{"kind":"Field","name":{"kind":"Name","value":"properties"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"updatedFields"}},{"kind":"Field","name":{"kind":"Name","value":"before"}},{"kind":"Field","name":{"kind":"Name","value":"after"}},{"kind":"Field","name":{"kind":"Name","value":"diff"}}]}}]}}]}}]}}]} as unknown as DocumentNode<OnEventSubscriptionSubscription, OnEventSubscriptionSubscriptionVariables>;
export const DeleteUserAccountDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"DeleteUserAccount"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"deleteUser"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}}]}}]} as unknown as DocumentNode<DeleteUserAccountMutation, DeleteUserAccountMutationVariables>;
export const DeleteUserWorkspaceDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"DeleteUserWorkspace"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"workspaceMemberIdToDelete"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"deleteUserFromWorkspace"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"workspaceMemberIdToDelete"},"value":{"kind":"Variable","name":{"kind":"Name","value":"workspaceMemberIdToDelete"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}}]}}]} as unknown as DocumentNode<DeleteUserWorkspaceMutation, DeleteUserWorkspaceMutationVariables>;
-export const GetCurrentUserDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetCurrentUser"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"currentUser"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"UserQueryFragment"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"WorkspaceMemberQueryFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"WorkspaceMember"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"firstName"}},{"kind":"Field","name":{"kind":"Name","value":"lastName"}}]}},{"kind":"Field","name":{"kind":"Name","value":"colorScheme"}},{"kind":"Field","name":{"kind":"Name","value":"openRecordIn"}},{"kind":"Field","name":{"kind":"Name","value":"avatarUrl"}},{"kind":"Field","name":{"kind":"Name","value":"locale"}},{"kind":"Field","name":{"kind":"Name","value":"userEmail"}},{"kind":"Field","name":{"kind":"Name","value":"userWorkspaceId"}},{"kind":"Field","name":{"kind":"Name","value":"timeZone"}},{"kind":"Field","name":{"kind":"Name","value":"dateFormat"}},{"kind":"Field","name":{"kind":"Name","value":"timeFormat"}},{"kind":"Field","name":{"kind":"Name","value":"calendarStartDay"}},{"kind":"Field","name":{"kind":"Name","value":"numberFormat"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"PartialWorkspaceMemberQueryFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"WorkspaceMember"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"firstName"}},{"kind":"Field","name":{"kind":"Name","value":"lastName"}}]}},{"kind":"Field","name":{"kind":"Name","value":"avatarUrl"}},{"kind":"Field","name":{"kind":"Name","value":"userEmail"}},{"kind":"Field","name":{"kind":"Name","value":"userWorkspaceId"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"DeletedWorkspaceMemberQueryFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"DeletedWorkspaceMember"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"firstName"}},{"kind":"Field","name":{"kind":"Name","value":"lastName"}}]}},{"kind":"Field","name":{"kind":"Name","value":"avatarUrl"}},{"kind":"Field","name":{"kind":"Name","value":"userEmail"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RowLevelPermissionPredicateFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RowLevelPermissionPredicate"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"fieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"objectMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"operand"}},{"kind":"Field","name":{"kind":"Name","value":"subFieldName"}},{"kind":"Field","name":{"kind":"Name","value":"workspaceMemberFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"workspaceMemberSubFieldName"}},{"kind":"Field","name":{"kind":"Name","value":"rowLevelPermissionPredicateGroupId"}},{"kind":"Field","name":{"kind":"Name","value":"positionInRowLevelPermissionPredicateGroup"}},{"kind":"Field","name":{"kind":"Name","value":"roleId"}},{"kind":"Field","name":{"kind":"Name","value":"value"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RowLevelPermissionPredicateGroupFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RowLevelPermissionPredicateGroup"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"parentRowLevelPermissionPredicateGroupId"}},{"kind":"Field","name":{"kind":"Name","value":"logicalOperator"}},{"kind":"Field","name":{"kind":"Name","value":"positionInRowLevelPermissionPredicateGroup"}},{"kind":"Field","name":{"kind":"Name","value":"roleId"}},{"kind":"Field","name":{"kind":"Name","value":"objectMetadataId"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ObjectPermissionFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ObjectPermission"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"objectMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"canReadObjectRecords"}},{"kind":"Field","name":{"kind":"Name","value":"canUpdateObjectRecords"}},{"kind":"Field","name":{"kind":"Name","value":"canSoftDeleteObjectRecords"}},{"kind":"Field","name":{"kind":"Name","value":"canDestroyObjectRecords"}},{"kind":"Field","name":{"kind":"Name","value":"restrictedFields"}},{"kind":"Field","name":{"kind":"Name","value":"rowLevelPermissionPredicates"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RowLevelPermissionPredicateFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"rowLevelPermissionPredicateGroups"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RowLevelPermissionPredicateGroupFragment"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"WorkspaceUrlsFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"WorkspaceUrls"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"subdomainUrl"}},{"kind":"Field","name":{"kind":"Name","value":"customUrl"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseItemFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseItem"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"price"}},{"kind":"Field","name":{"kind":"Name","value":"quantity"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhase"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"start_date"}},{"kind":"Field","name":{"kind":"Name","value":"end_date"}},{"kind":"Field","name":{"kind":"Name","value":"items"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseItemFragment"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CurrentBillingSubscriptionFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BillingSubscription"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"interval"}},{"kind":"Field","name":{"kind":"Name","value":"metadata"}},{"kind":"Field","name":{"kind":"Name","value":"currentPeriodEnd"}},{"kind":"Field","name":{"kind":"Name","value":"cancelAt"}},{"kind":"Field","name":{"kind":"Name","value":"phases"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"billingSubscriptionItems"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"hasReachedCurrentPeriodCap"}},{"kind":"Field","name":{"kind":"Name","value":"quantity"}},{"kind":"Field","name":{"kind":"Name","value":"stripePriceId"}},{"kind":"Field","name":{"kind":"Name","value":"billingProduct"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"images"}},{"kind":"Field","name":{"kind":"Name","value":"metadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"productKey"}},{"kind":"Field","name":{"kind":"Name","value":"planKey"}},{"kind":"Field","name":{"kind":"Name","value":"priceUsageBased"}}]}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BillingSubscriptionFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BillingSubscription"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"metadata"}},{"kind":"Field","name":{"kind":"Name","value":"cancelAt"}},{"kind":"Field","name":{"kind":"Name","value":"phases"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseFragment"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RoleFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Role"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"label"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"icon"}},{"kind":"Field","name":{"kind":"Name","value":"canUpdateAllSettings"}},{"kind":"Field","name":{"kind":"Name","value":"canAccessAllTools"}},{"kind":"Field","name":{"kind":"Name","value":"isEditable"}},{"kind":"Field","name":{"kind":"Name","value":"canReadAllObjectRecords"}},{"kind":"Field","name":{"kind":"Name","value":"canUpdateAllObjectRecords"}},{"kind":"Field","name":{"kind":"Name","value":"canSoftDeleteAllObjectRecords"}},{"kind":"Field","name":{"kind":"Name","value":"canDestroyAllObjectRecords"}},{"kind":"Field","name":{"kind":"Name","value":"canBeAssignedToUsers"}},{"kind":"Field","name":{"kind":"Name","value":"canBeAssignedToAgents"}},{"kind":"Field","name":{"kind":"Name","value":"canBeAssignedToApiKeys"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AvailableWorkspaceFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AvailableWorkspace"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"loginToken"}},{"kind":"Field","name":{"kind":"Name","value":"inviteHash"}},{"kind":"Field","name":{"kind":"Name","value":"personalInviteToken"}},{"kind":"Field","name":{"kind":"Name","value":"workspaceUrls"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"subdomainUrl"}},{"kind":"Field","name":{"kind":"Name","value":"customUrl"}}]}},{"kind":"Field","name":{"kind":"Name","value":"logo"}},{"kind":"Field","name":{"kind":"Name","value":"sso"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"type"}},{"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":"FragmentDefinition","name":{"kind":"Name","value":"AvailableWorkspacesFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AvailableWorkspaces"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"availableWorkspacesForSignIn"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"AvailableWorkspaceFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"availableWorkspacesForSignUp"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"AvailableWorkspaceFragment"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"UserQueryFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"User"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"firstName"}},{"kind":"Field","name":{"kind":"Name","value":"lastName"}},{"kind":"Field","name":{"kind":"Name","value":"email"}},{"kind":"Field","name":{"kind":"Name","value":"hasPassword"}},{"kind":"Field","name":{"kind":"Name","value":"canAccessFullAdminPanel"}},{"kind":"Field","name":{"kind":"Name","value":"canImpersonate"}},{"kind":"Field","name":{"kind":"Name","value":"supportUserHash"}},{"kind":"Field","name":{"kind":"Name","value":"onboardingStatus"}},{"kind":"Field","name":{"kind":"Name","value":"isWorkspaceCreator"}},{"kind":"Field","name":{"kind":"Name","value":"workspaceMember"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"WorkspaceMemberQueryFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"workspaceMembers"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"PartialWorkspaceMemberQueryFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"deletedWorkspaceMembers"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"DeletedWorkspaceMemberQueryFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"currentUserWorkspace"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"permissionFlags"}},{"kind":"Field","name":{"kind":"Name","value":"isImpersonating"}},{"kind":"Field","name":{"kind":"Name","value":"objectsPermissions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ObjectPermissionFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"twoFactorAuthenticationMethodSummary"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"twoFactorAuthenticationMethodId"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"strategy"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"currentWorkspace"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"logo"}},{"kind":"Field","name":{"kind":"Name","value":"inviteHash"}},{"kind":"Field","name":{"kind":"Name","value":"allowImpersonation"}},{"kind":"Field","name":{"kind":"Name","value":"activationStatus"}},{"kind":"Field","name":{"kind":"Name","value":"isPublicInviteLinkEnabled"}},{"kind":"Field","name":{"kind":"Name","value":"workspaceDiscoverability"}},{"kind":"Field","name":{"kind":"Name","value":"isGoogleAuthEnabled"}},{"kind":"Field","name":{"kind":"Name","value":"isMicrosoftAuthEnabled"}},{"kind":"Field","name":{"kind":"Name","value":"isPasswordAuthEnabled"}},{"kind":"Field","name":{"kind":"Name","value":"isGoogleAuthBypassEnabled"}},{"kind":"Field","name":{"kind":"Name","value":"isMicrosoftAuthBypassEnabled"}},{"kind":"Field","name":{"kind":"Name","value":"isPasswordAuthBypassEnabled"}},{"kind":"Field","name":{"kind":"Name","value":"subdomain"}},{"kind":"Field","name":{"kind":"Name","value":"customDomain"}},{"kind":"Field","name":{"kind":"Name","value":"hasValidSignedEnterpriseKey"}},{"kind":"Field","name":{"kind":"Name","value":"hasValidEnterpriseValidityToken"}},{"kind":"Field","name":{"kind":"Name","value":"workspaceCustomApplication"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}},{"kind":"Field","name":{"kind":"Name","value":"installedApplications"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"universalIdentifier"}},{"kind":"Field","name":{"kind":"Name","value":"logoUrl"}}]}},{"kind":"Field","name":{"kind":"Name","value":"isCustomDomainEnabled"}},{"kind":"Field","name":{"kind":"Name","value":"workspaceUrls"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"WorkspaceUrlsFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"featureFlags"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"key"}},{"kind":"Field","name":{"kind":"Name","value":"value"}}]}},{"kind":"Field","name":{"kind":"Name","value":"currentBillingSubscription"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CurrentBillingSubscriptionFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"billingCustomer"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"hasPaymentMethod"}}]}},{"kind":"Field","name":{"kind":"Name","value":"billingSubscriptions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BillingSubscriptionFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"billingEntitlements"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"key"}},{"kind":"Field","name":{"kind":"Name","value":"value"}}]}},{"kind":"Field","name":{"kind":"Name","value":"workspaceMembersCount"}},{"kind":"Field","name":{"kind":"Name","value":"defaultRole"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RoleFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"fastModel"}},{"kind":"Field","name":{"kind":"Name","value":"smartModel"}},{"kind":"Field","name":{"kind":"Name","value":"aiAdditionalInstructions"}},{"kind":"Field","name":{"kind":"Name","value":"enabledAiModelIds"}},{"kind":"Field","name":{"kind":"Name","value":"useRecommendedModels"}},{"kind":"Field","name":{"kind":"Name","value":"isTwoFactorAuthenticationEnforced"}},{"kind":"Field","name":{"kind":"Name","value":"trashRetentionDays"}},{"kind":"Field","name":{"kind":"Name","value":"eventLogRetentionDays"}},{"kind":"Field","name":{"kind":"Name","value":"editableProfileFields"}},{"kind":"Field","name":{"kind":"Name","value":"isInternalMessagesImportEnabled"}}]}},{"kind":"Field","name":{"kind":"Name","value":"availableWorkspaces"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"AvailableWorkspacesFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"userVars"}}]}}]} as unknown as DocumentNode<GetCurrentUserQuery, GetCurrentUserQueryVariables>;
+export const GetCurrentUserDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetCurrentUser"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"currentUser"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"UserQueryFragment"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"WorkspaceMemberQueryFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"WorkspaceMember"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"firstName"}},{"kind":"Field","name":{"kind":"Name","value":"lastName"}}]}},{"kind":"Field","name":{"kind":"Name","value":"colorScheme"}},{"kind":"Field","name":{"kind":"Name","value":"openRecordIn"}},{"kind":"Field","name":{"kind":"Name","value":"avatarUrl"}},{"kind":"Field","name":{"kind":"Name","value":"locale"}},{"kind":"Field","name":{"kind":"Name","value":"userEmail"}},{"kind":"Field","name":{"kind":"Name","value":"userWorkspaceId"}},{"kind":"Field","name":{"kind":"Name","value":"timeZone"}},{"kind":"Field","name":{"kind":"Name","value":"dateFormat"}},{"kind":"Field","name":{"kind":"Name","value":"timeFormat"}},{"kind":"Field","name":{"kind":"Name","value":"calendarStartDay"}},{"kind":"Field","name":{"kind":"Name","value":"numberFormat"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"PartialWorkspaceMemberQueryFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"WorkspaceMember"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"firstName"}},{"kind":"Field","name":{"kind":"Name","value":"lastName"}}]}},{"kind":"Field","name":{"kind":"Name","value":"avatarUrl"}},{"kind":"Field","name":{"kind":"Name","value":"userEmail"}},{"kind":"Field","name":{"kind":"Name","value":"userWorkspaceId"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"DeletedWorkspaceMemberQueryFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"DeletedWorkspaceMember"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"firstName"}},{"kind":"Field","name":{"kind":"Name","value":"lastName"}}]}},{"kind":"Field","name":{"kind":"Name","value":"avatarUrl"}},{"kind":"Field","name":{"kind":"Name","value":"userEmail"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RowLevelPermissionPredicateFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RowLevelPermissionPredicate"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"fieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"objectMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"operand"}},{"kind":"Field","name":{"kind":"Name","value":"subFieldName"}},{"kind":"Field","name":{"kind":"Name","value":"workspaceMemberFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"workspaceMemberSubFieldName"}},{"kind":"Field","name":{"kind":"Name","value":"rowLevelPermissionPredicateGroupId"}},{"kind":"Field","name":{"kind":"Name","value":"positionInRowLevelPermissionPredicateGroup"}},{"kind":"Field","name":{"kind":"Name","value":"roleId"}},{"kind":"Field","name":{"kind":"Name","value":"value"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RowLevelPermissionPredicateGroupFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RowLevelPermissionPredicateGroup"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"parentRowLevelPermissionPredicateGroupId"}},{"kind":"Field","name":{"kind":"Name","value":"logicalOperator"}},{"kind":"Field","name":{"kind":"Name","value":"positionInRowLevelPermissionPredicateGroup"}},{"kind":"Field","name":{"kind":"Name","value":"roleId"}},{"kind":"Field","name":{"kind":"Name","value":"objectMetadataId"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ObjectPermissionFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ObjectPermission"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"objectMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"canReadObjectRecords"}},{"kind":"Field","name":{"kind":"Name","value":"canUpdateObjectRecords"}},{"kind":"Field","name":{"kind":"Name","value":"canSoftDeleteObjectRecords"}},{"kind":"Field","name":{"kind":"Name","value":"canDestroyObjectRecords"}},{"kind":"Field","name":{"kind":"Name","value":"restrictedFields"}},{"kind":"Field","name":{"kind":"Name","value":"rowLevelPermissionPredicates"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RowLevelPermissionPredicateFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"rowLevelPermissionPredicateGroups"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RowLevelPermissionPredicateGroupFragment"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"WorkspaceUrlsFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"WorkspaceUrls"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"subdomainUrl"}},{"kind":"Field","name":{"kind":"Name","value":"customUrl"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseItemFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseItem"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"price"}},{"kind":"Field","name":{"kind":"Name","value":"quantity"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhase"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"start_date"}},{"kind":"Field","name":{"kind":"Name","value":"end_date"}},{"kind":"Field","name":{"kind":"Name","value":"items"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseItemFragment"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CurrentBillingSubscriptionFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BillingSubscription"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"interval"}},{"kind":"Field","name":{"kind":"Name","value":"metadata"}},{"kind":"Field","name":{"kind":"Name","value":"currentPeriodEnd"}},{"kind":"Field","name":{"kind":"Name","value":"cancelAt"}},{"kind":"Field","name":{"kind":"Name","value":"phases"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"billingSubscriptionItems"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"hasReachedCurrentPeriodCap"}},{"kind":"Field","name":{"kind":"Name","value":"quantity"}},{"kind":"Field","name":{"kind":"Name","value":"stripePriceId"}},{"kind":"Field","name":{"kind":"Name","value":"billingProduct"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"images"}},{"kind":"Field","name":{"kind":"Name","value":"metadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"productKey"}},{"kind":"Field","name":{"kind":"Name","value":"planKey"}},{"kind":"Field","name":{"kind":"Name","value":"priceUsageBased"}}]}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BillingSubscriptionFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BillingSubscription"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"metadata"}},{"kind":"Field","name":{"kind":"Name","value":"cancelAt"}},{"kind":"Field","name":{"kind":"Name","value":"phases"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseFragment"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RoleFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Role"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"label"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"icon"}},{"kind":"Field","name":{"kind":"Name","value":"canUpdateAllSettings"}},{"kind":"Field","name":{"kind":"Name","value":"canAccessAllTools"}},{"kind":"Field","name":{"kind":"Name","value":"isEditable"}},{"kind":"Field","name":{"kind":"Name","value":"canReadAllObjectRecords"}},{"kind":"Field","name":{"kind":"Name","value":"canUpdateAllObjectRecords"}},{"kind":"Field","name":{"kind":"Name","value":"canSoftDeleteAllObjectRecords"}},{"kind":"Field","name":{"kind":"Name","value":"canDestroyAllObjectRecords"}},{"kind":"Field","name":{"kind":"Name","value":"canBeAssignedToUsers"}},{"kind":"Field","name":{"kind":"Name","value":"canBeAssignedToAgents"}},{"kind":"Field","name":{"kind":"Name","value":"canBeAssignedToApiKeys"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AvailableWorkspaceFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AvailableWorkspace"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"loginToken"}},{"kind":"Field","name":{"kind":"Name","value":"inviteHash"}},{"kind":"Field","name":{"kind":"Name","value":"personalInviteToken"}},{"kind":"Field","name":{"kind":"Name","value":"workspaceUrls"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"subdomainUrl"}},{"kind":"Field","name":{"kind":"Name","value":"customUrl"}}]}},{"kind":"Field","name":{"kind":"Name","value":"logo"}},{"kind":"Field","name":{"kind":"Name","value":"sso"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"type"}},{"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":"FragmentDefinition","name":{"kind":"Name","value":"AvailableWorkspacesFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AvailableWorkspaces"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"availableWorkspacesForSignIn"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"AvailableWorkspaceFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"availableWorkspacesForSignUp"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"AvailableWorkspaceFragment"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"UserQueryFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"User"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"firstName"}},{"kind":"Field","name":{"kind":"Name","value":"lastName"}},{"kind":"Field","name":{"kind":"Name","value":"email"}},{"kind":"Field","name":{"kind":"Name","value":"hasPassword"}},{"kind":"Field","name":{"kind":"Name","value":"canAccessFullAdminPanel"}},{"kind":"Field","name":{"kind":"Name","value":"canImpersonate"}},{"kind":"Field","name":{"kind":"Name","value":"supportUserHash"}},{"kind":"Field","name":{"kind":"Name","value":"onboardingStatus"}},{"kind":"Field","name":{"kind":"Name","value":"previousOnboardingStatus"}},{"kind":"Field","name":{"kind":"Name","value":"isWorkspaceCreator"}},{"kind":"Field","name":{"kind":"Name","value":"workspaceMember"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"WorkspaceMemberQueryFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"workspaceMembers"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"PartialWorkspaceMemberQueryFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"deletedWorkspaceMembers"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"DeletedWorkspaceMemberQueryFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"currentUserWorkspace"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"permissionFlags"}},{"kind":"Field","name":{"kind":"Name","value":"isImpersonating"}},{"kind":"Field","name":{"kind":"Name","value":"objectsPermissions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ObjectPermissionFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"twoFactorAuthenticationMethodSummary"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"twoFactorAuthenticationMethodId"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"strategy"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"currentWorkspace"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"logo"}},{"kind":"Field","name":{"kind":"Name","value":"inviteHash"}},{"kind":"Field","name":{"kind":"Name","value":"allowImpersonation"}},{"kind":"Field","name":{"kind":"Name","value":"activationStatus"}},{"kind":"Field","name":{"kind":"Name","value":"isPublicInviteLinkEnabled"}},{"kind":"Field","name":{"kind":"Name","value":"workspaceDiscoverability"}},{"kind":"Field","name":{"kind":"Name","value":"isGoogleAuthEnabled"}},{"kind":"Field","name":{"kind":"Name","value":"isMicrosoftAuthEnabled"}},{"kind":"Field","name":{"kind":"Name","value":"isPasswordAuthEnabled"}},{"kind":"Field","name":{"kind":"Name","value":"isGoogleAuthBypassEnabled"}},{"kind":"Field","name":{"kind":"Name","value":"isMicrosoftAuthBypassEnabled"}},{"kind":"Field","name":{"kind":"Name","value":"isPasswordAuthBypassEnabled"}},{"kind":"Field","name":{"kind":"Name","value":"subdomain"}},{"kind":"Field","name":{"kind":"Name","value":"customDomain"}},{"kind":"Field","name":{"kind":"Name","value":"hasValidSignedEnterpriseKey"}},{"kind":"Field","name":{"kind":"Name","value":"hasValidEnterpriseValidityToken"}},{"kind":"Field","name":{"kind":"Name","value":"workspaceCustomApplication"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}},{"kind":"Field","name":{"kind":"Name","value":"installedApplications"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"universalIdentifier"}},{"kind":"Field","name":{"kind":"Name","value":"logoUrl"}}]}},{"kind":"Field","name":{"kind":"Name","value":"isCustomDomainEnabled"}},{"kind":"Field","name":{"kind":"Name","value":"workspaceUrls"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"WorkspaceUrlsFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"featureFlags"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"key"}},{"kind":"Field","name":{"kind":"Name","value":"value"}}]}},{"kind":"Field","name":{"kind":"Name","value":"currentBillingSubscription"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CurrentBillingSubscriptionFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"billingCustomer"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"hasPaymentMethod"}}]}},{"kind":"Field","name":{"kind":"Name","value":"billingSubscriptions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BillingSubscriptionFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"billingEntitlements"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"key"}},{"kind":"Field","name":{"kind":"Name","value":"value"}}]}},{"kind":"Field","name":{"kind":"Name","value":"workspaceMembersCount"}},{"kind":"Field","name":{"kind":"Name","value":"defaultRole"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RoleFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"fastModel"}},{"kind":"Field","name":{"kind":"Name","value":"smartModel"}},{"kind":"Field","name":{"kind":"Name","value":"aiAdditionalInstructions"}},{"kind":"Field","name":{"kind":"Name","value":"enabledAiModelIds"}},{"kind":"Field","name":{"kind":"Name","value":"useRecommendedModels"}},{"kind":"Field","name":{"kind":"Name","value":"isTwoFactorAuthenticationEnforced"}},{"kind":"Field","name":{"kind":"Name","value":"trashRetentionDays"}},{"kind":"Field","name":{"kind":"Name","value":"eventLogRetentionDays"}},{"kind":"Field","name":{"kind":"Name","value":"editableProfileFields"}},{"kind":"Field","name":{"kind":"Name","value":"isInternalMessagesImportEnabled"}}]}},{"kind":"Field","name":{"kind":"Name","value":"availableWorkspaces"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"AvailableWorkspacesFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"userVars"}}]}}]} as unknown as DocumentNode<GetCurrentUserQuery, GetCurrentUserQueryVariables>;
export const CreateManyViewFieldsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"CreateManyViewFields"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"inputs"}},"type":{"kind":"NonNullType","type":{"kind":"ListType","type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"CreateViewFieldInput"}}}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"createManyViewFields"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"inputs"},"value":{"kind":"Variable","name":{"kind":"Name","value":"inputs"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ViewFieldFragment"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ViewFieldFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ViewField"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"fieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"viewId"}},{"kind":"Field","name":{"kind":"Name","value":"isVisible"}},{"kind":"Field","name":{"kind":"Name","value":"position"}},{"kind":"Field","name":{"kind":"Name","value":"size"}},{"kind":"Field","name":{"kind":"Name","value":"aggregateOperation"}},{"kind":"Field","name":{"kind":"Name","value":"viewFieldGroupId"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"deletedAt"}}]}}]} as unknown as DocumentNode<CreateManyViewFieldsMutation, CreateManyViewFieldsMutationVariables>;
export const CreateManyViewGroupsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"CreateManyViewGroups"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"inputs"}},"type":{"kind":"NonNullType","type":{"kind":"ListType","type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"CreateViewGroupInput"}}}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"createManyViewGroups"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"inputs"},"value":{"kind":"Variable","name":{"kind":"Name","value":"inputs"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ViewGroupFragment"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ViewGroupFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ViewGroup"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"isVisible"}},{"kind":"Field","name":{"kind":"Name","value":"fieldValue"}},{"kind":"Field","name":{"kind":"Name","value":"position"}},{"kind":"Field","name":{"kind":"Name","value":"viewId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"deletedAt"}}]}}]} as unknown as DocumentNode<CreateManyViewGroupsMutation, CreateManyViewGroupsMutationVariables>;
export const CreateViewDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"CreateView"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"CreateViewInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"createView"},"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":"ViewFragment"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ViewFieldFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ViewField"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"fieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"viewId"}},{"kind":"Field","name":{"kind":"Name","value":"isVisible"}},{"kind":"Field","name":{"kind":"Name","value":"position"}},{"kind":"Field","name":{"kind":"Name","value":"size"}},{"kind":"Field","name":{"kind":"Name","value":"aggregateOperation"}},{"kind":"Field","name":{"kind":"Name","value":"viewFieldGroupId"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"deletedAt"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ViewFieldGroupFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ViewFieldGroup"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"position"}},{"kind":"Field","name":{"kind":"Name","value":"isVisible"}},{"kind":"Field","name":{"kind":"Name","value":"viewId"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"deletedAt"}},{"kind":"Field","name":{"kind":"Name","value":"viewFields"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ViewFieldFragment"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ViewFilterFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ViewFilter"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"fieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"operand"}},{"kind":"Field","name":{"kind":"Name","value":"value"}},{"kind":"Field","name":{"kind":"Name","value":"viewFilterGroupId"}},{"kind":"Field","name":{"kind":"Name","value":"positionInViewFilterGroup"}},{"kind":"Field","name":{"kind":"Name","value":"subFieldName"}},{"kind":"Field","name":{"kind":"Name","value":"relationTargetFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"viewId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"deletedAt"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ViewFilterGroupFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ViewFilterGroup"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"parentViewFilterGroupId"}},{"kind":"Field","name":{"kind":"Name","value":"logicalOperator"}},{"kind":"Field","name":{"kind":"Name","value":"positionInViewFilterGroup"}},{"kind":"Field","name":{"kind":"Name","value":"viewId"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ViewSortFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ViewSort"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"fieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"direction"}},{"kind":"Field","name":{"kind":"Name","value":"subFieldName"}},{"kind":"Field","name":{"kind":"Name","value":"viewId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"deletedAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ViewGroupFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ViewGroup"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"isVisible"}},{"kind":"Field","name":{"kind":"Name","value":"fieldValue"}},{"kind":"Field","name":{"kind":"Name","value":"position"}},{"kind":"Field","name":{"kind":"Name","value":"viewId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"deletedAt"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ViewFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"View"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"objectMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"key"}},{"kind":"Field","name":{"kind":"Name","value":"icon"}},{"kind":"Field","name":{"kind":"Name","value":"position"}},{"kind":"Field","name":{"kind":"Name","value":"isCompact"}},{"kind":"Field","name":{"kind":"Name","value":"openRecordIn"}},{"kind":"Field","name":{"kind":"Name","value":"kanbanAggregateOperation"}},{"kind":"Field","name":{"kind":"Name","value":"kanbanAggregateOperationFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"mainGroupByFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"shouldHideEmptyGroups"}},{"kind":"Field","name":{"kind":"Name","value":"kanbanColumnWidth"}},{"kind":"Field","name":{"kind":"Name","value":"anyFieldFilterValue"}},{"kind":"Field","name":{"kind":"Name","value":"calendarFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"calendarEndFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"calendarLayout"}},{"kind":"Field","name":{"kind":"Name","value":"visibility"}},{"kind":"Field","name":{"kind":"Name","value":"createdByUserWorkspaceId"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"viewFields"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ViewFieldFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"viewFieldGroups"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ViewFieldGroupFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"viewFilters"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ViewFilterFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"viewFilterGroups"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ViewFilterGroupFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"viewSorts"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ViewSortFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"viewGroups"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ViewGroupFragment"}}]}}]}}]} as unknown as DocumentNode<CreateViewMutation, CreateViewMutationVariables>;
diff --git a/packages/twenty-front/src/modules/auth/states/currentUserState.ts b/packages/twenty-front/src/modules/auth/states/currentUserState.ts
index 254f895ef20..d37810dc061 100644
--- a/packages/twenty-front/src/modules/auth/states/currentUserState.ts
+++ b/packages/twenty-front/src/modules/auth/states/currentUserState.ts
@@ -9,6 +9,7 @@ export type CurrentUser = Pick<
| 'canAccessFullAdminPanel'
| 'canImpersonate'
| 'onboardingStatus'
+ | 'previousOnboardingStatus'
| 'isWorkspaceCreator'
| 'userVars'
| 'firstName'
diff --git a/packages/twenty-front/src/modules/onboarding/components/BookCallOnboardingStepActions.tsx b/packages/twenty-front/src/modules/onboarding/components/BookCallOnboardingStepActions.tsx
index 2268fdedb4c..a52b6073bda 100644
--- a/packages/twenty-front/src/modules/onboarding/components/BookCallOnboardingStepActions.tsx
+++ b/packages/twenty-front/src/modules/onboarding/components/BookCallOnboardingStepActions.tsx
@@ -13,25 +13,34 @@ export const BookCallOnboardingStepActions = () => {
// Kept stable so BookCallBookingSuccessEffect subscribes to the embed once
// instead of cycling its listener on every render.
- const completeStep = useCallback(async () => {
- setIsCompleting(true);
+ const completeStep = useCallback(
+ async ({ hasBookedCall }: { hasBookedCall: boolean }) => {
+ setIsCompleting(true);
- try {
- await completeBookCallOnboardingStep();
- } catch (error) {
- setIsCompleting(false);
+ try {
+ await completeBookCallOnboardingStep({ hasBookedCall });
+ } catch (error) {
+ setIsCompleting(false);
- enqueueErrorSnackBar({
- apolloError: CombinedGraphQLErrors.is(error) ? error : undefined,
- });
- }
- }, [completeBookCallOnboardingStep, enqueueErrorSnackBar]);
+ enqueueErrorSnackBar({
+ apolloError: CombinedGraphQLErrors.is(error) ? error : undefined,
+ });
+ }
+ },
+ [completeBookCallOnboardingStep, enqueueErrorSnackBar],
+ );
+
+ const completeStepAfterBooking = useCallback(() => {
+ void completeStep({ hasBookedCall: true });
+ }, [completeStep]);
return (
<>
- <BookCallBookingSuccessEffect onBookingSuccessful={completeStep} />
+ <BookCallBookingSuccessEffect
+ onBookingSuccessful={completeStepAfterBooking}
+ />
<OnboardingSkipButton
- onClick={() => void completeStep()}
+ onClick={() => void completeStep({ hasBookedCall: false })}
disabled={isCompleting}
/>
</>
diff --git a/packages/twenty-front/src/modules/onboarding/components/OnboardingHeader.tsx b/packages/twenty-front/src/modules/onboarding/components/OnboardingHeader.tsx
index a6ccfd00080..68b8ae4c4a0 100644
--- a/packages/twenty-front/src/modules/onboarding/components/OnboardingHeader.tsx
+++ b/packages/twenty-front/src/modules/onboarding/components/OnboardingHeader.tsx
@@ -112,11 +112,13 @@ const StyledInfoTag = styled.div`
type OnboardingHeaderProps = {
onBack?: () => void;
+ isBackDisabled?: boolean;
freeCredits?: number;
};
export const OnboardingHeader = ({
onBack,
+ isBackDisabled,
freeCredits,
}: OnboardingHeaderProps) => {
const { t } = useLingui();
@@ -131,6 +133,7 @@ export const OnboardingHeader = ({
accent="tertiary"
size="small"
onClick={onBack}
+ disabled={isBackDisabled}
aria-label={t`Go back`}
/>
)}
diff --git a/packages/twenty-front/src/modules/onboarding/components/OnboardingLayout.tsx b/packages/twenty-front/src/modules/onboarding/components/OnboardingLayout.tsx
index 757c7316e7d..52374df4486 100644
--- a/packages/twenty-front/src/modules/onboarding/components/OnboardingLayout.tsx
+++ b/packages/twenty-front/src/modules/onboarding/components/OnboardingLayout.tsx
@@ -14,16 +14,22 @@ const StyledBackground = styled.div`
type OnboardingLayoutProps = {
children: ReactNode;
onBack?: () => void;
+ isBackDisabled?: boolean;
freeCredits?: number;
};
export const OnboardingLayout = ({
children,
onBack,
+ isBackDisabled,
freeCredits,
}: OnboardingLayoutProps) => (
<StyledBackground>
- <OnboardingHeader onBack={onBack} freeCredits={freeCredits} />
+ <OnboardingHeader
+ onBack={onBack}
+ isBackDisabled={isBackDisabled}
+ freeCredits={freeCredits}
+ />
{children}
</StyledBackground>
);
diff --git a/packages/twenty-front/src/modules/onboarding/components/OnboardingStepAnimatedItem.tsx b/packages/twenty-front/src/modules/onboarding/components/OnboardingStepAnimatedItem.tsx
index 47094cf1759..57e1cd56162 100644
--- a/packages/twenty-front/src/modules/onboarding/components/OnboardingStepAnimatedItem.tsx
+++ b/packages/twenty-front/src/modules/onboarding/components/OnboardingStepAnimatedItem.tsx
@@ -4,6 +4,8 @@ import { type ReactNode } from 'react';
import { ONBOARDING_MOTION_SLIDE_OFFSET } from '@/onboarding/constants/OnboardingMotionSlideOffset';
import { ONBOARDING_MOTION_STAGGER_DELAY } from '@/onboarding/constants/OnboardingMotionStaggerDelay';
import { useOnboardingMotionTransition } from '@/onboarding/hooks/useOnboardingMotionTransition';
+import { onboardingNavigationDirectionState } from '@/onboarding/states/onboardingNavigationDirectionState';
+import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';
const StyledAnimatedItemBase = styled.div`
max-width: 100%;
@@ -24,13 +26,21 @@ export const OnboardingStepAnimatedItem = ({
}: OnboardingStepAnimatedItemProps) => {
const transition = useOnboardingMotionTransition();
const shouldReduceMotion = useReducedMotion();
+ const onboardingNavigationDirection = useAtomStateValue(
+ onboardingNavigationDirectionState,
+ );
+
+ const directionalEnterSlideOffset =
+ onboardingNavigationDirection === 'backward'
+ ? -ONBOARDING_MOTION_SLIDE_OFFSET
+ : ONBOARDING_MOTION_SLIDE_OFFSET;
return (
<StyledAnimatedItem
className={className}
initial={{
opacity: 0,
- y: shouldReduceMotion ? 0 : ONBOARDING_MOTION_SLIDE_OFFSET,
+ y: shouldReduceMotion ? 0 : directionalEnterSlideOffset,
}}
animate={{ opacity: 1, y: 0 }}
transition={{
diff --git a/packages/twenty-front/src/modules/onboarding/components/OnboardingStepLayout.tsx b/packages/twenty-front/src/modules/onboarding/components/OnboardingStepLayout.tsx
index 465e91f40e9..8c8c772eeb9 100644
--- a/packages/twenty-front/src/modules/onboarding/components/OnboardingStepLayout.tsx
+++ b/packages/twenty-front/src/modules/onboarding/components/OnboardingStepLayout.tsx
@@ -1,8 +1,10 @@
+import { currentUserState } from '@/auth/states/currentUserState';
import { onboardingConfigState } from '@/client-config/states/onboardingConfigState';
import { OnboardingLayout } from '@/onboarding/components/OnboardingLayout';
import { OnboardingTransitionOutlet } from '@/onboarding/components/OnboardingTransitionOutlet';
import { PrefetchBookCallStepEffect } from '@/onboarding/effect-components/PrefetchBookCallStepEffect';
import { PrefetchPlanRequiredStepEffect } from '@/onboarding/effect-components/PrefetchPlanRequiredStepEffect';
+import { useGoBackToPreviousOnboardingStep } from '@/onboarding/hooks/useGoBackToPreviousOnboardingStep';
import { useOnboardingFreeCreditsTotal } from '@/onboarding/hooks/useOnboardingFreeCreditsTotal';
import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';
import { isDefined } from 'twenty-shared/utils';
@@ -10,9 +12,26 @@ import { isDefined } from 'twenty-shared/utils';
export const OnboardingStepLayout = () => {
const onboardingConfig = useAtomStateValue(onboardingConfigState);
const freeCreditsTotal = useOnboardingFreeCreditsTotal();
+ const currentUser = useAtomStateValue(currentUserState);
+ const {
+ goBackToPreviousOnboardingStep,
+ isGoingBackToPreviousOnboardingStep,
+ } = useGoBackToPreviousOnboardingStep();
+
+ const hasPreviousOnboardingStep = isDefined(
+ currentUser?.previousOnboardingStatus,
+ );
return (
<OnboardingLayout
+ onBack={
+ hasPreviousOnboardingStep
+ ? () => {
+ void goBackToPreviousOnboardingStep();
+ }
+ : undefined
+ }
+ isBackDisabled={isGoingBackToPreviousOnboardingStep}
freeCredits={isDefined(onboardingConfig) ? freeCreditsTotal : undefined}
>
<PrefetchBookCallStepEffect />
diff --git a/packages/twenty-front/src/modules/onboarding/components/OnboardingTransitionOutlet.tsx b/packages/twenty-front/src/modules/onboarding/components/OnboardingTransitionOutlet.tsx
index 86b1b2b9ae4..f5e0ecd36df 100644
--- a/packages/twenty-front/src/modules/onboarding/components/OnboardingTransitionOutlet.tsx
+++ b/packages/twenty-front/src/modules/onboarding/components/OnboardingTransitionOutlet.tsx
@@ -1,7 +1,14 @@
import { ONBOARDING_MOTION_SLIDE_OFFSET } from '@/onboarding/constants/OnboardingMotionSlideOffset';
import { useOnboardingMotionTransition } from '@/onboarding/hooks/useOnboardingMotionTransition';
+import { onboardingNavigationDirectionState } from '@/onboarding/states/onboardingNavigationDirectionState';
+import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';
import { styled } from '@linaria/react';
-import { AnimatePresence, motion, useReducedMotion } from 'framer-motion';
+import {
+ AnimatePresence,
+ motion,
+ useReducedMotion,
+ type Variants,
+} from 'framer-motion';
import { useLocation, useOutlet } from 'react-router-dom';
const StyledTransitionContainer = styled.div`
@@ -21,24 +28,42 @@ const StyledTransitionPage = styled(motion.div)`
position: absolute;
`;
+const transitionPageVariants: Variants = {
+ initial: { opacity: 0 },
+ animate: { opacity: 1 },
+ exit: (exitSlideOffset: number) => ({
+ opacity: 0,
+ y: exitSlideOffset,
+ pointerEvents: 'none',
+ }),
+};
+
export const OnboardingTransitionOutlet = () => {
const { pathname } = useLocation();
const outlet = useOutlet();
const shouldReduceMotion = useReducedMotion();
const transition = useOnboardingMotionTransition();
+ const onboardingNavigationDirection = useAtomStateValue(
+ onboardingNavigationDirectionState,
+ );
+
+ const directionalExitSlideOffset =
+ onboardingNavigationDirection === 'backward'
+ ? ONBOARDING_MOTION_SLIDE_OFFSET
+ : -ONBOARDING_MOTION_SLIDE_OFFSET;
+
+ const exitSlideOffset = shouldReduceMotion ? 0 : directionalExitSlideOffset;
return (
<StyledTransitionContainer>
- <AnimatePresence>
+ <AnimatePresence custom={exitSlideOffset}>
<StyledTransitionPage
key={pathname}
- initial={{ opacity: 0 }}
- animate={{ opacity: 1 }}
- exit={{
- opacity: 0,
- y: shouldReduceMotion ? 0 : -ONBOARDING_MOTION_SLIDE_OFFSET,
- pointerEvents: 'none',
- }}
+ custom={exitSlideOffset}
+ variants={transitionPageVariants}
+ initial="initial"
+ animate="animate"
+ exit="exit"
transition={transition}
>
{outlet}
diff --git a/packages/twenty-front/src/modules/onboarding/components/__tests__/OnboardingStepLayout.test.tsx b/packages/twenty-front/src/modules/onboarding/components/__tests__/OnboardingStepLayout.test.tsx
index e4ee2dc2b32..1f6bbbbb1c3 100644
--- a/packages/twenty-front/src/modules/onboarding/components/__tests__/OnboardingStepLayout.test.tsx
+++ b/packages/twenty-front/src/modules/onboarding/components/__tests__/OnboardingStepLayout.test.tsx
@@ -1,3 +1,4 @@
+import { MockedProvider } from '@apollo/client/testing/react';
import { i18n } from '@lingui/core';
import { I18nProvider } from '@lingui/react';
import { render, screen } from '@testing-library/react';
@@ -9,6 +10,7 @@ import { onboardingConfigState } from '@/client-config/states/onboardingConfigSt
import { type OnboardingConfig } from '@/client-config/types/OnboardingConfig';
import { OnboardingStepLayout } from '@/onboarding/components/OnboardingStepLayout';
import { onboardingFreeCreditsState } from '@/onboarding/states/onboardingFreeCreditsState';
+import { SnackBarComponentInstanceContext } from '@/ui/feedback/snack-bar-manager/contexts/SnackBarComponentInstanceContext';
import {
jotaiStore,
resetJotaiStore,
@@ -38,9 +40,15 @@ const onboardingConfig: OnboardingConfig = {
};
const Wrapper = ({ children }: { children: ReactNode }) => (
- <JotaiProvider store={jotaiStore}>
- <I18nProvider i18n={i18n}>{children}</I18nProvider>
- </JotaiProvider>
+ <MockedProvider mocks={[]}>
+ <JotaiProvider store={jotaiStore}>
+ <SnackBarComponentInstanceContext.Provider
+ value={{ instanceId: 'snack-bar-manager' }}
+ >
+ <I18nProvider i18n={i18n}>{children}</I18nProvider>
+ </SnackBarComponentInstanceContext.Provider>
+ </JotaiProvider>
+ </MockedProvider>
);
describe('OnboardingStepLayout', () => {
diff --git a/packages/twenty-front/src/modules/onboarding/constants/NoPreviousOnboardingStepErrorCode.ts b/packages/twenty-front/src/modules/onboarding/constants/NoPreviousOnboardingStepErrorCode.ts
new file mode 100644
index 00000000000..5b560947ee5
--- /dev/null
+++ b/packages/twenty-front/src/modules/onboarding/constants/NoPreviousOnboardingStepErrorCode.ts
@@ -0,0 +1,2 @@
+export const NO_PREVIOUS_ONBOARDING_STEP_ERROR_CODE =
+ 'NO_PREVIOUS_ONBOARDING_STEP';
diff --git a/packages/twenty-front/src/modules/onboarding/effect-components/CompanyEnrichmentOnboardingEffect.tsx b/packages/twenty-front/src/modules/onboarding/effect-components/CompanyEnrichmentOnboardingEffect.tsx
index 01a9a3dd974..0f27a482432 100644
--- a/packages/twenty-front/src/modules/onboarding/effect-components/CompanyEnrichmentOnboardingEffect.tsx
+++ b/packages/twenty-front/src/modules/onboarding/effect-components/CompanyEnrichmentOnboardingEffect.tsx
@@ -79,7 +79,9 @@ export const CompanyEnrichmentOnboardingEffect = () => {
const dropBookCallStep = async () => {
try {
- await completeBookCallOnboardingStep();
+ await completeBookCallOnboardingStep({
+ variables: { hasBookedCall: false, isAutoSkipped: true },
+ });
return true;
} catch {
diff --git a/packages/twenty-front/src/modules/onboarding/effect-components/InstallAppsAutoSkipEffect.tsx b/packages/twenty-front/src/modules/onboarding/effect-components/InstallAppsAutoSkipEffect.tsx
index 3ba89fa758d..056895edb3a 100644
--- a/packages/twenty-front/src/modules/onboarding/effect-components/InstallAppsAutoSkipEffect.tsx
+++ b/packages/twenty-front/src/modules/onboarding/effect-components/InstallAppsAutoSkipEffect.tsx
@@ -22,7 +22,10 @@ export const InstallAppsAutoSkipEffect = ({
const skip = async () => {
try {
- await triggerInstallAppsOnboardingStep([]);
+ await triggerInstallAppsOnboardingStep({
+ universalIdentifiers: [],
+ isAutoSkipped: true,
+ });
} catch {
onError();
}
diff --git a/packages/twenty-front/src/modules/onboarding/effect-components/SyncEmailsAutoSkipEffect.tsx b/packages/twenty-front/src/modules/onboarding/effect-components/SyncEmailsAutoSkipEffect.tsx
index d72ddcaaaee..d8fc69c6a5d 100644
--- a/packages/twenty-front/src/modules/onboarding/effect-components/SyncEmailsAutoSkipEffect.tsx
+++ b/packages/twenty-front/src/modules/onboarding/effect-components/SyncEmailsAutoSkipEffect.tsx
@@ -21,7 +21,7 @@ export const SyncEmailsAutoSkipEffect = ({
const skip = async () => {
try {
- await skipSyncEmailOnboardingStep();
+ await skipSyncEmailOnboardingStep({ isAutoSkipped: true });
} catch {
onError();
}
diff --git a/packages/twenty-front/src/modules/onboarding/effect-components/__tests__/CompanyEnrichmentOnboardingEffect.test.tsx b/packages/twenty-front/src/modules/onboarding/effect-components/__tests__/CompanyEnrichmentOnboardingEffect.test.tsx
index e626acd4c3b..94609164d62 100644
--- a/packages/twenty-front/src/modules/onboarding/effect-components/__tests__/CompanyEnrichmentOnboardingEffect.test.tsx
+++ b/packages/twenty-front/src/modules/onboarding/effect-components/__tests__/CompanyEnrichmentOnboardingEffect.test.tsx
@@ -312,7 +312,10 @@ describe('CompanyEnrichmentOnboardingEffect', () => {
isBookCallOnboardingStepPending: true,
}),
{
- request: { query: CompleteBookCallOnboardingStepDocument },
+ request: {
+ query: CompleteBookCallOnboardingStepDocument,
+ variables: { hasBookedCall: false, isAutoSkipped: true },
+ },
result: () => {
hasClearedBookCallStep = true;
diff --git a/packages/twenty-front/src/modules/onboarding/graphql/mutations/completeBookCallOnboardingStep.ts b/packages/twenty-front/src/modules/onboarding/graphql/mutations/completeBookCallOnboardingStep.ts
index 2cca15c9fc5..058497a4031 100644
--- a/packages/twenty-front/src/modules/onboarding/graphql/mutations/completeBookCallOnboardingStep.ts
+++ b/packages/twenty-front/src/modules/onboarding/graphql/mutations/completeBookCallOnboardingStep.ts
@@ -1,8 +1,14 @@
import { gql } from '@apollo/client';
export const COMPLETE_BOOK_CALL_ONBOARDING_STEP = gql`
- mutation CompleteBookCallOnboardingStep {
- completeBookCallOnboardingStep {
+ mutation CompleteBookCallOnboardingStep(
+ $hasBookedCall: Boolean!
+ $isAutoSkipped: Boolean!
+ ) {
+ completeBookCallOnboardingStep(
+ hasBookedCall: $hasBookedCall
+ isAutoSkipped: $isAutoSkipped
+ ) {
success
}
}
diff --git a/packages/twenty-front/src/modules/onboarding/graphql/mutations/goBackToPreviousOnboardingStep.ts b/packages/twenty-front/src/modules/onboarding/graphql/mutations/goBackToPreviousOnboardingStep.ts
new file mode 100644
index 00000000000..c537863aba3
--- /dev/null
+++ b/packages/twenty-front/src/modules/onboarding/graphql/mutations/goBackToPreviousOnboardingStep.ts
@@ -0,0 +1,10 @@
+import { gql } from '@apollo/client';
+
+export const GO_BACK_TO_PREVIOUS_ONBOARDING_STEP = gql`
+ mutation GoBackToPreviousOnboardingStep {
+ goBackToPreviousOnboardingStep {
+ onboardingStatus
+ previousOnboardingStatus
+ }
+ }
+`;
diff --git a/packages/twenty-front/src/modules/onboarding/graphql/mutations/skipSyncEmailOnboardingStep.ts b/packages/twenty-front/src/modules/onboarding/graphql/mutations/skipSyncEmailOnboardingStep.ts
index 1e6f29504c2..01ce934f747 100644
--- a/packages/twenty-front/src/modules/onboarding/graphql/mutations/skipSyncEmailOnboardingStep.ts
+++ b/packages/twenty-front/src/modules/onboarding/graphql/mutations/skipSyncEmailOnboardingStep.ts
@@ -1,8 +1,8 @@
import { gql } from '@apollo/client';
export const SKIP_SYNC_EMAIL_ONBOARDING_STEP = gql`
- mutation SkipSyncEmailOnboardingStep {
- skipSyncEmailOnboardingStep {
+ mutation SkipSyncEmailOnboardingStep($isAutoSkipped: Boolean!) {
+ skipSyncEmailOnboardingStep(isAutoSkipped: $isAutoSkipped) {
success
}
}
diff --git a/packages/twenty-front/src/modules/onboarding/graphql/mutations/triggerInstallAppsOnboardingStep.ts b/packages/twenty-front/src/modules/onboarding/graphql/mutations/triggerInstallAppsOnboardingStep.ts
index ab7b2894230..789b8b1388c 100644
--- a/packages/twenty-front/src/modules/onboarding/graphql/mutations/triggerInstallAppsOnboardingStep.ts
+++ b/packages/twenty-front/src/modules/onboarding/graphql/mutations/triggerInstallAppsOnboardingStep.ts
@@ -1,9 +1,13 @@
import { gql } from '@apollo/client';
export const TRIGGER_INSTALL_APPS_ONBOARDING_STEP = gql`
- mutation TriggerInstallAppsOnboardingStep($universalIdentifiers: [String!]!) {
+ mutation TriggerInstallAppsOnboardingStep(
+ $universalIdentifiers: [String!]!
+ $isAutoSkipped: Boolean!
+ ) {
triggerInstallAppsOnboardingStep(
universalIdentifiers: $universalIdentifiers
+ isAutoSkipped: $isAutoSkipped
) {
success
}
diff --git a/packages/twenty-front/src/modules/onboarding/hooks/__tests__/useCompleteBookCallOnboardingStep.test.tsx b/packages/twenty-front/src/modules/onboarding/hooks/__tests__/useCompleteBookCallOnboardingStep.test.tsx
index 9af804e4c21..214cdf5a229 100644
--- a/packages/twenty-front/src/modules/onboarding/hooks/__tests__/useCompleteBookCallOnboardingStep.test.tsx
+++ b/packages/twenty-front/src/modules/onboarding/hooks/__tests__/useCompleteBookCallOnboardingStep.test.tsx
@@ -30,7 +30,11 @@ jest.mock('@/onboarding/hooks/useSetNextOnboardingStatus', () => ({
}));
const mutationMock = {
- request: { query: CompleteBookCallOnboardingStepDocument },
+ request: {
+ query: CompleteBookCallOnboardingStepDocument,
+ variables: { hasBookedCall: false, isAutoSkipped: false },
+ },
+ maxUsageCount: Number.POSITIVE_INFINITY,
result: {
data: {
completeBookCallOnboardingStep: {
@@ -83,7 +87,7 @@ describe('useCompleteBookCallOnboardingStep', () => {
});
await act(async () => {
- await result.current();
+ await result.current({ hasBookedCall: false });
});
expect(mockSetNextOnboardingStatus).toHaveBeenCalled();
@@ -99,7 +103,7 @@ describe('useCompleteBookCallOnboardingStep', () => {
const { result } = renderCompleteHook(options);
await act(async () => {
- await result.current();
+ await result.current({ hasBookedCall: false });
});
expect(mockSetNextOnboardingStatus).toHaveBeenCalled();
@@ -127,7 +131,7 @@ describe('useCompleteBookCallOnboardingStep', () => {
});
await act(async () => {
- await result.current();
+ await result.current({ hasBookedCall: false });
});
expect(mockSetNextOnboardingStatus).toHaveBeenCalled();
diff --git a/packages/twenty-front/src/modules/onboarding/hooks/__tests__/useGoBackToPreviousOnboardingStep.test.tsx b/packages/twenty-front/src/modules/onboarding/hooks/__tests__/useGoBackToPreviousOnboardingStep.test.tsx
new file mode 100644
index 00000000000..708a21f2002
--- /dev/null
+++ b/packages/twenty-front/src/modules/onboarding/hooks/__tests__/useGoBackToPreviousOnboardingStep.test.tsx
@@ -0,0 +1,191 @@
+import { type MockedResponse } from '@apollo/client/testing';
+import { MockedProvider } from '@apollo/client/testing/react';
+import { act, renderHook } from '@testing-library/react';
+import { GraphQLError } from 'graphql';
+import { Provider as JotaiProvider } from 'jotai';
+import { type ReactNode } from 'react';
+
+import { currentUserState } from '@/auth/states/currentUserState';
+import { useGoBackToPreviousOnboardingStep } from '@/onboarding/hooks/useGoBackToPreviousOnboardingStep';
+import { onboardingNavigationDirectionState } from '@/onboarding/states/onboardingNavigationDirectionState';
+import {
+ jotaiStore,
+ resetJotaiStore,
+} from '@/ui/utilities/state/jotai/jotaiStore';
+import {
+ GoBackToPreviousOnboardingStepDocument,
+ OnboardingStatus,
+} from '~/generated-metadata/graphql';
+import { mockedUserData } from '~/testing/mock-data/users';
+
+const mockEnqueueErrorSnackBar = jest.fn();
+
+jest.mock('@/ui/feedback/snack-bar-manager/hooks/useSnackBar', () => ({
+ useSnackBar: () => ({
+ enqueueErrorSnackBar: mockEnqueueErrorSnackBar,
+ }),
+}));
+
+const buildGoBackMock = ({
+ onboardingStatus,
+ previousOnboardingStatus,
+}: {
+ onboardingStatus: OnboardingStatus;
+ previousOnboardingStatus: OnboardingStatus | null;
+}) => ({
+ request: { query: GoBackToPreviousOnboardingStepDocument },
+ result: {
+ data: {
+ goBackToPreviousOnboardingStep: {
+ __typename: 'OnboardingStepNavigation',
+ onboardingStatus,
+ previousOnboardingStatus,
+ },
+ },
+ },
+});
+
+const renderGoBackHook = (mocks: readonly MockedResponse[]) => {
+ const wrapper = ({ children }: { children: ReactNode }) => (
+ <MockedProvider mocks={mocks}>
+ <JotaiProvider store={jotaiStore}>{children}</JotaiProvider>
+ </MockedProvider>
+ );
+
+ return renderHook(() => useGoBackToPreviousOnboardingStep(), { wrapper });
+};
+
+describe('useGoBackToPreviousOnboardingStep', () => {
+ beforeEach(() => {
+ mockEnqueueErrorSnackBar.mockClear();
+ resetJotaiStore();
+ localStorage.clear();
+ jotaiStore.set(currentUserState.atom, {
+ ...mockedUserData,
+ onboardingStatus: OnboardingStatus.PROFILE_CREATION,
+ previousOnboardingStatus: OnboardingStatus.APPS_INSTALLATION,
+ });
+ });
+
+ it('should apply the statuses returned by the server and flip the motion direction', async () => {
+ const { result } = renderGoBackHook([
+ buildGoBackMock({
+ onboardingStatus: OnboardingStatus.APPS_INSTALLATION,
+ previousOnboardingStatus: OnboardingStatus.SYNC_EMAIL,
+ }),
+ ]);
+
+ await act(async () => {
+ await result.current.goBackToPreviousOnboardingStep();
+ });
+
+ const currentUser = jotaiStore.get(currentUserState.atom);
+
+ expect(currentUser?.onboardingStatus).toBe(
+ OnboardingStatus.APPS_INSTALLATION,
+ );
+ expect(currentUser?.previousOnboardingStatus).toBe(
+ OnboardingStatus.SYNC_EMAIL,
+ );
+ expect(jotaiStore.get(onboardingNavigationDirectionState.atom)).toBe(
+ 'backward',
+ );
+ });
+
+ it('should clear the previous status when the server reports no earlier step', async () => {
+ const { result } = renderGoBackHook([
+ buildGoBackMock({
+ onboardingStatus: OnboardingStatus.SYNC_EMAIL,
+ previousOnboardingStatus: null,
+ }),
+ ]);
+
+ await act(async () => {
+ await result.current.goBackToPreviousOnboardingStep();
+ });
+
+ expect(
+ jotaiStore.get(currentUserState.atom)?.previousOnboardingStatus,
+ ).toBeNull();
+ });
+
+ it('should leave the current user untouched when the mutation fails', async () => {
+ const { result } = renderGoBackHook([
+ {
+ request: { query: GoBackToPreviousOnboardingStepDocument },
+ result: { errors: [new GraphQLError('Network failure')] },
+ },
+ ]);
+
+ await act(async () => {
+ await result.current.goBackToPreviousOnboardingStep();
+ });
+
+ expect(jotaiStore.get(currentUserState.atom)?.onboardingStatus).toBe(
+ OnboardingStatus.PROFILE_CREATION,
+ );
+ expect(
+ jotaiStore.get(currentUserState.atom)?.previousOnboardingStatus,
+ ).toBe(OnboardingStatus.APPS_INSTALLATION);
+ expect(jotaiStore.get(onboardingNavigationDirectionState.atom)).toBe(
+ 'forward',
+ );
+ });
+
+ it('should not reject so a click handler never sees an unhandled rejection', async () => {
+ const { result } = renderGoBackHook([
+ {
+ request: { query: GoBackToPreviousOnboardingStepDocument },
+ result: { errors: [new GraphQLError('Network failure')] },
+ },
+ ]);
+
+ await act(async () => {
+ await expect(
+ result.current.goBackToPreviousOnboardingStep(),
+ ).resolves.toBeUndefined();
+ });
+ });
+
+ it('should drop the stale back target when the server has no previous step', async () => {
+ const { result } = renderGoBackHook([
+ {
+ request: { query: GoBackToPreviousOnboardingStepDocument },
+ result: {
+ errors: [
+ new GraphQLError('No previous onboarding step', {
+ extensions: { code: 'NO_PREVIOUS_ONBOARDING_STEP' },
+ }),
+ ],
+ },
+ },
+ ]);
+
+ await act(async () => {
+ await result.current.goBackToPreviousOnboardingStep();
+ });
+
+ expect(
+ jotaiStore.get(currentUserState.atom)?.previousOnboardingStatus,
+ ).toBeNull();
+ expect(jotaiStore.get(currentUserState.atom)?.onboardingStatus).toBe(
+ OnboardingStatus.PROFILE_CREATION,
+ );
+ expect(mockEnqueueErrorSnackBar).not.toHaveBeenCalled();
+ });
+
+ it('should surface a snackbar when the failure is not a stale back target', async () => {
+ const { result } = renderGoBackHook([
+ {
+ request: { query: GoBackToPreviousOnboardingStepDocument },
+ result: { errors: [new GraphQLError('Network failure')] },
+ },
+ ]);
+
+ await act(async () => {
+ await result.current.goBackToPreviousOnboardingStep();
+ });
+
+ expect(mockEnqueueErrorSnackBar).toHaveBeenCalled();
+ });
+});
diff --git a/packages/twenty-front/src/modules/onboarding/hooks/__tests__/useInstallOnboardingApps.test.ts b/packages/twenty-front/src/modules/onboarding/hooks/__tests__/useInstallOnboardingApps.test.ts
index 668db402f6e..a965e684185 100644
--- a/packages/twenty-front/src/modules/onboarding/hooks/__tests__/useInstallOnboardingApps.test.ts
+++ b/packages/twenty-front/src/modules/onboarding/hooks/__tests__/useInstallOnboardingApps.test.ts
@@ -79,10 +79,10 @@ describe('useInstallOnboardingApps', () => {
await result.current.installOnboardingApps.installSelectedAppsAndContinue();
});
- expect(mockTriggerInstallAppsOnboardingStep).toHaveBeenCalledWith([
- 'app-1',
- 'app-2',
- ]);
+ expect(mockTriggerInstallAppsOnboardingStep).toHaveBeenCalledWith({
+ universalIdentifiers: ['app-1', 'app-2'],
+ isAutoSkipped: false,
+ });
expect(result.current.onboardingFreeCredits.installApps).toBe(2);
});
diff --git a/packages/twenty-front/src/modules/onboarding/hooks/__tests__/useSetNextOnboardingStatus.test.ts b/packages/twenty-front/src/modules/onboarding/hooks/__tests__/useSetNextOnboardingStatus.test.ts
index 4c27ce9e98d..7e7d83c4b4e 100644
--- a/packages/twenty-front/src/modules/onboarding/hooks/__tests__/useSetNextOnboardingStatus.test.ts
+++ b/packages/twenty-front/src/modules/onboarding/hooks/__tests__/useSetNextOnboardingStatus.test.ts
@@ -10,6 +10,7 @@ import { isBookCallOnboardingStepEnabledState } from '@/client-config/states/isB
import { isOnboardingAiChatEnabledState } from '@/client-config/states/isOnboardingAiChatEnabledState';
import { ONBOARDING_BOOK_CALL_PENDING_USER_VAR_KEY } from '@/onboarding/constants/OnboardingBookCallPendingUserVarKey';
import { useSetNextOnboardingStatus } from '@/onboarding/hooks/useSetNextOnboardingStatus';
+import { type OnboardingStepHistoryEffect } from '@/onboarding/types/OnboardingStepHistoryEffect';
import { isWelcomeAnimationVisibleState } from '@/onboarding/states/isWelcomeAnimationVisibleState';
import { shouldOpenAiChatAfterOnboardingState } from '@/onboarding/states/shouldOpenAiChatAfterOnboardingState';
import { useAtomState } from '@/ui/utilities/state/jotai/hooks/useAtomState';
@@ -34,6 +35,7 @@ type RenderHooksOptions = {
isBillingEnabled?: boolean;
withOneWorkspaceMember?: boolean;
isOnboardingAiChatEnabled?: boolean;
+ stepHistoryEffect?: OnboardingStepHistoryEffect;
isBookCallOnboardingStepEnabled?: boolean;
isBookCallOnboardingStepPending?: boolean;
isWorkspaceCreator?: boolean;
@@ -46,6 +48,7 @@ const renderHooks = (
isBillingEnabled = false,
withOneWorkspaceMember = true,
isOnboardingAiChatEnabled = false,
+ stepHistoryEffect = 'leaveUnchanged',
isBookCallOnboardingStepEnabled = false,
isBookCallOnboardingStepPending = false,
isWorkspaceCreator = true,
@@ -119,10 +122,12 @@ const renderHooks = (
);
});
act(() => {
- result.current.setNextOnboardingStatus();
+ result.current.setNextOnboardingStatus({ stepHistoryEffect });
});
return {
nextOnboardingStatus: result.current.currentUser?.onboardingStatus,
+ previousOnboardingStatus:
+ result.current.currentUser?.previousOnboardingStatus,
isWelcomeAnimationVisible: result.current.isWelcomeAnimationVisible,
shouldOpenAiChatAfterOnboarding:
result.current.shouldOpenAiChatAfterOnboarding,
@@ -397,6 +402,30 @@ describe('useSetNextOnboardingStatus', () => {
expect(shouldOpenAiChatAfterOnboarding).toBe(false);
});
+ it('should make the left step the one to go back to when it was reversible', () => {
+ const { previousOnboardingStatus } = renderHooks(
+ OnboardingStatus.SYNC_EMAIL,
+ { stepHistoryEffect: 'recordAsReversible' },
+ );
+ expect(previousOnboardingStatus).toEqual(OnboardingStatus.SYNC_EMAIL);
+ });
+
+ it('should keep the earlier reversible step when the left step was not reversible', () => {
+ const { previousOnboardingStatus } = renderHooks(
+ OnboardingStatus.SYNC_EMAIL,
+ { stepHistoryEffect: 'leaveUnchanged' },
+ );
+ expect(previousOnboardingStatus).toBeUndefined();
+ });
+
+ it('should drop every step to go back to after an irreversible step', () => {
+ const { previousOnboardingStatus } = renderHooks(
+ OnboardingStatus.INVITE_TEAM,
+ { stepHistoryEffect: 'clearAfterIrreversibleStep' },
+ );
+ expect(previousOnboardingStatus).toBeNull();
+ });
+
it('should stay on the plan step when advancing from it without a subscription', () => {
const { nextOnboardingStatus } = renderHooks(
OnboardingStatus.PLAN_REQUIRED,
@@ -444,7 +473,7 @@ describe('useSetNextOnboardingStatus', () => {
[ONBOARDING_BOOK_CALL_PENDING_USER_VAR_KEY]: true,
},
}));
- advanceCapturedBeforeEnrichment();
+ advanceCapturedBeforeEnrichment({ stepHistoryEffect: 'leaveUnchanged' });
});
expect(jotaiStore.get(currentUserState.atom)?.onboardingStatus).toEqual(
@@ -474,7 +503,7 @@ describe('useSetNextOnboardingStatus', () => {
...mockedUserData,
onboardingStatus: OnboardingStatus.SYNC_EMAIL,
});
- advanceCapturedBeforeActivation();
+ advanceCapturedBeforeActivation({ stepHistoryEffect: 'leaveUnchanged' });
});
expect(jotaiStore.get(currentUserState.atom)?.onboardingStatus).toEqual(
diff --git a/packages/twenty-front/src/modules/onboarding/hooks/useCompleteBookCallOnboardingStep.ts b/packages/twenty-front/src/modules/onboarding/hooks/useCompleteBookCallOnboardingStep.ts
index 2ba7154652b..8c97995a71e 100644
--- a/packages/twenty-front/src/modules/onboarding/hooks/useCompleteBookCallOnboardingStep.ts
+++ b/packages/twenty-front/src/modules/onboarding/hooks/useCompleteBookCallOnboardingStep.ts
@@ -18,22 +18,31 @@ export const useCompleteBookCallOnboardingStep = () => {
CompleteBookCallOnboardingStepDocument,
);
- return useCallback(async () => {
- await completeBookCallOnboardingStepMutation();
+ return useCallback(
+ async ({ hasBookedCall }: { hasBookedCall: boolean }) => {
+ await completeBookCallOnboardingStepMutation({
+ variables: { hasBookedCall, isAutoSkipped: false },
+ });
- setCurrentUser((current) =>
- setIsBookCallOnboardingStepPending(current, false),
- );
- setNextOnboardingStatus();
+ setCurrentUser((current) =>
+ setIsBookCallOnboardingStepPending(current, false),
+ );
+ setNextOnboardingStatus({
+ stepHistoryEffect: hasBookedCall
+ ? 'clearAfterIrreversibleStep'
+ : 'recordAsReversible',
+ });
- if (isPlanRequired) {
- navigate(AppPath.PlanRequired);
- }
- }, [
- completeBookCallOnboardingStepMutation,
- setCurrentUser,
- setNextOnboardingStatus,
- isPlanRequired,
- navigate,
- ]);
+ if (isPlanRequired) {
+ navigate(AppPath.PlanRequired);
+ }
+ },
+ [
+ completeBookCallOnboardingStepMutation,
+ setCurrentUser,
+ setNextOnboardingStatus,
+ isPlanRequired,
+ navigate,
+ ],
+ );
};
diff --git a/packages/twenty-front/src/modules/onboarding/hooks/useGoBackToPreviousOnboardingStep.ts b/packages/twenty-front/src/modules/onboarding/hooks/useGoBackToPreviousOnboardingStep.ts
new file mode 100644
index 00000000000..7e057bcaa0d
--- /dev/null
+++ b/packages/twenty-front/src/modules/onboarding/hooks/useGoBackToPreviousOnboardingStep.ts
@@ -0,0 +1,67 @@
+import { currentUserState } from '@/auth/states/currentUserState';
+import { NO_PREVIOUS_ONBOARDING_STEP_ERROR_CODE } from '@/onboarding/constants/NoPreviousOnboardingStepErrorCode';
+import { onboardingNavigationDirectionState } from '@/onboarding/states/onboardingNavigationDirectionState';
+import { useSnackBar } from '@/ui/feedback/snack-bar-manager/hooks/useSnackBar';
+import { useMutation } from '@apollo/client/react';
+import { useStore } from 'jotai';
+import { useCallback } from 'react';
+import { isDefined } from 'twenty-shared/utils';
+import { GoBackToPreviousOnboardingStepDocument } from '~/generated-metadata/graphql';
+import { isGraphqlErrorOfType } from '~/utils/is-graphql-error-of-type.util';
+
+export const useGoBackToPreviousOnboardingStep = () => {
+ const store = useStore();
+ const { enqueueErrorSnackBar } = useSnackBar();
+ const [goBackToPreviousOnboardingStepMutation, { loading }] = useMutation(
+ GoBackToPreviousOnboardingStepDocument,
+ );
+
+ const goBackToPreviousOnboardingStep = useCallback(async () => {
+ try {
+ const { data } = await goBackToPreviousOnboardingStepMutation();
+ const onboardingStepNavigation = data?.goBackToPreviousOnboardingStep;
+
+ if (!isDefined(onboardingStepNavigation)) {
+ return;
+ }
+
+ store.set(onboardingNavigationDirectionState.atom, 'backward');
+ store.set(currentUserState.atom, (currentUser) => {
+ if (!isDefined(currentUser)) {
+ return currentUser;
+ }
+
+ return {
+ ...currentUser,
+ onboardingStatus: onboardingStepNavigation.onboardingStatus,
+ previousOnboardingStatus:
+ onboardingStepNavigation.previousOnboardingStatus,
+ };
+ });
+ } catch (error) {
+ if (isGraphqlErrorOfType(error, NO_PREVIOUS_ONBOARDING_STEP_ERROR_CODE)) {
+ store.set(currentUserState.atom, (currentUser) => {
+ if (!isDefined(currentUser)) {
+ return currentUser;
+ }
+
+ return {
+ ...currentUser,
+ previousOnboardingStatus: null,
+ };
+ });
+
+ return;
+ }
+
+ enqueueErrorSnackBar(
+ error instanceof Error ? { apolloError: error } : {},
+ );
+ }
+ }, [goBackToPreviousOnboardingStepMutation, enqueueErrorSnackBar, store]);
+
+ return {
+ goBackToPreviousOnboardingStep,
+ isGoingBackToPreviousOnboardingStep: loading,
+ };
+};
diff --git a/packages/twenty-front/src/modules/onboarding/hooks/useInstallOnboardingApps.ts b/packages/twenty-front/src/modules/onboarding/hooks/useInstallOnboardingApps.ts
index 80352d85bb8..cd6aa4ba6d4 100644
--- a/packages/twenty-front/src/modules/onboarding/hooks/useInstallOnboardingApps.ts
+++ b/packages/twenty-front/src/modules/onboarding/hooks/useInstallOnboardingApps.ts
@@ -30,7 +30,10 @@ export const useInstallOnboardingApps = () => {
setIsCompleting(true);
try {
- await triggerInstallAppsOnboardingStep(universalIdentifiers);
+ await triggerInstallAppsOnboardingStep({
+ universalIdentifiers,
+ isAutoSkipped: false,
+ });
const creditsRewardPerApp =
onboardingConfig?.installAppsCreditsRewardPerApp ?? 0;
diff --git a/packages/twenty-front/src/modules/onboarding/hooks/useInviteTeam.ts b/packages/twenty-front/src/modules/onboarding/hooks/useInviteTeam.ts
index 4b2c82b247b..6485da18c5d 100644
--- a/packages/twenty-front/src/modules/onboarding/hooks/useInviteTeam.ts
+++ b/packages/twenty-front/src/modules/onboarding/hooks/useInviteTeam.ts
@@ -157,12 +157,15 @@ export const useInviteTeam = () => {
throw result.error;
}
+ const sentInvitationsCount =
+ result.data?.sendInvitations.result.length ?? 0;
+
const creditsRewardPerUser =
onboardingConfig?.inviteTeamCreditsRewardPerUser ?? 0;
setOnboardingFreeCredits((current) => ({
...current,
- inviteTeam: emails.length * creditsRewardPerUser,
+ inviteTeam: sentInvitationsCount * creditsRewardPerUser,
}));
if (emails.length > 0) {
@@ -176,7 +179,12 @@ export const useInviteTeam = () => {
await companyEnrichmentSettlement;
- setNextOnboardingStatus();
+ setNextOnboardingStatus({
+ stepHistoryEffect:
+ sentInvitationsCount > 0
+ ? 'clearAfterIrreversibleStep'
+ : 'recordAsReversible',
+ });
} catch (error) {
setIsNavigating(false);
diff --git a/packages/twenty-front/src/modules/onboarding/hooks/useSetNextOnboardingStatus.ts b/packages/twenty-front/src/modules/onboarding/hooks/useSetNextOnboardingStatus.ts
index 8b9235fbda5..f4252e2da5d 100644
--- a/packages/twenty-front/src/modules/onboarding/hooks/useSetNextOnboardingStatus.ts
+++ b/packages/twenty-front/src/modules/onboarding/hooks/useSetNextOnboardingStatus.ts
@@ -12,10 +12,13 @@ import { billingState } from '@/client-config/states/billingState';
import { isBookCallOnboardingStepEnabledState } from '@/client-config/states/isBookCallOnboardingStepEnabledState';
import { isOnboardingAiChatEnabledState } from '@/client-config/states/isOnboardingAiChatEnabledState';
import { isWelcomeAnimationVisibleState } from '@/onboarding/states/isWelcomeAnimationVisibleState';
+import { onboardingNavigationDirectionState } from '@/onboarding/states/onboardingNavigationDirectionState';
import { shouldOpenAiChatAfterOnboardingState } from '@/onboarding/states/shouldOpenAiChatAfterOnboardingState';
import { getHasJustCompletedOnboarding } from '@/onboarding/utils/getHasJustCompletedOnboarding';
import { getIsBookCallOnboardingStepPending } from '@/onboarding/utils/getIsBookCallOnboardingStepPending';
import { getIsPlanRequired } from '@/onboarding/utils/getIsPlanRequired';
+import { getNextPreviousOnboardingStatus } from '@/onboarding/utils/getNextPreviousOnboardingStatus';
+import { type OnboardingStepHistoryEffect } from '@/onboarding/types/OnboardingStepHistoryEffect';
import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';
import { useStore } from 'jotai';
@@ -92,43 +95,56 @@ export const useSetNextOnboardingStatus = () => {
isOnboardingAiChatEnabledState,
);
- return useCallback(() => {
- const nextOnboardingStatus = getNextOnboardingStatus({
+ return useCallback(
+ ({
+ stepHistoryEffect,
+ }: {
+ stepHistoryEffect: OnboardingStepHistoryEffect;
+ }) => {
+ const nextOnboardingStatus = getNextOnboardingStatus({
+ currentUser,
+ currentWorkspace,
+ isBillingEnabled,
+ isBookCallRequired:
+ store.get(isBookCallOnboardingStepEnabledState.atom) &&
+ getIsBookCallOnboardingStepPending(store.get(currentUserState.atom)),
+ });
+
+ store.set(onboardingNavigationDirectionState.atom, 'forward');
+ store.set(currentUserState.atom, (current) => {
+ if (isDefined(current)) {
+ return {
+ ...current,
+ onboardingStatus: nextOnboardingStatus,
+ previousOnboardingStatus: getNextPreviousOnboardingStatus({
+ stepHistoryEffect,
+ currentOnboardingStatus: current.onboardingStatus,
+ currentPreviousOnboardingStatus: current.previousOnboardingStatus,
+ }),
+ };
+ }
+ return current;
+ });
+
+ if (
+ getHasJustCompletedOnboarding({
+ previousOnboardingStatus: currentUser?.onboardingStatus,
+ nextOnboardingStatus,
+ })
+ ) {
+ store.set(isWelcomeAnimationVisibleState.atom, true);
+ store.set(
+ shouldOpenAiChatAfterOnboardingState.atom,
+ isOnboardingAiChatEnabled && currentUser?.isWorkspaceCreator === true,
+ );
+ }
+ },
+ [
currentUser,
currentWorkspace,
isBillingEnabled,
- isBookCallRequired:
- store.get(isBookCallOnboardingStepEnabledState.atom) &&
- getIsBookCallOnboardingStepPending(store.get(currentUserState.atom)),
- });
-
- store.set(currentUserState.atom, (current) => {
- if (isDefined(current)) {
- return {
- ...current,
- onboardingStatus: nextOnboardingStatus,
- };
- }
- return current;
- });
-
- if (
- getHasJustCompletedOnboarding({
- previousOnboardingStatus: currentUser?.onboardingStatus,
- nextOnboardingStatus,
- })
- ) {
- store.set(isWelcomeAnimationVisibleState.atom, true);
- store.set(
- shouldOpenAiChatAfterOnboardingState.atom,
- isOnboardingAiChatEnabled && currentUser?.isWorkspaceCreator === true,
- );
- }
- }, [
- currentUser,
- currentWorkspace,
- isBillingEnabled,
- isOnboardingAiChatEnabled,
- store,
- ]);
+ isOnboardingAiChatEnabled,
+ store,
+ ],
+ );
};
diff --git a/packages/twenty-front/src/modules/onboarding/hooks/useSkipSyncEmailOnboardingStep.ts b/packages/twenty-front/src/modules/onboarding/hooks/useSkipSyncEmailOnboardingStep.ts
index 714f102dbc7..f7f66daca91 100644
--- a/packages/twenty-front/src/modules/onboarding/hooks/useSkipSyncEmailOnboardingStep.ts
+++ b/packages/twenty-front/src/modules/onboarding/hooks/useSkipSyncEmailOnboardingStep.ts
@@ -9,8 +9,17 @@ export const useSkipSyncEmailOnboardingStep = () => {
SkipSyncEmailOnboardingStepDocument,
);
- return useCallback(async () => {
- await skipSyncEmailOnboardingStepMutation();
- setNextOnboardingStatus();
- }, [skipSyncEmailOnboardingStepMutation, setNextOnboardingStatus]);
+ return useCallback(
+ async ({ isAutoSkipped }: { isAutoSkipped: boolean }) => {
+ await skipSyncEmailOnboardingStepMutation({
+ variables: { isAutoSkipped },
+ });
+ setNextOnboardingStatus({
+ stepHistoryEffect: isAutoSkipped
+ ? 'leaveUnchanged'
+ : 'recordAsReversible',
+ });
+ },
+ [skipSyncEmailOnboardingStepMutation, setNextOnboardingStatus],
+ );
};
diff --git a/packages/twenty-front/src/modules/onboarding/hooks/useTriggerInstallAppsOnboardingStep.ts b/packages/twenty-front/src/modules/onboarding/hooks/useTriggerInstallAppsOnboardingStep.ts
index 26b6beb7ba5..e525c1d247c 100644
--- a/packages/twenty-front/src/modules/onboarding/hooks/useTriggerInstallAppsOnboardingStep.ts
+++ b/packages/twenty-front/src/modules/onboarding/hooks/useTriggerInstallAppsOnboardingStep.ts
@@ -1,4 +1,5 @@
import { useSetNextOnboardingStatus } from '@/onboarding/hooks/useSetNextOnboardingStatus';
+import { getInstallAppsStepHistoryEffect } from '@/onboarding/utils/getInstallAppsStepHistoryEffect';
import { useMutation } from '@apollo/client/react';
import { useCallback } from 'react';
import { TriggerInstallAppsOnboardingStepDocument } from '~/generated-metadata/graphql';
@@ -10,11 +11,22 @@ export const useTriggerInstallAppsOnboardingStep = () => {
);
return useCallback(
- async (universalIdentifiers: string[]) => {
+ async ({
+ universalIdentifiers,
+ isAutoSkipped,
+ }: {
+ universalIdentifiers: string[];
+ isAutoSkipped: boolean;
+ }) => {
await triggerInstallAppsOnboardingStep({
- variables: { universalIdentifiers },
+ variables: { universalIdentifiers, isAutoSkipped },
+ });
+ setNextOnboardingStatus({
+ stepHistoryEffect: getInstallAppsStepHistoryEffect({
+ universalIdentifiers,
+ isAutoSkipped,
+ }),
});
- setNextOnboardingStatus();
},
[triggerInstallAppsOnboardingStep, setNextOnboardingStatus],
);
diff --git a/packages/twenty-front/src/modules/onboarding/states/onboardingNavigationDirectionState.ts b/packages/twenty-front/src/modules/onboarding/states/onboardingNavigationDirectionState.ts
new file mode 100644
index 00000000000..018e21b2454
--- /dev/null
+++ b/packages/twenty-front/src/modules/onboarding/states/onboardingNavigationDirectionState.ts
@@ -0,0 +1,8 @@
+import { type OnboardingNavigationDirection } from '@/onboarding/types/OnboardingNavigationDirection';
+import { createAtomState } from '@/ui/utilities/state/jotai/utils/createAtomState';
+
+export const onboardingNavigationDirectionState =
+ createAtomState<OnboardingNavigationDirection>({
+ key: 'onboardingNavigationDirectionState',
+ defaultValue: 'forward',
+ });
diff --git a/packages/twenty-front/src/modules/onboarding/types/OnboardingNavigationDirection.ts b/packages/twenty-front/src/modules/onboarding/types/OnboardingNavigationDirection.ts
new file mode 100644
index 00000000000..acd862faabc
--- /dev/null
+++ b/packages/twenty-front/src/modules/onboarding/types/OnboardingNavigationDirection.ts
@@ -0,0 +1 @@
+export type OnboardingNavigationDirection = 'forward' | 'backward';
diff --git a/packages/twenty-front/src/modules/onboarding/types/OnboardingStepHistoryEffect.ts b/packages/twenty-front/src/modules/onboarding/types/OnboardingStepHistoryEffect.ts
new file mode 100644
index 00000000000..613587244da
--- /dev/null
+++ b/packages/twenty-front/src/modules/onboarding/types/OnboardingStepHistoryEffect.ts
@@ -0,0 +1,4 @@
+export type OnboardingStepHistoryEffect =
+ | 'recordAsReversible'
+ | 'clearAfterIrreversibleStep'
+ | 'leaveUnchanged';
diff --git a/packages/twenty-front/src/modules/onboarding/utils/__tests__/getInstallAppsStepHistoryEffect.test.ts b/packages/twenty-front/src/modules/onboarding/utils/__tests__/getInstallAppsStepHistoryEffect.test.ts
new file mode 100644
index 00000000000..8c5974b0a00
--- /dev/null
+++ b/packages/twenty-front/src/modules/onboarding/utils/__tests__/getInstallAppsStepHistoryEffect.test.ts
@@ -0,0 +1,39 @@
+import { getInstallAppsStepHistoryEffect } from '@/onboarding/utils/getInstallAppsStepHistoryEffect';
+
+describe('getInstallAppsStepHistoryEffect', () => {
+ it('should record the step as reversible when the user continued without picking an app', () => {
+ expect(
+ getInstallAppsStepHistoryEffect({
+ universalIdentifiers: [],
+ isAutoSkipped: false,
+ }),
+ ).toBe('recordAsReversible');
+ });
+
+ it('should leave the history unchanged when the step was auto-skipped', () => {
+ expect(
+ getInstallAppsStepHistoryEffect({
+ universalIdentifiers: [],
+ isAutoSkipped: true,
+ }),
+ ).toBe('leaveUnchanged');
+ });
+
+ it('should clear the history when apps were picked', () => {
+ expect(
+ getInstallAppsStepHistoryEffect({
+ universalIdentifiers: ['call-recorder'],
+ isAutoSkipped: false,
+ }),
+ ).toBe('clearAfterIrreversibleStep');
+ });
+
+ it('should clear the history when apps were picked even if the step is flagged as auto-skipped', () => {
+ expect(
+ getInstallAppsStepHistoryEffect({
+ universalIdentifiers: ['call-recorder'],
+ isAutoSkipped: true,
+ }),
+ ).toBe('clearAfterIrreversibleStep');
+ });
+});
diff --git a/packages/twenty-front/src/modules/onboarding/utils/__tests__/getNextPreviousOnboardingStatus.test.ts b/packages/twenty-front/src/modules/onboarding/utils/__tests__/getNextPreviousOnboardingStatus.test.ts
new file mode 100644
index 00000000000..807b1276698
--- /dev/null
+++ b/packages/twenty-front/src/modules/onboarding/utils/__tests__/getNextPreviousOnboardingStatus.test.ts
@@ -0,0 +1,44 @@
+import { getNextPreviousOnboardingStatus } from '@/onboarding/utils/getNextPreviousOnboardingStatus';
+import { OnboardingStatus } from '~/generated-metadata/graphql';
+
+describe('getNextPreviousOnboardingStatus', () => {
+ it('should make the step being left the one to go back to when it was reversible', () => {
+ expect(
+ getNextPreviousOnboardingStatus({
+ stepHistoryEffect: 'recordAsReversible',
+ currentOnboardingStatus: OnboardingStatus.SYNC_EMAIL,
+ currentPreviousOnboardingStatus: OnboardingStatus.WORKSPACE_ACTIVATION,
+ }),
+ ).toBe(OnboardingStatus.SYNC_EMAIL);
+ });
+
+ it('should drop every step to go back to after an irreversible step', () => {
+ expect(
+ getNextPreviousOnboardingStatus({
+ stepHistoryEffect: 'clearAfterIrreversibleStep',
+ currentOnboardingStatus: OnboardingStatus.INVITE_TEAM,
+ currentPreviousOnboardingStatus: OnboardingStatus.PROFILE_CREATION,
+ }),
+ ).toBeNull();
+ });
+
+ it('should keep the earlier step to go back to when the history is untouched', () => {
+ expect(
+ getNextPreviousOnboardingStatus({
+ stepHistoryEffect: 'leaveUnchanged',
+ currentOnboardingStatus: OnboardingStatus.APPS_INSTALLATION,
+ currentPreviousOnboardingStatus: OnboardingStatus.SYNC_EMAIL,
+ }),
+ ).toBe(OnboardingStatus.SYNC_EMAIL);
+ });
+
+ it('should return nothing to go back to when there was none and the history is untouched', () => {
+ expect(
+ getNextPreviousOnboardingStatus({
+ stepHistoryEffect: 'leaveUnchanged',
+ currentOnboardingStatus: OnboardingStatus.SYNC_EMAIL,
+ currentPreviousOnboardingStatus: null,
+ }),
+ ).toBeNull();
+ });
+});
diff --git a/packages/twenty-front/src/modules/onboarding/utils/getInstallAppsStepHistoryEffect.ts b/packages/twenty-front/src/modules/onboarding/utils/getInstallAppsStepHistoryEffect.ts
new file mode 100644
index 00000000000..5c3209036e0
--- /dev/null
+++ b/packages/twenty-front/src/modules/onboarding/utils/getInstallAppsStepHistoryEffect.ts
@@ -0,0 +1,15 @@
+import { type OnboardingStepHistoryEffect } from '@/onboarding/types/OnboardingStepHistoryEffect';
+
+export const getInstallAppsStepHistoryEffect = ({
+ universalIdentifiers,
+ isAutoSkipped,
+}: {
+ universalIdentifiers: string[];
+ isAutoSkipped: boolean;
+}): OnboardingStepHistoryEffect => {
+ if (universalIdentifiers.length > 0) {
+ return 'clearAfterIrreversibleStep';
+ }
+
+ return isAutoSkipped ? 'leaveUnchanged' : 'recordAsReversible';
+};
diff --git a/packages/twenty-front/src/modules/onboarding/utils/getNextPreviousOnboardingStatus.ts b/packages/twenty-front/src/modules/onboarding/utils/getNextPreviousOnboardingStatus.ts
new file mode 100644
index 00000000000..36ead2d56d9
--- /dev/null
+++ b/packages/twenty-front/src/modules/onboarding/utils/getNextPreviousOnboardingStatus.ts
@@ -0,0 +1,24 @@
+import { type OnboardingStepHistoryEffect } from '@/onboarding/types/OnboardingStepHistoryEffect';
+import { assertUnreachable } from 'twenty-shared/utils';
+import { type OnboardingStatus } from '~/generated-metadata/graphql';
+
+export const getNextPreviousOnboardingStatus = ({
+ stepHistoryEffect,
+ currentOnboardingStatus,
+ currentPreviousOnboardingStatus,
+}: {
+ stepHistoryEffect: OnboardingStepHistoryEffect;
+ currentOnboardingStatus: OnboardingStatus | null | undefined;
+ currentPreviousOnboardingStatus: OnboardingStatus | null | undefined;
+}): OnboardingStatus | null | undefined => {
+ switch (stepHistoryEffect) {
+ case 'recordAsReversible':
+ return currentOnboardingStatus;
+ case 'clearAfterIrreversibleStep':
+ return null;
+ case 'leaveUnchanged':
+ return currentPreviousOnboardingStatus;
+ default:
+ return assertUnreachable(stepHistoryEffect);
+ }
+};
diff --git a/packages/twenty-front/src/modules/users/graphql/fragments/userQueryFragment.ts b/packages/twenty-front/src/modules/users/graphql/fragments/userQueryFragment.ts
index 6520314c6ee..5f187450fe2 100644
--- a/packages/twenty-front/src/modules/users/graphql/fragments/userQueryFragment.ts
+++ b/packages/twenty-front/src/modules/users/graphql/fragments/userQueryFragment.ts
@@ -23,6 +23,7 @@ export const USER_QUERY_FRAGMENT = gql`
canImpersonate
supportUserHash
onboardingStatus
+ previousOnboardingStatus
isWorkspaceCreator
workspaceMember {
...WorkspaceMemberQueryFragment
diff --git a/packages/twenty-front/src/pages/onboarding/CreateProfile.tsx b/packages/twenty-front/src/pages/onboarding/CreateProfile.tsx
index 6f055f7cb5a..7dd4338a405 100644
--- a/packages/twenty-front/src/pages/onboarding/CreateProfile.tsx
+++ b/packages/twenty-front/src/pages/onboarding/CreateProfile.tsx
@@ -157,7 +157,7 @@ export const CreateProfile = () => {
return current;
});
- setNextOnboardingStatus();
+ setNextOnboardingStatus({ stepHistoryEffect: 'recordAsReversible' });
setIsNavigating(true);
} catch (error: any) {
setIsNavigating(false);
diff --git a/packages/twenty-front/src/pages/onboarding/SyncEmails.tsx b/packages/twenty-front/src/pages/onboarding/SyncEmails.tsx
index 591cae3d088..36c7750ea41 100644
--- a/packages/twenty-front/src/pages/onboarding/SyncEmails.tsx
+++ b/packages/twenty-front/src/pages/onboarding/SyncEmails.tsx
@@ -79,7 +79,7 @@ export const SyncEmails = () => {
};
const handleSkip = async () => {
- await skipSyncEmailOnboardingStep();
+ await skipSyncEmailOnboardingStep({ isAutoSkipped: false });
setOnboardingFreeCredits((current) => ({
...current,
diff --git a/packages/twenty-front/src/pages/onboarding/WorkspaceActivation.tsx b/packages/twenty-front/src/pages/onboarding/WorkspaceActivation.tsx
index 24fa1170380..ac046fb8aba 100644
--- a/packages/twenty-front/src/pages/onboarding/WorkspaceActivation.tsx
+++ b/packages/twenty-front/src/pages/onboarding/WorkspaceActivation.tsx
@@ -76,7 +76,7 @@ export const WorkspaceActivation = () => {
setIsAppEffectRedirectEnabled(false);
await loadCurrentUser();
- setNextOnboardingStatus();
+ setNextOnboardingStatus({ stepHistoryEffect: 'leaveUnchanged' });
setIsCreatingWorkspace(false);
setIsAppEffectRedirectEnabled(true);
} catch (error) {
diff --git a/packages/twenty-server/src/engine/core-modules/onboarding/constants/acquire-onboarding-step-transition-lock-statement.ts b/packages/twenty-server/src/engine/core-modules/onboarding/constants/acquire-onboarding-step-transition-lock-statement.ts
new file mode 100644
index 00000000000..d5904283349
--- /dev/null
+++ b/packages/twenty-server/src/engine/core-modules/onboarding/constants/acquire-onboarding-step-transition-lock-statement.ts
@@ -0,0 +1,2 @@
+export const ACQUIRE_ONBOARDING_STEP_TRANSITION_LOCK_STATEMENT =
+ 'SELECT pg_advisory_xact_lock(hashtextextended($1, 0))';
diff --git a/packages/twenty-server/src/engine/core-modules/onboarding/constants/onboarding-step-transition-lock-prefix.ts b/packages/twenty-server/src/engine/core-modules/onboarding/constants/onboarding-step-transition-lock-prefix.ts
new file mode 100644
index 00000000000..7e2ecc21a8f
--- /dev/null
+++ b/packages/twenty-server/src/engine/core-modules/onboarding/constants/onboarding-step-transition-lock-prefix.ts
@@ -0,0 +1,2 @@
+export const ONBOARDING_STEP_TRANSITION_LOCK_PREFIX =
+ 'onboarding-step-transition';
diff --git a/packages/twenty-server/src/engine/core-modules/onboarding/dtos/onboarding-step-navigation.dto.ts b/packages/twenty-server/src/engine/core-modules/onboarding/dtos/onboarding-step-navigation.dto.ts
new file mode 100644
index 00000000000..a21c26fcaf3
--- /dev/null
+++ b/packages/twenty-server/src/engine/core-modules/onboarding/dtos/onboarding-step-navigation.dto.ts
@@ -0,0 +1,18 @@
+import { Field, ObjectType } from '@nestjs/graphql';
+
+import { OnboardingStatus } from 'src/engine/core-modules/onboarding/enums/onboarding-status.enum';
+
+@ObjectType('OnboardingStepNavigation')
+export class OnboardingStepNavigationDTO {
+ @Field(() => OnboardingStatus, {
+ nullable: true,
+ description: 'Onboarding status the user landed on',
+ })
+ onboardingStatus: OnboardingStatus | null;
+
+ @Field(() => OnboardingStatus, {
+ nullable: true,
+ description: 'Step the user can go back to from there, if any',
+ })
+ previousOnboardingStatus: OnboardingStatus | null;
+}
diff --git a/packages/twenty-server/src/engine/core-modules/onboarding/jobs/install-onboarding-apps.job-constants.ts b/packages/twenty-server/src/engine/core-modules/onboarding/jobs/install-onboarding-apps.job-constants.ts
index 56ef4fe816c..182df65c722 100644
--- a/packages/twenty-server/src/engine/core-modules/onboarding/jobs/install-onboarding-apps.job-constants.ts
+++ b/packages/twenty-server/src/engine/core-modules/onboarding/jobs/install-onboarding-apps.job-constants.ts
@@ -3,4 +3,5 @@ export const INSTALL_ONBOARDING_APPS_JOB_NAME = 'InstallOnboardingAppsJob';
export type InstallOnboardingAppsJobData = {
workspaceId: string;
universalIdentifiers: string[];
+ userId?: string;
};
diff --git a/packages/twenty-server/src/engine/core-modules/onboarding/jobs/install-onboarding-apps.job.spec.ts b/packages/twenty-server/src/engine/core-modules/onboarding/jobs/install-onboarding-apps.job.spec.ts
index 6e54ebc3432..e5a71e6595c 100644
--- a/packages/twenty-server/src/engine/core-modules/onboarding/jobs/install-onboarding-apps.job.spec.ts
+++ b/packages/twenty-server/src/engine/core-modules/onboarding/jobs/install-onboarding-apps.job.spec.ts
@@ -13,6 +13,7 @@ describe('InstallOnboardingAppsJob', () => {
let onboardingService: OnboardingService;
const workspaceId = 'workspace-id';
+ const userId = 'user-id';
const callRecorderId = 'call-recorder-uid';
const peopleDataLabsId = 'people-data-labs-uid';
@@ -39,6 +40,7 @@ describe('InstallOnboardingAppsJob', () => {
provide: OnboardingService,
useValue: {
creditInstallAppsReward: jest.fn(),
+ clearReversibleOnboardingStepHistoryAfterAppsInstalled: jest.fn(),
},
},
],
@@ -82,7 +84,7 @@ describe('InstallOnboardingAppsJob', () => {
);
});
- it('should credit before attempting the installs', async () => {
+ it('should credit only once an install has succeeded', async () => {
jest
.spyOn(applicationRegistrationService, 'findOneByUniversalIdentifier')
.mockImplementation(async (universalIdentifier) =>
@@ -103,10 +105,29 @@ describe('InstallOnboardingAppsJob', () => {
applicationInstallService.installApplication as jest.Mock
).mock.invocationCallOrder[0];
- expect(creditOrder).toBeLessThan(installOrder);
+ expect(installOrder).toBeLessThan(creditOrder);
});
- it('should credit even when an install fails', async () => {
+ it('should not credit again when a failed run is relaunched', async () => {
+ jest
+ .spyOn(applicationRegistrationService, 'findOneByUniversalIdentifier')
+ .mockResolvedValue(null);
+
+ await job.handle({
+ workspaceId,
+ universalIdentifiers: [callRecorderId],
+ userId,
+ });
+ await job.handle({
+ workspaceId,
+ universalIdentifiers: [callRecorderId],
+ userId,
+ });
+
+ expect(onboardingService.creditInstallAppsReward).not.toHaveBeenCalled();
+ });
+
+ it('should not credit when every install fails', async () => {
jest
.spyOn(applicationRegistrationService, 'findOneByUniversalIdentifier')
.mockImplementation(async (universalIdentifier) =>
@@ -121,16 +142,13 @@ describe('InstallOnboardingAppsJob', () => {
universalIdentifiers: [callRecorderId, peopleDataLabsId],
});
- expect(onboardingService.creditInstallAppsReward).toHaveBeenCalledWith({
- workspaceId,
- rewardAppsCount: 2,
- });
+ expect(onboardingService.creditInstallAppsReward).not.toHaveBeenCalled();
expect(applicationInstallService.installApplication).toHaveBeenCalledTimes(
2,
);
});
- it('should skip installing apps whose registration cannot be found but still credit the full count', async () => {
+ it('should credit only the apps that were actually installed when a registration cannot be found', async () => {
jest
.spyOn(applicationRegistrationService, 'findOneByUniversalIdentifier')
.mockImplementation(async (universalIdentifier) =>
@@ -149,8 +167,87 @@ describe('InstallOnboardingAppsJob', () => {
expect(onboardingService.creditInstallAppsReward).toHaveBeenCalledWith({
workspaceId,
- rewardAppsCount: 2,
+ rewardAppsCount: 1,
+ });
+ expect(applicationInstallService.installApplication).toHaveBeenCalledTimes(
+ 1,
+ );
+ });
+
+ it('should clear every step to go back to once the apps are scheduled', async () => {
+ jest
+ .spyOn(applicationRegistrationService, 'findOneByUniversalIdentifier')
+ .mockResolvedValue(buildRegistration('registration-id'));
+ jest
+ .spyOn(applicationInstallService, 'installApplication')
+ .mockResolvedValue(true);
+
+ await job.handle({
+ workspaceId,
+ universalIdentifiers: [callRecorderId],
+ userId,
+ });
+
+ expect(
+ onboardingService.clearReversibleOnboardingStepHistoryAfterAppsInstalled,
+ ).toHaveBeenCalledWith({ userId, workspaceId });
+ });
+
+ it('should keep the steps to go back to when every install failed', async () => {
+ jest
+ .spyOn(applicationRegistrationService, 'findOneByUniversalIdentifier')
+ .mockResolvedValue(null);
+
+ await job.handle({
+ workspaceId,
+ universalIdentifiers: [callRecorderId, peopleDataLabsId],
+ userId,
});
+
+ expect(
+ onboardingService.clearReversibleOnboardingStepHistoryAfterAppsInstalled,
+ ).not.toHaveBeenCalled();
+ });
+
+ it('should clear the steps to go back to when only some installs succeeded', async () => {
+ jest
+ .spyOn(applicationRegistrationService, 'findOneByUniversalIdentifier')
+ .mockImplementation(async (universalIdentifier) =>
+ universalIdentifier === callRecorderId
+ ? buildRegistration('registration-id')
+ : null,
+ );
+ jest
+ .spyOn(applicationInstallService, 'installApplication')
+ .mockResolvedValue(true);
+
+ await job.handle({
+ workspaceId,
+ universalIdentifiers: [callRecorderId, peopleDataLabsId],
+ userId,
+ });
+
+ expect(
+ onboardingService.clearReversibleOnboardingStepHistoryAfterAppsInstalled,
+ ).toHaveBeenCalledWith({ userId, workspaceId });
+ });
+
+ it('should still install when the job was enqueued before it carried a user', async () => {
+ jest
+ .spyOn(applicationRegistrationService, 'findOneByUniversalIdentifier')
+ .mockResolvedValue(buildRegistration('registration-id'));
+ jest
+ .spyOn(applicationInstallService, 'installApplication')
+ .mockResolvedValue(true);
+
+ await job.handle({
+ workspaceId,
+ universalIdentifiers: [callRecorderId],
+ });
+
+ expect(
+ onboardingService.clearReversibleOnboardingStepHistoryAfterAppsInstalled,
+ ).not.toHaveBeenCalled();
expect(applicationInstallService.installApplication).toHaveBeenCalledTimes(
1,
);
diff --git a/packages/twenty-server/src/engine/core-modules/onboarding/jobs/install-onboarding-apps.job.ts b/packages/twenty-server/src/engine/core-modules/onboarding/jobs/install-onboarding-apps.job.ts
index d9df18ae458..e930755de4f 100644
--- a/packages/twenty-server/src/engine/core-modules/onboarding/jobs/install-onboarding-apps.job.ts
+++ b/packages/twenty-server/src/engine/core-modules/onboarding/jobs/install-onboarding-apps.job.ts
@@ -27,14 +27,34 @@ export class InstallOnboardingAppsJob {
async handle({
workspaceId,
universalIdentifiers,
+ userId,
}: InstallOnboardingAppsJobData): Promise<void> {
+ let installedAppsCount = 0;
+
+ for (const universalIdentifier of universalIdentifiers) {
+ const hasInstalledApp = await this.installApp({
+ universalIdentifier,
+ workspaceId,
+ });
+
+ if (hasInstalledApp) {
+ installedAppsCount += 1;
+ }
+ }
+
+ if (installedAppsCount === 0) {
+ return;
+ }
+
await this.onboardingService.creditInstallAppsReward({
workspaceId,
- rewardAppsCount: universalIdentifiers.length,
+ rewardAppsCount: installedAppsCount,
});
- for (const universalIdentifier of universalIdentifiers) {
- await this.installApp({ universalIdentifier, workspaceId });
+ if (isDefined(userId)) {
+ await this.onboardingService.clearReversibleOnboardingStepHistoryAfterAppsInstalled(
+ { userId, workspaceId },
+ );
}
}
@@ -44,7 +64,7 @@ export class InstallOnboardingAppsJob {
}: {
universalIdentifier: string;
workspaceId: string;
- }): Promise<void> {
+ }): Promise<boolean> {
try {
const registration =
await this.applicationRegistrationService.findOneByUniversalIdentifier(
@@ -56,18 +76,22 @@ export class InstallOnboardingAppsJob {
`Onboarding app ${universalIdentifier} not found while installing for workspace ${workspaceId}`,
);
- return;
+ return false;
}
await this.applicationInstallService.installApplication({
appRegistrationId: registration.id,
workspaceId,
});
+
+ return true;
} catch (error) {
this.logger.error(
`Failed to install onboarding app ${universalIdentifier} for workspace ${workspaceId}`,
error,
);
+
+ return false;
}
}
}
diff --git a/packages/twenty-server/src/engine/core-modules/onboarding/onboarding.exception.ts b/packages/twenty-server/src/engine/core-modules/onboarding/onboarding.exception.ts
index 23d6f98584f..b42f925d20f 100644
--- a/packages/twenty-server/src/engine/core-modules/onboarding/onboarding.exception.ts
+++ b/packages/twenty-server/src/engine/core-modules/onboarding/onboarding.exception.ts
@@ -5,6 +5,8 @@ import { assertUnreachable } from 'twenty-shared/utils';
import { CustomException } from 'src/utils/custom-exception';
export enum OnboardingExceptionCode {
+ NO_PREVIOUS_ONBOARDING_STEP = 'NO_PREVIOUS_ONBOARDING_STEP',
+ MISSING_TRANSACTION_QUERY_RUNNER = 'MISSING_TRANSACTION_QUERY_RUNNER',
INSTALL_APPS_JOB_ENQUEUE_FAILED = 'INSTALL_APPS_JOB_ENQUEUE_FAILED',
}
@@ -12,6 +14,10 @@ const getOnboardingExceptionUserFriendlyMessage = (
code: OnboardingExceptionCode,
) => {
switch (code) {
+ case OnboardingExceptionCode.NO_PREVIOUS_ONBOARDING_STEP:
+ return msg`There is no previous onboarding step to go back to.`;
+ case OnboardingExceptionCode.MISSING_TRANSACTION_QUERY_RUNNER:
+ return msg`Something went wrong while saving your onboarding progress.`;
case OnboardingExceptionCode.INSTALL_APPS_JOB_ENQUEUE_FAILED:
return msg`Something went wrong while starting the app installation. Please try again.`;
default:
diff --git a/packages/twenty-server/src/engine/core-modules/onboarding/onboarding.resolver.ts b/packages/twenty-server/src/engine/core-modules/onboarding/onboarding.resolver.ts
index 8b5d1226d8e..0a6af7f8a35 100644
--- a/packages/twenty-server/src/engine/core-modules/onboarding/onboarding.resolver.ts
+++ b/packages/twenty-server/src/engine/core-modules/onboarding/onboarding.resolver.ts
@@ -5,6 +5,7 @@ import { MetadataResolver } from 'src/engine/api/graphql/graphql-config/decorato
import { PreventNestToAutoLogGraphqlErrorsFilter } from 'src/engine/core-modules/graphql/filters/prevent-nest-to-auto-log-graphql-errors.filter';
import { ResolverValidationPipe } from 'src/engine/core-modules/graphql/pipes/resolver-validation.pipe';
import { InviteSuggestionDTO } from 'src/engine/core-modules/onboarding/dtos/invite-suggestion.dto';
+import { OnboardingStepNavigationDTO } from 'src/engine/core-modules/onboarding/dtos/onboarding-step-navigation.dto';
import { OnboardingStepSuccessDTO } from 'src/engine/core-modules/onboarding/dtos/onboarding-step-success.dto';
import { OnboardingService } from 'src/engine/core-modules/onboarding/onboarding.service';
import { type AuthContextUser } from 'src/engine/core-modules/auth/types/auth-context.type';
@@ -46,11 +47,13 @@ export class OnboardingResolver {
async skipSyncEmailOnboardingStep(
@AuthUser() user: AuthContextUser,
@AuthWorkspace() workspace: WorkspaceEntity,
+ @Args({ name: 'isAutoSkipped', type: () => Boolean, defaultValue: false })
+ isAutoSkipped: boolean,
): Promise<OnboardingStepSuccessDTO> {
- await this.onboardingService.setOnboardingConnectAccountPending({
+ await this.onboardingService.skipOnboardingConnectAccountStep({
userId: user.id,
workspaceId: workspace.id,
- value: false,
+ isAutoSkipped,
});
return { success: true };
@@ -61,11 +64,16 @@ export class OnboardingResolver {
async completeBookCallOnboardingStep(
@AuthUser() user: AuthContextUser,
@AuthWorkspace() workspace: WorkspaceEntity,
+ @Args({ name: 'hasBookedCall', type: () => Boolean, defaultValue: false })
+ hasBookedCall: boolean,
+ @Args({ name: 'isAutoSkipped', type: () => Boolean, defaultValue: false })
+ isAutoSkipped: boolean,
): Promise<OnboardingStepSuccessDTO> {
- await this.onboardingService.setOnboardingBookCallPending({
+ await this.onboardingService.completeOnboardingBookCallStep({
userId: user.id,
workspaceId: workspace.id,
- value: false,
+ hasBookedCall,
+ isAutoSkipped,
});
return { success: true };
@@ -78,13 +86,28 @@ export class OnboardingResolver {
@AuthWorkspace() workspace: WorkspaceEntity,
@Args({ name: 'universalIdentifiers', type: () => [String] })
universalIdentifiers: string[],
+ @Args({ name: 'isAutoSkipped', type: () => Boolean, defaultValue: false })
+ isAutoSkipped: boolean,
): Promise<OnboardingStepSuccessDTO> {
await this.onboardingService.triggerInstallAppsOnboardingStep({
userId: user.id,
workspaceId: workspace.id,
universalIdentifiers,
+ isAutoSkipped,
});
return { success: true };
}
+
+ @Mutation(() => OnboardingStepNavigationDTO)
+ @UseGuards(NoPermissionGuard)
+ async goBackToPreviousOnboardingStep(
+ @AuthUser() user: AuthContextUser,
+ @AuthWorkspace() workspace: WorkspaceEntity,
+ ): Promise<OnboardingStepNavigationDTO> {
+ return this.onboardingService.goBackToPreviousOnboardingStep({
+ userId: user.id,
+ workspaceId: workspace.id,
+ });
+ }
}
diff --git a/packages/twenty-server/src/engine/core-modules/onboarding/onboarding.service.spec.ts b/packages/twenty-server/src/engine/core-modules/onboarding/onboarding.service.spec.ts
index ac3407ff1e3..5b29f3666c5 100644
--- a/packages/twenty-server/src/engine/core-modules/onboarding/onboarding.service.spec.ts
+++ b/packages/twenty-server/src/engine/core-modules/onboarding/onboarding.service.spec.ts
@@ -2,7 +2,12 @@ import { Test, type TestingModule } from '@nestjs/testing';
import { getDataSourceToken, getRepositoryToken } from '@nestjs/typeorm';
import { WorkspaceActivationStatus } from 'twenty-shared/workspace';
-import { type DataSource, type QueryRunner, Repository } from 'typeorm';
+import {
+ type DataSource,
+ type EntityManager,
+ type QueryRunner,
+ Repository,
+} from 'typeorm';
import { BillingCreditGrantType } from 'src/engine/core-modules/billing/enums/billing-credit-grant-type.enum';
import { BillingCreditService } from 'src/engine/core-modules/billing/services/billing-credit.service';
@@ -37,11 +42,11 @@ describe('OnboardingService', () => {
const userId = 'user-id';
const workspaceId = 'workspace-id';
- const mockQueryRunner = {} as QueryRunner;
-
- let transactionQueryRunner: QueryRunner | undefined = mockQueryRunner;
+ let mockQueryRunner: QueryRunner;
+ let transactionQueryRunner: QueryRunner | undefined;
beforeEach(async () => {
+ mockQueryRunner = { query: jest.fn() } as unknown as QueryRunner;
transactionQueryRunner = mockQueryRunner;
const module: TestingModule = await Test.createTestingModule({
@@ -63,7 +68,7 @@ describe('OnboardingService', () => {
provide: UserVarsService,
useValue: {
get: jest.fn(),
- getAll: jest.fn(),
+ getAll: jest.fn().mockResolvedValue(new Map()),
set: jest.fn(),
setIfNotExists: jest.fn().mockResolvedValue(true),
delete: jest.fn(),
@@ -94,8 +99,15 @@ describe('OnboardingService', () => {
{
provide: getDataSourceToken(),
useValue: {
- transaction: jest.fn((runInTransaction) =>
- runInTransaction({ queryRunner: transactionQueryRunner }),
+ transaction: jest.fn(
+ async (
+ runInTransaction: (
+ entityManager: EntityManager,
+ ) => Promise<unknown>,
+ ) =>
+ runInTransaction({
+ queryRunner: transactionQueryRunner,
+ } as EntityManager),
),
},
},
@@ -167,9 +179,9 @@ describe('OnboardingService', () => {
isPlanRequired: true,
});
- expect(await service.getOnboardingStatus({ user, workspaceId })).toBe(
- OnboardingStatus.BOOK_CALL,
- );
+ expect(
+ await service.getOnboardingStatus({ userId: user.id, workspaceId }),
+ ).toBe(OnboardingStatus.BOOK_CALL);
});
it('should ignore a pending BOOK_CALL once the workspace has a subscription', async () => {
@@ -178,9 +190,9 @@ describe('OnboardingService', () => {
isPlanRequired: false,
});
- expect(await service.getOnboardingStatus({ user, workspaceId })).toBe(
- OnboardingStatus.COMPLETED,
- );
+ expect(
+ await service.getOnboardingStatus({ userId: user.id, workspaceId }),
+ ).toBe(OnboardingStatus.COMPLETED);
});
it('should ignore a pending BOOK_CALL once the booking page is unconfigured', async () => {
@@ -190,9 +202,9 @@ describe('OnboardingService', () => {
isBookCallStepConfigured: false,
});
- expect(await service.getOnboardingStatus({ user, workspaceId })).toBe(
- OnboardingStatus.PLAN_REQUIRED,
- );
+ expect(
+ await service.getOnboardingStatus({ userId: user.id, workspaceId }),
+ ).toBe(OnboardingStatus.PLAN_REQUIRED);
});
it('should keep INVITE_TEAM ahead of a pending BOOK_CALL', async () => {
@@ -204,17 +216,17 @@ describe('OnboardingService', () => {
isPlanRequired: true,
});
- expect(await service.getOnboardingStatus({ user, workspaceId })).toBe(
- OnboardingStatus.INVITE_TEAM,
- );
+ expect(
+ await service.getOnboardingStatus({ userId: user.id, workspaceId }),
+ ).toBe(OnboardingStatus.INVITE_TEAM);
});
it('should return PLAN_REQUIRED when no step is pending and a plan is required', async () => {
mockOnboardingState({ pendingSteps: [], isPlanRequired: true });
- expect(await service.getOnboardingStatus({ user, workspaceId })).toBe(
- OnboardingStatus.PLAN_REQUIRED,
- );
+ expect(
+ await service.getOnboardingStatus({ userId: user.id, workspaceId }),
+ ).toBe(OnboardingStatus.PLAN_REQUIRED);
});
});
@@ -229,11 +241,14 @@ describe('OnboardingService', () => {
workspaceId,
});
- expect(userVarsService.delete).toHaveBeenCalledWith({
- userId,
- workspaceId,
- key: OnboardingStepKeys.ONBOARDING_CONNECT_ACCOUNT_PENDING,
- });
+ expect(userVarsService.delete).toHaveBeenCalledWith(
+ {
+ userId,
+ workspaceId,
+ key: OnboardingStepKeys.ONBOARDING_CONNECT_ACCOUNT_PENDING,
+ },
+ mockQueryRunner,
+ );
expect(billingCreditService.grantCredits).toHaveBeenCalledWith(
expect.objectContaining({
workspaceId,
@@ -253,11 +268,14 @@ describe('OnboardingService', () => {
workspaceId,
});
- expect(userVarsService.delete).toHaveBeenCalledWith({
- userId,
- workspaceId,
- key: OnboardingStepKeys.ONBOARDING_CONNECT_ACCOUNT_PENDING,
- });
+ expect(userVarsService.delete).toHaveBeenCalledWith(
+ {
+ userId,
+ workspaceId,
+ key: OnboardingStepKeys.ONBOARDING_CONNECT_ACCOUNT_PENDING,
+ },
+ mockQueryRunner,
+ );
expect(billingCreditService.grantCredits).not.toHaveBeenCalled();
});
@@ -332,18 +350,23 @@ describe('OnboardingService', () => {
userId,
workspaceId,
universalIdentifiers: [callRecorderId, peopleDataLabsId],
+ isAutoSkipped: false,
});
- expect(userVarsService.delete).toHaveBeenCalledWith({
- userId,
- workspaceId,
- key: OnboardingStepKeys.ONBOARDING_INSTALL_APPS_PENDING,
- });
+ expect(userVarsService.delete).toHaveBeenCalledWith(
+ {
+ userId,
+ workspaceId,
+ key: OnboardingStepKeys.ONBOARDING_INSTALL_APPS_PENDING,
+ },
+ mockQueryRunner,
+ );
expect(messageQueueService.add).toHaveBeenCalledWith(
INSTALL_ONBOARDING_APPS_JOB_NAME,
{
workspaceId,
universalIdentifiers: [callRecorderId, peopleDataLabsId],
+ userId,
},
{ id: `${INSTALL_ONBOARDING_APPS_JOB_NAME}-${workspaceId}` },
);
@@ -357,6 +380,7 @@ describe('OnboardingService', () => {
userId,
workspaceId,
universalIdentifiers: [callRecorderId],
+ isAutoSkipped: false,
});
expect(messageQueueService.add).not.toHaveBeenCalled();
@@ -369,12 +393,100 @@ describe('OnboardingService', () => {
userId,
workspaceId,
universalIdentifiers: ['00000000-0000-0000-0000-000000000000'],
+ isAutoSkipped: false,
});
expect(userVarsService.delete).toHaveBeenCalled();
expect(messageQueueService.add).not.toHaveBeenCalled();
});
+ it('should record the step as reversible when the user skipped it', async () => {
+ jest.spyOn(userVarsService, 'delete').mockResolvedValue(1);
+
+ await service.triggerInstallAppsOnboardingStep({
+ userId,
+ workspaceId,
+ universalIdentifiers: [],
+ isAutoSkipped: false,
+ });
+
+ expect(userVarsService.set).toHaveBeenCalledWith(
+ {
+ userId,
+ workspaceId,
+ key: OnboardingStepKeys.ONBOARDING_REVERSIBLE_STEP_HISTORY,
+ value: [OnboardingStatus.APPS_INSTALLATION],
+ },
+ mockQueryRunner,
+ );
+ });
+
+ it('should not record the step as reversible when it was auto-skipped', async () => {
+ jest.spyOn(userVarsService, 'delete').mockResolvedValue(1);
+
+ await service.triggerInstallAppsOnboardingStep({
+ userId,
+ workspaceId,
+ universalIdentifiers: [],
+ isAutoSkipped: true,
+ });
+
+ expect(userVarsService.set).not.toHaveBeenCalled();
+ });
+
+ it('should leave clearing the steps to go back to to the install job', async () => {
+ jest.spyOn(userVarsService, 'delete').mockResolvedValue(1);
+
+ await service.triggerInstallAppsOnboardingStep({
+ userId,
+ workspaceId,
+ universalIdentifiers: [callRecorderId],
+ isAutoSkipped: false,
+ });
+
+ expect(userVarsService.set).not.toHaveBeenCalled();
+ });
+
+ it('should clear every step to go back to once the install job runs', async () => {
+ await service.clearReversibleOnboardingStepHistoryAfterAppsInstalled({
+ userId,
+ workspaceId,
+ });
+
+ expect(userVarsService.set).toHaveBeenCalledWith(
+ {
+ userId,
+ workspaceId,
+ key: OnboardingStepKeys.ONBOARDING_REVERSIBLE_STEP_HISTORY,
+ value: [],
+ },
+ mockQueryRunner,
+ );
+ });
+
+ it('should keep the steps to go back to when the install job could not be enqueued', async () => {
+ jest.spyOn(userVarsService, 'delete').mockResolvedValue(1);
+ jest
+ .spyOn(messageQueueService, 'add')
+ .mockRejectedValue(new Error('queue unavailable'));
+
+ await expect(
+ service.triggerInstallAppsOnboardingStep({
+ userId,
+ workspaceId,
+ universalIdentifiers: [callRecorderId],
+ isAutoSkipped: false,
+ }),
+ ).rejects.toThrow(OnboardingException);
+
+ expect(userVarsService.set).not.toHaveBeenCalledWith(
+ expect.objectContaining({
+ key: OnboardingStepKeys.ONBOARDING_REVERSIBLE_STEP_HISTORY,
+ }),
+ expect.anything(),
+ );
+ });
+
it('should restore the pending step and throw when enqueuing fails', async () => {
jest.spyOn(userVarsService, 'delete').mockResolvedValue(1);
jest
@@ -386,6 +498,7 @@ describe('OnboardingService', () => {
userId,
workspaceId,
universalIdentifiers: [callRecorderId],
+ isAutoSkipped: false,
}),
).rejects.toThrow(OnboardingException);
@@ -396,7 +509,7 @@ describe('OnboardingService', () => {
key: OnboardingStepKeys.ONBOARDING_INSTALL_APPS_PENDING,
value: true,
},
- undefined,
+ mockQueryRunner,
);
});
@@ -423,6 +536,7 @@ describe('OnboardingService', () => {
userId,
workspaceId,
universalIdentifiers: [callRecorderId],
+ isAutoSkipped: false,
}),
).rejects.toThrow(OnboardingException);
@@ -430,12 +544,13 @@ describe('OnboardingService', () => {
userId,
workspaceId,
universalIdentifiers: [callRecorderId],
+ isAutoSkipped: false,
});
expect(messageQueueService.add).toHaveBeenCalledTimes(2);
expect(messageQueueService.add).toHaveBeenLastCalledWith(
INSTALL_ONBOARDING_APPS_JOB_NAME,
- { workspaceId, universalIdentifiers: [callRecorderId] },
+ { workspaceId, universalIdentifiers: [callRecorderId], userId },
{ id: `${INSTALL_ONBOARDING_APPS_JOB_NAME}-${workspaceId}` },
);
});
@@ -454,11 +569,471 @@ describe('OnboardingService', () => {
userId,
workspaceId,
universalIdentifiers: [callRecorderId],
+ isAutoSkipped: false,
}),
).rejects.toThrow(OnboardingException);
});
});
+ describe('skipOnboardingConnectAccountStep', () => {
+ it('should record the step as reversible when the user skipped it', async () => {
+ jest.spyOn(userVarsService, 'delete').mockResolvedValue(1);
+
+ await service.skipOnboardingConnectAccountStep({
+ userId,
+ workspaceId,
+ isAutoSkipped: false,
+ });
+
+ expect(userVarsService.delete).toHaveBeenCalledWith(
+ {
+ userId,
+ workspaceId,
+ key: OnboardingStepKeys.ONBOARDING_CONNECT_ACCOUNT_PENDING,
+ },
+ mockQueryRunner,
+ );
+ expect(userVarsService.set).toHaveBeenCalledWith(
+ {
+ userId,
+ workspaceId,
+ key: OnboardingStepKeys.ONBOARDING_REVERSIBLE_STEP_HISTORY,
+ value: [OnboardingStatus.SYNC_EMAIL],
+ },
+ mockQueryRunner,
+ );
+ });
+
+ it('should not record the step as reversible when it was auto-skipped', async () => {
+ jest.spyOn(userVarsService, 'delete').mockResolvedValue(1);
+
+ await service.skipOnboardingConnectAccountStep({
+ userId,
+ workspaceId,
+ isAutoSkipped: true,
+ });
+
+ expect(userVarsService.set).not.toHaveBeenCalled();
+ });
+
+ it('should not record the step as reversible when it was already consumed', async () => {
+ jest.spyOn(userVarsService, 'delete').mockResolvedValue(0);
+
+ await service.skipOnboardingConnectAccountStep({
+ userId,
+ workspaceId,
+ isAutoSkipped: false,
+ });
+
+ expect(userVarsService.set).not.toHaveBeenCalled();
+ });
+
+ it('should clear every step to go back to when it granted the import-contacts reward', async () => {
+ jest.spyOn(userVarsService, 'delete').mockResolvedValue(1);
+ jest.spyOn(userWorkspaceRepository, 'countBy').mockResolvedValue(1);
+ jest.spyOn(twentyConfigService, 'get').mockReturnValue(2_000_000);
+
+ await service.completeOnboardingConnectAccountStep({
+ userId,
+ workspaceId,
+ });
+
+ expect(userVarsService.set).toHaveBeenCalledWith(
+ {
+ userId,
+ workspaceId,
+ key: OnboardingStepKeys.ONBOARDING_REVERSIBLE_STEP_HISTORY,
+ value: [],
+ },
+ mockQueryRunner,
+ );
+ });
+ });
+
+ describe('completeOnboardingProfileStepIfNameProvided', () => {
+ it('should record the step as reversible when a name was provided', async () => {
+ jest.spyOn(userVarsService, 'delete').mockResolvedValue(1);
+
+ await service.completeOnboardingProfileStepIfNameProvided({
+ userId,
+ workspaceId,
+ firstName: 'Ada',
+ });
+
+ expect(userVarsService.delete).toHaveBeenCalledWith(
+ {
+ userId,
+ workspaceId,
+ key: OnboardingStepKeys.ONBOARDING_CREATE_PROFILE_PENDING,
+ },
+ mockQueryRunner,
+ );
+ expect(userVarsService.set).toHaveBeenCalledWith(
+ {
+ userId,
+ workspaceId,
+ key: OnboardingStepKeys.ONBOARDING_REVERSIBLE_STEP_HISTORY,
+ value: [OnboardingStatus.PROFILE_CREATION],
+ },
+ mockQueryRunner,
+ );
+ });
+
+ it('should not record anything when the step was not pending', async () => {
+ jest.spyOn(userVarsService, 'delete').mockResolvedValue(0);
+
+ await service.completeOnboardingProfileStepIfNameProvided({
+ userId,
+ workspaceId,
+ firstName: 'Ada',
+ });
+
+ expect(userVarsService.set).not.toHaveBeenCalled();
+ });
+
+ it('should not touch the step when no name part was provided', async () => {
+ await service.completeOnboardingProfileStepIfNameProvided({
+ userId,
+ workspaceId,
+ firstName: '',
+ lastName: '',
+ });
+
+ expect(userVarsService.delete).not.toHaveBeenCalled();
+ expect(userVarsService.set).not.toHaveBeenCalled();
+ });
+ });
+
+ describe('completeOnboardingBookCallStep', () => {
+ it('should record the step as reversible when the user skipped the call', async () => {
+ jest.spyOn(userVarsService, 'delete').mockResolvedValue(1);
+
+ await service.completeOnboardingBookCallStep({
+ userId,
+ workspaceId,
+ hasBookedCall: false,
+ isAutoSkipped: false,
+ });
+
+ expect(userVarsService.delete).toHaveBeenCalledWith(
+ {
+ userId,
+ workspaceId,
+ key: OnboardingStepKeys.ONBOARDING_BOOK_CALL_PENDING,
+ },
+ mockQueryRunner,
+ );
+ expect(userVarsService.set).toHaveBeenCalledWith(
+ {
+ userId,
+ workspaceId,
+ key: OnboardingStepKeys.ONBOARDING_REVERSIBLE_STEP_HISTORY,
+ value: [OnboardingStatus.BOOK_CALL],
+ },
+ mockQueryRunner,
+ );
+ });
+
+ it('should clear every step to go back to when a call was booked', async () => {
+ jest.spyOn(userVarsService, 'delete').mockResolvedValue(1);
+
+ await service.completeOnboardingBookCallStep({
+ userId,
+ workspaceId,
+ hasBookedCall: true,
+ isAutoSkipped: false,
+ });
+
+ expect(userVarsService.set).toHaveBeenCalledWith(
+ {
+ userId,
+ workspaceId,
+ key: OnboardingStepKeys.ONBOARDING_REVERSIBLE_STEP_HISTORY,
+ value: [],
+ },
+ mockQueryRunner,
+ );
+ });
+
+ it('should not record the step as reversible when it was dropped automatically', async () => {
+ jest.spyOn(userVarsService, 'delete').mockResolvedValue(1);
+
+ await service.completeOnboardingBookCallStep({
+ userId,
+ workspaceId,
+ hasBookedCall: false,
+ isAutoSkipped: true,
+ });
+
+ expect(userVarsService.set).not.toHaveBeenCalled();
+ });
+
+ it('should not record the step as reversible when it was already consumed', async () => {
+ jest.spyOn(userVarsService, 'delete').mockResolvedValue(0);
+
+ await service.completeOnboardingBookCallStep({
+ userId,
+ workspaceId,
+ hasBookedCall: false,
+ isAutoSkipped: false,
+ });
+
+ expect(userVarsService.set).not.toHaveBeenCalled();
+ });
+ });
+
+ describe('completeOnboardingInviteTeamStep', () => {
+ it('should record the step as reversible when no invitation was sent', async () => {
+ jest.spyOn(userVarsService, 'delete').mockResolvedValue(1);
+
+ await service.completeOnboardingInviteTeamStep({
+ userId,
+ workspaceId,
+ hasSentInvitations: false,
+ });
+
+ expect(userVarsService.delete).toHaveBeenCalledWith(
+ {
+ workspaceId,
+ key: OnboardingStepKeys.ONBOARDING_INVITE_TEAM_PENDING,
+ },
+ mockQueryRunner,
+ );
+ expect(userVarsService.set).toHaveBeenCalledWith(
+ {
+ userId,
+ workspaceId,
+ key: OnboardingStepKeys.ONBOARDING_REVERSIBLE_STEP_HISTORY,
+ value: [OnboardingStatus.INVITE_TEAM],
+ },
+ mockQueryRunner,
+ );
+ });
+
+ it('should clear every step to go back to when invitations were sent', async () => {
+ jest.spyOn(userVarsService, 'delete').mockResolvedValue(1);
+
+ await service.completeOnboardingInviteTeamStep({
+ userId,
+ workspaceId,
+ hasSentInvitations: true,
+ });
+
+ expect(userVarsService.set).toHaveBeenCalledWith(
+ {
+ userId,
+ workspaceId,
+ key: OnboardingStepKeys.ONBOARDING_REVERSIBLE_STEP_HISTORY,
+ value: [],
+ },
+ mockQueryRunner,
+ );
+ });
+
+ it('should not record the step as reversible when the step was not pending', async () => {
+ jest.spyOn(userVarsService, 'delete').mockResolvedValue(0);
+
+ await service.completeOnboardingInviteTeamStep({
+ userId,
+ workspaceId,
+ hasSentInvitations: false,
+ });
+
+ expect(userVarsService.set).not.toHaveBeenCalled();
+ });
+ });
+
+ describe('getPreviousReversibleOnboardingStatus', () => {
+ it('should return the last recorded step', async () => {
+ jest
+ .spyOn(userVarsService, 'get')
+ .mockResolvedValue([
+ OnboardingStatus.SYNC_EMAIL,
+ OnboardingStatus.APPS_INSTALLATION,
+ ]);
+
+ await expect(
+ service.getPreviousReversibleOnboardingStatus({ userId, workspaceId }),
+ ).resolves.toBe(OnboardingStatus.APPS_INSTALLATION);
+ });
+
+ it('should return null when no step was recorded', async () => {
+ jest.spyOn(userVarsService, 'get').mockResolvedValue(undefined);
+
+ await expect(
+ service.getPreviousReversibleOnboardingStatus({ userId, workspaceId }),
+ ).resolves.toBeNull();
+ });
+ });
+
+ describe('goBackToPreviousOnboardingStep', () => {
+ beforeEach(() => {
+ jest.spyOn(workspaceRepository, 'findOne').mockResolvedValue({
+ id: workspaceId,
+ activationStatus: WorkspaceActivationStatus.ACTIVE,
+ } as WorkspaceEntity);
+ });
+
+ it('should pop the last step, re-arm its pending flag and return the resulting statuses', async () => {
+ jest
+ .spyOn(userVarsService, 'get')
+ .mockResolvedValueOnce([
+ OnboardingStatus.SYNC_EMAIL,
+ OnboardingStatus.APPS_INSTALLATION,
+ ])
+ .mockResolvedValue([OnboardingStatus.SYNC_EMAIL]);
+ jest
+ .spyOn(userVarsService, 'getAll')
+ .mockResolvedValue(
+ new Map<string, boolean>([
+ [OnboardingStepKeys.ONBOARDING_INSTALL_APPS_PENDING, true],
+ ]),
+ );
+
+ const result = await service.goBackToPreviousOnboardingStep({
+ userId,
+ workspaceId,
+ });
+
+ expect(userVarsService.set).toHaveBeenCalledWith(
+ {
+ userId,
+ workspaceId,
+ key: OnboardingStepKeys.ONBOARDING_REVERSIBLE_STEP_HISTORY,
+ value: [OnboardingStatus.SYNC_EMAIL],
+ },
+ mockQueryRunner,
+ );
+ expect(userVarsService.set).toHaveBeenCalledWith(
+ {
+ userId,
+ workspaceId,
+ key: OnboardingStepKeys.ONBOARDING_INSTALL_APPS_PENDING,
+ value: true,
+ },
+ mockQueryRunner,
+ );
+ expect(result.onboardingStatus).toBe(OnboardingStatus.APPS_INSTALLATION);
+ expect(result.previousOnboardingStatus).toBe(OnboardingStatus.SYNC_EMAIL);
+ });
+
+ it('should take the step transition lock before reading the history', async () => {
+ const lockThenReadCallOrder: string[] = [];
+
+ jest
+ .spyOn(mockQueryRunner, 'query')
+ .mockImplementation(async (statement: string) => {
+ lockThenReadCallOrder.push(`query:${statement}`);
+
+ return [];
+ });
+ jest.spyOn(userVarsService, 'get').mockImplementation(async () => {
+ lockThenReadCallOrder.push('readHistory');
+
+ return [OnboardingStatus.SYNC_EMAIL];
+ });
+ jest
+ .spyOn(userVarsService, 'getAll')
+ .mockResolvedValue(
+ new Map<string, boolean>([
+ [OnboardingStepKeys.ONBOARDING_CONNECT_ACCOUNT_PENDING, true],
+ ]),
+ );
+
+ await service.goBackToPreviousOnboardingStep({ userId, workspaceId });
+
+ expect(mockQueryRunner.query).toHaveBeenCalledWith(
+ 'SELECT pg_advisory_xact_lock(hashtextextended($1, 0))',
+ [`onboarding-step-transition:${userId}:${workspaceId}`],
+ );
+ expect(lockThenReadCallOrder[0]).toBe(
+ 'query:SELECT pg_advisory_xact_lock(hashtextextended($1, 0))',
+ );
+ expect(lockThenReadCallOrder[1]).toBe('readHistory');
+ });
+
+ it('should re-arm the invite-team flag for the navigating user only when going back to invite team', async () => {
+ jest
+ .spyOn(userVarsService, 'get')
+ .mockResolvedValueOnce([OnboardingStatus.INVITE_TEAM])
+ .mockResolvedValue([]);
+ jest
+ .spyOn(userVarsService, 'getAll')
+ .mockResolvedValue(
+ new Map<string, boolean>([
+ [OnboardingStepKeys.ONBOARDING_INVITE_TEAM_PENDING, true],
+ ]),
+ );
+
+ const result = await service.goBackToPreviousOnboardingStep({
+ userId,
+ workspaceId,
+ });
+
+ expect(userVarsService.set).toHaveBeenCalledWith(
+ {
+ userId,
+ workspaceId,
+ key: OnboardingStepKeys.ONBOARDING_INVITE_TEAM_PENDING,
+ value: true,
+ },
+ mockQueryRunner,
+ );
+ expect(result.onboardingStatus).toBe(OnboardingStatus.INVITE_TEAM);
+ expect(result.previousOnboardingStatus).toBeNull();
+ });
+
+ it('should re-arm the book-call step when going back to it', async () => {
+ jest
+ .spyOn(userVarsService, 'get')
+ .mockResolvedValueOnce([OnboardingStatus.BOOK_CALL])
+ .mockResolvedValue([]);
+ jest
+ .spyOn(userVarsService, 'getAll')
+ .mockResolvedValue(
+ new Map<string, boolean>([
+ [OnboardingStepKeys.ONBOARDING_BOOK_CALL_PENDING, true],
+ ]),
+ );
+ jest
+ .spyOn(billingService, 'isSubscriptionIncompleteOnboardingStatus')
+ .mockResolvedValue(true);
+ jest
+ .spyOn(twentyConfigService, 'get')
+ .mockImplementation(
+ (key: string) =>
+ (key === 'CALENDAR_BOOKING_PAGE_ID'
+ ? 'team/twenty/talk-to-us'
+ : 50) as never,
+ );
+
+ const result = await service.goBackToPreviousOnboardingStep({
+ userId,
+ workspaceId,
+ });
+
+ expect(userVarsService.set).toHaveBeenCalledWith(
+ {
+ userId,
+ workspaceId,
+ key: OnboardingStepKeys.ONBOARDING_BOOK_CALL_PENDING,
+ value: true,
+ },
+ mockQueryRunner,
+ );
+ expect(result.onboardingStatus).toBe(OnboardingStatus.BOOK_CALL);
+ });
+
+ it('should throw when there is no recorded step to go back to', async () => {
+ jest.spyOn(userVarsService, 'get').mockResolvedValue([]);
+
+ await expect(
+ service.goBackToPreviousOnboardingStep({ userId, workspaceId }),
+ ).rejects.toThrow(OnboardingException);
+ expect(userVarsService.set).not.toHaveBeenCalled();
+ });
+ });
+
describe('creditInstallAppsReward', () => {
it('should credit the reward per installed app', async () => {
jest.spyOn(twentyConfigService, 'get').mockReturnValue(1_000_000);
diff --git a/packages/twenty-server/src/engine/core-modules/onboarding/onboarding.service.ts b/packages/twenty-server/src/engine/core-modules/onboarding/onboarding.service.ts
index 7e81ef45d89..cbbd3c4cc7b 100644
--- a/packages/twenty-server/src/engine/core-modules/onboarding/onboarding.service.ts
+++ b/packages/twenty-server/src/engine/core-modules/onboarding/onboarding.service.ts
@@ -2,7 +2,7 @@ import { Injectable, Logger } from '@nestjs/common';
import { InjectDataSource, InjectRepository } from '@nestjs/typeorm';
import { isNumber } from '@sniptt/guards';
-import { isDefined } from 'twenty-shared/utils';
+import { assertUnreachable, isDefined } from 'twenty-shared/utils';
import { WorkspaceActivationStatus } from 'twenty-shared/workspace';
import { type DataSource, type QueryRunner, Repository } from 'typeorm';
@@ -13,6 +13,8 @@ import { InjectMessageQueue } from 'src/engine/core-modules/message-queue/decora
import { MessageQueue } from 'src/engine/core-modules/message-queue/message-queue.constants';
import { MessageQueueService } from 'src/engine/core-modules/message-queue/services/message-queue.service';
import { ONBOARDING_INSTALLABLE_APP_UNIVERSAL_IDENTIFIERS } from 'src/engine/core-modules/onboarding/constants/onboarding-installable-app-universal-identifiers';
+import { ACQUIRE_ONBOARDING_STEP_TRANSITION_LOCK_STATEMENT } from 'src/engine/core-modules/onboarding/constants/acquire-onboarding-step-transition-lock-statement';
+import { buildOnboardingStepTransitionLockName } from 'src/engine/core-modules/onboarding/utils/build-onboarding-step-transition-lock-name.util';
import { OnboardingStatus } from 'src/engine/core-modules/onboarding/enums/onboarding-status.enum';
import {
INSTALL_ONBOARDING_APPS_JOB_NAME,
@@ -22,10 +24,10 @@ import {
OnboardingException,
OnboardingExceptionCode,
} from 'src/engine/core-modules/onboarding/onboarding.exception';
+import { type ReversibleOnboardingStep } from 'src/engine/core-modules/onboarding/types/reversible-onboarding-step.type';
import { readBookCallStepMinEmployeeCount } from 'src/engine/core-modules/onboarding/utils/read-book-call-step-min-employee-count.util';
import { TwentyConfigService } from 'src/engine/core-modules/twenty-config/twenty-config.service';
import { UserVarsService } from 'src/engine/core-modules/user/user-vars/services/user-vars.service';
-import { UserEntity } from 'src/engine/core-modules/user/user.entity';
import { UserWorkspaceEntity } from 'src/engine/core-modules/user-workspace/user-workspace.entity';
import { WorkspaceEntity } from 'src/engine/core-modules/workspace/workspace.entity';
@@ -36,6 +38,7 @@ export enum OnboardingStepKeys {
ONBOARDING_INSTALL_APPS_PENDING = 'ONBOARDING_INSTALL_APPS_PENDING',
ONBOARDING_BOOK_CALL_PENDING = 'ONBOARDING_BOOK_CALL_PENDING',
ONBOARDING_BOOK_CALL_OFFERED = 'ONBOARDING_BOOK_CALL_OFFERED',
+ ONBOARDING_REVERSIBLE_STEP_HISTORY = 'ONBOARDING_REVERSIBLE_STEP_HISTORY',
}
export type OnboardingKeyValueTypeMap = {
@@ -45,6 +48,7 @@ export type OnboardingKeyValueTypeMap = {
[OnboardingStepKeys.ONBOARDING_INSTALL_APPS_PENDING]: boolean;
[OnboardingStepKeys.ONBOARDING_BOOK_CALL_PENDING]: boolean;
[OnboardingStepKeys.ONBOARDING_BOOK_CALL_OFFERED]: boolean;
+ [OnboardingStepKeys.ONBOARDING_REVERSIBLE_STEP_HISTORY]: ReversibleOnboardingStep[];
};
@Injectable()
@@ -66,6 +70,35 @@ export class OnboardingService {
private readonly dataSource: DataSource,
) {}
+ private async runStepTransitionInLockedTransaction<T>(
+ {
+ userId,
+ workspaceId,
+ }: {
+ userId: string;
+ workspaceId: string;
+ },
+ runStepTransition: (queryRunner: QueryRunner) => Promise<T>,
+ ): Promise<T> {
+ return this.dataSource.transaction(async (entityManager) => {
+ const transactionQueryRunner = entityManager.queryRunner;
+
+ if (!isDefined(transactionQueryRunner)) {
+ throw new OnboardingException(
+ 'Onboarding step transitions require a transaction-scoped entity manager',
+ OnboardingExceptionCode.MISSING_TRANSACTION_QUERY_RUNNER,
+ );
+ }
+
+ await transactionQueryRunner.query(
+ ACQUIRE_ONBOARDING_STEP_TRANSITION_LOCK_STATEMENT,
+ [buildOnboardingStepTransitionLockName({ userId, workspaceId })],
+ );
+
+ return runStepTransition(transactionQueryRunner);
+ });
+ }
+
private isWorkspaceActivationPending(workspace: WorkspaceEntity) {
return (
workspace.activationStatus ===
@@ -75,10 +108,10 @@ export class OnboardingService {
}
async getOnboardingStatus({
- user,
+ userId,
workspaceId,
}: {
- user: UserEntity;
+ userId: string;
workspaceId: string;
}): Promise<OnboardingStatus | null> {
// We always read the workspace directly from the database here (bypassing
@@ -98,7 +131,7 @@ export class OnboardingService {
}
const userVars = await this.userVarsService.getAll({
- userId: user.id,
+ userId,
workspaceId: workspace.id,
});
@@ -156,18 +189,252 @@ export class OnboardingService {
}
async isOnboardingInviteTeamPending({
+ userId,
workspaceId,
}: {
+ userId?: string;
workspaceId: string;
}): Promise<boolean> {
return (
(await this.userVarsService.get({
+ userId,
workspaceId,
key: OnboardingStepKeys.ONBOARDING_INVITE_TEAM_PENDING,
})) === true
);
}
+ async getPreviousReversibleOnboardingStatus({
+ userId,
+ workspaceId,
+ }: {
+ userId: string;
+ workspaceId: string;
+ }): Promise<ReversibleOnboardingStep | null> {
+ const reversibleStepHistory = await this.getReversibleOnboardingStepHistory(
+ {
+ userId,
+ workspaceId,
+ },
+ );
+
+ return reversibleStepHistory[reversibleStepHistory.length - 1] ?? null;
+ }
+
+ async goBackToPreviousOnboardingStep({
+ userId,
+ workspaceId,
+ }: {
+ userId: string;
+ workspaceId: string;
+ }) {
+ await this.runStepTransitionInLockedTransaction(
+ { userId, workspaceId },
+ async (queryRunner) => {
+ const reversibleStepHistory =
+ await this.getReversibleOnboardingStepHistory({
+ userId,
+ workspaceId,
+ });
+ const previousReversibleStep =
+ reversibleStepHistory[reversibleStepHistory.length - 1];
+
+ if (!isDefined(previousReversibleStep)) {
+ throw new OnboardingException(
+ `No previous onboarding step to go back to for user ${userId} in workspace ${workspaceId}`,
+ OnboardingExceptionCode.NO_PREVIOUS_ONBOARDING_STEP,
+ );
+ }
+
+ await this.setReversibleOnboardingStepHistory(
+ {
+ userId,
+ workspaceId,
+ reversibleStepHistory: reversibleStepHistory.slice(0, -1),
+ },
+ queryRunner,
+ );
+
+ await this.restoreReversibleOnboardingStepPendingFlag(
+ {
+ userId,
+ workspaceId,
+ step: previousReversibleStep,
+ },
+ queryRunner,
+ );
+ },
+ );
+
+ return this.runStepTransitionInLockedTransaction(
+ { userId, workspaceId },
+ async () => ({
+ onboardingStatus: await this.getOnboardingStatus({
+ userId,
+ workspaceId,
+ }),
+ previousOnboardingStatus:
+ await this.getPreviousReversibleOnboardingStatus({
+ userId,
+ workspaceId,
+ }),
+ }),
+ );
+ }
+
+ private async pushReversibleOnboardingStep(
+ {
+ userId,
+ workspaceId,
+ step,
+ }: {
+ userId: string;
+ workspaceId: string;
+ step: ReversibleOnboardingStep;
+ },
+ queryRunner?: QueryRunner,
+ ) {
+ const reversibleStepHistory = await this.getReversibleOnboardingStepHistory(
+ {
+ userId,
+ workspaceId,
+ },
+ );
+
+ await this.setReversibleOnboardingStepHistory(
+ {
+ userId,
+ workspaceId,
+ reversibleStepHistory: [...reversibleStepHistory, step],
+ },
+ queryRunner,
+ );
+ }
+
+ private async getReversibleOnboardingStepHistory({
+ userId,
+ workspaceId,
+ }: {
+ userId: string;
+ workspaceId: string;
+ }): Promise<ReversibleOnboardingStep[]> {
+ const reversibleStepHistory = await this.userVarsService.get({
+ userId,
+ workspaceId,
+ key: OnboardingStepKeys.ONBOARDING_REVERSIBLE_STEP_HISTORY,
+ });
+
+ return Array.isArray(reversibleStepHistory) ? reversibleStepHistory : [];
+ }
+
+ private async setReversibleOnboardingStepHistory(
+ {
+ userId,
+ workspaceId,
+ reversibleStepHistory,
+ }: {
+ userId: string;
+ workspaceId: string;
+ reversibleStepHistory: ReversibleOnboardingStep[];
+ },
+ queryRunner?: QueryRunner,
+ ) {
+ await this.userVarsService.set(
+ {
+ userId,
+ workspaceId,
+ key: OnboardingStepKeys.ONBOARDING_REVERSIBLE_STEP_HISTORY,
+ value: reversibleStepHistory,
+ },
+ queryRunner,
+ );
+ }
+
+ private async clearReversibleOnboardingStepHistoryAfterIrreversibleStep(
+ {
+ userId,
+ workspaceId,
+ }: {
+ userId: string;
+ workspaceId: string;
+ },
+ queryRunner?: QueryRunner,
+ ) {
+ await this.setReversibleOnboardingStepHistory(
+ {
+ userId,
+ workspaceId,
+ reversibleStepHistory: [],
+ },
+ queryRunner,
+ );
+ }
+
+ private async restoreReversibleOnboardingStepPendingFlag(
+ {
+ userId,
+ workspaceId,
+ step,
+ }: {
+ userId: string;
+ workspaceId: string;
+ step: ReversibleOnboardingStep;
+ },
+ queryRunner?: QueryRunner,
+ ) {
+ switch (step) {
+ case OnboardingStatus.SYNC_EMAIL:
+ return this.setOnboardingConnectAccountPending(
+ {
+ userId,
+ workspaceId,
+ value: true,
+ },
+ queryRunner,
+ );
+ case OnboardingStatus.APPS_INSTALLATION:
+ return this.setOnboardingInstallAppsPending(
+ {
+ userId,
+ workspaceId,
+ value: true,
+ },
+ queryRunner,
+ );
+ case OnboardingStatus.PROFILE_CREATION:
+ return this.setOnboardingCreateProfilePending(
+ {
+ userId,
+ workspaceId,
+ value: true,
+ },
+ queryRunner,
+ );
+ case OnboardingStatus.INVITE_TEAM:
+ // User-scoped on purpose: the workspace-scoped flag would pull every
+ // other member of the workspace back to the invite screen.
+ return this.setOnboardingInviteTeamPending(
+ {
+ userId,
+ workspaceId,
+ value: true,
+ },
+ queryRunner,
+ );
+ case OnboardingStatus.BOOK_CALL:
+ return this.setOnboardingBookCallPending(
+ {
+ userId,
+ workspaceId,
+ value: true,
+ },
+ queryRunner,
+ );
+ default:
+ assertUnreachable(step);
+ }
+ }
+
async setOnboardingConnectAccountPending(
{
userId,
@@ -212,7 +479,26 @@ export class OnboardingService {
workspaceId: string;
}) {
const hasClaimedConnectAccountStep =
- await this.claimOnboardingConnectAccountStep({ userId, workspaceId });
+ await this.runStepTransitionInLockedTransaction(
+ { userId, workspaceId },
+ async (queryRunner) => {
+ const hasClaimedStep = await this.claimOnboardingConnectAccountStep(
+ { userId, workspaceId },
+ queryRunner,
+ );
+
+ if (!hasClaimedStep) {
+ return false;
+ }
+
+ await this.clearReversibleOnboardingStepHistoryAfterIrreversibleStep(
+ { userId, workspaceId },
+ queryRunner,
+ );
+
+ return true;
+ },
+ );
if (!hasClaimedConnectAccountStep) {
return;
@@ -221,6 +507,40 @@ export class OnboardingService {
await this.creditImportContactsRewardForFirstWorkspaceUser({ workspaceId });
}
+ async skipOnboardingConnectAccountStep({
+ userId,
+ workspaceId,
+ isAutoSkipped,
+ }: {
+ userId: string;
+ workspaceId: string;
+ isAutoSkipped: boolean;
+ }) {
+ await this.runStepTransitionInLockedTransaction(
+ { userId, workspaceId },
+ async (queryRunner) => {
+ const hasClaimedConnectAccountStep =
+ await this.claimOnboardingConnectAccountStep(
+ { userId, workspaceId },
+ queryRunner,
+ );
+
+ if (!hasClaimedConnectAccountStep || isAutoSkipped) {
+ return;
+ }
+
+ await this.pushReversibleOnboardingStep(
+ {
+ userId,
+ workspaceId,
+ step: OnboardingStatus.SYNC_EMAIL,
+ },
+ queryRunner,
+ );
+ },
+ );
+ }
+
private async isFirstWorkspaceUser({
workspaceId,
}: {
@@ -233,18 +553,24 @@ export class OnboardingService {
return workspaceUserCount === 1;
}
- private async claimOnboardingConnectAccountStep({
- userId,
- workspaceId,
- }: {
- userId: string;
- workspaceId: string;
- }): Promise<boolean> {
- const affectedRows = await this.userVarsService.delete({
+ private async claimOnboardingConnectAccountStep(
+ {
userId,
workspaceId,
- key: OnboardingStepKeys.ONBOARDING_CONNECT_ACCOUNT_PENDING,
- });
+ }: {
+ userId: string;
+ workspaceId: string;
+ },
+ queryRunner?: QueryRunner,
+ ): Promise<boolean> {
+ const affectedRows = await this.userVarsService.delete(
+ {
+ userId,
+ workspaceId,
+ key: OnboardingStepKeys.ONBOARDING_CONNECT_ACCOUNT_PENDING,
+ },
+ queryRunner,
+ );
return isDefined(affectedRows) && affectedRows > 0;
}
@@ -320,19 +646,13 @@ export class OnboardingService {
userId,
workspaceId,
universalIdentifiers,
+ isAutoSkipped,
}: {
userId: string;
workspaceId: string;
universalIdentifiers: string[];
+ isAutoSkipped: boolean;
}) {
- const hasClaimedInstallAppsStep = await this.claimInstallAppsOnboardingStep(
- { userId, workspaceId },
- );
-
- if (!hasClaimedInstallAppsStep) {
- return;
- }
-
const installableUniversalIdentifiers = universalIdentifiers.filter(
(universalIdentifier) =>
ONBOARDING_INSTALLABLE_APP_UNIVERSAL_IDENTIFIERS.includes(
@@ -341,13 +661,55 @@ export class OnboardingService {
);
if (installableUniversalIdentifiers.length === 0) {
+ await this.runStepTransitionInLockedTransaction(
+ { userId, workspaceId },
+ async (queryRunner) => {
+ const hasClaimedInstallAppsStep =
+ await this.claimInstallAppsOnboardingStep(
+ { userId, workspaceId },
+ queryRunner,
+ );
+
+ if (!hasClaimedInstallAppsStep || isAutoSkipped) {
+ return;
+ }
+
+ await this.pushReversibleOnboardingStep(
+ {
+ userId,
+ workspaceId,
+ step: OnboardingStatus.APPS_INSTALLATION,
+ },
+ queryRunner,
+ );
+ },
+ );
+
+ return;
+ }
+
+ const hasClaimedInstallAppsStep =
+ await this.runStepTransitionInLockedTransaction(
+ { userId, workspaceId },
+ async (queryRunner) =>
+ this.claimInstallAppsOnboardingStep(
+ { userId, workspaceId },
+ queryRunner,
+ ),
+ );
+
+ if (!hasClaimedInstallAppsStep) {
return;
}
try {
await this.messageQueueService.add<InstallOnboardingAppsJobData>(
INSTALL_ONBOARDING_APPS_JOB_NAME,
- { workspaceId, universalIdentifiers: installableUniversalIdentifiers },
+ {
+ workspaceId,
+ universalIdentifiers: installableUniversalIdentifiers,
+ userId,
+ },
{ id: `${INSTALL_ONBOARDING_APPS_JOB_NAME}-${workspaceId}` },
);
} catch (error) {
@@ -372,11 +734,18 @@ export class OnboardingService {
workspaceId: string;
}) {
try {
- await this.setOnboardingInstallAppsPending({
- userId,
- workspaceId,
- value: true,
- });
+ await this.runStepTransitionInLockedTransaction(
+ { userId, workspaceId },
+ async (queryRunner) =>
+ this.setOnboardingInstallAppsPending(
+ {
+ userId,
+ workspaceId,
+ value: true,
+ },
+ queryRunner,
+ ),
+ );
} catch (error) {
this.logger.error(
`Failed to restore the pending install-apps onboarding step for workspace ${workspaceId}`,
@@ -385,18 +754,41 @@ export class OnboardingService {
}
}
- private async claimInstallAppsOnboardingStep({
+ async clearReversibleOnboardingStepHistoryAfterAppsInstalled({
userId,
workspaceId,
}: {
userId: string;
workspaceId: string;
- }): Promise<boolean> {
- const affectedRows = await this.userVarsService.delete({
+ }) {
+ await this.runStepTransitionInLockedTransaction(
+ { userId, workspaceId },
+ async (queryRunner) =>
+ this.clearReversibleOnboardingStepHistoryAfterIrreversibleStep(
+ { userId, workspaceId },
+ queryRunner,
+ ),
+ );
+ }
+
+ private async claimInstallAppsOnboardingStep(
+ {
userId,
workspaceId,
- key: OnboardingStepKeys.ONBOARDING_INSTALL_APPS_PENDING,
- });
+ }: {
+ userId: string;
+ workspaceId: string;
+ },
+ queryRunner?: QueryRunner,
+ ): Promise<boolean> {
+ const affectedRows = await this.userVarsService.delete(
+ {
+ userId,
+ workspaceId,
+ key: OnboardingStepKeys.ONBOARDING_INSTALL_APPS_PENDING,
+ },
+ queryRunner,
+ );
return isDefined(affectedRows) && affectedRows > 0;
}
@@ -429,9 +821,11 @@ export class OnboardingService {
async setOnboardingInviteTeamPending(
{
+ userId,
workspaceId,
value,
}: {
+ userId?: string;
workspaceId: string;
value: boolean;
},
@@ -440,6 +834,7 @@ export class OnboardingService {
if (!value) {
await this.userVarsService.delete(
{
+ userId,
workspaceId,
key: OnboardingStepKeys.ONBOARDING_INVITE_TEAM_PENDING,
},
@@ -451,6 +846,7 @@ export class OnboardingService {
await this.userVarsService.set(
{
+ userId,
workspaceId,
key: OnboardingStepKeys.ONBOARDING_INVITE_TEAM_PENDING,
value: true,
@@ -517,6 +913,72 @@ export class OnboardingService {
);
}
+ async completeOnboardingBookCallStep({
+ userId,
+ workspaceId,
+ hasBookedCall,
+ isAutoSkipped,
+ }: {
+ userId: string;
+ workspaceId: string;
+ hasBookedCall: boolean;
+ isAutoSkipped: boolean;
+ }) {
+ await this.runStepTransitionInLockedTransaction(
+ { userId, workspaceId },
+ async (queryRunner) => {
+ const hasClaimedBookCallStep = await this.claimOnboardingBookCallStep(
+ { userId, workspaceId },
+ queryRunner,
+ );
+
+ if (!hasClaimedBookCallStep || isAutoSkipped) {
+ return;
+ }
+
+ if (hasBookedCall) {
+ await this.clearReversibleOnboardingStepHistoryAfterIrreversibleStep(
+ { userId, workspaceId },
+ queryRunner,
+ );
+
+ return;
+ }
+
+ await this.pushReversibleOnboardingStep(
+ {
+ userId,
+ workspaceId,
+ step: OnboardingStatus.BOOK_CALL,
+ },
+ queryRunner,
+ );
+ },
+ );
+ }
+
+ private async claimOnboardingBookCallStep(
+ {
+ userId,
+ workspaceId,
+ }: {
+ userId: string;
+ workspaceId: string;
+ },
+ queryRunner?: QueryRunner,
+ ): Promise<boolean> {
+ const affectedRows = await this.userVarsService.delete(
+ {
+ userId,
+ workspaceId,
+ key: OnboardingStepKeys.ONBOARDING_BOOK_CALL_PENDING,
+ },
+ queryRunner,
+ );
+
+ return isDefined(affectedRows) && affectedRows > 0;
+ }
+
async setOnboardingBookCallPendingIfQualified({
userId,
workspaceId,
@@ -642,10 +1104,112 @@ export class OnboardingService {
return;
}
- await this.setOnboardingCreateProfilePending({
+ await this.runStepTransitionInLockedTransaction(
+ { userId, workspaceId },
+ async (queryRunner) => {
+ const hasClaimedCreateProfileStep =
+ await this.claimOnboardingCreateProfileStep(
+ { userId, workspaceId },
+ queryRunner,
+ );
+
+ if (!hasClaimedCreateProfileStep) {
+ return;
+ }
+
+ await this.pushReversibleOnboardingStep(
+ {
+ userId,
+ workspaceId,
+ step: OnboardingStatus.PROFILE_CREATION,
+ },
+ queryRunner,
+ );
+ },
+ );
+ }
+
+ private async claimOnboardingCreateProfileStep(
+ {
userId,
workspaceId,
- value: false,
- });
+ }: {
+ userId: string;
+ workspaceId: string;
+ },
+ queryRunner?: QueryRunner,
+ ): Promise<boolean> {
+ const affectedRows = await this.userVarsService.delete(
+ {
+ userId,
+ workspaceId,
+ key: OnboardingStepKeys.ONBOARDING_CREATE_PROFILE_PENDING,
+ },
+ queryRunner,
+ );
+
+ return isDefined(affectedRows) && affectedRows > 0;
+ }
+
+ async completeOnboardingInviteTeamStep({
+ userId,
+ workspaceId,
+ hasSentInvitations,
+ }: {
+ userId: string;
+ workspaceId: string;
+ hasSentInvitations: boolean;
+ }) {
+ await this.runStepTransitionInLockedTransaction(
+ { userId, workspaceId },
+ async (queryRunner) => {
+ const hasClaimedInviteTeamStep =
+ await this.claimOnboardingInviteTeamStep(
+ { workspaceId },
+ queryRunner,
+ );
+
+ if (!hasClaimedInviteTeamStep) {
+ return;
+ }
+
+ if (hasSentInvitations) {
+ await this.clearReversibleOnboardingStepHistoryAfterIrreversibleStep(
+ { userId, workspaceId },
+ queryRunner,
+ );
+
+ return;
+ }
+
+ await this.pushReversibleOnboardingStep(
+ {
+ userId,
+ workspaceId,
+ step: OnboardingStatus.INVITE_TEAM,
+ },
+ queryRunner,
+ );
+ },
+ );
+ }
+
+ private async claimOnboardingInviteTeamStep(
+ {
+ workspaceId,
+ }: {
+ workspaceId: string;
+ },
+ queryRunner?: QueryRunner,
+ ): Promise<boolean> {
+ const affectedRows = await this.userVarsService.delete(
+ {
+ workspaceId,
+ key: OnboardingStepKeys.ONBOARDING_INVITE_TEAM_PENDING,
+ },
+ queryRunner,
+ );
+
+ return isDefined(affectedRows) && affectedRows > 0;
}
}
diff --git a/packages/twenty-server/src/engine/core-modules/onboarding/types/reversible-onboarding-step.type.ts b/packages/twenty-server/src/engine/core-modules/onboarding/types/reversible-onboarding-step.type.ts
new file mode 100644
index 00000000000..8aba33c360c
--- /dev/null
+++ b/packages/twenty-server/src/engine/core-modules/onboarding/types/reversible-onboarding-step.type.ts
@@ -0,0 +1,8 @@
+import { OnboardingStatus } from 'src/engine/core-modules/onboarding/enums/onboarding-status.enum';
+
+export type ReversibleOnboardingStep =
+ | OnboardingStatus.SYNC_EMAIL
+ | OnboardingStatus.APPS_INSTALLATION
+ | OnboardingStatus.PROFILE_CREATION
+ | OnboardingStatus.INVITE_TEAM
+ | OnboardingStatus.BOOK_CALL;
diff --git a/packages/twenty-server/src/engine/core-modules/onboarding/utils/build-onboarding-step-transition-lock-name.util.ts b/packages/twenty-server/src/engine/core-modules/onboarding/utils/build-onboarding-step-transition-lock-name.util.ts
new file mode 100644
index 00000000000..6772832f607
--- /dev/null
+++ b/packages/twenty-server/src/engine/core-modules/onboarding/utils/build-onboarding-step-transition-lock-name.util.ts
@@ -0,0 +1,10 @@
+import { ONBOARDING_STEP_TRANSITION_LOCK_PREFIX } from 'src/engine/core-modules/onboarding/constants/onboarding-step-transition-lock-prefix';
+
+export const buildOnboardingStepTransitionLockName = ({
+ userId,
+ workspaceId,
+}: {
+ userId: string;
+ workspaceId: string;
+}): string =>
+ `${ONBOARDING_STEP_TRANSITION_LOCK_PREFIX}:${userId}:${workspaceId}`;
diff --git a/packages/twenty-server/src/engine/core-modules/user/constants/user-entity-non-cached-properties.constant.ts b/packages/twenty-server/src/engine/core-modules/user/constants/user-entity-non-cached-properties.constant.ts
index 5f3f039f284..13f5c290703 100644
--- a/packages/twenty-server/src/engine/core-modules/user/constants/user-entity-non-cached-properties.constant.ts
+++ b/packages/twenty-server/src/engine/core-modules/user/constants/user-entity-non-cached-properties.constant.ts
@@ -8,6 +8,7 @@ export const USER_ENTITY_NON_CACHED_PROPERTIES = [
'workspaceMember',
'userWorkspaces',
'onboardingStatus',
+ 'previousOnboardingStatus',
'currentWorkspace',
'currentUserWorkspace',
] as const satisfies ReadonlyArray<keyof UserEntity>;
diff --git a/packages/twenty-server/src/engine/core-modules/user/user.entity.ts b/packages/twenty-server/src/engine/core-modules/user/user.entity.ts
index 897fd2ac466..63a891cf796 100644
--- a/packages/twenty-server/src/engine/core-modules/user/user.entity.ts
+++ b/packages/twenty-server/src/engine/core-modules/user/user.entity.ts
@@ -115,6 +115,9 @@ export class UserEntity {
@Field(() => OnboardingStatus, { nullable: true })
onboardingStatus: OnboardingStatus;
+ @Field(() => OnboardingStatus, { nullable: true })
+ previousOnboardingStatus: OnboardingStatus;
+
@Field(() => WorkspaceEntity, { nullable: true })
currentWorkspace?: Relation<WorkspaceEntity>;
diff --git a/packages/twenty-server/src/engine/core-modules/user/user.resolver.ts b/packages/twenty-server/src/engine/core-modules/user/user.resolver.ts
index 9e1e15de062..b23fae86c88 100644
--- a/packages/twenty-server/src/engine/core-modules/user/user.resolver.ts
+++ b/packages/twenty-server/src/engine/core-modules/user/user.resolver.ts
@@ -575,7 +575,23 @@ export class UserResolver {
if (!workspace) return null;
return this.onboardingService.getOnboardingStatus({
- user,
+ userId: user.id,
+ workspaceId: workspace.id,
+ });
+ }
+
+ @ResolveField(() => OnboardingStatus, {
+ nullable: true,
+ })
+ async previousOnboardingStatus(
+ @Parent() user: UserEntity,
+ @AuthWorkspace({ allowUndefined: true })
+ workspace: WorkspaceEntity | undefined,
+ ): Promise<OnboardingStatus | null> {
+ if (!workspace) return null;
+
+ return this.onboardingService.getPreviousReversibleOnboardingStatus({
+ userId: user.id,
workspaceId: workspace.id,
});
}
diff --git a/packages/twenty-server/src/engine/core-modules/workspace-invitation/services/workspace-invitation.service.spec.ts b/packages/twenty-server/src/engine/core-modules/workspace-invitation/services/workspace-invitation.service.spec.ts
index ff482a2ffe4..28b514061b9 100644
--- a/packages/twenty-server/src/engine/core-modules/workspace-invitation/services/workspace-invitation.service.spec.ts
+++ b/packages/twenty-server/src/engine/core-modules/workspace-invitation/services/workspace-invitation.service.spec.ts
@@ -14,7 +14,10 @@ import { OnboardingService } from 'src/engine/core-modules/onboarding/onboarding
import { ThrottlerService } from 'src/engine/core-modules/throttler/throttler.service';
import { TwentyConfigService } from 'src/engine/core-modules/twenty-config/twenty-config.service';
import { UserWorkspaceEntity } from 'src/engine/core-modules/user-workspace/user-workspace.entity';
-import { WorkspaceInvitationException } from 'src/engine/core-modules/workspace-invitation/workspace-invitation.exception';
+import {
+ WorkspaceInvitationException,
+ WorkspaceInvitationExceptionCode,
+} from 'src/engine/core-modules/workspace-invitation/workspace-invitation.exception';
import { WorkspaceService } from 'src/engine/core-modules/workspace/services/workspace.service';
import { WorkspaceEntity } from 'src/engine/core-modules/workspace/workspace.entity';
import { RoleValidationService } from 'src/engine/metadata-modules/role-validation/services/role-validation.service';
@@ -93,7 +96,7 @@ describe('WorkspaceInvitationService', () => {
{
provide: OnboardingService,
useValue: {
- setOnboardingInviteTeamPending: jest.fn(),
+ completeOnboardingInviteTeamStep: jest.fn(),
isOnboardingInviteTeamPending: jest.fn().mockResolvedValue(false),
},
},
@@ -193,6 +196,7 @@ describe('WorkspaceInvitationService', () => {
displayName: 'Test Workspace',
} as WorkspaceEntity;
const sender = {
+ userId: 'sender-user-id',
userEmail: '[email protected]',
name: { firstName: 'Sender' },
locale: 'en',
@@ -208,7 +212,7 @@ describe('WorkspaceInvitationService', () => {
.mockReturnValue('http://localhost:3000');
jest.spyOn(emailService, 'send').mockResolvedValue({} as any);
jest
- .spyOn(onboardingService, 'setOnboardingInviteTeamPending')
+ .spyOn(onboardingService, 'completeOnboardingInviteTeamStep')
.mockResolvedValue({} as any);
const result = await service.sendInvitations(
@@ -221,10 +225,59 @@ describe('WorkspaceInvitationService', () => {
expect(result.result.length).toBe(2);
expect(emailService.send).toHaveBeenCalledTimes(2);
expect(
- onboardingService.setOnboardingInviteTeamPending,
+ onboardingService.completeOnboardingInviteTeamStep,
+ ).toHaveBeenCalledWith({
+ userId: sender.userId,
+ workspaceId: workspace.id,
+ hasSentInvitations: true,
+ });
+ });
+
+ it('should keep the invite-team step reversible when every invitation fails', async () => {
+ const emails = ['[email protected]', '[email protected]'];
+ const workspace = {
+ id: 'workspace-id',
+ inviteHash: 'invite-hash',
+ displayName: 'Test Workspace',
+ } as WorkspaceEntity;
+ const sender = {
+ userId: 'sender-user-id',
+ userEmail: '[email protected]',
+ name: { firstName: 'Sender' },
+ locale: 'en',
+ };
+
+ jest
+ .spyOn(service, 'createWorkspaceInvitation')
+ .mockRejectedValue(
+ new WorkspaceInvitationException(
+ 'Invitation already exists',
+ WorkspaceInvitationExceptionCode.INVITATION_ALREADY_EXIST,
+ ),
+ );
+ jest
+ .spyOn(twentyConfigService, 'get')
+ .mockReturnValue('http://localhost:3000');
+ jest.spyOn(emailService, 'send').mockResolvedValue({} as any);
+ jest
+ .spyOn(onboardingService, 'completeOnboardingInviteTeamStep')
+ .mockResolvedValue({} as any);
+
+ const result = await service.sendInvitations(
+ emails,
+ workspace,
+ sender as WorkspaceMemberWorkspaceEntity,
+ );
+
+ expect(result.success).toBe(false);
+ expect(result.result.length).toBe(0);
+ expect(emailService.send).not.toHaveBeenCalled();
+ expect(
+ onboardingService.completeOnboardingInviteTeamStep,
).toHaveBeenCalledWith({
+ userId: sender.userId,
workspaceId: workspace.id,
- value: false,
+ hasSentInvitations: false,
});
});
@@ -235,6 +288,7 @@ describe('WorkspaceInvitationService', () => {
displayName: 'Test Workspace',
} as WorkspaceEntity;
const sender = {
+ userId: 'sender-user-id',
userEmail: '[email protected]',
name: { firstName: 'Sender' },
locale: 'en',
@@ -280,6 +334,7 @@ describe('WorkspaceInvitationService', () => {
displayName: 'Test Workspace',
} as WorkspaceEntity;
const sender = {
+ userId: 'sender-user-id',
userEmail: '[email protected]',
name: { firstName: 'Sender' },
locale: 'en',
@@ -316,7 +371,10 @@ describe('WorkspaceInvitationService', () => {
);
expect(
onboardingService.isOnboardingInviteTeamPending,
- ).toHaveBeenCalledWith({ workspaceId: workspace.id });
+ ).toHaveBeenCalledWith({
+ userId: sender.userId,
+ workspaceId: workspace.id,
+ });
});
it('should downgrade to a regular invitation when billing is disabled', async () => {
@@ -374,6 +432,7 @@ describe('WorkspaceInvitationService', () => {
displayName: 'Test Workspace',
} as WorkspaceEntity;
const sender = {
+ userId: 'sender-user-id',
userEmail: '[email protected]',
name: { firstName: 'Sender' },
locale: 'en',
diff --git a/packages/twenty-server/src/engine/core-modules/workspace-invitation/services/workspace-invitation.service.ts b/packages/twenty-server/src/engine/core-modules/workspace-invitation/services/workspace-invitation.service.ts
index 7e32a5d4cb9..06f62b198e7 100644
--- a/packages/twenty-server/src/engine/core-modules/workspace-invitation/services/workspace-invitation.service.ts
+++ b/packages/twenty-server/src/engine/core-modules/workspace-invitation/services/workspace-invitation.service.ts
@@ -300,6 +300,7 @@ export class WorkspaceInvitationService {
this.twentyConfigService.get('IS_BILLING_ENABLED') &&
(isOnboardingInviteRewardOverride ??
(await this.onboardingService.isOnboardingInviteTeamPending({
+ userId: sender.userId,
workspaceId: workspace.id,
})));
@@ -395,9 +396,12 @@ export class WorkspaceInvitationService {
}
}
- await this.onboardingService.setOnboardingInviteTeamPending({
+ await this.onboardingService.completeOnboardingInviteTeamStep({
+ userId: sender.userId,
workspaceId: workspace.id,
- value: false,
+ hasSentInvitations: invitationResults.some(
+ (invitationResult) => invitationResult.status === 'fulfilled',
+ ),
});
const i18n = this.i18nService.getI18nInstance(sender.locale);