diff --git a/packages/twenty-client-sdk/src/metadata/generated/schema.graphql b/packages/twenty-client-sdk/src/metadata/generated/schema.graphql index 69e5ca36a2..165fcdf631 100644 --- a/packages/twenty-client-sdk/src/metadata/generated/schema.graphql +++ b/packages/twenty-client-sdk/src/metadata/generated/schema.graphql @@ -1617,6 +1617,11 @@ type BillingUpdate { billingSubscriptions: [BillingSubscription!]! } +type InviteSuggestion { + email: String! + displayName: String +} + type OnboardingStepSuccess { """Boolean that confirms query was dispatched""" success: Boolean! @@ -3004,6 +3009,8 @@ type Query { getViewFieldGroup(id: String!): ViewFieldGroup apiKeys: [ApiKey!]! apiKey(input: GetApiKeyInput!): ApiKey + getInviteSuggestions: [InviteSuggestion!]! + applicationConnectionProviders(applicationId: UUID!): [ApplicationConnectionProvider!]! billingPortalSession(returnUrlPath: String): BillingSession! listPlans: [BillingPlan!]! getResourceCreditUsage: [BillingResourceCreditUsage!]! @@ -3013,7 +3020,6 @@ type Query { getPageLayoutTab(id: String!): PageLayoutTab! getPageLayouts(objectMetadataId: String, pageLayoutType: PageLayoutType): [PageLayout!]! getPageLayout(id: String!): PageLayout - applicationConnectionProviders(applicationId: UUID!): [ApplicationConnectionProvider!]! getPageLayoutWidgets(pageLayoutTabId: String!): [PageLayoutWidget!]! getPageLayoutWidget(id: String!): PageLayoutWidget! findOneLogicFunction(input: LogicFunctionIdInput!): LogicFunction! @@ -3253,6 +3259,7 @@ type Mutation { assignRoleToApiKey(apiKeyId: UUID!, roleId: UUID!): Boolean! skipSyncEmailOnboardingStep: OnboardingStepSuccess! skipBookOnboardingStep: OnboardingStepSuccess! + updateOneApplicationVariable(key: String!, value: String!, applicationId: UUID!): Boolean! checkoutSession(recurringInterval: SubscriptionInterval!, plan: BillingPlanKey! = PRO, requirePaymentMethod: Boolean! = true, successUrlPath: String): BillingSession! switchSubscriptionInterval: BillingUpdate! switchBillingPlan: BillingUpdate! @@ -3277,7 +3284,6 @@ type Mutation { resetPageLayoutToDefault(id: String!): PageLayout! resetPageLayoutWidgetToDefault(id: String!): PageLayoutWidget! resetPageLayoutTabToDefault(id: String!): PageLayoutTab! - updateOneApplicationVariable(key: String!, value: String!, applicationId: UUID!): Boolean! createPageLayoutWidget(input: CreatePageLayoutWidgetInput!): PageLayoutWidget! updatePageLayoutWidget(id: String!, input: UpdatePageLayoutWidgetInput!): PageLayoutWidget! destroyPageLayoutWidget(id: String!): Boolean! diff --git a/packages/twenty-client-sdk/src/metadata/generated/schema.ts b/packages/twenty-client-sdk/src/metadata/generated/schema.ts index d74f5db993..1801d53bfe 100644 --- a/packages/twenty-client-sdk/src/metadata/generated/schema.ts +++ b/packages/twenty-client-sdk/src/metadata/generated/schema.ts @@ -1267,6 +1267,12 @@ export interface BillingUpdate { __typename: 'BillingUpdate' } +export interface InviteSuggestion { + email: Scalars['String'] + displayName?: Scalars['String'] + __typename: 'InviteSuggestion' +} + export interface OnboardingStepSuccess { /** Boolean that confirms query was dispatched */ success: Scalars['Boolean'] @@ -2631,6 +2637,8 @@ export interface Query { getViewFieldGroup?: ViewFieldGroup apiKeys: ApiKey[] apiKey?: ApiKey + getInviteSuggestions: InviteSuggestion[] + applicationConnectionProviders: ApplicationConnectionProvider[] billingPortalSession: BillingSession listPlans: BillingPlan[] getResourceCreditUsage: BillingResourceCreditUsage[] @@ -2640,7 +2648,6 @@ export interface Query { getPageLayoutTab: PageLayoutTab getPageLayouts: PageLayout[] getPageLayout?: PageLayout - applicationConnectionProviders: ApplicationConnectionProvider[] getPageLayoutWidgets: PageLayoutWidget[] getPageLayoutWidget: PageLayoutWidget findOneLogicFunction: LogicFunction @@ -2775,6 +2782,7 @@ export interface Mutation { assignRoleToApiKey: Scalars['Boolean'] skipSyncEmailOnboardingStep: OnboardingStepSuccess skipBookOnboardingStep: OnboardingStepSuccess + updateOneApplicationVariable: Scalars['Boolean'] checkoutSession: BillingSession switchSubscriptionInterval: BillingUpdate switchBillingPlan: BillingUpdate @@ -2799,7 +2807,6 @@ export interface Mutation { resetPageLayoutToDefault: PageLayout resetPageLayoutWidgetToDefault: PageLayoutWidget resetPageLayoutTabToDefault: PageLayoutTab - updateOneApplicationVariable: Scalars['Boolean'] createPageLayoutWidget: PageLayoutWidget updatePageLayoutWidget: PageLayoutWidget destroyPageLayoutWidget: Scalars['Boolean'] @@ -4280,6 +4287,13 @@ export interface BillingUpdateGenqlSelection{ __scalar?: boolean | number } +export interface InviteSuggestionGenqlSelection{ + email?: boolean | number + displayName?: boolean | number + __typename?: boolean | number + __scalar?: boolean | number +} + export interface OnboardingStepSuccessGenqlSelection{ /** Boolean that confirms query was dispatched */ success?: boolean | number @@ -5732,6 +5746,8 @@ export interface QueryGenqlSelection{ getViewFieldGroup?: (ViewFieldGroupGenqlSelection & { __args: {id: Scalars['String']} }) apiKeys?: ApiKeyGenqlSelection apiKey?: (ApiKeyGenqlSelection & { __args: {input: GetApiKeyInput} }) + getInviteSuggestions?: InviteSuggestionGenqlSelection + applicationConnectionProviders?: (ApplicationConnectionProviderGenqlSelection & { __args: {applicationId: Scalars['UUID']} }) billingPortalSession?: (BillingSessionGenqlSelection & { __args?: {returnUrlPath?: (Scalars['String'] | null)} }) listPlans?: BillingPlanGenqlSelection getResourceCreditUsage?: BillingResourceCreditUsageGenqlSelection @@ -5741,7 +5757,6 @@ export interface QueryGenqlSelection{ getPageLayoutTab?: (PageLayoutTabGenqlSelection & { __args: {id: Scalars['String']} }) getPageLayouts?: (PageLayoutGenqlSelection & { __args?: {objectMetadataId?: (Scalars['String'] | null), pageLayoutType?: (PageLayoutType | null)} }) getPageLayout?: (PageLayoutGenqlSelection & { __args: {id: Scalars['String']} }) - applicationConnectionProviders?: (ApplicationConnectionProviderGenqlSelection & { __args: {applicationId: Scalars['UUID']} }) getPageLayoutWidgets?: (PageLayoutWidgetGenqlSelection & { __args: {pageLayoutTabId: Scalars['String']} }) getPageLayoutWidget?: (PageLayoutWidgetGenqlSelection & { __args: {id: Scalars['String']} }) findOneLogicFunction?: (LogicFunctionGenqlSelection & { __args: {input: LogicFunctionIdInput} }) @@ -5919,6 +5934,7 @@ export interface MutationGenqlSelection{ assignRoleToApiKey?: { __args: {apiKeyId: Scalars['UUID'], roleId: Scalars['UUID']} } skipSyncEmailOnboardingStep?: OnboardingStepSuccessGenqlSelection skipBookOnboardingStep?: OnboardingStepSuccessGenqlSelection + 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)} }) switchSubscriptionInterval?: BillingUpdateGenqlSelection switchBillingPlan?: BillingUpdateGenqlSelection @@ -5943,7 +5959,6 @@ export interface MutationGenqlSelection{ resetPageLayoutToDefault?: (PageLayoutGenqlSelection & { __args: {id: Scalars['String']} }) resetPageLayoutWidgetToDefault?: (PageLayoutWidgetGenqlSelection & { __args: {id: Scalars['String']} }) resetPageLayoutTabToDefault?: (PageLayoutTabGenqlSelection & { __args: {id: Scalars['String']} }) - updateOneApplicationVariable?: { __args: {key: Scalars['String'], value: Scalars['String'], applicationId: Scalars['UUID']} } createPageLayoutWidget?: (PageLayoutWidgetGenqlSelection & { __args: {input: CreatePageLayoutWidgetInput} }) updatePageLayoutWidget?: (PageLayoutWidgetGenqlSelection & { __args: {id: Scalars['String'], input: UpdatePageLayoutWidgetInput} }) destroyPageLayoutWidget?: { __args: {id: Scalars['String']} } @@ -7267,6 +7282,14 @@ export interface LogicFunctionLogsInput {applicationId?: (Scalars['UUID'] | null + const InviteSuggestion_possibleTypes: string[] = ['InviteSuggestion'] + export const isInviteSuggestion = (obj?: { __typename?: any } | null): obj is InviteSuggestion => { + if (!obj?.__typename) throw new Error('__typename is missing in "isInviteSuggestion"') + return InviteSuggestion_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 5a8138972e..37c4461820 100644 --- a/packages/twenty-client-sdk/src/metadata/generated/types.ts +++ b/packages/twenty-client-sdk/src/metadata/generated/types.ts @@ -48,40 +48,40 @@ export default { 137, 139, 147, - 158, - 161, - 163, - 167, - 169, - 174, + 159, + 162, + 164, + 168, + 170, 175, - 182, - 185, - 188, - 201, - 216, - 228, - 267, - 269, + 176, + 183, + 186, + 189, + 202, + 217, + 229, + 268, 270, 271, 272, 273, 274, 275, - 282, - 320, + 276, + 283, 321, 322, 323, - 325, - 327, - 338, - 345, - 352, - 474, - 479, - 487 + 324, + 326, + 328, + 339, + 346, + 353, + 475, + 480, + 488 ], "types": { "BillingProductDTO": { @@ -961,10 +961,10 @@ export default { 3 ], "relation": [ - 200 + 201 ], "morphRelations": [ - 200 + 201 ], "object": [ 56 @@ -1026,7 +1026,7 @@ export default { 46 ], "objectMetadata": [ - 208, + 209, { "paging": [ 49, @@ -1039,7 +1039,7 @@ export default { } ], "indexFieldMetadatas": [ - 206, + 207, { "paging": [ 49, @@ -1293,7 +1293,7 @@ export default { 47 ], "fields": [ - 213, + 214, { "paging": [ 49, @@ -1306,7 +1306,7 @@ export default { } ], "indexMetadatas": [ - 211, + 212, { "paging": [ 49, @@ -1902,7 +1902,7 @@ export default { 59 ], "featureFlags": [ - 168 + 169 ], "billingSubscriptions": [ 146 @@ -1914,7 +1914,7 @@ export default { 146 ], "billingEntitlements": [ - 227 + 228 ], "hasValidSignedEnterpriseKey": [ 6 @@ -1923,7 +1923,7 @@ export default { 6 ], "workspaceUrls": [ - 170 + 171 ], "workspaceCustomApplicationId": [ 1 @@ -2012,7 +2012,7 @@ export default { 20 ], "deletedWorkspaceMembers": [ - 226 + 227 ], "hasPassword": [ 6 @@ -2024,7 +2024,7 @@ export default { 17 ], "availableWorkspaces": [ - 225 + 226 ], "__typename": [ 1 @@ -3178,6 +3178,17 @@ export default { 1 ] }, + "InviteSuggestion": { + "email": [ + 1 + ], + "displayName": [ + 1 + ], + "__typename": [ + 1 + ] + }, "OnboardingStepSuccess": { "success": [ 6 @@ -3211,7 +3222,7 @@ export default { 1 ], "result": [ - 154 + 155 ], "__typename": [ 1 @@ -3248,7 +3259,7 @@ export default { 3 ], "type": [ - 158 + 159 ], "name": [ 1 @@ -3281,7 +3292,7 @@ export default { 4 ], "targetRecordIdentifier": [ - 156 + 157 ], "__typename": [ 1 @@ -3307,7 +3318,7 @@ export default { }, "MetadataEvent": { "type": [ - 161 + 162 ], "metadataName": [ 1 @@ -3316,7 +3327,7 @@ export default { 1 ], "properties": [ - 159 + 160 ], "updatedCollectionHash": [ 1 @@ -3328,7 +3339,7 @@ export default { "MetadataEventAction": {}, "ObjectRecordEvent": { "action": [ - 163 + 164 ], "objectNameSingular": [ 1 @@ -3343,7 +3354,7 @@ export default { 1 ], "properties": [ - 159 + 160 ], "__typename": [ 1 @@ -3355,7 +3366,7 @@ export default { 1 ], "objectRecordEvent": [ - 162 + 163 ], "__typename": [ 1 @@ -3366,10 +3377,10 @@ export default { 1 ], "objectRecordEventsWithQueryIds": [ - 164 + 165 ], "metadataEvents": [ - 160 + 161 ], "__typename": [ 1 @@ -3386,7 +3397,7 @@ export default { 11 ], "status": [ - 167 + 168 ], "error": [ 15 @@ -3398,7 +3409,7 @@ export default { "LogicFunctionExecutionStatus": {}, "FeatureFlag": { "key": [ - 169 + 170 ], "value": [ 6 @@ -3470,10 +3481,10 @@ export default { 1 ], "type": [ - 174 + 175 ], "status": [ - 175 + 176 ], "issuer": [ 1 @@ -3486,7 +3497,7 @@ export default { "SSOIdentityProviderStatus": {}, "AuthProviders": { "sso": [ - 173 + 174 ], "google": [ 6 @@ -3523,10 +3534,10 @@ export default { 3 ], "authProviders": [ - 176 + 177 ], "authBypassProviders": [ - 177 + 178 ], "logo": [ 1 @@ -3535,7 +3546,7 @@ export default { 1 ], "workspaceUrls": [ - 170 + 171 ], "__typename": [ 1 @@ -3574,7 +3585,7 @@ export default { 1 ], "modelFamily": [ - 182 + 183 ], "modelFamilyLabel": [ 1 @@ -3589,7 +3600,7 @@ export default { 11 ], "nativeCapabilities": [ - 180 + 181 ], "isDeprecated": [ 6 @@ -3625,7 +3636,7 @@ export default { 1 ], "trialPeriods": [ - 172 + 173 ], "__typename": [ 1 @@ -3633,7 +3644,7 @@ export default { }, "Support": { "supportDriver": [ - 185 + 186 ], "supportFrontChatId": [ 1 @@ -3659,7 +3670,7 @@ export default { }, "Captcha": { "provider": [ - 188 + 189 ], "siteKey": [ 1 @@ -3693,10 +3704,10 @@ export default { }, "PublicFeatureFlag": { "key": [ - 169 + 170 ], "metadata": [ - 190 + 191 ], "__typename": [ 1 @@ -3721,13 +3732,13 @@ export default { 1 ], "authProviders": [ - 176 + 177 ], "billing": [ - 183 + 184 ], "aiModels": [ - 181 + 182 ], "signInPrefilled": [ 6 @@ -3748,25 +3759,25 @@ export default { 6 ], "support": [ - 184 + 185 ], "isAttachmentPreviewEnabled": [ 6 ], "sentry": [ - 186 - ], - "captcha": [ 187 ], + "captcha": [ + 188 + ], "api": [ - 189 + 190 ], "canManageFeatureFlags": [ 6 ], "publicFeatureFlags": [ - 191 + 192 ], "isMicrosoftMessagingEnabled": [ 6 @@ -3805,7 +3816,7 @@ export default { 6 ], "maintenance": [ - 192 + 193 ], "__typename": [ 1 @@ -3844,7 +3855,7 @@ export default { 1 ], "versionDistribution": [ - 195 + 196 ], "__typename": [ 1 @@ -3891,7 +3902,7 @@ export default { }, "Relation": { "type": [ - 201 + 202 ], "sourceObjectMetadata": [ 56 @@ -3940,10 +3951,10 @@ export default { }, "IndexConnection": { "pageInfo": [ - 203 + 204 ], "edges": [ - 202 + 203 ], "__typename": [ 1 @@ -3962,10 +3973,10 @@ export default { }, "IndexIndexFieldMetadatasConnection": { "pageInfo": [ - 203 + 204 ], "edges": [ - 205 + 206 ], "__typename": [ 1 @@ -3984,10 +3995,10 @@ export default { }, "IndexObjectMetadataConnection": { "pageInfo": [ - 203 + 204 ], "edges": [ - 207 + 208 ], "__typename": [ 1 @@ -4006,10 +4017,10 @@ export default { }, "ObjectConnection": { "pageInfo": [ - 203 + 204 ], "edges": [ - 207 + 208 ], "__typename": [ 1 @@ -4017,10 +4028,10 @@ export default { }, "ObjectIndexMetadatasConnection": { "pageInfo": [ - 203 + 204 ], "edges": [ - 202 + 203 ], "__typename": [ 1 @@ -4039,10 +4050,10 @@ export default { }, "ObjectFieldsConnection": { "pageInfo": [ - 203 + 204 ], "edges": [ - 212 + 213 ], "__typename": [ 1 @@ -4050,10 +4061,10 @@ export default { }, "FieldConnection": { "pageInfo": [ - 203 + 204 ], "edges": [ - 212 + 213 ], "__typename": [ 1 @@ -4061,7 +4072,7 @@ export default { }, "AppConnection": { "id": [ - 216 + 217 ], "providerName": [ 1 @@ -4113,7 +4124,7 @@ export default { 3 ], "type": [ - 174 + 175 ], "issuer": [ 1 @@ -4122,7 +4133,7 @@ export default { 1 ], "status": [ - 175 + 176 ], "__typename": [ 1 @@ -4141,7 +4152,7 @@ export default { }, "FindAvailableSSOIDP": { "type": [ - 174 + 175 ], "id": [ 3 @@ -4153,10 +4164,10 @@ export default { 1 ], "status": [ - 175 + 176 ], "workspace": [ - 220 + 221 ], "__typename": [ 1 @@ -4167,7 +4178,7 @@ export default { 3 ], "type": [ - 174 + 175 ], "issuer": [ 1 @@ -4176,7 +4187,7 @@ export default { 1 ], "status": [ - 175 + 176 ], "__typename": [ 1 @@ -4184,7 +4195,7 @@ export default { }, "SSOConnection": { "type": [ - 174 + 175 ], "id": [ 3 @@ -4196,7 +4207,7 @@ export default { 1 ], "status": [ - 175 + 176 ], "__typename": [ 1 @@ -4219,13 +4230,13 @@ export default { 1 ], "workspaceUrls": [ - 170 + 171 ], "logo": [ 1 ], "sso": [ - 223 + 224 ], "__typename": [ 1 @@ -4233,10 +4244,10 @@ export default { }, "AvailableWorkspaces": { "availableWorkspacesForSignIn": [ - 224 + 225 ], "availableWorkspacesForSignUp": [ - 224 + 225 ], "__typename": [ 1 @@ -4264,7 +4275,7 @@ export default { }, "BillingEntitlement": { "key": [ - 228 + 229 ], "value": [ 6 @@ -4302,7 +4313,7 @@ export default { 1 ], "records": [ - 229 + 230 ], "__typename": [ 1 @@ -4346,13 +4357,13 @@ export default { }, "PublicImapSmtpCaldavConnectionParameters": { "IMAP": [ - 233 + 234 ], "SMTP": [ - 233 + 234 ], "CALDAV": [ - 233 + 234 ], "__typename": [ 1 @@ -4408,7 +4419,7 @@ export default { 4 ], "connectionParameters": [ - 234 + 235 ], "__typename": [ 1 @@ -4459,10 +4470,10 @@ export default { }, "AvailableWorkspacesAndAccessTokens": { "tokens": [ - 240 + 241 ], "availableWorkspaces": [ - 225 + 226 ], "__typename": [ 1 @@ -4500,7 +4511,7 @@ export default { }, "WorkspaceUrlsAndId": { "workspaceUrls": [ - 170 + 171 ], "id": [ 3 @@ -4514,7 +4525,7 @@ export default { 32 ], "workspace": [ - 245 + 246 ], "__typename": [ 1 @@ -4547,7 +4558,7 @@ export default { 32 ], "workspaceUrls": [ - 170 + 171 ], "__typename": [ 1 @@ -4563,7 +4574,7 @@ export default { }, "AuthTokens": { "tokens": [ - 240 + 241 ], "__typename": [ 1 @@ -4604,7 +4615,7 @@ export default { 32 ], "workspace": [ - 245 + 246 ], "__typename": [ 1 @@ -4626,7 +4637,7 @@ export default { 1 ], "dailyUsage": [ - 256 + 257 ], "__typename": [ 1 @@ -4634,16 +4645,16 @@ export default { }, "UsageAnalytics": { "usageByUser": [ - 194 + 195 ], "usageByOperationType": [ - 194 + 195 ], "usageByModel": [ - 194 + 195 ], "timeSeries": [ - 256 + 257 ], "periodStart": [ 4 @@ -4652,7 +4663,7 @@ export default { 4 ], "userDailyUsage": [ - 257 + 258 ], "__typename": [ 1 @@ -4809,10 +4820,10 @@ export default { 1 ], "status": [ - 267 + 268 ], "verificationRecords": [ - 265 + 266 ], "verifiedAt": [ 4 @@ -4827,22 +4838,22 @@ export default { 3 ], "visibility": [ - 269 + 270 ], "handle": [ 1 ], "type": [ - 270 + 271 ], "isContactAutoCreationEnabled": [ 6 ], "contactAutoCreationPolicy": [ - 271 + 272 ], "messageFolderImportPolicy": [ - 272 + 273 ], "excludeNonProfessionalEmails": [ 6 @@ -4851,7 +4862,7 @@ export default { 6 ], "pendingGroupEmailsAction": [ - 273 + 274 ], "isSyncEnabled": [ 6 @@ -4860,10 +4871,10 @@ export default { 4 ], "syncStatus": [ - 274 + 275 ], "syncStage": [ - 275 + 276 ], "syncStageStartedAt": [ 4 @@ -4884,7 +4895,7 @@ export default { 4 ], "connectedAccount": [ - 235 + 236 ], "__typename": [ 1 @@ -4899,7 +4910,7 @@ export default { "MessageChannelSyncStage": {}, "CreateEmailGroupChannelOutput": { "messageChannel": [ - 268 + 269 ], "forwardingAddress": [ 1 @@ -4961,7 +4972,7 @@ export default { 21 ], "skipped": [ - 279 + 280 ], "__typename": [ 1 @@ -4984,7 +4995,7 @@ export default { 1 ], "visibility": [ - 282 + 283 ], "__typename": [ 1 @@ -5030,7 +5041,7 @@ export default { 1 ], "location": [ - 284 + 285 ], "__typename": [ 1 @@ -5055,13 +5066,13 @@ export default { }, "ImapSmtpCaldavPublicConnectionParameters": { "IMAP": [ - 286 + 287 ], "SMTP": [ - 286 + 287 ], "CALDAV": [ - 286 + 287 ], "__typename": [ 1 @@ -5081,7 +5092,7 @@ export default { 3 ], "connectionParameters": [ - 287 + 288 ], "__typename": [ 1 @@ -5283,7 +5294,7 @@ export default { 1 ], "series": [ - 295 + 296 ], "xAxisLabel": [ 1 @@ -5332,7 +5343,7 @@ export default { 1 ], "data": [ - 297 + 298 ], "__typename": [ 1 @@ -5340,7 +5351,7 @@ export default { }, "LineChartData": { "series": [ - 298 + 299 ], "xAxisLabel": [ 1 @@ -5377,7 +5388,7 @@ export default { }, "PieChartData": { "data": [ - 300 + 301 ], "showLegend": [ 6 @@ -5479,13 +5490,13 @@ export default { }, "EventLogQueryResult": { "records": [ - 305 + 306 ], "totalCount": [ 21 ], "pageInfo": [ - 306 + 307 ], "__typename": [ 1 @@ -5549,7 +5560,7 @@ export default { 1 ], "parts": [ - 292 + 293 ], "processedAt": [ 4 @@ -5563,7 +5574,7 @@ export default { }, "AgentChatThread": { "id": [ - 216 + 217 ], "title": [ 1 @@ -5618,7 +5629,7 @@ export default { }, "AiSystemPromptPreview": { "sections": [ - 311 + 312 ], "estimatedTokenCount": [ 21 @@ -5694,10 +5705,10 @@ export default { 3 ], "evaluations": [ - 316 + 317 ], "messages": [ - 309 + 310 ], "createdAt": [ 4 @@ -5728,19 +5739,19 @@ export default { 1 ], "syncStatus": [ - 320 - ], - "syncStage": [ 321 ], - "visibility": [ + "syncStage": [ 322 ], + "visibility": [ + 323 + ], "isContactAutoCreationEnabled": [ 6 ], "contactAutoCreationPolicy": [ - 323 + 324 ], "isSyncEnabled": [ 6 @@ -5791,7 +5802,7 @@ export default { 1 ], "pendingSyncAction": [ - 325 + 326 ], "messageChannelId": [ 3 @@ -5809,7 +5820,7 @@ export default { "MessageFolderPendingSyncAction": {}, "CollectionHash": { "collectionName": [ - 327 + 328 ], "hash": [ 1 @@ -5876,13 +5887,13 @@ export default { }, "MinimalMetadata": { "objectMetadataItems": [ - 328 - ], - "views": [ 329 ], + "views": [ + 330 + ], "collectionHashes": [ - 326 + 327 ], "__typename": [ 1 @@ -5890,10 +5901,10 @@ export default { }, "Query": { "navigationMenuItems": [ - 157 + 158 ], "navigationMenuItem": [ - 157, + 158, { "id": [ 3, @@ -6035,11 +6046,23 @@ export default { 2, { "input": [ - 332, + 333, "GetApiKeyInput!" ] } ], + "getInviteSuggestions": [ + 153 + ], + "applicationConnectionProviders": [ + 127, + { + "applicationId": [ + 3, + "UUID!" + ] + } + ], "billingPortalSession": [ 151, { @@ -6055,7 +6078,7 @@ export default { 149 ], "findWorkspaceInvitations": [ - 154 + 155 ], "getApprovedAccessDomains": [ 130 @@ -6098,15 +6121,6 @@ export default { ] } ], - "applicationConnectionProviders": [ - 127, - { - "applicationId": [ - 3, - "UUID!" - ] - } - ], "getPageLayoutWidgets": [ 85, { @@ -6129,7 +6143,7 @@ export default { 41, { "input": [ - 333, + 334, "LogicFunctionIdInput!" ] } @@ -6141,7 +6155,7 @@ export default { 15, { "input": [ - 333, + 334, "LogicFunctionIdInput!" ] } @@ -6150,7 +6164,7 @@ export default { 1, { "input": [ - 333, + 334, "LogicFunctionIdInput!" ] } @@ -6180,7 +6194,7 @@ export default { } ], "objectRecordCounts": [ - 209 + 210 ], "object": [ 56, @@ -6192,7 +6206,7 @@ export default { } ], "objects": [ - 210, + 211, { "paging": [ 49, @@ -6214,7 +6228,7 @@ export default { } ], "indexMetadatas": [ - 204, + 205, { "paging": [ 49, @@ -6233,28 +6247,28 @@ export default { 25, { "input": [ - 334, + 335, "AgentIdInput!" ] } ], "previewMessageCampaignAudience": [ - 277, + 278, { "input": [ - 335, + 336, "PreviewMessageCampaignAudienceInput!" ] } ], "unsubscribeTopics": [ - 281 + 282 ], "unsubscribePagePreviewUrl": [ 1 ], "myMessageChannels": [ - 268, + 269, { "connectedAccountId": [ 3 @@ -6262,16 +6276,16 @@ export default { } ], "getEmailingDomains": [ - 266 + 267 ], "myConnectedAccounts": [ - 235 + 236 ], "getRoles": [ 29 ], "getToolIndex": [ - 291 + 292 ], "getToolInputSchema": [ 15, @@ -6283,10 +6297,10 @@ export default { } ], "webhooks": [ - 290 + 291 ], "webhook": [ - 290, + 291, { "id": [ 3, @@ -6304,7 +6318,7 @@ export default { } ], "fields": [ - 214, + 215, { "paging": [ 49, @@ -6334,7 +6348,7 @@ export default { } ], "myMessageFolders": [ - 324, + 325, { "messageChannelId": [ 3 @@ -6342,7 +6356,7 @@ export default { } ], "myCalendarChannels": [ - 319, + 320, { "connectedAccountId": [ 3 @@ -6350,33 +6364,33 @@ export default { } ], "minimalMetadata": [ - 330 + 331 ], "appConnections": [ - 215, + 216, { "filter": [ - 336 + 337 ] } ], "appConnection": [ - 215, + 216, { "id": [ - 216, + 217, "ID!" ] } ], "findWorkspaceAiStats": [ - 318 + 319 ], "chatThreads": [ - 310 + 311 ], "chatThread": [ - 310, + 311, { "id": [ 3, @@ -6385,7 +6399,7 @@ export default { } ], "chatMessages": [ - 309, + 310, { "threadId": [ 3, @@ -6394,7 +6408,7 @@ export default { } ], "chatStreamCatchupChunks": [ - 313, + 314, { "threadId": [ 3, @@ -6403,13 +6417,13 @@ export default { } ], "getAiSystemPromptPreview": [ - 312 + 313 ], "skills": [ - 308 + 309 ], "skill": [ - 308, + 309, { "id": [ 3, @@ -6418,7 +6432,7 @@ export default { } ], "agentTurns": [ - 317, + 318, { "agentId": [ 3, @@ -6427,7 +6441,7 @@ export default { } ], "checkUserExists": [ - 253, + 254, { "email": [ 1, @@ -6439,7 +6453,7 @@ export default { } ], "checkWorkspaceInviteHashIsValid": [ - 254, + 255, { "inviteHash": [ 1, @@ -6457,7 +6471,7 @@ export default { } ], "validatePasswordResetToken": [ - 248, + 249, { "passwordResetToken": [ 1, @@ -6466,7 +6480,7 @@ export default { } ], "findApplicationRegistrationByClientId": [ - 198, + 199, { "clientId": [ 1, @@ -6496,7 +6510,7 @@ export default { } ], "findApplicationRegistrationStats": [ - 196, + 197, { "id": [ 1, @@ -6505,7 +6519,7 @@ export default { } ], "findApplicationRegistrationVariables": [ - 171, + 172, { "applicationRegistrationId": [ 1, @@ -6529,7 +6543,7 @@ export default { 76 ], "getPublicWorkspaceDataByDomain": [ - 178, + 179, { "origin": [ 1 @@ -6537,7 +6551,7 @@ export default { } ], "getPublicWorkspaceDataById": [ - 179, + 180, { "id": [ 3, @@ -6560,46 +6574,46 @@ export default { } ], "getSSOIdentityProviders": [ - 221 + 222 ], "eventLogs": [ - 307, + 308, { "input": [ - 337, + 338, "EventLogQueryInput!" ] } ], "pieChartData": [ - 301, + 302, { "input": [ - 341, + 342, "PieChartDataInput!" ] } ], "lineChartData": [ - 299, + 300, { "input": [ - 342, + 343, "LineChartDataInput!" ] } ], "barChartData": [ - 296, + 297, { "input": [ - 343, + 344, "BarChartDataInput!" ] } ], "getConnectedImapSmtpCaldavAccount": [ - 288, + 289, { "id": [ 3, @@ -6608,7 +6622,7 @@ export default { } ], "getAutoCompleteAddress": [ - 283, + 284, { "address": [ 1, @@ -6627,7 +6641,7 @@ export default { } ], "getAddressDetails": [ - 285, + 286, { "placeId": [ 1, @@ -6640,21 +6654,21 @@ export default { } ], "getUsageAnalytics": [ - 258, + 259, { "input": [ - 344 + 345 ] } ], "findManyPublicDomains": [ - 264 + 265 ], "findManyMarketplaceApps": [ - 262 + 263 ], "findMarketplaceAppDetail": [ - 263, + 264, { "universalIdentifier": [ 1, @@ -6676,7 +6690,7 @@ export default { }, "LogicFunctionIdInput": { "id": [ - 216 + 217 ], "__typename": [ 1 @@ -6717,10 +6731,10 @@ export default { }, "EventLogQueryInput": { "table": [ - 338 + 339 ], "filters": [ - 339 + 340 ], "first": [ 21 @@ -6741,7 +6755,7 @@ export default { 1 ], "dateRange": [ - 340 + 341 ], "recordId": [ 1 @@ -6808,7 +6822,7 @@ export default { 1 ], "operationTypes": [ - 345 + 346 ], "__typename": [ 1 @@ -6820,7 +6834,7 @@ export default { 6, { "input": [ - 347, + 348, "AddQuerySubscriptionInput!" ] } @@ -6829,49 +6843,49 @@ export default { 6, { "input": [ - 348, + 349, "RemoveQueryFromEventStreamInput!" ] } ], "createManyNavigationMenuItems": [ - 157, + 158, { "inputs": [ - 349, + 350, "[CreateNavigationMenuItemInput!]!" ] } ], "createNavigationMenuItem": [ - 157, + 158, { "input": [ - 349, + 350, "CreateNavigationMenuItemInput!" ] } ], "updateManyNavigationMenuItems": [ - 157, + 158, { "inputs": [ - 350, + 351, "[UpdateOneNavigationMenuItemInput!]!" ] } ], "updateNavigationMenuItem": [ - 157, + 158, { "input": [ - 350, + 351, "UpdateOneNavigationMenuItemInput!" ] } ], "deleteManyNavigationMenuItems": [ - 157, + 158, { "ids": [ 3, @@ -6880,7 +6894,7 @@ export default { } ], "deleteNavigationMenuItem": [ - 157, + 158, { "id": [ 3, @@ -6892,7 +6906,7 @@ export default { 131, { "file": [ - 352, + 353, "Upload!" ] } @@ -6913,7 +6927,7 @@ export default { 131, { "file": [ - 352, + 353, "Upload!" ] } @@ -6922,7 +6936,7 @@ export default { 131, { "file": [ - 352, + 353, "Upload!" ] } @@ -6931,7 +6945,7 @@ export default { 131, { "file": [ - 352, + 353, "Upload!" ] } @@ -6940,7 +6954,7 @@ export default { 131, { "file": [ - 352, + 353, "Upload!" ] } @@ -6949,7 +6963,7 @@ export default { 131, { "file": [ - 352, + 353, "Upload!" ], "fieldMetadataId": [ @@ -6962,7 +6976,7 @@ export default { 131, { "file": [ - 352, + 353, "Upload!" ], "fieldMetadataUniversalIdentifier": [ @@ -6975,7 +6989,7 @@ export default { 62, { "input": [ - 353, + 354, "CreateViewFilterGroupInput!" ] } @@ -6988,7 +7002,7 @@ export default { "String!" ], "input": [ - 354, + 355, "UpdateViewFilterGroupInput!" ] } @@ -7015,7 +7029,7 @@ export default { 64, { "input": [ - 355, + 356, "CreateViewFilterInput!" ] } @@ -7024,7 +7038,7 @@ export default { 64, { "input": [ - 356, + 357, "UpdateViewFilterInput!" ] } @@ -7033,7 +7047,7 @@ export default { 64, { "input": [ - 358, + 359, "DeleteViewFilterInput!" ] } @@ -7042,7 +7056,7 @@ export default { 64, { "input": [ - 359, + 360, "DestroyViewFilterInput!" ] } @@ -7051,7 +7065,7 @@ export default { 70, { "input": [ - 360, + 361, "CreateViewInput!" ] } @@ -7064,7 +7078,7 @@ export default { "String!" ], "input": [ - 361, + 362, "UpdateViewInput!" ] } @@ -7091,7 +7105,7 @@ export default { 70, { "input": [ - 362, + 363, "UpsertViewWidgetInput!" ] } @@ -7100,7 +7114,7 @@ export default { 67, { "input": [ - 367, + 368, "CreateViewSortInput!" ] } @@ -7109,7 +7123,7 @@ export default { 67, { "input": [ - 368, + 369, "UpdateViewSortInput!" ] } @@ -7118,7 +7132,7 @@ export default { 6, { "input": [ - 370, + 371, "DeleteViewSortInput!" ] } @@ -7127,7 +7141,7 @@ export default { 6, { "input": [ - 371, + 372, "DestroyViewSortInput!" ] } @@ -7136,7 +7150,7 @@ export default { 60, { "input": [ - 372, + 373, "UpdateViewFieldInput!" ] } @@ -7145,7 +7159,7 @@ export default { 60, { "input": [ - 374, + 375, "CreateViewFieldInput!" ] } @@ -7154,7 +7168,7 @@ export default { 60, { "inputs": [ - 374, + 375, "[CreateViewFieldInput!]!" ] } @@ -7163,7 +7177,7 @@ export default { 60, { "input": [ - 375, + 376, "DeleteViewFieldInput!" ] } @@ -7172,7 +7186,7 @@ export default { 60, { "input": [ - 376, + 377, "DestroyViewFieldInput!" ] } @@ -7181,7 +7195,7 @@ export default { 69, { "input": [ - 377, + 378, "UpdateViewFieldGroupInput!" ] } @@ -7190,7 +7204,7 @@ export default { 69, { "input": [ - 379, + 380, "CreateViewFieldGroupInput!" ] } @@ -7199,7 +7213,7 @@ export default { 69, { "inputs": [ - 379, + 380, "[CreateViewFieldGroupInput!]!" ] } @@ -7208,7 +7222,7 @@ export default { 69, { "input": [ - 380, + 381, "DeleteViewFieldGroupInput!" ] } @@ -7217,7 +7231,7 @@ export default { 69, { "input": [ - 381, + 382, "DestroyViewFieldGroupInput!" ] } @@ -7226,7 +7240,7 @@ export default { 70, { "input": [ - 382, + 383, "UpsertFieldsWidgetInput!" ] } @@ -7235,7 +7249,7 @@ export default { 2, { "input": [ - 385, + 386, "CreateApiKeyInput!" ] } @@ -7244,7 +7258,7 @@ export default { 2, { "input": [ - 386, + 387, "UpdateApiKeyInput!" ] } @@ -7253,7 +7267,7 @@ export default { 2, { "input": [ - 387, + 388, "RevokeApiKeyInput!" ] } @@ -7272,10 +7286,27 @@ export default { } ], "skipSyncEmailOnboardingStep": [ - 153 + 154 ], "skipBookOnboardingStep": [ - 153 + 154 + ], + "updateOneApplicationVariable": [ + 6, + { + "key": [ + 1, + "String!" + ], + "value": [ + 1, + "String!" + ], + "applicationId": [ + 3, + "UUID!" + ] + } ], "checkoutSession": [ 151, @@ -7334,7 +7365,7 @@ export default { } ], "resendWorkspaceInvitation": [ - 155, + 156, { "appTokenId": [ 1, @@ -7343,7 +7374,7 @@ export default { } ], "sendInvitations": [ - 155, + 156, { "emails": [ 1, @@ -7358,7 +7389,7 @@ export default { 130, { "input": [ - 388, + 389, "CreateApprovedAccessDomainInput!" ] } @@ -7367,7 +7398,7 @@ export default { 6, { "input": [ - 389, + 390, "DeleteApprovedAccessDomainInput!" ] } @@ -7376,7 +7407,7 @@ export default { 130, { "input": [ - 390, + 391, "ValidateApprovedAccessDomainInput!" ] } @@ -7385,7 +7416,7 @@ export default { 123, { "input": [ - 391, + 392, "CreatePageLayoutTabInput!" ] } @@ -7398,7 +7429,7 @@ export default { "String!" ], "input": [ - 392, + 393, "UpdatePageLayoutTabInput!" ] } @@ -7416,7 +7447,7 @@ export default { 124, { "input": [ - 393, + 394, "CreatePageLayoutInput!" ] } @@ -7429,7 +7460,7 @@ export default { "String!" ], "input": [ - 394, + 395, "UpdatePageLayoutInput!" ] } @@ -7451,7 +7482,7 @@ export default { "String!" ], "input": [ - 395, + 396, "UpdatePageLayoutWithTabsInput!" ] } @@ -7483,28 +7514,11 @@ export default { ] } ], - "updateOneApplicationVariable": [ - 6, - { - "key": [ - 1, - "String!" - ], - "value": [ - 1, - "String!" - ], - "applicationId": [ - 3, - "UUID!" - ] - } - ], "createPageLayoutWidget": [ 85, { "input": [ - 399, + 400, "CreatePageLayoutWidgetInput!" ] } @@ -7517,7 +7531,7 @@ export default { "String!" ], "input": [ - 400, + 401, "UpdatePageLayoutWidgetInput!" ] } @@ -7535,7 +7549,7 @@ export default { 41, { "input": [ - 333, + 334, "LogicFunctionIdInput!" ] } @@ -7544,16 +7558,16 @@ export default { 41, { "input": [ - 401, + 402, "CreateLogicFunctionFromSourceInput!" ] } ], "executeOneLogicFunction": [ - 166, + 167, { "input": [ - 402, + 403, "ExecuteOneLogicFunctionInput!" ] } @@ -7562,7 +7576,7 @@ export default { 6, { "input": [ - 403, + 404, "UpdateLogicFunctionFromSourceInput!" ] } @@ -7571,7 +7585,7 @@ export default { 35, { "input": [ - 405, + 406, "CreateCommandMenuItemInput!" ] } @@ -7580,7 +7594,7 @@ export default { 35, { "input": [ - 406, + 407, "UpdateCommandMenuItemInput!" ] } @@ -7607,7 +7621,7 @@ export default { 34, { "input": [ - 407, + 408, "CreateFrontComponentInput!" ] } @@ -7616,7 +7630,7 @@ export default { 34, { "input": [ - 408, + 409, "UpdateFrontComponentInput!" ] } @@ -7634,7 +7648,7 @@ export default { 56, { "input": [ - 410, + 411, "CreateOneObjectInput!" ] } @@ -7643,7 +7657,7 @@ export default { 56, { "input": [ - 412, + 413, "DeleteOneObjectInput!" ] } @@ -7652,7 +7666,7 @@ export default { 56, { "input": [ - 413, + 414, "UpdateOneObjectInput!" ] } @@ -7661,7 +7675,7 @@ export default { 47, { "input": [ - 415, + 416, "CreateOneIndexInput!" ] } @@ -7670,7 +7684,7 @@ export default { 47, { "input": [ - 418, + 419, "DeleteOneIndexInput!" ] } @@ -7679,7 +7693,7 @@ export default { 25, { "input": [ - 419, + 420, "CreateAgentInput!" ] } @@ -7688,7 +7702,7 @@ export default { 25, { "input": [ - 420, + 421, "UpdateAgentInput!" ] } @@ -7697,43 +7711,43 @@ export default { 25, { "input": [ - 334, + 335, "AgentIdInput!" ] } ], "sendEmailViaEmailingDomain": [ - 278, + 279, { "input": [ - 421, + 422, "SendEmailViaDomainInput!" ] } ], "sendMessageCampaign": [ - 280, + 281, { "input": [ - 422, + 423, "SendMessageCampaignInput!" ] } ], "createUnsubscribeTopic": [ - 281, + 282, { "input": [ - 423, + 424, "CreateUnsubscribeTopicInput!" ] } ], "updateUnsubscribeTopic": [ - 281, + 282, { "input": [ - 424, + 425, "UpdateUnsubscribeTopicInput!" ] } @@ -7748,25 +7762,25 @@ export default { } ], "updateMessageChannel": [ - 268, + 269, { "input": [ - 425, + 426, "UpdateMessageChannelInput!" ] } ], "createEmailGroupChannel": [ - 276, + 277, { "input": [ - 427, + 428, "CreateEmailGroupChannelInput!" ] } ], "deleteEmailGroupChannel": [ - 268, + 269, { "id": [ 3, @@ -7775,10 +7789,10 @@ export default { } ], "createEmailingDomain": [ - 266, + 267, { "input": [ - 428, + 429, "CreateEmailingDomainInput!" ] } @@ -7793,7 +7807,7 @@ export default { } ], "verifyEmailingDomain": [ - 266, + 267, { "id": [ 1, @@ -7802,7 +7816,7 @@ export default { } ], "deleteConnectedAccount": [ - 235, + 236, { "id": [ 3, @@ -7827,7 +7841,7 @@ export default { 29, { "createRoleInput": [ - 429, + 430, "CreateRoleInput!" ] } @@ -7836,7 +7850,7 @@ export default { 29, { "updateRoleInput": [ - 430, + 431, "UpdateRoleInput!" ] } @@ -7854,7 +7868,7 @@ export default { 16, { "upsertObjectPermissionsInput": [ - 432, + 433, "UpsertObjectPermissionsInput!" ] } @@ -7863,7 +7877,7 @@ export default { 27, { "upsertPermissionFlagsInput": [ - 434, + 435, "UpsertPermissionFlagsInput!" ] } @@ -7872,16 +7886,16 @@ export default { 26, { "upsertFieldPermissionsInput": [ - 435, + 436, "UpsertFieldPermissionsInput!" ] } ], "upsertRowLevelPermissionPredicates": [ - 231, + 232, { "input": [ - 437, + 438, "UpsertRowLevelPermissionPredicatesInput!" ] } @@ -7909,34 +7923,34 @@ export default { } ], "runAgent": [ - 293, + 294, { "input": [ - 440, + 441, "RunAgentInput!" ] } ], "createWebhook": [ - 290, + 291, { "input": [ - 441, + 442, "CreateWebhookInput!" ] } ], "updateWebhook": [ - 290, + 291, { "input": [ - 442, + 443, "UpdateWebhookInput!" ] } ], "deleteWebhook": [ - 290, + 291, { "id": [ 3, @@ -7948,7 +7962,7 @@ export default { 44, { "input": [ - 444, + 445, "CreateOneFieldMetadataInput!" ] } @@ -7957,7 +7971,7 @@ export default { 44, { "input": [ - 446, + 447, "UpdateOneFieldMetadataInput!" ] } @@ -7966,7 +7980,7 @@ export default { 44, { "input": [ - 448, + 449, "DeleteOneFieldInput!" ] } @@ -7975,7 +7989,7 @@ export default { 66, { "input": [ - 449, + 450, "CreateViewGroupInput!" ] } @@ -7984,7 +7998,7 @@ export default { 66, { "inputs": [ - 449, + 450, "[CreateViewGroupInput!]!" ] } @@ -7993,7 +8007,7 @@ export default { 66, { "input": [ - 450, + 451, "UpdateViewGroupInput!" ] } @@ -8002,7 +8016,7 @@ export default { 66, { "inputs": [ - 450, + 451, "[UpdateViewGroupInput!]!" ] } @@ -8011,7 +8025,7 @@ export default { 66, { "input": [ - 452, + 453, "DeleteViewGroupInput!" ] } @@ -8020,43 +8034,43 @@ export default { 66, { "input": [ - 453, + 454, "DestroyViewGroupInput!" ] } ], "updateMessageFolder": [ - 324, + 325, { "input": [ - 454, + 455, "UpdateMessageFolderInput!" ] } ], "updateMessageFolders": [ - 324, + 325, { "input": [ - 456, + 457, "UpdateMessageFoldersInput!" ] } ], "updateCalendarChannel": [ - 319, + 320, { "input": [ - 457, + 458, "UpdateCalendarChannelInput!" ] } ], "createChatThread": [ - 310 + 311 ], "sendChatMessage": [ - 314, + 315, { "threadId": [ 3, @@ -8077,7 +8091,7 @@ export default { 1 ], "fileAttachments": [ - 459, + 460, "[FileAttachmentInput!]" ] } @@ -8092,7 +8106,7 @@ export default { } ], "renameChatThread": [ - 310, + 311, { "id": [ 3, @@ -8105,7 +8119,7 @@ export default { } ], "archiveChatThread": [ - 310, + 311, { "id": [ 3, @@ -8114,7 +8128,7 @@ export default { } ], "unarchiveChatThread": [ - 310, + 311, { "id": [ 3, @@ -8141,25 +8155,25 @@ export default { } ], "createSkill": [ - 308, + 309, { "input": [ - 460, + 461, "CreateSkillInput!" ] } ], "updateSkill": [ - 308, + 309, { "input": [ - 461, + 462, "UpdateSkillInput!" ] } ], "deleteSkill": [ - 308, + 309, { "id": [ 3, @@ -8168,7 +8182,7 @@ export default { } ], "activateSkill": [ - 308, + 309, { "id": [ 3, @@ -8177,7 +8191,7 @@ export default { } ], "deactivateSkill": [ - 308, + 309, { "id": [ 3, @@ -8186,7 +8200,7 @@ export default { } ], "evaluateAgentTurn": [ - 316, + 317, { "turnId": [ 3, @@ -8195,7 +8209,7 @@ export default { } ], "runEvaluationInput": [ - 317, + 318, { "agentId": [ 3, @@ -8208,16 +8222,16 @@ export default { } ], "getAuthorizationUrlForSSO": [ - 243, + 244, { "input": [ - 462, + 463, "GetAuthorizationUrlForSSOInput!" ] } ], "getLoginTokenFromCredentials": [ - 252, + 253, { "email": [ 1, @@ -8243,7 +8257,7 @@ export default { } ], "signIn": [ - 241, + 242, { "email": [ 1, @@ -8265,7 +8279,7 @@ export default { } ], "verifyEmailAndGetLoginToken": [ - 249, + 250, { "emailVerificationToken": [ 1, @@ -8285,7 +8299,7 @@ export default { } ], "verifyEmailAndGetWorkspaceAgnosticToken": [ - 241, + 242, { "emailVerificationToken": [ 1, @@ -8301,7 +8315,7 @@ export default { } ], "getAuthTokensFromOTP": [ - 251, + 252, { "otp": [ 1, @@ -8321,7 +8335,7 @@ export default { } ], "signUp": [ - 241, + 242, { "email": [ 1, @@ -8343,7 +8357,7 @@ export default { } ], "signUpInWorkspace": [ - 246, + 247, { "email": [ 1, @@ -8374,13 +8388,13 @@ export default { } ], "signUpInNewWorkspace": [ - 246 - ], - "generateTransientToken": [ 247 ], + "generateTransientToken": [ + 248 + ], "getAuthTokensFromLoginToken": [ - 251, + 252, { "loginToken": [ 1, @@ -8393,7 +8407,7 @@ export default { } ], "authorizeApp": [ - 239, + 240, { "clientId": [ 1, @@ -8415,7 +8429,7 @@ export default { } ], "renewToken": [ - 251, + 252, { "appToken": [ 1, @@ -8424,7 +8438,7 @@ export default { } ], "generateApiKeyToken": [ - 250, + 251, { "apiKeyId": [ 3, @@ -8440,7 +8454,7 @@ export default { 32 ], "emailPasswordResetLink": [ - 242, + 243, { "email": [ 1, @@ -8452,7 +8466,7 @@ export default { } ], "updatePasswordViaResetToken": [ - 244, + 245, { "passwordResetToken": [ 1, @@ -8465,10 +8479,10 @@ export default { } ], "createApplicationRegistration": [ - 197, + 198, { "input": [ - 463, + 464, "CreateApplicationRegistrationInput!" ] } @@ -8477,7 +8491,7 @@ export default { 7, { "input": [ - 464, + 465, "UpdateApplicationRegistrationInput!" ] } @@ -8492,7 +8506,7 @@ export default { } ], "rotateApplicationRegistrationClientSecret": [ - 199, + 200, { "id": [ 1, @@ -8504,7 +8518,7 @@ export default { 5, { "input": [ - 466, + 467, "CreateApplicationRegistrationVariableInput!" ] } @@ -8513,7 +8527,7 @@ export default { 5, { "input": [ - 467, + 468, "UpdateApplicationRegistrationVariableInput!" ] } @@ -8531,7 +8545,7 @@ export default { 7, { "file": [ - 352, + 353, "Upload!" ], "universalIdentifier": [ @@ -8553,7 +8567,7 @@ export default { } ], "initiateOTPProvisioning": [ - 237, + 238, { "loginToken": [ 1, @@ -8566,10 +8580,10 @@ export default { } ], "initiateOTPProvisioningForAuthenticatedUser": [ - 237 + 238 ], "deleteTwoFactorAuthenticationMethod": [ - 236, + 237, { "twoFactorAuthenticationMethodId": [ 3, @@ -8578,7 +8592,7 @@ export default { } ], "verifyTwoFactorAuthenticationMethodForAuthenticatedUser": [ - 238, + 239, { "otp": [ 1, @@ -8602,7 +8616,7 @@ export default { 6, { "input": [ - 469, + 470, "UpdateWorkspaceMemberSettingsInput!" ] } @@ -8620,7 +8634,7 @@ export default { } ], "resendEmailVerificationToken": [ - 217, + 218, { "email": [ 1, @@ -8636,7 +8650,7 @@ export default { 76, { "data": [ - 470, + 471, "ActivateWorkspaceInput!" ] } @@ -8645,7 +8659,7 @@ export default { 76, { "data": [ - 471, + 472, "UpdateWorkspaceInput!" ] } @@ -8654,13 +8668,13 @@ export default { 76 ], "checkCustomDomainValidRecords": [ - 230 + 231 ], "runWorkspaceMigration": [ 6, { "workspaceMigration": [ - 472, + 473, "WorkspaceMigrationInput!" ] } @@ -8675,43 +8689,43 @@ export default { } ], "createOIDCIdentityProvider": [ - 222, + 223, { "input": [ - 475, + 476, "SetupOIDCSsoInput!" ] } ], "createSAMLIdentityProvider": [ - 222, + 223, { "input": [ - 476, + 477, "SetupSAMLSsoInput!" ] } ], "deleteSSOIdentityProvider": [ - 218, + 219, { "input": [ - 477, + 478, "DeleteSsoInput!" ] } ], "editSSOIdentityProvider": [ - 219, + 220, { "input": [ - 478, + 479, "EditSsoInput!" ] } ], "createObjectEvent": [ - 304, + 305, { "event": [ 1, @@ -8731,10 +8745,10 @@ export default { } ], "trackAnalytics": [ - 304, + 305, { "type": [ - 479, + 480, "AnalyticsType!" ], "name": [ @@ -8749,7 +8763,7 @@ export default { } ], "duplicateDashboard": [ - 302, + 303, { "id": [ 3, @@ -8758,7 +8772,7 @@ export default { } ], "impersonate": [ - 255, + 256, { "userId": [ 3, @@ -8771,16 +8785,16 @@ export default { } ], "sendEmail": [ - 303, + 304, { "input": [ - 480, + 481, "SendEmailInput!" ] } ], "startChannelSync": [ - 294, + 295, { "connectedAccountId": [ 3, @@ -8789,14 +8803,14 @@ export default { } ], "saveImapSmtpCaldavAccount": [ - 289, + 290, { "handle": [ 1, "String!" ], "connectionParameters": [ - 482, + 483, "EmailAccountConnectionParameters!" ], "id": [ @@ -8805,16 +8819,16 @@ export default { } ], "updateLabPublicFeatureFlag": [ - 168, + 169, { "input": [ - 484, + 485, "UpdateLabPublicFeatureFlagInput!" ] } ], "createPublicDomain": [ - 264, + 265, { "domain": [ 1, @@ -8826,7 +8840,7 @@ export default { } ], "updatePublicDomain": [ - 264, + 265, { "domain": [ 1, @@ -8847,7 +8861,7 @@ export default { } ], "checkPublicDomainValidRecords": [ - 230, + 231, { "domain": [ 1, @@ -8859,7 +8873,7 @@ export default { 78, { "input": [ - 485, + 486, "CreateOneAppTokenInput!" ] } @@ -8892,7 +8906,7 @@ export default { 6 ], "createDevelopmentApplication": [ - 259, + 260, { "universalIdentifier": [ 1, @@ -8914,7 +8928,7 @@ export default { } ], "syncApplication": [ - 260, + 261, { "manifest": [ 15, @@ -8926,10 +8940,10 @@ export default { } ], "uploadApplicationFile": [ - 261, + 262, { "file": [ - 352, + 353, "Upload!" ], "applicationUniversalIdentifier": [ @@ -8937,7 +8951,7 @@ export default { "String!" ], "fileFolder": [ - 487, + 488, "FileFolder!" ], "filePath": [ @@ -9014,7 +9028,7 @@ export default { 3 ], "type": [ - 158 + 159 ], "name": [ 1 @@ -9046,7 +9060,7 @@ export default { 3 ], "update": [ - 351 + 352 ], "__typename": [ 1 @@ -9156,7 +9170,7 @@ export default { 3 ], "update": [ - 357 + 358 ], "__typename": [ 1 @@ -9315,17 +9329,17 @@ export default { 3 ], "viewFields": [ - 363 - ], - "viewFilters": [ 364 ], - "viewFilterGroups": [ + "viewFilters": [ 365 ], - "viewSorts": [ + "viewFilterGroups": [ 366 ], + "viewSorts": [ + 367 + ], "__typename": [ 1 ] @@ -9435,7 +9449,7 @@ export default { 3 ], "update": [ - 369 + 370 ], "__typename": [ 1 @@ -9473,7 +9487,7 @@ export default { 3 ], "update": [ - 373 + 374 ], "__typename": [ 1 @@ -9549,7 +9563,7 @@ export default { 3 ], "update": [ - 378 + 379 ], "__typename": [ 1 @@ -9613,10 +9627,10 @@ export default { 3 ], "groups": [ - 383 + 384 ], "fields": [ - 384 + 385 ], "__typename": [ 1 @@ -9636,7 +9650,7 @@ export default { 6 ], "fields": [ - 384 + 385 ], "__typename": [ 1 @@ -9804,7 +9818,7 @@ export default { 3 ], "tabs": [ - 396 + 397 ], "__typename": [ 1 @@ -9827,7 +9841,7 @@ export default { 89 ], "widgets": [ - 397 + 398 ], "__typename": [ 1 @@ -9850,7 +9864,7 @@ export default { 3 ], "gridPosition": [ - 398 + 399 ], "position": [ 15 @@ -9899,7 +9913,7 @@ export default { 3 ], "gridPosition": [ - 398 + 399 ], "position": [ 15 @@ -9925,7 +9939,7 @@ export default { 3 ], "gridPosition": [ - 398 + 399 ], "position": [ 15 @@ -9997,7 +10011,7 @@ export default { 3 ], "update": [ - 404 + 405 ], "__typename": [ 1 @@ -10157,7 +10171,7 @@ export default { 3 ], "update": [ - 409 + 410 ], "__typename": [ 1 @@ -10176,7 +10190,7 @@ export default { }, "CreateOneObjectInput": { "object": [ - 411 + 412 ], "__typename": [ 1 @@ -10236,7 +10250,7 @@ export default { }, "UpdateOneObjectInput": { "update": [ - 414 + 415 ], "id": [ 3 @@ -10291,7 +10305,7 @@ export default { }, "CreateOneIndexInput": { "index": [ - 416 + 417 ], "__typename": [ 1 @@ -10302,7 +10316,7 @@ export default { 3 ], "fields": [ - 417 + 418 ], "indexType": [ 48 @@ -10463,7 +10477,7 @@ export default { 1 ], "visibility": [ - 282 + 283 ], "__typename": [ 1 @@ -10480,7 +10494,7 @@ export default { 1 ], "visibility": [ - 282 + 283 ], "__typename": [ 1 @@ -10491,7 +10505,7 @@ export default { 3 ], "update": [ - 426 + 427 ], "__typename": [ 1 @@ -10499,16 +10513,16 @@ export default { }, "UpdateMessageChannelInputUpdates": { "visibility": [ - 269 + 270 ], "isContactAutoCreationEnabled": [ 6 ], "contactAutoCreationPolicy": [ - 271 + 272 ], "messageFolderImportPolicy": [ - 272 + 273 ], "isSyncEnabled": [ 6 @@ -10585,7 +10599,7 @@ export default { }, "UpdateRoleInput": { "update": [ - 431 + 432 ], "id": [ 3 @@ -10640,7 +10654,7 @@ export default { 3 ], "objectPermissions": [ - 433 + 434 ], "__typename": [ 1 @@ -10682,7 +10696,7 @@ export default { 3 ], "fieldPermissions": [ - 436 + 437 ], "__typename": [ 1 @@ -10713,10 +10727,10 @@ export default { 3 ], "predicates": [ - 438 + 439 ], "predicateGroups": [ - 439 + 440 ], "__typename": [ 1 @@ -10810,7 +10824,7 @@ export default { 3 ], "update": [ - 443 + 444 ], "__typename": [ 1 @@ -10835,7 +10849,7 @@ export default { }, "CreateOneFieldMetadataInput": { "field": [ - 445 + 446 ], "__typename": [ 1 @@ -10911,7 +10925,7 @@ export default { 3 ], "update": [ - 447 + 448 ], "__typename": [ 1 @@ -11006,7 +11020,7 @@ export default { 3 ], "update": [ - 451 + 452 ], "__typename": [ 1 @@ -11050,7 +11064,7 @@ export default { 3 ], "update": [ - 455 + 456 ], "__typename": [ 1 @@ -11069,7 +11083,7 @@ export default { 3 ], "update": [ - 455 + 456 ], "__typename": [ 1 @@ -11080,7 +11094,7 @@ export default { 3 ], "update": [ - 458 + 459 ], "__typename": [ 1 @@ -11088,13 +11102,13 @@ export default { }, "UpdateCalendarChannelInputUpdates": { "visibility": [ - 322 + 323 ], "isContactAutoCreationEnabled": [ 6 ], "contactAutoCreationPolicy": [ - 323 + 324 ], "isSyncEnabled": [ 6 @@ -11196,7 +11210,7 @@ export default { 1 ], "update": [ - 465 + 466 ], "__typename": [ 1 @@ -11244,7 +11258,7 @@ export default { 1 ], "update": [ - 468 + 469 ], "__typename": [ 1 @@ -11362,7 +11376,7 @@ export default { }, "WorkspaceMigrationInput": { "actions": [ - 473 + 474 ], "__typename": [ 1 @@ -11370,10 +11384,10 @@ export default { }, "WorkspaceMigrationDeleteActionInput": { "type": [ - 474 + 475 ], "metadataName": [ - 327 + 328 ], "universalIdentifier": [ 1 @@ -11436,7 +11450,7 @@ export default { 3 ], "status": [ - 175 + 176 ], "__typename": [ 1 @@ -11466,7 +11480,7 @@ export default { 1 ], "files": [ - 481 + 482 ], "__typename": [ 1 @@ -11485,13 +11499,13 @@ export default { }, "EmailAccountConnectionParameters": { "IMAP": [ - 483 + 484 ], "SMTP": [ - 483 + 484 ], "CALDAV": [ - 483 + 484 ], "__typename": [ 1 @@ -11530,7 +11544,7 @@ export default { }, "CreateOneAppTokenInput": { "appToken": [ - 486 + 487 ], "__typename": [ 1 @@ -11547,7 +11561,7 @@ export default { "FileFolder": {}, "Subscription": { "onEventSubscription": [ - 165, + 166, { "eventStreamId": [ 1, @@ -11556,16 +11570,16 @@ export default { } ], "logicFunctionLogs": [ - 232, + 233, { "input": [ - 489, + 490, "LogicFunctionLogsInput!" ] } ], "onAgentChatEvent": [ - 315, + 316, { "threadId": [ 3, @@ -11574,10 +11588,10 @@ export default { } ], "eventLogsLive": [ - 305, + 306, { "table": [ - 338, + 339, "EventLogTable!" ] } diff --git a/packages/twenty-front/src/generated-metadata/graphql.ts b/packages/twenty-front/src/generated-metadata/graphql.ts index d876fbeb76..999fa66196 100644 --- a/packages/twenty-front/src/generated-metadata/graphql.ts +++ b/packages/twenty-front/src/generated-metadata/graphql.ts @@ -2107,6 +2107,12 @@ export type InvalidatePassword = { success: Scalars['Boolean']['output']; }; +export type InviteSuggestion = { + __typename?: 'InviteSuggestion'; + displayName?: Maybe; + email: Scalars['String']['output']; +}; + export type LineChartConfiguration = { __typename?: 'LineChartConfiguration'; aggregateFieldMetadataId: Scalars['UUID']['output']; @@ -4266,6 +4272,7 @@ export type Query = { getAvailablePackages: Scalars['JSON']['output']; getConnectedImapSmtpCaldavAccount: ConnectedImapSmtpCaldavAccount; getEmailingDomains: Array; + getInviteSuggestions: Array; getLogicFunctionSourceCode?: Maybe; getPageLayout?: Maybe; getPageLayoutTab: PageLayoutTab; @@ -7135,6 +7142,11 @@ export type SkipSyncEmailOnboardingStepMutationVariables = Exact<{ [key: string] export type SkipSyncEmailOnboardingStepMutation = { __typename?: 'Mutation', skipSyncEmailOnboardingStep: { __typename?: 'OnboardingStepSuccess', success: boolean } }; +export type GetInviteSuggestionsQueryVariables = Exact<{ [key: string]: never; }>; + + +export type GetInviteSuggestionsQuery = { __typename?: 'Query', getInviteSuggestions: Array<{ __typename?: 'InviteSuggestion', email: string, displayName?: string | null }> }; + export type PageLayoutWidgetFragmentFragment = { __typename?: 'PageLayoutWidget', id: string, applicationId: string, title: string, type: WidgetType, objectMetadataId?: string | null, createdAt: string, updatedAt: string, isActive: boolean, deletedAt?: string | null, conditionalDisplay?: any | null, conditionalAvailabilityExpression?: string | null, pageLayoutTabId: string, gridPosition: { __typename?: 'GridPosition', column: number, columnSpan: number, row: number, rowSpan: number }, position?: | { __typename?: 'PageLayoutWidgetCanvasPosition', layoutMode: PageLayoutTabLayoutMode } | { __typename?: 'PageLayoutWidgetGridPosition', layoutMode: PageLayoutTabLayoutMode, row: number, column: number, rowSpan: number, columnSpan: number } @@ -8673,6 +8685,7 @@ export const ObjectMetadataItemsDocument = {"kind":"Document","definitions":[{"k 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; export const SkipBookOnboardingStepDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"SkipBookOnboardingStep"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"skipBookOnboardingStep"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"success"}}]}}]}}]} as unknown as DocumentNode; 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; +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; 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":"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":"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":"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":"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":"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":"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":"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; 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":"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":"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":"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":"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":"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":"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":"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":"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":"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; export const ResetPageLayoutWidgetToDefaultDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"ResetPageLayoutWidgetToDefault"},"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":"resetPageLayoutWidgetToDefault"},"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":"PageLayoutWidgetFragment"}}]}}]}},{"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":"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":"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":"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":"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":"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":"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"}}]}}]} as unknown as DocumentNode; diff --git a/packages/twenty-front/src/modules/onboarding/graphql/queries/getInviteSuggestions.ts b/packages/twenty-front/src/modules/onboarding/graphql/queries/getInviteSuggestions.ts new file mode 100644 index 0000000000..8e0e518d80 --- /dev/null +++ b/packages/twenty-front/src/modules/onboarding/graphql/queries/getInviteSuggestions.ts @@ -0,0 +1,10 @@ +import { gql } from '@apollo/client'; + +export const GET_INVITE_SUGGESTIONS = gql` + query GetInviteSuggestions { + getInviteSuggestions { + email + displayName + } + } +`; 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 9e660ef5fc..f5209481ac 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 @@ -83,47 +83,47 @@ describe('useSetNextOnboardingStatus', () => { resetJotaiStore(); }); - it('should set next onboarding status for ProfileCreation', () => { + it('should sync emails right after workspace activation', () => { const nextOnboardingStatus = renderHooks( - OnboardingStatus.PROFILE_CREATION, + OnboardingStatus.WORKSPACE_ACTIVATION, false, true, ); expect(nextOnboardingStatus).toEqual(OnboardingStatus.SYNC_EMAIL); }); - it('should skip SyncEmail when user is not first workspace member', () => { - const nextOnboardingStatus = renderHooks( - OnboardingStatus.PROFILE_CREATION, - false, - false, - ); - expect(nextOnboardingStatus).toEqual(OnboardingStatus.COMPLETED); - }); - it('should skip SyncEmail when account sync is disabled', () => { const nextOnboardingStatus = renderHooks( - OnboardingStatus.PROFILE_CREATION, + OnboardingStatus.WORKSPACE_ACTIVATION, false, true, [PermissionFlagType.WORKSPACE_MEMBERS], ); - expect(nextOnboardingStatus).toEqual(OnboardingStatus.INVITE_TEAM); + expect(nextOnboardingStatus).toEqual(OnboardingStatus.PROFILE_CREATION); }); - it('should set next onboarding status for SyncEmail', () => { + it('should create profile after syncing emails', () => { const nextOnboardingStatus = renderHooks( OnboardingStatus.SYNC_EMAIL, false, true, ); + expect(nextOnboardingStatus).toEqual(OnboardingStatus.PROFILE_CREATION); + }); + + it('should invite the team right after profile creation', () => { + const nextOnboardingStatus = renderHooks( + OnboardingStatus.PROFILE_CREATION, + false, + true, + ); expect(nextOnboardingStatus).toEqual(OnboardingStatus.INVITE_TEAM); }); - it('should skip invite when more than 1 workspaceMember exist', () => { + it('should complete after profile creation when more than 1 workspaceMember exist', () => { const nextOnboardingStatus = renderHooks( - OnboardingStatus.SYNC_EMAIL, - true, + OnboardingStatus.PROFILE_CREATION, + false, false, ); expect(nextOnboardingStatus).toEqual(OnboardingStatus.COMPLETED); diff --git a/packages/twenty-front/src/modules/onboarding/hooks/useSetNextOnboardingStatus.ts b/packages/twenty-front/src/modules/onboarding/hooks/useSetNextOnboardingStatus.ts index 68a0413f57..a3a5ea1bac 100644 --- a/packages/twenty-front/src/modules/onboarding/hooks/useSetNextOnboardingStatus.ts +++ b/packages/twenty-front/src/modules/onboarding/hooks/useSetNextOnboardingStatus.ts @@ -33,23 +33,19 @@ const getNextOnboardingStatus = ({ isAccountSyncEnabled, }: GetNextOnboardingStatusArgs) => { if (currentUser?.onboardingStatus === OnboardingStatus.WORKSPACE_ACTIVATION) { + return isAccountSyncEnabled + ? OnboardingStatus.SYNC_EMAIL + : OnboardingStatus.PROFILE_CREATION; + } + + if (currentUser?.onboardingStatus === OnboardingStatus.SYNC_EMAIL) { return OnboardingStatus.PROFILE_CREATION; } if (currentUser?.onboardingStatus === OnboardingStatus.PROFILE_CREATION) { - if (currentWorkspace?.workspaceMembersCount === 1) { - if (isAccountSyncEnabled) { - return OnboardingStatus.SYNC_EMAIL; - } - return OnboardingStatus.INVITE_TEAM; - } - return OnboardingStatus.COMPLETED; - } - if ( - currentUser?.onboardingStatus === OnboardingStatus.SYNC_EMAIL && - currentWorkspace?.workspaceMembersCount === 1 - ) { - return OnboardingStatus.INVITE_TEAM; + return currentWorkspace?.workspaceMembersCount === 1 + ? OnboardingStatus.INVITE_TEAM + : OnboardingStatus.COMPLETED; } if (currentUser?.onboardingStatus === OnboardingStatus.INVITE_TEAM) { return isDefined(calendarBookingPageId) diff --git a/packages/twenty-front/src/pages/onboarding/InviteTeam.tsx b/packages/twenty-front/src/pages/onboarding/InviteTeam.tsx index 3c3ba07af0..4c6359f343 100644 --- a/packages/twenty-front/src/pages/onboarding/InviteTeam.tsx +++ b/packages/twenty-front/src/pages/onboarding/InviteTeam.tsx @@ -11,7 +11,7 @@ import { useHotkeysOnFocusedElement } from '@/ui/utilities/hotkey/hooks/useHotke import { styled } from '@linaria/react'; import { zodResolver } from '@hookform/resolvers/zod'; import { Trans, useLingui } from '@lingui/react/macro'; -import { useCallback } from 'react'; +import { useCallback, useEffect, useMemo, useState } from 'react'; import { Controller, type SubmitHandler, @@ -19,6 +19,7 @@ import { useForm, } from 'react-hook-form'; import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue'; +import { useQuery } from '@apollo/client/react'; import { Key } from 'ts-key-enum'; import { isDefined } from 'twenty-shared/utils'; import { IconCopy, SeparatorLineText } from 'twenty-ui-deprecated/display'; @@ -26,6 +27,7 @@ import { LightButton, MainButton } from 'twenty-ui-deprecated/input'; import { ClickToActionLink } from 'twenty-ui-deprecated/navigation'; import { themeCssVariables } from 'twenty-ui-deprecated/theme-constants'; import { z } from 'zod'; +import { GetInviteSuggestionsDocument } from '~/generated-metadata/graphql'; import { useCopyToClipboard } from '~/hooks/useCopyToClipboard'; import { useCreateWorkspaceInvitation } from '@/workspace-invitation/hooks/useCreateWorkspaceInvitation'; @@ -74,7 +76,8 @@ export const InviteTeam = () => { control, handleSubmit, watch, - formState: { isValid, isSubmitting }, + reset, + formState: { isValid, isSubmitting, isDirty }, } = useForm({ mode: 'onChange', defaultValues: { @@ -88,6 +91,41 @@ export const InviteTeam = () => { name: 'emails', }); + const [hasPrefilledSuggestions, setHasPrefilledSuggestions] = useState(false); + + const { data: inviteSuggestionsData } = useQuery( + GetInviteSuggestionsDocument, + { + fetchPolicy: 'network-only', + }, + ); + + const inviteSuggestions = useMemo( + () => inviteSuggestionsData?.getInviteSuggestions ?? [], + [inviteSuggestionsData], + ); + const hasInviteSuggestions = inviteSuggestions.length > 0; + + useEffect(() => { + if (hasPrefilledSuggestions || !hasInviteSuggestions || isDirty) { + return; + } + + setHasPrefilledSuggestions(true); + reset({ + emails: [ + ...inviteSuggestions.map((suggestion) => ({ email: suggestion.email })), + { email: '' }, + ], + }); + }, [ + hasPrefilledSuggestions, + hasInviteSuggestions, + inviteSuggestions, + isDirty, + reset, + ]); + watch(({ emails }) => { if (!emails) { return; @@ -170,7 +208,15 @@ export const InviteTeam = () => { Invite your team - Get the most out of your workspace by inviting your team. + {hasPrefilledSuggestions ? ( + + We found teammates from your calendar. Review and invite them. + + ) : ( + + Get the most out of your workspace by inviting your team. + + )} {fields.map((field, index) => ( diff --git a/packages/twenty-server/src/engine/core-modules/auth/controllers/google-apis-auth.controller.ts b/packages/twenty-server/src/engine/core-modules/auth/controllers/google-apis-auth.controller.ts index 853b5ab960..94a74433d2 100644 --- a/packages/twenty-server/src/engine/core-modules/auth/controllers/google-apis-auth.controller.ts +++ b/packages/twenty-server/src/engine/core-modules/auth/controllers/google-apis-auth.controller.ts @@ -98,6 +98,12 @@ export class GoogleAPIsAuthController { const handle = emails[0].value.toLowerCase(); + const shouldComputeInviteSuggestions = + await this.onboardingService.shouldComputeInviteSuggestionsOnConnect({ + userId, + workspaceId, + }); + const connectedAccountId = await this.googleAPIsService.refreshGoogleRefreshToken({ handle, @@ -109,6 +115,7 @@ export class GoogleAPIsAuthController { calendarVisibility, messageVisibility, skipMessageChannelConfiguration, + shouldComputeInviteSuggestions, }); if (userId) { diff --git a/packages/twenty-server/src/engine/core-modules/auth/controllers/microsoft-apis-auth.controller.ts b/packages/twenty-server/src/engine/core-modules/auth/controllers/microsoft-apis-auth.controller.ts index 827666d0dc..568709ef89 100644 --- a/packages/twenty-server/src/engine/core-modules/auth/controllers/microsoft-apis-auth.controller.ts +++ b/packages/twenty-server/src/engine/core-modules/auth/controllers/microsoft-apis-auth.controller.ts @@ -105,6 +105,12 @@ export class MicrosoftAPIsAuthController { const handle = emails[0].value.toLowerCase(); + const shouldComputeInviteSuggestions = + await this.onboardingService.shouldComputeInviteSuggestionsOnConnect({ + userId, + workspaceId, + }); + const connectedAccountId = await this.microsoftAPIsService.refreshMicrosoftRefreshToken({ handle, @@ -116,6 +122,7 @@ export class MicrosoftAPIsAuthController { calendarVisibility, messageVisibility, skipMessageChannelConfiguration, + shouldComputeInviteSuggestions, }); if (userId) { diff --git a/packages/twenty-server/src/engine/core-modules/auth/services/google-apis.service.ts b/packages/twenty-server/src/engine/core-modules/auth/services/google-apis.service.ts index 5af45f759b..7f8dbc09d2 100644 --- a/packages/twenty-server/src/engine/core-modules/auth/services/google-apis.service.ts +++ b/packages/twenty-server/src/engine/core-modules/auth/services/google-apis.service.ts @@ -47,6 +47,10 @@ import { MessagingMessageListFetchJob, type MessagingMessageListFetchJobData, } from 'src/modules/messaging/message-import-manager/jobs/messaging-message-list-fetch.job'; +import { + FetchOnboardingInviteSuggestionsJob, + type FetchOnboardingInviteSuggestionsJobData, +} from 'src/modules/onboarding-invite-suggestions/jobs/fetch-onboarding-invite-suggestions.job'; import { isDefined } from 'twenty-shared/utils'; @Injectable() @@ -89,6 +93,7 @@ export class GoogleAPIsService { calendarVisibility: CalendarChannelVisibility | undefined; messageVisibility: MessageChannelVisibility | undefined; skipMessageChannelConfiguration?: boolean; + shouldComputeInviteSuggestions?: boolean; }): Promise { const { handle, @@ -98,6 +103,7 @@ export class GoogleAPIsService { calendarVisibility, messageVisibility, skipMessageChannelConfiguration, + shouldComputeInviteSuggestions, } = input; const isCalendarEnabled = this.twentyConfigService.get( @@ -347,6 +353,23 @@ export class GoogleAPIsService { } } + if ( + shouldComputeInviteSuggestions && + isCalendarEnabled && + isCalendarAvailable + ) { + void this.calendarQueueService + .add( + FetchOnboardingInviteSuggestionsJob.name, + { + workspaceId, + userId, + connectedAccountId: newOrExistingConnectedAccountId, + }, + ) + .catch(() => undefined); + } + return newOrExistingConnectedAccountId; }, authContext, diff --git a/packages/twenty-server/src/engine/core-modules/auth/services/microsoft-apis.service.ts b/packages/twenty-server/src/engine/core-modules/auth/services/microsoft-apis.service.ts index 2acf68516e..734b0eebee 100644 --- a/packages/twenty-server/src/engine/core-modules/auth/services/microsoft-apis.service.ts +++ b/packages/twenty-server/src/engine/core-modules/auth/services/microsoft-apis.service.ts @@ -39,6 +39,10 @@ import { import { CalendarChannelSyncStatusService } from 'src/modules/calendar/common/services/calendar-channel-sync-status.service'; import { EmailAliasManagerService } from 'src/modules/connected-account/email-alias-manager/services/email-alias-manager.service'; import { AccountsToReconnectService } from 'src/modules/connected-account/services/accounts-to-reconnect.service'; +import { + FetchOnboardingInviteSuggestionsJob, + type FetchOnboardingInviteSuggestionsJobData, +} from 'src/modules/onboarding-invite-suggestions/jobs/fetch-onboarding-invite-suggestions.job'; import { MessageChannelSyncStatusService } from 'src/modules/messaging/common/services/message-channel-sync-status.service'; import { @@ -85,6 +89,7 @@ export class MicrosoftAPIsService { calendarVisibility: CalendarChannelVisibility | undefined; messageVisibility: MessageChannelVisibility | undefined; skipMessageChannelConfiguration?: boolean; + shouldComputeInviteSuggestions?: boolean; }): Promise { const { handle, @@ -94,6 +99,7 @@ export class MicrosoftAPIsService { calendarVisibility, messageVisibility, skipMessageChannelConfiguration, + shouldComputeInviteSuggestions, } = input; const scopes = getMicrosoftApisOauthScopes(); @@ -295,19 +301,36 @@ export class MicrosoftAPIsService { }, }); - for (const calendarChannel of calendarChannels) { - if ( + const syncableCalendarChannels = calendarChannels.filter( + (calendarChannel) => calendarChannel.syncStage !== - CalendarChannelSyncStage.PENDING_CONFIGURATION - ) { - await this.calendarQueueService.add( - CalendarEventListFetchJob.name, + CalendarChannelSyncStage.PENDING_CONFIGURATION, + ); + + for (const calendarChannel of syncableCalendarChannels) { + await this.calendarQueueService.add( + CalendarEventListFetchJob.name, + { + calendarChannelId: calendarChannel.id, + workspaceId, + }, + ); + } + + if ( + shouldComputeInviteSuggestions && + syncableCalendarChannels.length > 0 + ) { + void this.calendarQueueService + .add( + FetchOnboardingInviteSuggestionsJob.name, { - calendarChannelId: calendarChannel.id, workspaceId, + userId, + connectedAccountId: newOrExistingConnectedAccountId, }, - ); - } + ) + .catch(() => undefined); } } diff --git a/packages/twenty-server/src/engine/core-modules/cache-storage/types/cache-storage-namespace.enum.ts b/packages/twenty-server/src/engine/core-modules/cache-storage/types/cache-storage-namespace.enum.ts index 5cca874475..390277fccb 100644 --- a/packages/twenty-server/src/engine/core-modules/cache-storage/types/cache-storage-namespace.enum.ts +++ b/packages/twenty-server/src/engine/core-modules/cache-storage/types/cache-storage-namespace.enum.ts @@ -9,5 +9,6 @@ export enum CacheStorageNamespace { EngineMetrics = 'engine:metrics', EngineSubscriptions = 'engine:subscriptions', EngineBillingUsage = 'engine:billing-usage', + EngineOnboardingInviteSuggestions = 'engine:onboarding-invite-suggestions', IntegrationTests = 'integration-tests', } diff --git a/packages/twenty-server/src/engine/core-modules/message-queue/jobs.module.ts b/packages/twenty-server/src/engine/core-modules/message-queue/jobs.module.ts index f1b0c88a20..77cc7fa5b0 100644 --- a/packages/twenty-server/src/engine/core-modules/message-queue/jobs.module.ts +++ b/packages/twenty-server/src/engine/core-modules/message-queue/jobs.module.ts @@ -42,6 +42,7 @@ import { CalendarEventParticipantManagerModule } from 'src/modules/calendar/cale import { CalendarModule } from 'src/modules/calendar/calendar.module'; import { AutoCompaniesAndContactsCreationJobModule } from 'src/modules/contact-creation-manager/jobs/auto-companies-and-contacts-creation-job.module'; import { MessagingModule } from 'src/modules/messaging/messaging.module'; +import { OnboardingInviteSuggestionsModule } from 'src/modules/onboarding-invite-suggestions/onboarding-invite-suggestions.module'; import { TimelineJobModule } from 'src/modules/timeline/jobs/timeline-job.module'; import { TimelineActivityModule } from 'src/modules/timeline/timeline-activity.module'; import { WorkflowModule } from 'src/modules/workflow/workflow.module'; @@ -66,6 +67,7 @@ import { WorkflowModule } from 'src/modules/workflow/workflow.module'; MessagingModule, CalendarModule, CalendarEventParticipantManagerModule, + OnboardingInviteSuggestionsModule, TimelineActivityModule, StripeModule, FeatureFlagModule, diff --git a/packages/twenty-server/src/engine/core-modules/onboarding/dtos/invite-suggestion.dto.ts b/packages/twenty-server/src/engine/core-modules/onboarding/dtos/invite-suggestion.dto.ts new file mode 100644 index 0000000000..814f5b88e3 --- /dev/null +++ b/packages/twenty-server/src/engine/core-modules/onboarding/dtos/invite-suggestion.dto.ts @@ -0,0 +1,10 @@ +import { Field, ObjectType } from '@nestjs/graphql'; + +@ObjectType('InviteSuggestion') +export class InviteSuggestionDTO { + @Field(() => String) + email: string; + + @Field(() => String, { nullable: true }) + displayName?: string; +} diff --git a/packages/twenty-server/src/engine/core-modules/onboarding/onboarding.module.ts b/packages/twenty-server/src/engine/core-modules/onboarding/onboarding.module.ts index c7a98ec374..3c90ecba66 100644 --- a/packages/twenty-server/src/engine/core-modules/onboarding/onboarding.module.ts +++ b/packages/twenty-server/src/engine/core-modules/onboarding/onboarding.module.ts @@ -2,17 +2,17 @@ import { Module } from '@nestjs/common'; import { TypeOrmModule } from '@nestjs/typeorm'; import { BillingModule } from 'src/engine/core-modules/billing/billing.module'; -import { FeatureFlagModule } from 'src/engine/core-modules/feature-flag/feature-flag.module'; import { OnboardingResolver } from 'src/engine/core-modules/onboarding/onboarding.resolver'; import { OnboardingService } from 'src/engine/core-modules/onboarding/onboarding.service'; import { UserVarsModule } from 'src/engine/core-modules/user/user-vars/user-vars.module'; import { WorkspaceEntity } from 'src/engine/core-modules/workspace/workspace.entity'; +import { OnboardingInviteSuggestionsModule } from 'src/modules/onboarding-invite-suggestions/onboarding-invite-suggestions.module'; @Module({ imports: [ BillingModule, UserVarsModule, - FeatureFlagModule, + OnboardingInviteSuggestionsModule, TypeOrmModule.forFeature([WorkspaceEntity]), ], exports: [OnboardingService], 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 40c165f43c..2d73e94d2b 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 @@ -1,12 +1,14 @@ import { UseFilters, UseGuards, UsePipes } from '@nestjs/common'; -import { Mutation } from '@nestjs/graphql'; +import { Mutation, Query } from '@nestjs/graphql'; import { MetadataResolver } from 'src/engine/api/graphql/graphql-config/decorators/metadata-resolver.decorator'; 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 { 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'; +import { OnboardingInviteSuggestionsService } from 'src/modules/onboarding-invite-suggestions/services/onboarding-invite-suggestions.service'; import { WorkspaceEntity } from 'src/engine/core-modules/workspace/workspace.entity'; import { AuthUser } from 'src/engine/decorators/auth/auth-user.decorator'; import { AuthWorkspace } from 'src/engine/decorators/auth/auth-workspace.decorator'; @@ -19,7 +21,22 @@ import { WorkspaceAuthGuard } from 'src/engine/guards/workspace-auth.guard'; @UseFilters(PreventNestToAutoLogGraphqlErrorsFilter) @MetadataResolver() export class OnboardingResolver { - constructor(private readonly onboardingService: OnboardingService) {} + constructor( + private readonly onboardingService: OnboardingService, + private readonly onboardingInviteSuggestionsService: OnboardingInviteSuggestionsService, + ) {} + + @Query(() => [InviteSuggestionDTO]) + @UseGuards(NoPermissionGuard) + async getInviteSuggestions( + @AuthUser() user: AuthContextUser, + @AuthWorkspace() workspace: WorkspaceEntity, + ): Promise { + return this.onboardingInviteSuggestionsService.getCachedSuggestions({ + workspaceId: workspace.id, + userId: user.id, + }); + } @Mutation(() => OnboardingStepSuccessDTO) @UseGuards(NoPermissionGuard) 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 6bb3bbfb66..ea2d44ee9f 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 @@ -94,14 +94,14 @@ export class OnboardingService { userVars.get(OnboardingStepKeys.ONBOARDING_BOOK_ONBOARDING_PENDING) === true; - if (isProfileCreationPending) { - return OnboardingStatus.PROFILE_CREATION; - } - if (isConnectAccountPending) { return OnboardingStatus.SYNC_EMAIL; } + if (isProfileCreationPending) { + return OnboardingStatus.PROFILE_CREATION; + } + if (isInviteTeamPending) { return OnboardingStatus.INVITE_TEAM; } @@ -129,6 +129,43 @@ export class OnboardingService { return OnboardingStatus.COMPLETED; } + async isOnboardingConnectAccountPending({ + userId, + workspaceId, + }: { + userId: string; + workspaceId: string; + }): Promise { + const value = await this.userVarsService.get({ + userId, + workspaceId, + key: OnboardingStepKeys.ONBOARDING_CONNECT_ACCOUNT_PENDING, + }); + + return value === true; + } + + async shouldComputeInviteSuggestionsOnConnect({ + userId, + workspaceId, + }: { + userId?: string; + workspaceId: string; + }): Promise { + if (!isDefined(userId)) { + return false; + } + + try { + return await this.isOnboardingConnectAccountPending({ + userId, + workspaceId, + }); + } catch { + return false; + } + } + async setOnboardingConnectAccountPending( { userId, diff --git a/packages/twenty-server/src/modules/modules.module.ts b/packages/twenty-server/src/modules/modules.module.ts index 646c1ad08c..4c766548d0 100644 --- a/packages/twenty-server/src/modules/modules.module.ts +++ b/packages/twenty-server/src/modules/modules.module.ts @@ -3,6 +3,7 @@ import { Module } from '@nestjs/common'; import { CalendarModule } from 'src/modules/calendar/calendar.module'; import { ConnectedAccountModule } from 'src/modules/connected-account/connected-account.module'; import { MessagingModule } from 'src/modules/messaging/messaging.module'; +import { OnboardingInviteSuggestionsModule } from 'src/modules/onboarding-invite-suggestions/onboarding-invite-suggestions.module'; import { WorkflowModule } from 'src/modules/workflow/workflow.module'; import { WorkspaceMemberModule } from 'src/modules/workspace-member/workspace-member.module'; @@ -11,6 +12,7 @@ import { WorkspaceMemberModule } from 'src/modules/workspace-member/workspace-me MessagingModule, CalendarModule, ConnectedAccountModule, + OnboardingInviteSuggestionsModule, WorkflowModule, WorkspaceMemberModule, ], diff --git a/packages/twenty-server/src/modules/onboarding-invite-suggestions/constants/onboarding-invite-suggestions-cache-ttl-ms.constant.ts b/packages/twenty-server/src/modules/onboarding-invite-suggestions/constants/onboarding-invite-suggestions-cache-ttl-ms.constant.ts new file mode 100644 index 0000000000..a9f9689809 --- /dev/null +++ b/packages/twenty-server/src/modules/onboarding-invite-suggestions/constants/onboarding-invite-suggestions-cache-ttl-ms.constant.ts @@ -0,0 +1 @@ +export const ONBOARDING_INVITE_SUGGESTIONS_CACHE_TTL_MS = 60 * 60 * 1000; diff --git a/packages/twenty-server/src/modules/onboarding-invite-suggestions/constants/onboarding-invite-suggestions-lookahead-days.constant.ts b/packages/twenty-server/src/modules/onboarding-invite-suggestions/constants/onboarding-invite-suggestions-lookahead-days.constant.ts new file mode 100644 index 0000000000..89d96a26e2 --- /dev/null +++ b/packages/twenty-server/src/modules/onboarding-invite-suggestions/constants/onboarding-invite-suggestions-lookahead-days.constant.ts @@ -0,0 +1 @@ +export const ONBOARDING_INVITE_SUGGESTIONS_LOOKAHEAD_DAYS = 7; diff --git a/packages/twenty-server/src/modules/onboarding-invite-suggestions/constants/onboarding-invite-suggestions-lookback-days.constant.ts b/packages/twenty-server/src/modules/onboarding-invite-suggestions/constants/onboarding-invite-suggestions-lookback-days.constant.ts new file mode 100644 index 0000000000..d1ce51ab85 --- /dev/null +++ b/packages/twenty-server/src/modules/onboarding-invite-suggestions/constants/onboarding-invite-suggestions-lookback-days.constant.ts @@ -0,0 +1 @@ +export const ONBOARDING_INVITE_SUGGESTIONS_LOOKBACK_DAYS = 90; diff --git a/packages/twenty-server/src/modules/onboarding-invite-suggestions/constants/onboarding-invite-suggestions-max-count.constant.ts b/packages/twenty-server/src/modules/onboarding-invite-suggestions/constants/onboarding-invite-suggestions-max-count.constant.ts new file mode 100644 index 0000000000..85f44a6e39 --- /dev/null +++ b/packages/twenty-server/src/modules/onboarding-invite-suggestions/constants/onboarding-invite-suggestions-max-count.constant.ts @@ -0,0 +1 @@ +export const ONBOARDING_INVITE_SUGGESTIONS_MAX_COUNT = 5; diff --git a/packages/twenty-server/src/modules/onboarding-invite-suggestions/constants/onboarding-invite-suggestions-max-events.constant.ts b/packages/twenty-server/src/modules/onboarding-invite-suggestions/constants/onboarding-invite-suggestions-max-events.constant.ts new file mode 100644 index 0000000000..fc4f5d8019 --- /dev/null +++ b/packages/twenty-server/src/modules/onboarding-invite-suggestions/constants/onboarding-invite-suggestions-max-events.constant.ts @@ -0,0 +1 @@ +export const ONBOARDING_INVITE_SUGGESTIONS_MAX_EVENTS = 250; diff --git a/packages/twenty-server/src/modules/onboarding-invite-suggestions/jobs/fetch-onboarding-invite-suggestions.job.ts b/packages/twenty-server/src/modules/onboarding-invite-suggestions/jobs/fetch-onboarding-invite-suggestions.job.ts new file mode 100644 index 0000000000..614721347a --- /dev/null +++ b/packages/twenty-server/src/modules/onboarding-invite-suggestions/jobs/fetch-onboarding-invite-suggestions.job.ts @@ -0,0 +1,26 @@ +import { Process } from 'src/engine/core-modules/message-queue/decorators/process.decorator'; +import { Processor } from 'src/engine/core-modules/message-queue/decorators/processor.decorator'; +import { MessageQueue } from 'src/engine/core-modules/message-queue/message-queue.constants'; +import { OnboardingInviteSuggestionsService } from 'src/modules/onboarding-invite-suggestions/services/onboarding-invite-suggestions.service'; + +export type FetchOnboardingInviteSuggestionsJobData = { + workspaceId: string; + userId: string; + connectedAccountId: string; +}; + +@Processor({ + queueName: MessageQueue.calendarQueue, +}) +export class FetchOnboardingInviteSuggestionsJob { + constructor( + private readonly onboardingInviteSuggestionsService: OnboardingInviteSuggestionsService, + ) {} + + @Process(FetchOnboardingInviteSuggestionsJob.name) + async handle(data: FetchOnboardingInviteSuggestionsJobData): Promise { + await this.onboardingInviteSuggestionsService.computeAndCacheSuggestions( + data, + ); + } +} diff --git a/packages/twenty-server/src/modules/onboarding-invite-suggestions/onboarding-invite-suggestions.module.ts b/packages/twenty-server/src/modules/onboarding-invite-suggestions/onboarding-invite-suggestions.module.ts new file mode 100644 index 0000000000..3a8757e1d2 --- /dev/null +++ b/packages/twenty-server/src/modules/onboarding-invite-suggestions/onboarding-invite-suggestions.module.ts @@ -0,0 +1,26 @@ +import { Module } from '@nestjs/common'; +import { TypeOrmModule } from '@nestjs/typeorm'; + +import { ConnectedAccountEntity } from 'src/engine/metadata-modules/connected-account/entities/connected-account.entity'; +import { OAuth2ClientManagerModule } from 'src/modules/connected-account/oauth2-client-manager/oauth2-client-manager.module'; +import { FetchOnboardingInviteSuggestionsJob } from 'src/modules/onboarding-invite-suggestions/jobs/fetch-onboarding-invite-suggestions.job'; +import { CalendarAttendeesService } from 'src/modules/onboarding-invite-suggestions/services/calendar-attendees.service'; +import { GoogleCalendarAttendeesService } from 'src/modules/onboarding-invite-suggestions/services/google-calendar-attendees.service'; +import { MicrosoftCalendarAttendeesService } from 'src/modules/onboarding-invite-suggestions/services/microsoft-calendar-attendees.service'; +import { OnboardingInviteSuggestionsService } from 'src/modules/onboarding-invite-suggestions/services/onboarding-invite-suggestions.service'; + +@Module({ + imports: [ + OAuth2ClientManagerModule, + TypeOrmModule.forFeature([ConnectedAccountEntity]), + ], + providers: [ + GoogleCalendarAttendeesService, + MicrosoftCalendarAttendeesService, + CalendarAttendeesService, + OnboardingInviteSuggestionsService, + FetchOnboardingInviteSuggestionsJob, + ], + exports: [OnboardingInviteSuggestionsService], +}) +export class OnboardingInviteSuggestionsModule {} diff --git a/packages/twenty-server/src/modules/onboarding-invite-suggestions/services/calendar-attendees.service.ts b/packages/twenty-server/src/modules/onboarding-invite-suggestions/services/calendar-attendees.service.ts new file mode 100644 index 0000000000..1af3eeb5bb --- /dev/null +++ b/packages/twenty-server/src/modules/onboarding-invite-suggestions/services/calendar-attendees.service.ts @@ -0,0 +1,33 @@ +import { Injectable } from '@nestjs/common'; + +import { ConnectedAccountProvider } from 'twenty-shared/types'; + +import { type ConnectedAccountEntity } from 'src/engine/metadata-modules/connected-account/entities/connected-account.entity'; +import { GoogleCalendarAttendeesService } from 'src/modules/onboarding-invite-suggestions/services/google-calendar-attendees.service'; +import { MicrosoftCalendarAttendeesService } from 'src/modules/onboarding-invite-suggestions/services/microsoft-calendar-attendees.service'; +import { type CalendarAttendee } from 'src/modules/onboarding-invite-suggestions/types/calendar-attendee.type'; + +@Injectable() +export class CalendarAttendeesService { + constructor( + private readonly googleCalendarAttendeesService: GoogleCalendarAttendeesService, + private readonly microsoftCalendarAttendeesService: MicrosoftCalendarAttendeesService, + ) {} + + async getRecentAttendees( + connectedAccount: Pick, + ): Promise { + switch (connectedAccount.provider) { + case ConnectedAccountProvider.GOOGLE: + return this.googleCalendarAttendeesService.getRecentAttendees( + connectedAccount.id, + ); + case ConnectedAccountProvider.MICROSOFT: + return this.microsoftCalendarAttendeesService.getRecentAttendees( + connectedAccount.id, + ); + default: + return []; + } + } +} diff --git a/packages/twenty-server/src/modules/onboarding-invite-suggestions/services/google-calendar-attendees.service.ts b/packages/twenty-server/src/modules/onboarding-invite-suggestions/services/google-calendar-attendees.service.ts new file mode 100644 index 0000000000..76afa2582f --- /dev/null +++ b/packages/twenty-server/src/modules/onboarding-invite-suggestions/services/google-calendar-attendees.service.ts @@ -0,0 +1,85 @@ +import { Injectable } from '@nestjs/common'; + +import { google } from 'googleapis'; + +import { GoogleOAuth2ClientProvider } from 'src/modules/connected-account/oauth2-client-manager/drivers/google/google-oauth2-client.provider'; +import { ONBOARDING_INVITE_SUGGESTIONS_LOOKAHEAD_DAYS } from 'src/modules/onboarding-invite-suggestions/constants/onboarding-invite-suggestions-lookahead-days.constant'; +import { ONBOARDING_INVITE_SUGGESTIONS_LOOKBACK_DAYS } from 'src/modules/onboarding-invite-suggestions/constants/onboarding-invite-suggestions-lookback-days.constant'; +import { ONBOARDING_INVITE_SUGGESTIONS_MAX_EVENTS } from 'src/modules/onboarding-invite-suggestions/constants/onboarding-invite-suggestions-max-events.constant'; +import { type CalendarAttendee } from 'src/modules/onboarding-invite-suggestions/types/calendar-attendee.type'; + +const MS_PER_DAY = 24 * 60 * 60 * 1000; + +@Injectable() +export class GoogleCalendarAttendeesService { + constructor( + private readonly googleOAuth2ClientProvider: GoogleOAuth2ClientProvider, + ) {} + + async getRecentAttendees( + connectedAccountId: string, + ): Promise { + const oAuth2Client = + await this.googleOAuth2ClientProvider.getClient(connectedAccountId); + + const googleCalendarClient = google.calendar({ + version: 'v3', + auth: oAuth2Client, + }); + + const now = Date.now(); + + const response = await googleCalendarClient.events.list({ + calendarId: 'primary', + singleEvents: true, + orderBy: 'startTime', + maxResults: ONBOARDING_INVITE_SUGGESTIONS_MAX_EVENTS, + timeMin: new Date( + now - ONBOARDING_INVITE_SUGGESTIONS_LOOKBACK_DAYS * MS_PER_DAY, + ).toISOString(), + timeMax: new Date( + now + ONBOARDING_INVITE_SUGGESTIONS_LOOKAHEAD_DAYS * MS_PER_DAY, + ).toISOString(), + }); + + const events = response.data.items ?? []; + const attendees: CalendarAttendee[] = []; + + for (const event of events) { + const displayNameByEmail = new Map(); + + const organizerEmail = event.organizer?.email?.toLowerCase(); + + if (organizerEmail) { + displayNameByEmail.set( + organizerEmail, + event.organizer?.displayName ?? undefined, + ); + } + + for (const attendee of event.attendees ?? []) { + const attendeeEmail = attendee.email?.toLowerCase(); + const isRoomOrResource = attendee.resource === true; + + if ( + !attendeeEmail || + isRoomOrResource || + displayNameByEmail.has(attendeeEmail) + ) { + continue; + } + + displayNameByEmail.set( + attendeeEmail, + attendee.displayName ?? undefined, + ); + } + + for (const [email, displayName] of displayNameByEmail) { + attendees.push({ email, displayName }); + } + } + + return attendees; + } +} diff --git a/packages/twenty-server/src/modules/onboarding-invite-suggestions/services/microsoft-calendar-attendees.service.ts b/packages/twenty-server/src/modules/onboarding-invite-suggestions/services/microsoft-calendar-attendees.service.ts new file mode 100644 index 0000000000..c5bc0c3406 --- /dev/null +++ b/packages/twenty-server/src/modules/onboarding-invite-suggestions/services/microsoft-calendar-attendees.service.ts @@ -0,0 +1,97 @@ +import { Injectable } from '@nestjs/common'; + +import { MicrosoftOAuth2ClientProvider } from 'src/modules/connected-account/oauth2-client-manager/drivers/microsoft/microsoft-oauth2-client.provider'; +import { ONBOARDING_INVITE_SUGGESTIONS_LOOKAHEAD_DAYS } from 'src/modules/onboarding-invite-suggestions/constants/onboarding-invite-suggestions-lookahead-days.constant'; +import { ONBOARDING_INVITE_SUGGESTIONS_LOOKBACK_DAYS } from 'src/modules/onboarding-invite-suggestions/constants/onboarding-invite-suggestions-lookback-days.constant'; +import { ONBOARDING_INVITE_SUGGESTIONS_MAX_EVENTS } from 'src/modules/onboarding-invite-suggestions/constants/onboarding-invite-suggestions-max-events.constant'; +import { type CalendarAttendee } from 'src/modules/onboarding-invite-suggestions/types/calendar-attendee.type'; + +const MS_PER_DAY = 24 * 60 * 60 * 1000; + +type MicrosoftEmailAddress = { + address?: string | null; + name?: string | null; +}; + +type MicrosoftCalendarViewResponse = { + value?: { + organizer?: { emailAddress?: MicrosoftEmailAddress | null } | null; + attendees?: + | { + type?: string | null; + emailAddress?: MicrosoftEmailAddress | null; + }[] + | null; + }[]; +}; + +@Injectable() +export class MicrosoftCalendarAttendeesService { + constructor( + private readonly microsoftOAuth2ClientProvider: MicrosoftOAuth2ClientProvider, + ) {} + + async getRecentAttendees( + connectedAccountId: string, + ): Promise { + const microsoftClient = + await this.microsoftOAuth2ClientProvider.getClient(connectedAccountId); + + const now = Date.now(); + + const response: MicrosoftCalendarViewResponse = await microsoftClient + .api('/me/calendarView') + .query({ + startDateTime: new Date( + now - ONBOARDING_INVITE_SUGGESTIONS_LOOKBACK_DAYS * MS_PER_DAY, + ).toISOString(), + endDateTime: new Date( + now + ONBOARDING_INVITE_SUGGESTIONS_LOOKAHEAD_DAYS * MS_PER_DAY, + ).toISOString(), + }) + .select('organizer,attendees') + .top(ONBOARDING_INVITE_SUGGESTIONS_MAX_EVENTS) + .get(); + + const events = response.value ?? []; + const attendees: CalendarAttendee[] = []; + + for (const event of events) { + const displayNameByEmail = new Map(); + + const organizerEmail = + event.organizer?.emailAddress?.address?.toLowerCase(); + + if (organizerEmail) { + displayNameByEmail.set( + organizerEmail, + event.organizer?.emailAddress?.name ?? undefined, + ); + } + + for (const attendee of event.attendees ?? []) { + const attendeeEmail = attendee.emailAddress?.address?.toLowerCase(); + const isRoomOrResource = attendee.type === 'resource'; + + if ( + !attendeeEmail || + isRoomOrResource || + displayNameByEmail.has(attendeeEmail) + ) { + continue; + } + + displayNameByEmail.set( + attendeeEmail, + attendee.emailAddress?.name ?? undefined, + ); + } + + for (const [email, displayName] of displayNameByEmail) { + attendees.push({ email, displayName }); + } + } + + return attendees; + } +} diff --git a/packages/twenty-server/src/modules/onboarding-invite-suggestions/services/onboarding-invite-suggestions.service.ts b/packages/twenty-server/src/modules/onboarding-invite-suggestions/services/onboarding-invite-suggestions.service.ts new file mode 100644 index 0000000000..83e13182f0 --- /dev/null +++ b/packages/twenty-server/src/modules/onboarding-invite-suggestions/services/onboarding-invite-suggestions.service.ts @@ -0,0 +1,163 @@ +import { Injectable, Logger } from '@nestjs/common'; +import { InjectRepository } from '@nestjs/typeorm'; + +import { isDefined } from 'twenty-shared/utils'; +import { Repository } from 'typeorm'; + +import { InjectCacheStorage } from 'src/engine/core-modules/cache-storage/decorators/cache-storage.decorator'; +import { CacheStorageService } from 'src/engine/core-modules/cache-storage/services/cache-storage.service'; +import { CacheStorageNamespace } from 'src/engine/core-modules/cache-storage/types/cache-storage-namespace.enum'; +import { ConnectedAccountEntity } from 'src/engine/metadata-modules/connected-account/entities/connected-account.entity'; +import { getDomainNameFromHandle } from 'src/modules/contact-creation-manager/utils/get-domain-name-from-handle.util'; +import { ONBOARDING_INVITE_SUGGESTIONS_CACHE_TTL_MS } from 'src/modules/onboarding-invite-suggestions/constants/onboarding-invite-suggestions-cache-ttl-ms.constant'; +import { ONBOARDING_INVITE_SUGGESTIONS_MAX_COUNT } from 'src/modules/onboarding-invite-suggestions/constants/onboarding-invite-suggestions-max-count.constant'; +import { getOnboardingInviteSuggestionsCacheKey } from 'src/modules/onboarding-invite-suggestions/utils/get-onboarding-invite-suggestions-cache-key.util'; +import { isGroupEmail } from 'src/modules/messaging/message-import-manager/utils/is-group-email'; +import { CalendarAttendeesService } from 'src/modules/onboarding-invite-suggestions/services/calendar-attendees.service'; +import { type CalendarAttendee } from 'src/modules/onboarding-invite-suggestions/types/calendar-attendee.type'; +import { isWorkEmail } from 'src/utils/is-work-email'; + +type ComputeAndCacheSuggestionsArgs = { + workspaceId: string; + userId: string; + connectedAccountId: string; +}; + +@Injectable() +export class OnboardingInviteSuggestionsService { + private readonly logger = new Logger(OnboardingInviteSuggestionsService.name); + + constructor( + @InjectRepository(ConnectedAccountEntity) + private readonly connectedAccountRepository: Repository, + private readonly calendarAttendeesService: CalendarAttendeesService, + @InjectCacheStorage(CacheStorageNamespace.EngineOnboardingInviteSuggestions) + private readonly cacheStorageService: CacheStorageService, + ) {} + + async getCachedSuggestions({ + workspaceId, + userId, + }: { + workspaceId: string; + userId: string; + }): Promise { + const cachedSuggestions = await this.cacheStorageService.get< + CalendarAttendee[] + >(getOnboardingInviteSuggestionsCacheKey(workspaceId, userId)); + + return cachedSuggestions ?? []; + } + + async computeAndCacheSuggestions({ + workspaceId, + userId, + connectedAccountId, + }: ComputeAndCacheSuggestionsArgs): Promise { + const cacheKey = getOnboardingInviteSuggestionsCacheKey( + workspaceId, + userId, + ); + + const connectedAccount = await this.connectedAccountRepository.findOne({ + where: { id: connectedAccountId, workspaceId }, + }); + + if (!isDefined(connectedAccount)) { + await this.cacheStorageService.set( + cacheKey, + [], + ONBOARDING_INVITE_SUGGESTIONS_CACHE_TTL_MS, + ); + + return; + } + + const connectedAccountHandle = connectedAccount.handle.toLowerCase(); + + if (!isWorkEmail(connectedAccountHandle)) { + await this.cacheStorageService.set( + cacheKey, + [], + ONBOARDING_INVITE_SUGGESTIONS_CACHE_TTL_MS, + ); + + return; + } + + const connectedAccountDomain = getDomainNameFromHandle( + connectedAccountHandle, + ); + const ownEmailHandles = new Set([ + connectedAccountHandle, + ...(connectedAccount.handleAliases ?? []).map((alias) => + alias.toLowerCase(), + ), + ]); + + let attendees: CalendarAttendee[] = []; + + try { + attendees = + await this.calendarAttendeesService.getRecentAttendees( + connectedAccount, + ); + } catch (error) { + this.logger.warn( + `Could not compute invite suggestions for workspace ${workspaceId}: ${ + error instanceof Error ? error.message : 'unknown error' + }`, + ); + } + + const eventCountByColleagueEmail = new Map< + string, + { eventCount: number; displayName?: string } + >(); + + for (const attendee of attendees) { + const attendeeEmail = attendee.email.toLowerCase(); + + const isOwnEmail = ownEmailHandles.has(attendeeEmail); + const isSameCompanyColleague = + getDomainNameFromHandle(attendeeEmail) === connectedAccountDomain; + + if ( + isOwnEmail || + !isSameCompanyColleague || + isGroupEmail(attendeeEmail) + ) { + continue; + } + + const colleagueTally = eventCountByColleagueEmail.get(attendeeEmail) ?? { + eventCount: 0, + }; + + colleagueTally.eventCount += 1; + + if ( + !isDefined(colleagueTally.displayName) && + isDefined(attendee.displayName) + ) { + colleagueTally.displayName = attendee.displayName; + } + + eventCountByColleagueEmail.set(attendeeEmail, colleagueTally); + } + + const mostFrequentColleaguesFirst = Array.from( + eventCountByColleagueEmail.entries(), + ).sort(([, left], [, right]) => right.eventCount - left.eventCount); + + const suggestions: CalendarAttendee[] = mostFrequentColleaguesFirst + .slice(0, ONBOARDING_INVITE_SUGGESTIONS_MAX_COUNT) + .map(([email, { displayName }]) => ({ email, displayName })); + + await this.cacheStorageService.set( + cacheKey, + suggestions, + ONBOARDING_INVITE_SUGGESTIONS_CACHE_TTL_MS, + ); + } +} diff --git a/packages/twenty-server/src/modules/onboarding-invite-suggestions/types/calendar-attendee.type.ts b/packages/twenty-server/src/modules/onboarding-invite-suggestions/types/calendar-attendee.type.ts new file mode 100644 index 0000000000..31322b7d14 --- /dev/null +++ b/packages/twenty-server/src/modules/onboarding-invite-suggestions/types/calendar-attendee.type.ts @@ -0,0 +1,4 @@ +export type CalendarAttendee = { + email: string; + displayName?: string; +}; diff --git a/packages/twenty-server/src/modules/onboarding-invite-suggestions/utils/get-onboarding-invite-suggestions-cache-key.util.ts b/packages/twenty-server/src/modules/onboarding-invite-suggestions/utils/get-onboarding-invite-suggestions-cache-key.util.ts new file mode 100644 index 0000000000..10e7b6b6f0 --- /dev/null +++ b/packages/twenty-server/src/modules/onboarding-invite-suggestions/utils/get-onboarding-invite-suggestions-cache-key.util.ts @@ -0,0 +1,4 @@ +export const getOnboardingInviteSuggestionsCacheKey = ( + workspaceId: string, + userId: string, +): string => `${workspaceId}:${userId}`;