The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
Add billing usage analytics dashboard with ClickHouse integration (#18592)
Félix Malfait77d4bd9158ad
diff --git a/packages/twenty-front/codegen-metadata.cjs b/packages/twenty-front/codegen-metadata.cjsindex ebd7885313b..637755e4050 100644--- a/packages/twenty-front/codegen-metadata.cjs+++ b/packages/twenty-front/codegen-metadata.cjs@@ -10,13 +10,11 @@ module.exports = {'./src/modules/views/graphql/**/*.{ts,tsx}','./src/modules/ai/graphql/**/*.{ts,tsx}','./src/modules/applications/graphql/**/*.{ts,tsx}',- './src/modules/application-variables/graphql/**/*.{ts,tsx}','./src/modules/workspace/graphql/**/*.{ts,tsx}','./src/modules/workspace-member/graphql/**/*.{ts,tsx}','./src/modules/workspace-invitation/graphql/**/*.{ts,tsx}',- './src/modules/billing/graphql/**/*.{ts,tsx}','./src/modules/settings/**/graphql/**/*.{ts,tsx}','./src/modules/logic-functions/graphql/**/*.{ts,tsx}',diff --git a/packages/twenty-front/src/generated-metadata/graphql.ts b/packages/twenty-front/src/generated-metadata/graphql.tsindex 029bf5e923d..3cb4f3cfcc0 100644--- a/packages/twenty-front/src/generated-metadata/graphql.ts+++ b/packages/twenty-front/src/generated-metadata/graphql.ts@@ -1673,6 +1673,7 @@ export type EventLogRecord = {export enum EventLogTable {OBJECT_EVENT = 'OBJECT_EVENT',PAGEVIEW = 'PAGEVIEW',+ USAGE_EVENT = 'USAGE_EVENT',WORKSPACE_EVENT = 'WORKSPACE_EVENT'}@@ -1719,7 +1720,8 @@ export enum FeatureFlagKey {IS_RICH_TEXT_V1_MIGRATED = 'IS_RICH_TEXT_V1_MIGRATED',IS_ROW_LEVEL_PERMISSION_PREDICATES_ENABLED = 'IS_ROW_LEVEL_PERMISSION_PREDICATES_ENABLED',IS_TASK_TARGET_MIGRATED = 'IS_TASK_TARGET_MIGRATED',- IS_UNIQUE_INDEXES_ENABLED = 'IS_UNIQUE_INDEXES_ENABLED'+ IS_UNIQUE_INDEXES_ENABLED = 'IS_UNIQUE_INDEXES_ENABLED',+ IS_USAGE_ANALYTICS_ENABLED = 'IS_USAGE_ANALYTICS_ENABLED'}export type Field = {@@ -4270,6 +4272,7 @@ export type Query = {getSystemHealthStatus: SystemHealth;getToolIndex: Array<ToolIndexEntry>;getToolInputSchema?: Maybe<Scalars['JSON']>;+ getUsageAnalytics: UsageAnalytics;getView?: Maybe<View>;getViewField?: Maybe<ViewField>;getViewFieldGroup?: Maybe<ViewFieldGroup>;@@ -4547,6 +4550,11 @@ export type QueryGetToolInputSchemaArgs = {};+export type QueryGetUsageAnalyticsArgs = {+ input?: InputMaybe<UsageAnalyticsInput>;+};++export type QueryGetViewArgs = {id: Scalars['String'];};@@ -5587,6 +5595,41 @@ export type UpsertRowLevelPermissionPredicatesResult = {predicates: Array<RowLevelPermissionPredicate>;};+export type UsageAnalytics = {+ __typename?: 'UsageAnalytics';+ periodEnd: Scalars['DateTime'];+ periodStart: Scalars['DateTime'];+ timeSeries: Array<UsageTimeSeries>;+ usageByOperationType: Array<UsageBreakdownItem>;+ usageByUser: Array<UsageBreakdownItem>;+ userDailyUsage?: Maybe<UsageUserDaily>;+};++export type UsageAnalyticsInput = {+ periodEnd?: InputMaybe<Scalars['DateTime']>;+ periodStart?: InputMaybe<Scalars['DateTime']>;+ userWorkspaceId?: InputMaybe<Scalars['String']>;+};++export type UsageBreakdownItem = {+ __typename?: 'UsageBreakdownItem';+ creditsUsed: Scalars['Float'];+ key: Scalars['String'];+ label?: Maybe<Scalars['String']>;+};++export type UsageTimeSeries = {+ __typename?: 'UsageTimeSeries';+ creditsUsed: Scalars['Float'];+ date: Scalars['String'];+};++export type UsageUserDaily = {+ __typename?: 'UsageUserDaily';+ dailyUsage: Array<UsageTimeSeries>;+ userWorkspaceId: Scalars['String'];+};+export type User = {__typename?: 'User';availableWorkspaces: AvailableWorkspaces;@@ -6294,15 +6337,6 @@ export type TrackAnalyticsMutationVariables = Exact<{export type TrackAnalyticsMutation = { __typename?: 'Mutation', trackAnalytics: { __typename?: 'Analytics', success: boolean } };-export type UpdateOneApplicationVariableMutationVariables = Exact<{- key: Scalars['String'];- value: Scalars['String'];- applicationId: Scalars['UUID'];-}>;---export type UpdateOneApplicationVariableMutation = { __typename?: 'Mutation', updateOneApplicationVariable: boolean };-export type ApplicationFieldsFragment = { __typename?: 'Application', id: string, name: string, description?: string | null, version?: string | null, universalIdentifier: string, applicationRegistrationId?: string | null, canBeUninstalled: boolean, defaultRoleId?: string | null, settingsCustomTabFrontComponentId?: string | null, availablePackages: any, applicationRegistration?: { __typename?: 'ApplicationRegistrationSummary', id: string, latestAvailableVersion?: string | null, sourceType: ApplicationRegistrationSourceType } | null, applicationVariables: Array<{ __typename?: 'ApplicationVariable', id: string, key: string, value: string, description: string, isSecret: boolean }>, agents: Array<{ __typename?: 'Agent', id: string, name: string, label: string, description?: string | null, icon?: string | null, prompt: string, modelId: string, responseFormat?: any | null, roleId?: string | null, isCustom: boolean, modelConfiguration?: any | null, evaluationInputs: Array<string>, applicationId?: string | null, createdAt: string, updatedAt: string }>, objects: Array<{ __typename?: 'Object', id: string, universalIdentifier: string, nameSingular: string, namePlural: string, labelSingular: string, labelPlural: string, color?: string | null, description?: string | null, icon?: string | null, isCustom: boolean, isRemote: boolean, isActive: boolean, isSystem: boolean, isUIReadOnly: boolean, createdAt: string, updatedAt: string, labelIdentifierFieldMetadataId?: string | null, imageIdentifierFieldMetadataId?: string | null, applicationId: string, shortcut?: string | null, isLabelSyncedWithName: boolean, isSearchable: boolean, duplicateCriteria?: Array<Array<string>> | null, indexMetadataList: Array<{ __typename?: 'Index', id: string, createdAt: string, updatedAt: string, name: string, indexWhereClause?: string | null, indexType: IndexType, isUnique: boolean, isCustom?: boolean | null, indexFieldMetadataList: Array<{ __typename?: 'IndexField', id: string, fieldMetadataId: string, createdAt: string, updatedAt: string, order: number }> }>, fieldsList: Array<{ __typename?: 'Field', id: string, universalIdentifier: string, type: FieldMetadataType, name: string, label: string, description?: string | null, icon?: string | null, isCustom?: boolean | null, isActive?: boolean | null, isSystem?: boolean | null, isUIReadOnly?: boolean | null, isNullable?: boolean | null, isUnique?: boolean | null, createdAt: string, updatedAt: string, defaultValue?: any | null, options?: any | null, settings?: any | null, isLabelSyncedWithName?: boolean | null, morphId?: string | null, applicationId: string, relation?: { __typename?: 'Relation', type: RelationType, sourceObjectMetadata: { __typename?: 'Object', id: string, nameSingular: string, namePlural: string }, targetObjectMetadata: { __typename?: 'Object', id: string, nameSingular: string, namePlural: string }, sourceFieldMetadata: { __typename?: 'Field', id: string, name: string }, targetFieldMetadata: { __typename?: 'Field', id: string, name: string } } | null, morphRelations?: Array<{ __typename?: 'Relation', type: RelationType, sourceObjectMetadata: { __typename?: 'Object', id: string, nameSingular: string, namePlural: string }, targetObjectMetadata: { __typename?: 'Object', id: string, nameSingular: string, namePlural: string }, sourceFieldMetadata: { __typename?: 'Field', id: string, name: string }, targetFieldMetadata: { __typename?: 'Field', id: string, name: string } }> | null }> }>, logicFunctions: Array<{ __typename?: 'LogicFunction', id: string, name: string, description?: string | null, runtime: string, timeoutSeconds: number, sourceHandlerPath: string, handlerName: string, toolInputSchema?: any | null, isTool: boolean, cronTriggerSettings?: any | null, databaseEventTriggerSettings?: any | null, httpRouteTriggerSettings?: any | null, applicationId?: string | null, createdAt: string, updatedAt: string }> };export type FindManyApplicationsQueryVariables = Exact<{ [key: string]: never; }>;@@ -6538,78 +6572,6 @@ export type ValidatePasswordResetTokenQueryVariables = Exact<{export type ValidatePasswordResetTokenQuery = { __typename?: 'Query', validatePasswordResetToken: { __typename?: 'ValidatePasswordResetToken', id: string, email: string, hasPassword: boolean } };-export type BillingPriceLicensedFragmentFragment = { __typename?: 'BillingPriceLicensed', stripePriceId: string, unitAmount: number, recurringInterval: SubscriptionInterval, priceUsageType: BillingUsageType };--export type BillingPriceMeteredFragmentFragment = { __typename?: 'BillingPriceMetered', priceUsageType: BillingUsageType, recurringInterval: SubscriptionInterval, stripePriceId: string, tiers: Array<{ __typename?: 'BillingPriceTier', flatAmount?: number | null, unitAmount?: number | null, upTo?: number | null }> };--export type BillingSubscriptionSchedulePhaseFragmentFragment = { __typename?: 'BillingSubscriptionSchedulePhase', start_date: number, end_date: number, items: Array<{ __typename?: 'BillingSubscriptionSchedulePhaseItem', price: string, quantity?: number | null }> };--export type BillingSubscriptionSchedulePhaseItemFragmentFragment = { __typename?: 'BillingSubscriptionSchedulePhaseItem', price: string, quantity?: number | null };--export type CancelSwitchBillingIntervalMutationVariables = Exact<{ [key: string]: never; }>;---export type CancelSwitchBillingIntervalMutation = { __typename?: 'Mutation', cancelSwitchBillingInterval: { __typename?: 'BillingUpdate', currentBillingSubscription: { __typename?: 'BillingSubscription', id: string, status: SubscriptionStatus, interval?: SubscriptionInterval | null, metadata: any, currentPeriodEnd?: string | null, phases: Array<{ __typename?: 'BillingSubscriptionSchedulePhase', start_date: number, end_date: number, items: Array<{ __typename?: 'BillingSubscriptionSchedulePhaseItem', price: string, quantity?: number | null }> }>, billingSubscriptionItems?: Array<{ __typename?: 'BillingSubscriptionItem', id: string, hasReachedCurrentPeriodCap: boolean, quantity?: number | null, stripePriceId: string, billingProduct: { __typename?: 'BillingLicensedProduct', name: string, description: string, images?: Array<string> | null, metadata: { __typename?: 'BillingProductMetadata', productKey: BillingProductKey, planKey: BillingPlanKey, priceUsageBased: BillingUsageType } } | { __typename?: 'BillingMeteredProduct', name: string, description: string, images?: Array<string> | null, metadata: { __typename?: 'BillingProductMetadata', productKey: BillingProductKey, planKey: BillingPlanKey, priceUsageBased: BillingUsageType } } }> | null }, billingSubscriptions: Array<{ __typename?: 'BillingSubscription', id: string, status: SubscriptionStatus, metadata: any, phases: Array<{ __typename?: 'BillingSubscriptionSchedulePhase', start_date: number, end_date: number, items: Array<{ __typename?: 'BillingSubscriptionSchedulePhaseItem', price: string, quantity?: number | null }> }> }> } };--export type CancelSwitchMeteredPriceMutationVariables = Exact<{ [key: string]: never; }>;---export type CancelSwitchMeteredPriceMutation = { __typename?: 'Mutation', cancelSwitchMeteredPrice: { __typename?: 'BillingUpdate', currentBillingSubscription: { __typename?: 'BillingSubscription', id: string, status: SubscriptionStatus, interval?: SubscriptionInterval | null, metadata: any, currentPeriodEnd?: string | null, phases: Array<{ __typename?: 'BillingSubscriptionSchedulePhase', start_date: number, end_date: number, items: Array<{ __typename?: 'BillingSubscriptionSchedulePhaseItem', price: string, quantity?: number | null }> }>, billingSubscriptionItems?: Array<{ __typename?: 'BillingSubscriptionItem', id: string, hasReachedCurrentPeriodCap: boolean, quantity?: number | null, stripePriceId: string, billingProduct: { __typename?: 'BillingLicensedProduct', name: string, description: string, images?: Array<string> | null, metadata: { __typename?: 'BillingProductMetadata', productKey: BillingProductKey, planKey: BillingPlanKey, priceUsageBased: BillingUsageType } } | { __typename?: 'BillingMeteredProduct', name: string, description: string, images?: Array<string> | null, metadata: { __typename?: 'BillingProductMetadata', productKey: BillingProductKey, planKey: BillingPlanKey, priceUsageBased: BillingUsageType } } }> | null }, billingSubscriptions: Array<{ __typename?: 'BillingSubscription', id: string, status: SubscriptionStatus, metadata: any, phases: Array<{ __typename?: 'BillingSubscriptionSchedulePhase', start_date: number, end_date: number, items: Array<{ __typename?: 'BillingSubscriptionSchedulePhaseItem', price: string, quantity?: number | null }> }> }> } };--export type CancelSwitchBillingPlanMutationVariables = Exact<{ [key: string]: never; }>;---export type CancelSwitchBillingPlanMutation = { __typename?: 'Mutation', cancelSwitchBillingPlan: { __typename?: 'BillingUpdate', currentBillingSubscription: { __typename?: 'BillingSubscription', id: string, status: SubscriptionStatus, interval?: SubscriptionInterval | null, metadata: any, currentPeriodEnd?: string | null, phases: Array<{ __typename?: 'BillingSubscriptionSchedulePhase', start_date: number, end_date: number, items: Array<{ __typename?: 'BillingSubscriptionSchedulePhaseItem', price: string, quantity?: number | null }> }>, billingSubscriptionItems?: Array<{ __typename?: 'BillingSubscriptionItem', id: string, hasReachedCurrentPeriodCap: boolean, quantity?: number | null, stripePriceId: string, billingProduct: { __typename?: 'BillingLicensedProduct', name: string, description: string, images?: Array<string> | null, metadata: { __typename?: 'BillingProductMetadata', productKey: BillingProductKey, planKey: BillingPlanKey, priceUsageBased: BillingUsageType } } | { __typename?: 'BillingMeteredProduct', name: string, description: string, images?: Array<string> | null, metadata: { __typename?: 'BillingProductMetadata', productKey: BillingProductKey, planKey: BillingPlanKey, priceUsageBased: BillingUsageType } } }> | null }, billingSubscriptions: Array<{ __typename?: 'BillingSubscription', id: string, status: SubscriptionStatus, metadata: any, phases: Array<{ __typename?: 'BillingSubscriptionSchedulePhase', start_date: number, end_date: number, items: Array<{ __typename?: 'BillingSubscriptionSchedulePhaseItem', price: string, quantity?: number | null }> }> }> } };--export type CheckoutSessionMutationVariables = Exact<{- recurringInterval: SubscriptionInterval;- successUrlPath?: InputMaybe<Scalars['String']>;- plan: BillingPlanKey;- requirePaymentMethod: Scalars['Boolean'];-}>;---export type CheckoutSessionMutation = { __typename?: 'Mutation', checkoutSession: { __typename?: 'BillingSession', url?: string | null } };--export type EndSubscriptionTrialPeriodMutationVariables = Exact<{ [key: string]: never; }>;---export type EndSubscriptionTrialPeriodMutation = { __typename?: 'Mutation', endSubscriptionTrialPeriod: { __typename?: 'BillingEndTrialPeriod', status?: SubscriptionStatus | null, hasPaymentMethod: boolean, billingPortalUrl?: string | null } };--export type SetMeteredSubscriptionPriceMutationVariables = Exact<{- priceId: Scalars['String'];-}>;---export type SetMeteredSubscriptionPriceMutation = { __typename?: 'Mutation', setMeteredSubscriptionPrice: { __typename?: 'BillingUpdate', currentBillingSubscription: { __typename?: 'BillingSubscription', id: string, status: SubscriptionStatus, interval?: SubscriptionInterval | null, metadata: any, currentPeriodEnd?: string | null, phases: Array<{ __typename?: 'BillingSubscriptionSchedulePhase', start_date: number, end_date: number, items: Array<{ __typename?: 'BillingSubscriptionSchedulePhaseItem', price: string, quantity?: number | null }> }>, billingSubscriptionItems?: Array<{ __typename?: 'BillingSubscriptionItem', id: string, hasReachedCurrentPeriodCap: boolean, quantity?: number | null, stripePriceId: string, billingProduct: { __typename?: 'BillingLicensedProduct', name: string, description: string, images?: Array<string> | null, metadata: { __typename?: 'BillingProductMetadata', productKey: BillingProductKey, planKey: BillingPlanKey, priceUsageBased: BillingUsageType } } | { __typename?: 'BillingMeteredProduct', name: string, description: string, images?: Array<string> | null, metadata: { __typename?: 'BillingProductMetadata', productKey: BillingProductKey, planKey: BillingPlanKey, priceUsageBased: BillingUsageType } } }> | null }, billingSubscriptions: Array<{ __typename?: 'BillingSubscription', id: string, status: SubscriptionStatus, metadata: any, phases: Array<{ __typename?: 'BillingSubscriptionSchedulePhase', start_date: number, end_date: number, items: Array<{ __typename?: 'BillingSubscriptionSchedulePhaseItem', price: string, quantity?: number | null }> }> }> } };--export type SwitchBillingPlanMutationVariables = Exact<{ [key: string]: never; }>;---export type SwitchBillingPlanMutation = { __typename?: 'Mutation', switchBillingPlan: { __typename?: 'BillingUpdate', currentBillingSubscription: { __typename?: 'BillingSubscription', id: string, status: SubscriptionStatus, interval?: SubscriptionInterval | null, metadata: any, currentPeriodEnd?: string | null, phases: Array<{ __typename?: 'BillingSubscriptionSchedulePhase', start_date: number, end_date: number, items: Array<{ __typename?: 'BillingSubscriptionSchedulePhaseItem', price: string, quantity?: number | null }> }>, billingSubscriptionItems?: Array<{ __typename?: 'BillingSubscriptionItem', id: string, hasReachedCurrentPeriodCap: boolean, quantity?: number | null, stripePriceId: string, billingProduct: { __typename?: 'BillingLicensedProduct', name: string, description: string, images?: Array<string> | null, metadata: { __typename?: 'BillingProductMetadata', productKey: BillingProductKey, planKey: BillingPlanKey, priceUsageBased: BillingUsageType } } | { __typename?: 'BillingMeteredProduct', name: string, description: string, images?: Array<string> | null, metadata: { __typename?: 'BillingProductMetadata', productKey: BillingProductKey, planKey: BillingPlanKey, priceUsageBased: BillingUsageType } } }> | null }, billingSubscriptions: Array<{ __typename?: 'BillingSubscription', id: string, status: SubscriptionStatus, metadata: any, phases: Array<{ __typename?: 'BillingSubscriptionSchedulePhase', start_date: number, end_date: number, items: Array<{ __typename?: 'BillingSubscriptionSchedulePhaseItem', price: string, quantity?: number | null }> }> }> } };--export type SwitchSubscriptionIntervalMutationVariables = Exact<{ [key: string]: never; }>;---export type SwitchSubscriptionIntervalMutation = { __typename?: 'Mutation', switchSubscriptionInterval: { __typename?: 'BillingUpdate', currentBillingSubscription: { __typename?: 'BillingSubscription', id: string, status: SubscriptionStatus, interval?: SubscriptionInterval | null, metadata: any, currentPeriodEnd?: string | null, phases: Array<{ __typename?: 'BillingSubscriptionSchedulePhase', start_date: number, end_date: number, items: Array<{ __typename?: 'BillingSubscriptionSchedulePhaseItem', price: string, quantity?: number | null }> }>, billingSubscriptionItems?: Array<{ __typename?: 'BillingSubscriptionItem', id: string, hasReachedCurrentPeriodCap: boolean, quantity?: number | null, stripePriceId: string, billingProduct: { __typename?: 'BillingLicensedProduct', name: string, description: string, images?: Array<string> | null, metadata: { __typename?: 'BillingProductMetadata', productKey: BillingProductKey, planKey: BillingPlanKey, priceUsageBased: BillingUsageType } } | { __typename?: 'BillingMeteredProduct', name: string, description: string, images?: Array<string> | null, metadata: { __typename?: 'BillingProductMetadata', productKey: BillingProductKey, planKey: BillingPlanKey, priceUsageBased: BillingUsageType } } }> | null }, billingSubscriptions: Array<{ __typename?: 'BillingSubscription', id: string, status: SubscriptionStatus, metadata: any, phases: Array<{ __typename?: 'BillingSubscriptionSchedulePhase', start_date: number, end_date: number, items: Array<{ __typename?: 'BillingSubscriptionSchedulePhaseItem', price: string, quantity?: number | null }> }> }> } };--export type BillingPortalSessionQueryVariables = Exact<{- returnUrlPath?: InputMaybe<Scalars['String']>;-}>;---export type BillingPortalSessionQuery = { __typename?: 'Query', billingPortalSession: { __typename?: 'BillingSession', url?: string | null } };--export type GetMeteredProductsUsageQueryVariables = Exact<{ [key: string]: never; }>;---export type GetMeteredProductsUsageQuery = { __typename?: 'Query', getMeteredProductsUsage: Array<{ __typename?: 'BillingMeteredProductUsage', productKey: BillingProductKey, usedCredits: number, grantedCredits: number, rolloverCredits: number, totalGrantedCredits: number, unitPriceCents: number }> };--export type ListPlansQueryVariables = Exact<{ [key: string]: never; }>;---export type ListPlansQuery = { __typename?: 'Query', listPlans: Array<{ __typename?: 'BillingPlan', planKey: BillingPlanKey, licensedProducts: Array<{ __typename?: 'BillingLicensedProduct', name: string, description: string, images?: Array<string> | null, prices?: Array<{ __typename?: 'BillingPriceLicensed', stripePriceId: string, unitAmount: number, recurringInterval: SubscriptionInterval, priceUsageType: BillingUsageType }> | null, metadata: { __typename?: 'BillingProductMetadata', productKey: BillingProductKey, planKey: BillingPlanKey, priceUsageBased: BillingUsageType } }>, meteredProducts: Array<{ __typename?: 'BillingMeteredProduct', name: string, description: string, images?: Array<string> | null, prices?: Array<{ __typename?: 'BillingPriceMetered', priceUsageType: BillingUsageType, recurringInterval: SubscriptionInterval, stripePriceId: string, tiers: Array<{ __typename?: 'BillingPriceTier', flatAmount?: number | null, unitAmount?: number | null, upTo?: number | null }> }> | null, metadata: { __typename?: 'BillingProductMetadata', productKey: BillingProductKey, planKey: BillingPlanKey, priceUsageBased: BillingUsageType } }> }> };-export type CommandMenuItemFieldsFragment = { __typename?: 'CommandMenuItem', id: string, workflowVersionId?: string | null, frontComponentId?: string | null, engineComponentKey?: EngineComponentKey | null, label: string, icon?: string | null, shortLabel?: string | null, position: number, isPinned: boolean, hotKeys?: Array<string> | null, conditionalAvailabilityExpression?: string | null, availabilityType: CommandMenuItemAvailabilityType, availabilityObjectMetadataId?: string | null, frontComponent?: { __typename?: 'FrontComponent', id: string, name: string, isHeadless: boolean } | null };export type FindManyCommandMenuItemsQueryVariables = Exact<{ [key: string]: never; }>;@@ -7253,6 +7215,87 @@ export type UninstallApplicationMutationVariables = Exact<{export type UninstallApplicationMutation = { __typename?: 'Mutation', uninstallApplication: boolean };+export type UpdateOneApplicationVariableMutationVariables = Exact<{+ key: Scalars['String'];+ value: Scalars['String'];+ applicationId: Scalars['UUID'];+}>;+++export type UpdateOneApplicationVariableMutation = { __typename?: 'Mutation', updateOneApplicationVariable: boolean };++export type BillingPriceLicensedFragmentFragment = { __typename?: 'BillingPriceLicensed', stripePriceId: string, unitAmount: number, recurringInterval: SubscriptionInterval, priceUsageType: BillingUsageType };++export type BillingPriceMeteredFragmentFragment = { __typename?: 'BillingPriceMetered', priceUsageType: BillingUsageType, recurringInterval: SubscriptionInterval, stripePriceId: string, tiers: Array<{ __typename?: 'BillingPriceTier', flatAmount?: number | null, unitAmount?: number | null, upTo?: number | null }> };++export type BillingSubscriptionSchedulePhaseFragmentFragment = { __typename?: 'BillingSubscriptionSchedulePhase', start_date: number, end_date: number, items: Array<{ __typename?: 'BillingSubscriptionSchedulePhaseItem', price: string, quantity?: number | null }> };++export type BillingSubscriptionSchedulePhaseItemFragmentFragment = { __typename?: 'BillingSubscriptionSchedulePhaseItem', price: string, quantity?: number | null };++export type CancelSwitchBillingIntervalMutationVariables = Exact<{ [key: string]: never; }>;+++export type CancelSwitchBillingIntervalMutation = { __typename?: 'Mutation', cancelSwitchBillingInterval: { __typename?: 'BillingUpdate', currentBillingSubscription: { __typename?: 'BillingSubscription', id: string, status: SubscriptionStatus, interval?: SubscriptionInterval | null, metadata: any, currentPeriodEnd?: string | null, phases: Array<{ __typename?: 'BillingSubscriptionSchedulePhase', start_date: number, end_date: number, items: Array<{ __typename?: 'BillingSubscriptionSchedulePhaseItem', price: string, quantity?: number | null }> }>, billingSubscriptionItems?: Array<{ __typename?: 'BillingSubscriptionItem', id: string, hasReachedCurrentPeriodCap: boolean, quantity?: number | null, stripePriceId: string, billingProduct: { __typename?: 'BillingLicensedProduct', name: string, description: string, images?: Array<string> | null, metadata: { __typename?: 'BillingProductMetadata', productKey: BillingProductKey, planKey: BillingPlanKey, priceUsageBased: BillingUsageType } } | { __typename?: 'BillingMeteredProduct', name: string, description: string, images?: Array<string> | null, metadata: { __typename?: 'BillingProductMetadata', productKey: BillingProductKey, planKey: BillingPlanKey, priceUsageBased: BillingUsageType } } }> | null }, billingSubscriptions: Array<{ __typename?: 'BillingSubscription', id: string, status: SubscriptionStatus, metadata: any, phases: Array<{ __typename?: 'BillingSubscriptionSchedulePhase', start_date: number, end_date: number, items: Array<{ __typename?: 'BillingSubscriptionSchedulePhaseItem', price: string, quantity?: number | null }> }> }> } };++export type CancelSwitchMeteredPriceMutationVariables = Exact<{ [key: string]: never; }>;+++export type CancelSwitchMeteredPriceMutation = { __typename?: 'Mutation', cancelSwitchMeteredPrice: { __typename?: 'BillingUpdate', currentBillingSubscription: { __typename?: 'BillingSubscription', id: string, status: SubscriptionStatus, interval?: SubscriptionInterval | null, metadata: any, currentPeriodEnd?: string | null, phases: Array<{ __typename?: 'BillingSubscriptionSchedulePhase', start_date: number, end_date: number, items: Array<{ __typename?: 'BillingSubscriptionSchedulePhaseItem', price: string, quantity?: number | null }> }>, billingSubscriptionItems?: Array<{ __typename?: 'BillingSubscriptionItem', id: string, hasReachedCurrentPeriodCap: boolean, quantity?: number | null, stripePriceId: string, billingProduct: { __typename?: 'BillingLicensedProduct', name: string, description: string, images?: Array<string> | null, metadata: { __typename?: 'BillingProductMetadata', productKey: BillingProductKey, planKey: BillingPlanKey, priceUsageBased: BillingUsageType } } | { __typename?: 'BillingMeteredProduct', name: string, description: string, images?: Array<string> | null, metadata: { __typename?: 'BillingProductMetadata', productKey: BillingProductKey, planKey: BillingPlanKey, priceUsageBased: BillingUsageType } } }> | null }, billingSubscriptions: Array<{ __typename?: 'BillingSubscription', id: string, status: SubscriptionStatus, metadata: any, phases: Array<{ __typename?: 'BillingSubscriptionSchedulePhase', start_date: number, end_date: number, items: Array<{ __typename?: 'BillingSubscriptionSchedulePhaseItem', price: string, quantity?: number | null }> }> }> } };++export type CancelSwitchBillingPlanMutationVariables = Exact<{ [key: string]: never; }>;+++export type CancelSwitchBillingPlanMutation = { __typename?: 'Mutation', cancelSwitchBillingPlan: { __typename?: 'BillingUpdate', currentBillingSubscription: { __typename?: 'BillingSubscription', id: string, status: SubscriptionStatus, interval?: SubscriptionInterval | null, metadata: any, currentPeriodEnd?: string | null, phases: Array<{ __typename?: 'BillingSubscriptionSchedulePhase', start_date: number, end_date: number, items: Array<{ __typename?: 'BillingSubscriptionSchedulePhaseItem', price: string, quantity?: number | null }> }>, billingSubscriptionItems?: Array<{ __typename?: 'BillingSubscriptionItem', id: string, hasReachedCurrentPeriodCap: boolean, quantity?: number | null, stripePriceId: string, billingProduct: { __typename?: 'BillingLicensedProduct', name: string, description: string, images?: Array<string> | null, metadata: { __typename?: 'BillingProductMetadata', productKey: BillingProductKey, planKey: BillingPlanKey, priceUsageBased: BillingUsageType } } | { __typename?: 'BillingMeteredProduct', name: string, description: string, images?: Array<string> | null, metadata: { __typename?: 'BillingProductMetadata', productKey: BillingProductKey, planKey: BillingPlanKey, priceUsageBased: BillingUsageType } } }> | null }, billingSubscriptions: Array<{ __typename?: 'BillingSubscription', id: string, status: SubscriptionStatus, metadata: any, phases: Array<{ __typename?: 'BillingSubscriptionSchedulePhase', start_date: number, end_date: number, items: Array<{ __typename?: 'BillingSubscriptionSchedulePhaseItem', price: string, quantity?: number | null }> }> }> } };++export type CheckoutSessionMutationVariables = Exact<{+ recurringInterval: SubscriptionInterval;+ successUrlPath?: InputMaybe<Scalars['String']>;+ plan: BillingPlanKey;+ requirePaymentMethod: Scalars['Boolean'];+}>;+++export type CheckoutSessionMutation = { __typename?: 'Mutation', checkoutSession: { __typename?: 'BillingSession', url?: string | null } };++export type EndSubscriptionTrialPeriodMutationVariables = Exact<{ [key: string]: never; }>;+++export type EndSubscriptionTrialPeriodMutation = { __typename?: 'Mutation', endSubscriptionTrialPeriod: { __typename?: 'BillingEndTrialPeriod', status?: SubscriptionStatus | null, hasPaymentMethod: boolean, billingPortalUrl?: string | null } };++export type SetMeteredSubscriptionPriceMutationVariables = Exact<{+ priceId: Scalars['String'];+}>;+++export type SetMeteredSubscriptionPriceMutation = { __typename?: 'Mutation', setMeteredSubscriptionPrice: { __typename?: 'BillingUpdate', currentBillingSubscription: { __typename?: 'BillingSubscription', id: string, status: SubscriptionStatus, interval?: SubscriptionInterval | null, metadata: any, currentPeriodEnd?: string | null, phases: Array<{ __typename?: 'BillingSubscriptionSchedulePhase', start_date: number, end_date: number, items: Array<{ __typename?: 'BillingSubscriptionSchedulePhaseItem', price: string, quantity?: number | null }> }>, billingSubscriptionItems?: Array<{ __typename?: 'BillingSubscriptionItem', id: string, hasReachedCurrentPeriodCap: boolean, quantity?: number | null, stripePriceId: string, billingProduct: { __typename?: 'BillingLicensedProduct', name: string, description: string, images?: Array<string> | null, metadata: { __typename?: 'BillingProductMetadata', productKey: BillingProductKey, planKey: BillingPlanKey, priceUsageBased: BillingUsageType } } | { __typename?: 'BillingMeteredProduct', name: string, description: string, images?: Array<string> | null, metadata: { __typename?: 'BillingProductMetadata', productKey: BillingProductKey, planKey: BillingPlanKey, priceUsageBased: BillingUsageType } } }> | null }, billingSubscriptions: Array<{ __typename?: 'BillingSubscription', id: string, status: SubscriptionStatus, metadata: any, phases: Array<{ __typename?: 'BillingSubscriptionSchedulePhase', start_date: number, end_date: number, items: Array<{ __typename?: 'BillingSubscriptionSchedulePhaseItem', price: string, quantity?: number | null }> }> }> } };++export type SwitchBillingPlanMutationVariables = Exact<{ [key: string]: never; }>;+++export type SwitchBillingPlanMutation = { __typename?: 'Mutation', switchBillingPlan: { __typename?: 'BillingUpdate', currentBillingSubscription: { __typename?: 'BillingSubscription', id: string, status: SubscriptionStatus, interval?: SubscriptionInterval | null, metadata: any, currentPeriodEnd?: string | null, phases: Array<{ __typename?: 'BillingSubscriptionSchedulePhase', start_date: number, end_date: number, items: Array<{ __typename?: 'BillingSubscriptionSchedulePhaseItem', price: string, quantity?: number | null }> }>, billingSubscriptionItems?: Array<{ __typename?: 'BillingSubscriptionItem', id: string, hasReachedCurrentPeriodCap: boolean, quantity?: number | null, stripePriceId: string, billingProduct: { __typename?: 'BillingLicensedProduct', name: string, description: string, images?: Array<string> | null, metadata: { __typename?: 'BillingProductMetadata', productKey: BillingProductKey, planKey: BillingPlanKey, priceUsageBased: BillingUsageType } } | { __typename?: 'BillingMeteredProduct', name: string, description: string, images?: Array<string> | null, metadata: { __typename?: 'BillingProductMetadata', productKey: BillingProductKey, planKey: BillingPlanKey, priceUsageBased: BillingUsageType } } }> | null }, billingSubscriptions: Array<{ __typename?: 'BillingSubscription', id: string, status: SubscriptionStatus, metadata: any, phases: Array<{ __typename?: 'BillingSubscriptionSchedulePhase', start_date: number, end_date: number, items: Array<{ __typename?: 'BillingSubscriptionSchedulePhaseItem', price: string, quantity?: number | null }> }> }> } };++export type SwitchSubscriptionIntervalMutationVariables = Exact<{ [key: string]: never; }>;+++export type SwitchSubscriptionIntervalMutation = { __typename?: 'Mutation', switchSubscriptionInterval: { __typename?: 'BillingUpdate', currentBillingSubscription: { __typename?: 'BillingSubscription', id: string, status: SubscriptionStatus, interval?: SubscriptionInterval | null, metadata: any, currentPeriodEnd?: string | null, phases: Array<{ __typename?: 'BillingSubscriptionSchedulePhase', start_date: number, end_date: number, items: Array<{ __typename?: 'BillingSubscriptionSchedulePhaseItem', price: string, quantity?: number | null }> }>, billingSubscriptionItems?: Array<{ __typename?: 'BillingSubscriptionItem', id: string, hasReachedCurrentPeriodCap: boolean, quantity?: number | null, stripePriceId: string, billingProduct: { __typename?: 'BillingLicensedProduct', name: string, description: string, images?: Array<string> | null, metadata: { __typename?: 'BillingProductMetadata', productKey: BillingProductKey, planKey: BillingPlanKey, priceUsageBased: BillingUsageType } } | { __typename?: 'BillingMeteredProduct', name: string, description: string, images?: Array<string> | null, metadata: { __typename?: 'BillingProductMetadata', productKey: BillingProductKey, planKey: BillingPlanKey, priceUsageBased: BillingUsageType } } }> | null }, billingSubscriptions: Array<{ __typename?: 'BillingSubscription', id: string, status: SubscriptionStatus, metadata: any, phases: Array<{ __typename?: 'BillingSubscriptionSchedulePhase', start_date: number, end_date: number, items: Array<{ __typename?: 'BillingSubscriptionSchedulePhaseItem', price: string, quantity?: number | null }> }> }> } };++export type BillingPortalSessionQueryVariables = Exact<{+ returnUrlPath?: InputMaybe<Scalars['String']>;+}>;+++export type BillingPortalSessionQuery = { __typename?: 'Query', billingPortalSession: { __typename?: 'BillingSession', url?: string | null } };++export type GetMeteredProductsUsageQueryVariables = Exact<{ [key: string]: never; }>;+++export type GetMeteredProductsUsageQuery = { __typename?: 'Query', getMeteredProductsUsage: Array<{ __typename?: 'BillingMeteredProductUsage', productKey: BillingProductKey, usedCredits: number, grantedCredits: number, rolloverCredits: number, totalGrantedCredits: number, unitPriceCents: number }> };++export type ListPlansQueryVariables = Exact<{ [key: string]: never; }>;+++export type ListPlansQuery = { __typename?: 'Query', listPlans: Array<{ __typename?: 'BillingPlan', planKey: BillingPlanKey, licensedProducts: Array<{ __typename?: 'BillingLicensedProduct', name: string, description: string, images?: Array<string> | null, prices?: Array<{ __typename?: 'BillingPriceLicensed', stripePriceId: string, unitAmount: number, recurringInterval: SubscriptionInterval, priceUsageType: BillingUsageType }> | null, metadata: { __typename?: 'BillingProductMetadata', productKey: BillingProductKey, planKey: BillingPlanKey, priceUsageBased: BillingUsageType } }>, meteredProducts: Array<{ __typename?: 'BillingMeteredProduct', name: string, description: string, images?: Array<string> | null, prices?: Array<{ __typename?: 'BillingPriceMetered', priceUsageType: BillingUsageType, recurringInterval: SubscriptionInterval, stripePriceId: string, tiers: Array<{ __typename?: 'BillingPriceTier', flatAmount?: number | null, unitAmount?: number | null, upTo?: number | null }> }> | null, metadata: { __typename?: 'BillingProductMetadata', productKey: BillingProductKey, planKey: BillingPlanKey, priceUsageBased: BillingUsageType } }> }> };+export type ApiKeyFragmentFragment = { __typename?: 'ApiKey', id: string, name: string, expiresAt: string, revokedAt?: string | null, role: { __typename?: 'Role', id: string, label: string, icon?: string | null } };export type WebhookFragmentFragment = { __typename?: 'Webhook', id: string, targetUrl: string, operations: Array<string>, description?: string | null, secret: string };@@ -7579,6 +7622,13 @@ export type VerifyTwoFactorAuthenticationMethodForAuthenticatedUserMutationVariaexport type VerifyTwoFactorAuthenticationMethodForAuthenticatedUserMutation = { __typename?: 'Mutation', verifyTwoFactorAuthenticationMethodForAuthenticatedUser: { __typename?: 'VerifyTwoFactorAuthenticationMethod', success: boolean } };+export type GetUsageAnalyticsQueryVariables = Exact<{+ input?: InputMaybe<UsageAnalyticsInput>;+}>;+++export type GetUsageAnalyticsQuery = { __typename?: 'Query', getUsageAnalytics: { __typename?: 'UsageAnalytics', periodStart: string, periodEnd: string, usageByUser: Array<{ __typename?: 'UsageBreakdownItem', key: string, label?: string | null, creditsUsed: number }>, usageByOperationType: Array<{ __typename?: 'UsageBreakdownItem', key: string, creditsUsed: number }>, timeSeries: Array<{ __typename?: 'UsageTimeSeries', date: string, creditsUsed: number }>, userDailyUsage?: { __typename?: 'UsageUserDaily', userWorkspaceId: string, dailyUsage: Array<{ __typename?: 'UsageTimeSeries', date: string, creditsUsed: number }> } | null } };+export type BillingSubscriptionFragmentFragment = { __typename?: 'BillingSubscription', id: string, status: SubscriptionStatus, metadata: any, phases: Array<{ __typename?: 'BillingSubscriptionSchedulePhase', start_date: number, end_date: number, items: Array<{ __typename?: 'BillingSubscriptionSchedulePhaseItem', price: string, quantity?: number | null }> }> };export type CurrentBillingSubscriptionFragmentFragment = { __typename?: 'BillingSubscription', id: string, status: SubscriptionStatus, interval?: SubscriptionInterval | null, metadata: any, currentPeriodEnd?: string | null, phases: Array<{ __typename?: 'BillingSubscriptionSchedulePhase', start_date: number, end_date: number, items: Array<{ __typename?: 'BillingSubscriptionSchedulePhaseItem', price: string, quantity?: number | null }> }>, billingSubscriptionItems?: Array<{ __typename?: 'BillingSubscriptionItem', id: string, hasReachedCurrentPeriodCap: boolean, quantity?: number | null, stripePriceId: string, billingProduct: { __typename?: 'BillingLicensedProduct', name: string, description: string, images?: Array<string> | null, metadata: { __typename?: 'BillingProductMetadata', productKey: BillingProductKey, planKey: BillingPlanKey, priceUsageBased: BillingUsageType } } | { __typename?: 'BillingMeteredProduct', name: string, description: string, images?: Array<string> | null, metadata: { __typename?: 'BillingProductMetadata', productKey: BillingProductKey, planKey: BillingPlanKey, priceUsageBased: BillingUsageType } } }> | null };@@ -8013,8 +8063,6 @@ export const ApplicationFieldsFragmentDoc = {"kind":"Document","definitions":[{"export const AuthTokenFragmentFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AuthTokenFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AuthToken"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"token"}},{"kind":"Field","name":{"kind":"Name","value":"expiresAt"}}]}}]} as unknown as DocumentNode<AuthTokenFragmentFragment, unknown>;export const AuthTokenPairFragmentFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AuthTokenPairFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AuthTokenPair"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"accessOrWorkspaceAgnosticToken"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"AuthTokenFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"refreshToken"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"AuthTokenFragment"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AuthTokenFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AuthToken"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"token"}},{"kind":"Field","name":{"kind":"Name","value":"expiresAt"}}]}}]} as unknown as DocumentNode<AuthTokenPairFragmentFragment, unknown>;export const AvailableSsoIdentityProvidersFragmentFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AvailableSSOIdentityProvidersFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"FindAvailableSSOIDP"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"issuer"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"workspace"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}}]}}]}}]} as unknown as DocumentNode<AvailableSsoIdentityProvidersFragmentFragment, unknown>;-export const BillingPriceLicensedFragmentFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BillingPriceLicensedFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BillingPriceLicensed"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"stripePriceId"}},{"kind":"Field","name":{"kind":"Name","value":"unitAmount"}},{"kind":"Field","name":{"kind":"Name","value":"recurringInterval"}},{"kind":"Field","name":{"kind":"Name","value":"priceUsageType"}}]}}]} as unknown as DocumentNode<BillingPriceLicensedFragmentFragment, unknown>;-export const BillingPriceMeteredFragmentFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BillingPriceMeteredFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BillingPriceMetered"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"priceUsageType"}},{"kind":"Field","name":{"kind":"Name","value":"recurringInterval"}},{"kind":"Field","name":{"kind":"Name","value":"stripePriceId"}},{"kind":"Field","name":{"kind":"Name","value":"tiers"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"flatAmount"}},{"kind":"Field","name":{"kind":"Name","value":"unitAmount"}},{"kind":"Field","name":{"kind":"Name","value":"upTo"}}]}}]}}]} as unknown as DocumentNode<BillingPriceMeteredFragmentFragment, unknown>;export const CommandMenuItemFieldsFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CommandMenuItemFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"CommandMenuItem"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"workflowVersionId"}},{"kind":"Field","name":{"kind":"Name","value":"frontComponentId"}},{"kind":"Field","name":{"kind":"Name","value":"frontComponent"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"isHeadless"}}]}},{"kind":"Field","name":{"kind":"Name","value":"engineComponentKey"}},{"kind":"Field","name":{"kind":"Name","value":"label"}},{"kind":"Field","name":{"kind":"Name","value":"icon"}},{"kind":"Field","name":{"kind":"Name","value":"shortLabel"}},{"kind":"Field","name":{"kind":"Name","value":"position"}},{"kind":"Field","name":{"kind":"Name","value":"isPinned"}},{"kind":"Field","name":{"kind":"Name","value":"hotKeys"}},{"kind":"Field","name":{"kind":"Name","value":"conditionalAvailabilityExpression"}},{"kind":"Field","name":{"kind":"Name","value":"availabilityType"}},{"kind":"Field","name":{"kind":"Name","value":"availabilityObjectMetadataId"}}]}}]} as unknown as DocumentNode<CommandMenuItemFieldsFragment, unknown>;export const PageLayoutWidgetFragmentFragmentDoc = {"kind":"Document","definitions":[{"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":"title"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"objectMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"isOverridden"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"deletedAt"}},{"kind":"Field","name":{"kind":"Name","value":"conditionalDisplay"}},{"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":"format"}},{"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":"GaugeChartConfiguration"}},"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":"displayDataLabel"}},{"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":"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":"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":"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":"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<PageLayoutWidgetFragmentFragment, unknown>;export const PageLayoutTabFragmentFragmentDoc = {"kind":"Document","definitions":[{"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":"isOverridden"}},{"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":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}},{"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":"title"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"objectMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"isOverridden"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"deletedAt"}},{"kind":"Field","name":{"kind":"Name","value":"conditionalDisplay"}},{"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":"format"}},{"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":"GaugeChartConfiguration"}},"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":"displayDataLabel"}},{"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":"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":"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":"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":"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<PageLayoutTabFragmentFragment, unknown>;@@ -8023,6 +8071,8 @@ export const MarketplaceAppFieldsFragmentDoc = {"kind":"Document","definitions":export const NavigationMenuItemFieldsFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"NavigationMenuItemFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"NavigationMenuItem"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"userWorkspaceId"}},{"kind":"Field","name":{"kind":"Name","value":"targetRecordId"}},{"kind":"Field","name":{"kind":"Name","value":"targetObjectMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"viewId"}},{"kind":"Field","name":{"kind":"Name","value":"folderId"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"link"}},{"kind":"Field","name":{"kind":"Name","value":"icon"}},{"kind":"Field","name":{"kind":"Name","value":"color"}},{"kind":"Field","name":{"kind":"Name","value":"position"}},{"kind":"Field","name":{"kind":"Name","value":"applicationId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}}]} as unknown as DocumentNode<NavigationMenuItemFieldsFragment, unknown>;export const NavigationMenuItemQueryFieldsFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"NavigationMenuItemQueryFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"NavigationMenuItem"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"NavigationMenuItemFields"}},{"kind":"Field","name":{"kind":"Name","value":"targetRecordIdentifier"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"labelIdentifier"}},{"kind":"Field","name":{"kind":"Name","value":"imageIdentifier"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"NavigationMenuItemFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"NavigationMenuItem"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"userWorkspaceId"}},{"kind":"Field","name":{"kind":"Name","value":"targetRecordId"}},{"kind":"Field","name":{"kind":"Name","value":"targetObjectMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"viewId"}},{"kind":"Field","name":{"kind":"Name","value":"folderId"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"link"}},{"kind":"Field","name":{"kind":"Name","value":"icon"}},{"kind":"Field","name":{"kind":"Name","value":"color"}},{"kind":"Field","name":{"kind":"Name","value":"position"}},{"kind":"Field","name":{"kind":"Name","value":"applicationId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}}]} as unknown as DocumentNode<NavigationMenuItemQueryFieldsFragment, unknown>;export const ApplicationRegistrationFragmentFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ApplicationRegistrationFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ApplicationRegistration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"universalIdentifier"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"logoUrl"}},{"kind":"Field","name":{"kind":"Name","value":"author"}},{"kind":"Field","name":{"kind":"Name","value":"oAuthClientId"}},{"kind":"Field","name":{"kind":"Name","value":"oAuthRedirectUris"}},{"kind":"Field","name":{"kind":"Name","value":"oAuthScopes"}},{"kind":"Field","name":{"kind":"Name","value":"sourceType"}},{"kind":"Field","name":{"kind":"Name","value":"sourcePackage"}},{"kind":"Field","name":{"kind":"Name","value":"latestAvailableVersion"}},{"kind":"Field","name":{"kind":"Name","value":"websiteUrl"}},{"kind":"Field","name":{"kind":"Name","value":"termsUrl"}},{"kind":"Field","name":{"kind":"Name","value":"isListed"}},{"kind":"Field","name":{"kind":"Name","value":"isFeatured"}},{"kind":"Field","name":{"kind":"Name","value":"ownerWorkspaceId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}}]} as unknown as DocumentNode<ApplicationRegistrationFragmentFragment, unknown>;+export const BillingPriceLicensedFragmentFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BillingPriceLicensedFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BillingPriceLicensed"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"stripePriceId"}},{"kind":"Field","name":{"kind":"Name","value":"unitAmount"}},{"kind":"Field","name":{"kind":"Name","value":"recurringInterval"}},{"kind":"Field","name":{"kind":"Name","value":"priceUsageType"}}]}}]} as unknown as DocumentNode<BillingPriceLicensedFragmentFragment, unknown>;+export const BillingPriceMeteredFragmentFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BillingPriceMeteredFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BillingPriceMetered"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"priceUsageType"}},{"kind":"Field","name":{"kind":"Name","value":"recurringInterval"}},{"kind":"Field","name":{"kind":"Name","value":"stripePriceId"}},{"kind":"Field","name":{"kind":"Name","value":"tiers"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"flatAmount"}},{"kind":"Field","name":{"kind":"Name","value":"unitAmount"}},{"kind":"Field","name":{"kind":"Name","value":"upTo"}}]}}]}}]} as unknown as DocumentNode<BillingPriceMeteredFragmentFragment, unknown>;export const ApiKeyFragmentFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ApiKeyFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ApiKey"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"expiresAt"}},{"kind":"Field","name":{"kind":"Name","value":"revokedAt"}},{"kind":"Field","name":{"kind":"Name","value":"role"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"label"}},{"kind":"Field","name":{"kind":"Name","value":"icon"}}]}}]}}]} as unknown as DocumentNode<ApiKeyFragmentFragment, unknown>;export const WebhookFragmentFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"WebhookFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Webhook"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"targetUrl"}},{"kind":"Field","name":{"kind":"Name","value":"operations"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"secret"}}]}}]} as unknown as DocumentNode<WebhookFragmentFragment, unknown>;export const ApiKeyForRoleFragmentFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ApiKeyForRoleFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ApiKeyForRole"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"expiresAt"}},{"kind":"Field","name":{"kind":"Name","value":"revokedAt"}}]}}]} as unknown as DocumentNode<ApiKeyForRoleFragmentFragment, unknown>;@@ -8074,7 +8124,6 @@ export const GetChatThreadsDocument = {"kind":"Document","definitions":[{"kind":export const GetToolIndexDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetToolIndex"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"getToolIndex"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"category"}},{"kind":"Field","name":{"kind":"Name","value":"objectName"}}]}}]}}]} as unknown as DocumentNode<GetToolIndexQuery, GetToolIndexQueryVariables>;export const GetToolInputSchemaDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetToolInputSchema"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"toolName"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"getToolInputSchema"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"toolName"},"value":{"kind":"Variable","name":{"kind":"Name","value":"toolName"}}}]}]}}]} as unknown as DocumentNode<GetToolInputSchemaQuery, GetToolInputSchemaQueryVariables>;export const TrackAnalyticsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"TrackAnalytics"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"type"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"AnalyticsType"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"event"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"name"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"properties"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"JSON"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"trackAnalytics"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"type"},"value":{"kind":"Variable","name":{"kind":"Name","value":"type"}}},{"kind":"Argument","name":{"kind":"Name","value":"event"},"value":{"kind":"Variable","name":{"kind":"Name","value":"event"}}},{"kind":"Argument","name":{"kind":"Name","value":"name"},"value":{"kind":"Variable","name":{"kind":"Name","value":"name"}}},{"kind":"Argument","name":{"kind":"Name","value":"properties"},"value":{"kind":"Variable","name":{"kind":"Name","value":"properties"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"success"}}]}}]}}]} as unknown as DocumentNode<TrackAnalyticsMutation, TrackAnalyticsMutationVariables>;-export const UpdateOneApplicationVariableDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"UpdateOneApplicationVariable"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"key"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"value"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"applicationId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UUID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"updateOneApplicationVariable"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"key"},"value":{"kind":"Variable","name":{"kind":"Name","value":"key"}}},{"kind":"Argument","name":{"kind":"Name","value":"value"},"value":{"kind":"Variable","name":{"kind":"Name","value":"value"}}},{"kind":"Argument","name":{"kind":"Name","value":"applicationId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"applicationId"}}}]}]}}]} as unknown as DocumentNode<UpdateOneApplicationVariableMutation, UpdateOneApplicationVariableMutationVariables>;export const FindManyApplicationsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"FindManyApplications"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"findManyApplications"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"version"}},{"kind":"Field","name":{"kind":"Name","value":"universalIdentifier"}},{"kind":"Field","name":{"kind":"Name","value":"applicationRegistrationId"}},{"kind":"Field","name":{"kind":"Name","value":"applicationRegistration"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"latestAvailableVersion"}},{"kind":"Field","name":{"kind":"Name","value":"sourceType"}}]}}]}}]}}]} as unknown as DocumentNode<FindManyApplicationsQuery, FindManyApplicationsQueryVariables>;export const FindOneApplicationDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"FindOneApplication"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UUID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"findOneApplication"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ApplicationFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AgentFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Agent"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"label"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"icon"}},{"kind":"Field","name":{"kind":"Name","value":"prompt"}},{"kind":"Field","name":{"kind":"Name","value":"modelId"}},{"kind":"Field","name":{"kind":"Name","value":"responseFormat"}},{"kind":"Field","name":{"kind":"Name","value":"roleId"}},{"kind":"Field","name":{"kind":"Name","value":"isCustom"}},{"kind":"Field","name":{"kind":"Name","value":"modelConfiguration"}},{"kind":"Field","name":{"kind":"Name","value":"evaluationInputs"}},{"kind":"Field","name":{"kind":"Name","value":"applicationId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ObjectMetadataFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Object"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"universalIdentifier"}},{"kind":"Field","name":{"kind":"Name","value":"nameSingular"}},{"kind":"Field","name":{"kind":"Name","value":"namePlural"}},{"kind":"Field","name":{"kind":"Name","value":"labelSingular"}},{"kind":"Field","name":{"kind":"Name","value":"labelPlural"}},{"kind":"Field","name":{"kind":"Name","value":"color"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"icon"}},{"kind":"Field","name":{"kind":"Name","value":"isCustom"}},{"kind":"Field","name":{"kind":"Name","value":"isRemote"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"isSystem"}},{"kind":"Field","name":{"kind":"Name","value":"isUIReadOnly"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"labelIdentifierFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"imageIdentifierFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"applicationId"}},{"kind":"Field","name":{"kind":"Name","value":"shortcut"}},{"kind":"Field","name":{"kind":"Name","value":"isLabelSyncedWithName"}},{"kind":"Field","name":{"kind":"Name","value":"isSearchable"}},{"kind":"Field","name":{"kind":"Name","value":"duplicateCriteria"}},{"kind":"Field","name":{"kind":"Name","value":"indexMetadataList"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"indexWhereClause"}},{"kind":"Field","name":{"kind":"Name","value":"indexType"}},{"kind":"Field","name":{"kind":"Name","value":"isUnique"}},{"kind":"Field","name":{"kind":"Name","value":"isCustom"}},{"kind":"Field","name":{"kind":"Name","value":"indexFieldMetadataList"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"fieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"order"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"fieldsList"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"universalIdentifier"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"label"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"icon"}},{"kind":"Field","name":{"kind":"Name","value":"isCustom"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"isSystem"}},{"kind":"Field","name":{"kind":"Name","value":"isUIReadOnly"}},{"kind":"Field","name":{"kind":"Name","value":"isNullable"}},{"kind":"Field","name":{"kind":"Name","value":"isUnique"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"defaultValue"}},{"kind":"Field","name":{"kind":"Name","value":"options"}},{"kind":"Field","name":{"kind":"Name","value":"settings"}},{"kind":"Field","name":{"kind":"Name","value":"isLabelSyncedWithName"}},{"kind":"Field","name":{"kind":"Name","value":"morphId"}},{"kind":"Field","name":{"kind":"Name","value":"applicationId"}},{"kind":"Field","name":{"kind":"Name","value":"relation"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"sourceObjectMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"nameSingular"}},{"kind":"Field","name":{"kind":"Name","value":"namePlural"}}]}},{"kind":"Field","name":{"kind":"Name","value":"targetObjectMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"nameSingular"}},{"kind":"Field","name":{"kind":"Name","value":"namePlural"}}]}},{"kind":"Field","name":{"kind":"Name","value":"sourceFieldMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"targetFieldMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"morphRelations"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"sourceObjectMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"nameSingular"}},{"kind":"Field","name":{"kind":"Name","value":"namePlural"}}]}},{"kind":"Field","name":{"kind":"Name","value":"targetObjectMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"nameSingular"}},{"kind":"Field","name":{"kind":"Name","value":"namePlural"}}]}},{"kind":"Field","name":{"kind":"Name","value":"sourceFieldMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"targetFieldMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"LogicFunctionFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"LogicFunction"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"runtime"}},{"kind":"Field","name":{"kind":"Name","value":"timeoutSeconds"}},{"kind":"Field","name":{"kind":"Name","value":"sourceHandlerPath"}},{"kind":"Field","name":{"kind":"Name","value":"handlerName"}},{"kind":"Field","name":{"kind":"Name","value":"toolInputSchema"}},{"kind":"Field","name":{"kind":"Name","value":"isTool"}},{"kind":"Field","name":{"kind":"Name","value":"cronTriggerSettings"}},{"kind":"Field","name":{"kind":"Name","value":"databaseEventTriggerSettings"}},{"kind":"Field","name":{"kind":"Name","value":"httpRouteTriggerSettings"}},{"kind":"Field","name":{"kind":"Name","value":"applicationId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ApplicationFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Application"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"version"}},{"kind":"Field","name":{"kind":"Name","value":"universalIdentifier"}},{"kind":"Field","name":{"kind":"Name","value":"applicationRegistrationId"}},{"kind":"Field","name":{"kind":"Name","value":"applicationRegistration"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"latestAvailableVersion"}},{"kind":"Field","name":{"kind":"Name","value":"sourceType"}}]}},{"kind":"Field","name":{"kind":"Name","value":"canBeUninstalled"}},{"kind":"Field","name":{"kind":"Name","value":"defaultRoleId"}},{"kind":"Field","name":{"kind":"Name","value":"settingsCustomTabFrontComponentId"}},{"kind":"Field","name":{"kind":"Name","value":"availablePackages"}},{"kind":"Field","name":{"kind":"Name","value":"applicationVariables"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"key"}},{"kind":"Field","name":{"kind":"Name","value":"value"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"isSecret"}}]}},{"kind":"Field","name":{"kind":"Name","value":"agents"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"AgentFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"objects"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ObjectMetadataFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"logicFunctions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"LogicFunctionFields"}}]}}]}}]} as unknown as DocumentNode<FindOneApplicationQuery, FindOneApplicationQueryVariables>;export const FindOneApplicationByUniversalIdentifierDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"FindOneApplicationByUniversalIdentifier"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"universalIdentifier"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UUID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"findOneApplication"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"universalIdentifier"},"value":{"kind":"Variable","name":{"kind":"Name","value":"universalIdentifier"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}}]}}]} as unknown as DocumentNode<FindOneApplicationByUniversalIdentifierQuery, FindOneApplicationByUniversalIdentifierQueryVariables>;@@ -8103,17 +8152,6 @@ export const CheckUserExistsDocument = {"kind":"Document","definitions":[{"kind"export const FindApplicationRegistrationByClientIdDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"FindApplicationRegistrationByClientId"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"clientId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"findApplicationRegistrationByClientId"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"clientId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"clientId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"logoUrl"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"oAuthScopes"}},{"kind":"Field","name":{"kind":"Name","value":"websiteUrl"}}]}}]}}]} as unknown as DocumentNode<FindApplicationRegistrationByClientIdQuery, FindApplicationRegistrationByClientIdQueryVariables>;export const GetPublicWorkspaceDataByDomainDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetPublicWorkspaceDataByDomain"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"origin"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"getPublicWorkspaceDataByDomain"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"origin"},"value":{"kind":"Variable","name":{"kind":"Name","value":"origin"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"logo"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"workspaceUrls"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"WorkspaceUrlsFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"authProviders"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"sso"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"issuer"}}]}},{"kind":"Field","name":{"kind":"Name","value":"google"}},{"kind":"Field","name":{"kind":"Name","value":"magicLink"}},{"kind":"Field","name":{"kind":"Name","value":"password"}},{"kind":"Field","name":{"kind":"Name","value":"microsoft"}}]}},{"kind":"Field","name":{"kind":"Name","value":"authBypassProviders"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"google"}},{"kind":"Field","name":{"kind":"Name","value":"password"}},{"kind":"Field","name":{"kind":"Name","value":"microsoft"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"WorkspaceUrlsFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"WorkspaceUrls"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"subdomainUrl"}},{"kind":"Field","name":{"kind":"Name","value":"customUrl"}}]}}]} as unknown as DocumentNode<GetPublicWorkspaceDataByDomainQuery, GetPublicWorkspaceDataByDomainQueryVariables>;export const ValidatePasswordResetTokenDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"ValidatePasswordResetToken"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"token"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"validatePasswordResetToken"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"passwordResetToken"},"value":{"kind":"Variable","name":{"kind":"Name","value":"token"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"email"}},{"kind":"Field","name":{"kind":"Name","value":"hasPassword"}}]}}]}}]} as unknown as DocumentNode<ValidatePasswordResetTokenQuery, ValidatePasswordResetTokenQueryVariables>;-export const CancelSwitchBillingIntervalDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"CancelSwitchBillingInterval"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"cancelSwitchBillingInterval"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"currentBillingSubscription"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CurrentBillingSubscriptionFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"billingSubscriptions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BillingSubscriptionFragment"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseItemFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseItem"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"price"}},{"kind":"Field","name":{"kind":"Name","value":"quantity"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhase"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"start_date"}},{"kind":"Field","name":{"kind":"Name","value":"end_date"}},{"kind":"Field","name":{"kind":"Name","value":"items"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseItemFragment"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CurrentBillingSubscriptionFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BillingSubscription"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"interval"}},{"kind":"Field","name":{"kind":"Name","value":"metadata"}},{"kind":"Field","name":{"kind":"Name","value":"currentPeriodEnd"}},{"kind":"Field","name":{"kind":"Name","value":"phases"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"billingSubscriptionItems"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"hasReachedCurrentPeriodCap"}},{"kind":"Field","name":{"kind":"Name","value":"quantity"}},{"kind":"Field","name":{"kind":"Name","value":"stripePriceId"}},{"kind":"Field","name":{"kind":"Name","value":"billingProduct"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"images"}},{"kind":"Field","name":{"kind":"Name","value":"metadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"productKey"}},{"kind":"Field","name":{"kind":"Name","value":"planKey"}},{"kind":"Field","name":{"kind":"Name","value":"priceUsageBased"}}]}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BillingSubscriptionFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BillingSubscription"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"metadata"}},{"kind":"Field","name":{"kind":"Name","value":"phases"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseFragment"}}]}}]}}]} as unknown as DocumentNode<CancelSwitchBillingIntervalMutation, CancelSwitchBillingIntervalMutationVariables>;-export const CancelSwitchMeteredPriceDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"CancelSwitchMeteredPrice"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"cancelSwitchMeteredPrice"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"currentBillingSubscription"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CurrentBillingSubscriptionFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"billingSubscriptions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BillingSubscriptionFragment"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseItemFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseItem"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"price"}},{"kind":"Field","name":{"kind":"Name","value":"quantity"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhase"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"start_date"}},{"kind":"Field","name":{"kind":"Name","value":"end_date"}},{"kind":"Field","name":{"kind":"Name","value":"items"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseItemFragment"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CurrentBillingSubscriptionFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BillingSubscription"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"interval"}},{"kind":"Field","name":{"kind":"Name","value":"metadata"}},{"kind":"Field","name":{"kind":"Name","value":"currentPeriodEnd"}},{"kind":"Field","name":{"kind":"Name","value":"phases"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"billingSubscriptionItems"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"hasReachedCurrentPeriodCap"}},{"kind":"Field","name":{"kind":"Name","value":"quantity"}},{"kind":"Field","name":{"kind":"Name","value":"stripePriceId"}},{"kind":"Field","name":{"kind":"Name","value":"billingProduct"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"images"}},{"kind":"Field","name":{"kind":"Name","value":"metadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"productKey"}},{"kind":"Field","name":{"kind":"Name","value":"planKey"}},{"kind":"Field","name":{"kind":"Name","value":"priceUsageBased"}}]}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BillingSubscriptionFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BillingSubscription"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"metadata"}},{"kind":"Field","name":{"kind":"Name","value":"phases"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseFragment"}}]}}]}}]} as unknown as DocumentNode<CancelSwitchMeteredPriceMutation, CancelSwitchMeteredPriceMutationVariables>;-export const CancelSwitchBillingPlanDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"CancelSwitchBillingPlan"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"cancelSwitchBillingPlan"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"currentBillingSubscription"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CurrentBillingSubscriptionFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"billingSubscriptions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BillingSubscriptionFragment"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseItemFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseItem"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"price"}},{"kind":"Field","name":{"kind":"Name","value":"quantity"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhase"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"start_date"}},{"kind":"Field","name":{"kind":"Name","value":"end_date"}},{"kind":"Field","name":{"kind":"Name","value":"items"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseItemFragment"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CurrentBillingSubscriptionFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BillingSubscription"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"interval"}},{"kind":"Field","name":{"kind":"Name","value":"metadata"}},{"kind":"Field","name":{"kind":"Name","value":"currentPeriodEnd"}},{"kind":"Field","name":{"kind":"Name","value":"phases"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"billingSubscriptionItems"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"hasReachedCurrentPeriodCap"}},{"kind":"Field","name":{"kind":"Name","value":"quantity"}},{"kind":"Field","name":{"kind":"Name","value":"stripePriceId"}},{"kind":"Field","name":{"kind":"Name","value":"billingProduct"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"images"}},{"kind":"Field","name":{"kind":"Name","value":"metadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"productKey"}},{"kind":"Field","name":{"kind":"Name","value":"planKey"}},{"kind":"Field","name":{"kind":"Name","value":"priceUsageBased"}}]}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BillingSubscriptionFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BillingSubscription"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"metadata"}},{"kind":"Field","name":{"kind":"Name","value":"phases"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseFragment"}}]}}]}}]} as unknown as DocumentNode<CancelSwitchBillingPlanMutation, CancelSwitchBillingPlanMutationVariables>;-export const CheckoutSessionDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"CheckoutSession"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"recurringInterval"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"SubscriptionInterval"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"successUrlPath"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"plan"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"BillingPlanKey"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"requirePaymentMethod"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Boolean"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"checkoutSession"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"recurringInterval"},"value":{"kind":"Variable","name":{"kind":"Name","value":"recurringInterval"}}},{"kind":"Argument","name":{"kind":"Name","value":"successUrlPath"},"value":{"kind":"Variable","name":{"kind":"Name","value":"successUrlPath"}}},{"kind":"Argument","name":{"kind":"Name","value":"plan"},"value":{"kind":"Variable","name":{"kind":"Name","value":"plan"}}},{"kind":"Argument","name":{"kind":"Name","value":"requirePaymentMethod"},"value":{"kind":"Variable","name":{"kind":"Name","value":"requirePaymentMethod"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"url"}}]}}]}}]} as unknown as DocumentNode<CheckoutSessionMutation, CheckoutSessionMutationVariables>;-export const EndSubscriptionTrialPeriodDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"EndSubscriptionTrialPeriod"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"endSubscriptionTrialPeriod"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"hasPaymentMethod"}},{"kind":"Field","name":{"kind":"Name","value":"billingPortalUrl"}}]}}]}}]} as unknown as DocumentNode<EndSubscriptionTrialPeriodMutation, EndSubscriptionTrialPeriodMutationVariables>;-export const SetMeteredSubscriptionPriceDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"SetMeteredSubscriptionPrice"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"priceId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"setMeteredSubscriptionPrice"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"priceId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"priceId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"currentBillingSubscription"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CurrentBillingSubscriptionFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"billingSubscriptions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BillingSubscriptionFragment"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseItemFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseItem"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"price"}},{"kind":"Field","name":{"kind":"Name","value":"quantity"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhase"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"start_date"}},{"kind":"Field","name":{"kind":"Name","value":"end_date"}},{"kind":"Field","name":{"kind":"Name","value":"items"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseItemFragment"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CurrentBillingSubscriptionFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BillingSubscription"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"interval"}},{"kind":"Field","name":{"kind":"Name","value":"metadata"}},{"kind":"Field","name":{"kind":"Name","value":"currentPeriodEnd"}},{"kind":"Field","name":{"kind":"Name","value":"phases"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"billingSubscriptionItems"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"hasReachedCurrentPeriodCap"}},{"kind":"Field","name":{"kind":"Name","value":"quantity"}},{"kind":"Field","name":{"kind":"Name","value":"stripePriceId"}},{"kind":"Field","name":{"kind":"Name","value":"billingProduct"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"images"}},{"kind":"Field","name":{"kind":"Name","value":"metadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"productKey"}},{"kind":"Field","name":{"kind":"Name","value":"planKey"}},{"kind":"Field","name":{"kind":"Name","value":"priceUsageBased"}}]}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BillingSubscriptionFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BillingSubscription"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"metadata"}},{"kind":"Field","name":{"kind":"Name","value":"phases"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseFragment"}}]}}]}}]} as unknown as DocumentNode<SetMeteredSubscriptionPriceMutation, SetMeteredSubscriptionPriceMutationVariables>;-export const SwitchBillingPlanDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"SwitchBillingPlan"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"switchBillingPlan"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"currentBillingSubscription"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CurrentBillingSubscriptionFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"billingSubscriptions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BillingSubscriptionFragment"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseItemFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseItem"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"price"}},{"kind":"Field","name":{"kind":"Name","value":"quantity"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhase"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"start_date"}},{"kind":"Field","name":{"kind":"Name","value":"end_date"}},{"kind":"Field","name":{"kind":"Name","value":"items"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseItemFragment"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CurrentBillingSubscriptionFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BillingSubscription"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"interval"}},{"kind":"Field","name":{"kind":"Name","value":"metadata"}},{"kind":"Field","name":{"kind":"Name","value":"currentPeriodEnd"}},{"kind":"Field","name":{"kind":"Name","value":"phases"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"billingSubscriptionItems"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"hasReachedCurrentPeriodCap"}},{"kind":"Field","name":{"kind":"Name","value":"quantity"}},{"kind":"Field","name":{"kind":"Name","value":"stripePriceId"}},{"kind":"Field","name":{"kind":"Name","value":"billingProduct"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"images"}},{"kind":"Field","name":{"kind":"Name","value":"metadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"productKey"}},{"kind":"Field","name":{"kind":"Name","value":"planKey"}},{"kind":"Field","name":{"kind":"Name","value":"priceUsageBased"}}]}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BillingSubscriptionFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BillingSubscription"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"metadata"}},{"kind":"Field","name":{"kind":"Name","value":"phases"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseFragment"}}]}}]}}]} as unknown as DocumentNode<SwitchBillingPlanMutation, SwitchBillingPlanMutationVariables>;-export const SwitchSubscriptionIntervalDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"SwitchSubscriptionInterval"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"switchSubscriptionInterval"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"currentBillingSubscription"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CurrentBillingSubscriptionFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"billingSubscriptions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BillingSubscriptionFragment"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseItemFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseItem"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"price"}},{"kind":"Field","name":{"kind":"Name","value":"quantity"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhase"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"start_date"}},{"kind":"Field","name":{"kind":"Name","value":"end_date"}},{"kind":"Field","name":{"kind":"Name","value":"items"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseItemFragment"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CurrentBillingSubscriptionFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BillingSubscription"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"interval"}},{"kind":"Field","name":{"kind":"Name","value":"metadata"}},{"kind":"Field","name":{"kind":"Name","value":"currentPeriodEnd"}},{"kind":"Field","name":{"kind":"Name","value":"phases"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"billingSubscriptionItems"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"hasReachedCurrentPeriodCap"}},{"kind":"Field","name":{"kind":"Name","value":"quantity"}},{"kind":"Field","name":{"kind":"Name","value":"stripePriceId"}},{"kind":"Field","name":{"kind":"Name","value":"billingProduct"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"images"}},{"kind":"Field","name":{"kind":"Name","value":"metadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"productKey"}},{"kind":"Field","name":{"kind":"Name","value":"planKey"}},{"kind":"Field","name":{"kind":"Name","value":"priceUsageBased"}}]}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BillingSubscriptionFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BillingSubscription"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"metadata"}},{"kind":"Field","name":{"kind":"Name","value":"phases"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseFragment"}}]}}]}}]} as unknown as DocumentNode<SwitchSubscriptionIntervalMutation, SwitchSubscriptionIntervalMutationVariables>;-export const BillingPortalSessionDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"BillingPortalSession"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"returnUrlPath"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"billingPortalSession"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"returnUrlPath"},"value":{"kind":"Variable","name":{"kind":"Name","value":"returnUrlPath"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"url"}}]}}]}}]} as unknown as DocumentNode<BillingPortalSessionQuery, BillingPortalSessionQueryVariables>;-export const GetMeteredProductsUsageDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetMeteredProductsUsage"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"getMeteredProductsUsage"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"productKey"}},{"kind":"Field","name":{"kind":"Name","value":"usedCredits"}},{"kind":"Field","name":{"kind":"Name","value":"grantedCredits"}},{"kind":"Field","name":{"kind":"Name","value":"rolloverCredits"}},{"kind":"Field","name":{"kind":"Name","value":"totalGrantedCredits"}},{"kind":"Field","name":{"kind":"Name","value":"unitPriceCents"}}]}}]}}]} as unknown as DocumentNode<GetMeteredProductsUsageQuery, GetMeteredProductsUsageQueryVariables>;-export const ListPlansDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"listPlans"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"listPlans"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"planKey"}},{"kind":"Field","name":{"kind":"Name","value":"licensedProducts"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"images"}},{"kind":"Field","name":{"kind":"Name","value":"metadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"productKey"}},{"kind":"Field","name":{"kind":"Name","value":"planKey"}},{"kind":"Field","name":{"kind":"Name","value":"priceUsageBased"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BillingLicensedProduct"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"prices"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BillingPriceLicensedFragment"}}]}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"meteredProducts"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"images"}},{"kind":"Field","name":{"kind":"Name","value":"metadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"productKey"}},{"kind":"Field","name":{"kind":"Name","value":"planKey"}},{"kind":"Field","name":{"kind":"Name","value":"priceUsageBased"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BillingMeteredProduct"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"prices"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BillingPriceMeteredFragment"}}]}}]}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BillingPriceLicensedFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BillingPriceLicensed"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"stripePriceId"}},{"kind":"Field","name":{"kind":"Name","value":"unitAmount"}},{"kind":"Field","name":{"kind":"Name","value":"recurringInterval"}},{"kind":"Field","name":{"kind":"Name","value":"priceUsageType"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BillingPriceMeteredFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BillingPriceMetered"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"priceUsageType"}},{"kind":"Field","name":{"kind":"Name","value":"recurringInterval"}},{"kind":"Field","name":{"kind":"Name","value":"stripePriceId"}},{"kind":"Field","name":{"kind":"Name","value":"tiers"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"flatAmount"}},{"kind":"Field","name":{"kind":"Name","value":"unitAmount"}},{"kind":"Field","name":{"kind":"Name","value":"upTo"}}]}}]}}]} as unknown as DocumentNode<ListPlansQuery, ListPlansQueryVariables>;export const FindManyCommandMenuItemsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"FindManyCommandMenuItems"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"commandMenuItems"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CommandMenuItemFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CommandMenuItemFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"CommandMenuItem"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"workflowVersionId"}},{"kind":"Field","name":{"kind":"Name","value":"frontComponentId"}},{"kind":"Field","name":{"kind":"Name","value":"frontComponent"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"isHeadless"}}]}},{"kind":"Field","name":{"kind":"Name","value":"engineComponentKey"}},{"kind":"Field","name":{"kind":"Name","value":"label"}},{"kind":"Field","name":{"kind":"Name","value":"icon"}},{"kind":"Field","name":{"kind":"Name","value":"shortLabel"}},{"kind":"Field","name":{"kind":"Name","value":"position"}},{"kind":"Field","name":{"kind":"Name","value":"isPinned"}},{"kind":"Field","name":{"kind":"Name","value":"hotKeys"}},{"kind":"Field","name":{"kind":"Name","value":"conditionalAvailabilityExpression"}},{"kind":"Field","name":{"kind":"Name","value":"availabilityType"}},{"kind":"Field","name":{"kind":"Name","value":"availabilityObjectMetadataId"}}]}}]} as unknown as DocumentNode<FindManyCommandMenuItemsQuery, FindManyCommandMenuItemsQueryVariables>;export const DuplicateDashboardDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"DuplicateDashboard"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UUID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"duplicateDashboard"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"pageLayoutId"}},{"kind":"Field","name":{"kind":"Name","value":"position"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}}]}}]} as unknown as DocumentNode<DuplicateDashboardMutation, DuplicateDashboardMutationVariables>;export const FindOnePageLayoutDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"FindOnePageLayout"},"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":"getPageLayout"},"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":"title"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"objectMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"isOverridden"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"deletedAt"}},{"kind":"Field","name":{"kind":"Name","value":"conditionalDisplay"}},{"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":"format"}},{"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":"GaugeChartConfiguration"}},"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":"displayDataLabel"}},{"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":"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":"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":"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":"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":"isOverridden"}},{"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":"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":"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<FindOnePageLayoutQuery, FindOnePageLayoutQueryVariables>;@@ -8205,6 +8243,18 @@ export const FindApplicationRegistrationVariablesDocument = {"kind":"Document","export const FindManyApplicationRegistrationsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"FindManyApplicationRegistrations"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"findManyApplicationRegistrations"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ApplicationRegistrationFragment"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ApplicationRegistrationFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ApplicationRegistration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"universalIdentifier"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"logoUrl"}},{"kind":"Field","name":{"kind":"Name","value":"author"}},{"kind":"Field","name":{"kind":"Name","value":"oAuthClientId"}},{"kind":"Field","name":{"kind":"Name","value":"oAuthRedirectUris"}},{"kind":"Field","name":{"kind":"Name","value":"oAuthScopes"}},{"kind":"Field","name":{"kind":"Name","value":"sourceType"}},{"kind":"Field","name":{"kind":"Name","value":"sourcePackage"}},{"kind":"Field","name":{"kind":"Name","value":"latestAvailableVersion"}},{"kind":"Field","name":{"kind":"Name","value":"websiteUrl"}},{"kind":"Field","name":{"kind":"Name","value":"termsUrl"}},{"kind":"Field","name":{"kind":"Name","value":"isListed"}},{"kind":"Field","name":{"kind":"Name","value":"isFeatured"}},{"kind":"Field","name":{"kind":"Name","value":"ownerWorkspaceId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}}]} as unknown as DocumentNode<FindManyApplicationRegistrationsQuery, FindManyApplicationRegistrationsQueryVariables>;export const FindOneApplicationRegistrationDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"FindOneApplicationRegistration"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"findOneApplicationRegistration"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ApplicationRegistrationFragment"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ApplicationRegistrationFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ApplicationRegistration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"universalIdentifier"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"logoUrl"}},{"kind":"Field","name":{"kind":"Name","value":"author"}},{"kind":"Field","name":{"kind":"Name","value":"oAuthClientId"}},{"kind":"Field","name":{"kind":"Name","value":"oAuthRedirectUris"}},{"kind":"Field","name":{"kind":"Name","value":"oAuthScopes"}},{"kind":"Field","name":{"kind":"Name","value":"sourceType"}},{"kind":"Field","name":{"kind":"Name","value":"sourcePackage"}},{"kind":"Field","name":{"kind":"Name","value":"latestAvailableVersion"}},{"kind":"Field","name":{"kind":"Name","value":"websiteUrl"}},{"kind":"Field","name":{"kind":"Name","value":"termsUrl"}},{"kind":"Field","name":{"kind":"Name","value":"isListed"}},{"kind":"Field","name":{"kind":"Name","value":"isFeatured"}},{"kind":"Field","name":{"kind":"Name","value":"ownerWorkspaceId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}}]} as unknown as DocumentNode<FindOneApplicationRegistrationQuery, FindOneApplicationRegistrationQueryVariables>;export const UninstallApplicationDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"UninstallApplication"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"universalIdentifier"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"uninstallApplication"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"universalIdentifier"},"value":{"kind":"Variable","name":{"kind":"Name","value":"universalIdentifier"}}}]}]}}]} as unknown as DocumentNode<UninstallApplicationMutation, UninstallApplicationMutationVariables>;+export const UpdateOneApplicationVariableDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"UpdateOneApplicationVariable"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"key"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"value"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"applicationId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UUID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"updateOneApplicationVariable"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"key"},"value":{"kind":"Variable","name":{"kind":"Name","value":"key"}}},{"kind":"Argument","name":{"kind":"Name","value":"value"},"value":{"kind":"Variable","name":{"kind":"Name","value":"value"}}},{"kind":"Argument","name":{"kind":"Name","value":"applicationId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"applicationId"}}}]}]}}]} as unknown as DocumentNode<UpdateOneApplicationVariableMutation, UpdateOneApplicationVariableMutationVariables>;+export const CancelSwitchBillingIntervalDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"CancelSwitchBillingInterval"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"cancelSwitchBillingInterval"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"currentBillingSubscription"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CurrentBillingSubscriptionFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"billingSubscriptions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BillingSubscriptionFragment"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseItemFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseItem"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"price"}},{"kind":"Field","name":{"kind":"Name","value":"quantity"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhase"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"start_date"}},{"kind":"Field","name":{"kind":"Name","value":"end_date"}},{"kind":"Field","name":{"kind":"Name","value":"items"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseItemFragment"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CurrentBillingSubscriptionFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BillingSubscription"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"interval"}},{"kind":"Field","name":{"kind":"Name","value":"metadata"}},{"kind":"Field","name":{"kind":"Name","value":"currentPeriodEnd"}},{"kind":"Field","name":{"kind":"Name","value":"phases"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"billingSubscriptionItems"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"hasReachedCurrentPeriodCap"}},{"kind":"Field","name":{"kind":"Name","value":"quantity"}},{"kind":"Field","name":{"kind":"Name","value":"stripePriceId"}},{"kind":"Field","name":{"kind":"Name","value":"billingProduct"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"images"}},{"kind":"Field","name":{"kind":"Name","value":"metadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"productKey"}},{"kind":"Field","name":{"kind":"Name","value":"planKey"}},{"kind":"Field","name":{"kind":"Name","value":"priceUsageBased"}}]}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BillingSubscriptionFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BillingSubscription"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"metadata"}},{"kind":"Field","name":{"kind":"Name","value":"phases"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseFragment"}}]}}]}}]} as unknown as DocumentNode<CancelSwitchBillingIntervalMutation, CancelSwitchBillingIntervalMutationVariables>;+export const CancelSwitchMeteredPriceDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"CancelSwitchMeteredPrice"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"cancelSwitchMeteredPrice"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"currentBillingSubscription"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CurrentBillingSubscriptionFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"billingSubscriptions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BillingSubscriptionFragment"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseItemFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseItem"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"price"}},{"kind":"Field","name":{"kind":"Name","value":"quantity"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhase"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"start_date"}},{"kind":"Field","name":{"kind":"Name","value":"end_date"}},{"kind":"Field","name":{"kind":"Name","value":"items"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseItemFragment"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CurrentBillingSubscriptionFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BillingSubscription"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"interval"}},{"kind":"Field","name":{"kind":"Name","value":"metadata"}},{"kind":"Field","name":{"kind":"Name","value":"currentPeriodEnd"}},{"kind":"Field","name":{"kind":"Name","value":"phases"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"billingSubscriptionItems"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"hasReachedCurrentPeriodCap"}},{"kind":"Field","name":{"kind":"Name","value":"quantity"}},{"kind":"Field","name":{"kind":"Name","value":"stripePriceId"}},{"kind":"Field","name":{"kind":"Name","value":"billingProduct"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"images"}},{"kind":"Field","name":{"kind":"Name","value":"metadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"productKey"}},{"kind":"Field","name":{"kind":"Name","value":"planKey"}},{"kind":"Field","name":{"kind":"Name","value":"priceUsageBased"}}]}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BillingSubscriptionFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BillingSubscription"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"metadata"}},{"kind":"Field","name":{"kind":"Name","value":"phases"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseFragment"}}]}}]}}]} as unknown as DocumentNode<CancelSwitchMeteredPriceMutation, CancelSwitchMeteredPriceMutationVariables>;+export const CancelSwitchBillingPlanDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"CancelSwitchBillingPlan"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"cancelSwitchBillingPlan"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"currentBillingSubscription"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CurrentBillingSubscriptionFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"billingSubscriptions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BillingSubscriptionFragment"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseItemFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseItem"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"price"}},{"kind":"Field","name":{"kind":"Name","value":"quantity"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhase"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"start_date"}},{"kind":"Field","name":{"kind":"Name","value":"end_date"}},{"kind":"Field","name":{"kind":"Name","value":"items"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseItemFragment"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CurrentBillingSubscriptionFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BillingSubscription"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"interval"}},{"kind":"Field","name":{"kind":"Name","value":"metadata"}},{"kind":"Field","name":{"kind":"Name","value":"currentPeriodEnd"}},{"kind":"Field","name":{"kind":"Name","value":"phases"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"billingSubscriptionItems"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"hasReachedCurrentPeriodCap"}},{"kind":"Field","name":{"kind":"Name","value":"quantity"}},{"kind":"Field","name":{"kind":"Name","value":"stripePriceId"}},{"kind":"Field","name":{"kind":"Name","value":"billingProduct"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"images"}},{"kind":"Field","name":{"kind":"Name","value":"metadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"productKey"}},{"kind":"Field","name":{"kind":"Name","value":"planKey"}},{"kind":"Field","name":{"kind":"Name","value":"priceUsageBased"}}]}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BillingSubscriptionFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BillingSubscription"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"metadata"}},{"kind":"Field","name":{"kind":"Name","value":"phases"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseFragment"}}]}}]}}]} as unknown as DocumentNode<CancelSwitchBillingPlanMutation, CancelSwitchBillingPlanMutationVariables>;+export const CheckoutSessionDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"CheckoutSession"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"recurringInterval"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"SubscriptionInterval"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"successUrlPath"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"plan"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"BillingPlanKey"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"requirePaymentMethod"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Boolean"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"checkoutSession"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"recurringInterval"},"value":{"kind":"Variable","name":{"kind":"Name","value":"recurringInterval"}}},{"kind":"Argument","name":{"kind":"Name","value":"successUrlPath"},"value":{"kind":"Variable","name":{"kind":"Name","value":"successUrlPath"}}},{"kind":"Argument","name":{"kind":"Name","value":"plan"},"value":{"kind":"Variable","name":{"kind":"Name","value":"plan"}}},{"kind":"Argument","name":{"kind":"Name","value":"requirePaymentMethod"},"value":{"kind":"Variable","name":{"kind":"Name","value":"requirePaymentMethod"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"url"}}]}}]}}]} as unknown as DocumentNode<CheckoutSessionMutation, CheckoutSessionMutationVariables>;+export const EndSubscriptionTrialPeriodDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"EndSubscriptionTrialPeriod"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"endSubscriptionTrialPeriod"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"hasPaymentMethod"}},{"kind":"Field","name":{"kind":"Name","value":"billingPortalUrl"}}]}}]}}]} as unknown as DocumentNode<EndSubscriptionTrialPeriodMutation, EndSubscriptionTrialPeriodMutationVariables>;+export const SetMeteredSubscriptionPriceDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"SetMeteredSubscriptionPrice"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"priceId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"setMeteredSubscriptionPrice"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"priceId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"priceId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"currentBillingSubscription"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CurrentBillingSubscriptionFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"billingSubscriptions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BillingSubscriptionFragment"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseItemFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseItem"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"price"}},{"kind":"Field","name":{"kind":"Name","value":"quantity"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhase"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"start_date"}},{"kind":"Field","name":{"kind":"Name","value":"end_date"}},{"kind":"Field","name":{"kind":"Name","value":"items"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseItemFragment"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CurrentBillingSubscriptionFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BillingSubscription"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"interval"}},{"kind":"Field","name":{"kind":"Name","value":"metadata"}},{"kind":"Field","name":{"kind":"Name","value":"currentPeriodEnd"}},{"kind":"Field","name":{"kind":"Name","value":"phases"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"billingSubscriptionItems"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"hasReachedCurrentPeriodCap"}},{"kind":"Field","name":{"kind":"Name","value":"quantity"}},{"kind":"Field","name":{"kind":"Name","value":"stripePriceId"}},{"kind":"Field","name":{"kind":"Name","value":"billingProduct"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"images"}},{"kind":"Field","name":{"kind":"Name","value":"metadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"productKey"}},{"kind":"Field","name":{"kind":"Name","value":"planKey"}},{"kind":"Field","name":{"kind":"Name","value":"priceUsageBased"}}]}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BillingSubscriptionFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BillingSubscription"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"metadata"}},{"kind":"Field","name":{"kind":"Name","value":"phases"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseFragment"}}]}}]}}]} as unknown as DocumentNode<SetMeteredSubscriptionPriceMutation, SetMeteredSubscriptionPriceMutationVariables>;+export const SwitchBillingPlanDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"SwitchBillingPlan"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"switchBillingPlan"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"currentBillingSubscription"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CurrentBillingSubscriptionFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"billingSubscriptions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BillingSubscriptionFragment"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseItemFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseItem"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"price"}},{"kind":"Field","name":{"kind":"Name","value":"quantity"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhase"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"start_date"}},{"kind":"Field","name":{"kind":"Name","value":"end_date"}},{"kind":"Field","name":{"kind":"Name","value":"items"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseItemFragment"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CurrentBillingSubscriptionFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BillingSubscription"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"interval"}},{"kind":"Field","name":{"kind":"Name","value":"metadata"}},{"kind":"Field","name":{"kind":"Name","value":"currentPeriodEnd"}},{"kind":"Field","name":{"kind":"Name","value":"phases"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"billingSubscriptionItems"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"hasReachedCurrentPeriodCap"}},{"kind":"Field","name":{"kind":"Name","value":"quantity"}},{"kind":"Field","name":{"kind":"Name","value":"stripePriceId"}},{"kind":"Field","name":{"kind":"Name","value":"billingProduct"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"images"}},{"kind":"Field","name":{"kind":"Name","value":"metadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"productKey"}},{"kind":"Field","name":{"kind":"Name","value":"planKey"}},{"kind":"Field","name":{"kind":"Name","value":"priceUsageBased"}}]}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BillingSubscriptionFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BillingSubscription"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"metadata"}},{"kind":"Field","name":{"kind":"Name","value":"phases"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseFragment"}}]}}]}}]} as unknown as DocumentNode<SwitchBillingPlanMutation, SwitchBillingPlanMutationVariables>;+export const SwitchSubscriptionIntervalDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"SwitchSubscriptionInterval"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"switchSubscriptionInterval"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"currentBillingSubscription"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CurrentBillingSubscriptionFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"billingSubscriptions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BillingSubscriptionFragment"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseItemFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseItem"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"price"}},{"kind":"Field","name":{"kind":"Name","value":"quantity"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhase"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"start_date"}},{"kind":"Field","name":{"kind":"Name","value":"end_date"}},{"kind":"Field","name":{"kind":"Name","value":"items"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseItemFragment"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CurrentBillingSubscriptionFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BillingSubscription"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"interval"}},{"kind":"Field","name":{"kind":"Name","value":"metadata"}},{"kind":"Field","name":{"kind":"Name","value":"currentPeriodEnd"}},{"kind":"Field","name":{"kind":"Name","value":"phases"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"billingSubscriptionItems"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"hasReachedCurrentPeriodCap"}},{"kind":"Field","name":{"kind":"Name","value":"quantity"}},{"kind":"Field","name":{"kind":"Name","value":"stripePriceId"}},{"kind":"Field","name":{"kind":"Name","value":"billingProduct"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"images"}},{"kind":"Field","name":{"kind":"Name","value":"metadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"productKey"}},{"kind":"Field","name":{"kind":"Name","value":"planKey"}},{"kind":"Field","name":{"kind":"Name","value":"priceUsageBased"}}]}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BillingSubscriptionFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BillingSubscription"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"metadata"}},{"kind":"Field","name":{"kind":"Name","value":"phases"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseFragment"}}]}}]}}]} as unknown as DocumentNode<SwitchSubscriptionIntervalMutation, SwitchSubscriptionIntervalMutationVariables>;+export const BillingPortalSessionDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"BillingPortalSession"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"returnUrlPath"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"billingPortalSession"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"returnUrlPath"},"value":{"kind":"Variable","name":{"kind":"Name","value":"returnUrlPath"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"url"}}]}}]}}]} as unknown as DocumentNode<BillingPortalSessionQuery, BillingPortalSessionQueryVariables>;+export const GetMeteredProductsUsageDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetMeteredProductsUsage"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"getMeteredProductsUsage"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"productKey"}},{"kind":"Field","name":{"kind":"Name","value":"usedCredits"}},{"kind":"Field","name":{"kind":"Name","value":"grantedCredits"}},{"kind":"Field","name":{"kind":"Name","value":"rolloverCredits"}},{"kind":"Field","name":{"kind":"Name","value":"totalGrantedCredits"}},{"kind":"Field","name":{"kind":"Name","value":"unitPriceCents"}}]}}]}}]} as unknown as DocumentNode<GetMeteredProductsUsageQuery, GetMeteredProductsUsageQueryVariables>;+export const ListPlansDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"listPlans"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"listPlans"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"planKey"}},{"kind":"Field","name":{"kind":"Name","value":"licensedProducts"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"images"}},{"kind":"Field","name":{"kind":"Name","value":"metadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"productKey"}},{"kind":"Field","name":{"kind":"Name","value":"planKey"}},{"kind":"Field","name":{"kind":"Name","value":"priceUsageBased"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BillingLicensedProduct"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"prices"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BillingPriceLicensedFragment"}}]}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"meteredProducts"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"images"}},{"kind":"Field","name":{"kind":"Name","value":"metadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"productKey"}},{"kind":"Field","name":{"kind":"Name","value":"planKey"}},{"kind":"Field","name":{"kind":"Name","value":"priceUsageBased"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BillingMeteredProduct"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"prices"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BillingPriceMeteredFragment"}}]}}]}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BillingPriceLicensedFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BillingPriceLicensed"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"stripePriceId"}},{"kind":"Field","name":{"kind":"Name","value":"unitAmount"}},{"kind":"Field","name":{"kind":"Name","value":"recurringInterval"}},{"kind":"Field","name":{"kind":"Name","value":"priceUsageType"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BillingPriceMeteredFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BillingPriceMetered"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"priceUsageType"}},{"kind":"Field","name":{"kind":"Name","value":"recurringInterval"}},{"kind":"Field","name":{"kind":"Name","value":"stripePriceId"}},{"kind":"Field","name":{"kind":"Name","value":"tiers"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"flatAmount"}},{"kind":"Field","name":{"kind":"Name","value":"unitAmount"}},{"kind":"Field","name":{"kind":"Name","value":"upTo"}}]}}]}}]} as unknown as DocumentNode<ListPlansQuery, ListPlansQueryVariables>;export const AssignRoleToApiKeyDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"AssignRoleToApiKey"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"apiKeyId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UUID"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"roleId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UUID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"assignRoleToApiKey"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"apiKeyId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"apiKeyId"}}},{"kind":"Argument","name":{"kind":"Name","value":"roleId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"roleId"}}}]}]}}]} as unknown as DocumentNode<AssignRoleToApiKeyMutation, AssignRoleToApiKeyMutationVariables>;export const CreateApiKeyDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"CreateApiKey"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"CreateApiKeyInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"createApiKey"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ApiKeyFragment"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ApiKeyFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ApiKey"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"expiresAt"}},{"kind":"Field","name":{"kind":"Name","value":"revokedAt"}},{"kind":"Field","name":{"kind":"Name","value":"role"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"label"}},{"kind":"Field","name":{"kind":"Name","value":"icon"}}]}}]}}]} as unknown as DocumentNode<CreateApiKeyMutation, CreateApiKeyMutationVariables>;export const CreateWebhookDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"CreateWebhook"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"CreateWebhookInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"createWebhook"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"WebhookFragment"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"WebhookFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Webhook"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"targetUrl"}},{"kind":"Field","name":{"kind":"Name","value":"operations"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"secret"}}]}}]} as unknown as DocumentNode<CreateWebhookMutation, CreateWebhookMutationVariables>;@@ -8251,6 +8301,7 @@ export const ValidateApprovedAccessDomainDocument = {"kind":"Document","definitiexport const GetApprovedAccessDomainsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetApprovedAccessDomains"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"getApprovedAccessDomains"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"domain"}},{"kind":"Field","name":{"kind":"Name","value":"isValidated"}}]}}]}}]} as unknown as DocumentNode<GetApprovedAccessDomainsQuery, GetApprovedAccessDomainsQueryVariables>;export const GetSsoIdentityProvidersDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetSSOIdentityProviders"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"getSSOIdentityProviders"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"issuer"}},{"kind":"Field","name":{"kind":"Name","value":"status"}}]}}]}}]} as unknown as DocumentNode<GetSsoIdentityProvidersQuery, GetSsoIdentityProvidersQueryVariables>;export const VerifyTwoFactorAuthenticationMethodForAuthenticatedUserDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"verifyTwoFactorAuthenticationMethodForAuthenticatedUser"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"otp"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"verifyTwoFactorAuthenticationMethodForAuthenticatedUser"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"otp"},"value":{"kind":"Variable","name":{"kind":"Name","value":"otp"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"success"}}]}}]}}]} as unknown as DocumentNode<VerifyTwoFactorAuthenticationMethodForAuthenticatedUserMutation, VerifyTwoFactorAuthenticationMethodForAuthenticatedUserMutationVariables>;+export const GetUsageAnalyticsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetUsageAnalytics"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"UsageAnalyticsInput"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"getUsageAnalytics"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"usageByUser"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"key"}},{"kind":"Field","name":{"kind":"Name","value":"label"}},{"kind":"Field","name":{"kind":"Name","value":"creditsUsed"}}]}},{"kind":"Field","name":{"kind":"Name","value":"usageByOperationType"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"key"}},{"kind":"Field","name":{"kind":"Name","value":"creditsUsed"}}]}},{"kind":"Field","name":{"kind":"Name","value":"timeSeries"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"date"}},{"kind":"Field","name":{"kind":"Name","value":"creditsUsed"}}]}},{"kind":"Field","name":{"kind":"Name","value":"periodStart"}},{"kind":"Field","name":{"kind":"Name","value":"periodEnd"}},{"kind":"Field","name":{"kind":"Name","value":"userDailyUsage"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"userWorkspaceId"}},{"kind":"Field","name":{"kind":"Name","value":"dailyUsage"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"date"}},{"kind":"Field","name":{"kind":"Name","value":"creditsUsed"}}]}}]}}]}}]}}]} as unknown as DocumentNode<GetUsageAnalyticsQuery, GetUsageAnalyticsQueryVariables>;export const DeleteUserAccountDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"DeleteUserAccount"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"deleteUser"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}}]}}]} as unknown as DocumentNode<DeleteUserAccountMutation, DeleteUserAccountMutationVariables>;export const DeleteUserWorkspaceDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"DeleteUserWorkspace"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"workspaceMemberIdToDelete"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"deleteUserFromWorkspace"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"workspaceMemberIdToDelete"},"value":{"kind":"Variable","name":{"kind":"Name","value":"workspaceMemberIdToDelete"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}}]}}]} as unknown as DocumentNode<DeleteUserWorkspaceMutation, DeleteUserWorkspaceMutationVariables>;export const GetCurrentUserDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetCurrentUser"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"currentUser"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"UserQueryFragment"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"WorkspaceMemberQueryFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"WorkspaceMember"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"firstName"}},{"kind":"Field","name":{"kind":"Name","value":"lastName"}}]}},{"kind":"Field","name":{"kind":"Name","value":"colorScheme"}},{"kind":"Field","name":{"kind":"Name","value":"avatarUrl"}},{"kind":"Field","name":{"kind":"Name","value":"locale"}},{"kind":"Field","name":{"kind":"Name","value":"userEmail"}},{"kind":"Field","name":{"kind":"Name","value":"userWorkspaceId"}},{"kind":"Field","name":{"kind":"Name","value":"timeZone"}},{"kind":"Field","name":{"kind":"Name","value":"dateFormat"}},{"kind":"Field","name":{"kind":"Name","value":"timeFormat"}},{"kind":"Field","name":{"kind":"Name","value":"calendarStartDay"}},{"kind":"Field","name":{"kind":"Name","value":"numberFormat"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"PartialWorkspaceMemberQueryFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"WorkspaceMember"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"firstName"}},{"kind":"Field","name":{"kind":"Name","value":"lastName"}}]}},{"kind":"Field","name":{"kind":"Name","value":"avatarUrl"}},{"kind":"Field","name":{"kind":"Name","value":"userEmail"}},{"kind":"Field","name":{"kind":"Name","value":"userWorkspaceId"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"DeletedWorkspaceMemberQueryFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"DeletedWorkspaceMember"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"firstName"}},{"kind":"Field","name":{"kind":"Name","value":"lastName"}}]}},{"kind":"Field","name":{"kind":"Name","value":"avatarUrl"}},{"kind":"Field","name":{"kind":"Name","value":"userEmail"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RowLevelPermissionPredicateFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RowLevelPermissionPredicate"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"fieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"objectMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"operand"}},{"kind":"Field","name":{"kind":"Name","value":"subFieldName"}},{"kind":"Field","name":{"kind":"Name","value":"workspaceMemberFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"workspaceMemberSubFieldName"}},{"kind":"Field","name":{"kind":"Name","value":"rowLevelPermissionPredicateGroupId"}},{"kind":"Field","name":{"kind":"Name","value":"positionInRowLevelPermissionPredicateGroup"}},{"kind":"Field","name":{"kind":"Name","value":"roleId"}},{"kind":"Field","name":{"kind":"Name","value":"value"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RowLevelPermissionPredicateGroupFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RowLevelPermissionPredicateGroup"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"parentRowLevelPermissionPredicateGroupId"}},{"kind":"Field","name":{"kind":"Name","value":"logicalOperator"}},{"kind":"Field","name":{"kind":"Name","value":"positionInRowLevelPermissionPredicateGroup"}},{"kind":"Field","name":{"kind":"Name","value":"roleId"}},{"kind":"Field","name":{"kind":"Name","value":"objectMetadataId"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ObjectPermissionFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ObjectPermission"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"objectMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"canReadObjectRecords"}},{"kind":"Field","name":{"kind":"Name","value":"canUpdateObjectRecords"}},{"kind":"Field","name":{"kind":"Name","value":"canSoftDeleteObjectRecords"}},{"kind":"Field","name":{"kind":"Name","value":"canDestroyObjectRecords"}},{"kind":"Field","name":{"kind":"Name","value":"restrictedFields"}},{"kind":"Field","name":{"kind":"Name","value":"rowLevelPermissionPredicates"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RowLevelPermissionPredicateFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"rowLevelPermissionPredicateGroups"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RowLevelPermissionPredicateGroupFragment"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"WorkspaceUrlsFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"WorkspaceUrls"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"subdomainUrl"}},{"kind":"Field","name":{"kind":"Name","value":"customUrl"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseItemFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseItem"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"price"}},{"kind":"Field","name":{"kind":"Name","value":"quantity"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhase"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"start_date"}},{"kind":"Field","name":{"kind":"Name","value":"end_date"}},{"kind":"Field","name":{"kind":"Name","value":"items"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseItemFragment"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CurrentBillingSubscriptionFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BillingSubscription"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"interval"}},{"kind":"Field","name":{"kind":"Name","value":"metadata"}},{"kind":"Field","name":{"kind":"Name","value":"currentPeriodEnd"}},{"kind":"Field","name":{"kind":"Name","value":"phases"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"billingSubscriptionItems"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"hasReachedCurrentPeriodCap"}},{"kind":"Field","name":{"kind":"Name","value":"quantity"}},{"kind":"Field","name":{"kind":"Name","value":"stripePriceId"}},{"kind":"Field","name":{"kind":"Name","value":"billingProduct"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"images"}},{"kind":"Field","name":{"kind":"Name","value":"metadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"productKey"}},{"kind":"Field","name":{"kind":"Name","value":"planKey"}},{"kind":"Field","name":{"kind":"Name","value":"priceUsageBased"}}]}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BillingSubscriptionFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BillingSubscription"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"metadata"}},{"kind":"Field","name":{"kind":"Name","value":"phases"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BillingSubscriptionSchedulePhaseFragment"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RoleFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Role"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"label"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"icon"}},{"kind":"Field","name":{"kind":"Name","value":"canUpdateAllSettings"}},{"kind":"Field","name":{"kind":"Name","value":"canAccessAllTools"}},{"kind":"Field","name":{"kind":"Name","value":"isEditable"}},{"kind":"Field","name":{"kind":"Name","value":"canReadAllObjectRecords"}},{"kind":"Field","name":{"kind":"Name","value":"canUpdateAllObjectRecords"}},{"kind":"Field","name":{"kind":"Name","value":"canSoftDeleteAllObjectRecords"}},{"kind":"Field","name":{"kind":"Name","value":"canDestroyAllObjectRecords"}},{"kind":"Field","name":{"kind":"Name","value":"canBeAssignedToUsers"}},{"kind":"Field","name":{"kind":"Name","value":"canBeAssignedToAgents"}},{"kind":"Field","name":{"kind":"Name","value":"canBeAssignedToApiKeys"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AvailableWorkspaceFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AvailableWorkspace"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"loginToken"}},{"kind":"Field","name":{"kind":"Name","value":"inviteHash"}},{"kind":"Field","name":{"kind":"Name","value":"personalInviteToken"}},{"kind":"Field","name":{"kind":"Name","value":"workspaceUrls"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"subdomainUrl"}},{"kind":"Field","name":{"kind":"Name","value":"customUrl"}}]}},{"kind":"Field","name":{"kind":"Name","value":"logo"}},{"kind":"Field","name":{"kind":"Name","value":"sso"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"issuer"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"status"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AvailableWorkspacesFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AvailableWorkspaces"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"availableWorkspacesForSignIn"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"AvailableWorkspaceFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"availableWorkspacesForSignUp"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"AvailableWorkspaceFragment"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"UserQueryFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"User"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"firstName"}},{"kind":"Field","name":{"kind":"Name","value":"lastName"}},{"kind":"Field","name":{"kind":"Name","value":"email"}},{"kind":"Field","name":{"kind":"Name","value":"hasPassword"}},{"kind":"Field","name":{"kind":"Name","value":"canAccessFullAdminPanel"}},{"kind":"Field","name":{"kind":"Name","value":"canImpersonate"}},{"kind":"Field","name":{"kind":"Name","value":"supportUserHash"}},{"kind":"Field","name":{"kind":"Name","value":"onboardingStatus"}},{"kind":"Field","name":{"kind":"Name","value":"workspaceMember"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"WorkspaceMemberQueryFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"workspaceMembers"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"PartialWorkspaceMemberQueryFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"deletedWorkspaceMembers"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"DeletedWorkspaceMemberQueryFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"currentUserWorkspace"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"permissionFlags"}},{"kind":"Field","name":{"kind":"Name","value":"objectsPermissions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ObjectPermissionFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"twoFactorAuthenticationMethodSummary"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"twoFactorAuthenticationMethodId"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"strategy"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"currentWorkspace"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"logo"}},{"kind":"Field","name":{"kind":"Name","value":"inviteHash"}},{"kind":"Field","name":{"kind":"Name","value":"allowImpersonation"}},{"kind":"Field","name":{"kind":"Name","value":"activationStatus"}},{"kind":"Field","name":{"kind":"Name","value":"isPublicInviteLinkEnabled"}},{"kind":"Field","name":{"kind":"Name","value":"isGoogleAuthEnabled"}},{"kind":"Field","name":{"kind":"Name","value":"isMicrosoftAuthEnabled"}},{"kind":"Field","name":{"kind":"Name","value":"isPasswordAuthEnabled"}},{"kind":"Field","name":{"kind":"Name","value":"isGoogleAuthBypassEnabled"}},{"kind":"Field","name":{"kind":"Name","value":"isMicrosoftAuthBypassEnabled"}},{"kind":"Field","name":{"kind":"Name","value":"isPasswordAuthBypassEnabled"}},{"kind":"Field","name":{"kind":"Name","value":"subdomain"}},{"kind":"Field","name":{"kind":"Name","value":"customDomain"}},{"kind":"Field","name":{"kind":"Name","value":"hasValidEnterpriseKey"}},{"kind":"Field","name":{"kind":"Name","value":"hasValidSignedEnterpriseKey"}},{"kind":"Field","name":{"kind":"Name","value":"hasValidEnterpriseValidityToken"}},{"kind":"Field","name":{"kind":"Name","value":"workspaceCustomApplication"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}},{"kind":"Field","name":{"kind":"Name","value":"isCustomDomainEnabled"}},{"kind":"Field","name":{"kind":"Name","value":"workspaceUrls"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"WorkspaceUrlsFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"featureFlags"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"key"}},{"kind":"Field","name":{"kind":"Name","value":"value"}}]}},{"kind":"Field","name":{"kind":"Name","value":"metadataVersion"}},{"kind":"Field","name":{"kind":"Name","value":"currentBillingSubscription"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CurrentBillingSubscriptionFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"billingSubscriptions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BillingSubscriptionFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"billingEntitlements"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"key"}},{"kind":"Field","name":{"kind":"Name","value":"value"}}]}},{"kind":"Field","name":{"kind":"Name","value":"workspaceMembersCount"}},{"kind":"Field","name":{"kind":"Name","value":"defaultRole"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RoleFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"fastModel"}},{"kind":"Field","name":{"kind":"Name","value":"smartModel"}},{"kind":"Field","name":{"kind":"Name","value":"aiAdditionalInstructions"}},{"kind":"Field","name":{"kind":"Name","value":"enabledAiModelIds"}},{"kind":"Field","name":{"kind":"Name","value":"useRecommendedModels"}},{"kind":"Field","name":{"kind":"Name","value":"isTwoFactorAuthenticationEnforced"}},{"kind":"Field","name":{"kind":"Name","value":"trashRetentionDays"}},{"kind":"Field","name":{"kind":"Name","value":"eventLogRetentionDays"}},{"kind":"Field","name":{"kind":"Name","value":"editableProfileFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"availableWorkspaces"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"AvailableWorkspacesFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"userVars"}}]}}]} as unknown as DocumentNode<GetCurrentUserQuery, GetCurrentUserQueryVariables>;diff --git a/packages/twenty-front/src/modules/ai/components/AIChatCreditsExhaustedMessage.tsx b/packages/twenty-front/src/modules/ai/components/AIChatCreditsExhaustedMessage.tsxindex 12c775cca22..fa023b328ab 100644--- a/packages/twenty-front/src/modules/ai/components/AIChatCreditsExhaustedMessage.tsx+++ b/packages/twenty-front/src/modules/ai/components/AIChatCreditsExhaustedMessage.tsx@@ -1,5 +1,5 @@import { AIChatBanner } from '@/ai/components/AIChatBanner';-import { useEndSubscriptionTrialPeriod } from '@/billing/hooks/useEndSubscriptionTrialPeriod';+import { useEndSubscriptionTrialPeriod } from '@/settings/billing/hooks/useEndSubscriptionTrialPeriod';import { useRedirect } from '@/domain-manager/hooks/useRedirect';import { usePermissionFlagMap } from '@/settings/roles/hooks/usePermissionFlagMap';import { useSubscriptionStatus } from '@/workspace/hooks/useSubscriptionStatus';diff --git a/packages/twenty-front/src/modules/ai/components/internal/AIChatContextUsageButton.tsx b/packages/twenty-front/src/modules/ai/components/internal/AIChatContextUsageButton.tsxindex 1779b5a9ab1..334d1c361d8 100644--- a/packages/twenty-front/src/modules/ai/components/internal/AIChatContextUsageButton.tsx+++ b/packages/twenty-front/src/modules/ai/components/internal/AIChatContextUsageButton.tsx@@ -13,7 +13,7 @@ import {agentChatUsageState,type AgentChatLastMessageUsage,} from '@/ai/states/agentChatUsageState';-import { SettingsBillingLabelValueItem } from '@/billing/components/internal/SettingsBillingLabelValueItem';+import { SettingsBillingLabelValueItem } from '@/settings/billing/components/internal/SettingsBillingLabelValueItem';import { useAtomComponentSelectorValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentSelectorValue';import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';import { formatNumber } from '~/utils/format/formatNumber';diff --git a/packages/twenty-front/src/modules/app/components/SettingsRoutes.tsx b/packages/twenty-front/src/modules/app/components/SettingsRoutes.tsxindex 1b6b2ac5801..936bd5731c3 100644--- a/packages/twenty-front/src/modules/app/components/SettingsRoutes.tsx+++ b/packages/twenty-front/src/modules/app/components/SettingsRoutes.tsx@@ -259,6 +259,18 @@ const SettingsBilling = lazy(() =>})),);+const SettingsUsage = lazy(() =>+ import('~/pages/settings/SettingsUsage').then((module) => ({+ default: module.SettingsUsage,+ })),+);++const SettingsUsageUserDetail = lazy(() =>+ import('~/pages/settings/SettingsUsageUserDetail').then((module) => ({+ default: module.SettingsUsageUserDetail,+ })),+);+const SettingsObjects = lazy(() =>import('~/pages/settings/data-model/SettingsObjects').then((module) => ({default: module.SettingsObjects,@@ -529,6 +541,19 @@ export const SettingsRoutes = ({ isAdminPageEnabled }: SettingsRoutesProps) => (element={<SettingsLogicFunctionDetail />}/><Route path={SettingsPath.Billing} element={<SettingsBilling />} />+ <Route+ element={+ <SettingsProtectedRouteWrapper+ requiredFeatureFlag={FeatureFlagKey.IS_USAGE_ANALYTICS_ENABLED}+ />+ }+ >+ <Route path={SettingsPath.Usage} element={<SettingsUsage />} />+ <Route+ path={SettingsPath.UsageUserDetail}+ element={<SettingsUsageUserDetail />}+ />+ </Route><Routepath={SettingsPath.Subdomain}element={<SettingsSubdomainPage />}diff --git a/packages/twenty-front/src/modules/app/hooks/useInitializeQueryParamState.ts b/packages/twenty-front/src/modules/app/hooks/useInitializeQueryParamState.tsindex 7fe6bfefbce..2bc96a5f5dd 100644--- a/packages/twenty-front/src/modules/app/hooks/useInitializeQueryParamState.ts+++ b/packages/twenty-front/src/modules/app/hooks/useInitializeQueryParamState.ts@@ -4,7 +4,7 @@ import { billingCheckoutSessionState } from '@/auth/states/billingCheckoutSessioimport { returnToPathState } from '@/auth/states/returnToPathState';import { type BillingCheckoutSession } from '@/auth/types/billingCheckoutSession.type';import { isValidReturnToPath } from '@/auth/utils/isValidReturnToPath';-import { BILLING_CHECKOUT_SESSION_DEFAULT_VALUE } from '@/billing/constants/BillingCheckoutSessionDefaultValue';+import { BILLING_CHECKOUT_SESSION_DEFAULT_VALUE } from '@/settings/billing/constants/BillingCheckoutSessionDefaultValue';import deepEqual from 'deep-equal';import { useStore } from 'jotai';diff --git a/packages/twenty-front/src/modules/auth/states/billingCheckoutSessionState.ts b/packages/twenty-front/src/modules/auth/states/billingCheckoutSessionState.tsindex 1f335e5b236..18c52ad2c1a 100644--- a/packages/twenty-front/src/modules/auth/states/billingCheckoutSessionState.ts+++ b/packages/twenty-front/src/modules/auth/states/billingCheckoutSessionState.ts@@ -1,5 +1,5 @@import { type BillingCheckoutSession } from '@/auth/types/billingCheckoutSession.type';-import { BILLING_CHECKOUT_SESSION_DEFAULT_VALUE } from '@/billing/constants/BillingCheckoutSessionDefaultValue';+import { BILLING_CHECKOUT_SESSION_DEFAULT_VALUE } from '@/settings/billing/constants/BillingCheckoutSessionDefaultValue';import { createAtomState } from '@/ui/utilities/state/jotai/utils/createAtomState';export const billingCheckoutSessionState =diff --git a/packages/twenty-front/src/modules/domain-manager/hooks/useBuildSearchParamsFromUrlSyncedStates.ts b/packages/twenty-front/src/modules/domain-manager/hooks/useBuildSearchParamsFromUrlSyncedStates.tsindex 89d4231ffe2..44a83f4da61 100644--- a/packages/twenty-front/src/modules/domain-manager/hooks/useBuildSearchParamsFromUrlSyncedStates.ts+++ b/packages/twenty-front/src/modules/domain-manager/hooks/useBuildSearchParamsFromUrlSyncedStates.ts@@ -2,7 +2,7 @@ import { useCallback } from 'react';import { billingCheckoutSessionState } from '@/auth/states/billingCheckoutSessionState';import { returnToPathState } from '@/auth/states/returnToPathState';-import { BILLING_CHECKOUT_SESSION_DEFAULT_VALUE } from '@/billing/constants/BillingCheckoutSessionDefaultValue';+import { BILLING_CHECKOUT_SESSION_DEFAULT_VALUE } from '@/settings/billing/constants/BillingCheckoutSessionDefaultValue';import { isNonEmptyString } from '@sniptt/guards';import { useStore } from 'jotai';diff --git a/packages/twenty-front/src/modules/information-banner/components/billing/InformationBannerEndTrialPeriod.tsx b/packages/twenty-front/src/modules/information-banner/components/billing/InformationBannerEndTrialPeriod.tsxindex 16231a2e184..159ccff31dd 100644--- a/packages/twenty-front/src/modules/information-banner/components/billing/InformationBannerEndTrialPeriod.tsx+++ b/packages/twenty-front/src/modules/information-banner/components/billing/InformationBannerEndTrialPeriod.tsx@@ -1,4 +1,4 @@-import { useEndSubscriptionTrialPeriod } from '@/billing/hooks/useEndSubscriptionTrialPeriod';+import { useEndSubscriptionTrialPeriod } from '@/settings/billing/hooks/useEndSubscriptionTrialPeriod';import { InformationBanner } from '@/information-banner/components/InformationBanner';import { usePermissionFlagMap } from '@/settings/roles/hooks/usePermissionFlagMap';import { useLingui } from '@lingui/react/macro';diff --git a/packages/twenty-front/src/modules/information-banner/components/billing/InformationBannerNoBillingSubscription.tsx b/packages/twenty-front/src/modules/information-banner/components/billing/InformationBannerNoBillingSubscription.tsxindex 20c3ac611fd..1be3f7f7d90 100644--- a/packages/twenty-front/src/modules/information-banner/components/billing/InformationBannerNoBillingSubscription.tsx+++ b/packages/twenty-front/src/modules/information-banner/components/billing/InformationBannerNoBillingSubscription.tsx@@ -1,5 +1,5 @@-import { BILLING_CHECKOUT_SESSION_DEFAULT_VALUE } from '@/billing/constants/BillingCheckoutSessionDefaultValue';-import { useHandleCheckoutSession } from '@/billing/hooks/useHandleCheckoutSession';+import { BILLING_CHECKOUT_SESSION_DEFAULT_VALUE } from '@/settings/billing/constants/BillingCheckoutSessionDefaultValue';+import { useHandleCheckoutSession } from '@/settings/billing/hooks/useHandleCheckoutSession';import { InformationBanner } from '@/information-banner/components/InformationBanner';import { usePermissionFlagMap } from '@/settings/roles/hooks/usePermissionFlagMap';import { t } from '@lingui/core/macro';diff --git a/packages/twenty-front/src/modules/layout-customization/hooks/useSaveLayoutCustomization.ts b/packages/twenty-front/src/modules/layout-customization/hooks/useSaveLayoutCustomization.tsindex d349a40b8df..dd4dda31fc7 100644--- a/packages/twenty-front/src/modules/layout-customization/hooks/useSaveLayoutCustomization.ts+++ b/packages/twenty-front/src/modules/layout-customization/hooks/useSaveLayoutCustomization.ts@@ -168,6 +168,7 @@ export const useSaveLayoutCustomization = () => {saveFieldsWidgetGroups,exitLayoutCustomizationMode,enqueueErrorSnackBar,+ isRecordPageLayoutEditingEnabled,store,t,]);diff --git a/packages/twenty-front/src/modules/opportunities/types/Opportunity.ts b/packages/twenty-front/src/modules/opportunities/types/Opportunity.tsdeleted file mode 100644index fe4212d5698..00000000000--- a/packages/twenty-front/src/modules/opportunities/types/Opportunity.ts+++ /dev/null@@ -1,8 +0,0 @@-export type Opportunity = {- __typename: 'Opportunity';- id: string;- createdAt: string;- updatedAt?: string;- deletedAt?: string | null;- name: string | null;-};diff --git a/packages/twenty-front/src/modules/application-variables/graphql/mutations/updateOneApplicationVariable.ts b/packages/twenty-front/src/modules/settings/applications/graphql/mutations/updateOneApplicationVariable.tssimilarity index 100%rename from packages/twenty-front/src/modules/application-variables/graphql/mutations/updateOneApplicationVariable.tsrename to packages/twenty-front/src/modules/settings/applications/graphql/mutations/updateOneApplicationVariable.tsdiff --git a/packages/twenty-front/src/modules/billing/assets/cover-dark.png b/packages/twenty-front/src/modules/settings/billing/assets/cover-dark.pngsimilarity index 100%rename from packages/twenty-front/src/modules/billing/assets/cover-dark.pngrename to packages/twenty-front/src/modules/settings/billing/assets/cover-dark.pngdiff --git a/packages/twenty-front/src/modules/billing/assets/cover-light.png b/packages/twenty-front/src/modules/settings/billing/assets/cover-light.pngsimilarity index 100%rename from packages/twenty-front/src/modules/billing/assets/cover-light.pngrename to packages/twenty-front/src/modules/settings/billing/assets/cover-light.pngdiff --git a/packages/twenty-front/src/modules/billing/components/SettingsBillingContent.tsx b/packages/twenty-front/src/modules/settings/billing/components/SettingsBillingContent.tsxsimilarity index 91%rename from packages/twenty-front/src/modules/billing/components/SettingsBillingContent.tsxrename to packages/twenty-front/src/modules/settings/billing/components/SettingsBillingContent.tsxindex 7b803f71298..197d0754b06 100644--- a/packages/twenty-front/src/modules/billing/components/SettingsBillingContent.tsx+++ b/packages/twenty-front/src/modules/settings/billing/components/SettingsBillingContent.tsx@@ -1,22 +1,22 @@import { useLingui } from '@lingui/react/macro';import { currentWorkspaceState } from '@/auth/states/currentWorkspaceState';-import { SettingsBillingCreditsSection } from '@/billing/components/SettingsBillingCreditsSection';-import { SettingsBillingSubscriptionInfo } from '@/billing/components/SettingsBillingSubscriptionInfo';import { useRedirect } from '@/domain-manager/hooks/useRedirect';+import { SettingsBillingCreditsSection } from '@/settings/billing/components/SettingsBillingCreditsSection';+import { SettingsBillingSubscriptionInfo } from '@/settings/billing/components/SettingsBillingSubscriptionInfo';+import { useGetWorkflowNodeExecutionUsage } from '@/settings/billing/hooks/useGetWorkflowNodeExecutionUsage';import { SettingsPageContainer } from '@/settings/components/SettingsPageContainer';+import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';import { useSubscriptionStatus } from '@/workspace/hooks/useSubscriptionStatus';+import { useQuery } from '@apollo/client/react';import { isDefined } from 'twenty-shared/utils';import { H2Title, IconCircleX, IconCreditCard } from 'twenty-ui/display';import { Button } from 'twenty-ui/input';import { Section } from 'twenty-ui/layout';-import { useQuery } from '@apollo/client/react';import {- SubscriptionStatus,BillingPortalSessionDocument,+ SubscriptionStatus,} from '~/generated-metadata/graphql';-import { useGetWorkflowNodeExecutionUsage } from '@/billing/hooks/useGetWorkflowNodeExecutionUsage';-import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';export const SettingsBillingContent = () => {const { t } = useLingui();diff --git a/packages/twenty-front/src/modules/billing/components/SettingsBillingCreditsSection.tsx b/packages/twenty-front/src/modules/settings/billing/components/SettingsBillingCreditsSection.tsxsimilarity index 70%rename from packages/twenty-front/src/modules/billing/components/SettingsBillingCreditsSection.tsxrename to packages/twenty-front/src/modules/settings/billing/components/SettingsBillingCreditsSection.tsxindex caa9a714e0f..5a98dbc3c8c 100644--- a/packages/twenty-front/src/modules/billing/components/SettingsBillingCreditsSection.tsx+++ b/packages/twenty-front/src/modules/settings/billing/components/SettingsBillingCreditsSection.tsx@@ -1,21 +1,33 @@import { type CurrentWorkspace } from '@/auth/states/currentWorkspaceState';-import { MeteredPriceSelector } from '@/billing/components/internal/MeteredPriceSelector';-import { SettingsBillingLabelValueItem } from '@/billing/components/internal/SettingsBillingLabelValueItem';-import { SubscriptionInfoContainer } from '@/billing/components/SubscriptionInfoContainer';-import { useBillingWording } from '@/billing/hooks/useBillingWording';-import { useCurrentBillingFlags } from '@/billing/hooks/useCurrentBillingFlags';-import { useCurrentMetered } from '@/billing/hooks/useCurrentMetered';-import { useGetWorkflowNodeExecutionUsage } from '@/billing/hooks/useGetWorkflowNodeExecutionUsage';import { useNumberFormat } from '@/localization/hooks/useNumberFormat';+import { MeteredPriceSelector } from '@/settings/billing/components/internal/MeteredPriceSelector';+import { SettingsBillingLabelValueItem } from '@/settings/billing/components/internal/SettingsBillingLabelValueItem';+import { SubscriptionInfoContainer } from '@/settings/billing/components/SubscriptionInfoContainer';+import { useBillingWording } from '@/settings/billing/hooks/useBillingWording';+import { useCurrentBillingFlags } from '@/settings/billing/hooks/useCurrentBillingFlags';+import { useCurrentMetered } from '@/settings/billing/hooks/useCurrentMetered';+import { useGetWorkflowNodeExecutionUsage } from '@/settings/billing/hooks/useGetWorkflowNodeExecutionUsage';+import { useIsFeatureEnabled } from '@/workspace/hooks/useIsFeatureEnabled';import { useSubscriptionStatus } from '@/workspace/hooks/useSubscriptionStatus';+import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import { useContext } from 'react';-import { formatToShortNumber } from 'twenty-shared/utils';-import { H2Title, HorizontalSeparator } from 'twenty-ui/display';+import { SettingsPath } from 'twenty-shared/types';+import { formatToShortNumber, getSettingsPath } from 'twenty-shared/utils';+import { H2Title, HorizontalSeparator, IconChartBar } from 'twenty-ui/display';import { ProgressBar } from 'twenty-ui/feedback';+import { Button } from 'twenty-ui/input';import { Section } from 'twenty-ui/layout';-import { ThemeContext } from 'twenty-ui/theme-constants';-import { SubscriptionStatus } from '~/generated-metadata/graphql';+import { UndecoratedLink } from 'twenty-ui/navigation';+import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import {+ FeatureFlagKey,+ SubscriptionStatus,+} from '~/generated-metadata/graphql';++const StyledCreditUsageFooterActions = styled.div`+ margin-top: ${themeCssVariables.spacing[4]};+`;export const SettingsBillingCreditsSection = ({currentBillingSubscription,@@ -32,6 +44,10 @@ export const SettingsBillingCreditsSection = ({const { getCurrentMeteredPricesByInterval } = useCurrentMetered();+ const isUsageAnalyticsEnabled = useIsFeatureEnabled(+ FeatureFlagKey.IS_USAGE_ANALYTICS_ENABLED,+ );+const { getIntervalLabel } = useBillingWording();const isTrialing = subscriptionStatus === SubscriptionStatus.Trialing;@@ -127,6 +143,18 @@ export const SettingsBillingCreditsSection = ({</>)}</SubscriptionInfoContainer>++ {isUsageAnalyticsEnabled && (+ <StyledCreditUsageFooterActions>+ <UndecoratedLink to={getSettingsPath(SettingsPath.Usage)}>+ <Button+ Icon={IconChartBar}+ title={t`View usage`}+ variant="secondary"+ />+ </UndecoratedLink>+ </StyledCreditUsageFooterActions>+ )}</Section><Section><MeteredPriceSelectordiff --git a/packages/twenty-front/src/modules/billing/components/SettingsBillingSubscriptionInfo.tsx b/packages/twenty-front/src/modules/settings/billing/components/SettingsBillingSubscriptionInfo.tsxsimilarity index 94%rename from packages/twenty-front/src/modules/billing/components/SettingsBillingSubscriptionInfo.tsxrename to packages/twenty-front/src/modules/settings/billing/components/SettingsBillingSubscriptionInfo.tsxindex e27890ef28e..285fbfa07ce 100644--- a/packages/twenty-front/src/modules/billing/components/SettingsBillingSubscriptionInfo.tsx+++ b/packages/twenty-front/src/modules/settings/billing/components/SettingsBillingSubscriptionInfo.tsx@@ -1,26 +1,26 @@-import { SubscriptionInfoContainer } from '@/billing/components/SubscriptionInfoContainer';+import { SubscriptionInfoContainer } from '@/settings/billing/components/SubscriptionInfoContainer';import {SubscriptionInfoHeaderRow,SubscriptionInfoRowContainer,-} from '@/billing/components/internal/SubscriptionInfoRowContainer';+} from '@/settings/billing/components/internal/SubscriptionInfoRowContainer';import {type CurrentWorkspace,currentWorkspaceState,} from '@/auth/states/currentWorkspaceState';-import { PlansTags } from '@/billing/components/internal/PlansTags';-import { useBillingWording } from '@/billing/hooks/useBillingWording';-import { useCurrentBillingFlags } from '@/billing/hooks/useCurrentBillingFlags';-import { useCurrentMetered } from '@/billing/hooks/useCurrentMetered';-import { useCurrentPlan } from '@/billing/hooks/useCurrentPlan';-import { useEndSubscriptionTrialPeriod } from '@/billing/hooks/useEndSubscriptionTrialPeriod';-import { useGetWorkflowNodeExecutionUsage } from '@/billing/hooks/useGetWorkflowNodeExecutionUsage';-import { useHasNextBillingPhase } from '@/billing/hooks/useHasNextBillingPhase';-import { useNextBillingPhase } from '@/billing/hooks/useNextBillingPhase';-import { useNextBillingSeats } from '@/billing/hooks/useNextBillingSeats';-import { useNextPlan } from '@/billing/hooks/useNextPlan';-import { useSplitPhaseItemsInPrices } from '@/billing/hooks/useSplitPhaseItemsInPrices';+import { PlansTags } from '@/settings/billing/components/internal/PlansTags';+import { useBillingWording } from '@/settings/billing/hooks/useBillingWording';+import { useCurrentBillingFlags } from '@/settings/billing/hooks/useCurrentBillingFlags';+import { useCurrentMetered } from '@/settings/billing/hooks/useCurrentMetered';+import { useCurrentPlan } from '@/settings/billing/hooks/useCurrentPlan';+import { useEndSubscriptionTrialPeriod } from '@/settings/billing/hooks/useEndSubscriptionTrialPeriod';+import { useGetWorkflowNodeExecutionUsage } from '@/settings/billing/hooks/useGetWorkflowNodeExecutionUsage';+import { useHasNextBillingPhase } from '@/settings/billing/hooks/useHasNextBillingPhase';+import { useNextBillingPhase } from '@/settings/billing/hooks/useNextBillingPhase';+import { useNextBillingSeats } from '@/settings/billing/hooks/useNextBillingSeats';+import { useNextPlan } from '@/settings/billing/hooks/useNextPlan';+import { useSplitPhaseItemsInPrices } from '@/settings/billing/hooks/useSplitPhaseItemsInPrices';import { useNumberFormat } from '@/localization/hooks/useNumberFormat';import { usePermissionFlagMap } from '@/settings/roles/hooks/usePermissionFlagMap';import { useSnackBar } from '@/ui/feedback/snack-bar-manager/hooks/useSnackBar';diff --git a/packages/twenty-front/src/modules/billing/components/SubscriptionBenefit.tsx b/packages/twenty-front/src/modules/settings/billing/components/SubscriptionBenefit.tsxsimilarity index 100%rename from packages/twenty-front/src/modules/billing/components/SubscriptionBenefit.tsxrename to packages/twenty-front/src/modules/settings/billing/components/SubscriptionBenefit.tsxdiff --git a/packages/twenty-front/src/modules/billing/components/SubscriptionInfoContainer.tsx b/packages/twenty-front/src/modules/settings/billing/components/SubscriptionInfoContainer.tsxsimilarity index 95%rename from packages/twenty-front/src/modules/billing/components/SubscriptionInfoContainer.tsxrename to packages/twenty-front/src/modules/settings/billing/components/SubscriptionInfoContainer.tsxindex 5e8984083b4..5b8f7bf2ade 100644--- a/packages/twenty-front/src/modules/billing/components/SubscriptionInfoContainer.tsx+++ b/packages/twenty-front/src/modules/settings/billing/components/SubscriptionInfoContainer.tsx@@ -5,6 +5,7 @@ const StyledSubscriptionInfoContainer = styled.div`background-color: ${themeCssVariables.background.secondary};border: 1px solid ${themeCssVariables.border.color.medium};border-radius: ${themeCssVariables.border.radius.md};+ box-sizing: border-box;display: flex;flex-direction: column;gap: ${themeCssVariables.spacing[3]};diff --git a/packages/twenty-front/src/modules/billing/components/SubscriptionPrice.tsx b/packages/twenty-front/src/modules/settings/billing/components/SubscriptionPrice.tsxsimilarity index 100%rename from packages/twenty-front/src/modules/billing/components/SubscriptionPrice.tsxrename to packages/twenty-front/src/modules/settings/billing/components/SubscriptionPrice.tsxdiff --git a/packages/twenty-front/src/modules/billing/components/TrialCard.tsx b/packages/twenty-front/src/modules/settings/billing/components/TrialCard.tsxsimilarity index 100%rename from packages/twenty-front/src/modules/billing/components/TrialCard.tsxrename to packages/twenty-front/src/modules/settings/billing/components/TrialCard.tsxdiff --git a/packages/twenty-front/src/modules/billing/components/internal/MeteredPriceSelector.tsx b/packages/twenty-front/src/modules/settings/billing/components/internal/MeteredPriceSelector.tsxsimilarity index 95%rename from packages/twenty-front/src/modules/billing/components/internal/MeteredPriceSelector.tsxrename to packages/twenty-front/src/modules/settings/billing/components/internal/MeteredPriceSelector.tsxindex e54224f50d2..61c96f8915c 100644--- a/packages/twenty-front/src/modules/billing/components/internal/MeteredPriceSelector.tsx+++ b/packages/twenty-front/src/modules/settings/billing/components/internal/MeteredPriceSelector.tsx@@ -1,11 +1,11 @@import { currentWorkspaceState } from '@/auth/states/currentWorkspaceState';-import { useBillingWording } from '@/billing/hooks/useBillingWording';-import { useCurrentMetered } from '@/billing/hooks/useCurrentMetered';-import { useGetWorkflowNodeExecutionUsage } from '@/billing/hooks/useGetWorkflowNodeExecutionUsage';+import { useBillingWording } from '@/settings/billing/hooks/useBillingWording';+import { useCurrentMetered } from '@/settings/billing/hooks/useCurrentMetered';+import { useGetWorkflowNodeExecutionUsage } from '@/settings/billing/hooks/useGetWorkflowNodeExecutionUsage';import {type BillingPriceTiers,type MeteredBillingPrice,-} from '@/billing/types/billing-price-tiers.type';+} from '@/settings/billing/types/billing-price-tiers.type';import { useNumberFormat } from '@/localization/hooks/useNumberFormat';import { useAtomState } from '@/ui/utilities/state/jotai/hooks/useAtomState';import { useSnackBar } from '@/ui/feedback/snack-bar-manager/hooks/useSnackBar';diff --git a/packages/twenty-front/src/modules/billing/components/internal/PlansTags.tsx b/packages/twenty-front/src/modules/settings/billing/components/internal/PlansTags.tsxsimilarity index 100%rename from packages/twenty-front/src/modules/billing/components/internal/PlansTags.tsxrename to packages/twenty-front/src/modules/settings/billing/components/internal/PlansTags.tsxdiff --git a/packages/twenty-front/src/modules/billing/components/internal/SettingsBillingLabelValueItem.tsx b/packages/twenty-front/src/modules/settings/billing/components/internal/SettingsBillingLabelValueItem.tsxsimilarity index 100%rename from packages/twenty-front/src/modules/billing/components/internal/SettingsBillingLabelValueItem.tsxrename to packages/twenty-front/src/modules/settings/billing/components/internal/SettingsBillingLabelValueItem.tsxdiff --git a/packages/twenty-front/src/modules/billing/components/internal/SubscriptionInfoRowContainer.tsx b/packages/twenty-front/src/modules/settings/billing/components/internal/SubscriptionInfoRowContainer.tsxsimilarity index 100%rename from packages/twenty-front/src/modules/billing/components/internal/SubscriptionInfoRowContainer.tsxrename to packages/twenty-front/src/modules/settings/billing/components/internal/SubscriptionInfoRowContainer.tsxdiff --git a/packages/twenty-front/src/modules/billing/constants/BillingCheckoutSessionDefaultValue.ts b/packages/twenty-front/src/modules/settings/billing/constants/BillingCheckoutSessionDefaultValue.tssimilarity index 100%rename from packages/twenty-front/src/modules/billing/constants/BillingCheckoutSessionDefaultValue.tsrename to packages/twenty-front/src/modules/settings/billing/constants/BillingCheckoutSessionDefaultValue.tsdiff --git a/packages/twenty-front/src/modules/billing/graphql/fragments/billingPriceLicensedFragment.ts b/packages/twenty-front/src/modules/settings/billing/graphql/fragments/billingPriceLicensedFragment.tssimilarity index 100%rename from packages/twenty-front/src/modules/billing/graphql/fragments/billingPriceLicensedFragment.tsrename to packages/twenty-front/src/modules/settings/billing/graphql/fragments/billingPriceLicensedFragment.tsdiff --git a/packages/twenty-front/src/modules/billing/graphql/fragments/billingPriceMeteredFragment.ts b/packages/twenty-front/src/modules/settings/billing/graphql/fragments/billingPriceMeteredFragment.tssimilarity index 100%rename from packages/twenty-front/src/modules/billing/graphql/fragments/billingPriceMeteredFragment.tsrename to packages/twenty-front/src/modules/settings/billing/graphql/fragments/billingPriceMeteredFragment.tsdiff --git a/packages/twenty-front/src/modules/billing/graphql/fragments/billingSubscriptionSchedulePhaseFragment.ts b/packages/twenty-front/src/modules/settings/billing/graphql/fragments/billingSubscriptionSchedulePhaseFragment.tssimilarity index 100%rename from packages/twenty-front/src/modules/billing/graphql/fragments/billingSubscriptionSchedulePhaseFragment.tsrename to packages/twenty-front/src/modules/settings/billing/graphql/fragments/billingSubscriptionSchedulePhaseFragment.tsdiff --git a/packages/twenty-front/src/modules/billing/graphql/fragments/billingSubscriptionSchedulePhaseItemFragment.ts b/packages/twenty-front/src/modules/settings/billing/graphql/fragments/billingSubscriptionSchedulePhaseItemFragment.tssimilarity index 100%rename from packages/twenty-front/src/modules/billing/graphql/fragments/billingSubscriptionSchedulePhaseItemFragment.tsrename to packages/twenty-front/src/modules/settings/billing/graphql/fragments/billingSubscriptionSchedulePhaseItemFragment.tsdiff --git a/packages/twenty-front/src/modules/billing/graphql/mutations/cancelSwitchInterval.ts b/packages/twenty-front/src/modules/settings/billing/graphql/mutations/cancelSwitchInterval.tssimilarity index 100%rename from packages/twenty-front/src/modules/billing/graphql/mutations/cancelSwitchInterval.tsrename to packages/twenty-front/src/modules/settings/billing/graphql/mutations/cancelSwitchInterval.tsdiff --git a/packages/twenty-front/src/modules/billing/graphql/mutations/cancelSwitchMeteredPrice.ts b/packages/twenty-front/src/modules/settings/billing/graphql/mutations/cancelSwitchMeteredPrice.tssimilarity index 100%rename from packages/twenty-front/src/modules/billing/graphql/mutations/cancelSwitchMeteredPrice.tsrename to packages/twenty-front/src/modules/settings/billing/graphql/mutations/cancelSwitchMeteredPrice.tsdiff --git a/packages/twenty-front/src/modules/billing/graphql/mutations/cancelSwitchPlan.ts b/packages/twenty-front/src/modules/settings/billing/graphql/mutations/cancelSwitchPlan.tssimilarity index 100%rename from packages/twenty-front/src/modules/billing/graphql/mutations/cancelSwitchPlan.tsrename to packages/twenty-front/src/modules/settings/billing/graphql/mutations/cancelSwitchPlan.tsdiff --git a/packages/twenty-front/src/modules/billing/graphql/mutations/checkoutSession.ts b/packages/twenty-front/src/modules/settings/billing/graphql/mutations/checkoutSession.tssimilarity index 100%rename from packages/twenty-front/src/modules/billing/graphql/mutations/checkoutSession.tsrename to packages/twenty-front/src/modules/settings/billing/graphql/mutations/checkoutSession.tsdiff --git a/packages/twenty-front/src/modules/billing/graphql/mutations/endSubscriptionTrialPeriod.ts b/packages/twenty-front/src/modules/settings/billing/graphql/mutations/endSubscriptionTrialPeriod.tssimilarity index 100%rename from packages/twenty-front/src/modules/billing/graphql/mutations/endSubscriptionTrialPeriod.tsrename to packages/twenty-front/src/modules/settings/billing/graphql/mutations/endSubscriptionTrialPeriod.tsdiff --git a/packages/twenty-front/src/modules/billing/graphql/mutations/setMeteredSubscriptionPrice.ts b/packages/twenty-front/src/modules/settings/billing/graphql/mutations/setMeteredSubscriptionPrice.tssimilarity index 100%rename from packages/twenty-front/src/modules/billing/graphql/mutations/setMeteredSubscriptionPrice.tsrename to packages/twenty-front/src/modules/settings/billing/graphql/mutations/setMeteredSubscriptionPrice.tsdiff --git a/packages/twenty-front/src/modules/billing/graphql/mutations/switchSubscriptionToEnterprisePlan.ts b/packages/twenty-front/src/modules/settings/billing/graphql/mutations/switchSubscriptionToEnterprisePlan.tssimilarity index 100%rename from packages/twenty-front/src/modules/billing/graphql/mutations/switchSubscriptionToEnterprisePlan.tsrename to packages/twenty-front/src/modules/settings/billing/graphql/mutations/switchSubscriptionToEnterprisePlan.tsdiff --git a/packages/twenty-front/src/modules/billing/graphql/mutations/switchSubscriptionToYearlyInterval.ts b/packages/twenty-front/src/modules/settings/billing/graphql/mutations/switchSubscriptionToYearlyInterval.tssimilarity index 100%rename from packages/twenty-front/src/modules/billing/graphql/mutations/switchSubscriptionToYearlyInterval.tsrename to packages/twenty-front/src/modules/settings/billing/graphql/mutations/switchSubscriptionToYearlyInterval.tsdiff --git a/packages/twenty-front/src/modules/billing/graphql/queries/billingPortalSession.ts b/packages/twenty-front/src/modules/settings/billing/graphql/queries/billingPortalSession.tssimilarity index 100%rename from packages/twenty-front/src/modules/billing/graphql/queries/billingPortalSession.tsrename to packages/twenty-front/src/modules/settings/billing/graphql/queries/billingPortalSession.tsdiff --git a/packages/twenty-front/src/modules/billing/graphql/queries/getMeteredProductsUsage.ts b/packages/twenty-front/src/modules/settings/billing/graphql/queries/getMeteredProductsUsage.tssimilarity index 100%rename from packages/twenty-front/src/modules/billing/graphql/queries/getMeteredProductsUsage.tsrename to packages/twenty-front/src/modules/settings/billing/graphql/queries/getMeteredProductsUsage.tsdiff --git a/packages/twenty-front/src/modules/billing/graphql/queries/listPlans.ts b/packages/twenty-front/src/modules/settings/billing/graphql/queries/listPlans.tssimilarity index 77%rename from packages/twenty-front/src/modules/billing/graphql/queries/listPlans.tsrename to packages/twenty-front/src/modules/settings/billing/graphql/queries/listPlans.tsindex 4a62f6b3a6c..969f377b4ef 100644--- a/packages/twenty-front/src/modules/billing/graphql/queries/listPlans.ts+++ b/packages/twenty-front/src/modules/settings/billing/graphql/queries/listPlans.ts@@ -1,6 +1,6 @@import { gql } from '@apollo/client';-import { BILLING_PRICE_METERED_FRAGMENT } from '@/billing/graphql/fragments/billingPriceMeteredFragment';-import { BILLING_PRICE_LICENSED_FRAGMENT } from '@/billing/graphql/fragments/billingPriceLicensedFragment';+import { BILLING_PRICE_METERED_FRAGMENT } from '@/settings/billing/graphql/fragments/billingPriceMeteredFragment';+import { BILLING_PRICE_LICENSED_FRAGMENT } from '@/settings/billing/graphql/fragments/billingPriceLicensedFragment';export const LIST_PLANS = gql`query listPlans {diff --git a/packages/twenty-front/src/modules/billing/hooks/__tests__/useAllBillingPrices.test.ts b/packages/twenty-front/src/modules/settings/billing/hooks/__tests__/useAllBillingPrices.test.tssimilarity index 63%rename from packages/twenty-front/src/modules/billing/hooks/__tests__/useAllBillingPrices.test.tsrename to packages/twenty-front/src/modules/settings/billing/hooks/__tests__/useAllBillingPrices.test.tsindex 2dc28328e48..d7e23e9f73c 100644--- a/packages/twenty-front/src/modules/billing/hooks/__tests__/useAllBillingPrices.test.ts+++ b/packages/twenty-front/src/modules/settings/billing/hooks/__tests__/useAllBillingPrices.test.ts@@ -1,4 +1,4 @@-import { useAllBillingPrices } from '@/billing/hooks/useAllBillingPrices';+import { useAllBillingPrices } from '@/settings/billing/hooks/useAllBillingPrices';describe('useAllBillingPrices', () => {it('should be a function', () => {diff --git a/packages/twenty-front/src/modules/billing/hooks/__tests__/useBaseLicensedPriceByPlanKeyAndInterval.test.ts b/packages/twenty-front/src/modules/settings/billing/hooks/__tests__/useBaseLicensedPriceByPlanKeyAndInterval.test.tssimilarity index 59%rename from packages/twenty-front/src/modules/billing/hooks/__tests__/useBaseLicensedPriceByPlanKeyAndInterval.test.tsrename to packages/twenty-front/src/modules/settings/billing/hooks/__tests__/useBaseLicensedPriceByPlanKeyAndInterval.test.tsindex 6a21b692992..2f638fbe3c7 100644--- a/packages/twenty-front/src/modules/billing/hooks/__tests__/useBaseLicensedPriceByPlanKeyAndInterval.test.ts+++ b/packages/twenty-front/src/modules/settings/billing/hooks/__tests__/useBaseLicensedPriceByPlanKeyAndInterval.test.ts@@ -1,4 +1,4 @@-import { useBaseLicensedPriceByPlanKeyAndInterval } from '@/billing/hooks/useBaseLicensedPriceByPlanKeyAndInterval';+import { useBaseLicensedPriceByPlanKeyAndInterval } from '@/settings/billing/hooks/useBaseLicensedPriceByPlanKeyAndInterval';describe('useBaseLicensedPriceByPlanKeyAndInterval', () => {it('should be a function', () => {diff --git a/packages/twenty-front/src/modules/billing/hooks/__tests__/useBaseProductByPlanKey.test.ts b/packages/twenty-front/src/modules/settings/billing/hooks/__tests__/useBaseProductByPlanKey.test.tssimilarity index 62%rename from packages/twenty-front/src/modules/billing/hooks/__tests__/useBaseProductByPlanKey.test.tsrename to packages/twenty-front/src/modules/settings/billing/hooks/__tests__/useBaseProductByPlanKey.test.tsindex f8e30f954fd..7ad5e19121d 100644--- a/packages/twenty-front/src/modules/billing/hooks/__tests__/useBaseProductByPlanKey.test.ts+++ b/packages/twenty-front/src/modules/settings/billing/hooks/__tests__/useBaseProductByPlanKey.test.ts@@ -1,4 +1,4 @@-import { useBaseProductByPlanKey } from '@/billing/hooks/useBaseProductByPlanKey';+import { useBaseProductByPlanKey } from '@/settings/billing/hooks/useBaseProductByPlanKey';describe('useBaseProductByPlanKey', () => {it('should be a function', () => {diff --git a/packages/twenty-front/src/modules/billing/hooks/__tests__/useBillingWording.test.ts b/packages/twenty-front/src/modules/settings/billing/hooks/__tests__/useBillingWording.test.tssimilarity index 63%rename from packages/twenty-front/src/modules/billing/hooks/__tests__/useBillingWording.test.tsrename to packages/twenty-front/src/modules/settings/billing/hooks/__tests__/useBillingWording.test.tsindex 579fd9a797b..b37a1694903 100644--- a/packages/twenty-front/src/modules/billing/hooks/__tests__/useBillingWording.test.ts+++ b/packages/twenty-front/src/modules/settings/billing/hooks/__tests__/useBillingWording.test.ts@@ -1,4 +1,4 @@-import { useBillingWording } from '@/billing/hooks/useBillingWording';+import { useBillingWording } from '@/settings/billing/hooks/useBillingWording';describe('useBillingWording', () => {it('should be a function', () => {diff --git a/packages/twenty-front/src/modules/billing/hooks/__tests__/useCurrentBillingFlags.test.ts b/packages/twenty-front/src/modules/settings/billing/hooks/__tests__/useCurrentBillingFlags.test.tssimilarity index 62%rename from packages/twenty-front/src/modules/billing/hooks/__tests__/useCurrentBillingFlags.test.tsrename to packages/twenty-front/src/modules/settings/billing/hooks/__tests__/useCurrentBillingFlags.test.tsindex d5783ba45fb..39720fd697b 100644--- a/packages/twenty-front/src/modules/billing/hooks/__tests__/useCurrentBillingFlags.test.ts+++ b/packages/twenty-front/src/modules/settings/billing/hooks/__tests__/useCurrentBillingFlags.test.ts@@ -1,4 +1,4 @@-import { useCurrentBillingFlags } from '@/billing/hooks/useCurrentBillingFlags';+import { useCurrentBillingFlags } from '@/settings/billing/hooks/useCurrentBillingFlags';describe('useCurrentBillingFlags', () => {it('should be a function', () => {diff --git a/packages/twenty-front/src/modules/billing/hooks/__tests__/useCurrentMetered.test.ts b/packages/twenty-front/src/modules/settings/billing/hooks/__tests__/useCurrentMetered.test.tssimilarity index 63%rename from packages/twenty-front/src/modules/billing/hooks/__tests__/useCurrentMetered.test.tsrename to packages/twenty-front/src/modules/settings/billing/hooks/__tests__/useCurrentMetered.test.tsindex de1e79d6f5a..b48915f2547 100644--- a/packages/twenty-front/src/modules/billing/hooks/__tests__/useCurrentMetered.test.ts+++ b/packages/twenty-front/src/modules/settings/billing/hooks/__tests__/useCurrentMetered.test.ts@@ -1,4 +1,4 @@-import { useCurrentMetered } from '@/billing/hooks/useCurrentMetered';+import { useCurrentMetered } from '@/settings/billing/hooks/useCurrentMetered';describe('useCurrentMetered', () => {it('should be a function', () => {diff --git a/packages/twenty-front/src/modules/billing/hooks/__tests__/useCurrentPlan.test.ts b/packages/twenty-front/src/modules/settings/billing/hooks/__tests__/useCurrentPlan.test.tssimilarity index 64%rename from packages/twenty-front/src/modules/billing/hooks/__tests__/useCurrentPlan.test.tsrename to packages/twenty-front/src/modules/settings/billing/hooks/__tests__/useCurrentPlan.test.tsindex 24993e5968b..dc40c9770bd 100644--- a/packages/twenty-front/src/modules/billing/hooks/__tests__/useCurrentPlan.test.ts+++ b/packages/twenty-front/src/modules/settings/billing/hooks/__tests__/useCurrentPlan.test.ts@@ -1,4 +1,4 @@-import { useCurrentPlan } from '@/billing/hooks/useCurrentPlan';+import { useCurrentPlan } from '@/settings/billing/hooks/useCurrentPlan';describe('useCurrentPlan', () => {it('should be a function', () => {diff --git a/packages/twenty-front/src/modules/billing/hooks/__tests__/useEndSubscriptionTrialPeriod.test.ts b/packages/twenty-front/src/modules/settings/billing/hooks/__tests__/useEndSubscriptionTrialPeriod.test.tssimilarity index 61%rename from packages/twenty-front/src/modules/billing/hooks/__tests__/useEndSubscriptionTrialPeriod.test.tsrename to packages/twenty-front/src/modules/settings/billing/hooks/__tests__/useEndSubscriptionTrialPeriod.test.tsindex 5fa21e31265..849dde941cd 100644--- a/packages/twenty-front/src/modules/billing/hooks/__tests__/useEndSubscriptionTrialPeriod.test.ts+++ b/packages/twenty-front/src/modules/settings/billing/hooks/__tests__/useEndSubscriptionTrialPeriod.test.ts@@ -1,4 +1,4 @@-import { useEndSubscriptionTrialPeriod } from '@/billing/hooks/useEndSubscriptionTrialPeriod';+import { useEndSubscriptionTrialPeriod } from '@/settings/billing/hooks/useEndSubscriptionTrialPeriod';describe('useEndSubscriptionTrialPeriod', () => {it('should be a function', () => {diff --git a/packages/twenty-front/src/modules/billing/hooks/__tests__/useFormatPrices.test.ts b/packages/twenty-front/src/modules/settings/billing/hooks/__tests__/useFormatPrices.test.tssimilarity index 64%rename from packages/twenty-front/src/modules/billing/hooks/__tests__/useFormatPrices.test.tsrename to packages/twenty-front/src/modules/settings/billing/hooks/__tests__/useFormatPrices.test.tsindex dfa6237dc32..7b66b40e1a1 100644--- a/packages/twenty-front/src/modules/billing/hooks/__tests__/useFormatPrices.test.ts+++ b/packages/twenty-front/src/modules/settings/billing/hooks/__tests__/useFormatPrices.test.ts@@ -1,4 +1,4 @@-import { useFormatPrices } from '@/billing/hooks/useFormatPrices';+import { useFormatPrices } from '@/settings/billing/hooks/useFormatPrices';describe('useFormatPrices', () => {it('should be a function', () => {diff --git a/packages/twenty-front/src/modules/billing/hooks/__tests__/useGetWorkflowNodeExecutionUsage.test.ts b/packages/twenty-front/src/modules/settings/billing/hooks/__tests__/useGetWorkflowNodeExecutionUsage.test.tssimilarity index 60%rename from packages/twenty-front/src/modules/billing/hooks/__tests__/useGetWorkflowNodeExecutionUsage.test.tsrename to packages/twenty-front/src/modules/settings/billing/hooks/__tests__/useGetWorkflowNodeExecutionUsage.test.tsindex 90783291d1a..2afb3eba1ef 100644--- a/packages/twenty-front/src/modules/billing/hooks/__tests__/useGetWorkflowNodeExecutionUsage.test.ts+++ b/packages/twenty-front/src/modules/settings/billing/hooks/__tests__/useGetWorkflowNodeExecutionUsage.test.ts@@ -1,4 +1,4 @@-import { useGetWorkflowNodeExecutionUsage } from '@/billing/hooks/useGetWorkflowNodeExecutionUsage';+import { useGetWorkflowNodeExecutionUsage } from '@/settings/billing/hooks/useGetWorkflowNodeExecutionUsage';describe('useGetWorkflowNodeExecutionUsage', () => {it('should be a function', () => {diff --git a/packages/twenty-front/src/modules/billing/hooks/__tests__/useHandleCheckoutSession.test.ts b/packages/twenty-front/src/modules/settings/billing/hooks/__tests__/useHandleCheckoutSession.test.tssimilarity index 62%rename from packages/twenty-front/src/modules/billing/hooks/__tests__/useHandleCheckoutSession.test.tsrename to packages/twenty-front/src/modules/settings/billing/hooks/__tests__/useHandleCheckoutSession.test.tsindex 4f272728e81..26fb47003de 100644--- a/packages/twenty-front/src/modules/billing/hooks/__tests__/useHandleCheckoutSession.test.ts+++ b/packages/twenty-front/src/modules/settings/billing/hooks/__tests__/useHandleCheckoutSession.test.ts@@ -1,4 +1,4 @@-import { useHandleCheckoutSession } from '@/billing/hooks/useHandleCheckoutSession';+import { useHandleCheckoutSession } from '@/settings/billing/hooks/useHandleCheckoutSession';describe('useHandleCheckoutSession', () => {it('should be a function', () => {diff --git a/packages/twenty-front/src/modules/billing/hooks/__tests__/useHasNextBillingPhase.test.ts b/packages/twenty-front/src/modules/settings/billing/hooks/__tests__/useHasNextBillingPhase.test.tssimilarity index 62%rename from packages/twenty-front/src/modules/billing/hooks/__tests__/useHasNextBillingPhase.test.tsrename to packages/twenty-front/src/modules/settings/billing/hooks/__tests__/useHasNextBillingPhase.test.tsindex bab47e1706f..b7916130f56 100644--- a/packages/twenty-front/src/modules/billing/hooks/__tests__/useHasNextBillingPhase.test.ts+++ b/packages/twenty-front/src/modules/settings/billing/hooks/__tests__/useHasNextBillingPhase.test.ts@@ -1,4 +1,4 @@-import { useHasNextBillingPhase } from '@/billing/hooks/useHasNextBillingPhase';+import { useHasNextBillingPhase } from '@/settings/billing/hooks/useHasNextBillingPhase';describe('useHasNextBillingPhase', () => {it('should be a function', () => {diff --git a/packages/twenty-front/src/modules/billing/hooks/__tests__/useListProducts.test.ts b/packages/twenty-front/src/modules/settings/billing/hooks/__tests__/useListProducts.test.tssimilarity index 64%rename from packages/twenty-front/src/modules/billing/hooks/__tests__/useListProducts.test.tsrename to packages/twenty-front/src/modules/settings/billing/hooks/__tests__/useListProducts.test.tsindex d3a8e3791e3..6bc6a1753b5 100644--- a/packages/twenty-front/src/modules/billing/hooks/__tests__/useListProducts.test.ts+++ b/packages/twenty-front/src/modules/settings/billing/hooks/__tests__/useListProducts.test.ts@@ -1,4 +1,4 @@-import { useListProducts } from '@/billing/hooks/useListProducts';+import { useListProducts } from '@/settings/billing/hooks/useListProducts';describe('useListProducts', () => {it('should be a function', () => {diff --git a/packages/twenty-front/src/modules/billing/hooks/__tests__/useNextBillingPhase.test.ts b/packages/twenty-front/src/modules/settings/billing/hooks/__tests__/useNextBillingPhase.test.tssimilarity index 63%rename from packages/twenty-front/src/modules/billing/hooks/__tests__/useNextBillingPhase.test.tsrename to packages/twenty-front/src/modules/settings/billing/hooks/__tests__/useNextBillingPhase.test.tsindex 82584e02ce0..0ff1968270c 100644--- a/packages/twenty-front/src/modules/billing/hooks/__tests__/useNextBillingPhase.test.ts+++ b/packages/twenty-front/src/modules/settings/billing/hooks/__tests__/useNextBillingPhase.test.ts@@ -1,4 +1,4 @@-import { useNextBillingPhase } from '@/billing/hooks/useNextBillingPhase';+import { useNextBillingPhase } from '@/settings/billing/hooks/useNextBillingPhase';describe('useNextBillingPhase', () => {it('should be a function', () => {diff --git a/packages/twenty-front/src/modules/billing/hooks/__tests__/useNextBillingSeats.test.ts b/packages/twenty-front/src/modules/settings/billing/hooks/__tests__/useNextBillingSeats.test.tssimilarity index 63%rename from packages/twenty-front/src/modules/billing/hooks/__tests__/useNextBillingSeats.test.tsrename to packages/twenty-front/src/modules/settings/billing/hooks/__tests__/useNextBillingSeats.test.tsindex 6ddf89d6d68..ac3610863ca 100644--- a/packages/twenty-front/src/modules/billing/hooks/__tests__/useNextBillingSeats.test.ts+++ b/packages/twenty-front/src/modules/settings/billing/hooks/__tests__/useNextBillingSeats.test.ts@@ -1,4 +1,4 @@-import { useNextBillingSeats } from '@/billing/hooks/useNextBillingSeats';+import { useNextBillingSeats } from '@/settings/billing/hooks/useNextBillingSeats';describe('useNextBillingSeats', () => {it('should be a function', () => {diff --git a/packages/twenty-front/src/modules/billing/hooks/__tests__/useNextPlan.test.ts b/packages/twenty-front/src/modules/settings/billing/hooks/__tests__/useNextPlan.test.tssimilarity index 65%rename from packages/twenty-front/src/modules/billing/hooks/__tests__/useNextPlan.test.tsrename to packages/twenty-front/src/modules/settings/billing/hooks/__tests__/useNextPlan.test.tsindex 34a300451b3..3be60930ca6 100644--- a/packages/twenty-front/src/modules/billing/hooks/__tests__/useNextPlan.test.ts+++ b/packages/twenty-front/src/modules/settings/billing/hooks/__tests__/useNextPlan.test.ts@@ -1,4 +1,4 @@-import { useNextPlan } from '@/billing/hooks/useNextPlan';+import { useNextPlan } from '@/settings/billing/hooks/useNextPlan';describe('useNextPlan', () => {it('should be a function', () => {diff --git a/packages/twenty-front/src/modules/billing/hooks/__tests__/usePlanByPlanKey.test.ts b/packages/twenty-front/src/modules/settings/billing/hooks/__tests__/usePlanByPlanKey.test.tssimilarity index 64%rename from packages/twenty-front/src/modules/billing/hooks/__tests__/usePlanByPlanKey.test.tsrename to packages/twenty-front/src/modules/settings/billing/hooks/__tests__/usePlanByPlanKey.test.tsindex 42ea360d1a7..6ade92e20f4 100644--- a/packages/twenty-front/src/modules/billing/hooks/__tests__/usePlanByPlanKey.test.ts+++ b/packages/twenty-front/src/modules/settings/billing/hooks/__tests__/usePlanByPlanKey.test.ts@@ -1,4 +1,4 @@-import { usePlanByPlanKey } from '@/billing/hooks/usePlanByPlanKey';+import { usePlanByPlanKey } from '@/settings/billing/hooks/usePlanByPlanKey';describe('usePlanByPlanKey', () => {it('should be a function', () => {diff --git a/packages/twenty-front/src/modules/billing/hooks/__tests__/usePlanByPriceId.test.ts b/packages/twenty-front/src/modules/settings/billing/hooks/__tests__/usePlanByPriceId.test.tssimilarity index 64%rename from packages/twenty-front/src/modules/billing/hooks/__tests__/usePlanByPriceId.test.tsrename to packages/twenty-front/src/modules/settings/billing/hooks/__tests__/usePlanByPriceId.test.tsindex 2862632282b..4e4bfd1fee6 100644--- a/packages/twenty-front/src/modules/billing/hooks/__tests__/usePlanByPriceId.test.ts+++ b/packages/twenty-front/src/modules/settings/billing/hooks/__tests__/usePlanByPriceId.test.ts@@ -1,4 +1,4 @@-import { usePlanByPriceId } from '@/billing/hooks/usePlanByPriceId';+import { usePlanByPriceId } from '@/settings/billing/hooks/usePlanByPriceId';describe('usePlanByPriceId', () => {it('should be a function', () => {diff --git a/packages/twenty-front/src/modules/billing/hooks/__tests__/usePlans.test.ts b/packages/twenty-front/src/modules/settings/billing/hooks/__tests__/usePlans.test.tssimilarity index 66%rename from packages/twenty-front/src/modules/billing/hooks/__tests__/usePlans.test.tsrename to packages/twenty-front/src/modules/settings/billing/hooks/__tests__/usePlans.test.tsindex f76ead272e7..ce90e0afd00 100644--- a/packages/twenty-front/src/modules/billing/hooks/__tests__/usePlans.test.ts+++ b/packages/twenty-front/src/modules/settings/billing/hooks/__tests__/usePlans.test.ts@@ -1,4 +1,4 @@-import { usePlans } from '@/billing/hooks/usePlans';+import { usePlans } from '@/settings/billing/hooks/usePlans';describe('usePlans', () => {it('should be a function', () => {diff --git a/packages/twenty-front/src/modules/billing/hooks/__tests__/usePriceAndBillingUsageByPriceId.test.ts b/packages/twenty-front/src/modules/settings/billing/hooks/__tests__/usePriceAndBillingUsageByPriceId.test.tssimilarity index 60%rename from packages/twenty-front/src/modules/billing/hooks/__tests__/usePriceAndBillingUsageByPriceId.test.tsrename to packages/twenty-front/src/modules/settings/billing/hooks/__tests__/usePriceAndBillingUsageByPriceId.test.tsindex 6c64a9daefe..33fcdae69cf 100644--- a/packages/twenty-front/src/modules/billing/hooks/__tests__/usePriceAndBillingUsageByPriceId.test.ts+++ b/packages/twenty-front/src/modules/settings/billing/hooks/__tests__/usePriceAndBillingUsageByPriceId.test.ts@@ -1,4 +1,4 @@-import { usePriceAndBillingUsageByPriceId } from '@/billing/hooks/usePriceAndBillingUsageByPriceId';+import { usePriceAndBillingUsageByPriceId } from '@/settings/billing/hooks/usePriceAndBillingUsageByPriceId';describe('usePriceAndBillingUsageByPriceId', () => {it('should be a function', () => {diff --git a/packages/twenty-front/src/modules/billing/hooks/__tests__/useSplitPhaseItemsInPrices.test.ts b/packages/twenty-front/src/modules/settings/billing/hooks/__tests__/useSplitPhaseItemsInPrices.test.tssimilarity index 61%rename from packages/twenty-front/src/modules/billing/hooks/__tests__/useSplitPhaseItemsInPrices.test.tsrename to packages/twenty-front/src/modules/settings/billing/hooks/__tests__/useSplitPhaseItemsInPrices.test.tsindex 860ba4934d6..bf994bfd64f 100644--- a/packages/twenty-front/src/modules/billing/hooks/__tests__/useSplitPhaseItemsInPrices.test.ts+++ b/packages/twenty-front/src/modules/settings/billing/hooks/__tests__/useSplitPhaseItemsInPrices.test.ts@@ -1,4 +1,4 @@-import { useSplitPhaseItemsInPrices } from '@/billing/hooks/useSplitPhaseItemsInPrices';+import { useSplitPhaseItemsInPrices } from '@/settings/billing/hooks/useSplitPhaseItemsInPrices';describe('useSplitPhaseItemsInPrices', () => {it('should be a function', () => {diff --git a/packages/twenty-front/src/modules/billing/hooks/useAllBillingPrices.ts b/packages/twenty-front/src/modules/settings/billing/hooks/useAllBillingPrices.tssimilarity index 88%rename from packages/twenty-front/src/modules/billing/hooks/useAllBillingPrices.tsrename to packages/twenty-front/src/modules/settings/billing/hooks/useAllBillingPrices.tsindex ddc84f070e9..4d0fa16121a 100644--- a/packages/twenty-front/src/modules/billing/hooks/useAllBillingPrices.ts+++ b/packages/twenty-front/src/modules/settings/billing/hooks/useAllBillingPrices.ts@@ -1,4 +1,4 @@-import { usePlans } from '@/billing/hooks/usePlans';+import { usePlans } from '@/settings/billing/hooks/usePlans';import {type BillingPriceLicensed,type BillingPriceMetered,diff --git a/packages/twenty-front/src/modules/billing/hooks/useBaseLicensedPriceByPlanKeyAndInterval.ts b/packages/twenty-front/src/modules/settings/billing/hooks/useBaseLicensedPriceByPlanKeyAndInterval.tssimilarity index 89%rename from packages/twenty-front/src/modules/billing/hooks/useBaseLicensedPriceByPlanKeyAndInterval.tsrename to packages/twenty-front/src/modules/settings/billing/hooks/useBaseLicensedPriceByPlanKeyAndInterval.tsindex 861b73b40ab..4e92481b1f8 100644--- a/packages/twenty-front/src/modules/billing/hooks/useBaseLicensedPriceByPlanKeyAndInterval.ts+++ b/packages/twenty-front/src/modules/settings/billing/hooks/useBaseLicensedPriceByPlanKeyAndInterval.ts@@ -3,7 +3,7 @@ import {type BillingPlanKey,} from '~/generated-metadata/graphql';import { findOrThrow } from 'twenty-shared/utils';-import { useBaseProductByPlanKey } from '@/billing/hooks/useBaseProductByPlanKey';+import { useBaseProductByPlanKey } from '@/settings/billing/hooks/useBaseProductByPlanKey';export const useBaseLicensedPriceByPlanKeyAndInterval = () => {const { getBaseProductByPlanKey } = useBaseProductByPlanKey();diff --git a/packages/twenty-front/src/modules/billing/hooks/useBaseProductByPlanKey.ts b/packages/twenty-front/src/modules/settings/billing/hooks/useBaseProductByPlanKey.tssimilarity index 87%rename from packages/twenty-front/src/modules/billing/hooks/useBaseProductByPlanKey.tsrename to packages/twenty-front/src/modules/settings/billing/hooks/useBaseProductByPlanKey.tsindex 9e7ef45bc3e..1d2ec960d14 100644--- a/packages/twenty-front/src/modules/billing/hooks/useBaseProductByPlanKey.ts+++ b/packages/twenty-front/src/modules/settings/billing/hooks/useBaseProductByPlanKey.ts@@ -3,7 +3,7 @@ import {type BillingPlanKey,} from '~/generated-metadata/graphql';import { findOrThrow } from 'twenty-shared/utils';-import { usePlanByPlanKey } from '@/billing/hooks/usePlanByPlanKey';+import { usePlanByPlanKey } from '@/settings/billing/hooks/usePlanByPlanKey';export const useBaseProductByPlanKey = () => {const { getPlanByPlanKey } = usePlanByPlanKey();diff --git a/packages/twenty-front/src/modules/billing/hooks/useBillingWording.ts b/packages/twenty-front/src/modules/settings/billing/hooks/useBillingWording.tssimilarity index 94%rename from packages/twenty-front/src/modules/billing/hooks/useBillingWording.tsrename to packages/twenty-front/src/modules/settings/billing/hooks/useBillingWording.tsindex fff5261970e..ba7ba886ce5 100644--- a/packages/twenty-front/src/modules/billing/hooks/useBillingWording.ts+++ b/packages/twenty-front/src/modules/settings/billing/hooks/useBillingWording.ts@@ -1,4 +1,4 @@-import { useFormatPrices } from '@/billing/hooks/useFormatPrices';+import { useFormatPrices } from '@/settings/billing/hooks/useFormatPrices';import {BillingPlanKey,SubscriptionInterval,@@ -9,9 +9,9 @@ import { currentWorkspaceState } from '@/auth/states/currentWorkspaceState';import { useSubscriptionStatus } from '@/workspace/hooks/useSubscriptionStatus';import { useLingui } from '@lingui/react/macro';import { beautifyExactDate } from '~/utils/date-utils';-import { useCurrentPlan } from '@/billing/hooks/useCurrentPlan';-import { useCurrentMetered } from '@/billing/hooks/useCurrentMetered';-import { useCurrentBillingFlags } from '@/billing/hooks/useCurrentBillingFlags';+import { useCurrentPlan } from '@/settings/billing/hooks/useCurrentPlan';+import { useCurrentMetered } from '@/settings/billing/hooks/useCurrentMetered';+import { useCurrentBillingFlags } from '@/settings/billing/hooks/useCurrentBillingFlags';import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';export const useBillingWording = () => {diff --git a/packages/twenty-front/src/modules/billing/hooks/useCurrentBillingFlags.ts b/packages/twenty-front/src/modules/settings/billing/hooks/useCurrentBillingFlags.tssimilarity index 100%rename from packages/twenty-front/src/modules/billing/hooks/useCurrentBillingFlags.tsrename to packages/twenty-front/src/modules/settings/billing/hooks/useCurrentBillingFlags.tsdiff --git a/packages/twenty-front/src/modules/billing/hooks/useCurrentMetered.ts b/packages/twenty-front/src/modules/settings/billing/hooks/useCurrentMetered.tssimilarity index 91%rename from packages/twenty-front/src/modules/billing/hooks/useCurrentMetered.tsrename to packages/twenty-front/src/modules/settings/billing/hooks/useCurrentMetered.tsindex f8cffb733b5..995bbff0b9d 100644--- a/packages/twenty-front/src/modules/billing/hooks/useCurrentMetered.ts+++ b/packages/twenty-front/src/modules/settings/billing/hooks/useCurrentMetered.ts@@ -1,6 +1,6 @@import { currentWorkspaceState } from '@/auth/states/currentWorkspaceState';-import { useCurrentPlan } from '@/billing/hooks/useCurrentPlan';-import type { MeteredBillingPrice } from '@/billing/types/billing-price-tiers.type';+import { useCurrentPlan } from '@/settings/billing/hooks/useCurrentPlan';+import type { MeteredBillingPrice } from '@/settings/billing/types/billing-price-tiers.type';import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';import { assertIsDefinedOrThrow, findOrThrow } from 'twenty-shared/utils';import {diff --git a/packages/twenty-front/src/modules/billing/hooks/useCurrentPlan.ts b/packages/twenty-front/src/modules/settings/billing/hooks/useCurrentPlan.tssimilarity index 100%rename from packages/twenty-front/src/modules/billing/hooks/useCurrentPlan.tsrename to packages/twenty-front/src/modules/settings/billing/hooks/useCurrentPlan.tsdiff --git a/packages/twenty-front/src/modules/billing/hooks/useEndSubscriptionTrialPeriod.ts b/packages/twenty-front/src/modules/settings/billing/hooks/useEndSubscriptionTrialPeriod.tssimilarity index 100%rename from packages/twenty-front/src/modules/billing/hooks/useEndSubscriptionTrialPeriod.tsrename to packages/twenty-front/src/modules/settings/billing/hooks/useEndSubscriptionTrialPeriod.tsdiff --git a/packages/twenty-front/src/modules/billing/hooks/useFormatPrices.ts b/packages/twenty-front/src/modules/settings/billing/hooks/useFormatPrices.tssimilarity index 90%rename from packages/twenty-front/src/modules/billing/hooks/useFormatPrices.tsrename to packages/twenty-front/src/modules/settings/billing/hooks/useFormatPrices.tsindex d8cd8448ecc..8840af3f94b 100644--- a/packages/twenty-front/src/modules/billing/hooks/useFormatPrices.ts+++ b/packages/twenty-front/src/modules/settings/billing/hooks/useFormatPrices.ts@@ -2,7 +2,7 @@ import {BillingPlanKey,SubscriptionInterval,} from '~/generated-metadata/graphql';-import { useBaseLicensedPriceByPlanKeyAndInterval } from '@/billing/hooks/useBaseLicensedPriceByPlanKeyAndInterval';+import { useBaseLicensedPriceByPlanKeyAndInterval } from '@/settings/billing/hooks/useBaseLicensedPriceByPlanKeyAndInterval';export const useFormatPrices = () => {const { getBaseLicensedPriceByPlanKeyAndInterval } =diff --git a/packages/twenty-front/src/modules/billing/hooks/useGetWorkflowNodeExecutionUsage.ts b/packages/twenty-front/src/modules/settings/billing/hooks/useGetWorkflowNodeExecutionUsage.tssimilarity index 100%rename from packages/twenty-front/src/modules/billing/hooks/useGetWorkflowNodeExecutionUsage.tsrename to packages/twenty-front/src/modules/settings/billing/hooks/useGetWorkflowNodeExecutionUsage.tsdiff --git a/packages/twenty-front/src/modules/billing/hooks/useHandleCheckoutSession.ts b/packages/twenty-front/src/modules/settings/billing/hooks/useHandleCheckoutSession.tssimilarity index 100%rename from packages/twenty-front/src/modules/billing/hooks/useHandleCheckoutSession.tsrename to packages/twenty-front/src/modules/settings/billing/hooks/useHandleCheckoutSession.tsdiff --git a/packages/twenty-front/src/modules/billing/hooks/useHasNextBillingPhase.ts b/packages/twenty-front/src/modules/settings/billing/hooks/useHasNextBillingPhase.tssimilarity index 100%rename from packages/twenty-front/src/modules/billing/hooks/useHasNextBillingPhase.tsrename to packages/twenty-front/src/modules/settings/billing/hooks/useHasNextBillingPhase.tsdiff --git a/packages/twenty-front/src/modules/billing/hooks/useListProducts.ts b/packages/twenty-front/src/modules/settings/billing/hooks/useListProducts.tssimilarity index 79%rename from packages/twenty-front/src/modules/billing/hooks/useListProducts.tsrename to packages/twenty-front/src/modules/settings/billing/hooks/useListProducts.tsindex e506ed34dd1..7c54ca1d0fc 100644--- a/packages/twenty-front/src/modules/billing/hooks/useListProducts.ts+++ b/packages/twenty-front/src/modules/settings/billing/hooks/useListProducts.ts@@ -1,4 +1,4 @@-import { usePlans } from '@/billing/hooks/usePlans';+import { usePlans } from '@/settings/billing/hooks/usePlans';export const useListProducts = () => {const { listPlans } = usePlans();diff --git a/packages/twenty-front/src/modules/billing/hooks/useNextBillingPhase.ts b/packages/twenty-front/src/modules/settings/billing/hooks/useNextBillingPhase.tssimilarity index 100%rename from packages/twenty-front/src/modules/billing/hooks/useNextBillingPhase.tsrename to packages/twenty-front/src/modules/settings/billing/hooks/useNextBillingPhase.tsdiff --git a/packages/twenty-front/src/modules/billing/hooks/useNextBillingSeats.ts b/packages/twenty-front/src/modules/settings/billing/hooks/useNextBillingSeats.tssimilarity index 76%rename from packages/twenty-front/src/modules/billing/hooks/useNextBillingSeats.tsrename to packages/twenty-front/src/modules/settings/billing/hooks/useNextBillingSeats.tsindex c21727d1060..09448a04a19 100644--- a/packages/twenty-front/src/modules/billing/hooks/useNextBillingSeats.ts+++ b/packages/twenty-front/src/modules/settings/billing/hooks/useNextBillingSeats.ts@@ -1,6 +1,6 @@import { findOrThrow, isDefined } from 'twenty-shared/utils';-import { useSplitPhaseItemsInPrices } from '@/billing/hooks/useSplitPhaseItemsInPrices';-import { useNextBillingPhase } from '@/billing/hooks/useNextBillingPhase';+import { useSplitPhaseItemsInPrices } from '@/settings/billing/hooks/useSplitPhaseItemsInPrices';+import { useNextBillingPhase } from '@/settings/billing/hooks/useNextBillingPhase';export const useNextBillingSeats = () => {const { splitedPhaseItemsInPrices } = useSplitPhaseItemsInPrices();diff --git a/packages/twenty-front/src/modules/billing/hooks/useNextPlan.ts b/packages/twenty-front/src/modules/settings/billing/hooks/useNextPlan.tssimilarity index 67%rename from packages/twenty-front/src/modules/billing/hooks/useNextPlan.tsrename to packages/twenty-front/src/modules/settings/billing/hooks/useNextPlan.tsindex d218866f51c..d901432ae02 100644--- a/packages/twenty-front/src/modules/billing/hooks/useNextPlan.ts+++ b/packages/twenty-front/src/modules/settings/billing/hooks/useNextPlan.ts@@ -1,5 +1,5 @@-import { useSplitPhaseItemsInPrices } from '@/billing/hooks/useSplitPhaseItemsInPrices';-import { usePlanByPriceId } from '@/billing/hooks/usePlanByPriceId';+import { useSplitPhaseItemsInPrices } from '@/settings/billing/hooks/useSplitPhaseItemsInPrices';+import { usePlanByPriceId } from '@/settings/billing/hooks/usePlanByPriceId';export const useNextPlan = () => {const { splitedPhaseItemsInPrices } = useSplitPhaseItemsInPrices();diff --git a/packages/twenty-front/src/modules/billing/hooks/usePlanByPlanKey.ts b/packages/twenty-front/src/modules/settings/billing/hooks/usePlanByPlanKey.tssimilarity index 100%rename from packages/twenty-front/src/modules/billing/hooks/usePlanByPlanKey.tsrename to packages/twenty-front/src/modules/settings/billing/hooks/usePlanByPlanKey.tsdiff --git a/packages/twenty-front/src/modules/billing/hooks/usePlanByPriceId.ts b/packages/twenty-front/src/modules/settings/billing/hooks/usePlanByPriceId.tssimilarity index 100%rename from packages/twenty-front/src/modules/billing/hooks/usePlanByPriceId.tsrename to packages/twenty-front/src/modules/settings/billing/hooks/usePlanByPriceId.tsdiff --git a/packages/twenty-front/src/modules/billing/hooks/usePlans.ts b/packages/twenty-front/src/modules/settings/billing/hooks/usePlans.tssimilarity index 100%rename from packages/twenty-front/src/modules/billing/hooks/usePlans.tsrename to packages/twenty-front/src/modules/settings/billing/hooks/usePlans.tsdiff --git a/packages/twenty-front/src/modules/billing/hooks/usePriceAndBillingUsageByPriceId.ts b/packages/twenty-front/src/modules/settings/billing/hooks/usePriceAndBillingUsageByPriceId.tssimilarity index 100%rename from packages/twenty-front/src/modules/billing/hooks/usePriceAndBillingUsageByPriceId.tsrename to packages/twenty-front/src/modules/settings/billing/hooks/usePriceAndBillingUsageByPriceId.tsdiff --git a/packages/twenty-front/src/modules/billing/hooks/useSplitPhaseItemsInPrices.ts b/packages/twenty-front/src/modules/settings/billing/hooks/useSplitPhaseItemsInPrices.tssimilarity index 76%rename from packages/twenty-front/src/modules/billing/hooks/useSplitPhaseItemsInPrices.tsrename to packages/twenty-front/src/modules/settings/billing/hooks/useSplitPhaseItemsInPrices.tsindex 9a9139fcc38..93b46aa8b37 100644--- a/packages/twenty-front/src/modules/billing/hooks/useSplitPhaseItemsInPrices.ts+++ b/packages/twenty-front/src/modules/settings/billing/hooks/useSplitPhaseItemsInPrices.ts@@ -1,6 +1,6 @@-import { useNextBillingPhase } from '@/billing/hooks/useNextBillingPhase';-import { usePriceAndBillingUsageByPriceId } from '@/billing/hooks/usePriceAndBillingUsageByPriceId';-import { type MeteredBillingPrice } from '@/billing/types/billing-price-tiers.type';+import { useNextBillingPhase } from '@/settings/billing/hooks/useNextBillingPhase';+import { usePriceAndBillingUsageByPriceId } from '@/settings/billing/hooks/usePriceAndBillingUsageByPriceId';+import { type MeteredBillingPrice } from '@/settings/billing/types/billing-price-tiers.type';import {BillingUsageType,type BillingPriceLicensed,diff --git a/packages/twenty-front/src/modules/billing/types/billing-price-tiers.type.ts b/packages/twenty-front/src/modules/settings/billing/types/billing-price-tiers.type.tssimilarity index 100%rename from packages/twenty-front/src/modules/billing/types/billing-price-tiers.type.tsrename to packages/twenty-front/src/modules/settings/billing/types/billing-price-tiers.type.tsdiff --git a/packages/twenty-front/src/modules/settings/enterprise/components/EnterprisePlanModal.tsx b/packages/twenty-front/src/modules/settings/enterprise/components/EnterprisePlanModal.tsxindex 385c4d26ba8..35a74bc2408 100644--- a/packages/twenty-front/src/modules/settings/enterprise/components/EnterprisePlanModal.tsx+++ b/packages/twenty-front/src/modules/settings/enterprise/components/EnterprisePlanModal.tsx@@ -1,6 +1,6 @@import { SubTitle } from '@/auth/components/SubTitle';import { Title } from '@/auth/components/Title';-import { SubscriptionBenefit } from '@/billing/components/SubscriptionBenefit';+import { SubscriptionBenefit } from '@/settings/billing/components/SubscriptionBenefit';import { ENTERPRISE_CHECKOUT_SESSION } from '@/settings/enterprise/graphql/queries/enterpriseCheckoutSession';import { useSnackBar } from '@/ui/feedback/snack-bar-manager/hooks/useSnackBar';import { ModalStatefulWrapper } from '@/ui/layout/modal/components/ModalStatefulWrapper';diff --git a/packages/twenty-front/src/modules/settings/hooks/useSettingsNavigationItems.tsx b/packages/twenty-front/src/modules/settings/hooks/useSettingsNavigationItems.tsxindex 37305db70e3..3fdecf9e5e0 100644--- a/packages/twenty-front/src/modules/settings/hooks/useSettingsNavigationItems.tsx+++ b/packages/twenty-front/src/modules/settings/hooks/useSettingsNavigationItems.tsx@@ -22,6 +22,7 @@ import {IconCalendarEvent,IconColorSwatch,type IconComponent,+ IconChartBar,IconCurrencyDollar,IconDoorEnter,IconHelpCircle,@@ -78,6 +79,9 @@ const useSettingsNavigationItems = (): SettingsNavigationSection[] => {const isApplicationEnabled = useIsFeatureEnabled(FeatureFlagKey.IS_APPLICATION_ENABLED,);+ const isUsageAnalyticsEnabled = useIsFeatureEnabled(+ FeatureFlagKey.IS_USAGE_ANALYTICS_ENABLED,+ );const isSupportChatConfigured =supportChat?.supportDriver === 'FRONT' &&isNonEmptyString(supportChat.supportFrontChatId);@@ -161,6 +165,15 @@ const useSettingsNavigationItems = (): SettingsNavigationSection[] => {isHidden:!isBillingEnabled || !permissionMap[PermissionFlagType.WORKSPACE],},+ {+ label: t`Usage`,+ path: SettingsPath.Usage,+ Icon: IconChartBar,+ isHidden:+ !isUsageAnalyticsEnabled ||+ isBillingEnabled ||+ !permissionMap[PermissionFlagType.WORKSPACE],+ },{label: t`APIs & Webhooks`,path: SettingsPath.ApiWebhooks,diff --git a/packages/twenty-front/src/modules/settings/usage/components/SettingsUsageAnalyticsSection.tsx b/packages/twenty-front/src/modules/settings/usage/components/SettingsUsageAnalyticsSection.tsxnew file mode 100644index 00000000000..23cd806f3cd--- /dev/null+++ b/packages/twenty-front/src/modules/settings/usage/components/SettingsUsageAnalyticsSection.tsx@@ -0,0 +1,266 @@+import { SettingsBillingLabelValueItem } from '@/settings/billing/components/internal/SettingsBillingLabelValueItem';+import { SubscriptionInfoContainer } from '@/settings/billing/components/SubscriptionInfoContainer';+import { useNumberFormat } from '@/localization/hooks/useNumberFormat';+import { GraphWidgetLineChart } from '@/page-layout/widgets/graph/graph-widget-line-chart/components/GraphWidgetLineChart';+import { type LineChartSeriesWithColor } from '@/page-layout/widgets/graph/graph-widget-line-chart/types/LineChartSeriesWithColor';+import { createGraphColorRegistry } from '@/page-layout/widgets/graph/utils/createGraphColorRegistry';+import { getColorSchemeByIndex } from '@/page-layout/widgets/graph/utils/getColorSchemeByIndex';+import { Select } from '@/ui/input/components/Select';+import { Table } from '@/ui/layout/table/components/Table';+import { TableCell } from '@/ui/layout/table/components/TableCell';+import { TableHeader } from '@/ui/layout/table/components/TableHeader';+import { TableRow } from '@/ui/layout/table/components/TableRow';+import { getOperationTypeLabel } from '@/settings/usage/utils/getOperationTypeLabel';+import { getPeriodDates } from '@/settings/usage/utils/getPeriodDates';+import { getPeriodOptions } from '@/settings/usage/utils/getPeriodOptions';+import { type PeriodPreset } from '@/settings/usage/utils/periodPreset';+import { UsagePieChart } from '@/settings/usage/components/UsagePieChart';+import { t } from '@lingui/core/macro';+import { styled } from '@linaria/react';+import { useContext, useState } from 'react';+import { SettingsPath } from 'twenty-shared/types';+import { getSettingsPath } from 'twenty-shared/utils';+import { Avatar, H2Title, IconChevronRight } from 'twenty-ui/display';+import { SearchInput } from 'twenty-ui/input';+import { Section } from 'twenty-ui/layout';+import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useQuery } from '@apollo/client/react';+import { GetUsageAnalyticsDocument } from '~/generated-metadata/graphql';+import { formatDate } from '~/utils/date-utils';+import { normalizeSearchText } from '~/utils/normalizeSearchText';++const StyledSearchInputContainer = styled.div`+ padding-bottom: ${themeCssVariables.spacing[2]};+`;++const StyledIconChevronRightContainer = styled.div`+ color: ${themeCssVariables.font.color.tertiary};+`;++const StyledLineChartContainer = styled.div`+ height: 200px;+ width: 100%;+`;++const USAGE_USER_TABLE_GRID_TEMPLATE_COLUMNS = '1fr 120px 36px';++export const SettingsUsageAnalyticsSection = () => {+ const { theme } = useContext(ThemeContext);+ const { formatNumber } = useNumberFormat();++ const [typePeriod, setTypePeriod] = useState<PeriodPreset>('30d');+ const [dailyPeriod, setDailyPeriod] = useState<PeriodPreset>('30d');+ const [userPeriod, setUserPeriod] = useState<PeriodPreset>('30d');+ const [userSearchTerm, setUserSearchTerm] = useState('');++ const colorRegistry = createGraphColorRegistry(theme.color);+ const periodOptions = getPeriodOptions();++ const typeDates = getPeriodDates(typePeriod);+ const dailyDates = getPeriodDates(dailyPeriod);+ const userDates = getPeriodDates(userPeriod);++ const { data: typeData, loading: typeLoading } = useQuery(+ GetUsageAnalyticsDocument,+ { variables: { input: typeDates } },+ );++ const { data: dailyData, loading: dailyLoading } = useQuery(+ GetUsageAnalyticsDocument,+ { variables: { input: dailyDates } },+ );++ const { data: userData, loading: userLoading } = useQuery(+ GetUsageAnalyticsDocument,+ { variables: { input: userDates } },+ );++ const typeAnalytics = typeData?.getUsageAnalytics;+ const dailyAnalytics = dailyData?.getUsageAnalytics;+ const userAnalytics = userData?.getUsageAnalytics;++ const usageByOperationType = typeAnalytics?.usageByOperationType ?? [];+ const timeSeries = dailyAnalytics?.timeSeries ?? [];+ const usageByUser = userAnalytics?.usageByUser ?? [];++ const anyLoading = typeLoading || dailyLoading || userLoading;++ if (anyLoading) {+ return null;+ }++ const hasAnyData =+ usageByOperationType.length > 0 ||+ timeSeries.length > 0 ||+ usageByUser.length > 0;++ const totalCredits = usageByOperationType.reduce(+ (sum, item) => sum + item.creditsUsed,+ 0,+ );++ const filteredUsageByUser = usageByUser.filter((item) => {+ const search = normalizeSearchText(userSearchTerm);+ const name = normalizeSearchText(item.label ?? item.key);++ return name.includes(search);+ });++ const pieData = usageByOperationType.map((item, index) => ({+ id: getOperationTypeLabel(item.key),+ value: item.creditsUsed,+ color: getColorSchemeByIndex(colorRegistry, index).solid,+ }));++ const lineData: LineChartSeriesWithColor[] = [+ {+ id: 'credits',+ label: t`Credits`,+ data: timeSeries.map((point) => ({+ x: formatDate(point.date, 'MMM d'),+ y: point.creditsUsed,+ })),+ },+ ];++ if (!hasAnyData) {+ return (+ <Section>+ <H2Title+ title={t`Usage Analytics`}+ description={t`Credit usage breakdown for your workspace.`}+ />+ <SubscriptionInfoContainer>+ <SettingsBillingLabelValueItem+ label={t`No usage data`}+ value={t`No credit consumption recorded yet.`}+ />+ </SubscriptionInfoContainer>+ </Section>+ );+ }++ return (+ <>+ {usageByOperationType.length > 0 && (+ <Section>+ <H2Title+ title={t`Usage by Type`}+ description={t`${formatNumber(totalCredits)} credits`}+ adornment={+ <Select+ dropdownId="usage-type-period"+ value={typePeriod}+ options={periodOptions}+ onChange={setTypePeriod}+ needIconCheck+ selectSizeVariant="small"+ />+ }+ />+ <SubscriptionInfoContainer>+ <UsagePieChart data={pieData} />+ </SubscriptionInfoContainer>+ </Section>+ )}++ {timeSeries.length > 0 && (+ <Section>+ <H2Title+ title={t`Daily Usage`}+ description={t`Credit consumption over time.`}+ adornment={+ <Select+ dropdownId="usage-daily-period"+ value={dailyPeriod}+ options={periodOptions}+ onChange={setDailyPeriod}+ needIconCheck+ selectSizeVariant="small"+ />+ }+ />+ <SubscriptionInfoContainer>+ <StyledLineChartContainer>+ <GraphWidgetLineChart+ id="usage-daily-line-chart"+ data={lineData}+ colorMode="automaticPalette"+ showLegend={false}+ enableArea+ />+ </StyledLineChartContainer>+ </SubscriptionInfoContainer>+ </Section>+ )}++ {usageByUser.length > 0 && (+ <Section>+ <H2Title+ title={t`Usage by User`}+ description={t`Click a user to see their daily breakdown.`}+ adornment={+ <Select+ dropdownId="usage-user-period"+ value={userPeriod}+ options={periodOptions}+ onChange={setUserPeriod}+ needIconCheck+ selectSizeVariant="small"+ />+ }+ />+ <StyledSearchInputContainer>+ <SearchInput+ placeholder={t`Search for a user...`}+ value={userSearchTerm}+ onChange={setUserSearchTerm}+ />+ </StyledSearchInputContainer>+ <Table>+ <TableRow+ gridTemplateColumns={USAGE_USER_TABLE_GRID_TEMPLATE_COLUMNS}+ >+ <TableHeader>{t`Name`}</TableHeader>+ <TableHeader align="right">{t`Credits`}</TableHeader>+ <TableHeader />+ </TableRow>+ {filteredUsageByUser.map((item) => (+ <TableRow+ key={item.key}+ gridTemplateColumns={USAGE_USER_TABLE_GRID_TEMPLATE_COLUMNS}+ to={getSettingsPath(SettingsPath.UsageUserDetail, {+ userWorkspaceId: item.key,+ })}+ >+ <TableCell+ color={themeCssVariables.font.color.primary}+ gap={themeCssVariables.spacing[2]}+ >+ <Avatar+ type="rounded"+ size="md"+ placeholder={item.label ?? item.key}+ placeholderColorSeed={item.key}+ />+ {item.label ?? item.key}+ </TableCell>+ <TableCell align="right">+ {formatNumber(item.creditsUsed)}+ </TableCell>+ <TableCell align="center">+ <StyledIconChevronRightContainer>+ <IconChevronRight+ size={theme.icon.size.md}+ stroke={theme.icon.stroke.sm}+ />+ </StyledIconChevronRightContainer>+ </TableCell>+ </TableRow>+ ))}+ </Table>+ </Section>+ )}+ </>+ );+};diff --git a/packages/twenty-front/src/modules/settings/usage/components/UsagePieChart.tsx b/packages/twenty-front/src/modules/settings/usage/components/UsagePieChart.tsxnew file mode 100644index 00000000000..3854c2927d7--- /dev/null+++ b/packages/twenty-front/src/modules/settings/usage/components/UsagePieChart.tsx@@ -0,0 +1,52 @@+import { CHART_MOTION_CONFIG } from '@/page-layout/widgets/graph/constants/ChartMotionConfig';+import { useNumberFormat } from '@/localization/hooks/useNumberFormat';+import { t } from '@lingui/core/macro';+import { styled } from '@linaria/react';+import { ResponsivePie } from '@nivo/pie';+import { useContext } from 'react';+import { ThemeContext } from 'twenty-ui/theme-constants';++type UsagePieChartDatum = {+ id: string;+ value: number;+ color: string;+};++type UsagePieChartProps = {+ data: UsagePieChartDatum[];+};++const StyledContainer = styled.div`+ height: 220px;+ width: 100%;+`;++export const UsagePieChart = ({ data }: UsagePieChartProps) => {+ const { theme } = useContext(ThemeContext);+ const { formatNumber } = useNumberFormat();++ return (+ <StyledContainer>+ <ResponsivePie+ data={data}+ margin={{ top: 20, right: 80, bottom: 20, left: 80 }}+ innerRadius={0.6}+ padAngle={0.5}+ cornerRadius={2}+ colors={data.map((item) => item.color)}+ enableArcLabels={false}+ enableArcLinkLabels={true}+ arcLinkLabelsSkipAngle={10}+ arcLinkLabelsTextColor={theme.font.color.secondary}+ arcLinkLabelsColor={{ from: 'color' }}+ arcLinkLabelsDiagonalLength={10}+ arcLinkLabelsStraightLength={10}+ animate+ motionConfig={CHART_MOTION_CONFIG}+ tooltip={({ datum }) => (+ <div>{`${String(datum.id)}: ${t`${formatNumber(datum.value)} credits`}`}</div>+ )}+ />+ </StyledContainer>+ );+};diff --git a/packages/twenty-front/src/modules/settings/usage/graphql/queries/getUsageAnalytics.ts b/packages/twenty-front/src/modules/settings/usage/graphql/queries/getUsageAnalytics.tsnew file mode 100644index 00000000000..b956c9cc119--- /dev/null+++ b/packages/twenty-front/src/modules/settings/usage/graphql/queries/getUsageAnalytics.ts@@ -0,0 +1,30 @@+import { gql } from '@apollo/client';++export const GET_USAGE_ANALYTICS = gql`+ query GetUsageAnalytics($input: UsageAnalyticsInput) {+ getUsageAnalytics(input: $input) {+ usageByUser {+ key+ label+ creditsUsed+ }+ usageByOperationType {+ key+ creditsUsed+ }+ timeSeries {+ date+ creditsUsed+ }+ periodStart+ periodEnd+ userDailyUsage {+ userWorkspaceId+ dailyUsage {+ date+ creditsUsed+ }+ }+ }+ }+`;diff --git a/packages/twenty-front/src/modules/settings/usage/utils/getOperationTypeLabel.ts b/packages/twenty-front/src/modules/settings/usage/utils/getOperationTypeLabel.tsnew file mode 100644index 00000000000..aca29c94814--- /dev/null+++ b/packages/twenty-front/src/modules/settings/usage/utils/getOperationTypeLabel.ts@@ -0,0 +1,14 @@+import { t } from '@lingui/core/macro';++export const getOperationTypeLabel = (key: string): string => {+ switch (key) {+ case 'AI_TOKEN':+ return t`AI Chat`;+ case 'WORKFLOW_EXECUTION':+ return t`Workflow Execution`;+ case 'CODE_EXECUTION':+ return t`Code Execution`;+ default:+ return key;+ }+};diff --git a/packages/twenty-front/src/modules/settings/usage/utils/getPeriodDates.ts b/packages/twenty-front/src/modules/settings/usage/utils/getPeriodDates.tsnew file mode 100644index 00000000000..e7e2e965740--- /dev/null+++ b/packages/twenty-front/src/modules/settings/usage/utils/getPeriodDates.ts@@ -0,0 +1,25 @@+import { type PeriodPreset } from '@/settings/usage/utils/periodPreset';++const PERIOD_DAYS: Record<PeriodPreset, number> = {+ '7d': 7,+ '30d': 30,+ '90d': 90,+};++export const getPeriodDates = (+ preset: PeriodPreset,+): { periodStart: string; periodEnd: string } => {+ const now = new Date();++ const end = new Date(now);+ end.setHours(23, 59, 59, 999);++ const start = new Date(end);+ start.setDate(start.getDate() - PERIOD_DAYS[preset]);+ start.setHours(0, 0, 0, 0);++ return {+ periodStart: start.toISOString(),+ periodEnd: end.toISOString(),+ };+};diff --git a/packages/twenty-front/src/modules/settings/usage/utils/getPeriodOptions.ts b/packages/twenty-front/src/modules/settings/usage/utils/getPeriodOptions.tsnew file mode 100644index 00000000000..2eb603b7408--- /dev/null+++ b/packages/twenty-front/src/modules/settings/usage/utils/getPeriodOptions.ts@@ -0,0 +1,12 @@+import { t } from '@lingui/core/macro';++import { type PeriodPreset } from '@/settings/usage/utils/periodPreset';++export const getPeriodOptions = (): {+ value: PeriodPreset;+ label: string;+}[] => [+ { value: '7d', label: t`Last 7 days` },+ { value: '30d', label: t`Last 30 days` },+ { value: '90d', label: t`Last 90 days` },+];diff --git a/packages/twenty-front/src/modules/settings/usage/utils/periodPreset.ts b/packages/twenty-front/src/modules/settings/usage/utils/periodPreset.tsnew file mode 100644index 00000000000..3fcefdccf8a--- /dev/null+++ b/packages/twenty-front/src/modules/settings/usage/utils/periodPreset.ts@@ -0,0 +1 @@+export type PeriodPreset = '7d' | '30d' | '90d';diff --git a/packages/twenty-front/src/modules/ui/layout/table/components/TableCell.tsx b/packages/twenty-front/src/modules/ui/layout/table/components/TableCell.tsxindex b48dee0bb47..919f2f30cfb 100644--- a/packages/twenty-front/src/modules/ui/layout/table/components/TableCell.tsx+++ b/packages/twenty-front/src/modules/ui/layout/table/components/TableCell.tsx@@ -18,7 +18,7 @@ type TableCellProps = {const StyledTableCell = styled.div<TableCellProps>`align-items: center;color: ${({ color }) => color || themeCssVariables.font.color.secondary};- cursor: ${({ clickable }) => (clickable === true ? 'pointer' : 'default')};+ cursor: ${({ clickable }) => (clickable === true ? 'pointer' : 'inherit')};display: flex;gap: ${({ gap }) => gap ?? 'normal'};height: ${({ height }) => height ?? themeCssVariables.spacing[8]};diff --git a/packages/twenty-front/src/modules/users/graphql/fragments/billingSubscriptionsFragment.ts b/packages/twenty-front/src/modules/users/graphql/fragments/billingSubscriptionsFragment.tsindex 1aeec52a6f8..10a7f09ba9f 100644--- a/packages/twenty-front/src/modules/users/graphql/fragments/billingSubscriptionsFragment.ts+++ b/packages/twenty-front/src/modules/users/graphql/fragments/billingSubscriptionsFragment.ts@@ -1,6 +1,6 @@import { gql } from '@apollo/client';-import { BILLING_SUBSCRIPTION_SCHEDULE_PHASE_ITEM_FRAGMENT } from '@/billing/graphql/fragments/billingSubscriptionSchedulePhaseItemFragment';-import { BILLING_SUBSCRIPTION_SCHEDULE_PHASE_FRAGMENT } from '@/billing/graphql/fragments/billingSubscriptionSchedulePhaseFragment';+import { BILLING_SUBSCRIPTION_SCHEDULE_PHASE_ITEM_FRAGMENT } from '@/settings/billing/graphql/fragments/billingSubscriptionSchedulePhaseItemFragment';+import { BILLING_SUBSCRIPTION_SCHEDULE_PHASE_FRAGMENT } from '@/settings/billing/graphql/fragments/billingSubscriptionSchedulePhaseFragment';export const BILLING_SUBSCRIPTION_FRAGMENT = gql`fragment BillingSubscriptionFragment on BillingSubscription {diff --git a/packages/twenty-front/src/modules/users/graphql/fragments/currentBillingSubscriptionFragement.ts b/packages/twenty-front/src/modules/users/graphql/fragments/currentBillingSubscriptionFragement.tsindex a152a3c8c92..82b8ea883fa 100644--- a/packages/twenty-front/src/modules/users/graphql/fragments/currentBillingSubscriptionFragement.ts+++ b/packages/twenty-front/src/modules/users/graphql/fragments/currentBillingSubscriptionFragement.ts@@ -1,6 +1,6 @@import { gql } from '@apollo/client';-import { BILLING_SUBSCRIPTION_SCHEDULE_PHASE_FRAGMENT } from '@/billing/graphql/fragments/billingSubscriptionSchedulePhaseFragment';-import { BILLING_SUBSCRIPTION_SCHEDULE_PHASE_ITEM_FRAGMENT } from '@/billing/graphql/fragments/billingSubscriptionSchedulePhaseItemFragment';+import { BILLING_SUBSCRIPTION_SCHEDULE_PHASE_FRAGMENT } from '@/settings/billing/graphql/fragments/billingSubscriptionSchedulePhaseFragment';+import { BILLING_SUBSCRIPTION_SCHEDULE_PHASE_ITEM_FRAGMENT } from '@/settings/billing/graphql/fragments/billingSubscriptionSchedulePhaseItemFragment';export const CURRENT_BILLING_SUBSCRIPTION_FRAGMENT = gql`fragment CurrentBillingSubscriptionFragment on BillingSubscription {diff --git a/packages/twenty-front/src/pages/onboarding/ChooseYourPlan.tsx b/packages/twenty-front/src/pages/onboarding/ChooseYourPlan.tsxindex 768c4b58422..0b92fed4f97 100644--- a/packages/twenty-front/src/pages/onboarding/ChooseYourPlan.tsx+++ b/packages/twenty-front/src/pages/onboarding/ChooseYourPlan.tsx@@ -4,7 +4,7 @@ import { isDefined } from 'twenty-shared/utils';import { ChooseYourPlanContent } from '~/pages/onboarding/internal/ChooseYourPlanContent';import { billingState } from '@/client-config/states/billingState';import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';-import { usePlans } from '@/billing/hooks/usePlans';+import { usePlans } from '@/settings/billing/hooks/usePlans';const StyledChooseYourPlanPlaceholder = styled.div`height: 566px;diff --git a/packages/twenty-front/src/pages/onboarding/internal/ChooseYourPlanContent.tsx b/packages/twenty-front/src/pages/onboarding/internal/ChooseYourPlanContent.tsxindex e8980075e57..b0324eb2b54 100644--- a/packages/twenty-front/src/pages/onboarding/internal/ChooseYourPlanContent.tsx+++ b/packages/twenty-front/src/pages/onboarding/internal/ChooseYourPlanContent.tsx@@ -3,12 +3,12 @@ import { SubTitle } from '@/auth/components/SubTitle';import { Title } from '@/auth/components/Title';import { useAuth } from '@/auth/hooks/useAuth';import { billingCheckoutSessionState } from '@/auth/states/billingCheckoutSessionState';-import { SubscriptionBenefit } from '@/billing/components/SubscriptionBenefit';-import { SubscriptionPrice } from '@/billing/components/SubscriptionPrice';-import { TrialCard } from '@/billing/components/TrialCard';-import { useBaseLicensedPriceByPlanKeyAndInterval } from '@/billing/hooks/useBaseLicensedPriceByPlanKeyAndInterval';-import { useBaseProductByPlanKey } from '@/billing/hooks/useBaseProductByPlanKey';-import { useHandleCheckoutSession } from '@/billing/hooks/useHandleCheckoutSession';+import { SubscriptionBenefit } from '@/settings/billing/components/SubscriptionBenefit';+import { SubscriptionPrice } from '@/settings/billing/components/SubscriptionPrice';+import { TrialCard } from '@/settings/billing/components/TrialCard';+import { useBaseLicensedPriceByPlanKeyAndInterval } from '@/settings/billing/hooks/useBaseLicensedPriceByPlanKeyAndInterval';+import { useBaseProductByPlanKey } from '@/settings/billing/hooks/useBaseProductByPlanKey';+import { useHandleCheckoutSession } from '@/settings/billing/hooks/useHandleCheckoutSession';import { calendarBookingPageIdState } from '@/client-config/states/calendarBookingPageIdState';import { styled } from '@linaria/react';import { Trans, useLingui } from '@lingui/react/macro';diff --git a/packages/twenty-front/src/pages/settings/SettingsBilling.tsx b/packages/twenty-front/src/pages/settings/SettingsBilling.tsxindex 199d2f9f09d..3a566f18a8e 100644--- a/packages/twenty-front/src/pages/settings/SettingsBilling.tsx+++ b/packages/twenty-front/src/pages/settings/SettingsBilling.tsx@@ -2,10 +2,10 @@ import { Trans, useLingui } from '@lingui/react/macro';import { currentWorkspaceState } from '@/auth/states/currentWorkspaceState';import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';import { SubMenuTopBarContainer } from '@/ui/layout/page/components/SubMenuTopBarContainer';-import { SettingsBillingContent } from '@/billing/components/SettingsBillingContent';+import { SettingsBillingContent } from '@/settings/billing/components/SettingsBillingContent';import { getSettingsPath } from 'twenty-shared/utils';import { SettingsPath } from 'twenty-shared/types';-import { usePlans } from '@/billing/hooks/usePlans';+import { usePlans } from '@/settings/billing/hooks/usePlans';export const SettingsBilling = () => {const { t } = useLingui();diff --git a/packages/twenty-front/src/pages/settings/SettingsUsage.tsx b/packages/twenty-front/src/pages/settings/SettingsUsage.tsxnew file mode 100644index 00000000000..4857b2a2d01--- /dev/null+++ b/packages/twenty-front/src/pages/settings/SettingsUsage.tsx@@ -0,0 +1,27 @@+import { Trans, useLingui } from '@lingui/react/macro';+import { SettingsUsageAnalyticsSection } from '@/settings/usage/components/SettingsUsageAnalyticsSection';+import { SettingsPageContainer } from '@/settings/components/SettingsPageContainer';+import { SubMenuTopBarContainer } from '@/ui/layout/page/components/SubMenuTopBarContainer';+import { getSettingsPath } from 'twenty-shared/utils';+import { SettingsPath } from 'twenty-shared/types';++export const SettingsUsage = () => {+ const { t } = useLingui();++ return (+ <SubMenuTopBarContainer+ title={t`Usage`}+ links={[+ {+ children: <Trans>Workspace</Trans>,+ href: getSettingsPath(SettingsPath.Workspace),+ },+ { children: <Trans>Usage</Trans> },+ ]}+ >+ <SettingsPageContainer>+ <SettingsUsageAnalyticsSection />+ </SettingsPageContainer>+ </SubMenuTopBarContainer>+ );+};diff --git a/packages/twenty-front/src/pages/settings/SettingsUsageUserDetail.tsx b/packages/twenty-front/src/pages/settings/SettingsUsageUserDetail.tsxnew file mode 100644index 00000000000..2eb3b46e443--- /dev/null+++ b/packages/twenty-front/src/pages/settings/SettingsUsageUserDetail.tsx@@ -0,0 +1,277 @@+import { SettingsBillingLabelValueItem } from '@/settings/billing/components/internal/SettingsBillingLabelValueItem';+import { SubscriptionInfoContainer } from '@/settings/billing/components/SubscriptionInfoContainer';+import { useNumberFormat } from '@/localization/hooks/useNumberFormat';+import { GraphWidgetLineChart } from '@/page-layout/widgets/graph/graph-widget-line-chart/components/GraphWidgetLineChart';+import { type LineChartSeriesWithColor } from '@/page-layout/widgets/graph/graph-widget-line-chart/types/LineChartSeriesWithColor';+import { createGraphColorRegistry } from '@/page-layout/widgets/graph/utils/createGraphColorRegistry';+import { getColorSchemeByIndex } from '@/page-layout/widgets/graph/utils/getColorSchemeByIndex';+import { Select } from '@/ui/input/components/Select';+import { SettingsPageContainer } from '@/settings/components/SettingsPageContainer';+import { SubMenuTopBarContainer } from '@/ui/layout/page/components/SubMenuTopBarContainer';+import { getOperationTypeLabel } from '@/settings/usage/utils/getOperationTypeLabel';+import { getPeriodDates } from '@/settings/usage/utils/getPeriodDates';+import { getPeriodOptions } from '@/settings/usage/utils/getPeriodOptions';+import { type PeriodPreset } from '@/settings/usage/utils/periodPreset';+import { UsagePieChart } from '@/settings/usage/components/UsagePieChart';+import { Trans, useLingui } from '@lingui/react/macro';+import { t } from '@lingui/core/macro';+import { styled } from '@linaria/react';+import { useContext, useState } from 'react';+import Skeleton, { SkeletonTheme } from 'react-loading-skeleton';+import { useParams } from 'react-router-dom';+import { SettingsPath } from 'twenty-shared/types';+import { getSettingsPath } from 'twenty-shared/utils';+import { Avatar, H2Title } from 'twenty-ui/display';+import { Section } from 'twenty-ui/layout';+import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useQuery } from '@apollo/client/react';+import { GetUsageAnalyticsDocument } from '~/generated-metadata/graphql';+import { formatDate } from '~/utils/date-utils';++const StyledUserHeader = styled.div`+ align-items: center;+ display: flex;+ gap: ${themeCssVariables.spacing[2]};+ margin-bottom: ${themeCssVariables.spacing[4]};+`;++const StyledUserInfo = styled.div`+ display: flex;+ flex-direction: column;+`;++const StyledUserName = styled.span`+ color: ${themeCssVariables.font.color.primary};+ font-size: ${themeCssVariables.font.size.lg};+ font-weight: ${themeCssVariables.font.weight.semiBold};+`;++const StyledUserCredits = styled.span`+ color: ${themeCssVariables.font.color.tertiary};+ font-size: ${themeCssVariables.font.size.sm};+`;++const StyledLineChartContainer = styled.div`+ height: 200px;+ width: 100%;+`;++export const SettingsUsageUserDetail = () => {+ const { t: tLingui } = useLingui();+ const { userWorkspaceId } = useParams<{ userWorkspaceId: string }>();+ const { theme } = useContext(ThemeContext);+ const { formatNumber } = useNumberFormat();+ const colorRegistry = createGraphColorRegistry(theme.color);++ const [dailyPeriod, setDailyPeriod] = useState<PeriodPreset>('30d');+ const [typePeriod, setTypePeriod] = useState<PeriodPreset>('30d');++ const periodOptions = getPeriodOptions();++ const dailyDates = getPeriodDates(dailyPeriod);+ const typeDates = getPeriodDates(typePeriod);++ const { data: dailyData, loading: dailyLoading } = useQuery(+ GetUsageAnalyticsDocument,+ {+ variables: {+ input: {+ ...dailyDates,+ userWorkspaceId,+ },+ },+ skip: !userWorkspaceId,+ },+ );++ const { data: typeData, loading: typeLoading } = useQuery(+ GetUsageAnalyticsDocument,+ {+ variables: {+ input: {+ ...typeDates,+ userWorkspaceId,+ },+ },+ skip: !userWorkspaceId,+ },+ );++ const dailyAnalytics = dailyData?.getUsageAnalytics;+ const typeAnalytics = typeData?.getUsageAnalytics;++ const userDailyUsage = dailyAnalytics?.userDailyUsage?.dailyUsage ?? [];+ const usageByOperationType = typeAnalytics?.usageByOperationType ?? [];++ const userName =+ dailyAnalytics?.usageByUser?.find((item) => item.key === userWorkspaceId)+ ?.label ??+ typeAnalytics?.usageByUser?.find((item) => item.key === userWorkspaceId)+ ?.label;++ const totalCredits = usageByOperationType.reduce(+ (sum, item) => sum + item.creditsUsed,+ 0,+ );++ const displayName = userName ?? userWorkspaceId ?? '';++ const pieData = usageByOperationType.map((item, index) => ({+ id: getOperationTypeLabel(item.key),+ value: item.creditsUsed,+ color: getColorSchemeByIndex(colorRegistry, index).solid,+ }));++ const lineData: LineChartSeriesWithColor[] = [+ {+ id: 'credits',+ label: t`Credits`,+ data: userDailyUsage.map((point) => ({+ x: formatDate(point.date, 'MMM d'),+ y: point.creditsUsed,+ })),+ },+ ];++ const isInitialLoading =+ (dailyLoading || typeLoading) && !dailyData && !typeData;++ const breadcrumbLinks = [+ {+ children: <Trans>Workspace</Trans>,+ href: getSettingsPath(SettingsPath.Workspace),+ },+ {+ children: <Trans>Usage</Trans>,+ href: getSettingsPath(SettingsPath.Usage),+ },+ { children: isInitialLoading ? '' : displayName },+ ];++ if (isInitialLoading) {+ return (+ <SubMenuTopBarContainer+ title={tLingui`User Usage`}+ links={breadcrumbLinks}+ >+ <SettingsPageContainer>+ <SkeletonTheme+ baseColor={theme.background.tertiary}+ highlightColor={theme.background.transparent.lighter}+ borderRadius={4}+ >+ <StyledUserHeader>+ <Skeleton width={40} height={40} borderRadius={8} />+ <StyledUserInfo>+ <Skeleton width={160} height={16} />+ <Skeleton width={100} height={13} />+ </StyledUserInfo>+ </StyledUserHeader>+ <Section>+ <Skeleton width={120} height={16} />+ <Skeleton+ width="100%"+ height={200}+ borderRadius={8}+ style={{ marginTop: 16 }}+ />+ </Section>+ <Section>+ <Skeleton width={120} height={16} />+ <Skeleton+ width="100%"+ height={220}+ borderRadius={8}+ style={{ marginTop: 16 }}+ />+ </Section>+ </SkeletonTheme>+ </SettingsPageContainer>+ </SubMenuTopBarContainer>+ );+ }++ return (+ <SubMenuTopBarContainer title={tLingui`User Usage`} links={breadcrumbLinks}>+ <SettingsPageContainer>+ <StyledUserHeader>+ <Avatar+ type="rounded"+ size="xl"+ placeholder={displayName}+ placeholderColorSeed={userWorkspaceId}+ />+ <StyledUserInfo>+ <StyledUserName>{displayName}</StyledUserName>+ <StyledUserCredits>+ {t`${formatNumber(totalCredits)} credits used`}+ </StyledUserCredits>+ </StyledUserInfo>+ </StyledUserHeader>++ {userDailyUsage.length === 0 && pieData.length === 0 && (+ <Section>+ <SubscriptionInfoContainer>+ <SettingsBillingLabelValueItem+ label={t`No usage data`}+ value={t`No credit consumption recorded for this user.`}+ />+ </SubscriptionInfoContainer>+ </Section>+ )}++ {userDailyUsage.length > 0 && (+ <Section>+ <H2Title+ title={t`Daily Usage`}+ description={t`Per-day credit consumption.`}+ adornment={+ <Select+ dropdownId="user-daily-period"+ value={dailyPeriod}+ options={periodOptions}+ onChange={setDailyPeriod}+ needIconCheck+ selectSizeVariant="small"+ />+ }+ />+ <SubscriptionInfoContainer>+ <StyledLineChartContainer>+ <GraphWidgetLineChart+ id="user-daily-line-chart"+ data={lineData}+ colorMode="automaticPalette"+ showLegend={false}+ enableArea+ />+ </StyledLineChartContainer>+ </SubscriptionInfoContainer>+ </Section>+ )}++ {usageByOperationType.length > 0 && (+ <Section>+ <H2Title+ title={t`Usage by Type`}+ description={t`${formatNumber(totalCredits)} credits`}+ adornment={+ <Select+ dropdownId="user-type-period"+ value={typePeriod}+ options={periodOptions}+ onChange={setTypePeriod}+ needIconCheck+ selectSizeVariant="small"+ />+ }+ />+ <SubscriptionInfoContainer>+ <UsagePieChart data={pieData} />+ </SubscriptionInfoContainer>+ </Section>+ )}+ </SettingsPageContainer>+ </SubMenuTopBarContainer>+ );+};diff --git a/packages/twenty-front/src/pages/settings/enterprise/SettingsEnterprise.tsx b/packages/twenty-front/src/pages/settings/enterprise/SettingsEnterprise.tsxindex a0d6a125e43..5381be3e414 100644--- a/packages/twenty-front/src/pages/settings/enterprise/SettingsEnterprise.tsx+++ b/packages/twenty-front/src/pages/settings/enterprise/SettingsEnterprise.tsx@@ -2,8 +2,8 @@ import { Trans, useLingui } from '@lingui/react/macro';import { useCallback, useEffect, useState } from 'react';import { currentWorkspaceState } from '@/auth/states/currentWorkspaceState';-import { SubscriptionInfoContainer } from '@/billing/components/SubscriptionInfoContainer';-import { SubscriptionInfoRowContainer } from '@/billing/components/internal/SubscriptionInfoRowContainer';+import { SubscriptionInfoContainer } from '@/settings/billing/components/SubscriptionInfoContainer';+import { SubscriptionInfoRowContainer } from '@/settings/billing/components/internal/SubscriptionInfoRowContainer';import { SettingsPageContainer } from '@/settings/components/SettingsPageContainer';import {ENTERPRISE_PLAN_MODAL_ID,diff --git a/packages/twenty-front/src/pages/settings/security/event-logs/components/EventLogResultsTable.tsx b/packages/twenty-front/src/pages/settings/security/event-logs/components/EventLogResultsTable.tsxindex b3bb2bfd4b4..7fc35e3faba 100644--- a/packages/twenty-front/src/pages/settings/security/event-logs/components/EventLogResultsTable.tsx+++ b/packages/twenty-front/src/pages/settings/security/event-logs/components/EventLogResultsTable.tsx@@ -79,6 +79,28 @@ const OBJECT_EVENT_COLUMNS: ColumnConfig[] = [},];+const USAGE_EVENT_COLUMNS: ColumnConfig[] = [+ {+ id: 'event',+ label: msg`Resource Type`,+ minWidth: 100,+ defaultWidth: 130,+ },+ {+ id: 'timestamp',+ label: msg`Timestamp`,+ minWidth: 100,+ defaultWidth: 140,+ },+ { id: 'userId', label: msg`User`, minWidth: 100, defaultWidth: 130 },+ {+ id: 'properties',+ label: msg`Details`,+ minWidth: 200,+ defaultWidth: 400,+ },+];+const StyledScrollWrapperContainer = styled.div`height: 100%;overflow: hidden;@@ -159,9 +181,12 @@ export const EventLogResultsTable = ({const { t } = useLingui();const showObjectEventColumns = selectedTable === EventLogTable.OBJECT_EVENT;- const baseColumns = showObjectEventColumns- ? OBJECT_EVENT_COLUMNS- : DEFAULT_COLUMNS;+ const baseColumns =+ selectedTable === EventLogTable.OBJECT_EVENT+ ? OBJECT_EVENT_COLUMNS+ : selectedTable === EventLogTable.USAGE_EVENT+ ? USAGE_EVENT_COLUMNS+ : DEFAULT_COLUMNS;const [columnWidths, setColumnWidths] = useState<Record<string, number>>(() =>Object.fromEntries(baseColumns.map((col) => [col.id, col.defaultWidth])),diff --git a/packages/twenty-front/src/pages/settings/security/event-logs/components/EventLogTableSelector.tsx b/packages/twenty-front/src/pages/settings/security/event-logs/components/EventLogTableSelector.tsxindex 48f3dcff5e7..20603d60708 100644--- a/packages/twenty-front/src/pages/settings/security/event-logs/components/EventLogTableSelector.tsx+++ b/packages/twenty-front/src/pages/settings/security/event-logs/components/EventLogTableSelector.tsx@@ -27,6 +27,10 @@ export const EventLogTableSelector = ({value: EventLogTable.OBJECT_EVENT,label: t`Object Events`,},+ {+ value: EventLogTable.USAGE_EVENT,+ label: t`Usage Events`,+ },];return (diff --git a/packages/twenty-front/src/testing/graphqlMocks.ts b/packages/twenty-front/src/testing/graphqlMocks.tsindex 1ddbabdc9da..175da5bf874 100644--- a/packages/twenty-front/src/testing/graphqlMocks.ts+++ b/packages/twenty-front/src/testing/graphqlMocks.ts@@ -15,7 +15,7 @@ import { mockedPublicWorkspaceDataBySubdomain } from '~/testing/mock-data/publicimport { mockedUserData } from '~/testing/mock-data/users';import { GET_PUBLIC_WORKSPACE_DATA_BY_DOMAIN } from '@/auth/graphql/queries/getPublicWorkspaceDataByDomain';-import { LIST_PLANS } from '@/billing/graphql/queries/listPlans';+import { LIST_PLANS } from '@/settings/billing/graphql/queries/listPlans';import { GET_ROLES } from '@/settings/roles/graphql/queries/getRolesQuery';import { isDefined } from 'twenty-shared/utils';import { mockBillingPlans } from '~/testing/mock-data/billing-plans';diff --git a/packages/twenty-sdk/src/clients/generated/metadata/schema.graphql b/packages/twenty-sdk/src/clients/generated/metadata/schema.graphqlindex feaabd8c93e..a2604a295d1 100644--- a/packages/twenty-sdk/src/clients/generated/metadata/schema.graphql+++ b/packages/twenty-sdk/src/clients/generated/metadata/schema.graphql@@ -1554,6 +1554,7 @@ enum FeatureFlagKey {IS_DATE_TIME_WHOLE_DAY_FILTER_ENABLEDIS_NAVIGATION_MENU_ITEM_EDITING_ENABLEDIS_DRAFT_EMAIL_ENABLED+ IS_USAGE_ANALYTICS_ENABLEDIS_RICH_TEXT_V1_MIGRATEDIS_DIRECT_GRAPHQL_EXECUTION_ENABLEDIS_RECORD_PAGE_LAYOUT_GLOBAL_EDITION_ENABLED@@ -2918,6 +2919,31 @@ type MarketplaceApp {isFeatured: Boolean!}+type UsageBreakdownItem {+ key: String!+ label: String+ creditsUsed: Float!+}++type UsageTimeSeries {+ date: String!+ creditsUsed: Float!+}++type UsageUserDaily {+ userWorkspaceId: String!+ dailyUsage: [UsageTimeSeries!]!+}++type UsageAnalytics {+ usageByUser: [UsageBreakdownItem!]!+ usageByOperationType: [UsageBreakdownItem!]!+ timeSeries: [UsageTimeSeries!]!+ periodStart: DateTime!+ periodEnd: DateTime!+ userDailyUsage: UsageUserDaily+}+type PublicDomain {id: UUID!domain: String!@@ -3240,6 +3266,7 @@ type Query {findOneMarketplaceApp(universalIdentifier: String!): MarketplaceApp!findManyApplications: [Application!]!findOneApplication(id: UUID, universalIdentifier: UUID): Application!+ getUsageAnalytics(input: UsageAnalyticsInput): UsageAnalytics!}input LogicFunctionIdInput {@@ -3317,6 +3344,7 @@ enum EventLogTable {WORKSPACE_EVENTPAGEVIEWOBJECT_EVENT+ USAGE_EVENT}input EventLogFiltersInput {@@ -3347,6 +3375,12 @@ input BarChartDataInput {configuration: JSON!}+input UsageAnalyticsInput {+ periodStart: DateTime+ periodEnd: DateTime+ userWorkspaceId: String+}+type Mutation {addQueryToEventStream(input: AddQuerySubscriptionInput!): Boolean!removeQueryFromEventStream(input: RemoveQueryFromEventStreamInput!): Boolean!diff --git a/packages/twenty-sdk/src/clients/generated/metadata/schema.ts b/packages/twenty-sdk/src/clients/generated/metadata/schema.tsindex 7da5c7333f7..fe3df371287 100644--- a/packages/twenty-sdk/src/clients/generated/metadata/schema.ts+++ b/packages/twenty-sdk/src/clients/generated/metadata/schema.ts@@ -1256,7 +1256,7 @@ export interface FeatureFlag {__typename: 'FeatureFlag'}-export type FeatureFlagKey = 'IS_UNIQUE_INDEXES_ENABLED' | 'IS_JSON_FILTER_ENABLED' | 'IS_AI_ENABLED' | 'IS_APPLICATION_ENABLED' | 'IS_MARKETPLACE_ENABLED' | 'IS_RECORD_PAGE_LAYOUT_EDITING_ENABLED' | 'IS_PUBLIC_DOMAIN_ENABLED' | 'IS_EMAILING_DOMAIN_ENABLED' | 'IS_DASHBOARD_V2_ENABLED' | 'IS_ATTACHMENT_MIGRATED' | 'IS_NOTE_TARGET_MIGRATED' | 'IS_TASK_TARGET_MIGRATED' | 'IS_ROW_LEVEL_PERMISSION_PREDICATES_ENABLED' | 'IS_JUNCTION_RELATIONS_ENABLED' | 'IS_COMMAND_MENU_ITEM_ENABLED' | 'IS_NAVIGATION_MENU_ITEM_ENABLED' | 'IS_DATE_TIME_WHOLE_DAY_FILTER_ENABLED' | 'IS_NAVIGATION_MENU_ITEM_EDITING_ENABLED' | 'IS_DRAFT_EMAIL_ENABLED' | 'IS_RICH_TEXT_V1_MIGRATED' | 'IS_DIRECT_GRAPHQL_EXECUTION_ENABLED' | 'IS_RECORD_PAGE_LAYOUT_GLOBAL_EDITION_ENABLED' | 'IS_CONNECTED_ACCOUNT_MIGRATED'+export type FeatureFlagKey = 'IS_UNIQUE_INDEXES_ENABLED' | 'IS_JSON_FILTER_ENABLED' | 'IS_AI_ENABLED' | 'IS_APPLICATION_ENABLED' | 'IS_MARKETPLACE_ENABLED' | 'IS_RECORD_PAGE_LAYOUT_EDITING_ENABLED' | 'IS_PUBLIC_DOMAIN_ENABLED' | 'IS_EMAILING_DOMAIN_ENABLED' | 'IS_DASHBOARD_V2_ENABLED' | 'IS_ATTACHMENT_MIGRATED' | 'IS_NOTE_TARGET_MIGRATED' | 'IS_TASK_TARGET_MIGRATED' | 'IS_ROW_LEVEL_PERMISSION_PREDICATES_ENABLED' | 'IS_JUNCTION_RELATIONS_ENABLED' | 'IS_COMMAND_MENU_ITEM_ENABLED' | 'IS_NAVIGATION_MENU_ITEM_ENABLED' | 'IS_DATE_TIME_WHOLE_DAY_FILTER_ENABLED' | 'IS_NAVIGATION_MENU_ITEM_EDITING_ENABLED' | 'IS_DRAFT_EMAIL_ENABLED' | 'IS_USAGE_ANALYTICS_ENABLED' | 'IS_RICH_TEXT_V1_MIGRATED' | 'IS_DIRECT_GRAPHQL_EXECUTION_ENABLED' | 'IS_RECORD_PAGE_LAYOUT_GLOBAL_EDITION_ENABLED' | 'IS_CONNECTED_ACCOUNT_MIGRATED'export interface SSOIdentityProvider {id: Scalars['UUID']@@ -2492,6 +2492,35 @@ export interface MarketplaceApp {__typename: 'MarketplaceApp'}+export interface UsageBreakdownItem {+ key: Scalars['String']+ label?: Scalars['String']+ creditsUsed: Scalars['Float']+ __typename: 'UsageBreakdownItem'+}++export interface UsageTimeSeries {+ date: Scalars['String']+ creditsUsed: Scalars['Float']+ __typename: 'UsageTimeSeries'+}++export interface UsageUserDaily {+ userWorkspaceId: Scalars['String']+ dailyUsage: UsageTimeSeries[]+ __typename: 'UsageUserDaily'+}++export interface UsageAnalytics {+ usageByUser: UsageBreakdownItem[]+ usageByOperationType: UsageBreakdownItem[]+ timeSeries: UsageTimeSeries[]+ periodStart: Scalars['DateTime']+ periodEnd: Scalars['DateTime']+ userDailyUsage?: UsageUserDaily+ __typename: 'UsageAnalytics'+}+export interface PublicDomain {id: Scalars['UUID']domain: Scalars['String']@@ -2794,6 +2823,7 @@ export interface Query {findOneMarketplaceApp: MarketplaceAppfindManyApplications: Application[]findOneApplication: Application+ getUsageAnalytics: UsageAnalytics__typename: 'Query'}@@ -2807,7 +2837,7 @@ export type SortDirection = 'ASC' | 'DESC'/** Sort Nulls Options */export type SortNulls = 'NULLS_FIRST' | 'NULLS_LAST'-export type EventLogTable = 'WORKSPACE_EVENT' | 'PAGEVIEW' | 'OBJECT_EVENT'+export type EventLogTable = 'WORKSPACE_EVENT' | 'PAGEVIEW' | 'OBJECT_EVENT' | 'USAGE_EVENT'export interface Mutation {addQueryToEventStream: Scalars['Boolean']@@ -5635,6 +5665,39 @@ export interface MarketplaceAppGenqlSelection{__scalar?: boolean | number}+export interface UsageBreakdownItemGenqlSelection{+ key?: boolean | number+ label?: boolean | number+ creditsUsed?: boolean | number+ __typename?: boolean | number+ __scalar?: boolean | number+}++export interface UsageTimeSeriesGenqlSelection{+ date?: boolean | number+ creditsUsed?: boolean | number+ __typename?: boolean | number+ __scalar?: boolean | number+}++export interface UsageUserDailyGenqlSelection{+ userWorkspaceId?: boolean | number+ dailyUsage?: UsageTimeSeriesGenqlSelection+ __typename?: boolean | number+ __scalar?: boolean | number+}++export interface UsageAnalyticsGenqlSelection{+ usageByUser?: UsageBreakdownItemGenqlSelection+ usageByOperationType?: UsageBreakdownItemGenqlSelection+ timeSeries?: UsageTimeSeriesGenqlSelection+ periodStart?: boolean | number+ periodEnd?: boolean | number+ userDailyUsage?: UsageUserDailyGenqlSelection+ __typename?: boolean | number+ __scalar?: boolean | number+}+export interface PublicDomainGenqlSelection{id?: boolean | numberdomain?: boolean | number@@ -5980,6 +6043,7 @@ export interface QueryGenqlSelection{findOneMarketplaceApp?: (MarketplaceAppGenqlSelection & { __args: {universalIdentifier: Scalars['String']} })findManyApplications?: ApplicationGenqlSelectionfindOneApplication?: (ApplicationGenqlSelection & { __args?: {id?: (Scalars['UUID'] | null), universalIdentifier?: (Scalars['UUID'] | null)} })+ getUsageAnalytics?: (UsageAnalyticsGenqlSelection & { __args?: {input?: (UsageAnalyticsInput | null)} })__typename?: boolean | number__scalar?: boolean | number}@@ -6014,6 +6078,8 @@ export interface LineChartDataInput {objectMetadataId: Scalars['UUID'],configuraexport interface BarChartDataInput {objectMetadataId: Scalars['UUID'],configuration: Scalars['JSON']}+export interface UsageAnalyticsInput {periodStart?: (Scalars['DateTime'] | null),periodEnd?: (Scalars['DateTime'] | null),userWorkspaceId?: (Scalars['String'] | null)}+export interface MutationGenqlSelection{addQueryToEventStream?: { __args: {input: AddQuerySubscriptionInput} }removeQueryFromEventStream?: { __args: {input: RemoveQueryFromEventStreamInput} }@@ -8399,6 +8465,38 @@ export interface LogicFunctionLogsInput {applicationId?: (Scalars['UUID'] | null+ const UsageBreakdownItem_possibleTypes: string[] = ['UsageBreakdownItem']+ export const isUsageBreakdownItem = (obj?: { __typename?: any } | null): obj is UsageBreakdownItem => {+ if (!obj?.__typename) throw new Error('__typename is missing in "isUsageBreakdownItem"')+ return UsageBreakdownItem_possibleTypes.includes(obj.__typename)+ }++++ const UsageTimeSeries_possibleTypes: string[] = ['UsageTimeSeries']+ export const isUsageTimeSeries = (obj?: { __typename?: any } | null): obj is UsageTimeSeries => {+ if (!obj?.__typename) throw new Error('__typename is missing in "isUsageTimeSeries"')+ return UsageTimeSeries_possibleTypes.includes(obj.__typename)+ }++++ const UsageUserDaily_possibleTypes: string[] = ['UsageUserDaily']+ export const isUsageUserDaily = (obj?: { __typename?: any } | null): obj is UsageUserDaily => {+ if (!obj?.__typename) throw new Error('__typename is missing in "isUsageUserDaily"')+ return UsageUserDaily_possibleTypes.includes(obj.__typename)+ }++++ const UsageAnalytics_possibleTypes: string[] = ['UsageAnalytics']+ export const isUsageAnalytics = (obj?: { __typename?: any } | null): obj is UsageAnalytics => {+ if (!obj?.__typename) throw new Error('__typename is missing in "isUsageAnalytics"')+ return UsageAnalytics_possibleTypes.includes(obj.__typename)+ }+++const PublicDomain_possibleTypes: string[] = ['PublicDomain']export const isPublicDomain = (obj?: { __typename?: any } | null): obj is PublicDomain => {if (!obj?.__typename) throw new Error('__typename is missing in "isPublicDomain"')@@ -8979,6 +9077,7 @@ export const enumFeatureFlagKey = {IS_DATE_TIME_WHOLE_DAY_FILTER_ENABLED: 'IS_DATE_TIME_WHOLE_DAY_FILTER_ENABLED' as const,IS_NAVIGATION_MENU_ITEM_EDITING_ENABLED: 'IS_NAVIGATION_MENU_ITEM_EDITING_ENABLED' as const,IS_DRAFT_EMAIL_ENABLED: 'IS_DRAFT_EMAIL_ENABLED' as const,+ IS_USAGE_ANALYTICS_ENABLED: 'IS_USAGE_ANALYTICS_ENABLED' as const,IS_RICH_TEXT_V1_MIGRATED: 'IS_RICH_TEXT_V1_MIGRATED' as const,IS_DIRECT_GRAPHQL_EXECUTION_ENABLED: 'IS_DIRECT_GRAPHQL_EXECUTION_ENABLED' as const,IS_RECORD_PAGE_LAYOUT_GLOBAL_EDITION_ENABLED: 'IS_RECORD_PAGE_LAYOUT_GLOBAL_EDITION_ENABLED' as const,@@ -9312,7 +9411,8 @@ export const enumSortNulls = {export const enumEventLogTable = {WORKSPACE_EVENT: 'WORKSPACE_EVENT' as const,PAGEVIEW: 'PAGEVIEW' as const,- OBJECT_EVENT: 'OBJECT_EVENT' as const+ OBJECT_EVENT: 'OBJECT_EVENT' as const,+ USAGE_EVENT: 'USAGE_EVENT' as const}export const enumAnalyticsType = {diff --git a/packages/twenty-sdk/src/clients/generated/metadata/types.ts b/packages/twenty-sdk/src/clients/generated/metadata/types.tsindex 57eadebdc84..5166f0c150b 100644--- a/packages/twenty-sdk/src/clients/generated/metadata/types.ts+++ b/packages/twenty-sdk/src/clients/generated/metadata/types.ts@@ -78,18 +78,18 @@ export default {288,289,303,- 319,- 320,- 343,- 350,- 351,- 352,+ 323,+ 324,+ 347,354,- 366,- 367,- 476,+ 355,+ 356,+ 358,+ 371,+ 372,481,- 482+ 486,+ 487],"types": {"BillingProductDTO": {@@ -5636,6 +5636,65 @@ export default {1]},+ "UsageBreakdownItem": {+ "key": [+ 1+ ],+ "label": [+ 1+ ],+ "creditsUsed": [+ 11+ ],+ "__typename": [+ 1+ ]+ },+ "UsageTimeSeries": {+ "date": [+ 1+ ],+ "creditsUsed": [+ 11+ ],+ "__typename": [+ 1+ ]+ },+ "UsageUserDaily": {+ "userWorkspaceId": [+ 1+ ],+ "dailyUsage": [+ 317+ ],+ "__typename": [+ 1+ ]+ },+ "UsageAnalytics": {+ "usageByUser": [+ 316+ ],+ "usageByOperationType": [+ 316+ ],+ "timeSeries": [+ 317+ ],+ "periodStart": [+ 4+ ],+ "periodEnd": [+ 4+ ],+ "userDailyUsage": [+ 318+ ],+ "__typename": [+ 1+ ]+ },"PublicDomain": {"id": [3@@ -5684,13 +5743,13 @@ export default {1],"driver": [- 319+ 323],"status": [- 320+ 324],"verificationRecords": [- 317+ 321],"verifiedAt": [4@@ -5737,7 +5796,7 @@ export default {1],"location": [- 322+ 326],"__typename": [1@@ -5765,13 +5824,13 @@ export default {},"ImapSmtpCaldavConnectionParameters": {"IMAP": [- 324+ 328],"SMTP": [- 324+ 328],"CALDAV": [- 324+ 328],"__typename": [1@@ -5791,7 +5850,7 @@ export default {3],"connectionParameters": [- 325+ 329],"__typename": [1@@ -5855,7 +5914,7 @@ export default {1],"series": [- 330+ 334],"xAxisLabel": [1@@ -5904,7 +5963,7 @@ export default {1],"data": [- 332+ 336],"__typename": [1@@ -5912,7 +5971,7 @@ export default {},"LineChartData": {"series": [- 333+ 337],"xAxisLabel": [1@@ -5949,7 +6008,7 @@ export default {},"PieChartData": {"data": [- 335+ 339],"showLegend": [6@@ -6032,13 +6091,13 @@ export default {},"EventLogQueryResult": {"records": [- 338+ 342],"totalCount": [21],"pageInfo": [- 339+ 343],"__typename": [1@@ -6173,7 +6232,7 @@ export default {32,{"input": [- 342,+ 346,"LogicFunctionIdInput!"]}@@ -6185,7 +6244,7 @@ export default {15,{"input": [- 342,+ 346,"LogicFunctionIdInput!"]}@@ -6194,7 +6253,7 @@ export default {1,{"input": [- 342,+ 346,"LogicFunctionIdInput!"]}@@ -6295,7 +6354,7 @@ export default {25,{"input": [- 344,+ 348,"AgentIdInput!"]}@@ -6349,7 +6408,7 @@ export default {2,{"input": [- 345,+ 349,"GetApiKeyInput!"]}@@ -6638,11 +6697,11 @@ export default {"CursorPaging!"],"filter": [- 346,+ 350,"AgentChatThreadFilter!"],"sorting": [- 349,+ 353,"[AgentChatThreadSort!]!"]}@@ -6657,43 +6716,43 @@ export default {}],"eventLogs": [- 340,+ 344,{"input": [- 353,+ 357,"EventLogQueryInput!"]}],"pieChartData": [- 336,+ 340,{"input": [- 357,+ 361,"PieChartDataInput!"]}],"lineChartData": [- 334,+ 338,{"input": [- 358,+ 362,"LineChartDataInput!"]}],"barChartData": [- 331,+ 335,{"input": [- 359,+ 363,"BarChartDataInput!"]}],"getConnectedImapSmtpCaldavAccount": [- 326,+ 330,{"id": [3,@@ -6702,7 +6761,7 @@ export default {}],"getAutoCompleteAddress": [- 321,+ 325,{"address": [1,@@ -6721,7 +6780,7 @@ export default {}],"getAddressDetails": [- 323,+ 327,{"placeId": [1,@@ -6813,13 +6872,13 @@ export default {}],"getPostgresCredentials": [- 328+ 332],"findManyPublicDomains": [- 316+ 320],"getEmailingDomains": [- 318+ 322],"findManyMarketplaceApps": [315@@ -6847,13 +6906,21 @@ export default {]}],+ "getUsageAnalytics": [+ 319,+ {+ "input": [+ 364+ ]+ }+ ],"__typename": [1]},"LogicFunctionIdInput": {"id": [- 343+ 347],"__typename": [1@@ -6878,16 +6945,16 @@ export default {},"AgentChatThreadFilter": {"and": [- 346+ 350],"or": [- 346+ 350],"id": [42],"updatedAt": [- 347+ 351],"__typename": [1@@ -6925,10 +6992,10 @@ export default {4],"between": [- 348+ 352],"notBetween": [- 348+ 352],"__typename": [1@@ -6947,13 +7014,13 @@ export default {},"AgentChatThreadSort": {"field": [- 350+ 354],"direction": [- 351+ 355],"nulls": [- 352+ 356],"__typename": [1@@ -6964,10 +7031,10 @@ export default {"SortNulls": {},"EventLogQueryInput": {"table": [- 354+ 358],"filters": [- 355+ 359],"first": [21@@ -6988,7 +7055,7 @@ export default {1],"dateRange": [- 356+ 360],"recordId": [1@@ -7044,12 +7111,26 @@ export default {1]},+ "UsageAnalyticsInput": {+ "periodStart": [+ 4+ ],+ "periodEnd": [+ 4+ ],+ "userWorkspaceId": [+ 1+ ],+ "__typename": [+ 1+ ]+ },"Mutation": {"addQueryToEventStream": [6,{"input": [- 361,+ 366,"AddQuerySubscriptionInput!"]}@@ -7058,7 +7139,7 @@ export default {6,{"input": [- 362,+ 367,"RemoveQueryFromEventStreamInput!"]}@@ -7067,7 +7148,7 @@ export default {208,{"input": [- 363,+ 368,"CreateNavigationMenuItemInput!"]}@@ -7076,7 +7157,7 @@ export default {208,{"input": [- 364,+ 369,"UpdateOneNavigationMenuItemInput!"]}@@ -7094,7 +7175,7 @@ export default {140,{"file": [- 366,+ 371,"Upload!"]}@@ -7103,7 +7184,7 @@ export default {140,{"file": [- 366,+ 371,"Upload!"]}@@ -7112,7 +7193,7 @@ export default {140,{"file": [- 366,+ 371,"Upload!"]}@@ -7121,7 +7202,7 @@ export default {140,{"file": [- 366,+ 371,"Upload!"]}@@ -7130,7 +7211,7 @@ export default {140,{"file": [- 366,+ 371,"Upload!"],"fieldMetadataId": [@@ -7143,7 +7224,7 @@ export default {140,{"file": [- 366,+ 371,"Upload!"],"fieldMetadataUniversalIdentifier": [@@ -7176,7 +7257,7 @@ export default {114,{"type": [- 367,+ 372,"AnalyticsType!"],"name": [@@ -7194,7 +7275,7 @@ export default {75,{"input": [- 368,+ 373,"CreatePageLayoutWidgetInput!"]}@@ -7207,7 +7288,7 @@ export default {"String!"],"input": [- 370,+ 375,"UpdatePageLayoutWidgetInput!"]}@@ -7225,7 +7306,7 @@ export default {111,{"input": [- 371,+ 376,"CreatePageLayoutTabInput!"]}@@ -7238,7 +7319,7 @@ export default {"String!"],"input": [- 372,+ 377,"UpdatePageLayoutTabInput!"]}@@ -7256,7 +7337,7 @@ export default {112,{"input": [- 373,+ 378,"CreatePageLayoutInput!"]}@@ -7269,7 +7350,7 @@ export default {"String!"],"input": [- 374,+ 379,"UpdatePageLayoutInput!"]}@@ -7291,7 +7372,7 @@ export default {"String!"],"input": [- 375,+ 380,"UpdatePageLayoutWithTabsInput!"]}@@ -7300,7 +7381,7 @@ export default {60,{"input": [- 378,+ 383,"CreateViewInput!"]}@@ -7313,7 +7394,7 @@ export default {"String!"],"input": [- 379,+ 384,"UpdateViewInput!"]}@@ -7340,7 +7421,7 @@ export default {57,{"input": [- 380,+ 385,"CreateViewSortInput!"]}@@ -7349,7 +7430,7 @@ export default {57,{"input": [- 381,+ 386,"UpdateViewSortInput!"]}@@ -7358,7 +7439,7 @@ export default {6,{"input": [- 383,+ 388,"DeleteViewSortInput!"]}@@ -7367,7 +7448,7 @@ export default {6,{"input": [- 384,+ 389,"DestroyViewSortInput!"]}@@ -7376,7 +7457,7 @@ export default {59,{"input": [- 385,+ 390,"UpdateViewFieldGroupInput!"]}@@ -7385,7 +7466,7 @@ export default {59,{"input": [- 387,+ 392,"CreateViewFieldGroupInput!"]}@@ -7394,7 +7475,7 @@ export default {59,{"inputs": [- 387,+ 392,"[CreateViewFieldGroupInput!]!"]}@@ -7403,7 +7484,7 @@ export default {59,{"input": [- 388,+ 393,"DeleteViewFieldGroupInput!"]}@@ -7412,7 +7493,7 @@ export default {59,{"input": [- 389,+ 394,"DestroyViewFieldGroupInput!"]}@@ -7421,7 +7502,7 @@ export default {60,{"input": [- 390,+ 395,"UpsertFieldsWidgetInput!"]}@@ -7430,7 +7511,7 @@ export default {32,{"input": [- 342,+ 346,"LogicFunctionIdInput!"]}@@ -7439,7 +7520,7 @@ export default {32,{"input": [- 393,+ 398,"CreateLogicFunctionFromSourceInput!"]}@@ -7448,7 +7529,7 @@ export default {217,{"input": [- 394,+ 399,"ExecuteOneLogicFunctionInput!"]}@@ -7457,7 +7538,7 @@ export default {6,{"input": [- 395,+ 400,"UpdateLogicFunctionFromSourceInput!"]}@@ -7466,7 +7547,7 @@ export default {225,{"input": [- 397,+ 402,"CreateCommandMenuItemInput!"]}@@ -7475,7 +7556,7 @@ export default {225,{"input": [- 398,+ 403,"UpdateCommandMenuItemInput!"]}@@ -7493,7 +7574,7 @@ export default {224,{"input": [- 399,+ 404,"CreateFrontComponentInput!"]}@@ -7502,7 +7583,7 @@ export default {224,{"input": [- 400,+ 405,"UpdateFrontComponentInput!"]}@@ -7520,7 +7601,7 @@ export default {46,{"input": [- 402,+ 407,"CreateOneObjectInput!"]}@@ -7529,7 +7610,7 @@ export default {46,{"input": [- 404,+ 409,"DeleteOneObjectInput!"]}@@ -7538,7 +7619,7 @@ export default {46,{"input": [- 405,+ 410,"UpdateOneObjectInput!"]}@@ -7547,7 +7628,7 @@ export default {50,{"input": [- 407,+ 412,"UpdateViewFieldInput!"]}@@ -7556,7 +7637,7 @@ export default {50,{"input": [- 409,+ 414,"CreateViewFieldInput!"]}@@ -7565,7 +7646,7 @@ export default {50,{"inputs": [- 409,+ 414,"[CreateViewFieldInput!]!"]}@@ -7574,7 +7655,7 @@ export default {50,{"input": [- 410,+ 415,"DeleteViewFieldInput!"]}@@ -7583,7 +7664,7 @@ export default {50,{"input": [- 411,+ 416,"DestroyViewFieldInput!"]}@@ -7592,7 +7673,7 @@ export default {25,{"input": [- 412,+ 417,"CreateAgentInput!"]}@@ -7601,7 +7682,7 @@ export default {25,{"input": [- 413,+ 418,"UpdateAgentInput!"]}@@ -7610,7 +7691,7 @@ export default {25,{"input": [- 344,+ 348,"AgentIdInput!"]}@@ -7691,7 +7772,7 @@ export default {29,{"createRoleInput": [- 414,+ 419,"CreateRoleInput!"]}@@ -7700,7 +7781,7 @@ export default {29,{"updateRoleInput": [- 415,+ 420,"UpdateRoleInput!"]}@@ -7718,7 +7799,7 @@ export default {16,{"upsertObjectPermissionsInput": [- 417,+ 422,"UpsertObjectPermissionsInput!"]}@@ -7727,7 +7808,7 @@ export default {27,{"upsertPermissionFlagsInput": [- 419,+ 424,"UpsertPermissionFlagsInput!"]}@@ -7736,7 +7817,7 @@ export default {26,{"upsertFieldPermissionsInput": [- 420,+ 425,"UpsertFieldPermissionsInput!"]}@@ -7745,7 +7826,7 @@ export default {173,{"input": [- 422,+ 427,"UpsertRowLevelPermissionPredicatesInput!"]}@@ -7812,7 +7893,7 @@ export default {139,{"input": [- 425,+ 430,"CreateApprovedAccessDomainInput!"]}@@ -7821,7 +7902,7 @@ export default {6,{"input": [- 426,+ 431,"DeleteApprovedAccessDomainInput!"]}@@ -7830,7 +7911,7 @@ export default {139,{"input": [- 427,+ 432,"ValidateApprovedAccessDomainInput!"]}@@ -7839,7 +7920,7 @@ export default {2,{"input": [- 428,+ 433,"CreateApiKeyInput!"]}@@ -7848,7 +7929,7 @@ export default {2,{"input": [- 429,+ 434,"UpdateApiKeyInput!"]}@@ -7857,7 +7938,7 @@ export default {2,{"input": [- 430,+ 435,"RevokeApiKeyInput!"]}@@ -7879,7 +7960,7 @@ export default {34,{"input": [- 431,+ 436,"CreateOneFieldMetadataInput!"]}@@ -7888,7 +7969,7 @@ export default {34,{"input": [- 433,+ 438,"UpdateOneFieldMetadataInput!"]}@@ -7897,7 +7978,7 @@ export default {34,{"input": [- 435,+ 440,"DeleteOneFieldInput!"]}@@ -7906,7 +7987,7 @@ export default {56,{"input": [- 436,+ 441,"CreateViewGroupInput!"]}@@ -7915,7 +7996,7 @@ export default {56,{"inputs": [- 436,+ 441,"[CreateViewGroupInput!]!"]}@@ -7924,7 +8005,7 @@ export default {56,{"input": [- 437,+ 442,"UpdateViewGroupInput!"]}@@ -7933,7 +8014,7 @@ export default {56,{"input": [- 439,+ 444,"DeleteViewGroupInput!"]}@@ -7942,7 +8023,7 @@ export default {56,{"input": [- 440,+ 445,"DestroyViewGroupInput!"]}@@ -7951,7 +8032,7 @@ export default {54,{"input": [- 441,+ 446,"CreateViewFilterInput!"]}@@ -7960,7 +8041,7 @@ export default {54,{"input": [- 442,+ 447,"UpdateViewFilterInput!"]}@@ -7969,7 +8050,7 @@ export default {54,{"input": [- 444,+ 449,"DeleteViewFilterInput!"]}@@ -7978,7 +8059,7 @@ export default {54,{"input": [- 445,+ 450,"DestroyViewFilterInput!"]}@@ -7987,7 +8068,7 @@ export default {52,{"input": [- 446,+ 451,"CreateViewFilterGroupInput!"]}@@ -8000,7 +8081,7 @@ export default {"String!"],"input": [- 447,+ 452,"UpdateViewFilterGroupInput!"]}@@ -8064,7 +8145,7 @@ export default {66,{"data": [- 448,+ 453,"ActivateWorkspaceInput!"]}@@ -8073,7 +8154,7 @@ export default {66,{"data": [- 449,+ 454,"UpdateWorkspaceInput!"]}@@ -8088,7 +8169,7 @@ export default {176,{"input": [- 450,+ 455,"CreateApplicationRegistrationInput!"]}@@ -8097,7 +8178,7 @@ export default {7,{"input": [- 451,+ 456,"UpdateApplicationRegistrationInput!"]}@@ -8124,7 +8205,7 @@ export default {5,{"input": [- 453,+ 458,"CreateApplicationRegistrationVariableInput!"]}@@ -8133,7 +8214,7 @@ export default {5,{"input": [- 454,+ 459,"UpdateApplicationRegistrationVariableInput!"]}@@ -8151,7 +8232,7 @@ export default {7,{"file": [- 366,+ 371,"Upload!"],"universalIdentifier": [@@ -8176,7 +8257,7 @@ export default {195,{"input": [- 456,+ 461,"GetAuthorizationUrlForSSOInput!"]}@@ -8464,7 +8545,7 @@ export default {186,{"input": [- 457,+ 462,"SetupOIDCSsoInput!"]}@@ -8473,7 +8554,7 @@ export default {186,{"input": [- 458,+ 463,"SetupSAMLSsoInput!"]}@@ -8482,7 +8563,7 @@ export default {182,{"input": [- 459,+ 464,"DeleteSsoInput!"]}@@ -8491,7 +8572,7 @@ export default {183,{"input": [- 460,+ 465,"EditSsoInput!"]}@@ -8500,7 +8581,7 @@ export default {250,{"input": [- 461,+ 466,"UpdateMessageFolderInput!"]}@@ -8509,7 +8590,7 @@ export default {250,{"input": [- 463,+ 468,"UpdateMessageFoldersInput!"]}@@ -8518,7 +8599,7 @@ export default {242,{"input": [- 464,+ 469,"UpdateMessageChannelInput!"]}@@ -8536,7 +8617,7 @@ export default {236,{"input": [- 466,+ 471,"UpdateCalendarChannelInput!"]}@@ -8545,7 +8626,7 @@ export default {257,{"input": [- 468,+ 473,"CreateWebhookInput!"]}@@ -8554,7 +8635,7 @@ export default {257,{"input": [- 469,+ 474,"UpdateWebhookInput!"]}@@ -8575,7 +8656,7 @@ export default {222,{"input": [- 471,+ 476,"CreateSkillInput!"]}@@ -8584,7 +8665,7 @@ export default {222,{"input": [- 472,+ 477,"UpdateSkillInput!"]}@@ -8639,7 +8720,7 @@ export default {}],"duplicateDashboard": [- 337,+ 341,{"id": [3,@@ -8661,7 +8742,7 @@ export default {}],"startChannelSync": [- 329,+ 333,{"connectedAccountId": [3,@@ -8670,7 +8751,7 @@ export default {}],"saveImapSmtpCaldavAccount": [- 327,+ 331,{"accountOwnerId": [3,@@ -8681,7 +8762,7 @@ export default {"String!"],"connectionParameters": [- 473,+ 478,"EmailAccountConnectionParameters!"],"id": [@@ -8693,7 +8774,7 @@ export default {155,{"input": [- 475,+ 480,"UpdateLabPublicFeatureFlagInput!"]}@@ -8754,7 +8835,7 @@ export default {6,{"role": [- 476,+ 481,"AiModelRole!"],"modelId": [@@ -8873,13 +8954,13 @@ export default {}],"enablePostgresProxy": [- 328+ 332],"disablePostgresProxy": [- 328+ 332],"createPublicDomain": [- 316,+ 320,{"domain": [1,@@ -8906,14 +8987,14 @@ export default {}],"createEmailingDomain": [- 318,+ 322,{"domain": [1,"String!"],"driver": [- 319,+ 323,"EmailingDomainDriver!"]}@@ -8928,7 +9009,7 @@ export default {}],"verifyEmailingDomain": [- 318,+ 322,{"id": [1,@@ -8940,7 +9021,7 @@ export default {68,{"input": [- 477,+ 482,"CreateOneAppTokenInput!"]}@@ -8973,7 +9054,7 @@ export default {6,{"workspaceMigration": [- 479,+ 484,"WorkspaceMigrationInput!"]}@@ -9039,7 +9120,7 @@ export default {307,{"file": [- 366,+ 371,"Upload!"],"applicationUniversalIdentifier": [@@ -9047,7 +9128,7 @@ export default {"String!"],"fileFolder": [- 482,+ 487,"FileFolder!"],"filePath": [@@ -9153,7 +9234,7 @@ export default {3],"update": [- 365+ 370],"__typename": [1@@ -9198,7 +9279,7 @@ export default {3],"gridPosition": [- 369+ 374],"position": [15@@ -9238,7 +9319,7 @@ export default {3],"gridPosition": [- 369+ 374],"position": [15@@ -9326,7 +9407,7 @@ export default {3],"tabs": [- 376+ 381],"__typename": [1@@ -9349,7 +9430,7 @@ export default {79],"widgets": [- 377+ 382],"__typename": [1@@ -9372,7 +9453,7 @@ export default {3],"gridPosition": [- 369+ 374],"position": [15@@ -9515,7 +9596,7 @@ export default {3],"update": [- 382+ 387],"__typename": [1@@ -9550,7 +9631,7 @@ export default {3],"update": [- 386+ 391],"__typename": [1@@ -9614,10 +9695,10 @@ export default {3],"groups": [- 391+ 396],"fields": [- 392+ 397],"__typename": [1@@ -9637,7 +9718,7 @@ export default {6],"fields": [- 392+ 397],"__typename": [1@@ -9711,7 +9792,7 @@ export default {3],"update": [- 396+ 401],"__typename": [1@@ -9862,7 +9943,7 @@ export default {3],"update": [- 401+ 406],"__typename": [1@@ -9881,7 +9962,7 @@ export default {},"CreateOneObjectInput": {"object": [- 403+ 408],"__typename": [1@@ -9941,7 +10022,7 @@ export default {},"UpdateOneObjectInput": {"update": [- 406+ 411],"id": [3@@ -9996,7 +10077,7 @@ export default {3],"update": [- 408+ 413],"__typename": [1@@ -10186,7 +10267,7 @@ export default {},"UpdateRoleInput": {"update": [- 416+ 421],"id": [3@@ -10241,7 +10322,7 @@ export default {3],"objectPermissions": [- 418+ 423],"__typename": [1@@ -10283,7 +10364,7 @@ export default {3],"fieldPermissions": [- 421+ 426],"__typename": [1@@ -10314,10 +10395,10 @@ export default {3],"predicates": [- 423+ 428],"predicateGroups": [- 424+ 429],"__typename": [1@@ -10449,7 +10530,7 @@ export default {},"CreateOneFieldMetadataInput": {"field": [- 432+ 437],"__typename": [1@@ -10522,7 +10603,7 @@ export default {3],"update": [- 434+ 439],"__typename": [1@@ -10611,7 +10692,7 @@ export default {3],"update": [- 438+ 443],"__typename": [1@@ -10684,7 +10765,7 @@ export default {3],"update": [- 443+ 448],"__typename": [1@@ -10888,7 +10969,7 @@ export default {1],"update": [- 452+ 457],"__typename": [1@@ -10951,7 +11032,7 @@ export default {1],"update": [- 455+ 460],"__typename": [1@@ -11043,7 +11124,7 @@ export default {3],"update": [- 462+ 467],"__typename": [1@@ -11062,7 +11143,7 @@ export default {3],"update": [- 462+ 467],"__typename": [1@@ -11073,7 +11154,7 @@ export default {3],"update": [- 465+ 470],"__typename": [1@@ -11110,7 +11191,7 @@ export default {3],"update": [- 467+ 472],"__typename": [1@@ -11158,7 +11239,7 @@ export default {3],"update": [- 470+ 475],"__typename": [1@@ -11232,13 +11313,13 @@ export default {},"EmailAccountConnectionParameters": {"IMAP": [- 474+ 479],"SMTP": [- 474+ 479],"CALDAV": [- 474+ 479],"__typename": [1@@ -11278,7 +11359,7 @@ export default {"AiModelRole": {},"CreateOneAppTokenInput": {"appToken": [- 478+ 483],"__typename": [1@@ -11294,7 +11375,7 @@ export default {},"WorkspaceMigrationInput": {"actions": [- 480+ 485],"__typename": [1@@ -11302,7 +11383,7 @@ export default {},"WorkspaceMigrationDeleteActionInput": {"type": [- 481+ 486],"metadataName": [253@@ -11330,7 +11411,7 @@ export default {219,{"input": [- 484,+ 489,"LogicFunctionLogsInput!"]}diff --git a/packages/twenty-server/src/database/clickHouse/migrations/004-create-usage-event-table.sql b/packages/twenty-server/src/database/clickHouse/migrations/004-create-usage-event-table.sqlnew file mode 100644index 00000000000..436cb3996d5--- /dev/null+++ b/packages/twenty-server/src/database/clickHouse/migrations/004-create-usage-event-table.sql@@ -0,0 +1,17 @@+CREATE TABLE IF NOT EXISTS usageEvent+(+ `timestamp` DateTime64(3) NOT NULL,+ `workspaceId` String NOT NULL,+ `userWorkspaceId` String DEFAULT '',+ `resourceType` LowCardinality(String) NOT NULL,+ `operationType` LowCardinality(String) NOT NULL,+ `quantity` Int64 NOT NULL DEFAULT 0,+ `unit` LowCardinality(String) NOT NULL DEFAULT 'CREDIT',+ `creditsUsedMicro` Int64 NOT NULL DEFAULT 0,+ `resourceId` String DEFAULT '',+ `resourceContext` String DEFAULT '',+ `metadata` JSON+)+ ENGINE = MergeTree+ ORDER BY (workspaceId, timestamp, resourceType, operationType, userWorkspaceId, resourceId)+ TTL timestamp + INTERVAL 3 YEAR DELETE;diff --git a/packages/twenty-server/src/engine/core-modules/billing/billing.module.ts b/packages/twenty-server/src/engine/core-modules/billing/billing.module.tsindex 756f4079b54..3d409a4b4d9 100644--- a/packages/twenty-server/src/engine/core-modules/billing/billing.module.ts+++ b/packages/twenty-server/src/engine/core-modules/billing/billing.module.ts@@ -16,7 +16,7 @@ import { BillingProductEntity } from 'src/engine/core-modules/billing/entities/bimport { BillingSubscriptionItemEntity } from 'src/engine/core-modules/billing/entities/billing-subscription-item.entity';import { BillingSubscriptionEntity } from 'src/engine/core-modules/billing/entities/billing-subscription.entity';import { BillingRestApiExceptionFilter } from 'src/engine/core-modules/billing/filters/billing-api-exception.filter';-import { BillingFeatureUsedListener } from 'src/engine/core-modules/billing/listeners/billing-feature-used.listener';+import { BillingUsageEventListener } from 'src/engine/core-modules/billing/listeners/billing-usage-event.listener';import { BillingWorkspaceMemberListener } from 'src/engine/core-modules/billing/listeners/billing-workspace-member.listener';import { BillingCreditRolloverService } from 'src/engine/core-modules/billing/services/billing-credit-rollover.service';import { BillingPlanService } from 'src/engine/core-modules/billing/services/billing-plan.service';@@ -79,7 +79,7 @@ import { PermissionsModule } from 'src/engine/metadata-modules/permissions/permiBillingResolver,BillingPlanService,BillingWorkspaceMemberListener,- BillingFeatureUsedListener,+ BillingUsageEventListener,BillingService,BillingRestApiExceptionFilter,BillingSyncCustomerDataCommand,diff --git a/packages/twenty-server/src/engine/core-modules/billing/billing.resolver.ts b/packages/twenty-server/src/engine/core-modules/billing/billing.resolver.tsindex 4c39648ee0b..dfa3d0ded95 100644--- a/packages/twenty-server/src/engine/core-modules/billing/billing.resolver.ts+++ b/packages/twenty-server/src/engine/core-modules/billing/billing.resolver.ts@@ -26,7 +26,7 @@ import { formatBillingDatabaseProductToGraphqlDTO } from 'src/engine/core-moduleimport {INTERNAL_CREDITS_PER_DISPLAY_CREDIT,toDisplayCredits,-} from 'src/engine/core-modules/billing/utils/to-display-credits.util';+} from 'src/engine/core-modules/usage/utils/to-display-credits.util';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 { type AuthContextUser } from 'src/engine/core-modules/auth/types/auth-context.type';@@ -374,7 +374,5 @@ export class BillingResolver {PermissionsExceptionCode.PERMISSION_DENIED,);}-- return;}}diff --git a/packages/twenty-server/src/engine/core-modules/billing/constants/billing-feature-used.constant.ts b/packages/twenty-server/src/engine/core-modules/billing/constants/billing-feature-used.constant.tsdeleted file mode 100644index bcecb39c3eb..00000000000--- a/packages/twenty-server/src/engine/core-modules/billing/constants/billing-feature-used.constant.ts+++ /dev/null@@ -1,3 +0,0 @@-/* @license Enterprise */--export const BILLING_FEATURE_USED = 'BILLING_FEATURE_USED';diff --git a/packages/twenty-server/src/engine/core-modules/billing/enums/billing-meter-event-names.ts b/packages/twenty-server/src/engine/core-modules/billing/enums/billing-meter-event-names.tsdeleted file mode 100644index 11346dce3e3..00000000000--- a/packages/twenty-server/src/engine/core-modules/billing/enums/billing-meter-event-names.ts+++ /dev/null@@ -1,5 +0,0 @@-/* @license Enterprise */--export enum BillingMeterEventName {- WORKFLOW_NODE_RUN = 'WORKFLOW_NODE_RUN',-}diff --git a/packages/twenty-server/src/engine/core-modules/billing/listeners/billing-feature-used.listener.ts b/packages/twenty-server/src/engine/core-modules/billing/listeners/billing-usage-event.listener.tssimilarity index 72%rename from packages/twenty-server/src/engine/core-modules/billing/listeners/billing-feature-used.listener.tsrename to packages/twenty-server/src/engine/core-modules/billing/listeners/billing-usage-event.listener.tsindex 9fe7d9afc70..0053743b3dc 100644--- a/packages/twenty-server/src/engine/core-modules/billing/listeners/billing-feature-used.listener.ts+++ b/packages/twenty-server/src/engine/core-modules/billing/listeners/billing-usage-event.listener.ts@@ -5,22 +5,22 @@ import { Injectable } from '@nestjs/common';import { isDefined } from 'twenty-shared/utils';import { OnCustomBatchEvent } from 'src/engine/api/graphql/graphql-query-runner/decorators/on-custom-batch-event.decorator';-import { BILLING_FEATURE_USED } from 'src/engine/core-modules/billing/constants/billing-feature-used.constant';+import { USAGE_RECORDED } from 'src/engine/core-modules/usage/constants/usage-recorded.constant';import { BillingUsageService } from 'src/engine/core-modules/billing/services/billing-usage.service';-import { type BillingUsageEvent } from 'src/engine/core-modules/billing/types/billing-usage-event.type';+import { type UsageEvent } from 'src/engine/core-modules/usage/types/usage-event.type';import { TwentyConfigService } from 'src/engine/core-modules/twenty-config/twenty-config.service';import { CustomWorkspaceEventBatch } from 'src/engine/workspace-event-emitter/types/custom-workspace-batch-event.type';@Injectable()-export class BillingFeatureUsedListener {+export class BillingUsageEventListener {constructor(private readonly billingUsageService: BillingUsageService,private readonly twentyConfigService: TwentyConfigService,) {}- @OnCustomBatchEvent(BILLING_FEATURE_USED)- async handleBillingFeatureUsedEvent(- payload: CustomWorkspaceEventBatch<BillingUsageEvent>,+ @OnCustomBatchEvent(USAGE_RECORDED)+ async handleUsageRecordedEvent(+ payload: CustomWorkspaceEventBatch<UsageEvent>,) {if (!isDefined(payload.workspaceId)) {return;@@ -40,7 +40,7 @@ export class BillingFeatureUsedListener {await this.billingUsageService.billUsage({workspaceId: payload.workspaceId,- billingEvents: payload.events,+ usageEvents: payload.events,});}}diff --git a/packages/twenty-server/src/engine/core-modules/billing/services/billing-usage.service.ts b/packages/twenty-server/src/engine/core-modules/billing/services/billing-usage.service.tsindex 08057a68dc1..a0053148396 100644--- a/packages/twenty-server/src/engine/core-modules/billing/services/billing-usage.service.ts+++ b/packages/twenty-server/src/engine/core-modules/billing/services/billing-usage.service.ts@@ -18,7 +18,7 @@ import { BillingSubscriptionItemService } from 'src/engine/core-modules/billing/import { BillingSubscriptionService } from 'src/engine/core-modules/billing/services/billing-subscription.service';import { StripeBillingMeterEventService } from 'src/engine/core-modules/billing/stripe/services/stripe-billing-meter-event.service';import { StripeCreditGrantService } from 'src/engine/core-modules/billing/stripe/services/stripe-credit-grant.service';-import { type BillingUsageEvent } from 'src/engine/core-modules/billing/types/billing-usage-event.type';+import { type UsageEvent } from 'src/engine/core-modules/usage/types/usage-event.type';import { TwentyConfigService } from 'src/engine/core-modules/twenty-config/twenty-config.service';import { type WorkspaceEntity } from 'src/engine/core-modules/workspace/workspace.entity';@@ -50,10 +50,10 @@ export class BillingUsageService {async billUsage({workspaceId,- billingEvents,+ usageEvents,}: {workspaceId: string;- billingEvents: BillingUsageEvent[];+ usageEvents: UsageEvent[];}) {const workspaceStripeCustomer =await this.billingCustomerRepository.findOne({@@ -71,12 +71,10 @@ export class BillingUsageService {try {await Promise.all(- billingEvents.map((event) =>+ usageEvents.map((usageEvent) =>this.stripeBillingMeterEventService.sendBillingMeterEvent({- eventName: event.eventName,- value: event.value,+ usageEvent,stripeCustomerId: workspaceStripeCustomer.stripeCustomerId,- dimensions: event.dimensions,}),),);diff --git a/packages/twenty-server/src/engine/core-modules/billing/stripe/constants/stripe-billing-meter-event-name.constant.ts b/packages/twenty-server/src/engine/core-modules/billing/stripe/constants/stripe-billing-meter-event-name.constant.tsnew file mode 100644index 00000000000..69c0f2fe446--- /dev/null+++ b/packages/twenty-server/src/engine/core-modules/billing/stripe/constants/stripe-billing-meter-event-name.constant.ts@@ -0,0 +1 @@+export const STRIPE_BILLING_METER_EVENT_NAME = 'WORKFLOW_NODE_RUN';diff --git a/packages/twenty-server/src/engine/core-modules/billing/stripe/services/stripe-billing-alert.service.ts b/packages/twenty-server/src/engine/core-modules/billing/stripe/services/stripe-billing-alert.service.tsindex cb4e7beb13d..38c1f957549 100644--- a/packages/twenty-server/src/engine/core-modules/billing/stripe/services/stripe-billing-alert.service.ts+++ b/packages/twenty-server/src/engine/core-modules/billing/stripe/services/stripe-billing-alert.service.ts@@ -4,11 +4,11 @@ import { assertIsDefinedOrThrow } from 'twenty-shared/utils';import type Stripe from 'stripe';-import { TwentyConfigService } from 'src/engine/core-modules/twenty-config/twenty-config.service';-import { StripeSDKService } from 'src/engine/core-modules/billing/stripe/stripe-sdk/services/stripe-sdk.service';-import { StripeBillingMeterService } from 'src/engine/core-modules/billing/stripe/services/stripe-billing-meter.service';+import { STRIPE_BILLING_METER_EVENT_NAME } from 'src/engine/core-modules/billing/stripe/constants/stripe-billing-meter-event-name.constant';import { StripeBillingMeterEventService } from 'src/engine/core-modules/billing/stripe/services/stripe-billing-meter-event.service';-import { BillingMeterEventName } from 'src/engine/core-modules/billing/enums/billing-meter-event-names';+import { StripeBillingMeterService } from 'src/engine/core-modules/billing/stripe/services/stripe-billing-meter.service';+import { StripeSDKService } from 'src/engine/core-modules/billing/stripe/stripe-sdk/services/stripe-sdk.service';+import { TwentyConfigService } from 'src/engine/core-modules/twenty-config/twenty-config.service';@Injectable()export class StripeBillingAlertService {@@ -36,7 +36,7 @@ export class StripeBillingAlertService {): Promise<void> {const meter = (await this.stripeBillingMeterService.getAllMeters()).find((meterItem) => {- return meterItem.event_name === BillingMeterEventName.WORKFLOW_NODE_RUN;+ return meterItem.event_name === STRIPE_BILLING_METER_EVENT_NAME;},);diff --git a/packages/twenty-server/src/engine/core-modules/billing/stripe/services/stripe-billing-meter-event.service.ts b/packages/twenty-server/src/engine/core-modules/billing/stripe/services/stripe-billing-meter-event.service.tsindex 1c21152d6bb..d091dff77d8 100644--- a/packages/twenty-server/src/engine/core-modules/billing/stripe/services/stripe-billing-meter-event.service.ts+++ b/packages/twenty-server/src/engine/core-modules/billing/stripe/services/stripe-billing-meter-event.service.ts@@ -4,9 +4,9 @@ import { Injectable, Logger } from '@nestjs/common';import type Stripe from 'stripe';-import { type BillingMeterEventName } from 'src/engine/core-modules/billing/enums/billing-meter-event-names';+import { STRIPE_BILLING_METER_EVENT_NAME } from 'src/engine/core-modules/billing/stripe/constants/stripe-billing-meter-event-name.constant';import { StripeSDKService } from 'src/engine/core-modules/billing/stripe/stripe-sdk/services/stripe-sdk.service';-import { type BillingDimensions } from 'src/engine/core-modules/billing/types/billing-dimensions.type';+import { type UsageEvent } from 'src/engine/core-modules/usage/types/usage-event.type';import { TwentyConfigService } from 'src/engine/core-modules/twenty-config/twenty-config.service';@Injectable()@@ -27,35 +27,28 @@ export class StripeBillingMeterEventService {}async sendBillingMeterEvent({- eventName,- value,+ usageEvent,stripeCustomerId,- dimensions,}: {- eventName: BillingMeterEventName;- value: number;+ usageEvent: UsageEvent;stripeCustomerId: string;- dimensions?: BillingDimensions;}) {const payload: Record<string, string> = {- value: value.toString(),+ value: usageEvent.creditsUsedMicro.toString(),stripe_customer_id: stripeCustomerId,+ execution_type: usageEvent.operationType.toLowerCase(),};- if (dimensions) {- payload.execution_type = dimensions.execution_type;-- if (dimensions.resource_id !== undefined) {- payload.resource_id = dimensions.resource_id || 'none';- }+ if (usageEvent.resourceId) {+ payload.resource_id = usageEvent.resourceId;+ }- if (dimensions.execution_context_1 !== undefined) {- payload.execution_context_1 = dimensions.execution_context_1 || 'none';- }+ if (usageEvent.resourceContext) {+ payload.execution_context_1 = usageEvent.resourceContext;}await this.stripe.billing.meterEvents.create({- event_name: eventName,+ event_name: STRIPE_BILLING_METER_EVENT_NAME,payload,});}diff --git a/packages/twenty-server/src/engine/core-modules/billing/types/billing-dimensions.type.ts b/packages/twenty-server/src/engine/core-modules/billing/types/billing-dimensions.type.tsdeleted file mode 100644index 1fbdf424b8c..00000000000--- a/packages/twenty-server/src/engine/core-modules/billing/types/billing-dimensions.type.ts+++ /dev/null@@ -1,12 +0,0 @@-/* @license Enterprise */--export type BillingExecutionType =- | 'workflow_execution'- | 'code_execution'- | 'ai_token';--export type BillingDimensions = {- execution_type: BillingExecutionType;- resource_id?: string | null;- execution_context_1?: string | null;-};diff --git a/packages/twenty-server/src/engine/core-modules/billing/types/billing-usage-event.type.ts b/packages/twenty-server/src/engine/core-modules/billing/types/billing-usage-event.type.tsdeleted file mode 100644index d560fe68439..00000000000--- a/packages/twenty-server/src/engine/core-modules/billing/types/billing-usage-event.type.ts+++ /dev/null@@ -1,12 +0,0 @@-/* @license Enterprise */--import { type NonNegative } from 'type-fest';--import { type BillingMeterEventName } from 'src/engine/core-modules/billing/enums/billing-meter-event-names';-import { type BillingDimensions } from 'src/engine/core-modules/billing/types/billing-dimensions.type';--export type BillingUsageEvent = {- eventName: BillingMeterEventName;- value: NonNegative<number>;- dimensions?: BillingDimensions;-};diff --git a/packages/twenty-server/src/engine/core-modules/billing/utils/format-database-product-to-graphql-dto.util.ts b/packages/twenty-server/src/engine/core-modules/billing/utils/format-database-product-to-graphql-dto.util.tsindex 0da8598904c..47bceabb1c3 100644--- a/packages/twenty-server/src/engine/core-modules/billing/utils/format-database-product-to-graphql-dto.util.ts+++ b/packages/twenty-server/src/engine/core-modules/billing/utils/format-database-product-to-graphql-dto.util.ts@@ -7,7 +7,7 @@ import { type BillingPriceEntity } from 'src/engine/core-modules/billing/entitieimport { SubscriptionInterval } from 'src/engine/core-modules/billing/enums/billing-subscription-interval.enum';import { BillingUsageType } from 'src/engine/core-modules/billing/enums/billing-usage-type.enum';import { type BillingGetPlanResult } from 'src/engine/core-modules/billing/types/billing-get-plan-result.type';-import { toDisplayCredits } from 'src/engine/core-modules/billing/utils/to-display-credits.util';+import { toDisplayCredits } from 'src/engine/core-modules/usage/utils/to-display-credits.util';export const formatBillingDatabaseProductToGraphqlDTO = (plan: BillingGetPlanResult,diff --git a/packages/twenty-server/src/engine/core-modules/core-engine.module.ts b/packages/twenty-server/src/engine/core-modules/core-engine.module.tsindex fc14288e864..49b5dcd90c7 100644--- a/packages/twenty-server/src/engine/core-modules/core-engine.module.ts+++ b/packages/twenty-server/src/engine/core-modules/core-engine.module.ts@@ -19,6 +19,7 @@ import { ApprovedAccessDomainModule } from 'src/engine/core-modules/approved-accimport { AuthModule } from 'src/engine/core-modules/auth/auth.module';import { BillingWebhookModule } from 'src/engine/core-modules/billing-webhook/billing-webhook.module';import { BillingModule } from 'src/engine/core-modules/billing/billing.module';+import { UsageModule } from 'src/engine/core-modules/usage/usage.module';import { CacheStorageModule } from 'src/engine/core-modules/cache-storage/cache-storage.module';import { TimelineCalendarEventModule } from 'src/engine/core-modules/calendar/timeline-calendar-event.module';import { CaptchaModule } from 'src/engine/core-modules/captcha/captcha.module';@@ -82,6 +83,7 @@ import { FileModule } from './file/file.module';AuthModule,BillingModule,BillingWebhookModule,+ UsageModule,ClientConfigModule,FeatureFlagModule,FileModule,diff --git a/packages/twenty-server/src/engine/core-modules/event-logs/cleanup/services/event-log-cleanup.service.ts b/packages/twenty-server/src/engine/core-modules/event-logs/cleanup/services/event-log-cleanup.service.tsindex 4df94ab307c..3aaa4dcb9c2 100644--- a/packages/twenty-server/src/engine/core-modules/event-logs/cleanup/services/event-log-cleanup.service.ts+++ b/packages/twenty-server/src/engine/core-modules/event-logs/cleanup/services/event-log-cleanup.service.ts@@ -11,6 +11,7 @@ const CLICKHOUSE_TABLE_NAMES: Record<EventLogTable, string> = {[EventLogTable.WORKSPACE_EVENT]: 'workspaceEvent',[EventLogTable.PAGEVIEW]: 'pageview',[EventLogTable.OBJECT_EVENT]: 'objectEvent',+ [EventLogTable.USAGE_EVENT]: 'usageEvent',};export type EventLogCleanupParams = {diff --git a/packages/twenty-server/src/engine/core-modules/event-logs/event-logs.service.ts b/packages/twenty-server/src/engine/core-modules/event-logs/event-logs.service.tsindex 27df68a40ec..654a91e1ed4 100644--- a/packages/twenty-server/src/engine/core-modules/event-logs/event-logs.service.ts+++ b/packages/twenty-server/src/engine/core-modules/event-logs/event-logs.service.ts@@ -36,6 +36,19 @@ type ClickHouseEventRecord = {isCustom?: boolean;};+type ClickHouseUsageEventRecord = {+ timestamp: string;+ userWorkspaceId?: string;+ resourceType?: string;+ operationType?: string;+ quantity?: number;+ unit?: string;+ creditsUsedMicro?: number;+ resourceId?: string;+ resourceContext?: string;+ metadata?: Record<string, unknown>;+};+const ALLOWED_TABLES = Object.values(EventLogTable);const MAX_LIMIT = 10000;@@ -43,6 +56,7 @@ const CLICKHOUSE_TABLE_NAMES: Record<EventLogTable, string> = {[EventLogTable.WORKSPACE_EVENT]: 'workspaceEvent',[EventLogTable.PAGEVIEW]: 'pageview',[EventLogTable.OBJECT_EVENT]: 'objectEvent',+ [EventLogTable.USAGE_EVENT]: 'usageEvent',};@Injectable()@@ -67,7 +81,11 @@ export class EventLogsService {const limit = Math.min(input.first ?? 100, MAX_LIMIT);const tableName = CLICKHOUSE_TABLE_NAMES[input.table];const eventFieldName =- input.table === EventLogTable.PAGEVIEW ? 'name' : 'event';+ input.table === EventLogTable.USAGE_EVENT+ ? 'resourceType'+ : input.table === EventLogTable.PAGEVIEW+ ? 'name'+ : 'event';const whereClauses: string[] = ['"workspaceId" = {workspaceId:String}'];const params: Record<string, unknown> = { workspaceId };@@ -178,15 +196,24 @@ export class EventLogsService {params.eventTypePattern = `%${filters.eventType.toLowerCase()}%`;}+ // TODO: Legacy event tables (workspaceEvent, pageview, objectEvent) use+ // userId because some actions are logged out. Usage events use+ // userWorkspaceId directly which is more relevant in a workspace context.+ // Consider migrating all event tables to userWorkspaceId for consistency.if (isDefined(filters.userWorkspaceId)) {- const userWorkspace = await this.userWorkspaceRepository.findOne({- where: { id: filters.userWorkspaceId },- select: ['userId'],- });-- if (isDefined(userWorkspace)) {- whereClauses.push('"userId" = {userId:String}');- params.userId = userWorkspace.userId;+ if (table === EventLogTable.USAGE_EVENT) {+ whereClauses.push('"userWorkspaceId" = {userWorkspaceId:String}');+ params.userWorkspaceId = filters.userWorkspaceId;+ } else {+ const userWorkspace = await this.userWorkspaceRepository.findOne({+ where: { id: filters.userWorkspaceId },+ select: ['userId'],+ });++ if (isDefined(userWorkspace)) {+ whereClauses.push('"userId" = {userId:String}');+ params.userId = userWorkspace.userId;+ }}}@@ -222,10 +249,27 @@ export class EventLogsService {}private normalizeRecords(- records: ClickHouseEventRecord[],+ records: ClickHouseEventRecord[] | ClickHouseUsageEventRecord[],table: EventLogTable,): EventLogRecord[] {- return records.map((record) => {+ if (table === EventLogTable.USAGE_EVENT) {+ return (records as ClickHouseUsageEventRecord[]).map((record) => ({+ event: record.resourceType ?? '',+ timestamp: new Date(record.timestamp),+ userId: record.userWorkspaceId,+ properties: {+ operationType: record.operationType,+ quantity: record.quantity,+ unit: record.unit,+ creditsUsedMicro: record.creditsUsedMicro,+ resourceId: record.resourceId,+ resourceContext: record.resourceContext,+ ...(record.metadata ?? {}),+ },+ }));+ }++ return (records as ClickHouseEventRecord[]).map((record) => {const eventName =table === EventLogTable.PAGEVIEW? (record.name ?? '')diff --git a/packages/twenty-server/src/engine/core-modules/usage/constants/usage-recorded.constant.ts b/packages/twenty-server/src/engine/core-modules/usage/constants/usage-recorded.constant.tsnew file mode 100644index 00000000000..ae401cad8b2--- /dev/null+++ b/packages/twenty-server/src/engine/core-modules/usage/constants/usage-recorded.constant.ts@@ -0,0 +1,3 @@+/* @license Enterprise */++export const USAGE_RECORDED = 'USAGE_RECORDED';diff --git a/packages/twenty-server/src/engine/core-modules/usage/dtos/inputs/usage-analytics.input.ts b/packages/twenty-server/src/engine/core-modules/usage/dtos/inputs/usage-analytics.input.tsnew file mode 100644index 00000000000..3db06fa0d9a--- /dev/null+++ b/packages/twenty-server/src/engine/core-modules/usage/dtos/inputs/usage-analytics.input.ts@@ -0,0 +1,15 @@+/* @license Enterprise */++import { Field, InputType } from '@nestjs/graphql';++@InputType()+export class UsageAnalyticsInput {+ @Field(() => Date, { nullable: true })+ periodStart?: Date;++ @Field(() => Date, { nullable: true })+ periodEnd?: Date;++ @Field(() => String, { nullable: true })+ userWorkspaceId?: string;+}diff --git a/packages/twenty-server/src/engine/core-modules/usage/dtos/usage-analytics.dto.ts b/packages/twenty-server/src/engine/core-modules/usage/dtos/usage-analytics.dto.tsnew file mode 100644index 00000000000..1bcf2f23b35--- /dev/null+++ b/packages/twenty-server/src/engine/core-modules/usage/dtos/usage-analytics.dto.ts@@ -0,0 +1,28 @@+/* @license Enterprise */++import { Field, ObjectType } from '@nestjs/graphql';++import { UsageBreakdownItemDTO } from 'src/engine/core-modules/usage/dtos/usage-breakdown-item.dto';+import { UsageTimeSeriesDTO } from 'src/engine/core-modules/usage/dtos/usage-time-series.dto';+import { UsageUserDailyDTO } from 'src/engine/core-modules/usage/dtos/usage-user-daily.dto';++@ObjectType('UsageAnalytics')+export class UsageAnalyticsDTO {+ @Field(() => [UsageBreakdownItemDTO])+ usageByUser: UsageBreakdownItemDTO[];++ @Field(() => [UsageBreakdownItemDTO])+ usageByOperationType: UsageBreakdownItemDTO[];++ @Field(() => [UsageTimeSeriesDTO])+ timeSeries: UsageTimeSeriesDTO[];++ @Field(() => Date)+ periodStart: Date;++ @Field(() => Date)+ periodEnd: Date;++ @Field(() => UsageUserDailyDTO, { nullable: true })+ userDailyUsage?: UsageUserDailyDTO;+}diff --git a/packages/twenty-server/src/engine/core-modules/usage/dtos/usage-breakdown-item.dto.ts b/packages/twenty-server/src/engine/core-modules/usage/dtos/usage-breakdown-item.dto.tsnew file mode 100644index 00000000000..6462d0f9da1--- /dev/null+++ b/packages/twenty-server/src/engine/core-modules/usage/dtos/usage-breakdown-item.dto.ts@@ -0,0 +1,15 @@+/* @license Enterprise */++import { Field, Float, ObjectType } from '@nestjs/graphql';++@ObjectType('UsageBreakdownItem')+export class UsageBreakdownItemDTO {+ @Field(() => String)+ key: string;++ @Field(() => String, { nullable: true })+ label?: string;++ @Field(() => Float)+ creditsUsed: number;+}diff --git a/packages/twenty-server/src/engine/core-modules/usage/dtos/usage-time-series.dto.ts b/packages/twenty-server/src/engine/core-modules/usage/dtos/usage-time-series.dto.tsnew file mode 100644index 00000000000..5ef4f3ac842--- /dev/null+++ b/packages/twenty-server/src/engine/core-modules/usage/dtos/usage-time-series.dto.ts@@ -0,0 +1,12 @@+/* @license Enterprise */++import { Field, Float, ObjectType } from '@nestjs/graphql';++@ObjectType('UsageTimeSeries')+export class UsageTimeSeriesDTO {+ @Field(() => String)+ date: string;++ @Field(() => Float)+ creditsUsed: number;+}diff --git a/packages/twenty-server/src/engine/core-modules/usage/dtos/usage-user-daily.dto.ts b/packages/twenty-server/src/engine/core-modules/usage/dtos/usage-user-daily.dto.tsnew file mode 100644index 00000000000..eb357ff5e11--- /dev/null+++ b/packages/twenty-server/src/engine/core-modules/usage/dtos/usage-user-daily.dto.ts@@ -0,0 +1,14 @@+/* @license Enterprise */++import { Field, ObjectType } from '@nestjs/graphql';++import { UsageTimeSeriesDTO } from 'src/engine/core-modules/usage/dtos/usage-time-series.dto';++@ObjectType('UsageUserDaily')+export class UsageUserDailyDTO {+ @Field(() => String)+ userWorkspaceId: string;++ @Field(() => [UsageTimeSeriesDTO])+ dailyUsage: UsageTimeSeriesDTO[];+}diff --git a/packages/twenty-server/src/engine/core-modules/usage/enums/usage-operation-type.enum.ts b/packages/twenty-server/src/engine/core-modules/usage/enums/usage-operation-type.enum.tsnew file mode 100644index 00000000000..cf7750d9b0b--- /dev/null+++ b/packages/twenty-server/src/engine/core-modules/usage/enums/usage-operation-type.enum.ts@@ -0,0 +1,13 @@+/* @license Enterprise */++import { registerEnumType } from '@nestjs/graphql';++export enum UsageOperationType {+ AI_TOKEN = 'AI_TOKEN',+ WORKFLOW_EXECUTION = 'WORKFLOW_EXECUTION',+ CODE_EXECUTION = 'CODE_EXECUTION',+}++registerEnumType(UsageOperationType, {+ name: 'UsageOperationType',+});diff --git a/packages/twenty-server/src/engine/core-modules/usage/enums/usage-resource-type.enum.ts b/packages/twenty-server/src/engine/core-modules/usage/enums/usage-resource-type.enum.tsnew file mode 100644index 00000000000..01d89b8f4f8--- /dev/null+++ b/packages/twenty-server/src/engine/core-modules/usage/enums/usage-resource-type.enum.ts@@ -0,0 +1,9 @@+/* @license Enterprise */++export enum UsageResourceType {+ AI = 'AI',+ WORKFLOW = 'WORKFLOW',+ APP = 'APP',+ STORAGE = 'STORAGE',+ API = 'API',+}diff --git a/packages/twenty-server/src/engine/core-modules/usage/enums/usage-unit.enum.ts b/packages/twenty-server/src/engine/core-modules/usage/enums/usage-unit.enum.tsnew file mode 100644index 00000000000..9fa895aebe1--- /dev/null+++ b/packages/twenty-server/src/engine/core-modules/usage/enums/usage-unit.enum.ts@@ -0,0 +1,9 @@+/* @license Enterprise */++export enum UsageUnit {+ CREDIT = 'CREDIT',+ TOKEN = 'TOKEN',+ INVOCATION = 'INVOCATION',+ MINUTE = 'MINUTE',+ BYTE = 'BYTE',+}diff --git a/packages/twenty-server/src/engine/core-modules/usage/listeners/usage-event.listener.ts b/packages/twenty-server/src/engine/core-modules/usage/listeners/usage-event.listener.tsnew file mode 100644index 00000000000..1750b03b41a--- /dev/null+++ b/packages/twenty-server/src/engine/core-modules/usage/listeners/usage-event.listener.ts@@ -0,0 +1,30 @@+/* @license Enterprise */++import { Injectable } from '@nestjs/common';++import { isDefined } from 'twenty-shared/utils';++import { OnCustomBatchEvent } from 'src/engine/api/graphql/graphql-query-runner/decorators/on-custom-batch-event.decorator';+import { USAGE_RECORDED } from 'src/engine/core-modules/usage/constants/usage-recorded.constant';+import { UsageEventWriterService } from 'src/engine/core-modules/usage/services/usage-event-writer.service';+import { type UsageEvent } from 'src/engine/core-modules/usage/types/usage-event.type';+import { CustomWorkspaceEventBatch } from 'src/engine/workspace-event-emitter/types/custom-workspace-batch-event.type';++@Injectable()+export class UsageEventListener {+ constructor(+ private readonly usageEventWriterService: UsageEventWriterService,+ ) {}++ @OnCustomBatchEvent(USAGE_RECORDED)+ handleUsageRecordedEvent(payload: CustomWorkspaceEventBatch<UsageEvent>) {+ if (!isDefined(payload.workspaceId)) {+ return;+ }++ this.usageEventWriterService.writeToClickHouse(+ payload.workspaceId,+ payload.events,+ );+ }+}diff --git a/packages/twenty-server/src/engine/core-modules/usage/services/usage-analytics.service.ts b/packages/twenty-server/src/engine/core-modules/usage/services/usage-analytics.service.tsnew file mode 100644index 00000000000..2ead592a62d--- /dev/null+++ b/packages/twenty-server/src/engine/core-modules/usage/services/usage-analytics.service.ts@@ -0,0 +1,165 @@+/* @license Enterprise */++import { Injectable } from '@nestjs/common';++import { ClickHouseService } from 'src/database/clickHouse/clickHouse.service';+import { formatDateForClickHouse } from 'src/database/clickHouse/clickHouse.util';+import { toDisplayCredits } from 'src/engine/core-modules/usage/utils/to-display-credits.util';++export type UsageBreakdownItem = {+ key: string;+ label?: string;+ creditsUsed: number;+};++export type UsageTimeSeriesPoint = {+ date: string;+ creditsUsed: number;+};++type BreakdownRowMicro = {+ key: string;+ creditsUsedMicro: number;+};++type TimeSeriesRowMicro = {+ date: string;+ creditsUsedMicro: number;+};++type PeriodParams = {+ workspaceId: string;+ periodStart: Date;+ periodEnd: Date;+};++const ALLOWED_GROUP_BY_FIELDS = [+ 'userWorkspaceId',+ 'resourceId',+ 'operationType',+ 'resourceType',+] as const;++type GroupByField = (typeof ALLOWED_GROUP_BY_FIELDS)[number];++const BREAKDOWN_QUERY_LIMIT = 50;++@Injectable()+export class UsageAnalyticsService {+ constructor(private readonly clickHouseService: ClickHouseService) {}++ async getUsageByUser(params: PeriodParams): Promise<UsageBreakdownItem[]> {+ return this.queryBreakdown({+ ...params,+ groupByField: 'userWorkspaceId',+ extraWhere: "AND userWorkspaceId != ''",+ });+ }++ async getUsageByOperationType(+ params: PeriodParams & { userWorkspaceId?: string },+ ): Promise<UsageBreakdownItem[]> {+ return this.queryBreakdown({+ ...params,+ groupByField: 'operationType',+ ...(params.userWorkspaceId && {+ extraWhere: 'AND userWorkspaceId = {userWorkspaceId:String}',+ extraParams: { userWorkspaceId: params.userWorkspaceId },+ }),+ });+ }++ async getUsageByUserTimeSeries(+ params: PeriodParams & { userWorkspaceId: string },+ ): Promise<UsageTimeSeriesPoint[]> {+ return this.queryTimeSeries({+ ...params,+ extraWhere: 'AND userWorkspaceId = {userWorkspaceId:String}',+ extraParams: { userWorkspaceId: params.userWorkspaceId },+ });+ }++ async getUsageTimeSeries(+ params: PeriodParams,+ ): Promise<UsageTimeSeriesPoint[]> {+ return this.queryTimeSeries(params);+ }++ private async queryBreakdown({+ workspaceId,+ periodStart,+ periodEnd,+ groupByField,+ extraWhere = '',+ extraParams,+ }: PeriodParams & {+ groupByField: GroupByField;+ extraWhere?: string;+ extraParams?: Record<string, unknown>;+ }): Promise<UsageBreakdownItem[]> {+ const query = `+ SELECT+ ${groupByField} AS key,+ sum(creditsUsedMicro) AS creditsUsedMicro+ FROM usageEvent+ WHERE workspaceId = {workspaceId:String}+ AND timestamp >= {periodStart:String}+ AND timestamp < {periodEnd:String}+ ${extraWhere}+ GROUP BY ${groupByField}+ ORDER BY creditsUsedMicro DESC+ LIMIT ${BREAKDOWN_QUERY_LIMIT}+ `;++ const rows = await this.clickHouseService.select<BreakdownRowMicro>(query, {+ workspaceId,+ periodStart: formatDateForClickHouse(periodStart),+ periodEnd: formatDateForClickHouse(periodEnd),+ ...(extraParams ?? {}),+ });++ return rows.map((row) => ({+ key: row.key,+ creditsUsed: toDisplayCredits(row.creditsUsedMicro),+ }));+ }++ private async queryTimeSeries({+ workspaceId,+ periodStart,+ periodEnd,+ extraWhere = '',+ extraParams,+ }: PeriodParams & {+ extraWhere?: string;+ extraParams?: Record<string, unknown>;+ }): Promise<UsageTimeSeriesPoint[]> {+ const query = `+ SELECT+ formatDateTime(timestamp, '%Y-%m-%d') AS date,+ sum(creditsUsedMicro) AS creditsUsedMicro+ FROM usageEvent+ WHERE workspaceId = {workspaceId:String}+ AND timestamp >= {periodStart:String}+ AND timestamp < {periodEnd:String}+ ${extraWhere}+ GROUP BY date+ ORDER BY date ASC+ `;++ const rows = await this.clickHouseService.select<TimeSeriesRowMicro>(+ query,+ {+ workspaceId,+ periodStart: formatDateForClickHouse(periodStart),+ periodEnd: formatDateForClickHouse(periodEnd),+ ...(extraParams ?? {}),+ },+ );++ return rows.map((row) => ({+ date: row.date,+ creditsUsed: toDisplayCredits(row.creditsUsedMicro),+ }));+ }+}diff --git a/packages/twenty-server/src/engine/core-modules/usage/services/usage-event-writer.service.ts b/packages/twenty-server/src/engine/core-modules/usage/services/usage-event-writer.service.tsnew file mode 100644index 00000000000..6239e89dc5f--- /dev/null+++ b/packages/twenty-server/src/engine/core-modules/usage/services/usage-event-writer.service.ts@@ -0,0 +1,44 @@+/* @license Enterprise */++import { Injectable, Logger } from '@nestjs/common';++import { ClickHouseService } from 'src/database/clickHouse/clickHouse.service';+import { formatDateForClickHouse } from 'src/database/clickHouse/clickHouse.util';+import { type UsageEvent } from 'src/engine/core-modules/usage/types/usage-event.type';+import { TwentyConfigService } from 'src/engine/core-modules/twenty-config/twenty-config.service';++@Injectable()+export class UsageEventWriterService {+ private readonly logger = new Logger(UsageEventWriterService.name);++ constructor(+ private readonly clickHouseService: ClickHouseService,+ private readonly twentyConfigService: TwentyConfigService,+ ) {}++ writeToClickHouse(workspaceId: string, usageEvents: UsageEvent[]): void {+ if (!this.twentyConfigService.get('CLICKHOUSE_URL')) {+ return;+ }++ const now = formatDateForClickHouse(new Date());++ const rows = usageEvents.map((usageEvent) => ({+ timestamp: now,+ workspaceId,+ userWorkspaceId: usageEvent.userWorkspaceId ?? '',+ resourceType: usageEvent.resourceType,+ operationType: usageEvent.operationType,+ quantity: usageEvent.quantity,+ unit: usageEvent.unit,+ creditsUsedMicro: usageEvent.creditsUsedMicro,+ resourceId: usageEvent.resourceId ?? '',+ resourceContext: usageEvent.resourceContext ?? '',+ metadata: '{}',+ }));++ this.clickHouseService.insert('usageEvent', rows).catch((error) => {+ this.logger.error('Failed to write usage events to ClickHouse', error);+ });+ }+}diff --git a/packages/twenty-server/src/engine/core-modules/usage/types/usage-event.type.ts b/packages/twenty-server/src/engine/core-modules/usage/types/usage-event.type.tsnew file mode 100644index 00000000000..fd6481a6f88--- /dev/null+++ b/packages/twenty-server/src/engine/core-modules/usage/types/usage-event.type.ts@@ -0,0 +1,16 @@+/* @license Enterprise */++import { type UsageResourceType } from 'src/engine/core-modules/usage/enums/usage-resource-type.enum';+import { type UsageOperationType } from 'src/engine/core-modules/usage/enums/usage-operation-type.enum';+import { type UsageUnit } from 'src/engine/core-modules/usage/enums/usage-unit.enum';++export type UsageEvent = {+ resourceType: UsageResourceType;+ operationType: UsageOperationType;+ creditsUsedMicro: number;+ quantity: number;+ unit: UsageUnit;+ resourceId?: string | null;+ resourceContext?: string | null;+ userWorkspaceId?: string | null;+};diff --git a/packages/twenty-server/src/engine/core-modules/usage/usage.module.ts b/packages/twenty-server/src/engine/core-modules/usage/usage.module.tsnew file mode 100644index 00000000000..c7c27896d96--- /dev/null+++ b/packages/twenty-server/src/engine/core-modules/usage/usage.module.ts@@ -0,0 +1,30 @@+/* @license Enterprise */++import { Module } from '@nestjs/common';+import { TypeOrmModule } from '@nestjs/typeorm';++import { ClickHouseModule } from 'src/database/clickHouse/clickHouse.module';+import { FeatureFlagModule } from 'src/engine/core-modules/feature-flag/feature-flag.module';+import { PermissionsModule } from 'src/engine/metadata-modules/permissions/permissions.module';+import { UserWorkspaceEntity } from 'src/engine/core-modules/user-workspace/user-workspace.entity';+import { UsageResolver } from 'src/engine/core-modules/usage/usage.resolver';+import { UsageAnalyticsService } from 'src/engine/core-modules/usage/services/usage-analytics.service';+import { UsageEventWriterService } from 'src/engine/core-modules/usage/services/usage-event-writer.service';+import { UsageEventListener } from 'src/engine/core-modules/usage/listeners/usage-event.listener';++@Module({+ imports: [+ ClickHouseModule,+ FeatureFlagModule,+ PermissionsModule,+ TypeOrmModule.forFeature([UserWorkspaceEntity]),+ ],+ providers: [+ UsageResolver,+ UsageAnalyticsService,+ UsageEventWriterService,+ UsageEventListener,+ ],+ exports: [UsageEventWriterService, UsageAnalyticsService],+})+export class UsageModule {}diff --git a/packages/twenty-server/src/engine/core-modules/usage/usage.resolver.ts b/packages/twenty-server/src/engine/core-modules/usage/usage.resolver.tsnew file mode 100644index 00000000000..1cd026803d6--- /dev/null+++ b/packages/twenty-server/src/engine/core-modules/usage/usage.resolver.ts@@ -0,0 +1,160 @@+/* @license Enterprise */++import { UseFilters, UseGuards, UsePipes } from '@nestjs/common';+import { Args, Query } from '@nestjs/graphql';+import { InjectRepository } from '@nestjs/typeorm';++import { PermissionFlagType } from 'twenty-shared/constants';+import { FeatureFlagKey } from 'twenty-shared/types';+import { isDefined } from 'twenty-shared/utils';+import { In, type Repository } from 'typeorm';++import { UsageAnalyticsDTO } from 'src/engine/core-modules/usage/dtos/usage-analytics.dto';+import { UsageAnalyticsInput } from 'src/engine/core-modules/usage/dtos/inputs/usage-analytics.input';+import {+ type UsageBreakdownItem,+ UsageAnalyticsService,+} from 'src/engine/core-modules/usage/services/usage-analytics.service';+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 { UserWorkspaceEntity } from 'src/engine/core-modules/user-workspace/user-workspace.entity';+import { type WorkspaceEntity } from 'src/engine/core-modules/workspace/workspace.entity';+import { AuthWorkspace } from 'src/engine/decorators/auth/auth-workspace.decorator';+import { SettingsPermissionGuard } from 'src/engine/guards/settings-permission.guard';+import { WorkspaceAuthGuard } from 'src/engine/guards/workspace-auth.guard';+import {+ FeatureFlagGuard,+ RequireFeatureFlag,+} from 'src/engine/guards/feature-flag.guard';+import { MetadataResolver } from 'src/engine/api/graphql/graphql-config/decorators/metadata-resolver.decorator';++@MetadataResolver()+@UseFilters(PreventNestToAutoLogGraphqlErrorsFilter)+@UsePipes(ResolverValidationPipe)+export class UsageResolver {+ constructor(+ private readonly usageAnalyticsService: UsageAnalyticsService,+ @InjectRepository(UserWorkspaceEntity)+ private readonly userWorkspaceRepository: Repository<UserWorkspaceEntity>,+ ) {}++ @Query(() => UsageAnalyticsDTO)+ @UseGuards(+ WorkspaceAuthGuard,+ FeatureFlagGuard,+ SettingsPermissionGuard(PermissionFlagType.WORKSPACE),+ )+ @RequireFeatureFlag(FeatureFlagKey.IS_USAGE_ANALYTICS_ENABLED)+ async getUsageAnalytics(+ @AuthWorkspace() workspace: WorkspaceEntity,+ @Args('input', { nullable: true }) input?: UsageAnalyticsInput,+ ): Promise<UsageAnalyticsDTO> {+ const defaultPeriodEnd = new Date();+ const defaultPeriodStart = new Date();++ defaultPeriodStart.setDate(defaultPeriodStart.getDate() - 30);++ const periodStart = input?.periodStart ?? defaultPeriodStart;+ const periodEnd = input?.periodEnd ?? defaultPeriodEnd;++ const periodParams = {+ workspaceId: workspace.id,+ periodStart,+ periodEnd,+ };++ const [usageByUser, usageByOperationType, timeSeries] = await Promise.all([+ this.usageAnalyticsService.getUsageByUser(periodParams),+ this.usageAnalyticsService.getUsageByOperationType({+ ...periodParams,+ userWorkspaceId: input?.userWorkspaceId ?? undefined,+ }),+ this.usageAnalyticsService.getUsageTimeSeries(periodParams),+ ]);++ const resolvedUsageByUser = await this.resolveBreakdownKeys(+ usageByUser,+ (ids) => this.resolveUserNames(ids, workspace.id),+ );++ const result: UsageAnalyticsDTO = {+ usageByUser: resolvedUsageByUser,+ usageByOperationType,+ timeSeries,+ periodStart,+ periodEnd,+ };++ if (input?.userWorkspaceId) {+ const userWorkspace = await this.userWorkspaceRepository.findOne({+ where: { id: input.userWorkspaceId, workspaceId: workspace.id },+ select: { id: true },+ });++ if (isDefined(userWorkspace)) {+ const dailyUsage =+ await this.usageAnalyticsService.getUsageByUserTimeSeries({+ ...periodParams,+ userWorkspaceId: input.userWorkspaceId,+ });++ result.userDailyUsage = {+ userWorkspaceId: input.userWorkspaceId,+ dailyUsage,+ };+ }+ }++ return result;+ }++ private async resolveBreakdownKeys(+ items: UsageBreakdownItem[],+ resolveNames: (ids: string[]) => Promise<Map<string, string>>,+ ): Promise<UsageBreakdownItem[]> {+ if (items.length === 0) {+ return items;+ }++ const ids = items.map((item) => item.key);+ const nameMap = await resolveNames(ids);++ return items.map((item) => ({+ ...item,+ label: nameMap.get(item.key),+ }));+ }++ private async resolveUserNames(+ userWorkspaceIds: string[],+ workspaceId: string,+ ): Promise<Map<string, string>> {+ const nameMap = new Map<string, string>();++ if (userWorkspaceIds.length === 0) {+ return nameMap;+ }++ const userWorkspaces = await this.userWorkspaceRepository.find({+ where: { id: In(userWorkspaceIds), workspaceId },+ relations: ['user'],+ select: {+ id: true,+ user: { firstName: true, lastName: true, email: true },+ },+ });++ for (const userWorkspace of userWorkspaces) {+ if (!isDefined(userWorkspace.user)) {+ continue;+ }++ const { firstName, lastName, email } = userWorkspace.user;+ const fullName = `${firstName} ${lastName}`.trim();++ nameMap.set(userWorkspace.id, fullName || email);+ }++ return nameMap;+ }+}diff --git a/packages/twenty-server/src/engine/core-modules/billing/utils/to-display-credits.util.ts b/packages/twenty-server/src/engine/core-modules/usage/utils/to-display-credits.util.tssimilarity index 100%rename from packages/twenty-server/src/engine/core-modules/billing/utils/to-display-credits.util.tsrename to packages/twenty-server/src/engine/core-modules/usage/utils/to-display-credits.util.tsdiff --git a/packages/twenty-server/src/engine/metadata-modules/ai/ai-billing/services/__tests__/ai-billing.service.spec.ts b/packages/twenty-server/src/engine/metadata-modules/ai/ai-billing/services/__tests__/ai-billing.service.spec.tsindex 7959a0d3bcb..9f0328e7112 100644--- a/packages/twenty-server/src/engine/metadata-modules/ai/ai-billing/services/__tests__/ai-billing.service.spec.ts+++ b/packages/twenty-server/src/engine/metadata-modules/ai/ai-billing/services/__tests__/ai-billing.service.spec.ts@@ -1,7 +1,9 @@import { Test, type TestingModule } from '@nestjs/testing';-import { BILLING_FEATURE_USED } from 'src/engine/core-modules/billing/constants/billing-feature-used.constant';-import { BillingMeterEventName } from 'src/engine/core-modules/billing/enums/billing-meter-event-names';+import { USAGE_RECORDED } from 'src/engine/core-modules/usage/constants/usage-recorded.constant';+import { UsageOperationType } from 'src/engine/core-modules/usage/enums/usage-operation-type.enum';+import { UsageResourceType } from 'src/engine/core-modules/usage/enums/usage-resource-type.enum';+import { UsageUnit } from 'src/engine/core-modules/usage/enums/usage-unit.enum';import { AiBillingService } from 'src/engine/metadata-modules/ai/ai-billing/services/ai-billing.service';import { ModelFamily } from 'src/engine/metadata-modules/ai/ai-models/types/model-family.enum';import { AiModelRegistryService } from 'src/engine/metadata-modules/ai/ai-models/services/ai-model-registry.service';@@ -334,16 +336,17 @@ describe('AiBillingService', () => {expect(mockWorkspaceEventEmitter.emitCustomBatchEvent,).toHaveBeenCalledWith(- BILLING_FEATURE_USED,+ USAGE_RECORDED,[{- eventName: BillingMeterEventName.WORKFLOW_NODE_RUN,- value: 7500,- dimensions: {- execution_type: 'ai_token',- resource_id: 'agent-id-123',- execution_context_1: 'gpt-4o',- },+ resourceType: UsageResourceType.AI,+ operationType: UsageOperationType.AI_TOKEN,+ creditsUsedMicro: 7500,+ quantity: 1500,+ unit: UsageUnit.TOKEN,+ resourceId: 'agent-id-123',+ resourceContext: 'gpt-4o',+ userWorkspaceId: null,},],'workspace-1',diff --git a/packages/twenty-server/src/engine/metadata-modules/ai/ai-billing/services/ai-billing.service.ts b/packages/twenty-server/src/engine/metadata-modules/ai/ai-billing/services/ai-billing.service.tsindex 9146f17e1d5..cc155c292dc 100644--- a/packages/twenty-server/src/engine/metadata-modules/ai/ai-billing/services/ai-billing.service.ts+++ b/packages/twenty-server/src/engine/metadata-modules/ai/ai-billing/services/ai-billing.service.ts@@ -2,9 +2,11 @@ import { Injectable, Logger } from '@nestjs/common';import { type LanguageModelUsage } from 'ai';-import { BILLING_FEATURE_USED } from 'src/engine/core-modules/billing/constants/billing-feature-used.constant';-import { BillingMeterEventName } from 'src/engine/core-modules/billing/enums/billing-meter-event-names';-import { type BillingUsageEvent } from 'src/engine/core-modules/billing/types/billing-usage-event.type';+import { USAGE_RECORDED } from 'src/engine/core-modules/usage/constants/usage-recorded.constant';+import { UsageOperationType } from 'src/engine/core-modules/usage/enums/usage-operation-type.enum';+import { UsageResourceType } from 'src/engine/core-modules/usage/enums/usage-resource-type.enum';+import { UsageUnit } from 'src/engine/core-modules/usage/enums/usage-unit.enum';+import { type UsageEvent } from 'src/engine/core-modules/usage/types/usage-event.type';import { computeCostBreakdown } from 'src/engine/metadata-modules/ai/ai-billing/utils/compute-cost-breakdown.util';import { convertDollarsToBillingCredits } from 'src/engine/metadata-modules/ai/ai-billing/utils/convert-dollars-to-billing-credits.util';import { type ModelId } from 'src/engine/metadata-modules/ai/ai-models/types/model-id.type';@@ -54,32 +56,48 @@ export class AiBillingService {billingInput: BillingUsageInput,workspaceId: string,agentId?: string | null,+ userWorkspaceId?: string | null,): void {const costInDollars = this.calculateCost(modelId, billingInput);- const creditsUsed = Math.round(+ const creditsUsedMicro = Math.round(convertDollarsToBillingCredits(costInDollars),);- this.sendAiTokenUsageEvent(workspaceId, creditsUsed, modelId, agentId);+ const totalTokens =+ (billingInput.usage.inputTokens ?? 0) ++ (billingInput.usage.outputTokens ?? 0) ++ (billingInput.cacheCreationTokens ?? 0);++ this.emitAiTokenUsageEvent(+ workspaceId,+ creditsUsedMicro,+ totalTokens,+ modelId,+ agentId,+ userWorkspaceId,+ );}- private sendAiTokenUsageEvent(+ private emitAiTokenUsageEvent(workspaceId: string,- creditsUsed: number,+ creditsUsedMicro: number,+ totalTokens: number,modelId: ModelId,agentId?: string | null,+ userWorkspaceId?: string | null,): void {- this.workspaceEventEmitter.emitCustomBatchEvent<BillingUsageEvent>(- BILLING_FEATURE_USED,+ this.workspaceEventEmitter.emitCustomBatchEvent<UsageEvent>(+ USAGE_RECORDED,[{- eventName: BillingMeterEventName.WORKFLOW_NODE_RUN,- value: creditsUsed,- dimensions: {- execution_type: 'ai_token',- resource_id: agentId || null,- execution_context_1: modelId,- },+ resourceType: UsageResourceType.AI,+ operationType: UsageOperationType.AI_TOKEN,+ creditsUsedMicro,+ quantity: totalTokens,+ unit: UsageUnit.TOKEN,+ resourceId: agentId || null,+ resourceContext: modelId,+ userWorkspaceId: userWorkspaceId || null,},],workspaceId,diff --git a/packages/twenty-server/src/engine/metadata-modules/ai/ai-chat/resolvers/agent-chat.resolver.ts b/packages/twenty-server/src/engine/metadata-modules/ai/ai-chat/resolvers/agent-chat.resolver.tsindex 19d91b52bcb..da29edc3de4 100644--- a/packages/twenty-server/src/engine/metadata-modules/ai/ai-chat/resolvers/agent-chat.resolver.ts+++ b/packages/twenty-server/src/engine/metadata-modules/ai/ai-chat/resolvers/agent-chat.resolver.ts@@ -13,7 +13,7 @@ import { FeatureFlagKey } from 'twenty-shared/types';import { MetadataResolver } from 'src/engine/api/graphql/graphql-config/decorators/metadata-resolver.decorator';import { UUIDScalarType } from 'src/engine/api/graphql/workspace-schema-builder/graphql-types/scalars';-import { toDisplayCredits } from 'src/engine/core-modules/billing/utils/to-display-credits.util';+import { toDisplayCredits } from 'src/engine/core-modules/usage/utils/to-display-credits.util';import { type WorkspaceEntity } from 'src/engine/core-modules/workspace/workspace.entity';import { AuthUserWorkspaceId } from 'src/engine/decorators/auth/auth-user-workspace-id.decorator';import { AuthWorkspace } from 'src/engine/decorators/auth/auth-workspace.decorator';diff --git a/packages/twenty-server/src/engine/metadata-modules/ai/ai-chat/services/agent-chat-streaming.service.ts b/packages/twenty-server/src/engine/metadata-modules/ai/ai-chat/services/agent-chat-streaming.service.tsindex 676c61623c7..34f2647319f 100644--- a/packages/twenty-server/src/engine/metadata-modules/ai/ai-chat/services/agent-chat-streaming.service.ts+++ b/packages/twenty-server/src/engine/metadata-modules/ai/ai-chat/services/agent-chat-streaming.service.ts@@ -19,7 +19,7 @@ import { type BrowsingContextType } from 'src/engine/metadata-modules/ai/ai-agenimport { computeCostBreakdown } from 'src/engine/metadata-modules/ai/ai-billing/utils/compute-cost-breakdown.util';import { convertDollarsToBillingCredits } from 'src/engine/metadata-modules/ai/ai-billing/utils/convert-dollars-to-billing-credits.util';import { extractCacheCreationTokens } from 'src/engine/metadata-modules/ai/ai-billing/utils/extract-cache-creation-tokens.util';-import { toDisplayCredits } from 'src/engine/core-modules/billing/utils/to-display-credits.util';+import { toDisplayCredits } from 'src/engine/core-modules/usage/utils/to-display-credits.util';import { type AIModelConfig } from 'src/engine/metadata-modules/ai/ai-models/types/ai-model-config.type';import { AgentChatThreadEntity } from 'src/engine/metadata-modules/ai/ai-chat/entities/agent-chat-thread.entity';diff --git a/packages/twenty-server/src/engine/metadata-modules/ai/ai-chat/services/chat-execution.service.ts b/packages/twenty-server/src/engine/metadata-modules/ai/ai-chat/services/chat-execution.service.tsindex d155a58a45c..18615417e58 100644--- a/packages/twenty-server/src/engine/metadata-modules/ai/ai-chat/services/chat-execution.service.ts+++ b/packages/twenty-server/src/engine/metadata-modules/ai/ai-chat/services/chat-execution.service.ts@@ -247,6 +247,7 @@ export class ChatExecutionService {{ usage, cacheCreationTokens },workspace.id,null,+ userWorkspaceId,);}).catch((error) => {diff --git a/packages/twenty-server/src/engine/twenty-orm/entity-manager/workspace-entity-manager.spec.ts b/packages/twenty-server/src/engine/twenty-orm/entity-manager/workspace-entity-manager.spec.tsindex 448ab698034..0b6e647c911 100644--- a/packages/twenty-server/src/engine/twenty-orm/entity-manager/workspace-entity-manager.spec.ts+++ b/packages/twenty-server/src/engine/twenty-orm/entity-manager/workspace-entity-manager.spec.ts@@ -245,6 +245,7 @@ describe('WorkspaceEntityManager', () => {IS_DATE_TIME_WHOLE_DAY_FILTER_ENABLED: false,IS_NAVIGATION_MENU_ITEM_EDITING_ENABLED: false,IS_DRAFT_EMAIL_ENABLED: false,+ IS_USAGE_ANALYTICS_ENABLED: false,IS_RICH_TEXT_V1_MIGRATED: false,IS_DIRECT_GRAPHQL_EXECUTION_ENABLED: false,IS_RECORD_PAGE_LAYOUT_GLOBAL_EDITION_ENABLED: false,diff --git a/packages/twenty-server/src/engine/workspace-manager/dev-seeder/core/utils/seed-feature-flags.util.ts b/packages/twenty-server/src/engine/workspace-manager/dev-seeder/core/utils/seed-feature-flags.util.tsindex 7750aa7f5d9..94c025ec205 100644--- a/packages/twenty-server/src/engine/workspace-manager/dev-seeder/core/utils/seed-feature-flags.util.ts+++ b/packages/twenty-server/src/engine/workspace-manager/dev-seeder/core/utils/seed-feature-flags.util.ts@@ -105,6 +105,11 @@ export const seedFeatureFlags = async ({workspaceId: workspaceId,value: true,},+ {+ key: FeatureFlagKey.IS_USAGE_ANALYTICS_ENABLED,+ workspaceId: workspaceId,+ value: true,+ },{key: FeatureFlagKey.IS_RECORD_PAGE_LAYOUT_GLOBAL_EDITION_ENABLED,workspaceId: workspaceId,diff --git a/packages/twenty-server/src/modules/workflow/workflow-executor/workflow-actions/ai-agent/ai-agent.workflow-action.ts b/packages/twenty-server/src/modules/workflow/workflow-executor/workflow-actions/ai-agent/ai-agent.workflow-action.tsindex 00fe3485bed..de3f41e7996 100644--- a/packages/twenty-server/src/modules/workflow/workflow-executor/workflow-actions/ai-agent/ai-agent.workflow-action.ts+++ b/packages/twenty-server/src/modules/workflow/workflow-executor/workflow-actions/ai-agent/ai-agent.workflow-action.ts@@ -73,6 +73,11 @@ export class AiAgentWorkflowAction implements WorkflowAction {const executionContext =await this.workflowExecutionContextService.getExecutionContext(runInfo);+ const userWorkspaceId =+ executionContext.authContext.type === 'user'+ ? executionContext.authContext.userWorkspaceId+ : null;+const { result, usage, cacheCreationTokens } =await this.aiAgentExecutionService.executeAgent({agent,@@ -89,6 +94,7 @@ export class AiAgentWorkflowAction implements WorkflowAction {{ usage, cacheCreationTokens },workspaceId,agent?.id || null,+ userWorkspaceId,);return {diff --git a/packages/twenty-server/src/modules/workflow/workflow-executor/workspace-services/__tests__/workflow-executor.workspace-service.spec.ts b/packages/twenty-server/src/modules/workflow/workflow-executor/workspace-services/__tests__/workflow-executor.workspace-service.spec.tsindex d60ade250f2..9137da2d24e 100644--- a/packages/twenty-server/src/modules/workflow/workflow-executor/workspace-services/__tests__/workflow-executor.workspace-service.spec.ts+++ b/packages/twenty-server/src/modules/workflow/workflow-executor/workspace-services/__tests__/workflow-executor.workspace-service.spec.ts@@ -2,9 +2,11 @@ import { Test, type TestingModule } from '@nestjs/testing';import { getWorkflowRunContext, StepStatus } from 'twenty-shared/workflow';-import { BILLING_FEATURE_USED } from 'src/engine/core-modules/billing/constants/billing-feature-used.constant';import { BILLING_WORKFLOW_EXECUTION_ERROR_MESSAGE } from 'src/engine/core-modules/billing/constants/billing-workflow-execution-error-message.constant';-import { BillingMeterEventName } from 'src/engine/core-modules/billing/enums/billing-meter-event-names';+import { USAGE_RECORDED } from 'src/engine/core-modules/usage/constants/usage-recorded.constant';+import { UsageOperationType } from 'src/engine/core-modules/usage/enums/usage-operation-type.enum';+import { UsageResourceType } from 'src/engine/core-modules/usage/enums/usage-resource-type.enum';+import { UsageUnit } from 'src/engine/core-modules/usage/enums/usage-unit.enum';import { BillingService } from 'src/engine/core-modules/billing/services/billing.service';import { ExceptionHandlerService } from 'src/engine/core-modules/exception-handler/exception-handler.service';import { MessageQueue } from 'src/engine/core-modules/message-queue/message-queue.constants';@@ -190,16 +192,15 @@ describe('WorkflowExecutorWorkspaceService', () => {});expect(workspaceEventEmitter.emitCustomBatchEvent).toHaveBeenCalledWith(- BILLING_FEATURE_USED,+ USAGE_RECORDED,[{- eventName: BillingMeterEventName.WORKFLOW_NODE_RUN,- value: 1,- dimensions: {- execution_type: 'workflow_execution',- resource_id: 'workflow-id',- execution_context_1: null,- },+ resourceType: UsageResourceType.WORKFLOW,+ operationType: UsageOperationType.WORKFLOW_EXECUTION,+ creditsUsedMicro: 1,+ quantity: 1,+ unit: UsageUnit.INVOCATION,+ resourceId: 'workflow-id',},],'workspace-id',@@ -648,16 +649,15 @@ describe('WorkflowExecutorWorkspaceService', () => {service['sendWorkflowNodeRunEvent']('workspace-id', 'workflow-id');expect(workspaceEventEmitter.emitCustomBatchEvent).toHaveBeenCalledWith(- BILLING_FEATURE_USED,+ USAGE_RECORDED,[{- eventName: BillingMeterEventName.WORKFLOW_NODE_RUN,- value: 1,- dimensions: {- execution_type: 'workflow_execution',- resource_id: 'workflow-id',- execution_context_1: null,- },+ resourceType: UsageResourceType.WORKFLOW,+ operationType: UsageOperationType.WORKFLOW_EXECUTION,+ creditsUsedMicro: 1,+ quantity: 1,+ unit: UsageUnit.INVOCATION,+ resourceId: 'workflow-id',},],'workspace-id',diff --git a/packages/twenty-server/src/modules/workflow/workflow-executor/workspace-services/workflow-executor.workspace-service.ts b/packages/twenty-server/src/modules/workflow/workflow-executor/workspace-services/workflow-executor.workspace-service.tsindex 2e759b7b5cb..7f0bda4cbef 100644--- a/packages/twenty-server/src/modules/workflow/workflow-executor/workspace-services/workflow-executor.workspace-service.ts+++ b/packages/twenty-server/src/modules/workflow/workflow-executor/workspace-services/workflow-executor.workspace-service.ts@@ -9,12 +9,14 @@ import {WorkflowRunStepInfos,} from 'twenty-shared/workflow';-import { BILLING_FEATURE_USED } from 'src/engine/core-modules/billing/constants/billing-feature-used.constant';import { BILLING_WORKFLOW_EXECUTION_ERROR_MESSAGE } from 'src/engine/core-modules/billing/constants/billing-workflow-execution-error-message.constant';-import { BillingMeterEventName } from 'src/engine/core-modules/billing/enums/billing-meter-event-names';+import { USAGE_RECORDED } from 'src/engine/core-modules/usage/constants/usage-recorded.constant';import { BillingProductKey } from 'src/engine/core-modules/billing/enums/billing-product-key.enum';+import { UsageOperationType } from 'src/engine/core-modules/usage/enums/usage-operation-type.enum';+import { UsageResourceType } from 'src/engine/core-modules/usage/enums/usage-resource-type.enum';+import { UsageUnit } from 'src/engine/core-modules/usage/enums/usage-unit.enum';import { BillingService } from 'src/engine/core-modules/billing/services/billing.service';-import { type BillingUsageEvent } from 'src/engine/core-modules/billing/types/billing-usage-event.type';+import { type UsageEvent } from 'src/engine/core-modules/usage/types/usage-event.type';import { ExceptionHandlerService } from 'src/engine/core-modules/exception-handler/exception-handler.service';import { InjectMessageQueue } from 'src/engine/core-modules/message-queue/decorators/message-queue.decorator';import { MessageQueue } from 'src/engine/core-modules/message-queue/message-queue.constants';@@ -353,17 +355,16 @@ export class WorkflowExecutorWorkspaceService {}private sendWorkflowNodeRunEvent(workspaceId: string, workflowId: string) {- this.workspaceEventEmitter.emitCustomBatchEvent<BillingUsageEvent>(- BILLING_FEATURE_USED,+ this.workspaceEventEmitter.emitCustomBatchEvent<UsageEvent>(+ USAGE_RECORDED,[{- eventName: BillingMeterEventName.WORKFLOW_NODE_RUN,- value: 1,- dimensions: {- execution_type: 'workflow_execution',- resource_id: workflowId,- execution_context_1: null,- },+ resourceType: UsageResourceType.WORKFLOW,+ operationType: UsageOperationType.WORKFLOW_EXECUTION,+ creditsUsedMicro: 1,+ quantity: 1,+ unit: UsageUnit.INVOCATION,+ resourceId: workflowId,},],workspaceId,diff --git a/packages/twenty-shared/src/types/EventLogTable.ts b/packages/twenty-shared/src/types/EventLogTable.tsindex 443c81567e9..229108e777b 100644--- a/packages/twenty-shared/src/types/EventLogTable.ts+++ b/packages/twenty-shared/src/types/EventLogTable.ts@@ -2,4 +2,5 @@ export enum EventLogTable {WORKSPACE_EVENT = 'WORKSPACE_EVENT',PAGEVIEW = 'PAGEVIEW',OBJECT_EVENT = 'OBJECT_EVENT',+ USAGE_EVENT = 'USAGE_EVENT',}diff --git a/packages/twenty-shared/src/types/FeatureFlagKey.ts b/packages/twenty-shared/src/types/FeatureFlagKey.tsindex cbf68e928da..cd6aa908b47 100644--- a/packages/twenty-shared/src/types/FeatureFlagKey.ts+++ b/packages/twenty-shared/src/types/FeatureFlagKey.ts@@ -18,6 +18,7 @@ export enum FeatureFlagKey {IS_DATE_TIME_WHOLE_DAY_FILTER_ENABLED = 'IS_DATE_TIME_WHOLE_DAY_FILTER_ENABLED',IS_NAVIGATION_MENU_ITEM_EDITING_ENABLED = 'IS_NAVIGATION_MENU_ITEM_EDITING_ENABLED',IS_DRAFT_EMAIL_ENABLED = 'IS_DRAFT_EMAIL_ENABLED',+ IS_USAGE_ANALYTICS_ENABLED = 'IS_USAGE_ANALYTICS_ENABLED',IS_RICH_TEXT_V1_MIGRATED = 'IS_RICH_TEXT_V1_MIGRATED',IS_DIRECT_GRAPHQL_EXECUTION_ENABLED = 'IS_DIRECT_GRAPHQL_EXECUTION_ENABLED',IS_RECORD_PAGE_LAYOUT_GLOBAL_EDITION_ENABLED = 'IS_RECORD_PAGE_LAYOUT_GLOBAL_EDITION_ENABLED',diff --git a/packages/twenty-shared/src/types/SettingsPath.ts b/packages/twenty-shared/src/types/SettingsPath.tsindex 6e88e73557f..865f8c0b4c8 100644--- a/packages/twenty-shared/src/types/SettingsPath.ts+++ b/packages/twenty-shared/src/types/SettingsPath.ts@@ -10,6 +10,8 @@ export enum SettingsPath {NewImapSmtpCaldavConnection = 'accounts/new-imap-smtp-caldav-connection',EditImapSmtpCaldavConnection = 'accounts/edit-imap-smtp-caldav-connection/:connectedAccountId',Billing = 'billing',+ Usage = 'usage',+ UsageUserDetail = 'usage/user/:userWorkspaceId',Enterprise = 'enterprise',Objects = 'objects',ObjectOverview = 'objects/overview',