From 09806d7d8cce71066f025b4160674288d6b5ecdc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Malfait?= Date: Mon, 13 Apr 2026 09:47:34 +0200 Subject: [PATCH] Add admin panel workspace detail page with chat viewer (#19579) ## Overview Adds comprehensive admin panel functionality for viewing workspace details and AI chat threads. ## Changes ### Frontend - **New Routes**: Added `AdminPanelWorkspaceDetail` and `AdminPanelWorkspaceChatThread` pages with lazy loading - **New Queries**: - `getAdminWorkspaceChatThreads` - fetch chat threads for a workspace - `getAdminChatThreadMessages` - fetch messages for a specific thread - `workspaceLookupAdminPanel` - lookup workspace info and users - **New Components**: - `SettingsAdminWorkspaceDetail` - displays workspace info and chat sessions tabs - `SettingsAdminWorkspaceChatThread` - renders chat conversation with message bubbles - **Navigation**: Updated AI admin panel to link to workspace detail pages - **Settings Paths**: Added `AdminPanelWorkspaceDetail` and `AdminPanelWorkspaceChatThread` paths ### Backend - **New DTOs**: - `AdminWorkspaceChatThreadDTO` - workspace chat thread data - `AdminChatThreadMessagesDTO` - thread with messages - `AdminChatMessageDTO` - individual message with parts - **New Resolvers**: Added three queries to `AdminPanelResolver` - **New Service Methods**: - `workspaceLookup()` - fetch workspace info - `getWorkspaceChatThreads()` - list chat threads - `getChatThreadMessages()` - fetch thread messages with validation - **Module Updates**: Added entity imports for workspace, user, AI chat, and feature flag data ### Security - Added `allowImpersonation` check before accessing chat data - Validates workspace ownership and access permissions --------- Co-authored-by: Claude Opus 4.6 --- .../src/metadata/generated/schema.graphql | 160 +- .../src/metadata/generated/schema.ts | 448 ++++-- .../src/metadata/generated/types.ts | 1341 +++++++++-------- .../src/generated-metadata/graphql.ts | 154 +- .../modules/app/components/SettingsRoutes.tsx | 36 + .../auth/hooks/useImpersonationSession.ts | 95 ++ .../InformationBannerIsImpersonating.tsx | 6 +- .../ai/components/SettingsAdminAI.tsx | 5 + .../SettingsAdminChatThreadMessageList.tsx | 127 ++ .../components/SettingsAdminGeneral.tsx | 298 ++-- .../SettingsAdminWorkspaceContent.tsx | 193 +-- .../graphql/fragments/userInfoFragment.ts | 11 + .../graphql/queries/adminPanelRecentUsers.ts | 15 + .../queries/adminPanelTopWorkspaces.ts | 12 + .../queries/getAdminChatThreadMessages.ts | 27 + .../queries/getAdminWorkspaceChatThreads.ts | 15 + .../userLookupAdminPanel.ts | 12 +- .../queries/workspaceLookupAdminPanel.ts | 37 + .../admin-panel/hooks/useFeatureFlagState.ts | 20 - .../admin-panel/hooks/useHandleImpersonate.ts | 57 + .../admin-panel/hooks/useImpersonationAuth.ts | 21 - .../hooks/useImpersonationRedirect.ts | 23 - .../states/userLookupResultState.ts | 8 - .../settings/admin-panel/types/FeatureFlag.ts | 6 - .../settings/admin-panel/types/UserLookup.ts | 11 - .../admin-panel/types/WorkspaceInfo.ts | 20 +- .../admin-panel/SettingsAdminUserDetail.tsx | 189 +++ .../SettingsAdminWorkspaceChatThread.tsx | 73 + .../SettingsAdminWorkspaceDetail.tsx | 343 +++++ .../members/SettingsWorkspaceMember.tsx | 6 +- .../__tests__/admin-panel.service.spec.ts | 184 ++- .../admin-panel/admin-panel.module.ts | 34 +- .../admin-panel/admin-panel.resolver.ts | 80 +- .../admin-panel/admin-panel.service.ts | 226 --- .../dtos/admin-chat-message-part.dto.ts | 13 + .../dtos/admin-chat-message.dto.ts | 23 + .../dtos/admin-chat-thread-messages.dto.ts | 13 + .../dtos/admin-panel-recent-user.dto.ts | 13 + .../dtos/admin-panel-top-workspace.dto.ts | 18 + .../dtos/admin-workspace-chat-thread.dto.ts | 27 + .../admin-panel/dtos/user-lookup.dto.ts | 13 +- .../enums/agent-message-role.enum.ts | 8 + .../services/admin-panel-chat.service.ts | 107 ++ .../services/admin-panel-config.service.ts | 91 ++ .../admin-panel-statistics.service.ts | 107 ++ .../admin-panel-user-lookup.service.ts | 189 +++ .../services/admin-panel-version.service.ts | 50 + .../ai/ai-chat/services/agent-chat.service.ts | 80 +- .../twenty-shared/src/types/SettingsPath.ts | 3 + 49 files changed, 3456 insertions(+), 1592 deletions(-) create mode 100644 packages/twenty-front/src/modules/auth/hooks/useImpersonationSession.ts create mode 100644 packages/twenty-front/src/modules/settings/admin-panel/components/SettingsAdminChatThreadMessageList.tsx create mode 100644 packages/twenty-front/src/modules/settings/admin-panel/graphql/fragments/userInfoFragment.ts create mode 100644 packages/twenty-front/src/modules/settings/admin-panel/graphql/queries/adminPanelRecentUsers.ts create mode 100644 packages/twenty-front/src/modules/settings/admin-panel/graphql/queries/adminPanelTopWorkspaces.ts create mode 100644 packages/twenty-front/src/modules/settings/admin-panel/graphql/queries/getAdminChatThreadMessages.ts create mode 100644 packages/twenty-front/src/modules/settings/admin-panel/graphql/queries/getAdminWorkspaceChatThreads.ts rename packages/twenty-front/src/modules/settings/admin-panel/graphql/{mutations => queries}/userLookupAdminPanel.ts (67%) create mode 100644 packages/twenty-front/src/modules/settings/admin-panel/graphql/queries/workspaceLookupAdminPanel.ts create mode 100644 packages/twenty-front/src/modules/settings/admin-panel/hooks/useHandleImpersonate.ts delete mode 100644 packages/twenty-front/src/modules/settings/admin-panel/hooks/useImpersonationAuth.ts delete mode 100644 packages/twenty-front/src/modules/settings/admin-panel/hooks/useImpersonationRedirect.ts delete mode 100644 packages/twenty-front/src/modules/settings/admin-panel/states/userLookupResultState.ts delete mode 100644 packages/twenty-front/src/modules/settings/admin-panel/types/FeatureFlag.ts delete mode 100644 packages/twenty-front/src/modules/settings/admin-panel/types/UserLookup.ts create mode 100644 packages/twenty-front/src/pages/settings/admin-panel/SettingsAdminUserDetail.tsx create mode 100644 packages/twenty-front/src/pages/settings/admin-panel/SettingsAdminWorkspaceChatThread.tsx create mode 100644 packages/twenty-front/src/pages/settings/admin-panel/SettingsAdminWorkspaceDetail.tsx delete mode 100644 packages/twenty-server/src/engine/core-modules/admin-panel/admin-panel.service.ts create mode 100644 packages/twenty-server/src/engine/core-modules/admin-panel/dtos/admin-chat-message-part.dto.ts create mode 100644 packages/twenty-server/src/engine/core-modules/admin-panel/dtos/admin-chat-message.dto.ts create mode 100644 packages/twenty-server/src/engine/core-modules/admin-panel/dtos/admin-chat-thread-messages.dto.ts create mode 100644 packages/twenty-server/src/engine/core-modules/admin-panel/dtos/admin-panel-recent-user.dto.ts create mode 100644 packages/twenty-server/src/engine/core-modules/admin-panel/dtos/admin-panel-top-workspace.dto.ts create mode 100644 packages/twenty-server/src/engine/core-modules/admin-panel/dtos/admin-workspace-chat-thread.dto.ts create mode 100644 packages/twenty-server/src/engine/core-modules/admin-panel/enums/agent-message-role.enum.ts create mode 100644 packages/twenty-server/src/engine/core-modules/admin-panel/services/admin-panel-chat.service.ts create mode 100644 packages/twenty-server/src/engine/core-modules/admin-panel/services/admin-panel-config.service.ts create mode 100644 packages/twenty-server/src/engine/core-modules/admin-panel/services/admin-panel-statistics.service.ts create mode 100644 packages/twenty-server/src/engine/core-modules/admin-panel/services/admin-panel-user-lookup.service.ts create mode 100644 packages/twenty-server/src/engine/core-modules/admin-panel/services/admin-panel-version.service.ts diff --git a/packages/twenty-client-sdk/src/metadata/generated/schema.graphql b/packages/twenty-client-sdk/src/metadata/generated/schema.graphql index 6a05e4f169..0dd22ae576 100644 --- a/packages/twenty-client-sdk/src/metadata/generated/schema.graphql +++ b/packages/twenty-client-sdk/src/metadata/generated/schema.graphql @@ -1573,9 +1573,27 @@ enum LogicFunctionExecutionStatus { ERROR } -type BillingTrialPeriod { - duration: Float! - isCreditCardRequired: Boolean! +type FeatureFlag { + key: FeatureFlagKey! + value: Boolean! +} + +enum FeatureFlagKey { + IS_UNIQUE_INDEXES_ENABLED + IS_JSON_FILTER_ENABLED + IS_AI_ENABLED + IS_COMMAND_MENU_ITEM_ENABLED + IS_MARKETPLACE_SETTING_TAB_VISIBLE + IS_RECORD_PAGE_LAYOUT_EDITING_ENABLED + IS_PUBLIC_DOMAIN_ENABLED + IS_EMAILING_DOMAIN_ENABLED + IS_JUNCTION_RELATIONS_ENABLED + IS_DRAFT_EMAIL_ENABLED + IS_CONNECTED_ACCOUNT_MIGRATED + IS_RICH_TEXT_V1_MIGRATED + IS_RECORD_PAGE_LAYOUT_GLOBAL_EDITION_ENABLED + IS_RECORD_TABLE_WIDGET_ENABLED + IS_DATASOURCE_MIGRATED } type WorkspaceUrls { @@ -1583,6 +1601,89 @@ type WorkspaceUrls { subdomainUrl: String! } +type UserInfo { + id: UUID! + email: String! + firstName: String + lastName: String + createdAt: DateTime! +} + +type WorkspaceInfo { + id: UUID! + name: String! + allowImpersonation: Boolean! + logo: String + totalUsers: Float! + activationStatus: WorkspaceActivationStatus! + createdAt: DateTime! + workspaceUrls: WorkspaceUrls! + users: [UserInfo!]! + featureFlags: [FeatureFlag!]! +} + +type UserLookup { + user: UserInfo! + workspaces: [WorkspaceInfo!]! +} + +type AdminPanelRecentUser { + id: UUID! + email: String! + firstName: String + lastName: String + createdAt: DateTime! + workspaceName: String + workspaceId: UUID +} + +type AdminPanelTopWorkspace { + id: UUID! + name: String! + totalUsers: Int! + subdomain: String! +} + +type AdminWorkspaceChatThread { + id: UUID! + title: String + totalInputTokens: Int! + totalOutputTokens: Int! + conversationSize: Int! + createdAt: DateTime! + updatedAt: DateTime! +} + +type AdminChatMessagePart { + type: String! + textContent: String + toolName: String +} + +type AdminChatMessage { + id: UUID! + role: AgentMessageRole! + parts: [AdminChatMessagePart!]! + createdAt: DateTime! +} + +"""Role of a message in a chat thread""" +enum AgentMessageRole { + SYSTEM + USER + ASSISTANT +} + +type AdminChatThreadMessages { + thread: AdminWorkspaceChatThread! + messages: [AdminChatMessage!]! +} + +type BillingTrialPeriod { + duration: Float! + isCreditCardRequired: Boolean! +} + type SSOIdentityProvider { id: UUID! name: String! @@ -1729,24 +1830,6 @@ type PublicFeatureFlag { metadata: PublicFeatureFlagMetadata! } -enum FeatureFlagKey { - IS_UNIQUE_INDEXES_ENABLED - IS_JSON_FILTER_ENABLED - IS_AI_ENABLED - IS_COMMAND_MENU_ITEM_ENABLED - IS_MARKETPLACE_SETTING_TAB_VISIBLE - IS_RECORD_PAGE_LAYOUT_EDITING_ENABLED - IS_PUBLIC_DOMAIN_ENABLED - IS_EMAILING_DOMAIN_ENABLED - IS_JUNCTION_RELATIONS_ENABLED - IS_DRAFT_EMAIL_ENABLED - IS_CONNECTED_ACCOUNT_MIGRATED - IS_RICH_TEXT_V1_MIGRATED - IS_RECORD_PAGE_LAYOUT_GLOBAL_EDITION_ENABLED - IS_RECORD_TABLE_WIDGET_ENABLED - IS_DATASOURCE_MIGRATED -} - type ClientConfigMaintenanceMode { startAt: DateTime! endAt: DateTime! @@ -1930,34 +2013,6 @@ type SystemHealth { services: [SystemHealthService!]! } -type FeatureFlag { - key: FeatureFlagKey! - value: Boolean! -} - -type UserInfo { - id: UUID! - email: String! - firstName: String - lastName: String -} - -type WorkspaceInfo { - id: UUID! - name: String! - allowImpersonation: Boolean! - logo: String - totalUsers: Float! - workspaceUrls: WorkspaceUrls! - users: [UserInfo!]! - featureFlags: [FeatureFlag!]! -} - -type UserLookup { - user: UserInfo! - workspaces: [WorkspaceInfo!]! -} - type VersionInfo { currentVersion: String latestVersion: String! @@ -3285,6 +3340,9 @@ type Query { getConnectedImapSmtpCaldavAccount(id: UUID!): ConnectedImapSmtpCaldavAccount! getAutoCompleteAddress(address: String!, token: String!, country: String, isFieldCity: Boolean): [AutocompleteResult!]! getAddressDetails(placeId: String!, token: String!): PlaceDetailsResult! + userLookupAdminPanel(userIdentifier: String!): UserLookup! + adminPanelRecentUsers(searchTerm: String = ""): [AdminPanelRecentUser!]! + adminPanelTopWorkspaces(searchTerm: String = ""): [AdminPanelTopWorkspace!]! getConfigVariablesGrouped: ConfigVariables! getSystemHealthStatus: SystemHealth! getIndicatorHealthStatus(indicatorId: HealthIndicatorId!): AdminPanelHealthServiceData! @@ -3299,6 +3357,9 @@ type Query { getModelsDevSuggestions(providerType: String!): [ModelsDevModelSuggestion!]! getAdminAiUsageByWorkspace(periodStart: DateTime, periodEnd: DateTime): [UsageBreakdownItem!]! getMaintenanceMode: MaintenanceMode + workspaceLookupAdminPanel(workspaceId: UUID!): UserLookup! + getAdminWorkspaceChatThreads(workspaceId: UUID!): [AdminWorkspaceChatThread!]! + getAdminChatThreadMessages(threadId: UUID!): AdminChatThreadMessages! getUsageAnalytics(input: UsageAnalyticsInput): UsageAnalytics! getPostgresCredentials: PostgresCredentials findManyPublicDomains: [PublicDomain!]! @@ -3611,7 +3672,6 @@ type Mutation { startChannelSync(connectedAccountId: UUID!): ChannelSyncSuccess! saveImapSmtpCaldavAccount(accountOwnerId: UUID!, handle: String!, connectionParameters: EmailAccountConnectionParameters!, id: UUID): ImapSmtpCaldavConnectionSuccess! updateLabPublicFeatureFlag(input: UpdateLabPublicFeatureFlagInput!): FeatureFlag! - userLookupAdminPanel(userIdentifier: String!): UserLookup! updateWorkspaceFeatureFlag(workspaceId: UUID!, featureFlag: String!, value: Boolean!): Boolean! setAdminAiModelEnabled(modelId: String!, enabled: Boolean!): Boolean! setAdminAiModelsEnabled(modelIds: [String!]!, enabled: Boolean!): Boolean! diff --git a/packages/twenty-client-sdk/src/metadata/generated/schema.ts b/packages/twenty-client-sdk/src/metadata/generated/schema.ts index b99a7eb632..407f11718c 100644 --- a/packages/twenty-client-sdk/src/metadata/generated/schema.ts +++ b/packages/twenty-client-sdk/src/metadata/generated/schema.ts @@ -1283,18 +1283,110 @@ export interface LogicFunctionExecutionResult { /** Status of the logic function execution */ export type LogicFunctionExecutionStatus = 'IDLE' | 'SUCCESS' | 'ERROR' -export interface BillingTrialPeriod { - duration: Scalars['Float'] - isCreditCardRequired: Scalars['Boolean'] - __typename: 'BillingTrialPeriod' +export interface FeatureFlag { + key: FeatureFlagKey + value: Scalars['Boolean'] + __typename: 'FeatureFlag' } +export type FeatureFlagKey = 'IS_UNIQUE_INDEXES_ENABLED' | 'IS_JSON_FILTER_ENABLED' | 'IS_AI_ENABLED' | 'IS_COMMAND_MENU_ITEM_ENABLED' | 'IS_MARKETPLACE_SETTING_TAB_VISIBLE' | 'IS_RECORD_PAGE_LAYOUT_EDITING_ENABLED' | 'IS_PUBLIC_DOMAIN_ENABLED' | 'IS_EMAILING_DOMAIN_ENABLED' | 'IS_JUNCTION_RELATIONS_ENABLED' | 'IS_DRAFT_EMAIL_ENABLED' | 'IS_CONNECTED_ACCOUNT_MIGRATED' | 'IS_RICH_TEXT_V1_MIGRATED' | 'IS_RECORD_PAGE_LAYOUT_GLOBAL_EDITION_ENABLED' | 'IS_RECORD_TABLE_WIDGET_ENABLED' | 'IS_DATASOURCE_MIGRATED' + export interface WorkspaceUrls { customUrl?: Scalars['String'] subdomainUrl: Scalars['String'] __typename: 'WorkspaceUrls' } +export interface UserInfo { + id: Scalars['UUID'] + email: Scalars['String'] + firstName?: Scalars['String'] + lastName?: Scalars['String'] + createdAt: Scalars['DateTime'] + __typename: 'UserInfo' +} + +export interface WorkspaceInfo { + id: Scalars['UUID'] + name: Scalars['String'] + allowImpersonation: Scalars['Boolean'] + logo?: Scalars['String'] + totalUsers: Scalars['Float'] + activationStatus: WorkspaceActivationStatus + createdAt: Scalars['DateTime'] + workspaceUrls: WorkspaceUrls + users: UserInfo[] + featureFlags: FeatureFlag[] + __typename: 'WorkspaceInfo' +} + +export interface UserLookup { + user: UserInfo + workspaces: WorkspaceInfo[] + __typename: 'UserLookup' +} + +export interface AdminPanelRecentUser { + id: Scalars['UUID'] + email: Scalars['String'] + firstName?: Scalars['String'] + lastName?: Scalars['String'] + createdAt: Scalars['DateTime'] + workspaceName?: Scalars['String'] + workspaceId?: Scalars['UUID'] + __typename: 'AdminPanelRecentUser' +} + +export interface AdminPanelTopWorkspace { + id: Scalars['UUID'] + name: Scalars['String'] + totalUsers: Scalars['Int'] + subdomain: Scalars['String'] + __typename: 'AdminPanelTopWorkspace' +} + +export interface AdminWorkspaceChatThread { + id: Scalars['UUID'] + title?: Scalars['String'] + totalInputTokens: Scalars['Int'] + totalOutputTokens: Scalars['Int'] + conversationSize: Scalars['Int'] + createdAt: Scalars['DateTime'] + updatedAt: Scalars['DateTime'] + __typename: 'AdminWorkspaceChatThread' +} + +export interface AdminChatMessagePart { + type: Scalars['String'] + textContent?: Scalars['String'] + toolName?: Scalars['String'] + __typename: 'AdminChatMessagePart' +} + +export interface AdminChatMessage { + id: Scalars['UUID'] + role: AgentMessageRole + parts: AdminChatMessagePart[] + createdAt: Scalars['DateTime'] + __typename: 'AdminChatMessage' +} + + +/** Role of a message in a chat thread */ +export type AgentMessageRole = 'SYSTEM' | 'USER' | 'ASSISTANT' + +export interface AdminChatThreadMessages { + thread: AdminWorkspaceChatThread + messages: AdminChatMessage[] + __typename: 'AdminChatThreadMessages' +} + +export interface BillingTrialPeriod { + duration: Scalars['Float'] + isCreditCardRequired: Scalars['Boolean'] + __typename: 'BillingTrialPeriod' +} + export interface SSOIdentityProvider { id: Scalars['UUID'] name: Scalars['String'] @@ -1437,8 +1529,6 @@ export interface PublicFeatureFlag { __typename: 'PublicFeatureFlag' } -export type FeatureFlagKey = 'IS_UNIQUE_INDEXES_ENABLED' | 'IS_JSON_FILTER_ENABLED' | 'IS_AI_ENABLED' | 'IS_COMMAND_MENU_ITEM_ENABLED' | 'IS_MARKETPLACE_SETTING_TAB_VISIBLE' | 'IS_RECORD_PAGE_LAYOUT_EDITING_ENABLED' | 'IS_PUBLIC_DOMAIN_ENABLED' | 'IS_EMAILING_DOMAIN_ENABLED' | 'IS_JUNCTION_RELATIONS_ENABLED' | 'IS_DRAFT_EMAIL_ENABLED' | 'IS_CONNECTED_ACCOUNT_MIGRATED' | 'IS_RICH_TEXT_V1_MIGRATED' | 'IS_RECORD_PAGE_LAYOUT_GLOBAL_EDITION_ENABLED' | 'IS_RECORD_TABLE_WIDGET_ENABLED' | 'IS_DATASOURCE_MIGRATED' - export interface ClientConfigMaintenanceMode { startAt: Scalars['DateTime'] endAt: Scalars['DateTime'] @@ -1589,38 +1679,6 @@ export interface SystemHealth { __typename: 'SystemHealth' } -export interface FeatureFlag { - key: FeatureFlagKey - value: Scalars['Boolean'] - __typename: 'FeatureFlag' -} - -export interface UserInfo { - id: Scalars['UUID'] - email: Scalars['String'] - firstName?: Scalars['String'] - lastName?: Scalars['String'] - __typename: 'UserInfo' -} - -export interface WorkspaceInfo { - id: Scalars['UUID'] - name: Scalars['String'] - allowImpersonation: Scalars['Boolean'] - logo?: Scalars['String'] - totalUsers: Scalars['Float'] - workspaceUrls: WorkspaceUrls - users: UserInfo[] - featureFlags: FeatureFlag[] - __typename: 'WorkspaceInfo' -} - -export interface UserLookup { - user: UserInfo - workspaces: WorkspaceInfo[] - __typename: 'UserLookup' -} - export interface VersionInfo { currentVersion?: Scalars['String'] latestVersion: Scalars['String'] @@ -2846,6 +2904,9 @@ export interface Query { getConnectedImapSmtpCaldavAccount: ConnectedImapSmtpCaldavAccount getAutoCompleteAddress: AutocompleteResult[] getAddressDetails: PlaceDetailsResult + userLookupAdminPanel: UserLookup + adminPanelRecentUsers: AdminPanelRecentUser[] + adminPanelTopWorkspaces: AdminPanelTopWorkspace[] getConfigVariablesGrouped: ConfigVariables getSystemHealthStatus: SystemHealth getIndicatorHealthStatus: AdminPanelHealthServiceData @@ -2860,6 +2921,9 @@ export interface Query { getModelsDevSuggestions: ModelsDevModelSuggestion[] getAdminAiUsageByWorkspace: UsageBreakdownItem[] getMaintenanceMode?: MaintenanceMode + workspaceLookupAdminPanel: UserLookup + getAdminWorkspaceChatThreads: AdminWorkspaceChatThread[] + getAdminChatThreadMessages: AdminChatThreadMessages getUsageAnalytics: UsageAnalytics getPostgresCredentials?: PostgresCredentials findManyPublicDomains: PublicDomain[] @@ -3065,7 +3129,6 @@ export interface Mutation { startChannelSync: ChannelSyncSuccess saveImapSmtpCaldavAccount: ImapSmtpCaldavConnectionSuccess updateLabPublicFeatureFlag: FeatureFlag - userLookupAdminPanel: UserLookup updateWorkspaceFeatureFlag: Scalars['Boolean'] setAdminAiModelEnabled: Scalars['Boolean'] setAdminAiModelsEnabled: Scalars['Boolean'] @@ -4456,9 +4519,9 @@ export interface LogicFunctionExecutionResultGenqlSelection{ __scalar?: boolean | number } -export interface BillingTrialPeriodGenqlSelection{ - duration?: boolean | number - isCreditCardRequired?: boolean | number +export interface FeatureFlagGenqlSelection{ + key?: boolean | number + value?: boolean | number __typename?: boolean | number __scalar?: boolean | number } @@ -4470,6 +4533,102 @@ export interface WorkspaceUrlsGenqlSelection{ __scalar?: boolean | number } +export interface UserInfoGenqlSelection{ + id?: boolean | number + email?: boolean | number + firstName?: boolean | number + lastName?: boolean | number + createdAt?: boolean | number + __typename?: boolean | number + __scalar?: boolean | number +} + +export interface WorkspaceInfoGenqlSelection{ + id?: boolean | number + name?: boolean | number + allowImpersonation?: boolean | number + logo?: boolean | number + totalUsers?: boolean | number + activationStatus?: boolean | number + createdAt?: boolean | number + workspaceUrls?: WorkspaceUrlsGenqlSelection + users?: UserInfoGenqlSelection + featureFlags?: FeatureFlagGenqlSelection + __typename?: boolean | number + __scalar?: boolean | number +} + +export interface UserLookupGenqlSelection{ + user?: UserInfoGenqlSelection + workspaces?: WorkspaceInfoGenqlSelection + __typename?: boolean | number + __scalar?: boolean | number +} + +export interface AdminPanelRecentUserGenqlSelection{ + id?: boolean | number + email?: boolean | number + firstName?: boolean | number + lastName?: boolean | number + createdAt?: boolean | number + workspaceName?: boolean | number + workspaceId?: boolean | number + __typename?: boolean | number + __scalar?: boolean | number +} + +export interface AdminPanelTopWorkspaceGenqlSelection{ + id?: boolean | number + name?: boolean | number + totalUsers?: boolean | number + subdomain?: boolean | number + __typename?: boolean | number + __scalar?: boolean | number +} + +export interface AdminWorkspaceChatThreadGenqlSelection{ + id?: boolean | number + title?: boolean | number + totalInputTokens?: boolean | number + totalOutputTokens?: boolean | number + conversationSize?: boolean | number + createdAt?: boolean | number + updatedAt?: boolean | number + __typename?: boolean | number + __scalar?: boolean | number +} + +export interface AdminChatMessagePartGenqlSelection{ + type?: boolean | number + textContent?: boolean | number + toolName?: boolean | number + __typename?: boolean | number + __scalar?: boolean | number +} + +export interface AdminChatMessageGenqlSelection{ + id?: boolean | number + role?: boolean | number + parts?: AdminChatMessagePartGenqlSelection + createdAt?: boolean | number + __typename?: boolean | number + __scalar?: boolean | number +} + +export interface AdminChatThreadMessagesGenqlSelection{ + thread?: AdminWorkspaceChatThreadGenqlSelection + messages?: AdminChatMessageGenqlSelection + __typename?: boolean | number + __scalar?: boolean | number +} + +export interface BillingTrialPeriodGenqlSelection{ + duration?: boolean | number + isCreditCardRequired?: boolean | number + __typename?: boolean | number + __scalar?: boolean | number +} + export interface SSOIdentityProviderGenqlSelection{ id?: boolean | number name?: boolean | number @@ -4767,42 +4926,6 @@ export interface SystemHealthGenqlSelection{ __scalar?: boolean | number } -export interface FeatureFlagGenqlSelection{ - key?: boolean | number - value?: boolean | number - __typename?: boolean | number - __scalar?: boolean | number -} - -export interface UserInfoGenqlSelection{ - id?: boolean | number - email?: boolean | number - firstName?: boolean | number - lastName?: boolean | number - __typename?: boolean | number - __scalar?: boolean | number -} - -export interface WorkspaceInfoGenqlSelection{ - id?: boolean | number - name?: boolean | number - allowImpersonation?: boolean | number - logo?: boolean | number - totalUsers?: boolean | number - workspaceUrls?: WorkspaceUrlsGenqlSelection - users?: UserInfoGenqlSelection - featureFlags?: FeatureFlagGenqlSelection - __typename?: boolean | number - __scalar?: boolean | number -} - -export interface UserLookupGenqlSelection{ - user?: UserInfoGenqlSelection - workspaces?: WorkspaceInfoGenqlSelection - __typename?: boolean | number - __scalar?: boolean | number -} - export interface VersionInfoGenqlSelection{ currentVersion?: boolean | number latestVersion?: boolean | number @@ -6142,6 +6265,9 @@ export interface QueryGenqlSelection{ getConnectedImapSmtpCaldavAccount?: (ConnectedImapSmtpCaldavAccountGenqlSelection & { __args: {id: Scalars['UUID']} }) getAutoCompleteAddress?: (AutocompleteResultGenqlSelection & { __args: {address: Scalars['String'], token: Scalars['String'], country?: (Scalars['String'] | null), isFieldCity?: (Scalars['Boolean'] | null)} }) getAddressDetails?: (PlaceDetailsResultGenqlSelection & { __args: {placeId: Scalars['String'], token: Scalars['String']} }) + userLookupAdminPanel?: (UserLookupGenqlSelection & { __args: {userIdentifier: Scalars['String']} }) + adminPanelRecentUsers?: (AdminPanelRecentUserGenqlSelection & { __args?: {searchTerm?: (Scalars['String'] | null)} }) + adminPanelTopWorkspaces?: (AdminPanelTopWorkspaceGenqlSelection & { __args?: {searchTerm?: (Scalars['String'] | null)} }) getConfigVariablesGrouped?: ConfigVariablesGenqlSelection getSystemHealthStatus?: SystemHealthGenqlSelection getIndicatorHealthStatus?: (AdminPanelHealthServiceDataGenqlSelection & { __args: {indicatorId: HealthIndicatorId} }) @@ -6156,6 +6282,9 @@ export interface QueryGenqlSelection{ getModelsDevSuggestions?: (ModelsDevModelSuggestionGenqlSelection & { __args: {providerType: Scalars['String']} }) getAdminAiUsageByWorkspace?: (UsageBreakdownItemGenqlSelection & { __args?: {periodStart?: (Scalars['DateTime'] | null), periodEnd?: (Scalars['DateTime'] | null)} }) getMaintenanceMode?: MaintenanceModeGenqlSelection + workspaceLookupAdminPanel?: (UserLookupGenqlSelection & { __args: {workspaceId: Scalars['UUID']} }) + getAdminWorkspaceChatThreads?: (AdminWorkspaceChatThreadGenqlSelection & { __args: {workspaceId: Scalars['UUID']} }) + getAdminChatThreadMessages?: (AdminChatThreadMessagesGenqlSelection & { __args: {threadId: Scalars['UUID']} }) getUsageAnalytics?: (UsageAnalyticsGenqlSelection & { __args?: {input?: (UsageAnalyticsInput | null)} }) getPostgresCredentials?: PostgresCredentialsGenqlSelection findManyPublicDomains?: PublicDomainGenqlSelection @@ -6380,7 +6509,6 @@ export interface MutationGenqlSelection{ startChannelSync?: (ChannelSyncSuccessGenqlSelection & { __args: {connectedAccountId: Scalars['UUID']} }) saveImapSmtpCaldavAccount?: (ImapSmtpCaldavConnectionSuccessGenqlSelection & { __args: {accountOwnerId: Scalars['UUID'], handle: Scalars['String'], connectionParameters: EmailAccountConnectionParameters, id?: (Scalars['UUID'] | null)} }) updateLabPublicFeatureFlag?: (FeatureFlagGenqlSelection & { __args: {input: UpdateLabPublicFeatureFlagInput} }) - userLookupAdminPanel?: (UserLookupGenqlSelection & { __args: {userIdentifier: Scalars['String']} }) updateWorkspaceFeatureFlag?: { __args: {workspaceId: Scalars['UUID'], featureFlag: Scalars['String'], value: Scalars['Boolean']} } setAdminAiModelEnabled?: { __args: {modelId: Scalars['String'], enabled: Scalars['Boolean']} } setAdminAiModelsEnabled?: { __args: {modelIds: Scalars['String'][], enabled: Scalars['Boolean']} } @@ -7576,10 +7704,10 @@ export interface LogicFunctionLogsInput {applicationId?: (Scalars['UUID'] | null - const BillingTrialPeriod_possibleTypes: string[] = ['BillingTrialPeriod'] - export const isBillingTrialPeriod = (obj?: { __typename?: any } | null): obj is BillingTrialPeriod => { - if (!obj?.__typename) throw new Error('__typename is missing in "isBillingTrialPeriod"') - return BillingTrialPeriod_possibleTypes.includes(obj.__typename) + const FeatureFlag_possibleTypes: string[] = ['FeatureFlag'] + export const isFeatureFlag = (obj?: { __typename?: any } | null): obj is FeatureFlag => { + if (!obj?.__typename) throw new Error('__typename is missing in "isFeatureFlag"') + return FeatureFlag_possibleTypes.includes(obj.__typename) } @@ -7592,6 +7720,86 @@ export interface LogicFunctionLogsInput {applicationId?: (Scalars['UUID'] | null + const UserInfo_possibleTypes: string[] = ['UserInfo'] + export const isUserInfo = (obj?: { __typename?: any } | null): obj is UserInfo => { + if (!obj?.__typename) throw new Error('__typename is missing in "isUserInfo"') + return UserInfo_possibleTypes.includes(obj.__typename) + } + + + + const WorkspaceInfo_possibleTypes: string[] = ['WorkspaceInfo'] + export const isWorkspaceInfo = (obj?: { __typename?: any } | null): obj is WorkspaceInfo => { + if (!obj?.__typename) throw new Error('__typename is missing in "isWorkspaceInfo"') + return WorkspaceInfo_possibleTypes.includes(obj.__typename) + } + + + + const UserLookup_possibleTypes: string[] = ['UserLookup'] + export const isUserLookup = (obj?: { __typename?: any } | null): obj is UserLookup => { + if (!obj?.__typename) throw new Error('__typename is missing in "isUserLookup"') + return UserLookup_possibleTypes.includes(obj.__typename) + } + + + + const AdminPanelRecentUser_possibleTypes: string[] = ['AdminPanelRecentUser'] + export const isAdminPanelRecentUser = (obj?: { __typename?: any } | null): obj is AdminPanelRecentUser => { + if (!obj?.__typename) throw new Error('__typename is missing in "isAdminPanelRecentUser"') + return AdminPanelRecentUser_possibleTypes.includes(obj.__typename) + } + + + + const AdminPanelTopWorkspace_possibleTypes: string[] = ['AdminPanelTopWorkspace'] + export const isAdminPanelTopWorkspace = (obj?: { __typename?: any } | null): obj is AdminPanelTopWorkspace => { + if (!obj?.__typename) throw new Error('__typename is missing in "isAdminPanelTopWorkspace"') + return AdminPanelTopWorkspace_possibleTypes.includes(obj.__typename) + } + + + + const AdminWorkspaceChatThread_possibleTypes: string[] = ['AdminWorkspaceChatThread'] + export const isAdminWorkspaceChatThread = (obj?: { __typename?: any } | null): obj is AdminWorkspaceChatThread => { + if (!obj?.__typename) throw new Error('__typename is missing in "isAdminWorkspaceChatThread"') + return AdminWorkspaceChatThread_possibleTypes.includes(obj.__typename) + } + + + + const AdminChatMessagePart_possibleTypes: string[] = ['AdminChatMessagePart'] + export const isAdminChatMessagePart = (obj?: { __typename?: any } | null): obj is AdminChatMessagePart => { + if (!obj?.__typename) throw new Error('__typename is missing in "isAdminChatMessagePart"') + return AdminChatMessagePart_possibleTypes.includes(obj.__typename) + } + + + + const AdminChatMessage_possibleTypes: string[] = ['AdminChatMessage'] + export const isAdminChatMessage = (obj?: { __typename?: any } | null): obj is AdminChatMessage => { + if (!obj?.__typename) throw new Error('__typename is missing in "isAdminChatMessage"') + return AdminChatMessage_possibleTypes.includes(obj.__typename) + } + + + + const AdminChatThreadMessages_possibleTypes: string[] = ['AdminChatThreadMessages'] + export const isAdminChatThreadMessages = (obj?: { __typename?: any } | null): obj is AdminChatThreadMessages => { + if (!obj?.__typename) throw new Error('__typename is missing in "isAdminChatThreadMessages"') + return AdminChatThreadMessages_possibleTypes.includes(obj.__typename) + } + + + + const BillingTrialPeriod_possibleTypes: string[] = ['BillingTrialPeriod'] + export const isBillingTrialPeriod = (obj?: { __typename?: any } | null): obj is BillingTrialPeriod => { + if (!obj?.__typename) throw new Error('__typename is missing in "isBillingTrialPeriod"') + return BillingTrialPeriod_possibleTypes.includes(obj.__typename) + } + + + const SSOIdentityProvider_possibleTypes: string[] = ['SSOIdentityProvider'] export const isSSOIdentityProvider = (obj?: { __typename?: any } | null): obj is SSOIdentityProvider => { if (!obj?.__typename) throw new Error('__typename is missing in "isSSOIdentityProvider"') @@ -7824,38 +8032,6 @@ export interface LogicFunctionLogsInput {applicationId?: (Scalars['UUID'] | null - const FeatureFlag_possibleTypes: string[] = ['FeatureFlag'] - export const isFeatureFlag = (obj?: { __typename?: any } | null): obj is FeatureFlag => { - if (!obj?.__typename) throw new Error('__typename is missing in "isFeatureFlag"') - return FeatureFlag_possibleTypes.includes(obj.__typename) - } - - - - const UserInfo_possibleTypes: string[] = ['UserInfo'] - export const isUserInfo = (obj?: { __typename?: any } | null): obj is UserInfo => { - if (!obj?.__typename) throw new Error('__typename is missing in "isUserInfo"') - return UserInfo_possibleTypes.includes(obj.__typename) - } - - - - const WorkspaceInfo_possibleTypes: string[] = ['WorkspaceInfo'] - export const isWorkspaceInfo = (obj?: { __typename?: any } | null): obj is WorkspaceInfo => { - if (!obj?.__typename) throw new Error('__typename is missing in "isWorkspaceInfo"') - return WorkspaceInfo_possibleTypes.includes(obj.__typename) - } - - - - const UserLookup_possibleTypes: string[] = ['UserLookup'] - export const isUserLookup = (obj?: { __typename?: any } | null): obj is UserLookup => { - if (!obj?.__typename) throw new Error('__typename is missing in "isUserLookup"') - return UserLookup_possibleTypes.includes(obj.__typename) - } - - - const VersionInfo_possibleTypes: string[] = ['VersionInfo'] export const isVersionInfo = (obj?: { __typename?: any } | null): obj is VersionInfo => { if (!obj?.__typename) throw new Error('__typename is missing in "isVersionInfo"') @@ -9280,6 +9456,30 @@ export const enumLogicFunctionExecutionStatus = { ERROR: 'ERROR' as const } +export const enumFeatureFlagKey = { + IS_UNIQUE_INDEXES_ENABLED: 'IS_UNIQUE_INDEXES_ENABLED' as const, + IS_JSON_FILTER_ENABLED: 'IS_JSON_FILTER_ENABLED' as const, + IS_AI_ENABLED: 'IS_AI_ENABLED' as const, + IS_COMMAND_MENU_ITEM_ENABLED: 'IS_COMMAND_MENU_ITEM_ENABLED' as const, + IS_MARKETPLACE_SETTING_TAB_VISIBLE: 'IS_MARKETPLACE_SETTING_TAB_VISIBLE' as const, + IS_RECORD_PAGE_LAYOUT_EDITING_ENABLED: 'IS_RECORD_PAGE_LAYOUT_EDITING_ENABLED' as const, + IS_PUBLIC_DOMAIN_ENABLED: 'IS_PUBLIC_DOMAIN_ENABLED' as const, + IS_EMAILING_DOMAIN_ENABLED: 'IS_EMAILING_DOMAIN_ENABLED' as const, + IS_JUNCTION_RELATIONS_ENABLED: 'IS_JUNCTION_RELATIONS_ENABLED' as const, + IS_DRAFT_EMAIL_ENABLED: 'IS_DRAFT_EMAIL_ENABLED' as const, + IS_CONNECTED_ACCOUNT_MIGRATED: 'IS_CONNECTED_ACCOUNT_MIGRATED' as const, + IS_RICH_TEXT_V1_MIGRATED: 'IS_RICH_TEXT_V1_MIGRATED' as const, + IS_RECORD_PAGE_LAYOUT_GLOBAL_EDITION_ENABLED: 'IS_RECORD_PAGE_LAYOUT_GLOBAL_EDITION_ENABLED' as const, + IS_RECORD_TABLE_WIDGET_ENABLED: 'IS_RECORD_TABLE_WIDGET_ENABLED' as const, + IS_DATASOURCE_MIGRATED: 'IS_DATASOURCE_MIGRATED' as const +} + +export const enumAgentMessageRole = { + SYSTEM: 'SYSTEM' as const, + USER: 'USER' as const, + ASSISTANT: 'ASSISTANT' as const +} + export const enumIdentityProviderType = { OIDC: 'OIDC' as const, SAML: 'SAML' as const @@ -9309,24 +9509,6 @@ export const enumCaptchaDriverType = { TURNSTILE: 'TURNSTILE' as const } -export const enumFeatureFlagKey = { - IS_UNIQUE_INDEXES_ENABLED: 'IS_UNIQUE_INDEXES_ENABLED' as const, - IS_JSON_FILTER_ENABLED: 'IS_JSON_FILTER_ENABLED' as const, - IS_AI_ENABLED: 'IS_AI_ENABLED' as const, - IS_COMMAND_MENU_ITEM_ENABLED: 'IS_COMMAND_MENU_ITEM_ENABLED' as const, - IS_MARKETPLACE_SETTING_TAB_VISIBLE: 'IS_MARKETPLACE_SETTING_TAB_VISIBLE' as const, - IS_RECORD_PAGE_LAYOUT_EDITING_ENABLED: 'IS_RECORD_PAGE_LAYOUT_EDITING_ENABLED' as const, - IS_PUBLIC_DOMAIN_ENABLED: 'IS_PUBLIC_DOMAIN_ENABLED' as const, - IS_EMAILING_DOMAIN_ENABLED: 'IS_EMAILING_DOMAIN_ENABLED' as const, - IS_JUNCTION_RELATIONS_ENABLED: 'IS_JUNCTION_RELATIONS_ENABLED' as const, - IS_DRAFT_EMAIL_ENABLED: 'IS_DRAFT_EMAIL_ENABLED' as const, - IS_CONNECTED_ACCOUNT_MIGRATED: 'IS_CONNECTED_ACCOUNT_MIGRATED' as const, - IS_RICH_TEXT_V1_MIGRATED: 'IS_RICH_TEXT_V1_MIGRATED' as const, - IS_RECORD_PAGE_LAYOUT_GLOBAL_EDITION_ENABLED: 'IS_RECORD_PAGE_LAYOUT_GLOBAL_EDITION_ENABLED' as const, - IS_RECORD_TABLE_WIDGET_ENABLED: 'IS_RECORD_TABLE_WIDGET_ENABLED' as const, - IS_DATASOURCE_MIGRATED: 'IS_DATASOURCE_MIGRATED' as const -} - export const enumConfigSource = { ENVIRONMENT: 'ENVIRONMENT' as const, DATABASE: 'DATABASE' as const, diff --git a/packages/twenty-client-sdk/src/metadata/generated/types.ts b/packages/twenty-client-sdk/src/metadata/generated/types.ts index 295d46703c..04c9a41b04 100644 --- a/packages/twenty-client-sdk/src/metadata/generated/types.ts +++ b/packages/twenty-client-sdk/src/metadata/generated/types.ts @@ -48,49 +48,50 @@ export default { 150, 152, 156, - 160, - 161, - 167, + 158, + 168, 172, - 175, + 173, 179, 184, - 185, 187, - 192, - 197, + 195, + 196, 198, - 214, - 231, - 248, - 285, - 286, - 296, - 297, - 333, - 334, - 335, - 336, - 338, - 339, + 203, + 208, + 209, + 221, + 238, + 255, + 292, + 293, + 303, + 304, 340, 341, 342, 343, - 344, + 345, 346, + 347, 348, - 356, - 362, + 349, + 350, + 351, + 353, + 355, 363, - 364, - 366, + 369, + 370, + 371, 373, 380, - 411, - 492, - 497, - 498 + 387, + 418, + 499, + 504, + 505 ], "types": { "BillingProductDTO": { @@ -788,10 +789,10 @@ export default { 3 ], "relation": [ - 247 + 254 ], "morphRelations": [ - 247 + 254 ], "object": [ 46 @@ -850,7 +851,7 @@ export default { 36 ], "objectMetadata": [ - 240, + 247, { "paging": [ 39, @@ -863,7 +864,7 @@ export default { } ], "indexFieldMetadatas": [ - 238, + 245, { "paging": [ 39, @@ -1108,7 +1109,7 @@ export default { 37 ], "fields": [ - 245, + 252, { "paging": [ 39, @@ -1121,7 +1122,7 @@ export default { } ], "indexMetadatas": [ - 243, + 250, { "paging": [ 39, @@ -1693,7 +1694,7 @@ export default { 49 ], "featureFlags": [ - 200 + 157 ], "billingSubscriptions": [ 131 @@ -1702,7 +1703,7 @@ export default { 131 ], "billingEntitlements": [ - 230 + 237 ], "hasValidEnterpriseKey": [ 6 @@ -1714,7 +1715,7 @@ export default { 6 ], "workspaceUrls": [ - 158 + 159 ], "workspaceCustomApplicationId": [ 1 @@ -1806,7 +1807,7 @@ export default { 20 ], "deletedWorkspaceMembers": [ - 229 + 236 ], "hasPassword": [ 6 @@ -1818,7 +1819,7 @@ export default { 17 ], "availableWorkspaces": [ - 228 + 235 ], "__typename": [ 1 @@ -3174,17 +3175,18 @@ export default { ] }, "LogicFunctionExecutionStatus": {}, - "BillingTrialPeriod": { - "duration": [ - 11 + "FeatureFlag": { + "key": [ + 158 ], - "isCreditCardRequired": [ + "value": [ 6 ], "__typename": [ 1 ] }, + "FeatureFlagKey": {}, "WorkspaceUrls": { "customUrl": [ 1 @@ -3196,6 +3198,195 @@ export default { 1 ] }, + "UserInfo": { + "id": [ + 3 + ], + "email": [ + 1 + ], + "firstName": [ + 1 + ], + "lastName": [ + 1 + ], + "createdAt": [ + 4 + ], + "__typename": [ + 1 + ] + }, + "WorkspaceInfo": { + "id": [ + 3 + ], + "name": [ + 1 + ], + "allowImpersonation": [ + 6 + ], + "logo": [ + 1 + ], + "totalUsers": [ + 11 + ], + "activationStatus": [ + 67 + ], + "createdAt": [ + 4 + ], + "workspaceUrls": [ + 159 + ], + "users": [ + 160 + ], + "featureFlags": [ + 157 + ], + "__typename": [ + 1 + ] + }, + "UserLookup": { + "user": [ + 160 + ], + "workspaces": [ + 161 + ], + "__typename": [ + 1 + ] + }, + "AdminPanelRecentUser": { + "id": [ + 3 + ], + "email": [ + 1 + ], + "firstName": [ + 1 + ], + "lastName": [ + 1 + ], + "createdAt": [ + 4 + ], + "workspaceName": [ + 1 + ], + "workspaceId": [ + 3 + ], + "__typename": [ + 1 + ] + }, + "AdminPanelTopWorkspace": { + "id": [ + 3 + ], + "name": [ + 1 + ], + "totalUsers": [ + 21 + ], + "subdomain": [ + 1 + ], + "__typename": [ + 1 + ] + }, + "AdminWorkspaceChatThread": { + "id": [ + 3 + ], + "title": [ + 1 + ], + "totalInputTokens": [ + 21 + ], + "totalOutputTokens": [ + 21 + ], + "conversationSize": [ + 21 + ], + "createdAt": [ + 4 + ], + "updatedAt": [ + 4 + ], + "__typename": [ + 1 + ] + }, + "AdminChatMessagePart": { + "type": [ + 1 + ], + "textContent": [ + 1 + ], + "toolName": [ + 1 + ], + "__typename": [ + 1 + ] + }, + "AdminChatMessage": { + "id": [ + 3 + ], + "role": [ + 168 + ], + "parts": [ + 166 + ], + "createdAt": [ + 4 + ], + "__typename": [ + 1 + ] + }, + "AgentMessageRole": {}, + "AdminChatThreadMessages": { + "thread": [ + 165 + ], + "messages": [ + 167 + ], + "__typename": [ + 1 + ] + }, + "BillingTrialPeriod": { + "duration": [ + 11 + ], + "isCreditCardRequired": [ + 6 + ], + "__typename": [ + 1 + ] + }, "SSOIdentityProvider": { "id": [ 3 @@ -3204,10 +3395,10 @@ export default { 1 ], "type": [ - 160 + 172 ], "status": [ - 161 + 173 ], "issuer": [ 1 @@ -3220,7 +3411,7 @@ export default { "SSOIdentityProviderStatus": {}, "AuthProviders": { "sso": [ - 159 + 171 ], "google": [ 6 @@ -3257,10 +3448,10 @@ export default { 3 ], "authProviders": [ - 162 + 174 ], "authBypassProviders": [ - 163 + 175 ], "logo": [ 1 @@ -3269,7 +3460,7 @@ export default { 1 ], "workspaceUrls": [ - 158 + 159 ], "__typename": [ 1 @@ -3294,7 +3485,7 @@ export default { 1 ], "modelFamily": [ - 167 + 179 ], "modelFamilyLabel": [ 1 @@ -3309,7 +3500,7 @@ export default { 11 ], "nativeCapabilities": [ - 165 + 177 ], "isDeprecated": [ 6 @@ -3345,7 +3536,7 @@ export default { 1 ], "modelFamily": [ - 167 + 179 ], "modelFamilyLabel": [ 1 @@ -3395,7 +3586,7 @@ export default { }, "AdminAIModels": { "models": [ - 168 + 180 ], "defaultSmartModelId": [ 1 @@ -3415,7 +3606,7 @@ export default { 1 ], "trialPeriods": [ - 157 + 170 ], "__typename": [ 1 @@ -3423,7 +3614,7 @@ export default { }, "Support": { "supportDriver": [ - 172 + 184 ], "supportFrontChatId": [ 1 @@ -3449,7 +3640,7 @@ export default { }, "Captcha": { "provider": [ - 175 + 187 ], "siteKey": [ 1 @@ -3483,16 +3674,15 @@ export default { }, "PublicFeatureFlag": { "key": [ - 179 + 158 ], "metadata": [ - 177 + 189 ], "__typename": [ 1 ] }, - "FeatureFlagKey": {}, "ClientConfigMaintenanceMode": { "startAt": [ 4 @@ -3512,13 +3702,13 @@ export default { 1 ], "authProviders": [ - 162 + 174 ], "billing": [ - 170 + 182 ], "aiModels": [ - 166 + 178 ], "signInPrefilled": [ 6 @@ -3539,25 +3729,25 @@ export default { 6 ], "support": [ - 171 + 183 ], "isAttachmentPreviewEnabled": [ 6 ], "sentry": [ - 173 + 185 ], "captcha": [ - 174 + 186 ], "api": [ - 176 + 188 ], "canManageFeatureFlags": [ 6 ], "publicFeatureFlags": [ - 178 + 190 ], "isMicrosoftMessagingEnabled": [ 6 @@ -3593,7 +3783,7 @@ export default { 6 ], "maintenance": [ - 180 + 191 ], "__typename": [ 1 @@ -3627,13 +3817,13 @@ export default { 6 ], "source": [ - 184 + 195 ], "isEnvOnly": [ 6 ], "type": [ - 185 + 196 ], "options": [ 15 @@ -3646,10 +3836,10 @@ export default { "ConfigVariableType": {}, "ConfigVariablesGroupData": { "variables": [ - 183 + 194 ], "name": [ - 187 + 198 ], "description": [ 1 @@ -3664,7 +3854,7 @@ export default { "ConfigVariablesGroup": {}, "ConfigVariables": { "groups": [ - 186 + 197 ], "__typename": [ 1 @@ -3689,7 +3879,7 @@ export default { 21 ], "results": [ - 189 + 200 ], "__typename": [ 1 @@ -3706,7 +3896,7 @@ export default { 15 ], "state": [ - 192 + 203 ], "timestamp": [ 11 @@ -3756,7 +3946,7 @@ export default { }, "QueueJobsResponse": { "jobs": [ - 191 + 202 ], "count": [ 11 @@ -3768,7 +3958,7 @@ export default { 6 ], "retentionConfig": [ - 193 + 204 ], "__typename": [ 1 @@ -3779,7 +3969,7 @@ export default { 21 ], "results": [ - 189 + 200 ], "__typename": [ 1 @@ -3787,13 +3977,13 @@ export default { }, "SystemHealthService": { "id": [ - 197 + 208 ], "label": [ 1 ], "status": [ - 198 + 209 ], "__typename": [ 1 @@ -3803,75 +3993,7 @@ export default { "AdminPanelHealthServiceStatus": {}, "SystemHealth": { "services": [ - 196 - ], - "__typename": [ - 1 - ] - }, - "FeatureFlag": { - "key": [ - 179 - ], - "value": [ - 6 - ], - "__typename": [ - 1 - ] - }, - "UserInfo": { - "id": [ - 3 - ], - "email": [ - 1 - ], - "firstName": [ - 1 - ], - "lastName": [ - 1 - ], - "__typename": [ - 1 - ] - }, - "WorkspaceInfo": { - "id": [ - 3 - ], - "name": [ - 1 - ], - "allowImpersonation": [ - 6 - ], - "logo": [ - 1 - ], - "totalUsers": [ - 11 - ], - "workspaceUrls": [ - 158 - ], - "users": [ - 201 - ], - "featureFlags": [ - 200 - ], - "__typename": [ - 1 - ] - }, - "UserLookup": { - "user": [ - 201 - ], - "workspaces": [ - 202 + 207 ], "__typename": [ 1 @@ -3896,7 +4018,7 @@ export default { 1 ], "status": [ - 198 + 209 ], "__typename": [ 1 @@ -3904,7 +4026,7 @@ export default { }, "AdminPanelHealthServiceData": { "id": [ - 197 + 208 ], "label": [ 1 @@ -3913,7 +4035,7 @@ export default { 1 ], "status": [ - 198 + 209 ], "errorMessage": [ 1 @@ -3922,7 +4044,7 @@ export default { 1 ], "queues": [ - 205 + 212 ], "__typename": [ 1 @@ -4007,7 +4129,7 @@ export default { 1 ], "data": [ - 210 + 217 ], "__typename": [ 1 @@ -4050,13 +4172,13 @@ export default { 11 ], "timeRange": [ - 214 + 221 ], "details": [ - 212 + 219 ], "data": [ - 211 + 218 ], "__typename": [ 1 @@ -4082,7 +4204,7 @@ export default { 1 ], "versionDistribution": [ - 215 + 222 ], "__typename": [ 1 @@ -4148,7 +4270,7 @@ export default { 3 ], "type": [ - 160 + 172 ], "issuer": [ 1 @@ -4157,7 +4279,7 @@ export default { 1 ], "status": [ - 161 + 173 ], "__typename": [ 1 @@ -4176,7 +4298,7 @@ export default { }, "FindAvailableSSOIDP": { "type": [ - 160 + 172 ], "id": [ 3 @@ -4188,10 +4310,10 @@ export default { 1 ], "status": [ - 161 + 173 ], "workspace": [ - 223 + 230 ], "__typename": [ 1 @@ -4202,7 +4324,7 @@ export default { 3 ], "type": [ - 160 + 172 ], "issuer": [ 1 @@ -4211,7 +4333,7 @@ export default { 1 ], "status": [ - 161 + 173 ], "__typename": [ 1 @@ -4219,7 +4341,7 @@ export default { }, "SSOConnection": { "type": [ - 160 + 172 ], "id": [ 3 @@ -4231,7 +4353,7 @@ export default { 1 ], "status": [ - 161 + 173 ], "__typename": [ 1 @@ -4254,13 +4376,13 @@ export default { 1 ], "workspaceUrls": [ - 158 + 159 ], "logo": [ 1 ], "sso": [ - 226 + 233 ], "__typename": [ 1 @@ -4268,10 +4390,10 @@ export default { }, "AvailableWorkspaces": { "availableWorkspacesForSignIn": [ - 227 + 234 ], "availableWorkspacesForSignUp": [ - 227 + 234 ], "__typename": [ 1 @@ -4299,7 +4421,7 @@ export default { }, "BillingEntitlement": { "key": [ - 231 + 238 ], "value": [ 6 @@ -4337,7 +4459,7 @@ export default { 1 ], "records": [ - 232 + 239 ], "__typename": [ 1 @@ -4373,10 +4495,10 @@ export default { }, "IndexConnection": { "pageInfo": [ - 235 + 242 ], "edges": [ - 234 + 241 ], "__typename": [ 1 @@ -4395,10 +4517,10 @@ export default { }, "IndexIndexFieldMetadatasConnection": { "pageInfo": [ - 235 + 242 ], "edges": [ - 237 + 244 ], "__typename": [ 1 @@ -4417,10 +4539,10 @@ export default { }, "IndexObjectMetadataConnection": { "pageInfo": [ - 235 + 242 ], "edges": [ - 239 + 246 ], "__typename": [ 1 @@ -4439,10 +4561,10 @@ export default { }, "ObjectConnection": { "pageInfo": [ - 235 + 242 ], "edges": [ - 239 + 246 ], "__typename": [ 1 @@ -4450,10 +4572,10 @@ export default { }, "ObjectIndexMetadatasConnection": { "pageInfo": [ - 235 + 242 ], "edges": [ - 234 + 241 ], "__typename": [ 1 @@ -4472,10 +4594,10 @@ export default { }, "ObjectFieldsConnection": { "pageInfo": [ - 235 + 242 ], "edges": [ - 244 + 251 ], "__typename": [ 1 @@ -4494,7 +4616,7 @@ export default { }, "Relation": { "type": [ - 248 + 255 ], "sourceObjectMetadata": [ 46 @@ -4515,10 +4637,10 @@ export default { "RelationType": {}, "FieldConnection": { "pageInfo": [ - 235 + 242 ], "edges": [ - 244 + 251 ], "__typename": [ 1 @@ -4537,10 +4659,10 @@ export default { }, "ApplicationTokenPair": { "applicationAccessToken": [ - 250 + 257 ], "applicationRefreshToken": [ - 250 + 257 ], "__typename": [ 1 @@ -4587,7 +4709,7 @@ export default { 6 ], "applicationTokenPair": [ - 251 + 258 ], "__typename": [ 1 @@ -4635,10 +4757,10 @@ export default { }, "AuthTokenPair": { "accessOrWorkspaceAgnosticToken": [ - 250 + 257 ], "refreshToken": [ - 250 + 257 ], "__typename": [ 1 @@ -4646,10 +4768,10 @@ export default { }, "AvailableWorkspacesAndAccessTokens": { "tokens": [ - 258 + 265 ], "availableWorkspaces": [ - 228 + 235 ], "__typename": [ 1 @@ -4687,7 +4809,7 @@ export default { }, "WorkspaceUrlsAndId": { "workspaceUrls": [ - 158 + 159 ], "id": [ 3 @@ -4698,10 +4820,10 @@ export default { }, "SignUp": { "loginToken": [ - 250 + 257 ], "workspace": [ - 263 + 270 ], "__typename": [ 1 @@ -4709,7 +4831,7 @@ export default { }, "TransientToken": { "transientToken": [ - 250 + 257 ], "__typename": [ 1 @@ -4731,10 +4853,10 @@ export default { }, "VerifyEmailAndGetLoginToken": { "loginToken": [ - 250 + 257 ], "workspaceUrls": [ - 158 + 159 ], "__typename": [ 1 @@ -4750,7 +4872,7 @@ export default { }, "AuthTokens": { "tokens": [ - 258 + 265 ], "__typename": [ 1 @@ -4758,7 +4880,7 @@ export default { }, "LoginToken": { "loginToken": [ - 250 + 257 ], "__typename": [ 1 @@ -4788,10 +4910,10 @@ export default { }, "Impersonate": { "loginToken": [ - 250 + 257 ], "workspace": [ - 263 + 270 ], "__typename": [ 1 @@ -4813,7 +4935,7 @@ export default { 1 ], "dailyUsage": [ - 274 + 281 ], "__typename": [ 1 @@ -4821,16 +4943,16 @@ export default { }, "UsageAnalytics": { "usageByUser": [ - 182 + 193 ], "usageByOperationType": [ - 182 + 193 ], "usageByModel": [ - 182 + 193 ], "timeSeries": [ - 274 + 281 ], "periodStart": [ 4 @@ -4839,7 +4961,7 @@ export default { 4 ], "userDailyUsage": [ - 275 + 282 ], "__typename": [ 1 @@ -4996,13 +5118,13 @@ export default { 1 ], "driver": [ - 285 + 292 ], "status": [ - 286 + 293 ], "verificationRecords": [ - 283 + 290 ], "verifiedAt": [ 4 @@ -5049,7 +5171,7 @@ export default { 1 ], "location": [ - 288 + 295 ], "__typename": [ 1 @@ -5077,13 +5199,13 @@ export default { }, "ImapSmtpCaldavConnectionParameters": { "IMAP": [ - 290 + 297 ], "SMTP": [ - 290 + 297 ], "CALDAV": [ - 290 + 297 ], "__typename": [ 1 @@ -5103,7 +5225,7 @@ export default { 3 ], "connectionParameters": [ - 291 + 298 ], "__typename": [ 1 @@ -5148,10 +5270,10 @@ export default { 3 ], "frontComponent": [ - 252 + 259 ], "engineComponentKey": [ - 296 + 303 ], "label": [ 1 @@ -5169,10 +5291,10 @@ export default { 6 ], "availabilityType": [ - 297 + 304 ], "payload": [ - 298 + 305 ], "hotKeys": [ 1 @@ -5200,10 +5322,10 @@ export default { "CommandMenuItemAvailabilityType": {}, "CommandMenuItemPayload": { "on_PathCommandMenuItemPayload": [ - 299 + 306 ], "on_ObjectMetadataCommandMenuItemPayload": [ - 300 + 307 ], "__typename": [ 1 @@ -5361,7 +5483,7 @@ export default { 1 ], "series": [ - 304 + 311 ], "xAxisLabel": [ 1 @@ -5410,7 +5532,7 @@ export default { 1 ], "data": [ - 306 + 313 ], "__typename": [ 1 @@ -5418,7 +5540,7 @@ export default { }, "LineChartData": { "series": [ - 307 + 314 ], "xAxisLabel": [ 1 @@ -5455,7 +5577,7 @@ export default { }, "PieChartData": { "data": [ - 309 + 316 ], "showLegend": [ 6 @@ -5522,7 +5644,7 @@ export default { 1 ], "connectionParameters": [ - 291 + 298 ], "lastSignedInAt": [ 4 @@ -5559,13 +5681,13 @@ export default { }, "PublicImapSmtpCaldavConnectionParameters": { "IMAP": [ - 313 + 320 ], "SMTP": [ - 313 + 320 ], "CALDAV": [ - 313 + 320 ], "__typename": [ 1 @@ -5606,7 +5728,7 @@ export default { 4 ], "connectionParameters": [ - 314 + 321 ], "__typename": [ 1 @@ -5662,13 +5784,13 @@ export default { }, "EventLogQueryResult": { "records": [ - 317 + 324 ], "totalCount": [ 21 ], "pageInfo": [ - 318 + 325 ], "__typename": [ 1 @@ -5767,7 +5889,7 @@ export default { 1 ], "parts": [ - 302 + 309 ], "processedAt": [ 4 @@ -5795,7 +5917,7 @@ export default { }, "AISystemPromptPreview": { "sections": [ - 323 + 330 ], "estimatedTokenCount": [ 21 @@ -5842,7 +5964,7 @@ export default { }, "AgentChatThreadEdge": { "node": [ - 321 + 328 ], "cursor": [ 40 @@ -5853,10 +5975,10 @@ export default { }, "AgentChatThreadConnection": { "pageInfo": [ - 235 + 242 ], "edges": [ - 328 + 335 ], "__typename": [ 1 @@ -5893,10 +6015,10 @@ export default { 3 ], "evaluations": [ - 330 + 337 ], "messages": [ - 322 + 329 ], "createdAt": [ 4 @@ -5913,19 +6035,19 @@ export default { 1 ], "syncStatus": [ - 333 + 340 ], "syncStage": [ - 334 + 341 ], "visibility": [ - 335 + 342 ], "isContactAutoCreationEnabled": [ 6 ], "contactAutoCreationPolicy": [ - 336 + 343 ], "isSyncEnabled": [ 6 @@ -5961,22 +6083,22 @@ export default { 3 ], "visibility": [ - 338 + 345 ], "handle": [ 1 ], "type": [ - 339 + 346 ], "isContactAutoCreationEnabled": [ 6 ], "contactAutoCreationPolicy": [ - 340 + 347 ], "messageFolderImportPolicy": [ - 341 + 348 ], "excludeNonProfessionalEmails": [ 6 @@ -5985,7 +6107,7 @@ export default { 6 ], "pendingGroupEmailsAction": [ - 342 + 349 ], "isSyncEnabled": [ 6 @@ -5994,10 +6116,10 @@ export default { 4 ], "syncStatus": [ - 343 + 350 ], "syncStage": [ - 344 + 351 ], "syncStageStartedAt": [ 4 @@ -6048,7 +6170,7 @@ export default { 1 ], "pendingSyncAction": [ - 346 + 353 ], "messageChannelId": [ 3 @@ -6066,7 +6188,7 @@ export default { "MessageFolderPendingSyncAction": {}, "CollectionHash": { "collectionName": [ - 348 + 355 ], "hash": [ 1 @@ -6133,13 +6255,13 @@ export default { }, "MinimalMetadata": { "objectMetadataItems": [ - 349 + 356 ], "views": [ - 350 + 357 ], "collectionHashes": [ - 347 + 354 ], "__typename": [ 1 @@ -6305,7 +6427,7 @@ export default { 2, { "input": [ - 354, + 361, "GetApiKeyInput!" ] } @@ -6409,7 +6531,7 @@ export default { 32, { "input": [ - 355, + 362, "LogicFunctionIdInput!" ] } @@ -6421,7 +6543,7 @@ export default { 15, { "input": [ - 355, + 362, "LogicFunctionIdInput!" ] } @@ -6430,16 +6552,16 @@ export default { 1, { "input": [ - 355, + 362, "LogicFunctionIdInput!" ] } ], "commandMenuItems": [ - 295 + 302 ], "commandMenuItem": [ - 295, + 302, { "id": [ 3, @@ -6448,10 +6570,10 @@ export default { } ], "frontComponents": [ - 252 + 259 ], "frontComponent": [ - 252, + 259, { "id": [ 3, @@ -6460,7 +6582,7 @@ export default { } ], "objectRecordCounts": [ - 241 + 248 ], "object": [ 46, @@ -6472,7 +6594,7 @@ export default { } ], "objects": [ - 242, + 249, { "paging": [ 39, @@ -6494,7 +6616,7 @@ export default { } ], "indexMetadatas": [ - 236, + 243, { "paging": [ 39, @@ -6513,7 +6635,7 @@ export default { 25, { "input": [ - 357, + 364, "AgentIdInput!" ] } @@ -6522,7 +6644,7 @@ export default { 29 ], "getToolIndex": [ - 301 + 308 ], "getToolInputSchema": [ 15, @@ -6543,7 +6665,7 @@ export default { } ], "fields": [ - 249, + 256, { "paging": [ 39, @@ -6573,7 +6695,7 @@ export default { } ], "myMessageFolders": [ - 345, + 352, { "messageChannelId": [ 3 @@ -6581,7 +6703,7 @@ export default { } ], "myMessageChannels": [ - 337, + 344, { "connectedAccountId": [ 3 @@ -6589,10 +6711,10 @@ export default { } ], "myConnectedAccounts": [ - 312 + 319 ], "connectedAccountById": [ - 315, + 322, { "id": [ 3, @@ -6601,10 +6723,10 @@ export default { } ], "connectedAccounts": [ - 312 + 319 ], "myCalendarChannels": [ - 332, + 339, { "connectedAccountId": [ 3 @@ -6612,10 +6734,10 @@ export default { } ], "webhooks": [ - 352 + 359 ], "webhook": [ - 352, + 359, { "id": [ 3, @@ -6624,10 +6746,10 @@ export default { } ], "minimalMetadata": [ - 351 + 358 ], "chatThread": [ - 321, + 328, { "id": [ 3, @@ -6636,7 +6758,7 @@ export default { } ], "chatMessages": [ - 322, + 329, { "threadId": [ 3, @@ -6645,7 +6767,7 @@ export default { } ], "chatStreamCatchupChunks": [ - 325, + 332, { "threadId": [ 3, @@ -6654,13 +6776,13 @@ export default { } ], "getAISystemPromptPreview": [ - 324 + 331 ], "skills": [ - 320 + 327 ], "skill": [ - 320, + 327, { "id": [ 3, @@ -6669,24 +6791,24 @@ export default { } ], "chatThreads": [ - 329, + 336, { "paging": [ 39, "CursorPaging!" ], "filter": [ - 358, + 365, "AgentChatThreadFilter!" ], "sorting": [ - 361, + 368, "[AgentChatThreadSort!]!" ] } ], "agentTurns": [ - 331, + 338, { "agentId": [ 3, @@ -6695,43 +6817,43 @@ export default { } ], "eventLogs": [ - 319, + 326, { "input": [ - 365, + 372, "EventLogQueryInput!" ] } ], "pieChartData": [ - 310, + 317, { "input": [ - 369, + 376, "PieChartDataInput!" ] } ], "lineChartData": [ - 308, + 315, { "input": [ - 370, + 377, "LineChartDataInput!" ] } ], "barChartData": [ - 305, + 312, { "input": [ - 371, + 378, "BarChartDataInput!" ] } ], "checkUserExists": [ - 271, + 278, { "email": [ 1, @@ -6743,7 +6865,7 @@ export default { } ], "checkWorkspaceInviteHashIsValid": [ - 272, + 279, { "inviteHash": [ 1, @@ -6761,7 +6883,7 @@ export default { } ], "validatePasswordResetToken": [ - 266, + 273, { "passwordResetToken": [ 1, @@ -6770,7 +6892,7 @@ export default { } ], "findApplicationRegistrationByClientId": [ - 218, + 225, { "clientId": [ 1, @@ -6800,7 +6922,7 @@ export default { } ], "findApplicationRegistrationStats": [ - 216, + 223, { "id": [ 1, @@ -6833,7 +6955,7 @@ export default { 66 ], "getPublicWorkspaceDataByDomain": [ - 164, + 176, { "origin": [ 1 @@ -6841,10 +6963,10 @@ export default { } ], "getSSOIdentityProviders": [ - 224 + 231 ], "getConnectedImapSmtpCaldavAccount": [ - 292, + 299, { "id": [ 3, @@ -6853,7 +6975,7 @@ export default { } ], "getAutoCompleteAddress": [ - 287, + 294, { "address": [ 1, @@ -6872,7 +6994,7 @@ export default { } ], "getAddressDetails": [ - 289, + 296, { "placeId": [ 1, @@ -6884,41 +7006,66 @@ export default { ] } ], - "getConfigVariablesGrouped": [ - 188 + "userLookupAdminPanel": [ + 162, + { + "userIdentifier": [ + 1, + "String!" + ] + } ], - "getSystemHealthStatus": [ + "adminPanelRecentUsers": [ + 163, + { + "searchTerm": [ + 1 + ] + } + ], + "adminPanelTopWorkspaces": [ + 164, + { + "searchTerm": [ + 1 + ] + } + ], + "getConfigVariablesGrouped": [ 199 ], + "getSystemHealthStatus": [ + 210 + ], "getIndicatorHealthStatus": [ - 206, + 213, { "indicatorId": [ - 197, + 208, "HealthIndicatorId!" ] } ], "getQueueMetrics": [ - 213, + 220, { "queueName": [ 1, "String!" ], "timeRange": [ - 214 + 221 ] } ], "versionInfo": [ - 204 + 211 ], "getAdminAiModels": [ - 169 + 181 ], "getDatabaseConfigVariable": [ - 183, + 194, { "key": [ 1, @@ -6927,14 +7074,14 @@ export default { } ], "getQueueJobs": [ - 194, + 205, { "queueName": [ 1, "String!" ], "state": [ - 192, + 203, "JobState!" ], "limit": [ @@ -6952,10 +7099,10 @@ export default { 15 ], "getModelsDevProviders": [ - 209 + 216 ], "getModelsDevSuggestions": [ - 208, + 215, { "providerType": [ 1, @@ -6964,7 +7111,7 @@ export default { } ], "getAdminAiUsageByWorkspace": [ - 182, + 193, { "periodStart": [ 4 @@ -6975,30 +7122,57 @@ export default { } ], "getMaintenanceMode": [ - 207 + 214 + ], + "workspaceLookupAdminPanel": [ + 162, + { + "workspaceId": [ + 3, + "UUID!" + ] + } + ], + "getAdminWorkspaceChatThreads": [ + 165, + { + "workspaceId": [ + 3, + "UUID!" + ] + } + ], + "getAdminChatThreadMessages": [ + 169, + { + "threadId": [ + 3, + "UUID!" + ] + } ], "getUsageAnalytics": [ - 276, + 283, { "input": [ - 372 + 379 ] } ], "getPostgresCredentials": [ - 294 + 301 ], "findManyPublicDomains": [ - 282 + 289 ], "getEmailingDomains": [ - 284 + 291 ], "findManyMarketplaceApps": [ - 280 + 287 ], "findMarketplaceAppDetail": [ - 281, + 288, { "universalIdentifier": [ 1, @@ -7034,7 +7208,7 @@ export default { }, "LogicFunctionIdInput": { "id": [ - 356 + 363 ], "__typename": [ 1 @@ -7051,16 +7225,16 @@ export default { }, "AgentChatThreadFilter": { "and": [ - 358 + 365 ], "or": [ - 358 + 365 ], "id": [ 42 ], "updatedAt": [ - 359 + 366 ], "__typename": [ 1 @@ -7098,10 +7272,10 @@ export default { 4 ], "between": [ - 360 + 367 ], "notBetween": [ - 360 + 367 ], "__typename": [ 1 @@ -7120,13 +7294,13 @@ export default { }, "AgentChatThreadSort": { "field": [ - 362 + 369 ], "direction": [ - 363 + 370 ], "nulls": [ - 364 + 371 ], "__typename": [ 1 @@ -7137,10 +7311,10 @@ export default { "SortNulls": {}, "EventLogQueryInput": { "table": [ - 366 + 373 ], "filters": [ - 367 + 374 ], "first": [ 21 @@ -7161,7 +7335,7 @@ export default { 1 ], "dateRange": [ - 368 + 375 ], "recordId": [ 1 @@ -7228,7 +7402,7 @@ export default { 1 ], "operationTypes": [ - 373 + 380 ], "__typename": [ 1 @@ -7240,7 +7414,7 @@ export default { 6, { "input": [ - 375, + 382, "AddQuerySubscriptionInput!" ] } @@ -7249,7 +7423,7 @@ export default { 6, { "input": [ - 376, + 383, "RemoveQueryFromEventStreamInput!" ] } @@ -7258,7 +7432,7 @@ export default { 146, { "inputs": [ - 377, + 384, "[CreateNavigationMenuItemInput!]!" ] } @@ -7267,7 +7441,7 @@ export default { 146, { "input": [ - 377, + 384, "CreateNavigationMenuItemInput!" ] } @@ -7276,7 +7450,7 @@ export default { 146, { "inputs": [ - 378, + 385, "[UpdateOneNavigationMenuItemInput!]!" ] } @@ -7285,7 +7459,7 @@ export default { 146, { "input": [ - 378, + 385, "UpdateOneNavigationMenuItemInput!" ] } @@ -7312,7 +7486,7 @@ export default { 142, { "file": [ - 380, + 387, "Upload!" ] } @@ -7321,7 +7495,7 @@ export default { 142, { "file": [ - 380, + 387, "Upload!" ] } @@ -7330,7 +7504,7 @@ export default { 142, { "file": [ - 380, + 387, "Upload!" ] } @@ -7339,7 +7513,7 @@ export default { 142, { "file": [ - 380, + 387, "Upload!" ] } @@ -7348,7 +7522,7 @@ export default { 142, { "file": [ - 380, + 387, "Upload!" ] } @@ -7357,7 +7531,7 @@ export default { 142, { "file": [ - 380, + 387, "Upload!" ], "fieldMetadataId": [ @@ -7370,7 +7544,7 @@ export default { 142, { "file": [ - 380, + 387, "Upload!" ], "fieldMetadataUniversalIdentifier": [ @@ -7383,7 +7557,7 @@ export default { 52, { "input": [ - 381, + 388, "CreateViewFilterGroupInput!" ] } @@ -7396,7 +7570,7 @@ export default { "String!" ], "input": [ - 382, + 389, "UpdateViewFilterGroupInput!" ] } @@ -7423,7 +7597,7 @@ export default { 54, { "input": [ - 383, + 390, "CreateViewFilterInput!" ] } @@ -7432,7 +7606,7 @@ export default { 54, { "input": [ - 384, + 391, "UpdateViewFilterInput!" ] } @@ -7441,7 +7615,7 @@ export default { 54, { "input": [ - 386, + 393, "DeleteViewFilterInput!" ] } @@ -7450,7 +7624,7 @@ export default { 54, { "input": [ - 387, + 394, "DestroyViewFilterInput!" ] } @@ -7459,7 +7633,7 @@ export default { 60, { "input": [ - 388, + 395, "CreateViewInput!" ] } @@ -7472,7 +7646,7 @@ export default { "String!" ], "input": [ - 389, + 396, "UpdateViewInput!" ] } @@ -7499,7 +7673,7 @@ export default { 57, { "input": [ - 390, + 397, "CreateViewSortInput!" ] } @@ -7508,7 +7682,7 @@ export default { 57, { "input": [ - 391, + 398, "UpdateViewSortInput!" ] } @@ -7517,7 +7691,7 @@ export default { 6, { "input": [ - 393, + 400, "DeleteViewSortInput!" ] } @@ -7526,7 +7700,7 @@ export default { 6, { "input": [ - 394, + 401, "DestroyViewSortInput!" ] } @@ -7535,7 +7709,7 @@ export default { 50, { "input": [ - 395, + 402, "UpdateViewFieldInput!" ] } @@ -7544,7 +7718,7 @@ export default { 50, { "input": [ - 397, + 404, "CreateViewFieldInput!" ] } @@ -7553,7 +7727,7 @@ export default { 50, { "inputs": [ - 397, + 404, "[CreateViewFieldInput!]!" ] } @@ -7562,7 +7736,7 @@ export default { 50, { "input": [ - 398, + 405, "DeleteViewFieldInput!" ] } @@ -7571,7 +7745,7 @@ export default { 50, { "input": [ - 399, + 406, "DestroyViewFieldInput!" ] } @@ -7580,7 +7754,7 @@ export default { 59, { "input": [ - 400, + 407, "UpdateViewFieldGroupInput!" ] } @@ -7589,7 +7763,7 @@ export default { 59, { "input": [ - 402, + 409, "CreateViewFieldGroupInput!" ] } @@ -7598,7 +7772,7 @@ export default { 59, { "inputs": [ - 402, + 409, "[CreateViewFieldGroupInput!]!" ] } @@ -7607,7 +7781,7 @@ export default { 59, { "input": [ - 403, + 410, "DeleteViewFieldGroupInput!" ] } @@ -7616,7 +7790,7 @@ export default { 59, { "input": [ - 404, + 411, "DestroyViewFieldGroupInput!" ] } @@ -7625,7 +7799,7 @@ export default { 60, { "input": [ - 405, + 412, "UpsertFieldsWidgetInput!" ] } @@ -7634,7 +7808,7 @@ export default { 2, { "input": [ - 408, + 415, "CreateApiKeyInput!" ] } @@ -7643,7 +7817,7 @@ export default { 2, { "input": [ - 409, + 416, "UpdateApiKeyInput!" ] } @@ -7652,7 +7826,7 @@ export default { 2, { "input": [ - 410, + 417, "RevokeApiKeyInput!" ] } @@ -7694,7 +7868,7 @@ export default { 116, { "type": [ - 411, + 418, "AnalyticsType!" ], "name": [ @@ -7807,7 +7981,7 @@ export default { 141, { "input": [ - 412, + 419, "CreateApprovedAccessDomainInput!" ] } @@ -7816,7 +7990,7 @@ export default { 6, { "input": [ - 413, + 420, "DeleteApprovedAccessDomainInput!" ] } @@ -7825,7 +7999,7 @@ export default { 141, { "input": [ - 414, + 421, "ValidateApprovedAccessDomainInput!" ] } @@ -7834,7 +8008,7 @@ export default { 113, { "input": [ - 415, + 422, "CreatePageLayoutTabInput!" ] } @@ -7847,7 +8021,7 @@ export default { "String!" ], "input": [ - 416, + 423, "UpdatePageLayoutTabInput!" ] } @@ -7865,7 +8039,7 @@ export default { 114, { "input": [ - 417, + 424, "CreatePageLayoutInput!" ] } @@ -7878,7 +8052,7 @@ export default { "String!" ], "input": [ - 418, + 425, "UpdatePageLayoutInput!" ] } @@ -7900,7 +8074,7 @@ export default { "String!" ], "input": [ - 419, + 426, "UpdatePageLayoutWithTabsInput!" ] } @@ -7927,7 +8101,7 @@ export default { 75, { "input": [ - 423, + 430, "CreatePageLayoutWidgetInput!" ] } @@ -7940,7 +8114,7 @@ export default { "String!" ], "input": [ - 424, + 431, "UpdatePageLayoutWidgetInput!" ] } @@ -7958,7 +8132,7 @@ export default { 32, { "input": [ - 355, + 362, "LogicFunctionIdInput!" ] } @@ -7967,7 +8141,7 @@ export default { 32, { "input": [ - 425, + 432, "CreateLogicFunctionFromSourceInput!" ] } @@ -7976,7 +8150,7 @@ export default { 155, { "input": [ - 426, + 433, "ExecuteOneLogicFunctionInput!" ] } @@ -7985,31 +8159,31 @@ export default { 6, { "input": [ - 427, + 434, "UpdateLogicFunctionFromSourceInput!" ] } ], "createCommandMenuItem": [ - 295, + 302, { "input": [ - 429, + 436, "CreateCommandMenuItemInput!" ] } ], "updateCommandMenuItem": [ - 295, + 302, { "input": [ - 430, + 437, "UpdateCommandMenuItemInput!" ] } ], "deleteCommandMenuItem": [ - 295, + 302, { "id": [ 3, @@ -8018,25 +8192,25 @@ export default { } ], "createFrontComponent": [ - 252, + 259, { "input": [ - 431, + 438, "CreateFrontComponentInput!" ] } ], "updateFrontComponent": [ - 252, + 259, { "input": [ - 432, + 439, "UpdateFrontComponentInput!" ] } ], "deleteFrontComponent": [ - 252, + 259, { "id": [ 3, @@ -8048,7 +8222,7 @@ export default { 46, { "input": [ - 434, + 441, "CreateOneObjectInput!" ] } @@ -8057,7 +8231,7 @@ export default { 46, { "input": [ - 436, + 443, "DeleteOneObjectInput!" ] } @@ -8066,7 +8240,7 @@ export default { 46, { "input": [ - 437, + 444, "UpdateOneObjectInput!" ] } @@ -8075,7 +8249,7 @@ export default { 25, { "input": [ - 439, + 446, "CreateAgentInput!" ] } @@ -8084,7 +8258,7 @@ export default { 25, { "input": [ - 440, + 447, "UpdateAgentInput!" ] } @@ -8093,7 +8267,7 @@ export default { 25, { "input": [ - 357, + 364, "AgentIdInput!" ] } @@ -8115,7 +8289,7 @@ export default { 29, { "createRoleInput": [ - 441, + 448, "CreateRoleInput!" ] } @@ -8124,7 +8298,7 @@ export default { 29, { "updateRoleInput": [ - 442, + 449, "UpdateRoleInput!" ] } @@ -8142,7 +8316,7 @@ export default { 16, { "upsertObjectPermissionsInput": [ - 444, + 451, "UpsertObjectPermissionsInput!" ] } @@ -8151,7 +8325,7 @@ export default { 27, { "upsertPermissionFlagsInput": [ - 446, + 453, "UpsertPermissionFlagsInput!" ] } @@ -8160,16 +8334,16 @@ export default { 26, { "upsertFieldPermissionsInput": [ - 447, + 454, "UpsertFieldPermissionsInput!" ] } ], "upsertRowLevelPermissionPredicates": [ - 246, + 253, { "input": [ - 449, + 456, "UpsertRowLevelPermissionPredicatesInput!" ] } @@ -8200,7 +8374,7 @@ export default { 34, { "input": [ - 452, + 459, "CreateOneFieldMetadataInput!" ] } @@ -8209,7 +8383,7 @@ export default { 34, { "input": [ - 454, + 461, "UpdateOneFieldMetadataInput!" ] } @@ -8218,7 +8392,7 @@ export default { 34, { "input": [ - 456, + 463, "DeleteOneFieldInput!" ] } @@ -8227,7 +8401,7 @@ export default { 56, { "input": [ - 457, + 464, "CreateViewGroupInput!" ] } @@ -8236,7 +8410,7 @@ export default { 56, { "inputs": [ - 457, + 464, "[CreateViewGroupInput!]!" ] } @@ -8245,7 +8419,7 @@ export default { 56, { "input": [ - 458, + 465, "UpdateViewGroupInput!" ] } @@ -8254,7 +8428,7 @@ export default { 56, { "inputs": [ - 458, + 465, "[UpdateViewGroupInput!]!" ] } @@ -8263,7 +8437,7 @@ export default { 56, { "input": [ - 460, + 467, "DeleteViewGroupInput!" ] } @@ -8272,40 +8446,40 @@ export default { 56, { "input": [ - 461, + 468, "DestroyViewGroupInput!" ] } ], "updateMessageFolder": [ - 345, + 352, { "input": [ - 462, + 469, "UpdateMessageFolderInput!" ] } ], "updateMessageFolders": [ - 345, + 352, { "input": [ - 464, + 471, "UpdateMessageFoldersInput!" ] } ], "updateMessageChannel": [ - 337, + 344, { "input": [ - 465, + 472, "UpdateMessageChannelInput!" ] } ], "deleteConnectedAccount": [ - 312, + 319, { "id": [ 3, @@ -8314,34 +8488,34 @@ export default { } ], "updateCalendarChannel": [ - 332, + 339, { "input": [ - 467, + 474, "UpdateCalendarChannelInput!" ] } ], "createWebhook": [ - 352, + 359, { "input": [ - 469, + 476, "CreateWebhookInput!" ] } ], "updateWebhook": [ - 352, + 359, { "input": [ - 470, + 477, "UpdateWebhookInput!" ] } ], "deleteWebhook": [ - 352, + 359, { "id": [ 3, @@ -8350,10 +8524,10 @@ export default { } ], "createChatThread": [ - 321 + 328 ], "sendChatMessage": [ - 326, + 333, { "threadId": [ 3, @@ -8398,25 +8572,25 @@ export default { } ], "createSkill": [ - 320, + 327, { "input": [ - 472, + 479, "CreateSkillInput!" ] } ], "updateSkill": [ - 320, + 327, { "input": [ - 473, + 480, "UpdateSkillInput!" ] } ], "deleteSkill": [ - 320, + 327, { "id": [ 3, @@ -8425,7 +8599,7 @@ export default { } ], "activateSkill": [ - 320, + 327, { "id": [ 3, @@ -8434,7 +8608,7 @@ export default { } ], "deactivateSkill": [ - 320, + 327, { "id": [ 3, @@ -8443,7 +8617,7 @@ export default { } ], "evaluateAgentTurn": [ - 330, + 337, { "turnId": [ 3, @@ -8452,7 +8626,7 @@ export default { } ], "runEvaluationInput": [ - 331, + 338, { "agentId": [ 3, @@ -8465,7 +8639,7 @@ export default { } ], "duplicateDashboard": [ - 311, + 318, { "id": [ 3, @@ -8474,16 +8648,16 @@ export default { } ], "getAuthorizationUrlForSSO": [ - 261, + 268, { "input": [ - 474, + 481, "GetAuthorizationUrlForSSOInput!" ] } ], "getLoginTokenFromCredentials": [ - 270, + 277, { "email": [ 1, @@ -8509,7 +8683,7 @@ export default { } ], "signIn": [ - 259, + 266, { "email": [ 1, @@ -8531,7 +8705,7 @@ export default { } ], "verifyEmailAndGetLoginToken": [ - 267, + 274, { "emailVerificationToken": [ 1, @@ -8551,7 +8725,7 @@ export default { } ], "verifyEmailAndGetWorkspaceAgnosticToken": [ - 259, + 266, { "emailVerificationToken": [ 1, @@ -8567,7 +8741,7 @@ export default { } ], "getAuthTokensFromOTP": [ - 269, + 276, { "otp": [ 1, @@ -8587,7 +8761,7 @@ export default { } ], "signUp": [ - 259, + 266, { "email": [ 1, @@ -8609,7 +8783,7 @@ export default { } ], "signUpInWorkspace": [ - 264, + 271, { "email": [ 1, @@ -8640,13 +8814,13 @@ export default { } ], "signUpInNewWorkspace": [ - 264 + 271 ], "generateTransientToken": [ - 265 + 272 ], "getAuthTokensFromLoginToken": [ - 269, + 276, { "loginToken": [ 1, @@ -8659,7 +8833,7 @@ export default { } ], "authorizeApp": [ - 257, + 264, { "clientId": [ 1, @@ -8681,7 +8855,7 @@ export default { } ], "renewToken": [ - 269, + 276, { "appToken": [ 1, @@ -8690,7 +8864,7 @@ export default { } ], "generateApiKeyToken": [ - 268, + 275, { "apiKeyId": [ 3, @@ -8703,7 +8877,7 @@ export default { } ], "emailPasswordResetLink": [ - 260, + 267, { "email": [ 1, @@ -8715,7 +8889,7 @@ export default { } ], "updatePasswordViaResetToken": [ - 262, + 269, { "passwordResetToken": [ 1, @@ -8728,10 +8902,10 @@ export default { } ], "createApplicationRegistration": [ - 217, + 224, { "input": [ - 475, + 482, "CreateApplicationRegistrationInput!" ] } @@ -8740,7 +8914,7 @@ export default { 7, { "input": [ - 476, + 483, "UpdateApplicationRegistrationInput!" ] } @@ -8755,7 +8929,7 @@ export default { } ], "rotateApplicationRegistrationClientSecret": [ - 219, + 226, { "id": [ 1, @@ -8767,7 +8941,7 @@ export default { 5, { "input": [ - 478, + 485, "CreateApplicationRegistrationVariableInput!" ] } @@ -8776,7 +8950,7 @@ export default { 5, { "input": [ - 479, + 486, "UpdateApplicationRegistrationVariableInput!" ] } @@ -8794,7 +8968,7 @@ export default { 7, { "file": [ - 380, + 387, "Upload!" ], "universalIdentifier": [ @@ -8816,7 +8990,7 @@ export default { } ], "initiateOTPProvisioning": [ - 255, + 262, { "loginToken": [ 1, @@ -8829,10 +9003,10 @@ export default { } ], "initiateOTPProvisioningForAuthenticatedUser": [ - 255 + 262 ], "deleteTwoFactorAuthenticationMethod": [ - 254, + 261, { "twoFactorAuthenticationMethodId": [ 3, @@ -8841,7 +9015,7 @@ export default { } ], "verifyTwoFactorAuthenticationMethodForAuthenticatedUser": [ - 256, + 263, { "otp": [ 1, @@ -8874,7 +9048,7 @@ export default { } ], "resendEmailVerificationToken": [ - 220, + 227, { "email": [ 1, @@ -8890,7 +9064,7 @@ export default { 66, { "data": [ - 481, + 488, "ActivateWorkspaceInput!" ] } @@ -8899,7 +9073,7 @@ export default { 66, { "data": [ - 482, + 489, "UpdateWorkspaceInput!" ] } @@ -8908,46 +9082,46 @@ export default { 66 ], "checkCustomDomainValidRecords": [ - 233 + 240 ], "createOIDCIdentityProvider": [ - 225, + 232, { "input": [ - 483, + 490, "SetupOIDCSsoInput!" ] } ], "createSAMLIdentityProvider": [ - 225, + 232, { "input": [ - 484, + 491, "SetupSAMLSsoInput!" ] } ], "deleteSSOIdentityProvider": [ - 221, + 228, { "input": [ - 485, + 492, "DeleteSsoInput!" ] } ], "editSSOIdentityProvider": [ - 222, + 229, { "input": [ - 486, + 493, "EditSsoInput!" ] } ], "impersonate": [ - 273, + 280, { "userId": [ 3, @@ -8960,16 +9134,16 @@ export default { } ], "sendEmail": [ - 316, + 323, { "input": [ - 487, + 494, "SendEmailInput!" ] } ], "startChannelSync": [ - 303, + 310, { "connectedAccountId": [ 3, @@ -8978,7 +9152,7 @@ export default { } ], "saveImapSmtpCaldavAccount": [ - 293, + 300, { "accountOwnerId": [ 3, @@ -8989,7 +9163,7 @@ export default { "String!" ], "connectionParameters": [ - 489, + 496, "EmailAccountConnectionParameters!" ], "id": [ @@ -8998,23 +9172,14 @@ export default { } ], "updateLabPublicFeatureFlag": [ - 200, + 157, { "input": [ - 491, + 498, "UpdateLabPublicFeatureFlagInput!" ] } ], - "userLookupAdminPanel": [ - 203, - { - "userIdentifier": [ - 1, - "String!" - ] - } - ], "updateWorkspaceFeatureFlag": [ 6, { @@ -9088,7 +9253,7 @@ export default { 6, { "role": [ - 492, + 499, "AiModelRole!" ], "modelId": [ @@ -9133,7 +9298,7 @@ export default { } ], "retryJobs": [ - 195, + 206, { "queueName": [ 1, @@ -9146,7 +9311,7 @@ export default { } ], "deleteJobs": [ - 190, + 201, { "queueName": [ 1, @@ -9226,13 +9391,13 @@ export default { 6 ], "enablePostgresProxy": [ - 294 + 301 ], "disablePostgresProxy": [ - 294 + 301 ], "createPublicDomain": [ - 282, + 289, { "domain": [ 1, @@ -9250,7 +9415,7 @@ export default { } ], "checkPublicDomainValidRecords": [ - 233, + 240, { "domain": [ 1, @@ -9259,14 +9424,14 @@ export default { } ], "createEmailingDomain": [ - 284, + 291, { "domain": [ 1, "String!" ], "driver": [ - 285, + 292, "EmailingDomainDriver!" ] } @@ -9281,7 +9446,7 @@ export default { } ], "verifyEmailingDomain": [ - 284, + 291, { "id": [ 1, @@ -9293,7 +9458,7 @@ export default { 68, { "input": [ - 493, + 500, "CreateOneAppTokenInput!" ] } @@ -9329,7 +9494,7 @@ export default { 6, { "workspaceMigration": [ - 495, + 502, "WorkspaceMigrationInput!" ] } @@ -9361,7 +9526,7 @@ export default { } ], "createDevelopmentApplication": [ - 277, + 284, { "universalIdentifier": [ 1, @@ -9374,7 +9539,7 @@ export default { } ], "generateApplicationToken": [ - 251, + 258, { "applicationId": [ 3, @@ -9383,7 +9548,7 @@ export default { } ], "syncApplication": [ - 278, + 285, { "manifest": [ 15, @@ -9392,10 +9557,10 @@ export default { } ], "uploadApplicationFile": [ - 279, + 286, { "file": [ - 380, + 387, "Upload!" ], "applicationUniversalIdentifier": [ @@ -9403,7 +9568,7 @@ export default { "String!" ], "fileFolder": [ - 498, + 505, "FileFolder!" ], "filePath": [ @@ -9426,7 +9591,7 @@ export default { } ], "renewApplicationToken": [ - 251, + 258, { "applicationRefreshToken": [ 1, @@ -9509,7 +9674,7 @@ export default { 3 ], "update": [ - 379 + 386 ], "__typename": [ 1 @@ -9613,7 +9778,7 @@ export default { 3 ], "update": [ - 385 + 392 ], "__typename": [ 1 @@ -9786,7 +9951,7 @@ export default { 3 ], "update": [ - 392 + 399 ], "__typename": [ 1 @@ -9821,7 +9986,7 @@ export default { 3 ], "update": [ - 396 + 403 ], "__typename": [ 1 @@ -9897,7 +10062,7 @@ export default { 3 ], "update": [ - 401 + 408 ], "__typename": [ 1 @@ -9961,10 +10126,10 @@ export default { 3 ], "groups": [ - 406 + 413 ], "fields": [ - 407 + 414 ], "__typename": [ 1 @@ -9984,7 +10149,7 @@ export default { 6 ], "fields": [ - 407 + 414 ], "__typename": [ 1 @@ -10153,7 +10318,7 @@ export default { 3 ], "tabs": [ - 420 + 427 ], "__typename": [ 1 @@ -10176,7 +10341,7 @@ export default { 79 ], "widgets": [ - 421 + 428 ], "__typename": [ 1 @@ -10199,7 +10364,7 @@ export default { 3 ], "gridPosition": [ - 422 + 429 ], "position": [ 15 @@ -10248,7 +10413,7 @@ export default { 3 ], "gridPosition": [ - 422 + 429 ], "position": [ 15 @@ -10274,7 +10439,7 @@ export default { 3 ], "gridPosition": [ - 422 + 429 ], "position": [ 15 @@ -10346,7 +10511,7 @@ export default { 3 ], "update": [ - 428 + 435 ], "__typename": [ 1 @@ -10398,7 +10563,7 @@ export default { 3 ], "engineComponentKey": [ - 296 + 303 ], "label": [ 1 @@ -10416,7 +10581,7 @@ export default { 6 ], "availabilityType": [ - 297 + 304 ], "hotKeys": [ 1 @@ -10454,13 +10619,13 @@ export default { 6 ], "availabilityType": [ - 297 + 304 ], "availabilityObjectMetadataId": [ 3 ], "engineComponentKey": [ - 296 + 303 ], "hotKeys": [ 1 @@ -10500,7 +10665,7 @@ export default { 3 ], "update": [ - 433 + 440 ], "__typename": [ 1 @@ -10519,7 +10684,7 @@ export default { }, "CreateOneObjectInput": { "object": [ - 435 + 442 ], "__typename": [ 1 @@ -10579,7 +10744,7 @@ export default { }, "UpdateOneObjectInput": { "update": [ - 438 + 445 ], "id": [ 3 @@ -10751,7 +10916,7 @@ export default { }, "UpdateRoleInput": { "update": [ - 443 + 450 ], "id": [ 3 @@ -10806,7 +10971,7 @@ export default { 3 ], "objectPermissions": [ - 445 + 452 ], "__typename": [ 1 @@ -10848,7 +11013,7 @@ export default { 3 ], "fieldPermissions": [ - 448 + 455 ], "__typename": [ 1 @@ -10879,10 +11044,10 @@ export default { 3 ], "predicates": [ - 450 + 457 ], "predicateGroups": [ - 451 + 458 ], "__typename": [ 1 @@ -10942,7 +11107,7 @@ export default { }, "CreateOneFieldMetadataInput": { "field": [ - 453 + 460 ], "__typename": [ 1 @@ -11015,7 +11180,7 @@ export default { 3 ], "update": [ - 455 + 462 ], "__typename": [ 1 @@ -11107,7 +11272,7 @@ export default { 3 ], "update": [ - 459 + 466 ], "__typename": [ 1 @@ -11151,7 +11316,7 @@ export default { 3 ], "update": [ - 463 + 470 ], "__typename": [ 1 @@ -11170,7 +11335,7 @@ export default { 3 ], "update": [ - 463 + 470 ], "__typename": [ 1 @@ -11181,7 +11346,7 @@ export default { 3 ], "update": [ - 466 + 473 ], "__typename": [ 1 @@ -11189,16 +11354,16 @@ export default { }, "UpdateMessageChannelInputUpdates": { "visibility": [ - 338 + 345 ], "isContactAutoCreationEnabled": [ 6 ], "contactAutoCreationPolicy": [ - 340 + 347 ], "messageFolderImportPolicy": [ - 341 + 348 ], "isSyncEnabled": [ 6 @@ -11218,7 +11383,7 @@ export default { 3 ], "update": [ - 468 + 475 ], "__typename": [ 1 @@ -11226,13 +11391,13 @@ export default { }, "UpdateCalendarChannelInputUpdates": { "visibility": [ - 335 + 342 ], "isContactAutoCreationEnabled": [ 6 ], "contactAutoCreationPolicy": [ - 336 + 343 ], "isSyncEnabled": [ 6 @@ -11266,7 +11431,7 @@ export default { 3 ], "update": [ - 471 + 478 ], "__typename": [ 1 @@ -11371,7 +11536,7 @@ export default { 1 ], "update": [ - 477 + 484 ], "__typename": [ 1 @@ -11419,7 +11584,7 @@ export default { 1 ], "update": [ - 480 + 487 ], "__typename": [ 1 @@ -11571,7 +11736,7 @@ export default { 3 ], "status": [ - 161 + 173 ], "__typename": [ 1 @@ -11600,7 +11765,7 @@ export default { 1 ], "files": [ - 488 + 495 ], "__typename": [ 1 @@ -11619,13 +11784,13 @@ export default { }, "EmailAccountConnectionParameters": { "IMAP": [ - 490 + 497 ], "SMTP": [ - 490 + 497 ], "CALDAV": [ - 490 + 497 ], "__typename": [ 1 @@ -11665,7 +11830,7 @@ export default { "AiModelRole": {}, "CreateOneAppTokenInput": { "appToken": [ - 494 + 501 ], "__typename": [ 1 @@ -11681,7 +11846,7 @@ export default { }, "WorkspaceMigrationInput": { "actions": [ - 496 + 503 ], "__typename": [ 1 @@ -11689,10 +11854,10 @@ export default { }, "WorkspaceMigrationDeleteActionInput": { "type": [ - 497 + 504 ], "metadataName": [ - 348 + 355 ], "universalIdentifier": [ 1 @@ -11714,16 +11879,16 @@ export default { } ], "logicFunctionLogs": [ - 253, + 260, { "input": [ - 500, + 507, "LogicFunctionLogsInput!" ] } ], "onAgentChatEvent": [ - 327, + 334, { "threadId": [ 3, diff --git a/packages/twenty-front/src/generated-metadata/graphql.ts b/packages/twenty-front/src/generated-metadata/graphql.ts index 705dbfb46b..79036d7b2b 100644 --- a/packages/twenty-front/src/generated-metadata/graphql.ts +++ b/packages/twenty-front/src/generated-metadata/graphql.ts @@ -70,6 +70,27 @@ export type AdminAiModels = { models: Array; }; +export type AdminChatMessage = { + __typename?: 'AdminChatMessage'; + createdAt: Scalars['DateTime']; + id: Scalars['UUID']; + parts: Array; + role: AgentMessageRole; +}; + +export type AdminChatMessagePart = { + __typename?: 'AdminChatMessagePart'; + textContent?: Maybe; + toolName?: Maybe; + type: Scalars['String']; +}; + +export type AdminChatThreadMessages = { + __typename?: 'AdminChatThreadMessages'; + messages: Array; + thread: AdminWorkspaceChatThread; +}; + export type AdminPanelHealthServiceData = { __typename?: 'AdminPanelHealthServiceData'; description: Scalars['String']; @@ -86,6 +107,25 @@ export enum AdminPanelHealthServiceStatus { OUTAGE = 'OUTAGE' } +export type AdminPanelRecentUser = { + __typename?: 'AdminPanelRecentUser'; + createdAt: Scalars['DateTime']; + email: Scalars['String']; + firstName?: Maybe; + id: Scalars['UUID']; + lastName?: Maybe; + workspaceId?: Maybe; + workspaceName?: Maybe; +}; + +export type AdminPanelTopWorkspace = { + __typename?: 'AdminPanelTopWorkspace'; + id: Scalars['UUID']; + name: Scalars['String']; + subdomain: Scalars['String']; + totalUsers: Scalars['Int']; +}; + export type AdminPanelWorkerQueueHealth = { __typename?: 'AdminPanelWorkerQueueHealth'; id: Scalars['String']; @@ -93,6 +133,17 @@ export type AdminPanelWorkerQueueHealth = { status: AdminPanelHealthServiceStatus; }; +export type AdminWorkspaceChatThread = { + __typename?: 'AdminWorkspaceChatThread'; + conversationSize: Scalars['Int']; + createdAt: Scalars['DateTime']; + id: Scalars['UUID']; + title?: Maybe; + totalInputTokens: Scalars['Int']; + totalOutputTokens: Scalars['Int']; + updatedAt: Scalars['DateTime']; +}; + export type Agent = { __typename?: 'Agent'; applicationId?: Maybe; @@ -214,6 +265,13 @@ export type AgentMessagePart = { type: Scalars['String']; }; +/** Role of a message in a chat thread */ +export enum AgentMessageRole { + ASSISTANT = 'ASSISTANT', + SYSTEM = 'SYSTEM', + USER = 'USER' +} + export type AgentTurn = { __typename?: 'AgentTurn'; agentId?: Maybe; @@ -2744,7 +2802,6 @@ export type Mutation = { upsertObjectPermissions: Array; upsertPermissionFlags: Array; upsertRowLevelPermissionPredicates: UpsertRowLevelPermissionPredicatesResult; - userLookupAdminPanel: UserLookup; validateApprovedAccessDomain: ApprovedAccessDomain; verifyEmailAndGetLoginToken: VerifyEmailAndGetLoginToken; verifyEmailAndGetWorkspaceAgnosticToken: AvailableWorkspacesAndAccessTokens; @@ -3806,11 +3863,6 @@ export type MutationUpsertRowLevelPermissionPredicatesArgs = { }; -export type MutationUserLookupAdminPanelArgs = { - userIdentifier: Scalars['String']; -}; - - export type MutationValidateApprovedAccessDomainArgs = { input: ValidateApprovedAccessDomainInput; }; @@ -4314,6 +4366,8 @@ export type PublicWorkspaceData = { export type Query = { __typename?: 'Query'; + adminPanelRecentUsers: Array; + adminPanelTopWorkspaces: Array; agentTurns: Array; apiKey?: Maybe; apiKeys: Array; @@ -4362,6 +4416,8 @@ export type Query = { getAddressDetails: PlaceDetailsResult; getAdminAiModels: AdminAiModels; getAdminAiUsageByWorkspace: Array; + getAdminChatThreadMessages: AdminChatThreadMessages; + getAdminWorkspaceChatThreads: Array; getAiProviders: Scalars['JSON']; getApprovedAccessDomains: Array; getAutoCompleteAddress: Array; @@ -4423,10 +4479,22 @@ export type Query = { pieChartData: PieChartData; skill?: Maybe; skills: Array; + userLookupAdminPanel: UserLookup; validatePasswordResetToken: ValidatePasswordResetToken; versionInfo: VersionInfo; webhook?: Maybe; webhooks: Array; + workspaceLookupAdminPanel: UserLookup; +}; + + +export type QueryAdminPanelRecentUsersArgs = { + searchTerm?: InputMaybe; +}; + + +export type QueryAdminPanelTopWorkspacesArgs = { + searchTerm?: InputMaybe; }; @@ -4592,6 +4660,16 @@ export type QueryGetAdminAiUsageByWorkspaceArgs = { }; +export type QueryGetAdminChatThreadMessagesArgs = { + threadId: Scalars['UUID']; +}; + + +export type QueryGetAdminWorkspaceChatThreadsArgs = { + workspaceId: Scalars['UUID']; +}; + + export type QueryGetAutoCompleteAddressArgs = { address: Scalars['String']; country?: InputMaybe; @@ -4818,6 +4896,11 @@ export type QuerySkillArgs = { }; +export type QueryUserLookupAdminPanelArgs = { + userIdentifier: Scalars['String']; +}; + + export type QueryValidatePasswordResetTokenArgs = { passwordResetToken: Scalars['String']; }; @@ -4827,6 +4910,11 @@ export type QueryWebhookArgs = { id: Scalars['UUID']; }; + +export type QueryWorkspaceLookupAdminPanelArgs = { + workspaceId: Scalars['UUID']; +}; + export type QueueJob = { __typename?: 'QueueJob'; attemptsMade: Scalars['Float']; @@ -5850,6 +5938,7 @@ export type User = { export type UserInfo = { __typename?: 'UserInfo'; + createdAt: Scalars['DateTime']; email: Scalars['String']; firstName?: Maybe; id: Scalars['UUID']; @@ -6258,7 +6347,9 @@ export enum WorkspaceActivationStatus { export type WorkspaceInfo = { __typename?: 'WorkspaceInfo'; + activationStatus: WorkspaceActivationStatus; allowImpersonation: Scalars['Boolean']; + createdAt: Scalars['DateTime']; featureFlags: Array; id: Scalars['UUID']; logo?: Maybe; @@ -7367,6 +7458,8 @@ export type GetDatabaseConfigVariableQueryVariables = Exact<{ export type GetDatabaseConfigVariableQuery = { __typename?: 'Query', getDatabaseConfigVariable: { __typename?: 'ConfigVariable', name: string, description: string, value?: any | null, isSensitive: boolean, isEnvOnly: boolean, type: ConfigVariableType, options?: any | null, source: ConfigSource } }; +export type UserInfoFragmentFragment = { __typename?: 'UserInfo', id: string, email: string, firstName?: string | null, lastName?: string | null, createdAt: string }; + export type UpdateWorkspaceFeatureFlagMutationVariables = Exact<{ workspaceId: Scalars['UUID']; featureFlag: Scalars['String']; @@ -7376,18 +7469,53 @@ export type UpdateWorkspaceFeatureFlagMutationVariables = Exact<{ export type UpdateWorkspaceFeatureFlagMutation = { __typename?: 'Mutation', updateWorkspaceFeatureFlag: boolean }; -export type UserLookupAdminPanelMutationVariables = Exact<{ - userIdentifier: Scalars['String']; +export type AdminPanelRecentUsersQueryVariables = Exact<{ + searchTerm?: InputMaybe; }>; -export type UserLookupAdminPanelMutation = { __typename?: 'Mutation', userLookupAdminPanel: { __typename?: 'UserLookup', user: { __typename?: 'UserInfo', id: string, email: string, firstName?: string | null, lastName?: string | null }, workspaces: Array<{ __typename?: 'WorkspaceInfo', id: string, name: string, logo?: string | null, totalUsers: number, allowImpersonation: boolean, workspaceUrls: { __typename?: 'WorkspaceUrls', customUrl?: string | null, subdomainUrl: string }, users: Array<{ __typename?: 'UserInfo', id: string, email: string, firstName?: string | null, lastName?: string | null }>, featureFlags: Array<{ __typename?: 'FeatureFlag', key: FeatureFlagKey, value: boolean }> }> } }; +export type AdminPanelRecentUsersQuery = { __typename?: 'Query', adminPanelRecentUsers: Array<{ __typename?: 'AdminPanelRecentUser', id: string, email: string, firstName?: string | null, lastName?: string | null, createdAt: string, workspaceName?: string | null, workspaceId?: string | null }> }; + +export type AdminPanelTopWorkspacesQueryVariables = Exact<{ + searchTerm?: InputMaybe; +}>; + + +export type AdminPanelTopWorkspacesQuery = { __typename?: 'Query', adminPanelTopWorkspaces: Array<{ __typename?: 'AdminPanelTopWorkspace', id: string, name: string, totalUsers: number, subdomain: string }> }; + +export type GetAdminChatThreadMessagesQueryVariables = Exact<{ + threadId: Scalars['UUID']; +}>; + + +export type GetAdminChatThreadMessagesQuery = { __typename?: 'Query', getAdminChatThreadMessages: { __typename?: 'AdminChatThreadMessages', thread: { __typename?: 'AdminWorkspaceChatThread', id: string, title?: string | null, totalInputTokens: number, totalOutputTokens: number, conversationSize: number, createdAt: string, updatedAt: string }, messages: Array<{ __typename?: 'AdminChatMessage', id: string, role: AgentMessageRole, createdAt: string, parts: Array<{ __typename?: 'AdminChatMessagePart', type: string, textContent?: string | null, toolName?: string | null }> }> } }; + +export type GetAdminWorkspaceChatThreadsQueryVariables = Exact<{ + workspaceId: Scalars['UUID']; +}>; + + +export type GetAdminWorkspaceChatThreadsQuery = { __typename?: 'Query', getAdminWorkspaceChatThreads: Array<{ __typename?: 'AdminWorkspaceChatThread', id: string, title?: string | null, totalInputTokens: number, totalOutputTokens: number, conversationSize: number, createdAt: string, updatedAt: string }> }; export type GetVersionInfoQueryVariables = Exact<{ [key: string]: never; }>; export type GetVersionInfoQuery = { __typename?: 'Query', versionInfo: { __typename?: 'VersionInfo', currentVersion?: string | null, latestVersion: string } }; +export type UserLookupAdminPanelQueryVariables = Exact<{ + userIdentifier: Scalars['String']; +}>; + + +export type UserLookupAdminPanelQuery = { __typename?: 'Query', userLookupAdminPanel: { __typename?: 'UserLookup', user: { __typename?: 'UserInfo', id: string, email: string, firstName?: string | null, lastName?: string | null, createdAt: string }, workspaces: Array<{ __typename?: 'WorkspaceInfo', id: string, name: string, logo?: string | null, totalUsers: number, activationStatus: WorkspaceActivationStatus, createdAt: string, allowImpersonation: boolean, workspaceUrls: { __typename?: 'WorkspaceUrls', customUrl?: string | null, subdomainUrl: string }, users: Array<{ __typename?: 'UserInfo', id: string, email: string, firstName?: string | null, lastName?: string | null }>, featureFlags: Array<{ __typename?: 'FeatureFlag', key: FeatureFlagKey, value: boolean }> }> } }; + +export type WorkspaceLookupAdminPanelQueryVariables = Exact<{ + workspaceId: Scalars['UUID']; +}>; + + +export type WorkspaceLookupAdminPanelQuery = { __typename?: 'Query', workspaceLookupAdminPanel: { __typename?: 'UserLookup', user: { __typename?: 'UserInfo', id: string, email: string, firstName?: string | null, lastName?: string | null, createdAt: string }, workspaces: Array<{ __typename?: 'WorkspaceInfo', id: string, name: string, allowImpersonation: boolean, logo?: string | null, totalUsers: number, activationStatus: WorkspaceActivationStatus, createdAt: string, workspaceUrls: { __typename?: 'WorkspaceUrls', customUrl?: string | null, subdomainUrl: string }, users: Array<{ __typename?: 'UserInfo', id: string, email: string, firstName?: string | null, lastName?: string | null }>, featureFlags: Array<{ __typename?: 'FeatureFlag', key: FeatureFlagKey, value: boolean }> }> } }; + export type DeleteJobsMutationVariables = Exact<{ queueName: Scalars['String']; jobIds: Array | Scalars['String']; @@ -8395,6 +8523,7 @@ 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; 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; export const PublicConnectionParamsFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"PublicConnectionParams"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"PublicConnectionParametersOutput"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"host"}},{"kind":"Field","name":{"kind":"Name","value":"port"}},{"kind":"Field","name":{"kind":"Name","value":"secure"}},{"kind":"Field","name":{"kind":"Name","value":"username"}}]}}]} as unknown as DocumentNode; +export const UserInfoFragmentFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"UserInfoFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"UserInfo"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"email"}},{"kind":"Field","name":{"kind":"Name","value":"firstName"}},{"kind":"Field","name":{"kind":"Name","value":"lastName"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}}]}}]} as unknown as DocumentNode; 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":"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":"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; 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; 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; @@ -8562,8 +8691,13 @@ export const UpdateDatabaseConfigVariableDocument = {"kind":"Document","definiti export const GetConfigVariablesGroupedDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetConfigVariablesGrouped"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"getConfigVariablesGrouped"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"groups"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"isHiddenOnLoad"}},{"kind":"Field","name":{"kind":"Name","value":"variables"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"value"}},{"kind":"Field","name":{"kind":"Name","value":"isSensitive"}},{"kind":"Field","name":{"kind":"Name","value":"isEnvOnly"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"options"}},{"kind":"Field","name":{"kind":"Name","value":"source"}}]}}]}}]}}]}}]} as unknown as DocumentNode; export const GetDatabaseConfigVariableDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetDatabaseConfigVariable"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"key"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"getDatabaseConfigVariable"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"key"},"value":{"kind":"Variable","name":{"kind":"Name","value":"key"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"value"}},{"kind":"Field","name":{"kind":"Name","value":"isSensitive"}},{"kind":"Field","name":{"kind":"Name","value":"isEnvOnly"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"options"}},{"kind":"Field","name":{"kind":"Name","value":"source"}}]}}]}}]} as unknown as DocumentNode; export const UpdateWorkspaceFeatureFlagDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"UpdateWorkspaceFeatureFlag"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"workspaceId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UUID"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"featureFlag"}},"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":"Boolean"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"updateWorkspaceFeatureFlag"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"workspaceId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"workspaceId"}}},{"kind":"Argument","name":{"kind":"Name","value":"featureFlag"},"value":{"kind":"Variable","name":{"kind":"Name","value":"featureFlag"}}},{"kind":"Argument","name":{"kind":"Name","value":"value"},"value":{"kind":"Variable","name":{"kind":"Name","value":"value"}}}]}]}}]} as unknown as DocumentNode; -export const UserLookupAdminPanelDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"UserLookupAdminPanel"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"userIdentifier"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"userLookupAdminPanel"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"userIdentifier"},"value":{"kind":"Variable","name":{"kind":"Name","value":"userIdentifier"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"user"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"email"}},{"kind":"Field","name":{"kind":"Name","value":"firstName"}},{"kind":"Field","name":{"kind":"Name","value":"lastName"}}]}},{"kind":"Field","name":{"kind":"Name","value":"workspaces"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"logo"}},{"kind":"Field","name":{"kind":"Name","value":"totalUsers"}},{"kind":"Field","name":{"kind":"Name","value":"allowImpersonation"}},{"kind":"Field","name":{"kind":"Name","value":"workspaceUrls"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"customUrl"}},{"kind":"Field","name":{"kind":"Name","value":"subdomainUrl"}}]}},{"kind":"Field","name":{"kind":"Name","value":"users"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"email"}},{"kind":"Field","name":{"kind":"Name","value":"firstName"}},{"kind":"Field","name":{"kind":"Name","value":"lastName"}}]}},{"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"}}]}}]}}]}}]}}]} as unknown as DocumentNode; +export const AdminPanelRecentUsersDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"AdminPanelRecentUsers"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"searchTerm"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"adminPanelRecentUsers"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"searchTerm"},"value":{"kind":"Variable","name":{"kind":"Name","value":"searchTerm"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"email"}},{"kind":"Field","name":{"kind":"Name","value":"firstName"}},{"kind":"Field","name":{"kind":"Name","value":"lastName"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"workspaceName"}},{"kind":"Field","name":{"kind":"Name","value":"workspaceId"}}]}}]}}]} as unknown as DocumentNode; +export const AdminPanelTopWorkspacesDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"AdminPanelTopWorkspaces"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"searchTerm"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"adminPanelTopWorkspaces"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"searchTerm"},"value":{"kind":"Variable","name":{"kind":"Name","value":"searchTerm"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"totalUsers"}},{"kind":"Field","name":{"kind":"Name","value":"subdomain"}}]}}]}}]} as unknown as DocumentNode; +export const GetAdminChatThreadMessagesDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetAdminChatThreadMessages"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"threadId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UUID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"getAdminChatThreadMessages"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"threadId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"threadId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"thread"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"totalInputTokens"}},{"kind":"Field","name":{"kind":"Name","value":"totalOutputTokens"}},{"kind":"Field","name":{"kind":"Name","value":"conversationSize"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}},{"kind":"Field","name":{"kind":"Name","value":"messages"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"parts"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"textContent"}},{"kind":"Field","name":{"kind":"Name","value":"toolName"}}]}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}}]}}]}}]}}]} as unknown as DocumentNode; +export const GetAdminWorkspaceChatThreadsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetAdminWorkspaceChatThreads"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"workspaceId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UUID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"getAdminWorkspaceChatThreads"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"workspaceId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"workspaceId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"totalInputTokens"}},{"kind":"Field","name":{"kind":"Name","value":"totalOutputTokens"}},{"kind":"Field","name":{"kind":"Name","value":"conversationSize"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}}]}}]} as unknown as DocumentNode; export const GetVersionInfoDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetVersionInfo"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"versionInfo"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"currentVersion"}},{"kind":"Field","name":{"kind":"Name","value":"latestVersion"}}]}}]}}]} as unknown as DocumentNode; +export const UserLookupAdminPanelDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"UserLookupAdminPanel"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"userIdentifier"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"userLookupAdminPanel"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"userIdentifier"},"value":{"kind":"Variable","name":{"kind":"Name","value":"userIdentifier"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"user"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"UserInfoFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"workspaces"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"logo"}},{"kind":"Field","name":{"kind":"Name","value":"totalUsers"}},{"kind":"Field","name":{"kind":"Name","value":"activationStatus"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"allowImpersonation"}},{"kind":"Field","name":{"kind":"Name","value":"workspaceUrls"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"customUrl"}},{"kind":"Field","name":{"kind":"Name","value":"subdomainUrl"}}]}},{"kind":"Field","name":{"kind":"Name","value":"users"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"email"}},{"kind":"Field","name":{"kind":"Name","value":"firstName"}},{"kind":"Field","name":{"kind":"Name","value":"lastName"}}]}},{"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":"FragmentDefinition","name":{"kind":"Name","value":"UserInfoFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"UserInfo"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"email"}},{"kind":"Field","name":{"kind":"Name","value":"firstName"}},{"kind":"Field","name":{"kind":"Name","value":"lastName"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}}]}}]} as unknown as DocumentNode; +export const WorkspaceLookupAdminPanelDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"WorkspaceLookupAdminPanel"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"workspaceId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UUID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"workspaceLookupAdminPanel"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"workspaceId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"workspaceId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"user"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"UserInfoFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"workspaces"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"allowImpersonation"}},{"kind":"Field","name":{"kind":"Name","value":"logo"}},{"kind":"Field","name":{"kind":"Name","value":"totalUsers"}},{"kind":"Field","name":{"kind":"Name","value":"activationStatus"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"workspaceUrls"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"customUrl"}},{"kind":"Field","name":{"kind":"Name","value":"subdomainUrl"}}]}},{"kind":"Field","name":{"kind":"Name","value":"users"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"email"}},{"kind":"Field","name":{"kind":"Name","value":"firstName"}},{"kind":"Field","name":{"kind":"Name","value":"lastName"}}]}},{"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":"FragmentDefinition","name":{"kind":"Name","value":"UserInfoFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"UserInfo"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"email"}},{"kind":"Field","name":{"kind":"Name","value":"firstName"}},{"kind":"Field","name":{"kind":"Name","value":"lastName"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}}]}}]} as unknown as DocumentNode; export const DeleteJobsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"DeleteJobs"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"queueName"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"jobIds"}},"type":{"kind":"NonNullType","type":{"kind":"ListType","type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"deleteJobs"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"queueName"},"value":{"kind":"Variable","name":{"kind":"Name","value":"queueName"}}},{"kind":"Argument","name":{"kind":"Name","value":"jobIds"},"value":{"kind":"Variable","name":{"kind":"Name","value":"jobIds"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"deletedCount"}},{"kind":"Field","name":{"kind":"Name","value":"results"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"jobId"}},{"kind":"Field","name":{"kind":"Name","value":"success"}},{"kind":"Field","name":{"kind":"Name","value":"error"}}]}}]}}]}}]} as unknown as DocumentNode; export const RetryJobsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"RetryJobs"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"queueName"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"jobIds"}},"type":{"kind":"NonNullType","type":{"kind":"ListType","type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"retryJobs"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"queueName"},"value":{"kind":"Variable","name":{"kind":"Name","value":"queueName"}}},{"kind":"Argument","name":{"kind":"Name","value":"jobIds"},"value":{"kind":"Variable","name":{"kind":"Name","value":"jobIds"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"retriedCount"}},{"kind":"Field","name":{"kind":"Name","value":"results"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"jobId"}},{"kind":"Field","name":{"kind":"Name","value":"success"}},{"kind":"Field","name":{"kind":"Name","value":"error"}}]}}]}}]}}]} as unknown as DocumentNode; export const GetIndicatorHealthStatusDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetIndicatorHealthStatus"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"indicatorId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"HealthIndicatorId"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"getIndicatorHealthStatus"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"indicatorId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"indicatorId"}}}],"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":"status"}},{"kind":"Field","name":{"kind":"Name","value":"errorMessage"}},{"kind":"Field","name":{"kind":"Name","value":"details"}},{"kind":"Field","name":{"kind":"Name","value":"queues"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"queueName"}},{"kind":"Field","name":{"kind":"Name","value":"status"}}]}}]}}]}}]} as unknown as DocumentNode; diff --git a/packages/twenty-front/src/modules/app/components/SettingsRoutes.tsx b/packages/twenty-front/src/modules/app/components/SettingsRoutes.tsx index be5c5dec0d..d780ace58c 100644 --- a/packages/twenty-front/src/modules/app/components/SettingsRoutes.tsx +++ b/packages/twenty-front/src/modules/app/components/SettingsRoutes.tsx @@ -425,6 +425,30 @@ const SettingsAdminNewAiModel = lazy(() => ), ); +const SettingsAdminUserDetail = lazy(() => + import('~/pages/settings/admin-panel/SettingsAdminUserDetail').then( + (module) => ({ + default: module.SettingsAdminUserDetail, + }), + ), +); + +const SettingsAdminWorkspaceDetail = lazy(() => + import('~/pages/settings/admin-panel/SettingsAdminWorkspaceDetail').then( + (module) => ({ + default: module.SettingsAdminWorkspaceDetail, + }), + ), +); + +const SettingsAdminWorkspaceChatThread = lazy(() => + import('~/pages/settings/admin-panel/SettingsAdminWorkspaceChatThread').then( + (module) => ({ + default: module.SettingsAdminWorkspaceChatThread, + }), + ), +); + const SettingsUpdates = lazy(() => import('~/pages/settings/updates/SettingsUpdates').then((module) => ({ default: module.SettingsUpdates, @@ -770,6 +794,18 @@ export const SettingsRoutes = ({ isAdminPageEnabled }: SettingsRoutesProps) => ( path={SettingsPath.AdminPanelAiProviderDetail} element={} /> + } + /> + } + /> + } + /> )} diff --git a/packages/twenty-front/src/modules/auth/hooks/useImpersonationSession.ts b/packages/twenty-front/src/modules/auth/hooks/useImpersonationSession.ts new file mode 100644 index 0000000000..3d44f6ce8d --- /dev/null +++ b/packages/twenty-front/src/modules/auth/hooks/useImpersonationSession.ts @@ -0,0 +1,95 @@ +import { useApolloClient } from '@apollo/client/react'; +import { useCallback } from 'react'; +import { useNavigate } from 'react-router-dom'; +import { useStore } from 'jotai'; + +import { isAppEffectRedirectEnabledState } from '@/app/states/isAppEffectRedirectEnabledState'; +import { useAuth } from '@/auth/hooks/useAuth'; +import { tokenPairState } from '@/auth/states/tokenPairState'; +import { useClearSseClient } from '@/sse-db-event/hooks/useClearSseClient'; +import { useLoadCurrentUser } from '@/users/hooks/useLoadCurrentUser'; +import { type AuthTokenPair } from '~/generated-metadata/graphql'; + +const IMPERSONATION_SESSION_KEY = 'impersonation_original_session'; + +type StoredImpersonationSession = { + tokenPair: AuthTokenPair; + returnPath: string; +}; + +export const useImpersonationSession = () => { + const store = useStore(); + const client = useApolloClient(); + const navigate = useNavigate(); + const { getAuthTokensFromLoginToken, signOut } = useAuth(); + const { clearSseClient } = useClearSseClient(); + const { loadCurrentUser } = useLoadCurrentUser(); + + const startImpersonating = useCallback( + async (loginToken: string, returnPath?: string) => { + const currentTokenPair = store.get(tokenPairState.atom); + + if (currentTokenPair) { + const session: StoredImpersonationSession = { + tokenPair: currentTokenPair, + returnPath: returnPath ?? window.location.pathname, + }; + sessionStorage.setItem( + IMPERSONATION_SESSION_KEY, + JSON.stringify(session), + ); + } + + clearSseClient(); + await client.clearStore(); + + store.set(isAppEffectRedirectEnabledState.atom, false); + await getAuthTokensFromLoginToken(loginToken); + store.set(isAppEffectRedirectEnabledState.atom, true); + }, + [store, client, clearSseClient, getAuthTokensFromLoginToken], + ); + + const stopImpersonating = useCallback(async () => { + const raw = sessionStorage.getItem(IMPERSONATION_SESSION_KEY); + + if (!raw) { + // No stored session — likely a cross-workspace tab opened via redirect. + // Try closing the tab (works when opened via window.open or target=_blank). + window.close(); + // If window.close() was blocked by the browser, fall back to sign out. + await signOut(); + return; + } + + let session: StoredImpersonationSession; + + try { + session = JSON.parse(raw); + } catch { + sessionStorage.removeItem(IMPERSONATION_SESSION_KEY); + await signOut(); + return; + } + + sessionStorage.removeItem(IMPERSONATION_SESSION_KEY); + + clearSseClient(); + await client.clearStore(); + + store.set(isAppEffectRedirectEnabledState.atom, false); + store.set(tokenPairState.atom, session.tokenPair); + + await loadCurrentUser(); + + store.set(isAppEffectRedirectEnabledState.atom, true); + + navigate(session.returnPath); + }, [store, client, clearSseClient, loadCurrentUser, signOut, navigate]); + + const hasStoredSession = useCallback(() => { + return sessionStorage.getItem(IMPERSONATION_SESSION_KEY) !== null; + }, []); + + return { startImpersonating, stopImpersonating, hasStoredSession }; +}; diff --git a/packages/twenty-front/src/modules/information-banner/components/impersonate/InformationBannerIsImpersonating.tsx b/packages/twenty-front/src/modules/information-banner/components/impersonate/InformationBannerIsImpersonating.tsx index 0e8c6a4b9c..1fef0fdafd 100644 --- a/packages/twenty-front/src/modules/information-banner/components/impersonate/InformationBannerIsImpersonating.tsx +++ b/packages/twenty-front/src/modules/information-banner/components/impersonate/InformationBannerIsImpersonating.tsx @@ -1,4 +1,4 @@ -import { useAuth } from '@/auth/hooks/useAuth'; +import { useImpersonationSession } from '@/auth/hooks/useImpersonationSession'; import { currentWorkspaceMemberState } from '@/auth/states/currentWorkspaceMemberState'; import { isImpersonatingState } from '@/auth/states/isImpersonatingState'; import { InformationBanner } from '@/information-banner/components/InformationBanner'; @@ -11,7 +11,7 @@ export const InformationBannerIsImpersonating = () => { const currentWorkspaceMember = useAtomStateValue(currentWorkspaceMemberState); const isImpersonating = useAtomStateValue(isImpersonatingState); - const { signOut } = useAuth(); + const { stopImpersonating } = useImpersonationSession(); if (!isDefined(currentWorkspaceMember) || !isImpersonating) { return null; @@ -25,7 +25,7 @@ export const InformationBannerIsImpersonating = () => { message={t`Logged in as ${impersonatedUser}`} buttonTitle={t`Stop impersonating`} buttonIcon={IconLogout} - buttonOnClick={signOut} + buttonOnClick={stopImpersonating} /> ); }; diff --git a/packages/twenty-front/src/modules/settings/admin-panel/ai/components/SettingsAdminAI.tsx b/packages/twenty-front/src/modules/settings/admin-panel/ai/components/SettingsAdminAI.tsx index 7eaf502052..7be739943b 100644 --- a/packages/twenty-front/src/modules/settings/admin-panel/ai/components/SettingsAdminAI.tsx +++ b/packages/twenty-front/src/modules/settings/admin-panel/ai/components/SettingsAdminAI.tsx @@ -2,6 +2,8 @@ import { useMemo, useState } from 'react'; import { useMutation, useQuery } from '@apollo/client/react'; import { t } from '@lingui/core/macro'; +import { SettingsPath } from 'twenty-shared/types'; +import { getSettingsPath } from 'twenty-shared/utils'; import { Tag } from 'twenty-ui/components'; import { H2Title, IconBolt, IconLock, IconRobot } from 'twenty-ui/display'; import { Card, Section } from 'twenty-ui/layout'; @@ -319,6 +321,9 @@ export const SettingsAdminAI = () => { {item.label ?? item.key} diff --git a/packages/twenty-front/src/modules/settings/admin-panel/components/SettingsAdminChatThreadMessageList.tsx b/packages/twenty-front/src/modules/settings/admin-panel/components/SettingsAdminChatThreadMessageList.tsx new file mode 100644 index 0000000000..f74fc2c0e7 --- /dev/null +++ b/packages/twenty-front/src/modules/settings/admin-panel/components/SettingsAdminChatThreadMessageList.tsx @@ -0,0 +1,127 @@ +import { t } from '@lingui/core/macro'; +import { styled } from '@linaria/react'; + +import { LazyMarkdownRenderer } from '@/ai/components/LazyMarkdownRenderer'; +import { TableCell } from '@/ui/layout/table/components/TableCell'; +import { TableRow } from '@/ui/layout/table/components/TableRow'; +import { Card } from 'twenty-ui/layout'; +import { themeCssVariables } from 'twenty-ui/theme-constants'; +import { + AgentMessageRole, + type GetAdminChatThreadMessagesQuery, +} from '~/generated-metadata/graphql'; + +type ChatMessage = NonNullable< + GetAdminChatThreadMessagesQuery['getAdminChatThreadMessages'] +>['messages'][number]; + +type SettingsAdminChatThreadMessageListProps = { + messages: ChatMessage[]; +}; + +const StyledMessagesContainer = styled.div` + display: flex; + flex-direction: column; + gap: ${themeCssVariables.spacing[4]}; +`; + +const StyledMessageBubble = styled.div<{ isUser?: boolean }>` + align-items: ${({ isUser }) => (isUser ? 'flex-end' : 'flex-start')}; + display: flex; + flex-direction: column; + width: 100%; +`; + +const StyledMessageContent = styled.div<{ isUser?: boolean }>` + background: ${({ isUser }) => + isUser ? themeCssVariables.background.tertiary : 'transparent'}; + border-radius: ${themeCssVariables.border.radius.sm}; + color: ${({ isUser }) => + isUser + ? themeCssVariables.font.color.secondary + : themeCssVariables.font.color.primary}; + font-weight: ${({ isUser }) => (isUser ? 500 : 400)}; + line-height: 1.4em; + max-width: 100%; + overflow-wrap: break-word; + padding: ${({ isUser }) => + isUser ? `0 ${themeCssVariables.spacing[2]}` : '0'}; + white-space: ${({ isUser }) => (isUser ? 'pre-wrap' : 'normal')}; + width: ${({ isUser }) => (isUser ? 'fit-content' : '100%')}; +`; + +const StyledRoleLabel = styled.span` + color: ${themeCssVariables.font.color.light}; + font-size: ${themeCssVariables.font.size.xs}; + font-weight: ${themeCssVariables.font.weight.medium}; + margin-bottom: ${themeCssVariables.spacing[1]}; + text-transform: capitalize; +`; + +const StyledTimestamp = styled.span` + color: ${themeCssVariables.font.color.light}; + font-size: ${themeCssVariables.font.size.xs}; + margin-top: ${themeCssVariables.spacing[1]}; +`; + +export const SettingsAdminChatThreadMessageList = ({ + messages, +}: SettingsAdminChatThreadMessageListProps) => { + const visibleMessages = messages.filter( + (message) => message.role !== AgentMessageRole.SYSTEM, + ); + + if (visibleMessages.length === 0) { + return ( + + + + {t`No messages found.`} + + + + ); + } + + return ( + + {visibleMessages.map((message) => { + const isUser = message.role === AgentMessageRole.USER; + const textParts = message.parts + .filter((part) => part.type === 'text' && part.textContent !== null) + .map((part) => part.textContent) + .join('\n'); + + const toolParts = message.parts.filter( + (part) => part.type === 'tool-call' && part.toolName !== null, + ); + + if (textParts.length === 0 && toolParts.length === 0) { + return null; + } + + return ( + + {message.role} + {textParts.length > 0 && ( + + {isUser ? textParts : } + + )} + {toolParts.map((part, index) => ( + + {t`Tool call: ${part.toolName}`} + + ))} + + {new Date(message.createdAt).toLocaleString()} + + + ); + })} + + ); +}; diff --git a/packages/twenty-front/src/modules/settings/admin-panel/components/SettingsAdminGeneral.tsx b/packages/twenty-front/src/modules/settings/admin-panel/components/SettingsAdminGeneral.tsx index 3cc7721be4..046c095207 100644 --- a/packages/twenty-front/src/modules/settings/admin-panel/components/SettingsAdminGeneral.tsx +++ b/packages/twenty-front/src/modules/settings/admin-panel/components/SettingsAdminGeneral.tsx @@ -1,134 +1,74 @@ import { canManageFeatureFlagsState } from '@/client-config/states/canManageFeatureFlagsState'; -import { SettingsAdminWorkspaceContent } from '@/settings/admin-panel/components/SettingsAdminWorkspaceContent'; -import { userLookupResultState } from '@/settings/admin-panel/states/userLookupResultState'; -import { useSnackBar } from '@/ui/feedback/snack-bar-manager/hooks/useSnackBar'; +import { SettingsAdminVersionContainer } from '@/settings/admin-panel/components/SettingsAdminVersionContainer'; +import { ADMIN_PANEL_RECENT_USERS } from '@/settings/admin-panel/graphql/queries/adminPanelRecentUsers'; +import { ADMIN_PANEL_TOP_WORKSPACES } from '@/settings/admin-panel/graphql/queries/adminPanelTopWorkspaces'; +import { SettingsSkeletonLoader } from '@/settings/components/SettingsSkeletonLoader'; import { SettingsTextInput } from '@/ui/input/components/SettingsTextInput'; -import { TabList } from '@/ui/layout/tab-list/components/TabList'; -import { DEFAULT_WORKSPACE_LOGO } from '@/ui/navigation/navigation-drawer/constants/DefaultWorkspaceLogo'; +import { Table } from '@/ui/layout/table/components/Table'; +import { TableBody } from '@/ui/layout/table/components/TableBody'; +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 { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue'; +import { useQuery } from '@apollo/client/react'; import { styled } from '@linaria/react'; import { t } from '@lingui/core/macro'; -import { isNonEmptyString } from '@sniptt/guards'; -import { useAtomState } from '@/ui/utilities/state/jotai/hooks/useAtomState'; import { useState } from 'react'; -import { REACT_APP_SERVER_BASE_URL } from '~/config'; -import { useMutation } from '@apollo/client/react'; -import { UserLookupAdminPanelDocument } from '~/generated-metadata/graphql'; +import { useDebounce } from 'use-debounce'; +import { SettingsPath } from 'twenty-shared/types'; +import { getSettingsPath } from 'twenty-shared/utils'; import { currentUserState } from '@/auth/states/currentUserState'; -import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue'; -import { SettingsTableCard } from '@/settings/components/SettingsTableCard'; -import { SettingsAdminVersionContainer } from '@/settings/admin-panel/components/SettingsAdminVersionContainer'; -import { SETTINGS_ADMIN_USER_LOOKUP_WORKSPACE_TABS_ID } from '@/settings/admin-panel/constants/SettingsAdminUserLookupWorkspaceTabsId'; -import { activeTabIdComponentState } from '@/ui/layout/tab-list/states/activeTabIdComponentState'; -import { useAtomComponentState } from '@/ui/utilities/state/jotai/hooks/useAtomComponentState'; -import { getImageAbsoluteURI, isDefined } from 'twenty-shared/utils'; -import { - H2Title, - IconId, - IconMail, - IconSearch, - IconUser, -} from 'twenty-ui/display'; -import { Button } from 'twenty-ui/input'; +import { H2Title } from 'twenty-ui/display'; import { Section } from 'twenty-ui/layout'; import { themeCssVariables } from 'twenty-ui/theme-constants'; -const StyledContainer = styled.div` - align-items: center; - display: flex; - flex-direction: row; - gap: ${themeCssVariables.spacing[2]}; +const StyledEmptyState = styled.div` + color: ${themeCssVariables.font.color.tertiary}; + padding: ${themeCssVariables.spacing[4]} 0; `; export const SettingsAdminGeneral = () => { - const [userIdentifier, setUserIdentifier] = useState(''); - const { enqueueErrorSnackBar } = useSnackBar(); + const [userSearchTerm, setUserSearchTerm] = useState(''); + const [debouncedUserSearchTerm] = useDebounce(userSearchTerm, 300); - const [activeTabId, setActiveTabId] = useAtomComponentState( - activeTabIdComponentState, - SETTINGS_ADMIN_USER_LOOKUP_WORKSPACE_TABS_ID, - ); - const [userLookupResult, setUserLookupResult] = useAtomState( - userLookupResultState, - ); - const [isUserLookupLoading, setIsUserLookupLoading] = useState(false); - - const [userLookup] = useMutation(UserLookupAdminPanelDocument); + const [workspaceSearchTerm, setWorkspaceSearchTerm] = useState(''); + const [debouncedWorkspaceSearchTerm] = useDebounce(workspaceSearchTerm, 300); const currentUser = useAtomStateValue(currentUserState); - const canAccessFullAdminPanel = currentUser?.canAccessFullAdminPanel; - const canImpersonate = currentUser?.canImpersonate; - const canManageFeatureFlags = useAtomStateValue(canManageFeatureFlagsState); - const handleSearch = async () => { - setActiveTabId(''); - setIsUserLookupLoading(true); - setUserLookupResult(null); + const { data: recentUsersData, loading: isLoadingUsers } = useQuery<{ + adminPanelRecentUsers: { + id: string; + email: string; + firstName?: string | null; + lastName?: string | null; + createdAt: string; + workspaceName?: string | null; + workspaceId?: string | null; + }[]; + }>(ADMIN_PANEL_RECENT_USERS, { + variables: { searchTerm: debouncedUserSearchTerm }, + skip: !canImpersonate, + }); - const response = await userLookup({ - variables: { userIdentifier }, - onCompleted: (data) => { - setIsUserLookupLoading(false); - if (isDefined(data?.userLookupAdminPanel)) { - setUserLookupResult(data.userLookupAdminPanel); - } - }, - onError: (error) => { - setIsUserLookupLoading(false); - enqueueErrorSnackBar({ - apolloError: error, - }); - }, - }); + const { data: topWorkspacesData, loading: isLoadingWorkspaces } = useQuery<{ + adminPanelTopWorkspaces: { + id: string; + name: string; + totalUsers: number; + subdomain: string; + }[]; + }>(ADMIN_PANEL_TOP_WORKSPACES, { + variables: { searchTerm: debouncedWorkspaceSearchTerm }, + skip: !canImpersonate, + }); - const result = response.data?.userLookupAdminPanel; - - if (isDefined(result?.workspaces) && result.workspaces.length > 0) { - setActiveTabId(result.workspaces[0].id); - } - }; - - const activeWorkspace = userLookupResult?.workspaces.find( - (workspace) => workspace.id === activeTabId, - ); - - const tabs = - userLookupResult?.workspaces.map((workspace) => ({ - id: workspace.id, - title: workspace.name, - logo: - getImageAbsoluteURI({ - imageUrl: isNonEmptyString(workspace.logo) - ? workspace.logo - : DEFAULT_WORKSPACE_LOGO, - baseUrl: REACT_APP_SERVER_BASE_URL, - }) ?? '', - })) ?? []; - - const userFullName = `${userLookupResult?.user.firstName || ''} ${ - userLookupResult?.user.lastName || '' - }`.trim(); - - const userInfoItems = [ - { - Icon: IconUser, - label: t`Name`, - value: userFullName, - }, - { - Icon: IconMail, - label: t`Email`, - value: userLookupResult?.user.email, - }, - { - Icon: IconId, - label: t`ID`, - value: userLookupResult?.user.id, - }, - ]; + const recentUsers = recentUsersData?.adminPanelRecentUsers ?? []; + const topWorkspaces = topWorkspacesData?.adminPanelTopWorkspaces ?? []; return ( <> @@ -143,63 +83,105 @@ export const SettingsAdminGeneral = () => { )} {canImpersonate && ( -
- - - - -
- )} - - {isDefined(userLookupResult) && ( <>
- - + + {isLoadingUsers ? ( + + ) : recentUsers.length === 0 ? ( + + {t`No users found matching your search criteria.`} + + ) : ( + + + + {t`Name`} + {t`Email`} + {t`Workspace`} + + {recentUsers.map((user) => ( + + + {`${user.firstName || ''} ${user.lastName || ''}`.trim() || + '\u2014'} + + {user.email} + + {user.workspaceName || '\u2014'} + + + ))} + +
+ )}
+
- - + {isLoadingWorkspaces ? ( + + ) : topWorkspaces.length === 0 ? ( + + {t`No workspaces found matching your search criteria.`} + + ) : ( + + + + {t`Workspace`} + {t`Users`} + + {topWorkspaces.map((workspace) => ( + + + {workspace.name || '\u2014'} + + + {workspace.totalUsers} + + + ))} + +
+ )}
)} diff --git a/packages/twenty-front/src/modules/settings/admin-panel/components/SettingsAdminWorkspaceContent.tsx b/packages/twenty-front/src/modules/settings/admin-panel/components/SettingsAdminWorkspaceContent.tsx index f68fb195ea..1354a3f7d8 100644 --- a/packages/twenty-front/src/modules/settings/admin-panel/components/SettingsAdminWorkspaceContent.tsx +++ b/packages/twenty-front/src/modules/settings/admin-panel/components/SettingsAdminWorkspaceContent.tsx @@ -1,46 +1,29 @@ -import { currentUserState } from '@/auth/states/currentUserState'; -import { currentWorkspaceState } from '@/auth/states/currentWorkspaceState'; -import { canManageFeatureFlagsState } from '@/client-config/states/canManageFeatureFlagsState'; import { SettingsTableCard } from '@/settings/components/SettingsTableCard'; -import { useFeatureFlagState } from '@/settings/admin-panel/hooks/useFeatureFlagState'; -import { useImpersonationAuth } from '@/settings/admin-panel/hooks/useImpersonationAuth'; -import { useImpersonationRedirect } from '@/settings/admin-panel/hooks/useImpersonationRedirect'; -import { userLookupResultState } from '@/settings/admin-panel/states/userLookupResultState'; import { type WorkspaceInfo } from '@/settings/admin-panel/types/WorkspaceInfo'; import { getWorkspaceSchemaName } from '@/settings/admin-panel/utils/getWorkspaceSchemaName'; -import { useSnackBar } from '@/ui/feedback/snack-bar-manager/hooks/useSnackBar'; -import { Table } from '@/ui/layout/table/components/Table'; -import { TableBody } from '@/ui/layout/table/components/TableBody'; -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 { DEFAULT_WORKSPACE_LOGO } from '@/ui/navigation/navigation-drawer/constants/DefaultWorkspaceLogo'; -import { useAtomState } from '@/ui/utilities/state/jotai/hooks/useAtomState'; -import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue'; -import { useMutation } from '@apollo/client/react'; import { styled } from '@linaria/react'; import { useLingui } from '@lingui/react/macro'; import { isNonEmptyString } from '@sniptt/guards'; -import { useState } from 'react'; -import { getImageAbsoluteURI, isDefined } from 'twenty-shared/utils'; -import { AvatarOrIcon, Chip } from 'twenty-ui/components'; +import { SettingsPath } from 'twenty-shared/types'; +import { + getImageAbsoluteURI, + getSettingsPath, + isDefined, +} from 'twenty-shared/utils'; +import { AvatarOrIcon, LinkChip } from 'twenty-ui/components'; import { H2Title, - IconEyeShare, + IconCalendar, IconHome, IconId, IconLink, + IconStatusChange, IconUser, } from 'twenty-ui/display'; -import { Button, Toggle } from 'twenty-ui/input'; import { Section } from 'twenty-ui/layout'; import { themeCssVariables } from 'twenty-ui/theme-constants'; import { REACT_APP_SERVER_BASE_URL } from '~/config'; -import { - type FeatureFlagKey, - ImpersonateDocument, - UpdateWorkspaceFeatureFlagDocument, -} from '~/generated-metadata/graphql'; type SettingsAdminWorkspaceContentProps = { activeWorkspace: WorkspaceInfo | undefined; @@ -53,93 +36,11 @@ const StyledContainer = styled.div` margin-top: ${themeCssVariables.spacing[6]}; `; -const StyledButtonContainer = styled.div` - margin-top: ${themeCssVariables.spacing[3]}; -`; - export const SettingsAdminWorkspaceContent = ({ activeWorkspace, }: SettingsAdminWorkspaceContentProps) => { - const canManageFeatureFlags = useAtomStateValue(canManageFeatureFlagsState); - const { enqueueErrorSnackBar } = useSnackBar(); - const [currentUser] = useAtomState(currentUserState); - const currentWorkspace = useAtomStateValue(currentWorkspaceState); - - const [updateFeatureFlag] = useMutation(UpdateWorkspaceFeatureFlagDocument); - const [isImpersonateLoading, setIsImpersonationLoading] = useState(false); - const { executeImpersonationAuth } = useImpersonationAuth(); - const { executeImpersonationRedirect } = useImpersonationRedirect(); - const [impersonate] = useMutation(ImpersonateDocument); - - const { updateFeatureFlagState } = useFeatureFlagState(); - const userLookupResult = useAtomStateValue(userLookupResultState); - const { t } = useLingui(); - const handleImpersonate = async (workspaceId: string) => { - if (!userLookupResult?.user.id) { - enqueueErrorSnackBar({ message: t`Please search for a user first` }); - return; - } - - setIsImpersonationLoading(true); - - await impersonate({ - variables: { userId: userLookupResult.user.id, workspaceId }, - onCompleted: async (data) => { - const { loginToken, workspace } = data.impersonate; - const isCurrentWorkspace = workspace.id === currentWorkspace?.id; - if (isCurrentWorkspace) { - await executeImpersonationAuth(loginToken.token); - return; - } - - return executeImpersonationRedirect( - workspace.workspaceUrls, - loginToken.token, - '_blank', - ); - }, - onError: (error) => { - const errorMessage = error.message; - enqueueErrorSnackBar({ - message: t`Failed to impersonate user. ${errorMessage}`, - }); - }, - }).finally(() => { - setIsImpersonationLoading(false); - }); - }; - - const handleFeatureFlagUpdate = async ( - workspaceId: string, - featureFlag: FeatureFlagKey, - value: boolean, - ) => { - const previousValue = userLookupResult?.workspaces - .find((workspace) => workspace.id === workspaceId) - ?.featureFlags.find((flag) => flag.key === featureFlag)?.value; - - updateFeatureFlagState(workspaceId, featureFlag, value); - await updateFeatureFlag({ - variables: { - workspaceId, - featureFlag, - value, - }, - - onError: (error) => { - if (isDefined(previousValue)) { - updateFeatureFlagState(workspaceId, featureFlag, previousValue); - } - const errorMessage = error.message; - enqueueErrorSnackBar({ - message: t`Failed to update feature flag. ${errorMessage}`, - }); - }, - }); - }; - const getWorkspaceUrl = (workspaceUrls: WorkspaceInfo['workspaceUrls']) => { return workspaceUrls.customUrl ?? workspaceUrls.subdomainUrl; }; @@ -148,10 +49,13 @@ export const SettingsAdminWorkspaceContent = ({ { Icon: IconHome, label: t`Name`, - value: ( - } /> + ) : ( + (activeWorkspace?.name ?? '') ), }, { @@ -191,6 +97,18 @@ export const SettingsAdminWorkspaceContent = ({ label: t`Members`, value: activeWorkspace?.totalUsers, }, + { + Icon: IconStatusChange, + label: t`Status`, + value: activeWorkspace?.activationStatus, + }, + { + Icon: IconCalendar, + label: t`Created`, + value: activeWorkspace?.createdAt + ? new Date(activeWorkspace.createdAt).toLocaleDateString() + : '', + }, ]; if (!activeWorkspace) return null; @@ -206,62 +124,7 @@ export const SettingsAdminWorkspaceContent = ({ items={workspaceInfoItems} gridAutoColumns="1fr 4fr" /> - - {currentUser?.canImpersonate && ( -