diff --git a/packages/twenty-front/src/generated-metadata/graphql.ts b/packages/twenty-front/src/generated-metadata/graphql.ts index ef076f26172..7d9f284adb8 100644 --- a/packages/twenty-front/src/generated-metadata/graphql.ts +++ b/packages/twenty-front/src/generated-metadata/graphql.ts @@ -115,8 +115,8 @@ export type AgentChatThread = { updatedAt: Scalars['DateTime']; }; -export type AgentHandoffDto = { - __typename?: 'AgentHandoffDTO'; +export type AgentHandoff = { + __typename?: 'AgentHandoff'; description?: Maybe; id: Scalars['UUID']; toAgent: Agent; @@ -261,8 +261,8 @@ export type AuthorizeApp = { redirectUrl: Scalars['String']; }; -export type AutocompleteResultDto = { - __typename?: 'AutocompleteResultDto'; +export type AutocompleteResult = { + __typename?: 'AutocompleteResult'; placeId: Scalars['String']; text: Scalars['String']; }; @@ -331,7 +331,7 @@ export type Billing = { __typename?: 'Billing'; billingUrl?: Maybe; isBillingEnabled: Scalars['Boolean']; - trialPeriods: Array; + trialPeriods: Array; }; export type BillingEndTrialPeriodOutput = { @@ -348,7 +348,7 @@ export type BillingLicensedProduct = BillingProductDto & { images?: Maybe>; metadata: BillingProductMetadata; name: Scalars['String']; - prices?: Maybe>; + prices?: Maybe>; }; export type BillingMeteredProduct = BillingProductDto & { @@ -357,7 +357,7 @@ export type BillingMeteredProduct = BillingProductDto & { images?: Maybe>; metadata: BillingProductMetadata; name: Scalars['String']; - prices?: Maybe>; + prices?: Maybe>; }; export type BillingMeteredProductUsageOutput = { @@ -383,24 +383,24 @@ export type BillingPlanOutput = { planKey: BillingPlanKey; }; -export type BillingPriceLicensedDto = { - __typename?: 'BillingPriceLicensedDTO'; +export type BillingPriceLicensed = { + __typename?: 'BillingPriceLicensed'; priceUsageType: BillingUsageType; recurringInterval: SubscriptionInterval; stripePriceId: Scalars['String']; unitAmount: Scalars['Float']; }; -export type BillingPriceMeteredDto = { - __typename?: 'BillingPriceMeteredDTO'; +export type BillingPriceMetered = { + __typename?: 'BillingPriceMetered'; priceUsageType: BillingUsageType; recurringInterval: SubscriptionInterval; stripePriceId: Scalars['String']; - tiers: Array; + tiers: Array; }; -export type BillingPriceTierDto = { - __typename?: 'BillingPriceTierDTO'; +export type BillingPriceTier = { + __typename?: 'BillingPriceTier'; flatAmount?: Maybe; unitAmount?: Maybe; upTo?: Maybe; @@ -472,8 +472,8 @@ export type BillingSubscriptionSchedulePhaseItem = { quantity?: Maybe; }; -export type BillingTrialPeriodDto = { - __typename?: 'BillingTrialPeriodDTO'; +export type BillingTrialPeriod = { + __typename?: 'BillingTrialPeriod'; duration: Scalars['Float']; isCreditCardRequired: Scalars['Boolean']; }; @@ -568,27 +568,27 @@ export enum ConfigVariableType { } export enum ConfigVariablesGroup { - AnalyticsConfig = 'AnalyticsConfig', - AwsSesSettings = 'AwsSesSettings', - BillingConfig = 'BillingConfig', - CaptchaConfig = 'CaptchaConfig', - CloudflareConfig = 'CloudflareConfig', - EmailSettings = 'EmailSettings', - ExceptionHandler = 'ExceptionHandler', - GoogleAuth = 'GoogleAuth', + ANALYTICS_CONFIG = 'ANALYTICS_CONFIG', + AWS_SES_SETTINGS = 'AWS_SES_SETTINGS', + BILLING_CONFIG = 'BILLING_CONFIG', + CAPTCHA_CONFIG = 'CAPTCHA_CONFIG', + CLOUDFLARE_CONFIG = 'CLOUDFLARE_CONFIG', + EMAIL_SETTINGS = 'EMAIL_SETTINGS', + EXCEPTION_HANDLER = 'EXCEPTION_HANDLER', + GOOGLE_AUTH = 'GOOGLE_AUTH', LLM = 'LLM', - Logging = 'Logging', - Metering = 'Metering', - MicrosoftAuth = 'MicrosoftAuth', - Other = 'Other', - RateLimiting = 'RateLimiting', + LOGGING = 'LOGGING', + METERING = 'METERING', + MICROSOFT_AUTH = 'MICROSOFT_AUTH', + OTHER = 'OTHER', + RATE_LIMITING = 'RATE_LIMITING', + SERVERLESS_CONFIG = 'SERVERLESS_CONFIG', + SERVER_CONFIG = 'SERVER_CONFIG', SSL = 'SSL', - ServerConfig = 'ServerConfig', - ServerlessConfig = 'ServerlessConfig', - StorageConfig = 'StorageConfig', - SupportChatConfig = 'SupportChatConfig', - TokensDuration = 'TokensDuration', - TwoFactorAuthentication = 'TwoFactorAuthentication' + STORAGE_CONFIG = 'STORAGE_CONFIG', + SUPPORT_CHAT_CONFIG = 'SUPPORT_CHAT_CONFIG', + TOKENS_DURATION = 'TOKENS_DURATION', + TWO_FACTOR_AUTHENTICATION = 'TWO_FACTOR_AUTHENTICATION' } export type ConfigVariablesGroupData = { @@ -1050,6 +1050,12 @@ export type DeleteApprovedAccessDomainInput = { id: Scalars['UUID']; }; +export type DeleteJobsResponse = { + __typename?: 'DeleteJobsResponse'; + deletedCount: Scalars['Int']; + results: Array; +}; + export type DeleteOneFieldInput = { /** The id of the field to delete. */ id: Scalars['UUID']; @@ -1644,6 +1650,24 @@ export type InvalidatePassword = { success: Scalars['Boolean']; }; +export type JobOperationResult = { + __typename?: 'JobOperationResult'; + error?: Maybe; + jobId: Scalars['String']; + success: Scalars['Boolean']; +}; + +/** Job state in the queue */ +export enum JobState { + ACTIVE = 'ACTIVE', + COMPLETED = 'COMPLETED', + DELAYED = 'DELAYED', + FAILED = 'FAILED', + PRIORITIZED = 'PRIORITIZED', + WAITING = 'WAITING', + WAITING_CHILDREN = 'WAITING_CHILDREN' +} + export type LineChartConfiguration = { __typename?: 'LineChartConfiguration'; aggregateFieldMetadataId: Scalars['UUID']; @@ -1678,8 +1702,8 @@ export type LinksMetadata = { secondaryLinks?: Maybe>; }; -export type LocationDto = { - __typename?: 'LocationDto'; +export type Location = { + __typename?: 'Location'; lat?: Maybe; lng?: Maybe; }; @@ -1765,6 +1789,7 @@ export type Mutation = { deleteDatabaseConfigVariable: Scalars['Boolean']; deleteEmailingDomain: Scalars['Boolean']; deleteFile: File; + deleteJobs: DeleteJobsResponse; deleteOneAgent: Agent; deleteOneCronTrigger: CronTrigger; deleteOneDatabaseEventTrigger: DatabaseEventTrigger; @@ -1821,6 +1846,7 @@ export type Mutation = { restorePageLayout: PageLayout; restorePageLayoutTab: PageLayoutTab; restorePageLayoutWidget: PageLayoutWidget; + retryJobs: RetryJobsResponse; revokeApiKey?: Maybe; runWorkflowVersion: WorkflowRun; saveImapSmtpCaldavAccount: ImapSmtpCaldavConnectionSuccess; @@ -1872,10 +1898,10 @@ export type Mutation = { updateWorkspace: Workspace; updateWorkspaceFeatureFlag: Scalars['Boolean']; updateWorkspaceMemberRole: WorkspaceMember; - uploadFile: SignedFileDto; - uploadImage: SignedFileDto; - uploadProfilePicture: SignedFileDto; - uploadWorkspaceLogo: SignedFileDto; + uploadFile: SignedFile; + uploadImage: SignedFile; + uploadProfilePicture: SignedFile; + uploadWorkspaceLogo: SignedFile; upsertFieldPermissions: Array; upsertObjectPermissions: Array; upsertPermissionFlags: Array; @@ -2174,6 +2200,12 @@ export type MutationDeleteFileArgs = { }; +export type MutationDeleteJobsArgs = { + jobIds: Array; + queueName: Scalars['String']; +}; + + export type MutationDeleteOneAgentArgs = { input: AgentIdInput; }; @@ -2443,6 +2475,12 @@ export type MutationRestorePageLayoutWidgetArgs = { }; +export type MutationRetryJobsArgs = { + jobIds: Array; + queueName: Scalars['String']; +}; + + export type MutationRevokeApiKeyArgs = { input: RevokeApiKeyDto; }; @@ -2907,8 +2945,8 @@ export type ObjectStandardOverrides = { translations?: Maybe; }; -export type OnDbEventDto = { - __typename?: 'OnDbEventDTO'; +export type OnDbEvent = { + __typename?: 'OnDbEvent'; action: DatabaseEventAction; eventDate: Scalars['DateTime']; objectNameSingular: Scalars['String']; @@ -3031,11 +3069,11 @@ export type PieChartConfiguration = { orderBy?: Maybe; }; -export type PlaceDetailsResultDto = { - __typename?: 'PlaceDetailsResultDto'; +export type PlaceDetailsResult = { + __typename?: 'PlaceDetailsResult'; city?: Maybe; country?: Maybe; - location?: Maybe; + location?: Maybe; postcode?: Maybe; state?: Maybe; }; @@ -3098,7 +3136,7 @@ export type Query = { field: Field; fields: FieldConnection; findAgentHandoffTargets: Array; - findAgentHandoffs: Array; + findAgentHandoffs: Array; findDistantTablesWithStatus: Array; findManyAgents: Array; findManyApplications: Array; @@ -3117,9 +3155,9 @@ export type Query = { findOneServerlessFunction: ServerlessFunction; findWorkspaceFromInviteHash: Workspace; findWorkspaceInvitations: Array; - getAddressDetails: PlaceDetailsResultDto; + getAddressDetails: PlaceDetailsResult; getApprovedAccessDomains: Array; - getAutoCompleteAddress: Array; + getAutoCompleteAddress: Array; getAvailablePackages: Scalars['JSON']; getConfigVariablesGrouped: ConfigVariablesOutput; getConnectedImapSmtpCaldavAccount: ConnectedImapSmtpCaldavAccount; @@ -3147,6 +3185,7 @@ export type Query = { getPageLayouts: Array; getPostgresCredentials?: Maybe; getPublicWorkspaceDataByDomain: PublicWorkspaceDataOutput; + getQueueJobs: QueueJobsResponse; getQueueMetrics: QueueMetricsData; getRoles: Array; getSSOIdentityProviders: Array; @@ -3407,6 +3446,14 @@ export type QueryGetPublicWorkspaceDataByDomainArgs = { }; +export type QueryGetQueueJobsArgs = { + limit?: InputMaybe; + offset?: InputMaybe; + queueName: Scalars['String']; + state: JobState; +}; + + export type QueryGetQueueMetricsArgs = { queueName: Scalars['String']; timeRange?: InputMaybe; @@ -3501,6 +3548,31 @@ export type QueryWebhookArgs = { input: GetWebhookDto; }; +export type QueueJob = { + __typename?: 'QueueJob'; + attemptsMade: Scalars['Float']; + data?: Maybe; + failedReason?: Maybe; + finishedOn?: Maybe; + id: Scalars['String']; + logs?: Maybe>; + name: Scalars['String']; + processedOn?: Maybe; + returnValue?: Maybe; + stackTrace?: Maybe>; + state: JobState; + timestamp?: Maybe; +}; + +export type QueueJobsResponse = { + __typename?: 'QueueJobsResponse'; + count: Scalars['Float']; + hasMore: Scalars['Boolean']; + jobs: Array; + retentionConfig: QueueRetentionConfig; + totalCount: Scalars['Float']; +}; + export type QueueMetricsData = { __typename?: 'QueueMetricsData'; data: Array; @@ -3530,6 +3602,14 @@ export enum QueueMetricsTimeRange { TwelveHours = 'TwelveHours' } +export type QueueRetentionConfig = { + __typename?: 'QueueRetentionConfig'; + completedMaxAge: Scalars['Float']; + completedMaxCount: Scalars['Float']; + failedMaxAge: Scalars['Float']; + failedMaxCount: Scalars['Float']; +}; + export type Relation = { __typename?: 'Relation'; sourceFieldMetadata: Field; @@ -3597,6 +3677,12 @@ export type ResendEmailVerificationTokenOutput = { success: Scalars['Boolean']; }; +export type RetryJobsResponse = { + __typename?: 'RetryJobsResponse'; + results: Array; + retriedCount: Scalars['Int']; +}; + export type RevokeApiKeyDto = { id: Scalars['UUID']; }; @@ -3797,8 +3883,8 @@ export type SignUpOutput = { workspace: WorkspaceUrlsAndId; }; -export type SignedFileDto = { - __typename?: 'SignedFileDTO'; +export type SignedFile = { + __typename?: 'SignedFile'; path: Scalars['String']; token: Scalars['String']; }; @@ -3822,7 +3908,7 @@ export type SubmitFormStepInput = { export type Subscription = { __typename?: 'Subscription'; - onDbEvent: OnDbEventDto; + onDbEvent: OnDbEvent; }; @@ -4780,7 +4866,7 @@ export type FindAgentHandoffsQueryVariables = Exact<{ }>; -export type FindAgentHandoffsQuery = { __typename?: 'Query', findAgentHandoffs: Array<{ __typename?: 'AgentHandoffDTO', id: string, description?: string | null, toAgent: { __typename?: 'Agent', id: string, name: string, label: string, description?: string | null, icon?: string | null, modelId: string, prompt: string, isCustom: boolean, createdAt: string, updatedAt: string } }> }; +export type FindAgentHandoffsQuery = { __typename?: 'Query', findAgentHandoffs: Array<{ __typename?: 'AgentHandoff', id: string, description?: string | null, toAgent: { __typename?: 'Agent', id: string, name: string, label: string, description?: string | null, icon?: string | null, modelId: string, prompt: string, isCustom: boolean, createdAt: string, updatedAt: string } }> }; export type FindManyAgentsQueryVariables = Exact<{ [key: string]: never; }>; @@ -4847,7 +4933,7 @@ export type UploadFileMutationVariables = Exact<{ }>; -export type UploadFileMutation = { __typename?: 'Mutation', uploadFile: { __typename?: 'SignedFileDTO', path: string, token: string } }; +export type UploadFileMutation = { __typename?: 'Mutation', uploadFile: { __typename?: 'SignedFile', path: string, token: string } }; export type UploadImageMutationVariables = Exact<{ file: Scalars['Upload']; @@ -4855,7 +4941,7 @@ export type UploadImageMutationVariables = Exact<{ }>; -export type UploadImageMutation = { __typename?: 'Mutation', uploadImage: { __typename?: 'SignedFileDTO', path: string, token: string } }; +export type UploadImageMutation = { __typename?: 'Mutation', uploadImage: { __typename?: 'SignedFile', path: string, token: string } }; export type AuthTokenFragmentFragment = { __typename?: 'AuthToken', token: string, expiresAt: string }; @@ -5063,9 +5149,9 @@ export type ValidatePasswordResetTokenQueryVariables = Exact<{ export type ValidatePasswordResetTokenQuery = { __typename?: 'Query', validatePasswordResetToken: { __typename?: 'ValidatePasswordResetToken', id: string, email: string } }; -export type BillingPriceLicensedFragmentFragment = { __typename?: 'BillingPriceLicensedDTO', stripePriceId: string, unitAmount: number, recurringInterval: SubscriptionInterval, priceUsageType: BillingUsageType }; +export type BillingPriceLicensedFragmentFragment = { __typename?: 'BillingPriceLicensed', stripePriceId: string, unitAmount: number, recurringInterval: SubscriptionInterval, priceUsageType: BillingUsageType }; -export type BillingPriceMeteredFragmentFragment = { __typename?: 'BillingPriceMeteredDTO', priceUsageType: BillingUsageType, recurringInterval: SubscriptionInterval, stripePriceId: string, tiers: Array<{ __typename?: 'BillingPriceTierDTO', flatAmount?: number | null, unitAmount?: number | null, upTo?: number | null }> }; +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 }> }; @@ -5133,7 +5219,7 @@ export type GetMeteredProductsUsageQuery = { __typename?: 'Query', getMeteredPro export type ListPlansQueryVariables = Exact<{ [key: string]: never; }>; -export type ListPlansQuery = { __typename?: 'Query', listPlans: Array<{ __typename?: 'BillingPlanOutput', planKey: BillingPlanKey, licensedProducts: Array<{ __typename?: 'BillingLicensedProduct', name: string, description: string, images?: Array | null, prices?: Array<{ __typename?: 'BillingPriceLicensedDTO', 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 | null, prices?: Array<{ __typename?: 'BillingPriceMeteredDTO', priceUsageType: BillingUsageType, recurringInterval: SubscriptionInterval, stripePriceId: string, tiers: Array<{ __typename?: 'BillingPriceTierDTO', flatAmount?: number | null, unitAmount?: number | null, upTo?: number | null }> }> | null, metadata: { __typename?: 'BillingProductMetadata', productKey: BillingProductKey, planKey: BillingPlanKey, priceUsageBased: BillingUsageType } }> }> }; +export type ListPlansQuery = { __typename?: 'Query', listPlans: Array<{ __typename?: 'BillingPlanOutput', planKey: BillingPlanKey, licensedProducts: Array<{ __typename?: 'BillingLicensedProduct', name: string, description: string, images?: Array | 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 | 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 RemoteServerFieldsFragment = { __typename?: 'RemoteServer', id: string, createdAt: string, foreignDataWrapperId: string, foreignDataWrapperOptions?: any | null, foreignDataWrapperType: string, updatedAt: string, schema?: string | null, label: string, userMappingOptions?: { __typename?: 'UserMappingOptionsUser', user?: string | null } | null }; @@ -5357,6 +5443,22 @@ export type GetVersionInfoQueryVariables = Exact<{ [key: string]: never; }>; export type GetVersionInfoQuery = { __typename?: 'Query', versionInfo: { __typename?: 'VersionInfo', currentVersion?: string | null, latestVersion: string } }; +export type DeleteJobsMutationVariables = Exact<{ + queueName: Scalars['String']; + jobIds: Array | Scalars['String']; +}>; + + +export type DeleteJobsMutation = { __typename?: 'Mutation', deleteJobs: { __typename?: 'DeleteJobsResponse', deletedCount: number, results: Array<{ __typename?: 'JobOperationResult', jobId: string, success: boolean, error?: string | null }> } }; + +export type RetryJobsMutationVariables = Exact<{ + queueName: Scalars['String']; + jobIds: Array | Scalars['String']; +}>; + + +export type RetryJobsMutation = { __typename?: 'Mutation', retryJobs: { __typename?: 'RetryJobsResponse', retriedCount: number, results: Array<{ __typename?: 'JobOperationResult', jobId: string, success: boolean, error?: string | null }> } }; + export type GetIndicatorHealthStatusQueryVariables = Exact<{ indicatorId: HealthIndicatorId; }>; @@ -5364,6 +5466,16 @@ export type GetIndicatorHealthStatusQueryVariables = Exact<{ export type GetIndicatorHealthStatusQuery = { __typename?: 'Query', getIndicatorHealthStatus: { __typename?: 'AdminPanelHealthServiceData', id: HealthIndicatorId, label: string, description: string, status: AdminPanelHealthServiceStatus, errorMessage?: string | null, details?: string | null, queues?: Array<{ __typename?: 'AdminPanelWorkerQueueHealth', id: string, queueName: string, status: AdminPanelHealthServiceStatus }> | null } }; +export type GetQueueJobsQueryVariables = Exact<{ + queueName: Scalars['String']; + state: JobState; + limit?: InputMaybe; + offset?: InputMaybe; +}>; + + +export type GetQueueJobsQuery = { __typename?: 'Query', getQueueJobs: { __typename?: 'QueueJobsResponse', count: number, totalCount: number, hasMore: boolean, jobs: Array<{ __typename?: 'QueueJob', id: string, name: string, data?: any | null, state: JobState, timestamp?: number | null, failedReason?: string | null, processedOn?: number | null, finishedOn?: number | null, attemptsMade: number, returnValue?: any | null, logs?: Array | null, stackTrace?: Array | null }>, retentionConfig: { __typename?: 'QueueRetentionConfig', completedMaxAge: number, completedMaxCount: number, failedMaxAge: number, failedMaxCount: number } } }; + export type GetQueueMetricsQueryVariables = Exact<{ queueName: Scalars['String']; timeRange?: InputMaybe; @@ -5727,7 +5839,7 @@ export type UploadProfilePictureMutationVariables = Exact<{ }>; -export type UploadProfilePictureMutation = { __typename?: 'Mutation', uploadProfilePicture: { __typename?: 'SignedFileDTO', path: string, token: string } }; +export type UploadProfilePictureMutation = { __typename?: 'Mutation', uploadProfilePicture: { __typename?: 'SignedFile', path: string, token: string } }; export type GetCurrentUserQueryVariables = Exact<{ [key: string]: never; }>; @@ -6162,7 +6274,7 @@ export type UploadWorkspaceLogoMutationVariables = Exact<{ }>; -export type UploadWorkspaceLogoMutation = { __typename?: 'Mutation', uploadWorkspaceLogo: { __typename?: 'SignedFileDTO', path: string, token: string } }; +export type UploadWorkspaceLogoMutation = { __typename?: 'Mutation', uploadWorkspaceLogo: { __typename?: 'SignedFile', path: string, token: string } }; export type CheckCustomDomainValidRecordsMutationVariables = Exact<{ [key: string]: never; }>; @@ -6386,7 +6498,7 @@ export const AvailableSsoIdentityProvidersFragmentFragmentDoc = gql` } `; export const BillingPriceLicensedFragmentFragmentDoc = gql` - fragment BillingPriceLicensedFragment on BillingPriceLicensedDTO { + fragment BillingPriceLicensedFragment on BillingPriceLicensed { stripePriceId unitAmount recurringInterval @@ -6394,7 +6506,7 @@ export const BillingPriceLicensedFragmentFragmentDoc = gql` } `; export const BillingPriceMeteredFragmentFragmentDoc = gql` - fragment BillingPriceMeteredFragment on BillingPriceMeteredDTO { + fragment BillingPriceMeteredFragment on BillingPriceMetered { priceUsageType recurringInterval stripePriceId @@ -10183,6 +10295,84 @@ export function useGetVersionInfoLazyQuery(baseOptions?: Apollo.LazyQueryHookOpt export type GetVersionInfoQueryHookResult = ReturnType; export type GetVersionInfoLazyQueryHookResult = ReturnType; export type GetVersionInfoQueryResult = Apollo.QueryResult; +export const DeleteJobsDocument = gql` + mutation DeleteJobs($queueName: String!, $jobIds: [String!]!) { + deleteJobs(queueName: $queueName, jobIds: $jobIds) { + deletedCount + results { + jobId + success + error + } + } +} + `; +export type DeleteJobsMutationFn = Apollo.MutationFunction; + +/** + * __useDeleteJobsMutation__ + * + * To run a mutation, you first call `useDeleteJobsMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useDeleteJobsMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [deleteJobsMutation, { data, loading, error }] = useDeleteJobsMutation({ + * variables: { + * queueName: // value for 'queueName' + * jobIds: // value for 'jobIds' + * }, + * }); + */ +export function useDeleteJobsMutation(baseOptions?: Apollo.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation(DeleteJobsDocument, options); + } +export type DeleteJobsMutationHookResult = ReturnType; +export type DeleteJobsMutationResult = Apollo.MutationResult; +export type DeleteJobsMutationOptions = Apollo.BaseMutationOptions; +export const RetryJobsDocument = gql` + mutation RetryJobs($queueName: String!, $jobIds: [String!]!) { + retryJobs(queueName: $queueName, jobIds: $jobIds) { + retriedCount + results { + jobId + success + error + } + } +} + `; +export type RetryJobsMutationFn = Apollo.MutationFunction; + +/** + * __useRetryJobsMutation__ + * + * To run a mutation, you first call `useRetryJobsMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useRetryJobsMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [retryJobsMutation, { data, loading, error }] = useRetryJobsMutation({ + * variables: { + * queueName: // value for 'queueName' + * jobIds: // value for 'jobIds' + * }, + * }); + */ +export function useRetryJobsMutation(baseOptions?: Apollo.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation(RetryJobsDocument, options); + } +export type RetryJobsMutationHookResult = ReturnType; +export type RetryJobsMutationResult = Apollo.MutationResult; +export type RetryJobsMutationOptions = Apollo.BaseMutationOptions; export const GetIndicatorHealthStatusDocument = gql` query GetIndicatorHealthStatus($indicatorId: HealthIndicatorId!) { getIndicatorHealthStatus(indicatorId: $indicatorId) { @@ -10228,6 +10418,71 @@ export function useGetIndicatorHealthStatusLazyQuery(baseOptions?: Apollo.LazyQu export type GetIndicatorHealthStatusQueryHookResult = ReturnType; export type GetIndicatorHealthStatusLazyQueryHookResult = ReturnType; export type GetIndicatorHealthStatusQueryResult = Apollo.QueryResult; +export const GetQueueJobsDocument = gql` + query GetQueueJobs($queueName: String!, $state: JobState!, $limit: Int, $offset: Int) { + getQueueJobs( + queueName: $queueName + state: $state + limit: $limit + offset: $offset + ) { + jobs { + id + name + data + state + timestamp + failedReason + processedOn + finishedOn + attemptsMade + returnValue + logs + stackTrace + } + count + totalCount + hasMore + retentionConfig { + completedMaxAge + completedMaxCount + failedMaxAge + failedMaxCount + } + } +} + `; + +/** + * __useGetQueueJobsQuery__ + * + * To run a query within a React component, call `useGetQueueJobsQuery` and pass it any options that fit your needs. + * When your component renders, `useGetQueueJobsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useGetQueueJobsQuery({ + * variables: { + * queueName: // value for 'queueName' + * state: // value for 'state' + * limit: // value for 'limit' + * offset: // value for 'offset' + * }, + * }); + */ +export function useGetQueueJobsQuery(baseOptions: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(GetQueueJobsDocument, options); + } +export function useGetQueueJobsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(GetQueueJobsDocument, options); + } +export type GetQueueJobsQueryHookResult = ReturnType; +export type GetQueueJobsLazyQueryHookResult = ReturnType; +export type GetQueueJobsQueryResult = Apollo.QueryResult; export const GetQueueMetricsDocument = gql` query GetQueueMetrics($queueName: String!, $timeRange: QueueMetricsTimeRange) { getQueueMetrics(queueName: $queueName, timeRange: $timeRange) { diff --git a/packages/twenty-front/src/generated/graphql.ts b/packages/twenty-front/src/generated/graphql.ts index 6e0a4a84d20..0cd5591a018 100644 --- a/packages/twenty-front/src/generated/graphql.ts +++ b/packages/twenty-front/src/generated/graphql.ts @@ -115,8 +115,8 @@ export type AgentChatThread = { updatedAt: Scalars['DateTime']; }; -export type AgentHandoffDto = { - __typename?: 'AgentHandoffDTO'; +export type AgentHandoff = { + __typename?: 'AgentHandoff'; description?: Maybe; id: Scalars['UUID']; toAgent: Agent; @@ -261,8 +261,8 @@ export type AuthorizeApp = { redirectUrl: Scalars['String']; }; -export type AutocompleteResultDto = { - __typename?: 'AutocompleteResultDto'; +export type AutocompleteResult = { + __typename?: 'AutocompleteResult'; placeId: Scalars['String']; text: Scalars['String']; }; @@ -331,7 +331,7 @@ export type Billing = { __typename?: 'Billing'; billingUrl?: Maybe; isBillingEnabled: Scalars['Boolean']; - trialPeriods: Array; + trialPeriods: Array; }; export type BillingEndTrialPeriodOutput = { @@ -348,7 +348,7 @@ export type BillingLicensedProduct = BillingProductDto & { images?: Maybe>; metadata: BillingProductMetadata; name: Scalars['String']; - prices?: Maybe>; + prices?: Maybe>; }; export type BillingMeteredProduct = BillingProductDto & { @@ -357,7 +357,7 @@ export type BillingMeteredProduct = BillingProductDto & { images?: Maybe>; metadata: BillingProductMetadata; name: Scalars['String']; - prices?: Maybe>; + prices?: Maybe>; }; export type BillingMeteredProductUsageOutput = { @@ -383,24 +383,24 @@ export type BillingPlanOutput = { planKey: BillingPlanKey; }; -export type BillingPriceLicensedDto = { - __typename?: 'BillingPriceLicensedDTO'; +export type BillingPriceLicensed = { + __typename?: 'BillingPriceLicensed'; priceUsageType: BillingUsageType; recurringInterval: SubscriptionInterval; stripePriceId: Scalars['String']; unitAmount: Scalars['Float']; }; -export type BillingPriceMeteredDto = { - __typename?: 'BillingPriceMeteredDTO'; +export type BillingPriceMetered = { + __typename?: 'BillingPriceMetered'; priceUsageType: BillingUsageType; recurringInterval: SubscriptionInterval; stripePriceId: Scalars['String']; - tiers: Array; + tiers: Array; }; -export type BillingPriceTierDto = { - __typename?: 'BillingPriceTierDTO'; +export type BillingPriceTier = { + __typename?: 'BillingPriceTier'; flatAmount?: Maybe; unitAmount?: Maybe; upTo?: Maybe; @@ -472,8 +472,8 @@ export type BillingSubscriptionSchedulePhaseItem = { quantity?: Maybe; }; -export type BillingTrialPeriodDto = { - __typename?: 'BillingTrialPeriodDTO'; +export type BillingTrialPeriod = { + __typename?: 'BillingTrialPeriod'; duration: Scalars['Float']; isCreditCardRequired: Scalars['Boolean']; }; @@ -568,27 +568,27 @@ export enum ConfigVariableType { } export enum ConfigVariablesGroup { - AnalyticsConfig = 'AnalyticsConfig', - AwsSesSettings = 'AwsSesSettings', - BillingConfig = 'BillingConfig', - CaptchaConfig = 'CaptchaConfig', - CloudflareConfig = 'CloudflareConfig', - EmailSettings = 'EmailSettings', - ExceptionHandler = 'ExceptionHandler', - GoogleAuth = 'GoogleAuth', + ANALYTICS_CONFIG = 'ANALYTICS_CONFIG', + AWS_SES_SETTINGS = 'AWS_SES_SETTINGS', + BILLING_CONFIG = 'BILLING_CONFIG', + CAPTCHA_CONFIG = 'CAPTCHA_CONFIG', + CLOUDFLARE_CONFIG = 'CLOUDFLARE_CONFIG', + EMAIL_SETTINGS = 'EMAIL_SETTINGS', + EXCEPTION_HANDLER = 'EXCEPTION_HANDLER', + GOOGLE_AUTH = 'GOOGLE_AUTH', LLM = 'LLM', - Logging = 'Logging', - Metering = 'Metering', - MicrosoftAuth = 'MicrosoftAuth', - Other = 'Other', - RateLimiting = 'RateLimiting', + LOGGING = 'LOGGING', + METERING = 'METERING', + MICROSOFT_AUTH = 'MICROSOFT_AUTH', + OTHER = 'OTHER', + RATE_LIMITING = 'RATE_LIMITING', + SERVERLESS_CONFIG = 'SERVERLESS_CONFIG', + SERVER_CONFIG = 'SERVER_CONFIG', SSL = 'SSL', - ServerConfig = 'ServerConfig', - ServerlessConfig = 'ServerlessConfig', - StorageConfig = 'StorageConfig', - SupportChatConfig = 'SupportChatConfig', - TokensDuration = 'TokensDuration', - TwoFactorAuthentication = 'TwoFactorAuthentication' + STORAGE_CONFIG = 'STORAGE_CONFIG', + SUPPORT_CHAT_CONFIG = 'SUPPORT_CHAT_CONFIG', + TOKENS_DURATION = 'TOKENS_DURATION', + TWO_FACTOR_AUTHENTICATION = 'TWO_FACTOR_AUTHENTICATION' } export type ConfigVariablesGroupData = { @@ -1014,6 +1014,12 @@ export type DeleteApprovedAccessDomainInput = { id: Scalars['UUID']; }; +export type DeleteJobsResponse = { + __typename?: 'DeleteJobsResponse'; + deletedCount: Scalars['Int']; + results: Array; +}; + export type DeleteOneFieldInput = { /** The id of the field to delete. */ id: Scalars['UUID']; @@ -1601,6 +1607,24 @@ export type InvalidatePassword = { success: Scalars['Boolean']; }; +export type JobOperationResult = { + __typename?: 'JobOperationResult'; + error?: Maybe; + jobId: Scalars['String']; + success: Scalars['Boolean']; +}; + +/** Job state in the queue */ +export enum JobState { + ACTIVE = 'ACTIVE', + COMPLETED = 'COMPLETED', + DELAYED = 'DELAYED', + FAILED = 'FAILED', + PRIORITIZED = 'PRIORITIZED', + WAITING = 'WAITING', + WAITING_CHILDREN = 'WAITING_CHILDREN' +} + export type LineChartConfiguration = { __typename?: 'LineChartConfiguration'; aggregateFieldMetadataId: Scalars['UUID']; @@ -1635,8 +1659,8 @@ export type LinksMetadata = { secondaryLinks?: Maybe>; }; -export type LocationDto = { - __typename?: 'LocationDto'; +export type Location = { + __typename?: 'Location'; lat?: Maybe; lng?: Maybe; }; @@ -1721,6 +1745,7 @@ export type Mutation = { deleteDatabaseConfigVariable: Scalars['Boolean']; deleteEmailingDomain: Scalars['Boolean']; deleteFile: File; + deleteJobs: DeleteJobsResponse; deleteOneAgent: Agent; deleteOneCronTrigger: CronTrigger; deleteOneDatabaseEventTrigger: DatabaseEventTrigger; @@ -1776,6 +1801,7 @@ export type Mutation = { restorePageLayout: PageLayout; restorePageLayoutTab: PageLayoutTab; restorePageLayoutWidget: PageLayoutWidget; + retryJobs: RetryJobsResponse; revokeApiKey?: Maybe; runWorkflowVersion: WorkflowRun; saveImapSmtpCaldavAccount: ImapSmtpCaldavConnectionSuccess; @@ -1823,10 +1849,10 @@ export type Mutation = { updateWorkspace: Workspace; updateWorkspaceFeatureFlag: Scalars['Boolean']; updateWorkspaceMemberRole: WorkspaceMember; - uploadFile: SignedFileDto; - uploadImage: SignedFileDto; - uploadProfilePicture: SignedFileDto; - uploadWorkspaceLogo: SignedFileDto; + uploadFile: SignedFile; + uploadImage: SignedFile; + uploadProfilePicture: SignedFile; + uploadWorkspaceLogo: SignedFile; upsertFieldPermissions: Array; upsertObjectPermissions: Array; upsertPermissionFlags: Array; @@ -2110,6 +2136,12 @@ export type MutationDeleteFileArgs = { }; +export type MutationDeleteJobsArgs = { + jobIds: Array; + queueName: Scalars['String']; +}; + + export type MutationDeleteOneAgentArgs = { input: AgentIdInput; }; @@ -2374,6 +2406,12 @@ export type MutationRestorePageLayoutWidgetArgs = { }; +export type MutationRetryJobsArgs = { + jobIds: Array; + queueName: Scalars['String']; +}; + + export type MutationRevokeApiKeyArgs = { input: RevokeApiKeyDto; }; @@ -2818,8 +2856,8 @@ export type ObjectStandardOverrides = { translations?: Maybe; }; -export type OnDbEventDto = { - __typename?: 'OnDbEventDTO'; +export type OnDbEvent = { + __typename?: 'OnDbEvent'; action: DatabaseEventAction; eventDate: Scalars['DateTime']; objectNameSingular: Scalars['String']; @@ -2942,11 +2980,11 @@ export type PieChartConfiguration = { orderBy?: Maybe; }; -export type PlaceDetailsResultDto = { - __typename?: 'PlaceDetailsResultDto'; +export type PlaceDetailsResult = { + __typename?: 'PlaceDetailsResult'; city?: Maybe; country?: Maybe; - location?: Maybe; + location?: Maybe; postcode?: Maybe; state?: Maybe; }; @@ -3009,7 +3047,7 @@ export type Query = { field: Field; fields: FieldConnection; findAgentHandoffTargets: Array; - findAgentHandoffs: Array; + findAgentHandoffs: Array; findManyAgents: Array; findManyApplications: Array; findManyCronTriggers: Array; @@ -3025,9 +3063,9 @@ export type Query = { findOneServerlessFunction: ServerlessFunction; findWorkspaceFromInviteHash: Workspace; findWorkspaceInvitations: Array; - getAddressDetails: PlaceDetailsResultDto; + getAddressDetails: PlaceDetailsResult; getApprovedAccessDomains: Array; - getAutoCompleteAddress: Array; + getAutoCompleteAddress: Array; getAvailablePackages: Scalars['JSON']; getConfigVariablesGrouped: ConfigVariablesOutput; getConnectedImapSmtpCaldavAccount: ConnectedImapSmtpCaldavAccount; @@ -3055,6 +3093,7 @@ export type Query = { getPageLayouts: Array; getPostgresCredentials?: Maybe; getPublicWorkspaceDataByDomain: PublicWorkspaceDataOutput; + getQueueJobs: QueueJobsResponse; getQueueMetrics: QueueMetricsData; getRoles: Array; getSSOIdentityProviders: Array; @@ -3289,6 +3328,14 @@ export type QueryGetPublicWorkspaceDataByDomainArgs = { }; +export type QueryGetQueueJobsArgs = { + limit?: InputMaybe; + offset?: InputMaybe; + queueName: Scalars['String']; + state: JobState; +}; + + export type QueryGetQueueMetricsArgs = { queueName: Scalars['String']; timeRange?: InputMaybe; @@ -3361,6 +3408,31 @@ export type QueryWebhookArgs = { input: GetWebhookDto; }; +export type QueueJob = { + __typename?: 'QueueJob'; + attemptsMade: Scalars['Float']; + data?: Maybe; + failedReason?: Maybe; + finishedOn?: Maybe; + id: Scalars['String']; + logs?: Maybe>; + name: Scalars['String']; + processedOn?: Maybe; + returnValue?: Maybe; + stackTrace?: Maybe>; + state: JobState; + timestamp?: Maybe; +}; + +export type QueueJobsResponse = { + __typename?: 'QueueJobsResponse'; + count: Scalars['Float']; + hasMore: Scalars['Boolean']; + jobs: Array; + retentionConfig: QueueRetentionConfig; + totalCount: Scalars['Float']; +}; + export type QueueMetricsData = { __typename?: 'QueueMetricsData'; data: Array; @@ -3390,6 +3462,14 @@ export enum QueueMetricsTimeRange { TwelveHours = 'TwelveHours' } +export type QueueRetentionConfig = { + __typename?: 'QueueRetentionConfig'; + completedMaxAge: Scalars['Float']; + completedMaxCount: Scalars['Float']; + failedMaxAge: Scalars['Float']; + failedMaxCount: Scalars['Float']; +}; + export type Relation = { __typename?: 'Relation'; sourceFieldMetadata: Field; @@ -3443,6 +3523,12 @@ export type ResendEmailVerificationTokenOutput = { success: Scalars['Boolean']; }; +export type RetryJobsResponse = { + __typename?: 'RetryJobsResponse'; + results: Array; + retriedCount: Scalars['Int']; +}; + export type RevokeApiKeyDto = { id: Scalars['UUID']; }; @@ -3643,8 +3729,8 @@ export type SignUpOutput = { workspace: WorkspaceUrlsAndId; }; -export type SignedFileDto = { - __typename?: 'SignedFileDTO'; +export type SignedFile = { + __typename?: 'SignedFile'; path: Scalars['String']; token: Scalars['String']; }; @@ -3668,7 +3754,7 @@ export type SubmitFormStepInput = { export type Subscription = { __typename?: 'Subscription'; - onDbEvent: OnDbEventDto; + onDbEvent: OnDbEvent; }; @@ -4564,7 +4650,7 @@ export type OnDbEventSubscriptionVariables = Exact<{ }>; -export type OnDbEventSubscription = { __typename?: 'Subscription', onDbEvent: { __typename?: 'OnDbEventDTO', eventDate: string, action: DatabaseEventAction, objectNameSingular: string, updatedFields?: Array | null, record: any } }; +export type OnDbEventSubscription = { __typename?: 'Subscription', onDbEvent: { __typename?: 'OnDbEvent', eventDate: string, action: DatabaseEventAction, objectNameSingular: string, updatedFields?: Array | null, record: any } }; export type ViewFieldFragmentFragment = { __typename?: 'CoreViewField', id: any, fieldMetadataId: any, viewId: any, isVisible: boolean, position: number, size: number, aggregateOperation?: AggregateOperations | null, createdAt: string, updatedAt: string, deletedAt?: string | null }; diff --git a/packages/twenty-front/src/modules/app/components/SettingsRoutes.tsx b/packages/twenty-front/src/modules/app/components/SettingsRoutes.tsx index 76e6bfb8bd0..c6ed80bae26 100644 --- a/packages/twenty-front/src/modules/app/components/SettingsRoutes.tsx +++ b/packages/twenty-front/src/modules/app/components/SettingsRoutes.tsx @@ -350,6 +350,14 @@ const SettingsAdminIndicatorHealthStatus = lazy(() => })), ); +const SettingsAdminQueueDetail = lazy(() => + import('~/pages/settings/admin-panel/SettingsAdminQueueDetail').then( + (module) => ({ + default: module.SettingsAdminQueueDetail, + }), + ), +); + const SettingsAdminConfigVariableDetails = lazy(() => import( '~/pages/settings/admin-panel/SettingsAdminConfigVariableDetails' @@ -636,6 +644,10 @@ export const SettingsRoutes = ({ isAdminPageEnabled }: SettingsRoutesProps) => ( path={SettingsPath.AdminPanelIndicatorHealthStatus} element={} /> + } + /> { const { listPlans } = usePlans(); @@ -13,7 +13,7 @@ export const useAllBillingPrices = () => { ({ prices }) => prices, ); }) - .flat(2) as Array; + .flat(2) as Array; return { allBillingPrices }; }; diff --git a/packages/twenty-front/src/modules/billing/hooks/usePriceAndBillingUsageByPriceId.ts b/packages/twenty-front/src/modules/billing/hooks/usePriceAndBillingUsageByPriceId.ts index 3ec8b286d0f..90b64dfc191 100644 --- a/packages/twenty-front/src/modules/billing/hooks/usePriceAndBillingUsageByPriceId.ts +++ b/packages/twenty-front/src/modules/billing/hooks/usePriceAndBillingUsageByPriceId.ts @@ -1,9 +1,9 @@ +import { isDefined } from 'twenty-shared/utils'; import { - type BillingPriceLicensedDto, - type BillingPriceMeteredDto, + type BillingPriceLicensed, + type BillingPriceMetered, BillingUsageType, } from '~/generated/graphql'; -import { isDefined } from 'twenty-shared/utils'; import { useAllBillingPrices } from './useAllBillingPrices'; export const usePriceAndBillingUsageByPriceId = () => { @@ -13,18 +13,18 @@ export const usePriceAndBillingUsageByPriceId = () => { priceId: string, ): | { - price: BillingPriceLicensedDto; + price: BillingPriceLicensed; billingUsage: BillingUsageType.LICENSED; } | { - price: BillingPriceMeteredDto; + price: BillingPriceMetered; billingUsage: BillingUsageType.METERED; } => { const licensed = allBillingPrices.find( (p) => p.priceUsageType === BillingUsageType.LICENSED && p.stripePriceId === priceId, - ) as BillingPriceLicensedDto | undefined; + ) as BillingPriceLicensed | undefined; if (isDefined(licensed)) return { price: licensed, billingUsage: BillingUsageType.LICENSED }; @@ -33,7 +33,7 @@ export const usePriceAndBillingUsageByPriceId = () => { (p) => p.priceUsageType === BillingUsageType.METERED && p.stripePriceId === priceId, - ) as BillingPriceMeteredDto | undefined; + ) as BillingPriceMetered | undefined; if (isDefined(metered)) return { price: metered, billingUsage: BillingUsageType.METERED }; diff --git a/packages/twenty-front/src/modules/billing/hooks/useSplitPhaseItemsInPrices.ts b/packages/twenty-front/src/modules/billing/hooks/useSplitPhaseItemsInPrices.ts index fb466f2ad0f..f8ff7f1ef57 100644 --- a/packages/twenty-front/src/modules/billing/hooks/useSplitPhaseItemsInPrices.ts +++ b/packages/twenty-front/src/modules/billing/hooks/useSplitPhaseItemsInPrices.ts @@ -1,10 +1,10 @@ +import { useNextBillingPhase } from '@/billing/hooks/useNextBillingPhase'; +import { usePriceAndBillingUsageByPriceId } from '@/billing/hooks/usePriceAndBillingUsageByPriceId'; +import { type MeteredBillingPrice } from '@/billing/types/billing-price-tiers.type'; import { - type BillingPriceLicensedDto, + type BillingPriceLicensed, BillingUsageType, } from '~/generated/graphql'; -import { type MeteredBillingPrice } from '@/billing/types/billing-price-tiers.type'; -import { usePriceAndBillingUsageByPriceId } from '@/billing/hooks/usePriceAndBillingUsageByPriceId'; -import { useNextBillingPhase } from '@/billing/hooks/useNextBillingPhase'; export const useSplitPhaseItemsInPrices = () => { const { nextBillingPhase } = useNextBillingPhase(); @@ -26,7 +26,7 @@ export const useSplitPhaseItemsInPrices = () => { }, {} as { nextMereredPrice: MeteredBillingPrice | undefined; - nextLicensedPrice: BillingPriceLicensedDto | undefined; + nextLicensedPrice: BillingPriceLicensed | undefined; }, ); diff --git a/packages/twenty-front/src/modules/billing/types/billing-price-tiers.type.ts b/packages/twenty-front/src/modules/billing/types/billing-price-tiers.type.ts index 555bd56bfb1..64cbd7d0fbb 100644 --- a/packages/twenty-front/src/modules/billing/types/billing-price-tiers.type.ts +++ b/packages/twenty-front/src/modules/billing/types/billing-price-tiers.type.ts @@ -1,4 +1,4 @@ -import type { BillingPriceMeteredDto } from '~/generated/graphql'; +import type { BillingPriceMetered } from '~/generated/graphql'; export type BillingPriceTiers = [ { @@ -14,6 +14,6 @@ export type BillingPriceTiers = [ ]; // graphql does not support tuple so we need to create a new type -export type MeteredBillingPrice = Omit & { +export type MeteredBillingPrice = Omit & { tiers: BillingPriceTiers; }; diff --git a/packages/twenty-front/src/modules/favorites/components/PageFavoriteButton.tsx b/packages/twenty-front/src/modules/favorites/components/PageFavoriteButton.tsx index 24b5d862c59..ec6e2319f68 100644 --- a/packages/twenty-front/src/modules/favorites/components/PageFavoriteButton.tsx +++ b/packages/twenty-front/src/modules/favorites/components/PageFavoriteButton.tsx @@ -1,5 +1,6 @@ -import { Button } from 'twenty-ui/input'; +import { t } from '@lingui/core/macro'; import { IconHeart, IconHeartOff } from 'twenty-ui/display'; +import { Button } from 'twenty-ui/input'; type PageFavoriteButtonProps = { isFavorite: boolean; @@ -10,7 +11,7 @@ export const PageFavoriteButton = ({ isFavorite, onClick, }: PageFavoriteButtonProps) => { - const title = isFavorite ? 'Remove from favorites' : 'Add to favorites'; + const title = isFavorite ? t`Remove from favorites` : t`Add to favorites`; return (