feat: migrate ConnectedAccount infrastructure entities to metadata schema (#18784)
## Summary - Migrates 4 entities (`connectedAccount`, `messageChannel`, `calendarChannel`, `messageFolder`) from per-workspace schemas to the shared `core` metadata schema - Introduces a `IS_CONNECTED_ACCOUNT_MIGRATED` feature flag to control the migration: when enabled, reads come from core metadata and all writes are dual-written to both workspace and core - Extracts 12 enums from workspace entity files to `twenty-shared` for reuse across frontend and backend - Creates new TypeORM entities, metadata services, GraphQL resolvers/DTOs, and exception interceptors per entity - Each entity owns its own data access module (`ConnectedAccountDataAccessModule`, `MessageChannelDataAccessModule`, `CalendarChannelDataAccessModule`, `MessageFolderDataAccessModule`) — no umbrella infrastructure module - Adds a 1.20 upgrade command that backfills data from workspace schemas to core (preserving UUIDs) and enables the feature flag - Replaces direct repository access with data access service calls across ~50 files in messaging, calendar, and connected-account modules - Adds `lastSignedInAt` and `oidcTokenClaims` fields to the new `ConnectedAccountEntity` - Drops unused `lastSyncHistoryId` field from the migrated connected account entity ## Test plan - [x] Lint passes (`npx nx lint:diff-with-main twenty-server`) - [x] Typecheck passes (`npx nx typecheck twenty-server`) - [x] All unit tests pass (477 suites, 4267 tests, 0 failures) - [ ] Manual test: verify messaging sync works with feature flag disabled (existing behavior) - [ ] Manual test: run upgrade command on a workspace, verify data backfilled to core tables - [ ] Manual test: verify messaging/calendar sync works with feature flag enabled (dual-write path) - [ ] Manual test: verify GraphQL metadata resolvers return correct data when flag enabled
This commit is contained in:
@@ -1549,6 +1549,7 @@ enum FeatureFlagKey {
|
||||
IS_DRAFT_EMAIL_ENABLED
|
||||
IS_RICH_TEXT_V1_MIGRATED
|
||||
IS_RECORD_PAGE_LAYOUT_GLOBAL_EDITION_ENABLED
|
||||
IS_CONNECTED_ACCOUNT_MIGRATED
|
||||
}
|
||||
|
||||
type SSOIdentityProvider {
|
||||
@@ -2204,6 +2205,163 @@ type AgentTurn {
|
||||
createdAt: DateTime!
|
||||
}
|
||||
|
||||
type CalendarChannel {
|
||||
id: UUID!
|
||||
handle: String!
|
||||
syncStatus: CalendarChannelSyncStatus!
|
||||
syncStage: CalendarChannelSyncStage!
|
||||
visibility: CalendarChannelVisibility!
|
||||
isContactAutoCreationEnabled: Boolean!
|
||||
contactAutoCreationPolicy: CalendarChannelContactAutoCreationPolicy!
|
||||
isSyncEnabled: Boolean!
|
||||
syncCursor: String
|
||||
syncedAt: DateTime
|
||||
syncStageStartedAt: DateTime
|
||||
throttleFailureCount: Float!
|
||||
connectedAccountId: UUID!
|
||||
createdAt: DateTime!
|
||||
updatedAt: DateTime!
|
||||
}
|
||||
|
||||
enum CalendarChannelSyncStatus {
|
||||
NOT_SYNCED
|
||||
ONGOING
|
||||
ACTIVE
|
||||
FAILED_INSUFFICIENT_PERMISSIONS
|
||||
FAILED_UNKNOWN
|
||||
}
|
||||
|
||||
enum CalendarChannelSyncStage {
|
||||
PENDING_CONFIGURATION
|
||||
CALENDAR_EVENT_LIST_FETCH_PENDING
|
||||
CALENDAR_EVENT_LIST_FETCH_SCHEDULED
|
||||
CALENDAR_EVENT_LIST_FETCH_ONGOING
|
||||
CALENDAR_EVENTS_IMPORT_PENDING
|
||||
CALENDAR_EVENTS_IMPORT_SCHEDULED
|
||||
CALENDAR_EVENTS_IMPORT_ONGOING
|
||||
FAILED
|
||||
}
|
||||
|
||||
enum CalendarChannelVisibility {
|
||||
METADATA
|
||||
SHARE_EVERYTHING
|
||||
}
|
||||
|
||||
enum CalendarChannelContactAutoCreationPolicy {
|
||||
AS_PARTICIPANT_AND_ORGANIZER
|
||||
AS_PARTICIPANT
|
||||
AS_ORGANIZER
|
||||
NONE
|
||||
}
|
||||
|
||||
type ConnectedAccountDTO {
|
||||
id: UUID!
|
||||
handle: String!
|
||||
provider: String!
|
||||
accessToken: String
|
||||
refreshToken: String
|
||||
lastCredentialsRefreshedAt: DateTime
|
||||
authFailedAt: DateTime
|
||||
handleAliases: [String!]
|
||||
scopes: [String!]
|
||||
connectionParameters: JSON
|
||||
lastSignedInAt: DateTime
|
||||
oidcTokenClaims: JSON
|
||||
userWorkspaceId: UUID!
|
||||
createdAt: DateTime!
|
||||
updatedAt: DateTime!
|
||||
}
|
||||
|
||||
type MessageChannel {
|
||||
id: UUID!
|
||||
visibility: MessageChannelVisibility!
|
||||
handle: String!
|
||||
type: MessageChannelType!
|
||||
isContactAutoCreationEnabled: Boolean!
|
||||
contactAutoCreationPolicy: MessageChannelContactAutoCreationPolicy!
|
||||
messageFolderImportPolicy: MessageFolderImportPolicy!
|
||||
excludeNonProfessionalEmails: Boolean!
|
||||
excludeGroupEmails: Boolean!
|
||||
pendingGroupEmailsAction: MessageChannelPendingGroupEmailsAction!
|
||||
isSyncEnabled: Boolean!
|
||||
syncCursor: String
|
||||
syncedAt: DateTime
|
||||
syncStatus: MessageChannelSyncStatus!
|
||||
syncStage: MessageChannelSyncStage!
|
||||
syncStageStartedAt: DateTime
|
||||
throttleFailureCount: Float!
|
||||
throttleRetryAfter: DateTime
|
||||
connectedAccountId: UUID!
|
||||
createdAt: DateTime!
|
||||
updatedAt: DateTime!
|
||||
}
|
||||
|
||||
enum MessageChannelVisibility {
|
||||
METADATA
|
||||
SUBJECT
|
||||
SHARE_EVERYTHING
|
||||
}
|
||||
|
||||
enum MessageChannelType {
|
||||
EMAIL
|
||||
SMS
|
||||
}
|
||||
|
||||
enum MessageChannelContactAutoCreationPolicy {
|
||||
SENT_AND_RECEIVED
|
||||
SENT
|
||||
NONE
|
||||
}
|
||||
|
||||
enum MessageFolderImportPolicy {
|
||||
ALL_FOLDERS
|
||||
SELECTED_FOLDERS
|
||||
}
|
||||
|
||||
enum MessageChannelPendingGroupEmailsAction {
|
||||
GROUP_EMAILS_DELETION
|
||||
GROUP_EMAILS_IMPORT
|
||||
NONE
|
||||
}
|
||||
|
||||
enum MessageChannelSyncStatus {
|
||||
NOT_SYNCED
|
||||
ONGOING
|
||||
ACTIVE
|
||||
FAILED_INSUFFICIENT_PERMISSIONS
|
||||
FAILED_UNKNOWN
|
||||
}
|
||||
|
||||
enum MessageChannelSyncStage {
|
||||
PENDING_CONFIGURATION
|
||||
MESSAGE_LIST_FETCH_PENDING
|
||||
MESSAGE_LIST_FETCH_SCHEDULED
|
||||
MESSAGE_LIST_FETCH_ONGOING
|
||||
MESSAGES_IMPORT_PENDING
|
||||
MESSAGES_IMPORT_SCHEDULED
|
||||
MESSAGES_IMPORT_ONGOING
|
||||
FAILED
|
||||
}
|
||||
|
||||
type MessageFolder {
|
||||
id: UUID!
|
||||
name: String
|
||||
syncCursor: String
|
||||
isSentFolder: Boolean!
|
||||
isSynced: Boolean!
|
||||
parentFolderId: UUID
|
||||
externalId: String
|
||||
pendingSyncAction: MessageFolderPendingSyncAction!
|
||||
messageChannelId: UUID!
|
||||
createdAt: DateTime!
|
||||
updatedAt: DateTime!
|
||||
}
|
||||
|
||||
enum MessageFolderPendingSyncAction {
|
||||
FOLDER_DELETION
|
||||
NONE
|
||||
}
|
||||
|
||||
type CollectionHash {
|
||||
collectionName: AllMetadataName!
|
||||
hash: String!
|
||||
@@ -3010,6 +3168,14 @@ type Query {
|
||||
findWorkspaceFromInviteHash(inviteHash: String!): Workspace!
|
||||
validatePasswordResetToken(passwordResetToken: String!): ValidatePasswordResetToken!
|
||||
getSSOIdentityProviders: [FindAvailableSSOIDP!]!
|
||||
messageFolders(messageChannelId: UUID): [MessageFolder!]!
|
||||
messageFolder(id: UUID!): MessageFolder
|
||||
calendarChannels(connectedAccountId: UUID): [CalendarChannel!]!
|
||||
calendarChannel(id: UUID!): CalendarChannel
|
||||
messageChannels(connectedAccountId: UUID): [MessageChannel!]!
|
||||
messageChannel(id: UUID!): MessageChannel
|
||||
connectedAccounts: [ConnectedAccountDTO!]!
|
||||
connectedAccount(id: UUID!): ConnectedAccountDTO
|
||||
webhooks: [Webhook!]!
|
||||
webhook(id: UUID!): Webhook
|
||||
minimalMetadata: MinimalMetadata!
|
||||
@@ -3307,6 +3473,18 @@ type Mutation {
|
||||
createSAMLIdentityProvider(input: SetupSAMLSsoInput!): SetupSso!
|
||||
deleteSSOIdentityProvider(input: DeleteSsoInput!): DeleteSso!
|
||||
editSSOIdentityProvider(input: EditSsoInput!): EditSso!
|
||||
createMessageFolder(input: CreateMessageFolderInput!): MessageFolder!
|
||||
updateMessageFolder(input: UpdateMessageFolderInput!): MessageFolder!
|
||||
deleteMessageFolder(id: UUID!): MessageFolder!
|
||||
createCalendarChannel(input: CreateCalendarChannelInput!): CalendarChannel!
|
||||
updateCalendarChannel(input: UpdateCalendarChannelInput!): CalendarChannel!
|
||||
deleteCalendarChannel(id: UUID!): CalendarChannel!
|
||||
createMessageChannel(input: CreateMessageChannelInput!): MessageChannel!
|
||||
updateMessageChannel(input: UpdateMessageChannelInput!): MessageChannel!
|
||||
deleteMessageChannel(id: UUID!): MessageChannel!
|
||||
createConnectedAccount(input: CreateConnectedAccountInput!): ConnectedAccountDTO!
|
||||
updateConnectedAccount(input: UpdateConnectedAccountInput!): ConnectedAccountDTO!
|
||||
deleteConnectedAccount(id: UUID!): ConnectedAccountDTO!
|
||||
createWebhook(input: CreateWebhookInput!): Webhook!
|
||||
updateWebhook(input: UpdateWebhookInput!): Webhook!
|
||||
deleteWebhook(id: UUID!): Webhook!
|
||||
@@ -4203,6 +4381,105 @@ input EditSsoInput {
|
||||
status: SSOIdentityProviderStatus!
|
||||
}
|
||||
|
||||
input CreateMessageFolderInput {
|
||||
id: UUID
|
||||
name: String
|
||||
isSentFolder: Boolean!
|
||||
isSynced: Boolean!
|
||||
externalId: String
|
||||
pendingSyncAction: MessageFolderPendingSyncAction!
|
||||
messageChannelId: UUID!
|
||||
parentFolderId: UUID
|
||||
}
|
||||
|
||||
input UpdateMessageFolderInput {
|
||||
id: UUID!
|
||||
update: UpdateMessageFolderInputUpdates!
|
||||
}
|
||||
|
||||
input UpdateMessageFolderInputUpdates {
|
||||
name: String
|
||||
syncCursor: String
|
||||
isSynced: Boolean
|
||||
pendingSyncAction: MessageFolderPendingSyncAction
|
||||
}
|
||||
|
||||
input CreateCalendarChannelInput {
|
||||
id: UUID
|
||||
handle: String!
|
||||
visibility: CalendarChannelVisibility!
|
||||
syncStage: CalendarChannelSyncStage!
|
||||
connectedAccountId: UUID!
|
||||
isContactAutoCreationEnabled: Boolean!
|
||||
contactAutoCreationPolicy: CalendarChannelContactAutoCreationPolicy!
|
||||
isSyncEnabled: Boolean!
|
||||
}
|
||||
|
||||
input UpdateCalendarChannelInput {
|
||||
id: UUID!
|
||||
update: UpdateCalendarChannelInputUpdates!
|
||||
}
|
||||
|
||||
input UpdateCalendarChannelInputUpdates {
|
||||
visibility: CalendarChannelVisibility
|
||||
isContactAutoCreationEnabled: Boolean
|
||||
contactAutoCreationPolicy: CalendarChannelContactAutoCreationPolicy
|
||||
isSyncEnabled: Boolean
|
||||
}
|
||||
|
||||
input CreateMessageChannelInput {
|
||||
id: UUID
|
||||
handle: String!
|
||||
visibility: MessageChannelVisibility!
|
||||
type: MessageChannelType!
|
||||
syncStage: MessageChannelSyncStage!
|
||||
connectedAccountId: UUID!
|
||||
isContactAutoCreationEnabled: Boolean!
|
||||
contactAutoCreationPolicy: MessageChannelContactAutoCreationPolicy!
|
||||
messageFolderImportPolicy: MessageFolderImportPolicy!
|
||||
excludeNonProfessionalEmails: Boolean!
|
||||
excludeGroupEmails: Boolean!
|
||||
pendingGroupEmailsAction: MessageChannelPendingGroupEmailsAction!
|
||||
isSyncEnabled: Boolean!
|
||||
}
|
||||
|
||||
input UpdateMessageChannelInput {
|
||||
id: UUID!
|
||||
update: UpdateMessageChannelInputUpdates!
|
||||
}
|
||||
|
||||
input UpdateMessageChannelInputUpdates {
|
||||
visibility: MessageChannelVisibility
|
||||
isContactAutoCreationEnabled: Boolean
|
||||
contactAutoCreationPolicy: MessageChannelContactAutoCreationPolicy
|
||||
messageFolderImportPolicy: MessageFolderImportPolicy
|
||||
isSyncEnabled: Boolean
|
||||
excludeNonProfessionalEmails: Boolean
|
||||
excludeGroupEmails: Boolean
|
||||
}
|
||||
|
||||
input CreateConnectedAccountInput {
|
||||
id: UUID
|
||||
handle: String!
|
||||
provider: String!
|
||||
accessToken: String
|
||||
refreshToken: String
|
||||
scopes: [String!]
|
||||
userWorkspaceId: UUID!
|
||||
}
|
||||
|
||||
input UpdateConnectedAccountInput {
|
||||
id: UUID!
|
||||
update: UpdateConnectedAccountInputUpdates!
|
||||
}
|
||||
|
||||
input UpdateConnectedAccountInputUpdates {
|
||||
accessToken: String
|
||||
refreshToken: String
|
||||
handleAliases: [String!]
|
||||
scopes: [String!]
|
||||
}
|
||||
|
||||
input CreateWebhookInput {
|
||||
id: UUID
|
||||
targetUrl: String!
|
||||
|
||||
@@ -1252,7 +1252,7 @@ export interface FeatureFlag {
|
||||
__typename: 'FeatureFlag'
|
||||
}
|
||||
|
||||
export type FeatureFlagKey = 'IS_UNIQUE_INDEXES_ENABLED' | 'IS_JSON_FILTER_ENABLED' | 'IS_AI_ENABLED' | 'IS_APPLICATION_ENABLED' | 'IS_MARKETPLACE_ENABLED' | 'IS_RECORD_PAGE_LAYOUT_EDITING_ENABLED' | 'IS_PUBLIC_DOMAIN_ENABLED' | 'IS_EMAILING_DOMAIN_ENABLED' | 'IS_DASHBOARD_V2_ENABLED' | 'IS_ATTACHMENT_MIGRATED' | 'IS_NOTE_TARGET_MIGRATED' | 'IS_TASK_TARGET_MIGRATED' | 'IS_ROW_LEVEL_PERMISSION_PREDICATES_ENABLED' | 'IS_JUNCTION_RELATIONS_ENABLED' | 'IS_COMMAND_MENU_ITEM_ENABLED' | 'IS_NAVIGATION_MENU_ITEM_ENABLED' | 'IS_DATE_TIME_WHOLE_DAY_FILTER_ENABLED' | 'IS_NAVIGATION_MENU_ITEM_EDITING_ENABLED' | 'IS_DRAFT_EMAIL_ENABLED' | 'IS_RICH_TEXT_V1_MIGRATED' | 'IS_RECORD_PAGE_LAYOUT_GLOBAL_EDITION_ENABLED'
|
||||
export type FeatureFlagKey = 'IS_UNIQUE_INDEXES_ENABLED' | 'IS_JSON_FILTER_ENABLED' | 'IS_AI_ENABLED' | 'IS_APPLICATION_ENABLED' | 'IS_MARKETPLACE_ENABLED' | 'IS_RECORD_PAGE_LAYOUT_EDITING_ENABLED' | 'IS_PUBLIC_DOMAIN_ENABLED' | 'IS_EMAILING_DOMAIN_ENABLED' | 'IS_DASHBOARD_V2_ENABLED' | 'IS_ATTACHMENT_MIGRATED' | 'IS_NOTE_TARGET_MIGRATED' | 'IS_TASK_TARGET_MIGRATED' | 'IS_ROW_LEVEL_PERMISSION_PREDICATES_ENABLED' | 'IS_JUNCTION_RELATIONS_ENABLED' | 'IS_COMMAND_MENU_ITEM_ENABLED' | 'IS_NAVIGATION_MENU_ITEM_ENABLED' | 'IS_DATE_TIME_WHOLE_DAY_FILTER_ENABLED' | 'IS_NAVIGATION_MENU_ITEM_EDITING_ENABLED' | 'IS_DRAFT_EMAIL_ENABLED' | 'IS_RICH_TEXT_V1_MIGRATED' | 'IS_RECORD_PAGE_LAYOUT_GLOBAL_EDITION_ENABLED' | 'IS_CONNECTED_ACCOUNT_MIGRATED'
|
||||
|
||||
export interface SSOIdentityProvider {
|
||||
id: Scalars['UUID']
|
||||
@@ -1877,6 +1877,108 @@ export interface AgentTurn {
|
||||
__typename: 'AgentTurn'
|
||||
}
|
||||
|
||||
export interface CalendarChannel {
|
||||
id: Scalars['UUID']
|
||||
handle: Scalars['String']
|
||||
syncStatus: CalendarChannelSyncStatus
|
||||
syncStage: CalendarChannelSyncStage
|
||||
visibility: CalendarChannelVisibility
|
||||
isContactAutoCreationEnabled: Scalars['Boolean']
|
||||
contactAutoCreationPolicy: CalendarChannelContactAutoCreationPolicy
|
||||
isSyncEnabled: Scalars['Boolean']
|
||||
syncCursor?: Scalars['String']
|
||||
syncedAt?: Scalars['DateTime']
|
||||
syncStageStartedAt?: Scalars['DateTime']
|
||||
throttleFailureCount: Scalars['Float']
|
||||
connectedAccountId: Scalars['UUID']
|
||||
createdAt: Scalars['DateTime']
|
||||
updatedAt: Scalars['DateTime']
|
||||
__typename: 'CalendarChannel'
|
||||
}
|
||||
|
||||
export type CalendarChannelSyncStatus = 'NOT_SYNCED' | 'ONGOING' | 'ACTIVE' | 'FAILED_INSUFFICIENT_PERMISSIONS' | 'FAILED_UNKNOWN'
|
||||
|
||||
export type CalendarChannelSyncStage = 'PENDING_CONFIGURATION' | 'CALENDAR_EVENT_LIST_FETCH_PENDING' | 'CALENDAR_EVENT_LIST_FETCH_SCHEDULED' | 'CALENDAR_EVENT_LIST_FETCH_ONGOING' | 'CALENDAR_EVENTS_IMPORT_PENDING' | 'CALENDAR_EVENTS_IMPORT_SCHEDULED' | 'CALENDAR_EVENTS_IMPORT_ONGOING' | 'FAILED'
|
||||
|
||||
export type CalendarChannelVisibility = 'METADATA' | 'SHARE_EVERYTHING'
|
||||
|
||||
export type CalendarChannelContactAutoCreationPolicy = 'AS_PARTICIPANT_AND_ORGANIZER' | 'AS_PARTICIPANT' | 'AS_ORGANIZER' | 'NONE'
|
||||
|
||||
export interface ConnectedAccountDTO {
|
||||
id: Scalars['UUID']
|
||||
handle: Scalars['String']
|
||||
provider: Scalars['String']
|
||||
accessToken?: Scalars['String']
|
||||
refreshToken?: Scalars['String']
|
||||
lastCredentialsRefreshedAt?: Scalars['DateTime']
|
||||
authFailedAt?: Scalars['DateTime']
|
||||
handleAliases?: Scalars['String'][]
|
||||
scopes?: Scalars['String'][]
|
||||
connectionParameters?: Scalars['JSON']
|
||||
lastSignedInAt?: Scalars['DateTime']
|
||||
oidcTokenClaims?: Scalars['JSON']
|
||||
userWorkspaceId: Scalars['UUID']
|
||||
createdAt: Scalars['DateTime']
|
||||
updatedAt: Scalars['DateTime']
|
||||
__typename: 'ConnectedAccountDTO'
|
||||
}
|
||||
|
||||
export interface MessageChannel {
|
||||
id: Scalars['UUID']
|
||||
visibility: MessageChannelVisibility
|
||||
handle: Scalars['String']
|
||||
type: MessageChannelType
|
||||
isContactAutoCreationEnabled: Scalars['Boolean']
|
||||
contactAutoCreationPolicy: MessageChannelContactAutoCreationPolicy
|
||||
messageFolderImportPolicy: MessageFolderImportPolicy
|
||||
excludeNonProfessionalEmails: Scalars['Boolean']
|
||||
excludeGroupEmails: Scalars['Boolean']
|
||||
pendingGroupEmailsAction: MessageChannelPendingGroupEmailsAction
|
||||
isSyncEnabled: Scalars['Boolean']
|
||||
syncCursor?: Scalars['String']
|
||||
syncedAt?: Scalars['DateTime']
|
||||
syncStatus: MessageChannelSyncStatus
|
||||
syncStage: MessageChannelSyncStage
|
||||
syncStageStartedAt?: Scalars['DateTime']
|
||||
throttleFailureCount: Scalars['Float']
|
||||
throttleRetryAfter?: Scalars['DateTime']
|
||||
connectedAccountId: Scalars['UUID']
|
||||
createdAt: Scalars['DateTime']
|
||||
updatedAt: Scalars['DateTime']
|
||||
__typename: 'MessageChannel'
|
||||
}
|
||||
|
||||
export type MessageChannelVisibility = 'METADATA' | 'SUBJECT' | 'SHARE_EVERYTHING'
|
||||
|
||||
export type MessageChannelType = 'EMAIL' | 'SMS'
|
||||
|
||||
export type MessageChannelContactAutoCreationPolicy = 'SENT_AND_RECEIVED' | 'SENT' | 'NONE'
|
||||
|
||||
export type MessageFolderImportPolicy = 'ALL_FOLDERS' | 'SELECTED_FOLDERS'
|
||||
|
||||
export type MessageChannelPendingGroupEmailsAction = 'GROUP_EMAILS_DELETION' | 'GROUP_EMAILS_IMPORT' | 'NONE'
|
||||
|
||||
export type MessageChannelSyncStatus = 'NOT_SYNCED' | 'ONGOING' | 'ACTIVE' | 'FAILED_INSUFFICIENT_PERMISSIONS' | 'FAILED_UNKNOWN'
|
||||
|
||||
export type MessageChannelSyncStage = 'PENDING_CONFIGURATION' | 'MESSAGE_LIST_FETCH_PENDING' | 'MESSAGE_LIST_FETCH_SCHEDULED' | 'MESSAGE_LIST_FETCH_ONGOING' | 'MESSAGES_IMPORT_PENDING' | 'MESSAGES_IMPORT_SCHEDULED' | 'MESSAGES_IMPORT_ONGOING' | 'FAILED'
|
||||
|
||||
export interface MessageFolder {
|
||||
id: Scalars['UUID']
|
||||
name?: Scalars['String']
|
||||
syncCursor?: Scalars['String']
|
||||
isSentFolder: Scalars['Boolean']
|
||||
isSynced: Scalars['Boolean']
|
||||
parentFolderId?: Scalars['UUID']
|
||||
externalId?: Scalars['String']
|
||||
pendingSyncAction: MessageFolderPendingSyncAction
|
||||
messageChannelId: Scalars['UUID']
|
||||
createdAt: Scalars['DateTime']
|
||||
updatedAt: Scalars['DateTime']
|
||||
__typename: 'MessageFolder'
|
||||
}
|
||||
|
||||
export type MessageFolderPendingSyncAction = 'FOLDER_DELETION' | 'NONE'
|
||||
|
||||
export interface CollectionHash {
|
||||
collectionName: AllMetadataName
|
||||
hash: Scalars['String']
|
||||
@@ -2622,6 +2724,14 @@ export interface Query {
|
||||
findWorkspaceFromInviteHash: Workspace
|
||||
validatePasswordResetToken: ValidatePasswordResetToken
|
||||
getSSOIdentityProviders: FindAvailableSSOIDP[]
|
||||
messageFolders: MessageFolder[]
|
||||
messageFolder?: MessageFolder
|
||||
calendarChannels: CalendarChannel[]
|
||||
calendarChannel?: CalendarChannel
|
||||
messageChannels: MessageChannel[]
|
||||
messageChannel?: MessageChannel
|
||||
connectedAccounts: ConnectedAccountDTO[]
|
||||
connectedAccount?: ConnectedAccountDTO
|
||||
webhooks: Webhook[]
|
||||
webhook?: Webhook
|
||||
minimalMetadata: MinimalMetadata
|
||||
@@ -2818,6 +2928,18 @@ export interface Mutation {
|
||||
createSAMLIdentityProvider: SetupSso
|
||||
deleteSSOIdentityProvider: DeleteSso
|
||||
editSSOIdentityProvider: EditSso
|
||||
createMessageFolder: MessageFolder
|
||||
updateMessageFolder: MessageFolder
|
||||
deleteMessageFolder: MessageFolder
|
||||
createCalendarChannel: CalendarChannel
|
||||
updateCalendarChannel: CalendarChannel
|
||||
deleteCalendarChannel: CalendarChannel
|
||||
createMessageChannel: MessageChannel
|
||||
updateMessageChannel: MessageChannel
|
||||
deleteMessageChannel: MessageChannel
|
||||
createConnectedAccount: ConnectedAccountDTO
|
||||
updateConnectedAccount: ConnectedAccountDTO
|
||||
deleteConnectedAccount: ConnectedAccountDTO
|
||||
createWebhook: Webhook
|
||||
updateWebhook: Webhook
|
||||
deleteWebhook: Webhook
|
||||
@@ -4863,6 +4985,88 @@ export interface AgentTurnGenqlSelection{
|
||||
__scalar?: boolean | number
|
||||
}
|
||||
|
||||
export interface CalendarChannelGenqlSelection{
|
||||
id?: boolean | number
|
||||
handle?: boolean | number
|
||||
syncStatus?: boolean | number
|
||||
syncStage?: boolean | number
|
||||
visibility?: boolean | number
|
||||
isContactAutoCreationEnabled?: boolean | number
|
||||
contactAutoCreationPolicy?: boolean | number
|
||||
isSyncEnabled?: boolean | number
|
||||
syncCursor?: boolean | number
|
||||
syncedAt?: boolean | number
|
||||
syncStageStartedAt?: boolean | number
|
||||
throttleFailureCount?: boolean | number
|
||||
connectedAccountId?: boolean | number
|
||||
createdAt?: boolean | number
|
||||
updatedAt?: boolean | number
|
||||
__typename?: boolean | number
|
||||
__scalar?: boolean | number
|
||||
}
|
||||
|
||||
export interface ConnectedAccountDTOGenqlSelection{
|
||||
id?: boolean | number
|
||||
handle?: boolean | number
|
||||
provider?: boolean | number
|
||||
accessToken?: boolean | number
|
||||
refreshToken?: boolean | number
|
||||
lastCredentialsRefreshedAt?: boolean | number
|
||||
authFailedAt?: boolean | number
|
||||
handleAliases?: boolean | number
|
||||
scopes?: boolean | number
|
||||
connectionParameters?: boolean | number
|
||||
lastSignedInAt?: boolean | number
|
||||
oidcTokenClaims?: boolean | number
|
||||
userWorkspaceId?: boolean | number
|
||||
createdAt?: boolean | number
|
||||
updatedAt?: boolean | number
|
||||
__typename?: boolean | number
|
||||
__scalar?: boolean | number
|
||||
}
|
||||
|
||||
export interface MessageChannelGenqlSelection{
|
||||
id?: boolean | number
|
||||
visibility?: boolean | number
|
||||
handle?: boolean | number
|
||||
type?: boolean | number
|
||||
isContactAutoCreationEnabled?: boolean | number
|
||||
contactAutoCreationPolicy?: boolean | number
|
||||
messageFolderImportPolicy?: boolean | number
|
||||
excludeNonProfessionalEmails?: boolean | number
|
||||
excludeGroupEmails?: boolean | number
|
||||
pendingGroupEmailsAction?: boolean | number
|
||||
isSyncEnabled?: boolean | number
|
||||
syncCursor?: boolean | number
|
||||
syncedAt?: boolean | number
|
||||
syncStatus?: boolean | number
|
||||
syncStage?: boolean | number
|
||||
syncStageStartedAt?: boolean | number
|
||||
throttleFailureCount?: boolean | number
|
||||
throttleRetryAfter?: boolean | number
|
||||
connectedAccountId?: boolean | number
|
||||
createdAt?: boolean | number
|
||||
updatedAt?: boolean | number
|
||||
__typename?: boolean | number
|
||||
__scalar?: boolean | number
|
||||
}
|
||||
|
||||
export interface MessageFolderGenqlSelection{
|
||||
id?: boolean | number
|
||||
name?: boolean | number
|
||||
syncCursor?: boolean | number
|
||||
isSentFolder?: boolean | number
|
||||
isSynced?: boolean | number
|
||||
parentFolderId?: boolean | number
|
||||
externalId?: boolean | number
|
||||
pendingSyncAction?: boolean | number
|
||||
messageChannelId?: boolean | number
|
||||
createdAt?: boolean | number
|
||||
updatedAt?: boolean | number
|
||||
__typename?: boolean | number
|
||||
__scalar?: boolean | number
|
||||
}
|
||||
|
||||
export interface CollectionHashGenqlSelection{
|
||||
collectionName?: boolean | number
|
||||
hash?: boolean | number
|
||||
@@ -5670,6 +5874,14 @@ export interface QueryGenqlSelection{
|
||||
findWorkspaceFromInviteHash?: (WorkspaceGenqlSelection & { __args: {inviteHash: Scalars['String']} })
|
||||
validatePasswordResetToken?: (ValidatePasswordResetTokenGenqlSelection & { __args: {passwordResetToken: Scalars['String']} })
|
||||
getSSOIdentityProviders?: FindAvailableSSOIDPGenqlSelection
|
||||
messageFolders?: (MessageFolderGenqlSelection & { __args?: {messageChannelId?: (Scalars['UUID'] | null)} })
|
||||
messageFolder?: (MessageFolderGenqlSelection & { __args: {id: Scalars['UUID']} })
|
||||
calendarChannels?: (CalendarChannelGenqlSelection & { __args?: {connectedAccountId?: (Scalars['UUID'] | null)} })
|
||||
calendarChannel?: (CalendarChannelGenqlSelection & { __args: {id: Scalars['UUID']} })
|
||||
messageChannels?: (MessageChannelGenqlSelection & { __args?: {connectedAccountId?: (Scalars['UUID'] | null)} })
|
||||
messageChannel?: (MessageChannelGenqlSelection & { __args: {id: Scalars['UUID']} })
|
||||
connectedAccounts?: ConnectedAccountDTOGenqlSelection
|
||||
connectedAccount?: (ConnectedAccountDTOGenqlSelection & { __args: {id: Scalars['UUID']} })
|
||||
webhooks?: WebhookGenqlSelection
|
||||
webhook?: (WebhookGenqlSelection & { __args: {id: Scalars['UUID']} })
|
||||
minimalMetadata?: MinimalMetadataGenqlSelection
|
||||
@@ -5891,6 +6103,18 @@ export interface MutationGenqlSelection{
|
||||
createSAMLIdentityProvider?: (SetupSsoGenqlSelection & { __args: {input: SetupSAMLSsoInput} })
|
||||
deleteSSOIdentityProvider?: (DeleteSsoGenqlSelection & { __args: {input: DeleteSsoInput} })
|
||||
editSSOIdentityProvider?: (EditSsoGenqlSelection & { __args: {input: EditSsoInput} })
|
||||
createMessageFolder?: (MessageFolderGenqlSelection & { __args: {input: CreateMessageFolderInput} })
|
||||
updateMessageFolder?: (MessageFolderGenqlSelection & { __args: {input: UpdateMessageFolderInput} })
|
||||
deleteMessageFolder?: (MessageFolderGenqlSelection & { __args: {id: Scalars['UUID']} })
|
||||
createCalendarChannel?: (CalendarChannelGenqlSelection & { __args: {input: CreateCalendarChannelInput} })
|
||||
updateCalendarChannel?: (CalendarChannelGenqlSelection & { __args: {input: UpdateCalendarChannelInput} })
|
||||
deleteCalendarChannel?: (CalendarChannelGenqlSelection & { __args: {id: Scalars['UUID']} })
|
||||
createMessageChannel?: (MessageChannelGenqlSelection & { __args: {input: CreateMessageChannelInput} })
|
||||
updateMessageChannel?: (MessageChannelGenqlSelection & { __args: {input: UpdateMessageChannelInput} })
|
||||
deleteMessageChannel?: (MessageChannelGenqlSelection & { __args: {id: Scalars['UUID']} })
|
||||
createConnectedAccount?: (ConnectedAccountDTOGenqlSelection & { __args: {input: CreateConnectedAccountInput} })
|
||||
updateConnectedAccount?: (ConnectedAccountDTOGenqlSelection & { __args: {input: UpdateConnectedAccountInput} })
|
||||
deleteConnectedAccount?: (ConnectedAccountDTOGenqlSelection & { __args: {id: Scalars['UUID']} })
|
||||
createWebhook?: (WebhookGenqlSelection & { __args: {input: CreateWebhookInput} })
|
||||
updateWebhook?: (WebhookGenqlSelection & { __args: {input: UpdateWebhookInput} })
|
||||
deleteWebhook?: (WebhookGenqlSelection & { __args: {id: Scalars['UUID']} })
|
||||
@@ -6215,6 +6439,30 @@ export interface DeleteSsoInput {identityProviderId: Scalars['UUID']}
|
||||
|
||||
export interface EditSsoInput {id: Scalars['UUID'],status: SSOIdentityProviderStatus}
|
||||
|
||||
export interface CreateMessageFolderInput {id?: (Scalars['UUID'] | null),name?: (Scalars['String'] | null),isSentFolder: Scalars['Boolean'],isSynced: Scalars['Boolean'],externalId?: (Scalars['String'] | null),pendingSyncAction: MessageFolderPendingSyncAction,messageChannelId: Scalars['UUID'],parentFolderId?: (Scalars['UUID'] | null)}
|
||||
|
||||
export interface UpdateMessageFolderInput {id: Scalars['UUID'],update: UpdateMessageFolderInputUpdates}
|
||||
|
||||
export interface UpdateMessageFolderInputUpdates {name?: (Scalars['String'] | null),syncCursor?: (Scalars['String'] | null),isSynced?: (Scalars['Boolean'] | null),pendingSyncAction?: (MessageFolderPendingSyncAction | null)}
|
||||
|
||||
export interface CreateCalendarChannelInput {id?: (Scalars['UUID'] | null),handle: Scalars['String'],visibility: CalendarChannelVisibility,syncStage: CalendarChannelSyncStage,connectedAccountId: Scalars['UUID'],isContactAutoCreationEnabled: Scalars['Boolean'],contactAutoCreationPolicy: CalendarChannelContactAutoCreationPolicy,isSyncEnabled: Scalars['Boolean']}
|
||||
|
||||
export interface UpdateCalendarChannelInput {id: Scalars['UUID'],update: UpdateCalendarChannelInputUpdates}
|
||||
|
||||
export interface UpdateCalendarChannelInputUpdates {visibility?: (CalendarChannelVisibility | null),isContactAutoCreationEnabled?: (Scalars['Boolean'] | null),contactAutoCreationPolicy?: (CalendarChannelContactAutoCreationPolicy | null),isSyncEnabled?: (Scalars['Boolean'] | null)}
|
||||
|
||||
export interface CreateMessageChannelInput {id?: (Scalars['UUID'] | null),handle: Scalars['String'],visibility: MessageChannelVisibility,type: MessageChannelType,syncStage: MessageChannelSyncStage,connectedAccountId: Scalars['UUID'],isContactAutoCreationEnabled: Scalars['Boolean'],contactAutoCreationPolicy: MessageChannelContactAutoCreationPolicy,messageFolderImportPolicy: MessageFolderImportPolicy,excludeNonProfessionalEmails: Scalars['Boolean'],excludeGroupEmails: Scalars['Boolean'],pendingGroupEmailsAction: MessageChannelPendingGroupEmailsAction,isSyncEnabled: Scalars['Boolean']}
|
||||
|
||||
export interface UpdateMessageChannelInput {id: Scalars['UUID'],update: UpdateMessageChannelInputUpdates}
|
||||
|
||||
export interface UpdateMessageChannelInputUpdates {visibility?: (MessageChannelVisibility | null),isContactAutoCreationEnabled?: (Scalars['Boolean'] | null),contactAutoCreationPolicy?: (MessageChannelContactAutoCreationPolicy | null),messageFolderImportPolicy?: (MessageFolderImportPolicy | null),isSyncEnabled?: (Scalars['Boolean'] | null),excludeNonProfessionalEmails?: (Scalars['Boolean'] | null),excludeGroupEmails?: (Scalars['Boolean'] | null)}
|
||||
|
||||
export interface CreateConnectedAccountInput {id?: (Scalars['UUID'] | null),handle: Scalars['String'],provider: Scalars['String'],accessToken?: (Scalars['String'] | null),refreshToken?: (Scalars['String'] | null),scopes?: (Scalars['String'][] | null),userWorkspaceId: Scalars['UUID']}
|
||||
|
||||
export interface UpdateConnectedAccountInput {id: Scalars['UUID'],update: UpdateConnectedAccountInputUpdates}
|
||||
|
||||
export interface UpdateConnectedAccountInputUpdates {accessToken?: (Scalars['String'] | null),refreshToken?: (Scalars['String'] | null),handleAliases?: (Scalars['String'][] | null),scopes?: (Scalars['String'][] | null)}
|
||||
|
||||
export interface CreateWebhookInput {id?: (Scalars['UUID'] | null),targetUrl: Scalars['String'],operations: Scalars['String'][],description?: (Scalars['String'] | null),secret?: (Scalars['String'] | null)}
|
||||
|
||||
export interface UpdateWebhookInput {
|
||||
@@ -7647,6 +7895,38 @@ export interface LogicFunctionLogsInput {applicationId?: (Scalars['UUID'] | null
|
||||
|
||||
|
||||
|
||||
const CalendarChannel_possibleTypes: string[] = ['CalendarChannel']
|
||||
export const isCalendarChannel = (obj?: { __typename?: any } | null): obj is CalendarChannel => {
|
||||
if (!obj?.__typename) throw new Error('__typename is missing in "isCalendarChannel"')
|
||||
return CalendarChannel_possibleTypes.includes(obj.__typename)
|
||||
}
|
||||
|
||||
|
||||
|
||||
const ConnectedAccountDTO_possibleTypes: string[] = ['ConnectedAccountDTO']
|
||||
export const isConnectedAccountDTO = (obj?: { __typename?: any } | null): obj is ConnectedAccountDTO => {
|
||||
if (!obj?.__typename) throw new Error('__typename is missing in "isConnectedAccountDTO"')
|
||||
return ConnectedAccountDTO_possibleTypes.includes(obj.__typename)
|
||||
}
|
||||
|
||||
|
||||
|
||||
const MessageChannel_possibleTypes: string[] = ['MessageChannel']
|
||||
export const isMessageChannel = (obj?: { __typename?: any } | null): obj is MessageChannel => {
|
||||
if (!obj?.__typename) throw new Error('__typename is missing in "isMessageChannel"')
|
||||
return MessageChannel_possibleTypes.includes(obj.__typename)
|
||||
}
|
||||
|
||||
|
||||
|
||||
const MessageFolder_possibleTypes: string[] = ['MessageFolder']
|
||||
export const isMessageFolder = (obj?: { __typename?: any } | null): obj is MessageFolder => {
|
||||
if (!obj?.__typename) throw new Error('__typename is missing in "isMessageFolder"')
|
||||
return MessageFolder_possibleTypes.includes(obj.__typename)
|
||||
}
|
||||
|
||||
|
||||
|
||||
const CollectionHash_possibleTypes: string[] = ['CollectionHash']
|
||||
export const isCollectionHash = (obj?: { __typename?: any } | null): obj is CollectionHash => {
|
||||
if (!obj?.__typename) throw new Error('__typename is missing in "isCollectionHash"')
|
||||
@@ -8630,7 +8910,8 @@ export const enumFeatureFlagKey = {
|
||||
IS_NAVIGATION_MENU_ITEM_EDITING_ENABLED: 'IS_NAVIGATION_MENU_ITEM_EDITING_ENABLED' as const,
|
||||
IS_DRAFT_EMAIL_ENABLED: 'IS_DRAFT_EMAIL_ENABLED' as const,
|
||||
IS_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_PAGE_LAYOUT_GLOBAL_EDITION_ENABLED: 'IS_RECORD_PAGE_LAYOUT_GLOBAL_EDITION_ENABLED' as const,
|
||||
IS_CONNECTED_ACCOUNT_MIGRATED: 'IS_CONNECTED_ACCOUNT_MIGRATED' as const
|
||||
}
|
||||
|
||||
export const enumRelationType = {
|
||||
@@ -8733,6 +9014,89 @@ export const enumCommandMenuItemAvailabilityType = {
|
||||
FALLBACK: 'FALLBACK' as const
|
||||
}
|
||||
|
||||
export const enumCalendarChannelSyncStatus = {
|
||||
NOT_SYNCED: 'NOT_SYNCED' as const,
|
||||
ONGOING: 'ONGOING' as const,
|
||||
ACTIVE: 'ACTIVE' as const,
|
||||
FAILED_INSUFFICIENT_PERMISSIONS: 'FAILED_INSUFFICIENT_PERMISSIONS' as const,
|
||||
FAILED_UNKNOWN: 'FAILED_UNKNOWN' as const
|
||||
}
|
||||
|
||||
export const enumCalendarChannelSyncStage = {
|
||||
PENDING_CONFIGURATION: 'PENDING_CONFIGURATION' as const,
|
||||
CALENDAR_EVENT_LIST_FETCH_PENDING: 'CALENDAR_EVENT_LIST_FETCH_PENDING' as const,
|
||||
CALENDAR_EVENT_LIST_FETCH_SCHEDULED: 'CALENDAR_EVENT_LIST_FETCH_SCHEDULED' as const,
|
||||
CALENDAR_EVENT_LIST_FETCH_ONGOING: 'CALENDAR_EVENT_LIST_FETCH_ONGOING' as const,
|
||||
CALENDAR_EVENTS_IMPORT_PENDING: 'CALENDAR_EVENTS_IMPORT_PENDING' as const,
|
||||
CALENDAR_EVENTS_IMPORT_SCHEDULED: 'CALENDAR_EVENTS_IMPORT_SCHEDULED' as const,
|
||||
CALENDAR_EVENTS_IMPORT_ONGOING: 'CALENDAR_EVENTS_IMPORT_ONGOING' as const,
|
||||
FAILED: 'FAILED' as const
|
||||
}
|
||||
|
||||
export const enumCalendarChannelVisibility = {
|
||||
METADATA: 'METADATA' as const,
|
||||
SHARE_EVERYTHING: 'SHARE_EVERYTHING' as const
|
||||
}
|
||||
|
||||
export const enumCalendarChannelContactAutoCreationPolicy = {
|
||||
AS_PARTICIPANT_AND_ORGANIZER: 'AS_PARTICIPANT_AND_ORGANIZER' as const,
|
||||
AS_PARTICIPANT: 'AS_PARTICIPANT' as const,
|
||||
AS_ORGANIZER: 'AS_ORGANIZER' as const,
|
||||
NONE: 'NONE' as const
|
||||
}
|
||||
|
||||
export const enumMessageChannelVisibility = {
|
||||
METADATA: 'METADATA' as const,
|
||||
SUBJECT: 'SUBJECT' as const,
|
||||
SHARE_EVERYTHING: 'SHARE_EVERYTHING' as const
|
||||
}
|
||||
|
||||
export const enumMessageChannelType = {
|
||||
EMAIL: 'EMAIL' as const,
|
||||
SMS: 'SMS' as const
|
||||
}
|
||||
|
||||
export const enumMessageChannelContactAutoCreationPolicy = {
|
||||
SENT_AND_RECEIVED: 'SENT_AND_RECEIVED' as const,
|
||||
SENT: 'SENT' as const,
|
||||
NONE: 'NONE' as const
|
||||
}
|
||||
|
||||
export const enumMessageFolderImportPolicy = {
|
||||
ALL_FOLDERS: 'ALL_FOLDERS' as const,
|
||||
SELECTED_FOLDERS: 'SELECTED_FOLDERS' as const
|
||||
}
|
||||
|
||||
export const enumMessageChannelPendingGroupEmailsAction = {
|
||||
GROUP_EMAILS_DELETION: 'GROUP_EMAILS_DELETION' as const,
|
||||
GROUP_EMAILS_IMPORT: 'GROUP_EMAILS_IMPORT' as const,
|
||||
NONE: 'NONE' as const
|
||||
}
|
||||
|
||||
export const enumMessageChannelSyncStatus = {
|
||||
NOT_SYNCED: 'NOT_SYNCED' as const,
|
||||
ONGOING: 'ONGOING' as const,
|
||||
ACTIVE: 'ACTIVE' as const,
|
||||
FAILED_INSUFFICIENT_PERMISSIONS: 'FAILED_INSUFFICIENT_PERMISSIONS' as const,
|
||||
FAILED_UNKNOWN: 'FAILED_UNKNOWN' as const
|
||||
}
|
||||
|
||||
export const enumMessageChannelSyncStage = {
|
||||
PENDING_CONFIGURATION: 'PENDING_CONFIGURATION' as const,
|
||||
MESSAGE_LIST_FETCH_PENDING: 'MESSAGE_LIST_FETCH_PENDING' as const,
|
||||
MESSAGE_LIST_FETCH_SCHEDULED: 'MESSAGE_LIST_FETCH_SCHEDULED' as const,
|
||||
MESSAGE_LIST_FETCH_ONGOING: 'MESSAGE_LIST_FETCH_ONGOING' as const,
|
||||
MESSAGES_IMPORT_PENDING: 'MESSAGES_IMPORT_PENDING' as const,
|
||||
MESSAGES_IMPORT_SCHEDULED: 'MESSAGES_IMPORT_SCHEDULED' as const,
|
||||
MESSAGES_IMPORT_ONGOING: 'MESSAGES_IMPORT_ONGOING' as const,
|
||||
FAILED: 'FAILED' as const
|
||||
}
|
||||
|
||||
export const enumMessageFolderPendingSyncAction = {
|
||||
FOLDER_DELETION: 'FOLDER_DELETION' as const,
|
||||
NONE: 'NONE' as const
|
||||
}
|
||||
|
||||
export const enumAllMetadataName = {
|
||||
fieldMetadata: 'fieldMetadata' as const,
|
||||
objectMetadata: 'objectMetadata' as const,
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user