From ee5aaae796d5ef8a010441bca313d0cce11b5360 Mon Sep 17 00:00:00 2001 From: Lucas Bordeau Date: Tue, 9 Apr 2024 17:09:02 +0200 Subject: [PATCH 1/3] Implemented dataloader for relation metadata (#4891) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Implemented dataloader package on metadata graphql server - Implemented a dataloader for relation metadata module --------- Co-authored-by: Jérémy M --- .../graphql/metadata-graphql-api.module.ts | 6 ++- .../api/graphql/metadata.module-factory.ts | 5 ++ .../dataloaders/dataloader.interface.ts | 7 +++ .../engine/dataloaders/dataloader.module.ts | 11 ++++ .../engine/dataloaders/dataloader.service.ts | 32 +++++++++++ .../field-metadata/field-metadata.resolver.ts | 18 ++++++- .../field-metadata/field-metadata.service.ts | 54 ++++++------------- .../relation-metadata.service.ts | 39 ++++++++++++++ 8 files changed, 132 insertions(+), 40 deletions(-) create mode 100644 packages/twenty-server/src/engine/dataloaders/dataloader.interface.ts create mode 100644 packages/twenty-server/src/engine/dataloaders/dataloader.module.ts create mode 100644 packages/twenty-server/src/engine/dataloaders/dataloader.service.ts diff --git a/packages/twenty-server/src/engine/api/graphql/metadata-graphql-api.module.ts b/packages/twenty-server/src/engine/api/graphql/metadata-graphql-api.module.ts index 9bcf02beff8e..cc305f99cff6 100644 --- a/packages/twenty-server/src/engine/api/graphql/metadata-graphql-api.module.ts +++ b/packages/twenty-server/src/engine/api/graphql/metadata-graphql-api.module.ts @@ -10,14 +10,16 @@ import { GraphQLConfigModule } from 'src/engine/api/graphql/graphql-config/graph import { metadataModuleFactory } from 'src/engine/api/graphql/metadata.module-factory'; import { EnvironmentService } from 'src/engine/integrations/environment/environment.service'; import { ExceptionHandlerService } from 'src/engine/integrations/exception-handler/exception-handler.service'; +import { DataloaderModule } from 'src/engine/dataloaders/dataloader.module'; +import { DataloaderService } from 'src/engine/dataloaders/dataloader.service'; @Module({ imports: [ GraphQLModule.forRootAsync({ driver: YogaDriver, useFactory: metadataModuleFactory, - imports: [GraphQLConfigModule], - inject: [EnvironmentService, ExceptionHandlerService], + imports: [GraphQLConfigModule, DataloaderModule], + inject: [EnvironmentService, ExceptionHandlerService, DataloaderService], }), MetadataEngineModule, WorkspaceMigrationRunnerModule, diff --git a/packages/twenty-server/src/engine/api/graphql/metadata.module-factory.ts b/packages/twenty-server/src/engine/api/graphql/metadata.module-factory.ts index 97c880477ad8..b58c3ac3b54e 100644 --- a/packages/twenty-server/src/engine/api/graphql/metadata.module-factory.ts +++ b/packages/twenty-server/src/engine/api/graphql/metadata.module-factory.ts @@ -7,10 +7,12 @@ import { useExceptionHandler } from 'src/engine/integrations/exception-handler/h import { useThrottler } from 'src/engine/api/graphql/graphql-config/hooks/use-throttler'; import { MetadataGraphQLApiModule } from 'src/engine/api/graphql/metadata-graphql-api.module'; import { renderApolloPlayground } from 'src/engine/utils/render-apollo-playground.util'; +import { DataloaderService } from 'src/engine/dataloaders/dataloader.service'; export const metadataModuleFactory = async ( environmentService: EnvironmentService, exceptionHandlerService: ExceptionHandlerService, + dataloaderService: DataloaderService, ): Promise => { const config: YogaDriverConfig = { autoSchemaFile: true, @@ -32,6 +34,9 @@ export const metadataModuleFactory = async ( }), ], path: '/metadata', + context: () => ({ + loaders: dataloaderService.createLoaders(), + }), }; if (environmentService.get('DEBUG_MODE')) { diff --git a/packages/twenty-server/src/engine/dataloaders/dataloader.interface.ts b/packages/twenty-server/src/engine/dataloaders/dataloader.interface.ts new file mode 100644 index 000000000000..defdba21188a --- /dev/null +++ b/packages/twenty-server/src/engine/dataloaders/dataloader.interface.ts @@ -0,0 +1,7 @@ +import DataLoader from 'dataloader'; + +import { RelationMetadataEntity } from 'src/engine/metadata-modules/relation-metadata/relation-metadata.entity'; + +export interface IDataloaders { + relationMetadataLoader: DataLoader; +} diff --git a/packages/twenty-server/src/engine/dataloaders/dataloader.module.ts b/packages/twenty-server/src/engine/dataloaders/dataloader.module.ts new file mode 100644 index 000000000000..a669e0e0501a --- /dev/null +++ b/packages/twenty-server/src/engine/dataloaders/dataloader.module.ts @@ -0,0 +1,11 @@ +import { Module } from '@nestjs/common'; + +import { DataloaderService } from 'src/engine/dataloaders/dataloader.service'; +import { RelationMetadataModule } from 'src/engine/metadata-modules/relation-metadata/relation-metadata.module'; + +@Module({ + providers: [DataloaderService], + imports: [RelationMetadataModule], + exports: [DataloaderService], +}) +export class DataloaderModule {} diff --git a/packages/twenty-server/src/engine/dataloaders/dataloader.service.ts b/packages/twenty-server/src/engine/dataloaders/dataloader.service.ts new file mode 100644 index 000000000000..4a12186c5dd0 --- /dev/null +++ b/packages/twenty-server/src/engine/dataloaders/dataloader.service.ts @@ -0,0 +1,32 @@ +import { Injectable } from '@nestjs/common'; + +import DataLoader from 'dataloader'; + +import { IDataloaders } from 'src/engine/dataloaders/dataloader.interface'; +import { RelationMetadataEntity } from 'src/engine/metadata-modules/relation-metadata/relation-metadata.entity'; +import { RelationMetadataService } from 'src/engine/metadata-modules/relation-metadata/relation-metadata.service'; + +@Injectable() +export class DataloaderService { + constructor( + private readonly relationMetadataService: RelationMetadataService, + ) {} + + createLoaders(): IDataloaders { + const relationMetadataLoader = new DataLoader< + string, + RelationMetadataEntity + >(async (fieldMetadataIds: string[]) => { + const relationsMetadataCollection = + await this.relationMetadataService.findManyRelationMetadataByFieldMetadataIds( + fieldMetadataIds, + ); + + return relationsMetadataCollection; + }); + + return { + relationMetadataLoader, + }; + } +} diff --git a/packages/twenty-server/src/engine/metadata-modules/field-metadata/field-metadata.resolver.ts b/packages/twenty-server/src/engine/metadata-modules/field-metadata/field-metadata.resolver.ts index 77deab4efd69..b4bc92e00fa8 100644 --- a/packages/twenty-server/src/engine/metadata-modules/field-metadata/field-metadata.resolver.ts +++ b/packages/twenty-server/src/engine/metadata-modules/field-metadata/field-metadata.resolver.ts @@ -5,6 +5,7 @@ import { } from '@nestjs/common'; import { Args, + Context, Mutation, Parent, ResolveField, @@ -12,6 +13,7 @@ import { } from '@nestjs/graphql'; import { Workspace } from 'src/engine/core-modules/workspace/workspace.entity'; +import { IDataloaders } from 'src/engine/dataloaders/dataloader.interface'; import { AuthWorkspace } from 'src/engine/decorators/auth/auth-workspace.decorator'; import { JwtAuthGuard } from 'src/engine/guards/jwt.auth.guard'; import { CreateOneFieldMetadataInput } from 'src/engine/metadata-modules/field-metadata/dtos/create-field.input'; @@ -89,7 +91,21 @@ export class FieldMetadataResolver { @ResolveField(() => RelationDefinitionDTO, { nullable: true }) async relationDefinition( @Parent() fieldMetadata: FieldMetadataDTO, + @Context() context: { loaders: IDataloaders }, ): Promise { - return await this.fieldMetadataService.getRelationDefinition(fieldMetadata); + if (fieldMetadata.type !== FieldMetadataType.RELATION) { + return null; + } + + const relationMetadataItem = + await context.loaders.relationMetadataLoader.load(fieldMetadata.id); + + const relationDefinition = + await this.fieldMetadataService.getRelationDefinitionFromRelationMetadata( + fieldMetadata, + relationMetadataItem, + ); + + return relationDefinition; } } diff --git a/packages/twenty-server/src/engine/metadata-modules/field-metadata/field-metadata.service.ts b/packages/twenty-server/src/engine/metadata-modules/field-metadata/field-metadata.service.ts index 67ec645e5b9a..cab253bfbe20 100644 --- a/packages/twenty-server/src/engine/metadata-modules/field-metadata/field-metadata.service.ts +++ b/packages/twenty-server/src/engine/metadata-modules/field-metadata/field-metadata.service.ts @@ -485,68 +485,48 @@ export class FieldMetadataService extends TypeOrmQueryService { - if (fieldMetadata.type !== FieldMetadataType.RELATION) { + if (fieldMetadataDTO.type !== FieldMetadataType.RELATION) { return null; } - const foundRelationMetadata = await this.relationMetadataRepository.findOne( - { - where: [ - { fromFieldMetadataId: fieldMetadata.id }, - { toFieldMetadataId: fieldMetadata.id }, - ], - relations: [ - 'fromObjectMetadata', - 'toObjectMetadata', - 'fromFieldMetadata', - 'toFieldMetadata', - ], - }, - ); - - if (!foundRelationMetadata) { - throw new Error('RelationMetadata not found'); - } - const isRelationFromSource = - foundRelationMetadata.fromFieldMetadata.id === fieldMetadata.id; + relationMetadata.fromFieldMetadata.id === fieldMetadataDTO.id; // TODO: implement MANY_TO_MANY - if ( - foundRelationMetadata.relationType === RelationMetadataType.MANY_TO_MANY - ) { + if (relationMetadata.relationType === RelationMetadataType.MANY_TO_MANY) { throw new Error(` - Relation type ${foundRelationMetadata.relationType} not supported + Relation type ${relationMetadata.relationType} not supported `); } if (isRelationFromSource) { const direction = - foundRelationMetadata.relationType === RelationMetadataType.ONE_TO_ONE + relationMetadata.relationType === RelationMetadataType.ONE_TO_ONE ? RelationDefinitionType.ONE_TO_ONE : RelationDefinitionType.ONE_TO_MANY; return { - sourceObjectMetadata: foundRelationMetadata.fromObjectMetadata, - sourceFieldMetadata: foundRelationMetadata.fromFieldMetadata, - targetObjectMetadata: foundRelationMetadata.toObjectMetadata, - targetFieldMetadata: foundRelationMetadata.toFieldMetadata, + sourceObjectMetadata: relationMetadata.fromObjectMetadata, + sourceFieldMetadata: relationMetadata.fromFieldMetadata, + targetObjectMetadata: relationMetadata.toObjectMetadata, + targetFieldMetadata: relationMetadata.toFieldMetadata, direction, }; } else { const direction = - foundRelationMetadata.relationType === RelationMetadataType.ONE_TO_ONE + relationMetadata.relationType === RelationMetadataType.ONE_TO_ONE ? RelationDefinitionType.ONE_TO_ONE : RelationDefinitionType.MANY_TO_ONE; return { - sourceObjectMetadata: foundRelationMetadata.toObjectMetadata, - sourceFieldMetadata: foundRelationMetadata.toFieldMetadata, - targetObjectMetadata: foundRelationMetadata.fromObjectMetadata, - targetFieldMetadata: foundRelationMetadata.fromFieldMetadata, + sourceObjectMetadata: relationMetadata.toObjectMetadata, + sourceFieldMetadata: relationMetadata.toFieldMetadata, + targetObjectMetadata: relationMetadata.fromObjectMetadata, + targetFieldMetadata: relationMetadata.fromFieldMetadata, direction, }; } diff --git a/packages/twenty-server/src/engine/metadata-modules/relation-metadata/relation-metadata.service.ts b/packages/twenty-server/src/engine/metadata-modules/relation-metadata/relation-metadata.service.ts index a5a755ad0316..1180e0dc9957 100644 --- a/packages/twenty-server/src/engine/metadata-modules/relation-metadata/relation-metadata.service.ts +++ b/packages/twenty-server/src/engine/metadata-modules/relation-metadata/relation-metadata.service.ts @@ -317,4 +317,43 @@ export class RelationMetadataService extends TypeOrmQueryService { + const relationMetadataCollection = + await this.relationMetadataRepository.find({ + where: [ + { + fromFieldMetadataId: In(fieldMetadataIds), + }, + { + toFieldMetadataId: In(fieldMetadataIds), + }, + ], + relations: [ + 'fromObjectMetadata', + 'toObjectMetadata', + 'fromFieldMetadata', + 'toFieldMetadata', + ], + }); + + const mappedResult = fieldMetadataIds.map((fieldMetadataId) => { + const foundRelationMetadataItem = relationMetadataCollection.find( + (relationMetadataItem) => + relationMetadataItem.fromFieldMetadataId === fieldMetadataId || + relationMetadataItem.toFieldMetadataId === fieldMetadataId, + ); + + return ( + foundRelationMetadataItem ?? + new NotFoundException( + `RelationMetadata with fieldMetadataId ${fieldMetadataId} not found`, + ) + ); + }); + + return mappedResult; + } } From 4f2c29dce03416bf214a0600764a4217843b1aec Mon Sep 17 00:00:00 2001 From: Weiko Date: Tue, 9 Apr 2024 18:06:39 +0200 Subject: [PATCH 2/3] uuid codegen update (#4897) Following https://github.com/twentyhq/twenty/pull/4895/files --- .../src/generated-metadata/graphql.ts | 4 ++- .../twenty-front/src/generated/graphql.tsx | 35 ++++++------------- 2 files changed, 13 insertions(+), 26 deletions(-) diff --git a/packages/twenty-front/src/generated-metadata/graphql.ts b/packages/twenty-front/src/generated-metadata/graphql.ts index fb8a757309df..f536172f40df 100644 --- a/packages/twenty-front/src/generated-metadata/graphql.ts +++ b/packages/twenty-front/src/generated-metadata/graphql.ts @@ -20,6 +20,8 @@ export type Scalars = { DateTime: { input: any; output: any; } /** The `JSON` scalar type represents JSON values as specified by [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf). */ JSON: { input: any; output: any; } + /** A UUID scalar type */ + UUID: { input: any; output: any; } /** The `Upload` scalar type represents a file upload. */ Upload: { input: any; output: any; } }; @@ -1080,7 +1082,7 @@ export type WorkspaceMember = { __typename?: 'WorkspaceMember'; avatarUrl?: Maybe; colorScheme: Scalars['String']['output']; - id: Scalars['ID']['output']; + id: Scalars['UUID']['output']; locale: Scalars['String']['output']; name: FullName; }; diff --git a/packages/twenty-front/src/generated/graphql.tsx b/packages/twenty-front/src/generated/graphql.tsx index df4b60b7776d..936cfcf2f2c8 100644 --- a/packages/twenty-front/src/generated/graphql.tsx +++ b/packages/twenty-front/src/generated/graphql.tsx @@ -16,6 +16,7 @@ export type Scalars = { ConnectionCursor: any; DateTime: string; JSON: any; + UUID: any; Upload: any; }; @@ -188,24 +189,6 @@ export type FieldConnection = { pageInfo: PageInfo; }; -export type FieldDeleteResponse = { - __typename?: 'FieldDeleteResponse'; - createdAt?: Maybe; - defaultValue?: Maybe; - description?: Maybe; - icon?: Maybe; - id?: Maybe; - isActive?: Maybe; - isCustom?: Maybe; - isNullable?: Maybe; - isSystem?: Maybe; - label?: Maybe; - name?: Maybe; - options?: Maybe; - type?: Maybe; - updatedAt?: Maybe; -}; - /** Type of the field */ export enum FieldMetadataType { Address = 'ADDRESS', @@ -314,7 +297,8 @@ export type MutationActivateWorkspaceArgs = { export type MutationAuthorizeAppArgs = { clientId: Scalars['String']; - codeChallenge: Scalars['String']; + codeChallenge?: InputMaybe; + redirectUrl?: InputMaybe; }; @@ -491,7 +475,8 @@ export type QueryCheckWorkspaceInviteHashIsValidArgs = { export type QueryExchangeAuthorizationCodeArgs = { authorizationCode: Scalars['String']; - codeVerifier: Scalars['String']; + clientSecret?: InputMaybe; + codeVerifier?: InputMaybe; }; @@ -835,7 +820,7 @@ export type WorkspaceMember = { __typename?: 'WorkspaceMember'; avatarUrl?: Maybe; colorScheme: Scalars['String']; - id: Scalars['ID']; + id: Scalars['UUID']; locale: Scalars['String']; name: FullName; }; @@ -1045,7 +1030,7 @@ export type ImpersonateMutationVariables = Exact<{ }>; -export type ImpersonateMutation = { __typename?: 'Mutation', impersonate: { __typename?: 'Verify', user: { __typename?: 'User', id: string, firstName: string, lastName: string, email: string, canImpersonate: boolean, supportUserHash?: string | null, workspaceMember?: { __typename?: 'WorkspaceMember', id: string, colorScheme: string, avatarUrl?: string | null, locale: string, name: { __typename?: 'FullName', firstName: string, lastName: string } } | null, defaultWorkspace: { __typename?: 'Workspace', id: string, displayName?: string | null, logo?: string | null, domainName?: string | null, inviteHash?: string | null, allowImpersonation: boolean, subscriptionStatus: string, activationStatus: string, featureFlags?: Array<{ __typename?: 'FeatureFlag', id: string, key: string, value: boolean, workspaceId: string }> | null }, workspaces: Array<{ __typename?: 'UserWorkspace', workspace?: { __typename?: 'Workspace', id: string, logo?: string | null, displayName?: string | null, domainName?: string | null } | null }> }, tokens: { __typename?: 'AuthTokenPair', accessToken: { __typename?: 'AuthToken', token: string, expiresAt: string }, refreshToken: { __typename?: 'AuthToken', token: string, expiresAt: string } } } }; +export type ImpersonateMutation = { __typename?: 'Mutation', impersonate: { __typename?: 'Verify', user: { __typename?: 'User', id: string, firstName: string, lastName: string, email: string, canImpersonate: boolean, supportUserHash?: string | null, workspaceMember?: { __typename?: 'WorkspaceMember', id: any, colorScheme: string, avatarUrl?: string | null, locale: string, name: { __typename?: 'FullName', firstName: string, lastName: string } } | null, defaultWorkspace: { __typename?: 'Workspace', id: string, displayName?: string | null, logo?: string | null, domainName?: string | null, inviteHash?: string | null, allowImpersonation: boolean, subscriptionStatus: string, activationStatus: string, featureFlags?: Array<{ __typename?: 'FeatureFlag', id: string, key: string, value: boolean, workspaceId: string }> | null }, workspaces: Array<{ __typename?: 'UserWorkspace', workspace?: { __typename?: 'Workspace', id: string, logo?: string | null, displayName?: string | null, domainName?: string | null } | null }> }, tokens: { __typename?: 'AuthTokenPair', accessToken: { __typename?: 'AuthToken', token: string, expiresAt: string }, refreshToken: { __typename?: 'AuthToken', token: string, expiresAt: string } } } }; export type RenewTokenMutationVariables = Exact<{ appToken: Scalars['String']; @@ -1076,7 +1061,7 @@ export type VerifyMutationVariables = Exact<{ }>; -export type VerifyMutation = { __typename?: 'Mutation', verify: { __typename?: 'Verify', user: { __typename?: 'User', id: string, firstName: string, lastName: string, email: string, canImpersonate: boolean, supportUserHash?: string | null, workspaceMember?: { __typename?: 'WorkspaceMember', id: string, colorScheme: string, avatarUrl?: string | null, locale: string, name: { __typename?: 'FullName', firstName: string, lastName: string } } | null, defaultWorkspace: { __typename?: 'Workspace', id: string, displayName?: string | null, logo?: string | null, domainName?: string | null, inviteHash?: string | null, allowImpersonation: boolean, subscriptionStatus: string, activationStatus: string, featureFlags?: Array<{ __typename?: 'FeatureFlag', id: string, key: string, value: boolean, workspaceId: string }> | null }, workspaces: Array<{ __typename?: 'UserWorkspace', workspace?: { __typename?: 'Workspace', id: string, logo?: string | null, displayName?: string | null, domainName?: string | null } | null }> }, tokens: { __typename?: 'AuthTokenPair', accessToken: { __typename?: 'AuthToken', token: string, expiresAt: string }, refreshToken: { __typename?: 'AuthToken', token: string, expiresAt: string } } } }; +export type VerifyMutation = { __typename?: 'Mutation', verify: { __typename?: 'Verify', user: { __typename?: 'User', id: string, firstName: string, lastName: string, email: string, canImpersonate: boolean, supportUserHash?: string | null, workspaceMember?: { __typename?: 'WorkspaceMember', id: any, colorScheme: string, avatarUrl?: string | null, locale: string, name: { __typename?: 'FullName', firstName: string, lastName: string } } | null, defaultWorkspace: { __typename?: 'Workspace', id: string, displayName?: string | null, logo?: string | null, domainName?: string | null, inviteHash?: string | null, allowImpersonation: boolean, subscriptionStatus: string, activationStatus: string, featureFlags?: Array<{ __typename?: 'FeatureFlag', id: string, key: string, value: boolean, workspaceId: string }> | null }, workspaces: Array<{ __typename?: 'UserWorkspace', workspace?: { __typename?: 'Workspace', id: string, logo?: string | null, displayName?: string | null, domainName?: string | null } | null }> }, tokens: { __typename?: 'AuthTokenPair', accessToken: { __typename?: 'AuthToken', token: string, expiresAt: string }, refreshToken: { __typename?: 'AuthToken', token: string, expiresAt: string } } } }; export type CheckUserExistsQueryVariables = Exact<{ email: Scalars['String']; @@ -1140,7 +1125,7 @@ export type UploadImageMutationVariables = Exact<{ export type UploadImageMutation = { __typename?: 'Mutation', uploadImage: string }; -export type UserQueryFragmentFragment = { __typename?: 'User', id: string, firstName: string, lastName: string, email: string, canImpersonate: boolean, supportUserHash?: string | null, workspaceMember?: { __typename?: 'WorkspaceMember', id: string, colorScheme: string, avatarUrl?: string | null, locale: string, name: { __typename?: 'FullName', firstName: string, lastName: string } } | null, defaultWorkspace: { __typename?: 'Workspace', id: string, displayName?: string | null, logo?: string | null, domainName?: string | null, inviteHash?: string | null, allowImpersonation: boolean, subscriptionStatus: string, activationStatus: string, featureFlags?: Array<{ __typename?: 'FeatureFlag', id: string, key: string, value: boolean, workspaceId: string }> | null }, workspaces: Array<{ __typename?: 'UserWorkspace', workspace?: { __typename?: 'Workspace', id: string, logo?: string | null, displayName?: string | null, domainName?: string | null } | null }> }; +export type UserQueryFragmentFragment = { __typename?: 'User', id: string, firstName: string, lastName: string, email: string, canImpersonate: boolean, supportUserHash?: string | null, workspaceMember?: { __typename?: 'WorkspaceMember', id: any, colorScheme: string, avatarUrl?: string | null, locale: string, name: { __typename?: 'FullName', firstName: string, lastName: string } } | null, defaultWorkspace: { __typename?: 'Workspace', id: string, displayName?: string | null, logo?: string | null, domainName?: string | null, inviteHash?: string | null, allowImpersonation: boolean, subscriptionStatus: string, activationStatus: string, featureFlags?: Array<{ __typename?: 'FeatureFlag', id: string, key: string, value: boolean, workspaceId: string }> | null }, workspaces: Array<{ __typename?: 'UserWorkspace', workspace?: { __typename?: 'Workspace', id: string, logo?: string | null, displayName?: string | null, domainName?: string | null } | null }> }; export type DeleteUserAccountMutationVariables = Exact<{ [key: string]: never; }>; @@ -1157,7 +1142,7 @@ export type UploadProfilePictureMutation = { __typename?: 'Mutation', uploadProf export type GetCurrentUserQueryVariables = Exact<{ [key: string]: never; }>; -export type GetCurrentUserQuery = { __typename?: 'Query', currentUser: { __typename?: 'User', id: string, firstName: string, lastName: string, email: string, canImpersonate: boolean, supportUserHash?: string | null, workspaceMember?: { __typename?: 'WorkspaceMember', id: string, colorScheme: string, avatarUrl?: string | null, locale: string, name: { __typename?: 'FullName', firstName: string, lastName: string } } | null, defaultWorkspace: { __typename?: 'Workspace', id: string, displayName?: string | null, logo?: string | null, domainName?: string | null, inviteHash?: string | null, allowImpersonation: boolean, subscriptionStatus: string, activationStatus: string, featureFlags?: Array<{ __typename?: 'FeatureFlag', id: string, key: string, value: boolean, workspaceId: string }> | null, currentBillingSubscription?: { __typename?: 'BillingSubscription', status: string, interval?: string | null } | null }, workspaces: Array<{ __typename?: 'UserWorkspace', workspace?: { __typename?: 'Workspace', id: string, displayName?: string | null, logo?: string | null, domainName?: string | null } | null }> } }; +export type GetCurrentUserQuery = { __typename?: 'Query', currentUser: { __typename?: 'User', id: string, firstName: string, lastName: string, email: string, canImpersonate: boolean, supportUserHash?: string | null, workspaceMember?: { __typename?: 'WorkspaceMember', id: any, colorScheme: string, avatarUrl?: string | null, locale: string, name: { __typename?: 'FullName', firstName: string, lastName: string } } | null, defaultWorkspace: { __typename?: 'Workspace', id: string, displayName?: string | null, logo?: string | null, domainName?: string | null, inviteHash?: string | null, allowImpersonation: boolean, subscriptionStatus: string, activationStatus: string, currentCacheVersion?: string | null, featureFlags?: Array<{ __typename?: 'FeatureFlag', id: string, key: string, value: boolean, workspaceId: string }> | null, currentBillingSubscription?: { __typename?: 'BillingSubscription', status: string, interval?: string | null } | null }, workspaces: Array<{ __typename?: 'UserWorkspace', workspace?: { __typename?: 'Workspace', id: string, displayName?: string | null, logo?: string | null, domainName?: string | null } | null }> } }; export type ActivateWorkspaceMutationVariables = Exact<{ input: ActivateWorkspaceInput; From f1cc1c60e0d2d9f6a8b815c4411138d97842fab6 Mon Sep 17 00:00:00 2001 From: Charles Bochet Date: Wed, 10 Apr 2024 11:33:17 +0200 Subject: [PATCH 3/3] Fix ID type being used in place of UUID in graphql and metadata queries (#4905) We have recently discovered that we were using ID type in place of UUID type in many place in the code. We have merged #4895 but this introduced bugs as we forgot to replace it everywhere --- .../src/generated-metadata/gql.ts | 16 +- .../src/generated-metadata/graphql.ts | 130 ++++++++--------- .../twenty-front/src/generated/graphql.tsx | 138 +++++++++--------- .../getTimelineCalendarEventsFromCompanyId.ts | 2 +- .../getTimelineCalendarEventsFromPersonId.ts | 2 +- .../getTimelineThreadsFromCompanyId.ts | 2 +- .../queries/getTimelineThreadsFromPersonId.ts | 2 +- .../hooks/__tests__/useCompleteTask.test.tsx | 2 +- .../favorites/hooks/__mocks__/useFavorites.ts | 4 +- .../object-metadata/graphql/mutations.ts | 8 +- .../useDeleteOneObjectMetadataItem.ts | 2 +- .../hooks/__mocks__/useFieldMetadataItem.ts | 4 +- .../useFilteredObjectMetadataItems.ts | 2 +- .../hooks/__mocks__/useDeleteOneRecord.ts | 2 +- .../useExecuteQuickActionOnOneRecord.ts | 2 +- .../hooks/__mocks__/useUpdateOneRecord.ts | 2 +- .../hooks/useDeleteOneRecordMutation.ts | 2 +- ...seExecuteQuickActionOnOneRecordMutation.ts | 2 +- .../hooks/useFindDuplicatesRecordsQuery.ts | 4 +- .../hooks/useUpdateOneRecordMutation.ts | 2 +- .../hooks/__tests__/usePersistField.test.tsx | 2 +- .../__tests__/useToggleEditOnlyInput.test.tsx | 2 +- .../factories/delete-query.factory.ts | 2 +- .../factories/update-query.factory.ts | 2 +- .../engine/api/rest/metadata-rest.service.ts | 2 +- .../app-token/app-token.entity.ts | 5 +- .../entities/billing-subscription.entity.ts | 5 +- ...timeline-calendar-event-participant.dto.ts | 8 +- .../dtos/timeline-calendar-event.dto.ts | 5 +- .../timeline-calendar-event.resolver.ts | 15 +- .../feature-flag/feature-flag.entity.ts | 5 +- .../dtos/timeline-thread-participant.dto.ts | 8 +- .../messaging/dtos/timeline-thread.dto.ts | 5 +- .../messaging/timeline-messaging.resolver.ts | 15 +- .../user-workspace/user-workspace.entity.ts | 5 +- .../engine/core-modules/user/user.entity.ts | 5 +- .../workspace/workspace.entity.ts | 5 +- .../field-metadata/dtos/delete-field.input.ts | 8 +- .../field-metadata/dtos/field-metadata.dto.ts | 4 +- .../field-metadata/dtos/update-field.input.ts | 6 +- .../dtos/delete-object.input.ts | 7 +- .../dtos/object-metadata.dto.ts | 5 +- .../dtos/relation-metadata.dto.ts | 4 +- 43 files changed, 235 insertions(+), 225 deletions(-) diff --git a/packages/twenty-front/src/generated-metadata/gql.ts b/packages/twenty-front/src/generated-metadata/gql.ts index 9b22fef87b88..c0e090507d97 100644 --- a/packages/twenty-front/src/generated-metadata/gql.ts +++ b/packages/twenty-front/src/generated-metadata/gql.ts @@ -22,10 +22,10 @@ const documents = { "\n mutation CreateOneObjectMetadataItem($input: CreateOneObjectInput!) {\n createOneObject(input: $input) {\n id\n dataSourceId\n nameSingular\n namePlural\n labelSingular\n labelPlural\n description\n icon\n isCustom\n isActive\n createdAt\n updatedAt\n labelIdentifierFieldMetadataId\n imageIdentifierFieldMetadataId\n }\n }\n": types.CreateOneObjectMetadataItemDocument, "\n mutation CreateOneFieldMetadataItem($input: CreateOneFieldMetadataInput!) {\n createOneField(input: $input) {\n id\n type\n name\n label\n description\n icon\n isCustom\n isActive\n isNullable\n createdAt\n updatedAt\n defaultValue\n options\n }\n }\n": types.CreateOneFieldMetadataItemDocument, "\n mutation CreateOneRelationMetadata($input: CreateOneRelationInput!) {\n createOneRelation(input: $input) {\n id\n relationType\n fromObjectMetadataId\n toObjectMetadataId\n fromFieldMetadataId\n toFieldMetadataId\n createdAt\n updatedAt\n }\n }\n": types.CreateOneRelationMetadataDocument, - "\n mutation UpdateOneFieldMetadataItem(\n $idToUpdate: ID!\n $updatePayload: UpdateFieldInput!\n ) {\n updateOneField(input: { id: $idToUpdate, update: $updatePayload }) {\n id\n type\n name\n label\n description\n icon\n isCustom\n isActive\n isNullable\n createdAt\n updatedAt\n }\n }\n": types.UpdateOneFieldMetadataItemDocument, - "\n mutation UpdateOneObjectMetadataItem(\n $idToUpdate: ID!\n $updatePayload: UpdateObjectInput!\n ) {\n updateOneObject(input: { id: $idToUpdate, update: $updatePayload }) {\n id\n dataSourceId\n nameSingular\n namePlural\n labelSingular\n labelPlural\n description\n icon\n isCustom\n isActive\n createdAt\n updatedAt\n labelIdentifierFieldMetadataId\n imageIdentifierFieldMetadataId\n }\n }\n": types.UpdateOneObjectMetadataItemDocument, - "\n mutation DeleteOneObjectMetadataItem($idToDelete: ID!) {\n deleteOneObject(input: { id: $idToDelete }) {\n id\n dataSourceId\n nameSingular\n namePlural\n labelSingular\n labelPlural\n description\n icon\n isCustom\n isActive\n createdAt\n updatedAt\n labelIdentifierFieldMetadataId\n imageIdentifierFieldMetadataId\n }\n }\n": types.DeleteOneObjectMetadataItemDocument, - "\n mutation DeleteOneFieldMetadataItem($idToDelete: ID!) {\n deleteOneField(input: { id: $idToDelete }) {\n id\n type\n name\n label\n description\n icon\n isCustom\n isActive\n isNullable\n createdAt\n updatedAt\n }\n }\n": types.DeleteOneFieldMetadataItemDocument, + "\n mutation UpdateOneFieldMetadataItem(\n $idToUpdate: UUID!\n $updatePayload: UpdateFieldInput!\n ) {\n updateOneField(input: { id: $idToUpdate, update: $updatePayload }) {\n id\n type\n name\n label\n description\n icon\n isCustom\n isActive\n isNullable\n createdAt\n updatedAt\n }\n }\n": types.UpdateOneFieldMetadataItemDocument, + "\n mutation UpdateOneObjectMetadataItem(\n $idToUpdate: UUID!\n $updatePayload: UpdateObjectInput!\n ) {\n updateOneObject(input: { id: $idToUpdate, update: $updatePayload }) {\n id\n dataSourceId\n nameSingular\n namePlural\n labelSingular\n labelPlural\n description\n icon\n isCustom\n isActive\n createdAt\n updatedAt\n labelIdentifierFieldMetadataId\n imageIdentifierFieldMetadataId\n }\n }\n": types.UpdateOneObjectMetadataItemDocument, + "\n mutation DeleteOneObjectMetadataItem($idToDelete: UUID!) {\n deleteOneObject(input: { id: $idToDelete }) {\n id\n dataSourceId\n nameSingular\n namePlural\n labelSingular\n labelPlural\n description\n icon\n isCustom\n isActive\n createdAt\n updatedAt\n labelIdentifierFieldMetadataId\n imageIdentifierFieldMetadataId\n }\n }\n": types.DeleteOneObjectMetadataItemDocument, + "\n mutation DeleteOneFieldMetadataItem($idToDelete: UUID!) {\n deleteOneField(input: { id: $idToDelete }) {\n id\n type\n name\n label\n description\n icon\n isCustom\n isActive\n isNullable\n createdAt\n updatedAt\n }\n }\n": types.DeleteOneFieldMetadataItemDocument, "\n query ObjectMetadataItems(\n $objectFilter: objectFilter\n $fieldFilter: fieldFilter\n ) {\n objects(paging: { first: 1000 }, filter: $objectFilter) {\n edges {\n node {\n id\n dataSourceId\n nameSingular\n namePlural\n labelSingular\n labelPlural\n description\n icon\n isCustom\n isRemote\n isActive\n isSystem\n createdAt\n updatedAt\n labelIdentifierFieldMetadataId\n imageIdentifierFieldMetadataId\n fields(paging: { first: 1000 }, filter: $fieldFilter) {\n edges {\n node {\n id\n type\n name\n label\n description\n icon\n isCustom\n isActive\n isSystem\n isNullable\n createdAt\n updatedAt\n fromRelationMetadata {\n id\n relationType\n toObjectMetadata {\n id\n dataSourceId\n nameSingular\n namePlural\n isSystem\n }\n toFieldMetadataId\n }\n toRelationMetadata {\n id\n relationType\n fromObjectMetadata {\n id\n dataSourceId\n nameSingular\n namePlural\n isSystem\n }\n fromFieldMetadataId\n }\n defaultValue\n options\n relationDefinition {\n direction\n sourceObjectMetadata {\n id\n nameSingular\n namePlural\n }\n sourceFieldMetadata {\n id\n name\n }\n targetObjectMetadata {\n id\n nameSingular\n namePlural\n }\n targetFieldMetadata {\n id\n name\n }\n }\n }\n }\n pageInfo {\n hasNextPage\n hasPreviousPage\n startCursor\n endCursor\n }\n }\n }\n }\n pageInfo {\n hasNextPage\n hasPreviousPage\n startCursor\n endCursor\n }\n }\n }\n": types.ObjectMetadataItemsDocument, }; @@ -82,19 +82,19 @@ export function graphql(source: "\n mutation CreateOneRelationMetadata($input: /** * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ -export function graphql(source: "\n mutation UpdateOneFieldMetadataItem(\n $idToUpdate: ID!\n $updatePayload: UpdateFieldInput!\n ) {\n updateOneField(input: { id: $idToUpdate, update: $updatePayload }) {\n id\n type\n name\n label\n description\n icon\n isCustom\n isActive\n isNullable\n createdAt\n updatedAt\n }\n }\n"): (typeof documents)["\n mutation UpdateOneFieldMetadataItem(\n $idToUpdate: ID!\n $updatePayload: UpdateFieldInput!\n ) {\n updateOneField(input: { id: $idToUpdate, update: $updatePayload }) {\n id\n type\n name\n label\n description\n icon\n isCustom\n isActive\n isNullable\n createdAt\n updatedAt\n }\n }\n"]; +export function graphql(source: "\n mutation UpdateOneFieldMetadataItem(\n $idToUpdate: UUID!\n $updatePayload: UpdateFieldInput!\n ) {\n updateOneField(input: { id: $idToUpdate, update: $updatePayload }) {\n id\n type\n name\n label\n description\n icon\n isCustom\n isActive\n isNullable\n createdAt\n updatedAt\n }\n }\n"): (typeof documents)["\n mutation UpdateOneFieldMetadataItem(\n $idToUpdate: UUID!\n $updatePayload: UpdateFieldInput!\n ) {\n updateOneField(input: { id: $idToUpdate, update: $updatePayload }) {\n id\n type\n name\n label\n description\n icon\n isCustom\n isActive\n isNullable\n createdAt\n updatedAt\n }\n }\n"]; /** * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ -export function graphql(source: "\n mutation UpdateOneObjectMetadataItem(\n $idToUpdate: ID!\n $updatePayload: UpdateObjectInput!\n ) {\n updateOneObject(input: { id: $idToUpdate, update: $updatePayload }) {\n id\n dataSourceId\n nameSingular\n namePlural\n labelSingular\n labelPlural\n description\n icon\n isCustom\n isActive\n createdAt\n updatedAt\n labelIdentifierFieldMetadataId\n imageIdentifierFieldMetadataId\n }\n }\n"): (typeof documents)["\n mutation UpdateOneObjectMetadataItem(\n $idToUpdate: ID!\n $updatePayload: UpdateObjectInput!\n ) {\n updateOneObject(input: { id: $idToUpdate, update: $updatePayload }) {\n id\n dataSourceId\n nameSingular\n namePlural\n labelSingular\n labelPlural\n description\n icon\n isCustom\n isActive\n createdAt\n updatedAt\n labelIdentifierFieldMetadataId\n imageIdentifierFieldMetadataId\n }\n }\n"]; +export function graphql(source: "\n mutation UpdateOneObjectMetadataItem(\n $idToUpdate: UUID!\n $updatePayload: UpdateObjectInput!\n ) {\n updateOneObject(input: { id: $idToUpdate, update: $updatePayload }) {\n id\n dataSourceId\n nameSingular\n namePlural\n labelSingular\n labelPlural\n description\n icon\n isCustom\n isActive\n createdAt\n updatedAt\n labelIdentifierFieldMetadataId\n imageIdentifierFieldMetadataId\n }\n }\n"): (typeof documents)["\n mutation UpdateOneObjectMetadataItem(\n $idToUpdate: UUID!\n $updatePayload: UpdateObjectInput!\n ) {\n updateOneObject(input: { id: $idToUpdate, update: $updatePayload }) {\n id\n dataSourceId\n nameSingular\n namePlural\n labelSingular\n labelPlural\n description\n icon\n isCustom\n isActive\n createdAt\n updatedAt\n labelIdentifierFieldMetadataId\n imageIdentifierFieldMetadataId\n }\n }\n"]; /** * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ -export function graphql(source: "\n mutation DeleteOneObjectMetadataItem($idToDelete: ID!) {\n deleteOneObject(input: { id: $idToDelete }) {\n id\n dataSourceId\n nameSingular\n namePlural\n labelSingular\n labelPlural\n description\n icon\n isCustom\n isActive\n createdAt\n updatedAt\n labelIdentifierFieldMetadataId\n imageIdentifierFieldMetadataId\n }\n }\n"): (typeof documents)["\n mutation DeleteOneObjectMetadataItem($idToDelete: ID!) {\n deleteOneObject(input: { id: $idToDelete }) {\n id\n dataSourceId\n nameSingular\n namePlural\n labelSingular\n labelPlural\n description\n icon\n isCustom\n isActive\n createdAt\n updatedAt\n labelIdentifierFieldMetadataId\n imageIdentifierFieldMetadataId\n }\n }\n"]; +export function graphql(source: "\n mutation DeleteOneObjectMetadataItem($idToDelete: UUID!) {\n deleteOneObject(input: { id: $idToDelete }) {\n id\n dataSourceId\n nameSingular\n namePlural\n labelSingular\n labelPlural\n description\n icon\n isCustom\n isActive\n createdAt\n updatedAt\n labelIdentifierFieldMetadataId\n imageIdentifierFieldMetadataId\n }\n }\n"): (typeof documents)["\n mutation DeleteOneObjectMetadataItem($idToDelete: UUID!) {\n deleteOneObject(input: { id: $idToDelete }) {\n id\n dataSourceId\n nameSingular\n namePlural\n labelSingular\n labelPlural\n description\n icon\n isCustom\n isActive\n createdAt\n updatedAt\n labelIdentifierFieldMetadataId\n imageIdentifierFieldMetadataId\n }\n }\n"]; /** * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ -export function graphql(source: "\n mutation DeleteOneFieldMetadataItem($idToDelete: ID!) {\n deleteOneField(input: { id: $idToDelete }) {\n id\n type\n name\n label\n description\n icon\n isCustom\n isActive\n isNullable\n createdAt\n updatedAt\n }\n }\n"): (typeof documents)["\n mutation DeleteOneFieldMetadataItem($idToDelete: ID!) {\n deleteOneField(input: { id: $idToDelete }) {\n id\n type\n name\n label\n description\n icon\n isCustom\n isActive\n isNullable\n createdAt\n updatedAt\n }\n }\n"]; +export function graphql(source: "\n mutation DeleteOneFieldMetadataItem($idToDelete: UUID!) {\n deleteOneField(input: { id: $idToDelete }) {\n id\n type\n name\n label\n description\n icon\n isCustom\n isActive\n isNullable\n createdAt\n updatedAt\n }\n }\n"): (typeof documents)["\n mutation DeleteOneFieldMetadataItem($idToDelete: UUID!) {\n deleteOneField(input: { id: $idToDelete }) {\n id\n type\n name\n label\n description\n icon\n isCustom\n isActive\n isNullable\n createdAt\n updatedAt\n }\n }\n"]; /** * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ diff --git a/packages/twenty-front/src/generated-metadata/graphql.ts b/packages/twenty-front/src/generated-metadata/graphql.ts index f536172f40df..891b9aebe985 100644 --- a/packages/twenty-front/src/generated-metadata/graphql.ts +++ b/packages/twenty-front/src/generated-metadata/graphql.ts @@ -45,7 +45,7 @@ export type AppToken = { __typename?: 'AppToken'; createdAt: Scalars['DateTime']['output']; expiresAt: Scalars['DateTime']['output']; - id: Scalars['ID']['output']; + id: Scalars['UUID']['output']; type: Scalars['String']['output']; updatedAt: Scalars['DateTime']['output']; }; @@ -96,14 +96,14 @@ export type Billing = { export type BillingSubscription = { __typename?: 'BillingSubscription'; - id: Scalars['ID']['output']; + id: Scalars['UUID']['output']; interval?: Maybe; status: Scalars['String']['output']; }; export type BillingSubscriptionFilter = { and?: InputMaybe>; - id?: InputMaybe; + id?: InputMaybe; or?: InputMaybe>; }; @@ -221,17 +221,17 @@ export type CursorPaging = { export type DeleteOneFieldInput = { /** The id of the field to delete. */ - id: Scalars['ID']['input']; + id: Scalars['UUID']['input']; }; export type DeleteOneObjectInput = { /** The id of the record to delete. */ - id: Scalars['ID']['input']; + id: Scalars['UUID']['input']; }; export type DeleteOneRelationInput = { /** The id of the record to delete. */ - id: Scalars['ID']['input']; + id: Scalars['UUID']['input']; }; export type EmailPasswordResetLink = { @@ -249,7 +249,7 @@ export type ExchangeAuthCode = { export type FeatureFlag = { __typename?: 'FeatureFlag'; - id: Scalars['ID']['output']; + id: Scalars['UUID']['output']; key: Scalars['String']['output']; value: Scalars['Boolean']['output']; workspaceId: Scalars['String']['output']; @@ -257,7 +257,7 @@ export type FeatureFlag = { export type FeatureFlagFilter = { and?: InputMaybe>; - id?: InputMaybe; + id?: InputMaybe; or?: InputMaybe>; }; @@ -315,23 +315,6 @@ export type FullName = { lastName: Scalars['String']['output']; }; -export type IdFilterComparison = { - eq?: InputMaybe; - gt?: InputMaybe; - gte?: InputMaybe; - iLike?: InputMaybe; - in?: InputMaybe>; - is?: InputMaybe; - isNot?: InputMaybe; - like?: InputMaybe; - lt?: InputMaybe; - lte?: InputMaybe; - neq?: InputMaybe; - notILike?: InputMaybe; - notIn?: InputMaybe>; - notLike?: InputMaybe; -}; - export type InvalidatePassword = { __typename?: 'InvalidatePassword'; /** Boolean that confirms query was dispatched */ @@ -641,7 +624,7 @@ export type QueryExchangeAuthorizationCodeArgs = { export type QueryFieldArgs = { - id: Scalars['ID']['input']; + id: Scalars['UUID']['input']; }; @@ -677,7 +660,7 @@ export type QueryGetProductPricesArgs = { export type QueryGetTimelineCalendarEventsFromCompanyIdArgs = { - companyId: Scalars['ID']['input']; + companyId: Scalars['UUID']['input']; page: Scalars['Int']['input']; pageSize: Scalars['Int']['input']; }; @@ -686,12 +669,12 @@ export type QueryGetTimelineCalendarEventsFromCompanyIdArgs = { export type QueryGetTimelineCalendarEventsFromPersonIdArgs = { page: Scalars['Int']['input']; pageSize: Scalars['Int']['input']; - personId: Scalars['ID']['input']; + personId: Scalars['UUID']['input']; }; export type QueryGetTimelineThreadsFromCompanyIdArgs = { - companyId: Scalars['ID']['input']; + companyId: Scalars['UUID']['input']; page: Scalars['Int']['input']; pageSize: Scalars['Int']['input']; }; @@ -700,12 +683,12 @@ export type QueryGetTimelineThreadsFromCompanyIdArgs = { export type QueryGetTimelineThreadsFromPersonIdArgs = { page: Scalars['Int']['input']; pageSize: Scalars['Int']['input']; - personId: Scalars['ID']['input']; + personId: Scalars['UUID']['input']; }; export type QueryObjectArgs = { - id: Scalars['ID']['input']; + id: Scalars['UUID']['input']; }; @@ -716,7 +699,7 @@ export type QueryObjectsArgs = { export type QueryRelationArgs = { - id: Scalars['ID']['input']; + id: Scalars['UUID']['input']; }; @@ -759,7 +742,7 @@ export type RelationDeleteResponse = { createdAt?: Maybe; fromFieldMetadataId?: Maybe; fromObjectMetadataId?: Maybe; - id?: Maybe; + id?: Maybe; relationType?: Maybe; toFieldMetadataId?: Maybe; toObjectMetadataId?: Maybe; @@ -852,7 +835,7 @@ export type TimelineCalendarEvent = { conferenceSolution: Scalars['String']['output']; description: Scalars['String']['output']; endsAt: Scalars['DateTime']['output']; - id: Scalars['ID']['output']; + id: Scalars['UUID']['output']; isCanceled: Scalars['Boolean']['output']; isFullDay: Scalars['Boolean']['output']; location: Scalars['String']['output']; @@ -869,8 +852,8 @@ export type TimelineCalendarEventParticipant = { firstName: Scalars['String']['output']; handle: Scalars['String']['output']; lastName: Scalars['String']['output']; - personId?: Maybe; - workspaceMemberId?: Maybe; + personId?: Maybe; + workspaceMemberId?: Maybe; }; /** Visibility of the calendar event */ @@ -888,7 +871,7 @@ export type TimelineCalendarEventsWithTotal = { export type TimelineThread = { __typename?: 'TimelineThread'; firstParticipant: TimelineThreadParticipant; - id: Scalars['ID']['output']; + id: Scalars['UUID']['output']; lastMessageBody: Scalars['String']['output']; lastMessageReceivedAt: Scalars['DateTime']['output']; lastTwoParticipants: Array; @@ -906,8 +889,8 @@ export type TimelineThreadParticipant = { firstName: Scalars['String']['output']; handle: Scalars['String']['output']; lastName: Scalars['String']['output']; - personId?: Maybe; - workspaceMemberId?: Maybe; + personId?: Maybe; + workspaceMemberId?: Maybe; }; export type TimelineThreadsWithTotal = { @@ -921,6 +904,23 @@ export type TransientToken = { transientToken: AuthToken; }; +export type UuidFilterComparison = { + eq?: InputMaybe; + gt?: InputMaybe; + gte?: InputMaybe; + iLike?: InputMaybe; + in?: InputMaybe>; + is?: InputMaybe; + isNot?: InputMaybe; + like?: InputMaybe; + lt?: InputMaybe; + lte?: InputMaybe; + neq?: InputMaybe; + notILike?: InputMaybe; + notIn?: InputMaybe>; + notLike?: InputMaybe; +}; + export type UpdateBillingEntity = { __typename?: 'UpdateBillingEntity'; /** Boolean that confirms query was successful */ @@ -954,14 +954,14 @@ export type UpdateObjectInput = { export type UpdateOneFieldMetadataInput = { /** The id of the record to update */ - id: Scalars['ID']['input']; + id: Scalars['UUID']['input']; /** The record to update */ update: UpdateFieldInput; }; export type UpdateOneObjectInput = { /** The id of the record to update */ - id: Scalars['ID']['input']; + id: Scalars['UUID']['input']; /** The update to apply. */ update: UpdateObjectInput; }; @@ -986,7 +986,7 @@ export type User = { email: Scalars['String']['output']; emailVerified: Scalars['Boolean']['output']; firstName: Scalars['String']['output']; - id: Scalars['ID']['output']; + id: Scalars['UUID']['output']; lastName: Scalars['String']['output']; passwordHash?: Maybe; passwordResetToken?: Maybe; @@ -1014,7 +1014,7 @@ export type UserWorkspace = { __typename?: 'UserWorkspace'; createdAt: Scalars['DateTime']['output']; deletedAt?: Maybe; - id: Scalars['ID']['output']; + id: Scalars['UUID']['output']; updatedAt: Scalars['DateTime']['output']; user: User; userId: Scalars['String']['output']; @@ -1046,7 +1046,7 @@ export type Workspace = { displayName?: Maybe; domainName?: Maybe; featureFlags?: Maybe>; - id: Scalars['ID']['output']; + id: Scalars['UUID']['output']; inviteHash?: Maybe; logo?: Maybe; subscriptionStatus: Scalars['String']['output']; @@ -1094,7 +1094,7 @@ export type Field = { description?: Maybe; fromRelationMetadata?: Maybe; icon?: Maybe; - id: Scalars['ID']['output']; + id: Scalars['UUID']['output']; isActive?: Maybe; isCustom?: Maybe; isNullable?: Maybe; @@ -1118,7 +1118,7 @@ export type FieldEdge = { export type FieldFilter = { and?: InputMaybe>; - id?: InputMaybe; + id?: InputMaybe; isActive?: InputMaybe; isCustom?: InputMaybe; isSystem?: InputMaybe; @@ -1132,7 +1132,7 @@ export type Object = { description?: Maybe; fields: ObjectFieldsConnection; icon?: Maybe; - id: Scalars['ID']['output']; + id: Scalars['UUID']['output']; imageIdentifierFieldMetadataId?: Maybe; isActive: Scalars['Boolean']['output']; isCustom: Scalars['Boolean']['output']; @@ -1162,7 +1162,7 @@ export type ObjectEdge = { export type ObjectFilter = { and?: InputMaybe>; - id?: InputMaybe; + id?: InputMaybe; isActive?: InputMaybe; isCustom?: InputMaybe; isRemote?: InputMaybe; @@ -1176,7 +1176,7 @@ export type Relation = { fromFieldMetadataId: Scalars['String']['output']; fromObjectMetadata: Object; fromObjectMetadataId: Scalars['String']['output']; - id: Scalars['ID']['output']; + id: Scalars['UUID']['output']; relationType: RelationMetadataType; toFieldMetadataId: Scalars['String']['output']; toObjectMetadata: Object; @@ -1234,51 +1234,51 @@ export type CreateOneObjectMetadataItemMutationVariables = Exact<{ }>; -export type CreateOneObjectMetadataItemMutation = { __typename?: 'Mutation', createOneObject: { __typename?: 'object', id: string, dataSourceId: string, nameSingular: string, namePlural: string, labelSingular: string, labelPlural: string, description?: string | null, icon?: string | null, isCustom: boolean, isActive: boolean, createdAt: any, updatedAt: any, labelIdentifierFieldMetadataId?: string | null, imageIdentifierFieldMetadataId?: string | null } }; +export type CreateOneObjectMetadataItemMutation = { __typename?: 'Mutation', createOneObject: { __typename?: 'object', id: any, dataSourceId: string, nameSingular: string, namePlural: string, labelSingular: string, labelPlural: string, description?: string | null, icon?: string | null, isCustom: boolean, isActive: boolean, createdAt: any, updatedAt: any, labelIdentifierFieldMetadataId?: string | null, imageIdentifierFieldMetadataId?: string | null } }; export type CreateOneFieldMetadataItemMutationVariables = Exact<{ input: CreateOneFieldMetadataInput; }>; -export type CreateOneFieldMetadataItemMutation = { __typename?: 'Mutation', createOneField: { __typename?: 'field', id: string, type: FieldMetadataType, name: string, label: string, description?: string | null, icon?: string | null, isCustom?: boolean | null, isActive?: boolean | null, isNullable?: boolean | null, createdAt: any, updatedAt: any, defaultValue?: any | null, options?: any | null } }; +export type CreateOneFieldMetadataItemMutation = { __typename?: 'Mutation', createOneField: { __typename?: 'field', id: any, type: FieldMetadataType, name: string, label: string, description?: string | null, icon?: string | null, isCustom?: boolean | null, isActive?: boolean | null, isNullable?: boolean | null, createdAt: any, updatedAt: any, defaultValue?: any | null, options?: any | null } }; export type CreateOneRelationMetadataMutationVariables = Exact<{ input: CreateOneRelationInput; }>; -export type CreateOneRelationMetadataMutation = { __typename?: 'Mutation', createOneRelation: { __typename?: 'relation', id: string, relationType: RelationMetadataType, fromObjectMetadataId: string, toObjectMetadataId: string, fromFieldMetadataId: string, toFieldMetadataId: string, createdAt: any, updatedAt: any } }; +export type CreateOneRelationMetadataMutation = { __typename?: 'Mutation', createOneRelation: { __typename?: 'relation', id: any, relationType: RelationMetadataType, fromObjectMetadataId: string, toObjectMetadataId: string, fromFieldMetadataId: string, toFieldMetadataId: string, createdAt: any, updatedAt: any } }; export type UpdateOneFieldMetadataItemMutationVariables = Exact<{ - idToUpdate: Scalars['ID']['input']; + idToUpdate: Scalars['UUID']['input']; updatePayload: UpdateFieldInput; }>; -export type UpdateOneFieldMetadataItemMutation = { __typename?: 'Mutation', updateOneField: { __typename?: 'field', id: string, type: FieldMetadataType, name: string, label: string, description?: string | null, icon?: string | null, isCustom?: boolean | null, isActive?: boolean | null, isNullable?: boolean | null, createdAt: any, updatedAt: any } }; +export type UpdateOneFieldMetadataItemMutation = { __typename?: 'Mutation', updateOneField: { __typename?: 'field', id: any, type: FieldMetadataType, name: string, label: string, description?: string | null, icon?: string | null, isCustom?: boolean | null, isActive?: boolean | null, isNullable?: boolean | null, createdAt: any, updatedAt: any } }; export type UpdateOneObjectMetadataItemMutationVariables = Exact<{ - idToUpdate: Scalars['ID']['input']; + idToUpdate: Scalars['UUID']['input']; updatePayload: UpdateObjectInput; }>; -export type UpdateOneObjectMetadataItemMutation = { __typename?: 'Mutation', updateOneObject: { __typename?: 'object', id: string, dataSourceId: string, nameSingular: string, namePlural: string, labelSingular: string, labelPlural: string, description?: string | null, icon?: string | null, isCustom: boolean, isActive: boolean, createdAt: any, updatedAt: any, labelIdentifierFieldMetadataId?: string | null, imageIdentifierFieldMetadataId?: string | null } }; +export type UpdateOneObjectMetadataItemMutation = { __typename?: 'Mutation', updateOneObject: { __typename?: 'object', id: any, dataSourceId: string, nameSingular: string, namePlural: string, labelSingular: string, labelPlural: string, description?: string | null, icon?: string | null, isCustom: boolean, isActive: boolean, createdAt: any, updatedAt: any, labelIdentifierFieldMetadataId?: string | null, imageIdentifierFieldMetadataId?: string | null } }; export type DeleteOneObjectMetadataItemMutationVariables = Exact<{ - idToDelete: Scalars['ID']['input']; + idToDelete: Scalars['UUID']['input']; }>; -export type DeleteOneObjectMetadataItemMutation = { __typename?: 'Mutation', deleteOneObject: { __typename?: 'object', id: string, dataSourceId: string, nameSingular: string, namePlural: string, labelSingular: string, labelPlural: string, description?: string | null, icon?: string | null, isCustom: boolean, isActive: boolean, createdAt: any, updatedAt: any, labelIdentifierFieldMetadataId?: string | null, imageIdentifierFieldMetadataId?: string | null } }; +export type DeleteOneObjectMetadataItemMutation = { __typename?: 'Mutation', deleteOneObject: { __typename?: 'object', id: any, dataSourceId: string, nameSingular: string, namePlural: string, labelSingular: string, labelPlural: string, description?: string | null, icon?: string | null, isCustom: boolean, isActive: boolean, createdAt: any, updatedAt: any, labelIdentifierFieldMetadataId?: string | null, imageIdentifierFieldMetadataId?: string | null } }; export type DeleteOneFieldMetadataItemMutationVariables = Exact<{ - idToDelete: Scalars['ID']['input']; + idToDelete: Scalars['UUID']['input']; }>; -export type DeleteOneFieldMetadataItemMutation = { __typename?: 'Mutation', deleteOneField: { __typename?: 'field', id: string, type: FieldMetadataType, name: string, label: string, description?: string | null, icon?: string | null, isCustom?: boolean | null, isActive?: boolean | null, isNullable?: boolean | null, createdAt: any, updatedAt: any } }; +export type DeleteOneFieldMetadataItemMutation = { __typename?: 'Mutation', deleteOneField: { __typename?: 'field', id: any, type: FieldMetadataType, name: string, label: string, description?: string | null, icon?: string | null, isCustom?: boolean | null, isActive?: boolean | null, isNullable?: boolean | null, createdAt: any, updatedAt: any } }; export type ObjectMetadataItemsQueryVariables = Exact<{ objectFilter?: InputMaybe; @@ -1286,7 +1286,7 @@ export type ObjectMetadataItemsQueryVariables = Exact<{ }>; -export type ObjectMetadataItemsQuery = { __typename?: 'Query', objects: { __typename?: 'ObjectConnection', edges: Array<{ __typename?: 'objectEdge', node: { __typename?: 'object', id: string, dataSourceId: string, nameSingular: string, namePlural: string, labelSingular: string, labelPlural: string, description?: string | null, icon?: string | null, isCustom: boolean, isRemote: boolean, isActive: boolean, isSystem: boolean, createdAt: any, updatedAt: any, labelIdentifierFieldMetadataId?: string | null, imageIdentifierFieldMetadataId?: string | null, fields: { __typename?: 'ObjectFieldsConnection', edges: Array<{ __typename?: 'fieldEdge', node: { __typename?: 'field', id: string, type: FieldMetadataType, name: string, label: string, description?: string | null, icon?: string | null, isCustom?: boolean | null, isActive?: boolean | null, isSystem?: boolean | null, isNullable?: boolean | null, createdAt: any, updatedAt: any, defaultValue?: any | null, options?: any | null, fromRelationMetadata?: { __typename?: 'relation', id: string, relationType: RelationMetadataType, toFieldMetadataId: string, toObjectMetadata: { __typename?: 'object', id: string, dataSourceId: string, nameSingular: string, namePlural: string, isSystem: boolean } } | null, toRelationMetadata?: { __typename?: 'relation', id: string, relationType: RelationMetadataType, fromFieldMetadataId: string, fromObjectMetadata: { __typename?: 'object', id: string, dataSourceId: string, nameSingular: string, namePlural: string, isSystem: boolean } } | null, relationDefinition?: { __typename?: 'RelationDefinition', direction: RelationDefinitionType, sourceObjectMetadata: { __typename?: 'object', id: string, nameSingular: string, namePlural: string }, sourceFieldMetadata: { __typename?: 'field', id: string, name: string }, targetObjectMetadata: { __typename?: 'object', id: string, nameSingular: string, namePlural: string }, targetFieldMetadata: { __typename?: 'field', id: string, name: string } } | null } }>, pageInfo: { __typename?: 'PageInfo', hasNextPage?: boolean | null, hasPreviousPage?: boolean | null, startCursor?: any | null, endCursor?: any | null } } } }>, pageInfo: { __typename?: 'PageInfo', hasNextPage?: boolean | null, hasPreviousPage?: boolean | null, startCursor?: any | null, endCursor?: any | null } } }; +export type ObjectMetadataItemsQuery = { __typename?: 'Query', objects: { __typename?: 'ObjectConnection', edges: Array<{ __typename?: 'objectEdge', node: { __typename?: 'object', id: any, dataSourceId: string, nameSingular: string, namePlural: string, labelSingular: string, labelPlural: string, description?: string | null, icon?: string | null, isCustom: boolean, isRemote: boolean, isActive: boolean, isSystem: boolean, createdAt: any, updatedAt: any, labelIdentifierFieldMetadataId?: string | null, imageIdentifierFieldMetadataId?: string | null, fields: { __typename?: 'ObjectFieldsConnection', edges: Array<{ __typename?: 'fieldEdge', node: { __typename?: 'field', id: any, type: FieldMetadataType, name: string, label: string, description?: string | null, icon?: string | null, isCustom?: boolean | null, isActive?: boolean | null, isSystem?: boolean | null, isNullable?: boolean | null, createdAt: any, updatedAt: any, defaultValue?: any | null, options?: any | null, fromRelationMetadata?: { __typename?: 'relation', id: any, relationType: RelationMetadataType, toFieldMetadataId: string, toObjectMetadata: { __typename?: 'object', id: any, dataSourceId: string, nameSingular: string, namePlural: string, isSystem: boolean } } | null, toRelationMetadata?: { __typename?: 'relation', id: any, relationType: RelationMetadataType, fromFieldMetadataId: string, fromObjectMetadata: { __typename?: 'object', id: any, dataSourceId: string, nameSingular: string, namePlural: string, isSystem: boolean } } | null, relationDefinition?: { __typename?: 'RelationDefinition', direction: RelationDefinitionType, sourceObjectMetadata: { __typename?: 'object', id: any, nameSingular: string, namePlural: string }, sourceFieldMetadata: { __typename?: 'field', id: any, name: string }, targetObjectMetadata: { __typename?: 'object', id: any, nameSingular: string, namePlural: string }, targetFieldMetadata: { __typename?: 'field', id: any, name: string } } | null } }>, pageInfo: { __typename?: 'PageInfo', hasNextPage?: boolean | null, hasPreviousPage?: boolean | null, startCursor?: any | null, endCursor?: any | null } } } }>, pageInfo: { __typename?: 'PageInfo', hasNextPage?: boolean | null, hasPreviousPage?: boolean | null, startCursor?: any | null, endCursor?: any | null } } }; export const RemoteServerFieldsFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RemoteServerFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RemoteServer"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"foreignDataWrapperId"}},{"kind":"Field","name":{"kind":"Name","value":"foreignDataWrapperOptions"}},{"kind":"Field","name":{"kind":"Name","value":"foreignDataWrapperType"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}}]} as unknown as DocumentNode; export const CreateServerDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"createServer"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"CreateRemoteServerInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"createOneRemoteServer"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RemoteServerFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RemoteServerFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RemoteServer"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"foreignDataWrapperId"}},{"kind":"Field","name":{"kind":"Name","value":"foreignDataWrapperOptions"}},{"kind":"Field","name":{"kind":"Name","value":"foreignDataWrapperType"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}}]} as unknown as DocumentNode; @@ -1297,8 +1297,8 @@ export const GetOneDatabaseConnectionDocument = {"kind":"Document","definitions" export const CreateOneObjectMetadataItemDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"CreateOneObjectMetadataItem"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"CreateOneObjectInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"createOneObject"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"dataSourceId"}},{"kind":"Field","name":{"kind":"Name","value":"nameSingular"}},{"kind":"Field","name":{"kind":"Name","value":"namePlural"}},{"kind":"Field","name":{"kind":"Name","value":"labelSingular"}},{"kind":"Field","name":{"kind":"Name","value":"labelPlural"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"icon"}},{"kind":"Field","name":{"kind":"Name","value":"isCustom"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"labelIdentifierFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"imageIdentifierFieldMetadataId"}}]}}]}}]} as unknown as DocumentNode; export const CreateOneFieldMetadataItemDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"CreateOneFieldMetadataItem"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"CreateOneFieldMetadataInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"createOneField"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"label"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"icon"}},{"kind":"Field","name":{"kind":"Name","value":"isCustom"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"isNullable"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"defaultValue"}},{"kind":"Field","name":{"kind":"Name","value":"options"}}]}}]}}]} as unknown as DocumentNode; export const CreateOneRelationMetadataDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"CreateOneRelationMetadata"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"CreateOneRelationInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"createOneRelation"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"relationType"}},{"kind":"Field","name":{"kind":"Name","value":"fromObjectMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"toObjectMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"fromFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"toFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}}]}}]} as unknown as DocumentNode; -export const UpdateOneFieldMetadataItemDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"UpdateOneFieldMetadataItem"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"idToUpdate"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"updatePayload"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UpdateFieldInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"updateOneField"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"idToUpdate"}}},{"kind":"ObjectField","name":{"kind":"Name","value":"update"},"value":{"kind":"Variable","name":{"kind":"Name","value":"updatePayload"}}}]}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"label"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"icon"}},{"kind":"Field","name":{"kind":"Name","value":"isCustom"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"isNullable"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}}]}}]} as unknown as DocumentNode; -export const UpdateOneObjectMetadataItemDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"UpdateOneObjectMetadataItem"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"idToUpdate"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"updatePayload"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UpdateObjectInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"updateOneObject"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"idToUpdate"}}},{"kind":"ObjectField","name":{"kind":"Name","value":"update"},"value":{"kind":"Variable","name":{"kind":"Name","value":"updatePayload"}}}]}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"dataSourceId"}},{"kind":"Field","name":{"kind":"Name","value":"nameSingular"}},{"kind":"Field","name":{"kind":"Name","value":"namePlural"}},{"kind":"Field","name":{"kind":"Name","value":"labelSingular"}},{"kind":"Field","name":{"kind":"Name","value":"labelPlural"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"icon"}},{"kind":"Field","name":{"kind":"Name","value":"isCustom"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"labelIdentifierFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"imageIdentifierFieldMetadataId"}}]}}]}}]} as unknown as DocumentNode; -export const DeleteOneObjectMetadataItemDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"DeleteOneObjectMetadataItem"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"idToDelete"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"deleteOneObject"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"idToDelete"}}}]}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"dataSourceId"}},{"kind":"Field","name":{"kind":"Name","value":"nameSingular"}},{"kind":"Field","name":{"kind":"Name","value":"namePlural"}},{"kind":"Field","name":{"kind":"Name","value":"labelSingular"}},{"kind":"Field","name":{"kind":"Name","value":"labelPlural"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"icon"}},{"kind":"Field","name":{"kind":"Name","value":"isCustom"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"labelIdentifierFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"imageIdentifierFieldMetadataId"}}]}}]}}]} as unknown as DocumentNode; -export const DeleteOneFieldMetadataItemDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"DeleteOneFieldMetadataItem"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"idToDelete"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"deleteOneField"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"idToDelete"}}}]}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"label"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"icon"}},{"kind":"Field","name":{"kind":"Name","value":"isCustom"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"isNullable"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}}]}}]} as unknown as DocumentNode; +export const UpdateOneFieldMetadataItemDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"UpdateOneFieldMetadataItem"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"idToUpdate"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UUID"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"updatePayload"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UpdateFieldInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"updateOneField"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"idToUpdate"}}},{"kind":"ObjectField","name":{"kind":"Name","value":"update"},"value":{"kind":"Variable","name":{"kind":"Name","value":"updatePayload"}}}]}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"label"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"icon"}},{"kind":"Field","name":{"kind":"Name","value":"isCustom"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"isNullable"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}}]}}]} as unknown as DocumentNode; +export const UpdateOneObjectMetadataItemDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"UpdateOneObjectMetadataItem"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"idToUpdate"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UUID"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"updatePayload"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UpdateObjectInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"updateOneObject"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"idToUpdate"}}},{"kind":"ObjectField","name":{"kind":"Name","value":"update"},"value":{"kind":"Variable","name":{"kind":"Name","value":"updatePayload"}}}]}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"dataSourceId"}},{"kind":"Field","name":{"kind":"Name","value":"nameSingular"}},{"kind":"Field","name":{"kind":"Name","value":"namePlural"}},{"kind":"Field","name":{"kind":"Name","value":"labelSingular"}},{"kind":"Field","name":{"kind":"Name","value":"labelPlural"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"icon"}},{"kind":"Field","name":{"kind":"Name","value":"isCustom"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"labelIdentifierFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"imageIdentifierFieldMetadataId"}}]}}]}}]} as unknown as DocumentNode; +export const DeleteOneObjectMetadataItemDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"DeleteOneObjectMetadataItem"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"idToDelete"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UUID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"deleteOneObject"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"idToDelete"}}}]}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"dataSourceId"}},{"kind":"Field","name":{"kind":"Name","value":"nameSingular"}},{"kind":"Field","name":{"kind":"Name","value":"namePlural"}},{"kind":"Field","name":{"kind":"Name","value":"labelSingular"}},{"kind":"Field","name":{"kind":"Name","value":"labelPlural"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"icon"}},{"kind":"Field","name":{"kind":"Name","value":"isCustom"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"labelIdentifierFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"imageIdentifierFieldMetadataId"}}]}}]}}]} as unknown as DocumentNode; +export const DeleteOneFieldMetadataItemDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"DeleteOneFieldMetadataItem"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"idToDelete"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UUID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"deleteOneField"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"idToDelete"}}}]}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"label"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"icon"}},{"kind":"Field","name":{"kind":"Name","value":"isCustom"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"isNullable"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}}]}}]} as unknown as DocumentNode; export const ObjectMetadataItemsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"ObjectMetadataItems"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"objectFilter"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"objectFilter"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"fieldFilter"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"fieldFilter"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"objects"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"paging"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"first"},"value":{"kind":"IntValue","value":"1000"}}]}},{"kind":"Argument","name":{"kind":"Name","value":"filter"},"value":{"kind":"Variable","name":{"kind":"Name","value":"objectFilter"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"edges"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"node"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"dataSourceId"}},{"kind":"Field","name":{"kind":"Name","value":"nameSingular"}},{"kind":"Field","name":{"kind":"Name","value":"namePlural"}},{"kind":"Field","name":{"kind":"Name","value":"labelSingular"}},{"kind":"Field","name":{"kind":"Name","value":"labelPlural"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"icon"}},{"kind":"Field","name":{"kind":"Name","value":"isCustom"}},{"kind":"Field","name":{"kind":"Name","value":"isRemote"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"isSystem"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"labelIdentifierFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"imageIdentifierFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"fields"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"paging"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"first"},"value":{"kind":"IntValue","value":"1000"}}]}},{"kind":"Argument","name":{"kind":"Name","value":"filter"},"value":{"kind":"Variable","name":{"kind":"Name","value":"fieldFilter"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"edges"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"node"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"label"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"icon"}},{"kind":"Field","name":{"kind":"Name","value":"isCustom"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"isSystem"}},{"kind":"Field","name":{"kind":"Name","value":"isNullable"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"fromRelationMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"relationType"}},{"kind":"Field","name":{"kind":"Name","value":"toObjectMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"dataSourceId"}},{"kind":"Field","name":{"kind":"Name","value":"nameSingular"}},{"kind":"Field","name":{"kind":"Name","value":"namePlural"}},{"kind":"Field","name":{"kind":"Name","value":"isSystem"}}]}},{"kind":"Field","name":{"kind":"Name","value":"toFieldMetadataId"}}]}},{"kind":"Field","name":{"kind":"Name","value":"toRelationMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"relationType"}},{"kind":"Field","name":{"kind":"Name","value":"fromObjectMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"dataSourceId"}},{"kind":"Field","name":{"kind":"Name","value":"nameSingular"}},{"kind":"Field","name":{"kind":"Name","value":"namePlural"}},{"kind":"Field","name":{"kind":"Name","value":"isSystem"}}]}},{"kind":"Field","name":{"kind":"Name","value":"fromFieldMetadataId"}}]}},{"kind":"Field","name":{"kind":"Name","value":"defaultValue"}},{"kind":"Field","name":{"kind":"Name","value":"options"}},{"kind":"Field","name":{"kind":"Name","value":"relationDefinition"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"direction"}},{"kind":"Field","name":{"kind":"Name","value":"sourceObjectMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"nameSingular"}},{"kind":"Field","name":{"kind":"Name","value":"namePlural"}}]}},{"kind":"Field","name":{"kind":"Name","value":"sourceFieldMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"targetObjectMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"nameSingular"}},{"kind":"Field","name":{"kind":"Name","value":"namePlural"}}]}},{"kind":"Field","name":{"kind":"Name","value":"targetFieldMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}}]}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"pageInfo"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"hasNextPage"}},{"kind":"Field","name":{"kind":"Name","value":"hasPreviousPage"}},{"kind":"Field","name":{"kind":"Name","value":"startCursor"}},{"kind":"Field","name":{"kind":"Name","value":"endCursor"}}]}}]}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"pageInfo"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"hasNextPage"}},{"kind":"Field","name":{"kind":"Name","value":"hasPreviousPage"}},{"kind":"Field","name":{"kind":"Name","value":"startCursor"}},{"kind":"Field","name":{"kind":"Name","value":"endCursor"}}]}}]}}]}}]} as unknown as DocumentNode; \ No newline at end of file diff --git a/packages/twenty-front/src/generated/graphql.tsx b/packages/twenty-front/src/generated/graphql.tsx index 936cfcf2f2c8..0088c553568d 100644 --- a/packages/twenty-front/src/generated/graphql.tsx +++ b/packages/twenty-front/src/generated/graphql.tsx @@ -39,7 +39,7 @@ export type AppToken = { __typename?: 'AppToken'; createdAt: Scalars['DateTime']; expiresAt: Scalars['DateTime']; - id: Scalars['ID']; + id: Scalars['UUID']; type: Scalars['String']; updatedAt: Scalars['DateTime']; }; @@ -90,14 +90,14 @@ export type Billing = { export type BillingSubscription = { __typename?: 'BillingSubscription'; - id: Scalars['ID']; + id: Scalars['UUID']; interval?: Maybe; status: Scalars['String']; }; export type BillingSubscriptionFilter = { and?: InputMaybe>; - id?: InputMaybe; + id?: InputMaybe; or?: InputMaybe>; }; @@ -141,7 +141,7 @@ export type CursorPaging = { export type DeleteOneObjectInput = { /** The id of the record to delete. */ - id: Scalars['ID']; + id: Scalars['UUID']; }; export type EmailPasswordResetLink = { @@ -159,7 +159,7 @@ export type ExchangeAuthCode = { export type FeatureFlag = { __typename?: 'FeatureFlag'; - id: Scalars['ID']; + id: Scalars['UUID']; key: Scalars['String']; value: Scalars['Boolean']; workspaceId: Scalars['String']; @@ -167,7 +167,7 @@ export type FeatureFlag = { export type FeatureFlagFilter = { and?: InputMaybe>; - id?: InputMaybe; + id?: InputMaybe; or?: InputMaybe>; }; @@ -225,23 +225,6 @@ export type FullName = { lastName: Scalars['String']; }; -export type IdFilterComparison = { - eq?: InputMaybe; - gt?: InputMaybe; - gte?: InputMaybe; - iLike?: InputMaybe; - in?: InputMaybe>; - is?: InputMaybe; - isNot?: InputMaybe; - like?: InputMaybe; - lt?: InputMaybe; - lte?: InputMaybe; - neq?: InputMaybe; - notILike?: InputMaybe; - notIn?: InputMaybe>; - notLike?: InputMaybe; -}; - export type InvalidatePassword = { __typename?: 'InvalidatePassword'; /** Boolean that confirms query was dispatched */ @@ -491,7 +474,7 @@ export type QueryGetProductPricesArgs = { export type QueryGetTimelineCalendarEventsFromCompanyIdArgs = { - companyId: Scalars['ID']; + companyId: Scalars['UUID']; page: Scalars['Int']; pageSize: Scalars['Int']; }; @@ -500,12 +483,12 @@ export type QueryGetTimelineCalendarEventsFromCompanyIdArgs = { export type QueryGetTimelineCalendarEventsFromPersonIdArgs = { page: Scalars['Int']; pageSize: Scalars['Int']; - personId: Scalars['ID']; + personId: Scalars['UUID']; }; export type QueryGetTimelineThreadsFromCompanyIdArgs = { - companyId: Scalars['ID']; + companyId: Scalars['UUID']; page: Scalars['Int']; pageSize: Scalars['Int']; }; @@ -514,7 +497,7 @@ export type QueryGetTimelineThreadsFromCompanyIdArgs = { export type QueryGetTimelineThreadsFromPersonIdArgs = { page: Scalars['Int']; pageSize: Scalars['Int']; - personId: Scalars['ID']; + personId: Scalars['UUID']; }; @@ -552,7 +535,7 @@ export type RelationDeleteResponse = { createdAt?: Maybe; fromFieldMetadataId?: Maybe; fromObjectMetadataId?: Maybe; - id?: Maybe; + id?: Maybe; relationType?: Maybe; toFieldMetadataId?: Maybe; toObjectMetadataId?: Maybe; @@ -629,7 +612,7 @@ export type TimelineCalendarEvent = { conferenceSolution: Scalars['String']; description: Scalars['String']; endsAt: Scalars['DateTime']; - id: Scalars['ID']; + id: Scalars['UUID']; isCanceled: Scalars['Boolean']; isFullDay: Scalars['Boolean']; location: Scalars['String']; @@ -646,8 +629,8 @@ export type TimelineCalendarEventParticipant = { firstName: Scalars['String']; handle: Scalars['String']; lastName: Scalars['String']; - personId?: Maybe; - workspaceMemberId?: Maybe; + personId?: Maybe; + workspaceMemberId?: Maybe; }; /** Visibility of the calendar event */ @@ -665,7 +648,7 @@ export type TimelineCalendarEventsWithTotal = { export type TimelineThread = { __typename?: 'TimelineThread'; firstParticipant: TimelineThreadParticipant; - id: Scalars['ID']; + id: Scalars['UUID']; lastMessageBody: Scalars['String']; lastMessageReceivedAt: Scalars['DateTime']; lastTwoParticipants: Array; @@ -683,8 +666,8 @@ export type TimelineThreadParticipant = { firstName: Scalars['String']; handle: Scalars['String']; lastName: Scalars['String']; - personId?: Maybe; - workspaceMemberId?: Maybe; + personId?: Maybe; + workspaceMemberId?: Maybe; }; export type TimelineThreadsWithTotal = { @@ -698,6 +681,23 @@ export type TransientToken = { transientToken: AuthToken; }; +export type UuidFilterComparison = { + eq?: InputMaybe; + gt?: InputMaybe; + gte?: InputMaybe; + iLike?: InputMaybe; + in?: InputMaybe>; + is?: InputMaybe; + isNot?: InputMaybe; + like?: InputMaybe; + lt?: InputMaybe; + lte?: InputMaybe; + neq?: InputMaybe; + notILike?: InputMaybe; + notIn?: InputMaybe>; + notLike?: InputMaybe; +}; + export type UpdateBillingEntity = { __typename?: 'UpdateBillingEntity'; /** Boolean that confirms query was successful */ @@ -724,7 +724,7 @@ export type User = { email: Scalars['String']; emailVerified: Scalars['Boolean']; firstName: Scalars['String']; - id: Scalars['ID']; + id: Scalars['UUID']; lastName: Scalars['String']; passwordHash?: Maybe; passwordResetToken?: Maybe; @@ -752,7 +752,7 @@ export type UserWorkspace = { __typename?: 'UserWorkspace'; createdAt: Scalars['DateTime']; deletedAt?: Maybe; - id: Scalars['ID']; + id: Scalars['UUID']; updatedAt: Scalars['DateTime']; user: User; userId: Scalars['String']; @@ -784,7 +784,7 @@ export type Workspace = { displayName?: Maybe; domainName?: Maybe; featureFlags?: Maybe>; - id: Scalars['ID']; + id: Scalars['UUID']; inviteHash?: Maybe; logo?: Maybe; subscriptionStatus: Scalars['String']; @@ -832,7 +832,7 @@ export type Field = { description?: Maybe; fromRelationMetadata?: Maybe; icon?: Maybe; - id: Scalars['ID']; + id: Scalars['UUID']; isActive?: Maybe; isCustom?: Maybe; isNullable?: Maybe; @@ -856,7 +856,7 @@ export type FieldEdge = { export type FieldFilter = { and?: InputMaybe>; - id?: InputMaybe; + id?: InputMaybe; isActive?: InputMaybe; isCustom?: InputMaybe; isSystem?: InputMaybe; @@ -870,7 +870,7 @@ export type Object = { description?: Maybe; fields: ObjectFieldsConnection; icon?: Maybe; - id: Scalars['ID']; + id: Scalars['UUID']; imageIdentifierFieldMetadataId?: Maybe; isActive: Scalars['Boolean']; isCustom: Scalars['Boolean']; @@ -904,7 +904,7 @@ export type Relation = { fromFieldMetadataId: Scalars['String']; fromObjectMetadata: Object; fromObjectMetadataId: Scalars['String']; - id: Scalars['ID']; + id: Scalars['UUID']; relationType: RelationMetadataType; toFieldMetadataId: Scalars['String']; toObjectMetadata: Object; @@ -920,55 +920,55 @@ export type RelationEdge = { node: Relation; }; -export type TimelineCalendarEventFragmentFragment = { __typename?: 'TimelineCalendarEvent', id: string, title: string, description: string, location: string, startsAt: string, endsAt: string, isFullDay: boolean, visibility: TimelineCalendarEventVisibility, participants: Array<{ __typename?: 'TimelineCalendarEventParticipant', personId?: string | null, workspaceMemberId?: string | null, firstName: string, lastName: string, displayName: string, avatarUrl: string, handle: string }> }; +export type TimelineCalendarEventFragmentFragment = { __typename?: 'TimelineCalendarEvent', id: any, title: string, description: string, location: string, startsAt: string, endsAt: string, isFullDay: boolean, visibility: TimelineCalendarEventVisibility, participants: Array<{ __typename?: 'TimelineCalendarEventParticipant', personId?: any | null, workspaceMemberId?: any | null, firstName: string, lastName: string, displayName: string, avatarUrl: string, handle: string }> }; -export type TimelineCalendarEventParticipantFragmentFragment = { __typename?: 'TimelineCalendarEventParticipant', personId?: string | null, workspaceMemberId?: string | null, firstName: string, lastName: string, displayName: string, avatarUrl: string, handle: string }; +export type TimelineCalendarEventParticipantFragmentFragment = { __typename?: 'TimelineCalendarEventParticipant', personId?: any | null, workspaceMemberId?: any | null, firstName: string, lastName: string, displayName: string, avatarUrl: string, handle: string }; -export type TimelineCalendarEventsWithTotalFragmentFragment = { __typename?: 'TimelineCalendarEventsWithTotal', totalNumberOfCalendarEvents: number, timelineCalendarEvents: Array<{ __typename?: 'TimelineCalendarEvent', id: string, title: string, description: string, location: string, startsAt: string, endsAt: string, isFullDay: boolean, visibility: TimelineCalendarEventVisibility, participants: Array<{ __typename?: 'TimelineCalendarEventParticipant', personId?: string | null, workspaceMemberId?: string | null, firstName: string, lastName: string, displayName: string, avatarUrl: string, handle: string }> }> }; +export type TimelineCalendarEventsWithTotalFragmentFragment = { __typename?: 'TimelineCalendarEventsWithTotal', totalNumberOfCalendarEvents: number, timelineCalendarEvents: Array<{ __typename?: 'TimelineCalendarEvent', id: any, title: string, description: string, location: string, startsAt: string, endsAt: string, isFullDay: boolean, visibility: TimelineCalendarEventVisibility, participants: Array<{ __typename?: 'TimelineCalendarEventParticipant', personId?: any | null, workspaceMemberId?: any | null, firstName: string, lastName: string, displayName: string, avatarUrl: string, handle: string }> }> }; export type GetTimelineCalendarEventsFromCompanyIdQueryVariables = Exact<{ - companyId: Scalars['ID']; + companyId: Scalars['UUID']; page: Scalars['Int']; pageSize: Scalars['Int']; }>; -export type GetTimelineCalendarEventsFromCompanyIdQuery = { __typename?: 'Query', getTimelineCalendarEventsFromCompanyId: { __typename?: 'TimelineCalendarEventsWithTotal', totalNumberOfCalendarEvents: number, timelineCalendarEvents: Array<{ __typename?: 'TimelineCalendarEvent', id: string, title: string, description: string, location: string, startsAt: string, endsAt: string, isFullDay: boolean, visibility: TimelineCalendarEventVisibility, participants: Array<{ __typename?: 'TimelineCalendarEventParticipant', personId?: string | null, workspaceMemberId?: string | null, firstName: string, lastName: string, displayName: string, avatarUrl: string, handle: string }> }> } }; +export type GetTimelineCalendarEventsFromCompanyIdQuery = { __typename?: 'Query', getTimelineCalendarEventsFromCompanyId: { __typename?: 'TimelineCalendarEventsWithTotal', totalNumberOfCalendarEvents: number, timelineCalendarEvents: Array<{ __typename?: 'TimelineCalendarEvent', id: any, title: string, description: string, location: string, startsAt: string, endsAt: string, isFullDay: boolean, visibility: TimelineCalendarEventVisibility, participants: Array<{ __typename?: 'TimelineCalendarEventParticipant', personId?: any | null, workspaceMemberId?: any | null, firstName: string, lastName: string, displayName: string, avatarUrl: string, handle: string }> }> } }; export type GetTimelineCalendarEventsFromPersonIdQueryVariables = Exact<{ - personId: Scalars['ID']; + personId: Scalars['UUID']; page: Scalars['Int']; pageSize: Scalars['Int']; }>; -export type GetTimelineCalendarEventsFromPersonIdQuery = { __typename?: 'Query', getTimelineCalendarEventsFromPersonId: { __typename?: 'TimelineCalendarEventsWithTotal', totalNumberOfCalendarEvents: number, timelineCalendarEvents: Array<{ __typename?: 'TimelineCalendarEvent', id: string, title: string, description: string, location: string, startsAt: string, endsAt: string, isFullDay: boolean, visibility: TimelineCalendarEventVisibility, participants: Array<{ __typename?: 'TimelineCalendarEventParticipant', personId?: string | null, workspaceMemberId?: string | null, firstName: string, lastName: string, displayName: string, avatarUrl: string, handle: string }> }> } }; +export type GetTimelineCalendarEventsFromPersonIdQuery = { __typename?: 'Query', getTimelineCalendarEventsFromPersonId: { __typename?: 'TimelineCalendarEventsWithTotal', totalNumberOfCalendarEvents: number, timelineCalendarEvents: Array<{ __typename?: 'TimelineCalendarEvent', id: any, title: string, description: string, location: string, startsAt: string, endsAt: string, isFullDay: boolean, visibility: TimelineCalendarEventVisibility, participants: Array<{ __typename?: 'TimelineCalendarEventParticipant', personId?: any | null, workspaceMemberId?: any | null, firstName: string, lastName: string, displayName: string, avatarUrl: string, handle: string }> }> } }; -export type ParticipantFragmentFragment = { __typename?: 'TimelineThreadParticipant', personId?: string | null, workspaceMemberId?: string | null, firstName: string, lastName: string, displayName: string, avatarUrl: string, handle: string }; +export type ParticipantFragmentFragment = { __typename?: 'TimelineThreadParticipant', personId?: any | null, workspaceMemberId?: any | null, firstName: string, lastName: string, displayName: string, avatarUrl: string, handle: string }; -export type TimelineThreadFragmentFragment = { __typename?: 'TimelineThread', id: string, read: boolean, visibility: string, lastMessageReceivedAt: string, lastMessageBody: string, subject: string, numberOfMessagesInThread: number, participantCount: number, firstParticipant: { __typename?: 'TimelineThreadParticipant', personId?: string | null, workspaceMemberId?: string | null, firstName: string, lastName: string, displayName: string, avatarUrl: string, handle: string }, lastTwoParticipants: Array<{ __typename?: 'TimelineThreadParticipant', personId?: string | null, workspaceMemberId?: string | null, firstName: string, lastName: string, displayName: string, avatarUrl: string, handle: string }> }; +export type TimelineThreadFragmentFragment = { __typename?: 'TimelineThread', id: any, read: boolean, visibility: string, lastMessageReceivedAt: string, lastMessageBody: string, subject: string, numberOfMessagesInThread: number, participantCount: number, firstParticipant: { __typename?: 'TimelineThreadParticipant', personId?: any | null, workspaceMemberId?: any | null, firstName: string, lastName: string, displayName: string, avatarUrl: string, handle: string }, lastTwoParticipants: Array<{ __typename?: 'TimelineThreadParticipant', personId?: any | null, workspaceMemberId?: any | null, firstName: string, lastName: string, displayName: string, avatarUrl: string, handle: string }> }; -export type TimelineThreadsWithTotalFragmentFragment = { __typename?: 'TimelineThreadsWithTotal', totalNumberOfThreads: number, timelineThreads: Array<{ __typename?: 'TimelineThread', id: string, read: boolean, visibility: string, lastMessageReceivedAt: string, lastMessageBody: string, subject: string, numberOfMessagesInThread: number, participantCount: number, firstParticipant: { __typename?: 'TimelineThreadParticipant', personId?: string | null, workspaceMemberId?: string | null, firstName: string, lastName: string, displayName: string, avatarUrl: string, handle: string }, lastTwoParticipants: Array<{ __typename?: 'TimelineThreadParticipant', personId?: string | null, workspaceMemberId?: string | null, firstName: string, lastName: string, displayName: string, avatarUrl: string, handle: string }> }> }; +export type TimelineThreadsWithTotalFragmentFragment = { __typename?: 'TimelineThreadsWithTotal', totalNumberOfThreads: number, timelineThreads: Array<{ __typename?: 'TimelineThread', id: any, read: boolean, visibility: string, lastMessageReceivedAt: string, lastMessageBody: string, subject: string, numberOfMessagesInThread: number, participantCount: number, firstParticipant: { __typename?: 'TimelineThreadParticipant', personId?: any | null, workspaceMemberId?: any | null, firstName: string, lastName: string, displayName: string, avatarUrl: string, handle: string }, lastTwoParticipants: Array<{ __typename?: 'TimelineThreadParticipant', personId?: any | null, workspaceMemberId?: any | null, firstName: string, lastName: string, displayName: string, avatarUrl: string, handle: string }> }> }; export type GetTimelineThreadsFromCompanyIdQueryVariables = Exact<{ - companyId: Scalars['ID']; + companyId: Scalars['UUID']; page: Scalars['Int']; pageSize: Scalars['Int']; }>; -export type GetTimelineThreadsFromCompanyIdQuery = { __typename?: 'Query', getTimelineThreadsFromCompanyId: { __typename?: 'TimelineThreadsWithTotal', totalNumberOfThreads: number, timelineThreads: Array<{ __typename?: 'TimelineThread', id: string, read: boolean, visibility: string, lastMessageReceivedAt: string, lastMessageBody: string, subject: string, numberOfMessagesInThread: number, participantCount: number, firstParticipant: { __typename?: 'TimelineThreadParticipant', personId?: string | null, workspaceMemberId?: string | null, firstName: string, lastName: string, displayName: string, avatarUrl: string, handle: string }, lastTwoParticipants: Array<{ __typename?: 'TimelineThreadParticipant', personId?: string | null, workspaceMemberId?: string | null, firstName: string, lastName: string, displayName: string, avatarUrl: string, handle: string }> }> } }; +export type GetTimelineThreadsFromCompanyIdQuery = { __typename?: 'Query', getTimelineThreadsFromCompanyId: { __typename?: 'TimelineThreadsWithTotal', totalNumberOfThreads: number, timelineThreads: Array<{ __typename?: 'TimelineThread', id: any, read: boolean, visibility: string, lastMessageReceivedAt: string, lastMessageBody: string, subject: string, numberOfMessagesInThread: number, participantCount: number, firstParticipant: { __typename?: 'TimelineThreadParticipant', personId?: any | null, workspaceMemberId?: any | null, firstName: string, lastName: string, displayName: string, avatarUrl: string, handle: string }, lastTwoParticipants: Array<{ __typename?: 'TimelineThreadParticipant', personId?: any | null, workspaceMemberId?: any | null, firstName: string, lastName: string, displayName: string, avatarUrl: string, handle: string }> }> } }; export type GetTimelineThreadsFromPersonIdQueryVariables = Exact<{ - personId: Scalars['ID']; + personId: Scalars['UUID']; page: Scalars['Int']; pageSize: Scalars['Int']; }>; -export type GetTimelineThreadsFromPersonIdQuery = { __typename?: 'Query', getTimelineThreadsFromPersonId: { __typename?: 'TimelineThreadsWithTotal', totalNumberOfThreads: number, timelineThreads: Array<{ __typename?: 'TimelineThread', id: string, read: boolean, visibility: string, lastMessageReceivedAt: string, lastMessageBody: string, subject: string, numberOfMessagesInThread: number, participantCount: number, firstParticipant: { __typename?: 'TimelineThreadParticipant', personId?: string | null, workspaceMemberId?: string | null, firstName: string, lastName: string, displayName: string, avatarUrl: string, handle: string }, lastTwoParticipants: Array<{ __typename?: 'TimelineThreadParticipant', personId?: string | null, workspaceMemberId?: string | null, firstName: string, lastName: string, displayName: string, avatarUrl: string, handle: string }> }> } }; +export type GetTimelineThreadsFromPersonIdQuery = { __typename?: 'Query', getTimelineThreadsFromPersonId: { __typename?: 'TimelineThreadsWithTotal', totalNumberOfThreads: number, timelineThreads: Array<{ __typename?: 'TimelineThread', id: any, read: boolean, visibility: string, lastMessageReceivedAt: string, lastMessageBody: string, subject: string, numberOfMessagesInThread: number, participantCount: number, firstParticipant: { __typename?: 'TimelineThreadParticipant', personId?: any | null, workspaceMemberId?: any | null, firstName: string, lastName: string, displayName: string, avatarUrl: string, handle: string }, lastTwoParticipants: Array<{ __typename?: 'TimelineThreadParticipant', personId?: any | null, workspaceMemberId?: any | null, firstName: string, lastName: string, displayName: string, avatarUrl: string, handle: string }> }> } }; -export type TimelineThreadFragment = { __typename?: 'TimelineThread', id: string, subject: string, lastMessageReceivedAt: string }; +export type TimelineThreadFragment = { __typename?: 'TimelineThread', id: any, subject: string, lastMessageReceivedAt: string }; export type TrackMutationVariables = Exact<{ type: Scalars['String']; @@ -1030,7 +1030,7 @@ export type ImpersonateMutationVariables = Exact<{ }>; -export type ImpersonateMutation = { __typename?: 'Mutation', impersonate: { __typename?: 'Verify', user: { __typename?: 'User', id: string, firstName: string, lastName: string, email: string, canImpersonate: boolean, supportUserHash?: string | null, workspaceMember?: { __typename?: 'WorkspaceMember', id: any, colorScheme: string, avatarUrl?: string | null, locale: string, name: { __typename?: 'FullName', firstName: string, lastName: string } } | null, defaultWorkspace: { __typename?: 'Workspace', id: string, displayName?: string | null, logo?: string | null, domainName?: string | null, inviteHash?: string | null, allowImpersonation: boolean, subscriptionStatus: string, activationStatus: string, featureFlags?: Array<{ __typename?: 'FeatureFlag', id: string, key: string, value: boolean, workspaceId: string }> | null }, workspaces: Array<{ __typename?: 'UserWorkspace', workspace?: { __typename?: 'Workspace', id: string, logo?: string | null, displayName?: string | null, domainName?: string | null } | null }> }, tokens: { __typename?: 'AuthTokenPair', accessToken: { __typename?: 'AuthToken', token: string, expiresAt: string }, refreshToken: { __typename?: 'AuthToken', token: string, expiresAt: string } } } }; +export type ImpersonateMutation = { __typename?: 'Mutation', impersonate: { __typename?: 'Verify', user: { __typename?: 'User', id: any, firstName: string, lastName: string, email: string, canImpersonate: boolean, supportUserHash?: string | null, workspaceMember?: { __typename?: 'WorkspaceMember', id: any, colorScheme: string, avatarUrl?: string | null, locale: string, name: { __typename?: 'FullName', firstName: string, lastName: string } } | null, defaultWorkspace: { __typename?: 'Workspace', id: any, displayName?: string | null, logo?: string | null, domainName?: string | null, inviteHash?: string | null, allowImpersonation: boolean, subscriptionStatus: string, activationStatus: string, featureFlags?: Array<{ __typename?: 'FeatureFlag', id: any, key: string, value: boolean, workspaceId: string }> | null }, workspaces: Array<{ __typename?: 'UserWorkspace', workspace?: { __typename?: 'Workspace', id: any, logo?: string | null, displayName?: string | null, domainName?: string | null } | null }> }, tokens: { __typename?: 'AuthTokenPair', accessToken: { __typename?: 'AuthToken', token: string, expiresAt: string }, refreshToken: { __typename?: 'AuthToken', token: string, expiresAt: string } } } }; export type RenewTokenMutationVariables = Exact<{ appToken: Scalars['String']; @@ -1061,7 +1061,7 @@ export type VerifyMutationVariables = Exact<{ }>; -export type VerifyMutation = { __typename?: 'Mutation', verify: { __typename?: 'Verify', user: { __typename?: 'User', id: string, firstName: string, lastName: string, email: string, canImpersonate: boolean, supportUserHash?: string | null, workspaceMember?: { __typename?: 'WorkspaceMember', id: any, colorScheme: string, avatarUrl?: string | null, locale: string, name: { __typename?: 'FullName', firstName: string, lastName: string } } | null, defaultWorkspace: { __typename?: 'Workspace', id: string, displayName?: string | null, logo?: string | null, domainName?: string | null, inviteHash?: string | null, allowImpersonation: boolean, subscriptionStatus: string, activationStatus: string, featureFlags?: Array<{ __typename?: 'FeatureFlag', id: string, key: string, value: boolean, workspaceId: string }> | null }, workspaces: Array<{ __typename?: 'UserWorkspace', workspace?: { __typename?: 'Workspace', id: string, logo?: string | null, displayName?: string | null, domainName?: string | null } | null }> }, tokens: { __typename?: 'AuthTokenPair', accessToken: { __typename?: 'AuthToken', token: string, expiresAt: string }, refreshToken: { __typename?: 'AuthToken', token: string, expiresAt: string } } } }; +export type VerifyMutation = { __typename?: 'Mutation', verify: { __typename?: 'Verify', user: { __typename?: 'User', id: any, firstName: string, lastName: string, email: string, canImpersonate: boolean, supportUserHash?: string | null, workspaceMember?: { __typename?: 'WorkspaceMember', id: any, colorScheme: string, avatarUrl?: string | null, locale: string, name: { __typename?: 'FullName', firstName: string, lastName: string } } | null, defaultWorkspace: { __typename?: 'Workspace', id: any, displayName?: string | null, logo?: string | null, domainName?: string | null, inviteHash?: string | null, allowImpersonation: boolean, subscriptionStatus: string, activationStatus: string, featureFlags?: Array<{ __typename?: 'FeatureFlag', id: any, key: string, value: boolean, workspaceId: string }> | null }, workspaces: Array<{ __typename?: 'UserWorkspace', workspace?: { __typename?: 'Workspace', id: any, logo?: string | null, displayName?: string | null, domainName?: string | null } | null }> }, tokens: { __typename?: 'AuthTokenPair', accessToken: { __typename?: 'AuthToken', token: string, expiresAt: string }, refreshToken: { __typename?: 'AuthToken', token: string, expiresAt: string } } } }; export type CheckUserExistsQueryVariables = Exact<{ email: Scalars['String']; @@ -1125,12 +1125,12 @@ export type UploadImageMutationVariables = Exact<{ export type UploadImageMutation = { __typename?: 'Mutation', uploadImage: string }; -export type UserQueryFragmentFragment = { __typename?: 'User', id: string, firstName: string, lastName: string, email: string, canImpersonate: boolean, supportUserHash?: string | null, workspaceMember?: { __typename?: 'WorkspaceMember', id: any, colorScheme: string, avatarUrl?: string | null, locale: string, name: { __typename?: 'FullName', firstName: string, lastName: string } } | null, defaultWorkspace: { __typename?: 'Workspace', id: string, displayName?: string | null, logo?: string | null, domainName?: string | null, inviteHash?: string | null, allowImpersonation: boolean, subscriptionStatus: string, activationStatus: string, featureFlags?: Array<{ __typename?: 'FeatureFlag', id: string, key: string, value: boolean, workspaceId: string }> | null }, workspaces: Array<{ __typename?: 'UserWorkspace', workspace?: { __typename?: 'Workspace', id: string, logo?: string | null, displayName?: string | null, domainName?: string | null } | null }> }; +export type UserQueryFragmentFragment = { __typename?: 'User', id: any, firstName: string, lastName: string, email: string, canImpersonate: boolean, supportUserHash?: string | null, workspaceMember?: { __typename?: 'WorkspaceMember', id: any, colorScheme: string, avatarUrl?: string | null, locale: string, name: { __typename?: 'FullName', firstName: string, lastName: string } } | null, defaultWorkspace: { __typename?: 'Workspace', id: any, displayName?: string | null, logo?: string | null, domainName?: string | null, inviteHash?: string | null, allowImpersonation: boolean, subscriptionStatus: string, activationStatus: string, featureFlags?: Array<{ __typename?: 'FeatureFlag', id: any, key: string, value: boolean, workspaceId: string }> | null }, workspaces: Array<{ __typename?: 'UserWorkspace', workspace?: { __typename?: 'Workspace', id: any, logo?: string | null, displayName?: string | null, domainName?: string | null } | null }> }; export type DeleteUserAccountMutationVariables = Exact<{ [key: string]: never; }>; -export type DeleteUserAccountMutation = { __typename?: 'Mutation', deleteUser: { __typename?: 'User', id: string } }; +export type DeleteUserAccountMutation = { __typename?: 'Mutation', deleteUser: { __typename?: 'User', id: any } }; export type UploadProfilePictureMutationVariables = Exact<{ file: Scalars['Upload']; @@ -1142,26 +1142,26 @@ export type UploadProfilePictureMutation = { __typename?: 'Mutation', uploadProf export type GetCurrentUserQueryVariables = Exact<{ [key: string]: never; }>; -export type GetCurrentUserQuery = { __typename?: 'Query', currentUser: { __typename?: 'User', id: string, firstName: string, lastName: string, email: string, canImpersonate: boolean, supportUserHash?: string | null, workspaceMember?: { __typename?: 'WorkspaceMember', id: any, colorScheme: string, avatarUrl?: string | null, locale: string, name: { __typename?: 'FullName', firstName: string, lastName: string } } | null, defaultWorkspace: { __typename?: 'Workspace', id: string, displayName?: string | null, logo?: string | null, domainName?: string | null, inviteHash?: string | null, allowImpersonation: boolean, subscriptionStatus: string, activationStatus: string, currentCacheVersion?: string | null, featureFlags?: Array<{ __typename?: 'FeatureFlag', id: string, key: string, value: boolean, workspaceId: string }> | null, currentBillingSubscription?: { __typename?: 'BillingSubscription', status: string, interval?: string | null } | null }, workspaces: Array<{ __typename?: 'UserWorkspace', workspace?: { __typename?: 'Workspace', id: string, displayName?: string | null, logo?: string | null, domainName?: string | null } | null }> } }; +export type GetCurrentUserQuery = { __typename?: 'Query', currentUser: { __typename?: 'User', id: any, firstName: string, lastName: string, email: string, canImpersonate: boolean, supportUserHash?: string | null, workspaceMember?: { __typename?: 'WorkspaceMember', id: any, colorScheme: string, avatarUrl?: string | null, locale: string, name: { __typename?: 'FullName', firstName: string, lastName: string } } | null, defaultWorkspace: { __typename?: 'Workspace', id: any, displayName?: string | null, logo?: string | null, domainName?: string | null, inviteHash?: string | null, allowImpersonation: boolean, subscriptionStatus: string, activationStatus: string, currentCacheVersion?: string | null, featureFlags?: Array<{ __typename?: 'FeatureFlag', id: any, key: string, value: boolean, workspaceId: string }> | null, currentBillingSubscription?: { __typename?: 'BillingSubscription', status: string, interval?: string | null } | null }, workspaces: Array<{ __typename?: 'UserWorkspace', workspace?: { __typename?: 'Workspace', id: any, displayName?: string | null, logo?: string | null, domainName?: string | null } | null }> } }; export type ActivateWorkspaceMutationVariables = Exact<{ input: ActivateWorkspaceInput; }>; -export type ActivateWorkspaceMutation = { __typename?: 'Mutation', activateWorkspace: { __typename?: 'Workspace', id: string } }; +export type ActivateWorkspaceMutation = { __typename?: 'Mutation', activateWorkspace: { __typename?: 'Workspace', id: any } }; export type DeleteCurrentWorkspaceMutationVariables = Exact<{ [key: string]: never; }>; -export type DeleteCurrentWorkspaceMutation = { __typename?: 'Mutation', deleteCurrentWorkspace: { __typename?: 'Workspace', id: string } }; +export type DeleteCurrentWorkspaceMutation = { __typename?: 'Mutation', deleteCurrentWorkspace: { __typename?: 'Workspace', id: any } }; export type UpdateWorkspaceMutationVariables = Exact<{ input: UpdateWorkspaceInput; }>; -export type UpdateWorkspaceMutation = { __typename?: 'Mutation', updateWorkspace: { __typename?: 'Workspace', id: string, domainName?: string | null, displayName?: string | null, logo?: string | null, allowImpersonation: boolean, subscriptionStatus: string } }; +export type UpdateWorkspaceMutation = { __typename?: 'Mutation', updateWorkspace: { __typename?: 'Workspace', id: any, domainName?: string | null, displayName?: string | null, logo?: string | null, allowImpersonation: boolean, subscriptionStatus: string } }; export type UploadWorkspaceLogoMutationVariables = Exact<{ file: Scalars['Upload']; @@ -1175,7 +1175,7 @@ export type GetWorkspaceFromInviteHashQueryVariables = Exact<{ }>; -export type GetWorkspaceFromInviteHashQuery = { __typename?: 'Query', findWorkspaceFromInviteHash: { __typename?: 'Workspace', id: string, displayName?: string | null, logo?: string | null, allowImpersonation: boolean } }; +export type GetWorkspaceFromInviteHashQuery = { __typename?: 'Query', findWorkspaceFromInviteHash: { __typename?: 'Workspace', id: any, displayName?: string | null, logo?: string | null, allowImpersonation: boolean } }; export const TimelineCalendarEventParticipantFragmentFragmentDoc = gql` fragment TimelineCalendarEventParticipantFragment on TimelineCalendarEventParticipant { @@ -1316,7 +1316,7 @@ export const UserQueryFragmentFragmentDoc = gql` } `; export const GetTimelineCalendarEventsFromCompanyIdDocument = gql` - query GetTimelineCalendarEventsFromCompanyId($companyId: ID!, $page: Int!, $pageSize: Int!) { + query GetTimelineCalendarEventsFromCompanyId($companyId: UUID!, $page: Int!, $pageSize: Int!) { getTimelineCalendarEventsFromCompanyId( companyId: $companyId page: $page @@ -1357,7 +1357,7 @@ export type GetTimelineCalendarEventsFromCompanyIdQueryHookResult = ReturnType; export type GetTimelineCalendarEventsFromCompanyIdQueryResult = Apollo.QueryResult; export const GetTimelineCalendarEventsFromPersonIdDocument = gql` - query GetTimelineCalendarEventsFromPersonId($personId: ID!, $page: Int!, $pageSize: Int!) { + query GetTimelineCalendarEventsFromPersonId($personId: UUID!, $page: Int!, $pageSize: Int!) { getTimelineCalendarEventsFromPersonId( personId: $personId page: $page @@ -1398,7 +1398,7 @@ export type GetTimelineCalendarEventsFromPersonIdQueryHookResult = ReturnType; export type GetTimelineCalendarEventsFromPersonIdQueryResult = Apollo.QueryResult; export const GetTimelineThreadsFromCompanyIdDocument = gql` - query GetTimelineThreadsFromCompanyId($companyId: ID!, $page: Int!, $pageSize: Int!) { + query GetTimelineThreadsFromCompanyId($companyId: UUID!, $page: Int!, $pageSize: Int!) { getTimelineThreadsFromCompanyId( companyId: $companyId page: $page @@ -1439,7 +1439,7 @@ export type GetTimelineThreadsFromCompanyIdQueryHookResult = ReturnType; export type GetTimelineThreadsFromCompanyIdQueryResult = Apollo.QueryResult; export const GetTimelineThreadsFromPersonIdDocument = gql` - query GetTimelineThreadsFromPersonId($personId: ID!, $page: Int!, $pageSize: Int!) { + query GetTimelineThreadsFromPersonId($personId: UUID!, $page: Int!, $pageSize: Int!) { getTimelineThreadsFromPersonId( personId: $personId page: $page diff --git a/packages/twenty-front/src/modules/activities/calendar/queries/getTimelineCalendarEventsFromCompanyId.ts b/packages/twenty-front/src/modules/activities/calendar/queries/getTimelineCalendarEventsFromCompanyId.ts index f0c74e4d5bf0..e454e67452f3 100644 --- a/packages/twenty-front/src/modules/activities/calendar/queries/getTimelineCalendarEventsFromCompanyId.ts +++ b/packages/twenty-front/src/modules/activities/calendar/queries/getTimelineCalendarEventsFromCompanyId.ts @@ -4,7 +4,7 @@ import { timelineCalendarEventWithTotalFragment } from '@/activities/calendar/qu export const getTimelineCalendarEventsFromCompanyId = gql` query GetTimelineCalendarEventsFromCompanyId( - $companyId: ID! + $companyId: UUID! $page: Int! $pageSize: Int! ) { diff --git a/packages/twenty-front/src/modules/activities/calendar/queries/getTimelineCalendarEventsFromPersonId.ts b/packages/twenty-front/src/modules/activities/calendar/queries/getTimelineCalendarEventsFromPersonId.ts index 057430d4778c..7d9f221fbc78 100644 --- a/packages/twenty-front/src/modules/activities/calendar/queries/getTimelineCalendarEventsFromPersonId.ts +++ b/packages/twenty-front/src/modules/activities/calendar/queries/getTimelineCalendarEventsFromPersonId.ts @@ -4,7 +4,7 @@ import { timelineCalendarEventWithTotalFragment } from '@/activities/calendar/qu export const getTimelineCalendarEventsFromPersonId = gql` query GetTimelineCalendarEventsFromPersonId( - $personId: ID! + $personId: UUID! $page: Int! $pageSize: Int! ) { diff --git a/packages/twenty-front/src/modules/activities/emails/queries/getTimelineThreadsFromCompanyId.ts b/packages/twenty-front/src/modules/activities/emails/queries/getTimelineThreadsFromCompanyId.ts index e0df0e6d7e96..589905550c7d 100644 --- a/packages/twenty-front/src/modules/activities/emails/queries/getTimelineThreadsFromCompanyId.ts +++ b/packages/twenty-front/src/modules/activities/emails/queries/getTimelineThreadsFromCompanyId.ts @@ -4,7 +4,7 @@ import { timelineThreadWithTotalFragment } from '@/activities/emails/queries/fra export const getTimelineThreadsFromCompanyId = gql` query GetTimelineThreadsFromCompanyId( - $companyId: ID! + $companyId: UUID! $page: Int! $pageSize: Int! ) { diff --git a/packages/twenty-front/src/modules/activities/emails/queries/getTimelineThreadsFromPersonId.ts b/packages/twenty-front/src/modules/activities/emails/queries/getTimelineThreadsFromPersonId.ts index 6bad39f9b6d7..84cd7053791e 100644 --- a/packages/twenty-front/src/modules/activities/emails/queries/getTimelineThreadsFromPersonId.ts +++ b/packages/twenty-front/src/modules/activities/emails/queries/getTimelineThreadsFromPersonId.ts @@ -4,7 +4,7 @@ import { timelineThreadWithTotalFragment } from '@/activities/emails/queries/fra export const getTimelineThreadsFromPersonId = gql` query GetTimelineThreadsFromPersonId( - $personId: ID! + $personId: UUID! $page: Int! $pageSize: Int! ) { diff --git a/packages/twenty-front/src/modules/activities/tasks/hooks/__tests__/useCompleteTask.test.tsx b/packages/twenty-front/src/modules/activities/tasks/hooks/__tests__/useCompleteTask.test.tsx index 88977063542f..2302794caeab 100644 --- a/packages/twenty-front/src/modules/activities/tasks/hooks/__tests__/useCompleteTask.test.tsx +++ b/packages/twenty-front/src/modules/activities/tasks/hooks/__tests__/useCompleteTask.test.tsx @@ -17,7 +17,7 @@ const mocks: MockedResponse[] = [ request: { query: gql` mutation UpdateOneActivity( - $idToUpdate: ID! + $idToUpdate: UUID! $input: ActivityUpdateInput! ) { updateActivity(id: $idToUpdate, data: $input) { diff --git a/packages/twenty-front/src/modules/favorites/hooks/__mocks__/useFavorites.ts b/packages/twenty-front/src/modules/favorites/hooks/__mocks__/useFavorites.ts index 65e6593a9274..d98c0bbc08bf 100644 --- a/packages/twenty-front/src/modules/favorites/hooks/__mocks__/useFavorites.ts +++ b/packages/twenty-front/src/modules/favorites/hooks/__mocks__/useFavorites.ts @@ -177,7 +177,7 @@ export const mocks = [ { request: { query: gql` - mutation DeleteOneFavorite($idToDelete: ID!) { + mutation DeleteOneFavorite($idToDelete: UUID!) { deleteFavorite(id: $idToDelete) { id } @@ -197,7 +197,7 @@ export const mocks = [ request: { query: gql` mutation UpdateOneFavorite( - $idToUpdate: ID! + $idToUpdate: UUID! $input: FavoriteUpdateInput! ) { updateFavorite(id: $idToUpdate, data: $input) { diff --git a/packages/twenty-front/src/modules/object-metadata/graphql/mutations.ts b/packages/twenty-front/src/modules/object-metadata/graphql/mutations.ts index f9ac8b9f56c4..2fce4c3b2a2b 100644 --- a/packages/twenty-front/src/modules/object-metadata/graphql/mutations.ts +++ b/packages/twenty-front/src/modules/object-metadata/graphql/mutations.ts @@ -58,7 +58,7 @@ export const CREATE_ONE_RELATION_METADATA_ITEM = gql` export const UPDATE_ONE_FIELD_METADATA_ITEM = gql` mutation UpdateOneFieldMetadataItem( - $idToUpdate: ID! + $idToUpdate: UUID! $updatePayload: UpdateFieldInput! ) { updateOneField(input: { id: $idToUpdate, update: $updatePayload }) { @@ -79,7 +79,7 @@ export const UPDATE_ONE_FIELD_METADATA_ITEM = gql` export const UPDATE_ONE_OBJECT_METADATA_ITEM = gql` mutation UpdateOneObjectMetadataItem( - $idToUpdate: ID! + $idToUpdate: UUID! $updatePayload: UpdateObjectInput! ) { updateOneObject(input: { id: $idToUpdate, update: $updatePayload }) { @@ -102,7 +102,7 @@ export const UPDATE_ONE_OBJECT_METADATA_ITEM = gql` `; export const DELETE_ONE_OBJECT_METADATA_ITEM = gql` - mutation DeleteOneObjectMetadataItem($idToDelete: ID!) { + mutation DeleteOneObjectMetadataItem($idToDelete: UUID!) { deleteOneObject(input: { id: $idToDelete }) { id dataSourceId @@ -123,7 +123,7 @@ export const DELETE_ONE_OBJECT_METADATA_ITEM = gql` `; export const DELETE_ONE_FIELD_METADATA_ITEM = gql` - mutation DeleteOneFieldMetadataItem($idToDelete: ID!) { + mutation DeleteOneFieldMetadataItem($idToDelete: UUID!) { deleteOneField(input: { id: $idToDelete }) { id type diff --git a/packages/twenty-front/src/modules/object-metadata/hooks/__mocks__/useDeleteOneObjectMetadataItem.ts b/packages/twenty-front/src/modules/object-metadata/hooks/__mocks__/useDeleteOneObjectMetadataItem.ts index 42ca0a9952f8..e7be9105bf9f 100644 --- a/packages/twenty-front/src/modules/object-metadata/hooks/__mocks__/useDeleteOneObjectMetadataItem.ts +++ b/packages/twenty-front/src/modules/object-metadata/hooks/__mocks__/useDeleteOneObjectMetadataItem.ts @@ -1,7 +1,7 @@ import { gql } from '@apollo/client'; export const query = gql` - mutation DeleteOneObjectMetadataItem($idToDelete: ID!) { + mutation DeleteOneObjectMetadataItem($idToDelete: UUID!) { deleteOneObject(input: { id: $idToDelete }) { id dataSourceId diff --git a/packages/twenty-front/src/modules/object-metadata/hooks/__mocks__/useFieldMetadataItem.ts b/packages/twenty-front/src/modules/object-metadata/hooks/__mocks__/useFieldMetadataItem.ts index 66a29db3f7cd..14302051e09e 100644 --- a/packages/twenty-front/src/modules/object-metadata/hooks/__mocks__/useFieldMetadataItem.ts +++ b/packages/twenty-front/src/modules/object-metadata/hooks/__mocks__/useFieldMetadataItem.ts @@ -16,7 +16,7 @@ const baseFields = ` export const queries = { eraseMetadataField: gql` - mutation DeleteOneFieldMetadataItem($idToDelete: ID!) { + mutation DeleteOneFieldMetadataItem($idToDelete: UUID!) { deleteOneField(input: { id: $idToDelete }) { ${baseFields} } @@ -24,7 +24,7 @@ export const queries = { `, activateMetadataField: gql` mutation UpdateOneFieldMetadataItem( - $idToUpdate: ID! + $idToUpdate: UUID! $updatePayload: UpdateFieldInput! ) { updateOneField(input: { id: $idToUpdate, update: $updatePayload }) { diff --git a/packages/twenty-front/src/modules/object-metadata/hooks/__mocks__/useFilteredObjectMetadataItems.ts b/packages/twenty-front/src/modules/object-metadata/hooks/__mocks__/useFilteredObjectMetadataItems.ts index a9b8aadea751..fa99fc04c4d3 100644 --- a/packages/twenty-front/src/modules/object-metadata/hooks/__mocks__/useFilteredObjectMetadataItems.ts +++ b/packages/twenty-front/src/modules/object-metadata/hooks/__mocks__/useFilteredObjectMetadataItems.ts @@ -2,7 +2,7 @@ import { gql } from '@apollo/client'; export const query = gql` mutation UpdateOneObjectMetadataItem( - $idToUpdate: ID! + $idToUpdate: UUID! $updatePayload: UpdateObjectInput! ) { updateOneObject(input: { id: $idToUpdate, update: $updatePayload }) { diff --git a/packages/twenty-front/src/modules/object-record/hooks/__mocks__/useDeleteOneRecord.ts b/packages/twenty-front/src/modules/object-record/hooks/__mocks__/useDeleteOneRecord.ts index f31b210e089b..d0110d92f9d4 100644 --- a/packages/twenty-front/src/modules/object-record/hooks/__mocks__/useDeleteOneRecord.ts +++ b/packages/twenty-front/src/modules/object-record/hooks/__mocks__/useDeleteOneRecord.ts @@ -1,7 +1,7 @@ import { gql } from '@apollo/client'; export const query = gql` - mutation DeleteOnePerson($idToDelete: ID!) { + mutation DeleteOnePerson($idToDelete: UUID!) { deletePerson(id: $idToDelete) { id } diff --git a/packages/twenty-front/src/modules/object-record/hooks/__mocks__/useExecuteQuickActionOnOneRecord.ts b/packages/twenty-front/src/modules/object-record/hooks/__mocks__/useExecuteQuickActionOnOneRecord.ts index 1e9a1b50734a..7f096be5f02a 100644 --- a/packages/twenty-front/src/modules/object-record/hooks/__mocks__/useExecuteQuickActionOnOneRecord.ts +++ b/packages/twenty-front/src/modules/object-record/hooks/__mocks__/useExecuteQuickActionOnOneRecord.ts @@ -3,7 +3,7 @@ import { gql } from '@apollo/client'; export { responseData } from './useUpdateOneRecord'; export const query = gql` - mutation ExecuteQuickActionOnOnePerson($idToExecuteQuickActionOn: ID!) { + mutation ExecuteQuickActionOnOnePerson($idToExecuteQuickActionOn: UUID!) { executeQuickActionOnPerson(id: $idToExecuteQuickActionOn) { __typename xLink { diff --git a/packages/twenty-front/src/modules/object-record/hooks/__mocks__/useUpdateOneRecord.ts b/packages/twenty-front/src/modules/object-record/hooks/__mocks__/useUpdateOneRecord.ts index 46b48e1d0d7f..6b86c1a9f70c 100644 --- a/packages/twenty-front/src/modules/object-record/hooks/__mocks__/useUpdateOneRecord.ts +++ b/packages/twenty-front/src/modules/object-record/hooks/__mocks__/useUpdateOneRecord.ts @@ -1,7 +1,7 @@ import { gql } from '@apollo/client'; export const query = gql` - mutation UpdateOnePerson($idToUpdate: ID!, $input: PersonUpdateInput!) { + mutation UpdateOnePerson($idToUpdate: UUID!, $input: PersonUpdateInput!) { updatePerson(id: $idToUpdate, data: $input) { __typename xLink { diff --git a/packages/twenty-front/src/modules/object-record/hooks/useDeleteOneRecordMutation.ts b/packages/twenty-front/src/modules/object-record/hooks/useDeleteOneRecordMutation.ts index ea8a3d458c77..46dcb9422568 100644 --- a/packages/twenty-front/src/modules/object-record/hooks/useDeleteOneRecordMutation.ts +++ b/packages/twenty-front/src/modules/object-record/hooks/useDeleteOneRecordMutation.ts @@ -26,7 +26,7 @@ export const useDeleteOneRecordMutation = ({ ); const deleteOneRecordMutation = gql` - mutation DeleteOne${capitalizedObjectName}($idToDelete: ID!) { + mutation DeleteOne${capitalizedObjectName}($idToDelete: UUID!) { ${mutationResponseField}(id: $idToDelete) { id } diff --git a/packages/twenty-front/src/modules/object-record/hooks/useExecuteQuickActionOnOneRecordMutation.ts b/packages/twenty-front/src/modules/object-record/hooks/useExecuteQuickActionOnOneRecordMutation.ts index 4785029e819b..38ed43f84c42 100644 --- a/packages/twenty-front/src/modules/object-record/hooks/useExecuteQuickActionOnOneRecordMutation.ts +++ b/packages/twenty-front/src/modules/object-record/hooks/useExecuteQuickActionOnOneRecordMutation.ts @@ -39,7 +39,7 @@ export const useExecuteQuickActionOnOneRecordMutation = ({ }); const executeQuickActionOnOneRecordMutation = gql` - mutation ExecuteQuickActionOnOne${capitalizedObjectName}($idToExecuteQuickActionOn: ID!) { + mutation ExecuteQuickActionOnOne${capitalizedObjectName}($idToExecuteQuickActionOn: UUID!) { ${graphQLFieldForExecuteQuickActionOnOneRecordMutation}(id: $idToExecuteQuickActionOn) ${mapObjectMetadataToGraphQLQuery( { objectMetadataItems, diff --git a/packages/twenty-front/src/modules/object-record/hooks/useFindDuplicatesRecordsQuery.ts b/packages/twenty-front/src/modules/object-record/hooks/useFindDuplicatesRecordsQuery.ts index 12874fd59a55..ae0a89ba7bb2 100644 --- a/packages/twenty-front/src/modules/object-record/hooks/useFindDuplicatesRecordsQuery.ts +++ b/packages/twenty-front/src/modules/object-record/hooks/useFindDuplicatesRecordsQuery.ts @@ -21,7 +21,9 @@ export const useFindDuplicateRecordsQuery = ({ const objectMetadataItems = useRecoilValue(objectMetadataItemsState); const findDuplicateRecordsQuery = gql` - query FindDuplicate${capitalize(objectMetadataItem.nameSingular)}($id: ID) { + query FindDuplicate${capitalize( + objectMetadataItem.nameSingular, + )}($id: UUID) { ${getFindDuplicateRecordsQueryResponseField( objectMetadataItem.nameSingular, )}(id: $id) { diff --git a/packages/twenty-front/src/modules/object-record/hooks/useUpdateOneRecordMutation.ts b/packages/twenty-front/src/modules/object-record/hooks/useUpdateOneRecordMutation.ts index 9067845a76e3..04bf3967375e 100644 --- a/packages/twenty-front/src/modules/object-record/hooks/useUpdateOneRecordMutation.ts +++ b/packages/twenty-front/src/modules/object-record/hooks/useUpdateOneRecordMutation.ts @@ -35,7 +35,7 @@ export const useUpdateOneRecordMutation = ({ ); const updateOneRecordMutation = gql` - mutation UpdateOne${capitalizedObjectName}($idToUpdate: ID!, $input: ${capitalizedObjectName}UpdateInput!) { + mutation UpdateOne${capitalizedObjectName}($idToUpdate: UUID!, $input: ${capitalizedObjectName}UpdateInput!) { ${mutationResponseField}(id: $idToUpdate, data: $input) ${mapObjectMetadataToGraphQLQuery( { objectMetadataItems, diff --git a/packages/twenty-front/src/modules/object-record/record-field/hooks/__tests__/usePersistField.test.tsx b/packages/twenty-front/src/modules/object-record/record-field/hooks/__tests__/usePersistField.test.tsx index 45dd03a21ca5..ff14e362df67 100644 --- a/packages/twenty-front/src/modules/object-record/record-field/hooks/__tests__/usePersistField.test.tsx +++ b/packages/twenty-front/src/modules/object-record/record-field/hooks/__tests__/usePersistField.test.tsx @@ -21,7 +21,7 @@ import { FieldMetadata } from '@/object-record/record-field/types/FieldMetadata' import { recordStoreFamilySelector } from '@/object-record/record-store/states/selectors/recordStoreFamilySelector'; const query = gql` - mutation UpdateOnePerson($idToUpdate: ID!, $input: PersonUpdateInput!) { + mutation UpdateOnePerson($idToUpdate: UUID!, $input: PersonUpdateInput!) { updatePerson(id: $idToUpdate, data: $input) { __typename xLink { diff --git a/packages/twenty-front/src/modules/object-record/record-field/hooks/__tests__/useToggleEditOnlyInput.test.tsx b/packages/twenty-front/src/modules/object-record/record-field/hooks/__tests__/useToggleEditOnlyInput.test.tsx index 3a073219f9b6..0d17aaa11eaa 100644 --- a/packages/twenty-front/src/modules/object-record/record-field/hooks/__tests__/useToggleEditOnlyInput.test.tsx +++ b/packages/twenty-front/src/modules/object-record/record-field/hooks/__tests__/useToggleEditOnlyInput.test.tsx @@ -21,7 +21,7 @@ const mocks: MockedResponse[] = [ request: { query: gql` mutation UpdateOneCompany( - $idToUpdate: ID! + $idToUpdate: UUID! $input: CompanyUpdateInput! ) { updateCompany(id: $idToUpdate, data: $input) { diff --git a/packages/twenty-server/src/engine/api/rest/api-rest-query-builder/factories/delete-query.factory.ts b/packages/twenty-server/src/engine/api/rest/api-rest-query-builder/factories/delete-query.factory.ts index d1f0a497ee95..e3fa74fa99fa 100644 --- a/packages/twenty-server/src/engine/api/rest/api-rest-query-builder/factories/delete-query.factory.ts +++ b/packages/twenty-server/src/engine/api/rest/api-rest-query-builder/factories/delete-query.factory.ts @@ -8,7 +8,7 @@ export class DeleteQueryFactory { const objectNameSingular = capitalize(objectMetadataItem.nameSingular); return ` - mutation Delete${objectNameSingular}($id: ID!) { + mutation Delete${objectNameSingular}($id: UUID!) { delete${objectNameSingular}(id: $id) { id } diff --git a/packages/twenty-server/src/engine/api/rest/api-rest-query-builder/factories/update-query.factory.ts b/packages/twenty-server/src/engine/api/rest/api-rest-query-builder/factories/update-query.factory.ts index e289c94f2284..e2be04b652e7 100644 --- a/packages/twenty-server/src/engine/api/rest/api-rest-query-builder/factories/update-query.factory.ts +++ b/packages/twenty-server/src/engine/api/rest/api-rest-query-builder/factories/update-query.factory.ts @@ -11,7 +11,7 @@ export class UpdateQueryFactory { return ` mutation Update${capitalize( objectNameSingular, - )}($id: ID!, $data: ${capitalize(objectNameSingular)}UpdateInput!) { + )}($id: UUID!, $data: ${capitalize(objectNameSingular)}UpdateInput!) { update${capitalize(objectNameSingular)}(id: $id, data: $data) { id ${objectMetadata.objectMetadataItem.fields diff --git a/packages/twenty-server/src/engine/api/rest/metadata-rest.service.ts b/packages/twenty-server/src/engine/api/rest/metadata-rest.service.ts index 3c6ea223d4ff..f5757dc36970 100644 --- a/packages/twenty-server/src/engine/api/rest/metadata-rest.service.ts +++ b/packages/twenty-server/src/engine/api/rest/metadata-rest.service.ts @@ -181,7 +181,7 @@ export class ApiRestMetadataService { return ` query FindOne${capitalize(objectNameSingular)}( - $id: ID!, + $id: UUID!, ) { ${objectNameSingular}(id: $id) { id diff --git a/packages/twenty-server/src/engine/core-modules/app-token/app-token.entity.ts b/packages/twenty-server/src/engine/core-modules/app-token/app-token.entity.ts index fac71ae00363..546b5f507bad 100644 --- a/packages/twenty-server/src/engine/core-modules/app-token/app-token.entity.ts +++ b/packages/twenty-server/src/engine/core-modules/app-token/app-token.entity.ts @@ -1,4 +1,4 @@ -import { Field, ID, ObjectType } from '@nestjs/graphql'; +import { Field, ObjectType } from '@nestjs/graphql'; import { Entity, @@ -14,6 +14,7 @@ import { BeforeCreateOne, IDField } from '@ptc-org/nestjs-query-graphql'; import { BeforeCreateOneAppToken } from 'src/engine/core-modules/app-token/hooks/before-create-one-app-token.hook'; import { User } from 'src/engine/core-modules/user/user.entity'; import { Workspace } from 'src/engine/core-modules/workspace/workspace.entity'; +import { UUIDScalarType } from 'src/engine/api/graphql/workspace-schema-builder/graphql-types/scalars'; export enum AppTokenType { RefreshToken = 'REFRESH_TOKEN', CodeChallenge = 'CODE_CHALLENGE', @@ -24,7 +25,7 @@ export enum AppTokenType { @ObjectType('AppToken') @BeforeCreateOne(BeforeCreateOneAppToken) export class AppToken { - @IDField(() => ID) + @IDField(() => UUIDScalarType) @PrimaryGeneratedColumn('uuid') id: string; diff --git a/packages/twenty-server/src/engine/core-modules/billing/entities/billing-subscription.entity.ts b/packages/twenty-server/src/engine/core-modules/billing/entities/billing-subscription.entity.ts index c9da318e0c3c..00733fbf6c66 100644 --- a/packages/twenty-server/src/engine/core-modules/billing/entities/billing-subscription.entity.ts +++ b/packages/twenty-server/src/engine/core-modules/billing/entities/billing-subscription.entity.ts @@ -1,4 +1,4 @@ -import { Field, ID, ObjectType } from '@nestjs/graphql'; +import { Field, ObjectType } from '@nestjs/graphql'; import { Column, @@ -15,11 +15,12 @@ import { IDField } from '@ptc-org/nestjs-query-graphql'; import { Workspace } from 'src/engine/core-modules/workspace/workspace.entity'; import { BillingSubscriptionItem } from 'src/engine/core-modules/billing/entities/billing-subscription-item.entity'; +import { UUIDScalarType } from 'src/engine/api/graphql/workspace-schema-builder/graphql-types/scalars'; @Entity({ name: 'billingSubscription', schema: 'core' }) @ObjectType('BillingSubscription') export class BillingSubscription { - @IDField(() => ID) + @IDField(() => UUIDScalarType) @PrimaryGeneratedColumn('uuid') id: string; diff --git a/packages/twenty-server/src/engine/core-modules/calendar/dtos/timeline-calendar-event-participant.dto.ts b/packages/twenty-server/src/engine/core-modules/calendar/dtos/timeline-calendar-event-participant.dto.ts index eecb27198392..1d5d99720899 100644 --- a/packages/twenty-server/src/engine/core-modules/calendar/dtos/timeline-calendar-event-participant.dto.ts +++ b/packages/twenty-server/src/engine/core-modules/calendar/dtos/timeline-calendar-event-participant.dto.ts @@ -1,11 +1,13 @@ -import { ObjectType, Field, ID } from '@nestjs/graphql'; +import { ObjectType, Field } from '@nestjs/graphql'; + +import { UUIDScalarType } from 'src/engine/api/graphql/workspace-schema-builder/graphql-types/scalars'; @ObjectType('TimelineCalendarEventParticipant') export class TimelineCalendarEventParticipant { - @Field(() => ID, { nullable: true }) + @Field(() => UUIDScalarType, { nullable: true }) personId: string; - @Field(() => ID, { nullable: true }) + @Field(() => UUIDScalarType, { nullable: true }) workspaceMemberId: string; @Field() diff --git a/packages/twenty-server/src/engine/core-modules/calendar/dtos/timeline-calendar-event.dto.ts b/packages/twenty-server/src/engine/core-modules/calendar/dtos/timeline-calendar-event.dto.ts index ea692d9aeec7..d175bfdc9dc5 100644 --- a/packages/twenty-server/src/engine/core-modules/calendar/dtos/timeline-calendar-event.dto.ts +++ b/packages/twenty-server/src/engine/core-modules/calendar/dtos/timeline-calendar-event.dto.ts @@ -1,5 +1,6 @@ -import { ObjectType, ID, Field, registerEnumType } from '@nestjs/graphql'; +import { ObjectType, Field, registerEnumType } from '@nestjs/graphql'; +import { UUIDScalarType } from 'src/engine/api/graphql/workspace-schema-builder/graphql-types/scalars'; import { TimelineCalendarEventParticipant } from 'src/engine/core-modules/calendar/dtos/timeline-calendar-event-participant.dto'; export enum TimelineCalendarEventVisibility { @@ -23,7 +24,7 @@ export class LinkMetadata { @ObjectType('TimelineCalendarEvent') export class TimelineCalendarEvent { - @Field(() => ID) + @Field(() => UUIDScalarType) id: string; @Field() diff --git a/packages/twenty-server/src/engine/core-modules/calendar/timeline-calendar-event.resolver.ts b/packages/twenty-server/src/engine/core-modules/calendar/timeline-calendar-event.resolver.ts index 36f88baee32e..3c1fa40fc388 100644 --- a/packages/twenty-server/src/engine/core-modules/calendar/timeline-calendar-event.resolver.ts +++ b/packages/twenty-server/src/engine/core-modules/calendar/timeline-calendar-event.resolver.ts @@ -1,13 +1,5 @@ import { UseGuards } from '@nestjs/common'; -import { - Query, - Args, - ArgsType, - Field, - ID, - Int, - Resolver, -} from '@nestjs/graphql'; +import { Query, Args, ArgsType, Field, Int, Resolver } from '@nestjs/graphql'; import { Max } from 'class-validator'; @@ -21,10 +13,11 @@ import { TimelineCalendarEventService } from 'src/engine/core-modules/calendar/t import { UserService } from 'src/engine/core-modules/user/services/user.service'; import { Workspace } from 'src/engine/core-modules/workspace/workspace.entity'; import { NotFoundError } from 'src/engine/utils/graphql-errors.util'; +import { UUIDScalarType } from 'src/engine/api/graphql/workspace-schema-builder/graphql-types/scalars'; @ArgsType() class GetTimelineCalendarEventsFromPersonIdArgs { - @Field(() => ID) + @Field(() => UUIDScalarType) personId: string; @Field(() => Int) @@ -37,7 +30,7 @@ class GetTimelineCalendarEventsFromPersonIdArgs { @ArgsType() class GetTimelineCalendarEventsFromCompanyIdArgs { - @Field(() => ID) + @Field(() => UUIDScalarType) companyId: string; @Field(() => Int) diff --git a/packages/twenty-server/src/engine/core-modules/feature-flag/feature-flag.entity.ts b/packages/twenty-server/src/engine/core-modules/feature-flag/feature-flag.entity.ts index 8da15d8fcea9..edb83af7c696 100644 --- a/packages/twenty-server/src/engine/core-modules/feature-flag/feature-flag.entity.ts +++ b/packages/twenty-server/src/engine/core-modules/feature-flag/feature-flag.entity.ts @@ -1,4 +1,4 @@ -import { Field, ID, ObjectType } from '@nestjs/graphql'; +import { Field, ObjectType } from '@nestjs/graphql'; import { Entity, @@ -12,6 +12,7 @@ import { import { IDField } from '@ptc-org/nestjs-query-graphql'; import { Workspace } from 'src/engine/core-modules/workspace/workspace.entity'; +import { UUIDScalarType } from 'src/engine/api/graphql/workspace-schema-builder/graphql-types/scalars'; export enum FeatureFlagKeys { IsBlocklistEnabled = 'IS_BLOCKLIST_ENABLED', @@ -26,7 +27,7 @@ export enum FeatureFlagKeys { @ObjectType('FeatureFlag') @Unique('IndexOnKeyAndWorkspaceIdUnique', ['key', 'workspaceId']) export class FeatureFlagEntity { - @IDField(() => ID) + @IDField(() => UUIDScalarType) @PrimaryGeneratedColumn('uuid') id: string; diff --git a/packages/twenty-server/src/engine/core-modules/messaging/dtos/timeline-thread-participant.dto.ts b/packages/twenty-server/src/engine/core-modules/messaging/dtos/timeline-thread-participant.dto.ts index 7d675d968a33..6444474155ad 100644 --- a/packages/twenty-server/src/engine/core-modules/messaging/dtos/timeline-thread-participant.dto.ts +++ b/packages/twenty-server/src/engine/core-modules/messaging/dtos/timeline-thread-participant.dto.ts @@ -1,11 +1,13 @@ -import { ObjectType, Field, ID } from '@nestjs/graphql'; +import { ObjectType, Field } from '@nestjs/graphql'; + +import { UUIDScalarType } from 'src/engine/api/graphql/workspace-schema-builder/graphql-types/scalars'; @ObjectType('TimelineThreadParticipant') export class TimelineThreadParticipant { - @Field(() => ID, { nullable: true }) + @Field(() => UUIDScalarType, { nullable: true }) personId: string; - @Field(() => ID, { nullable: true }) + @Field(() => UUIDScalarType, { nullable: true }) workspaceMemberId: string; @Field() diff --git a/packages/twenty-server/src/engine/core-modules/messaging/dtos/timeline-thread.dto.ts b/packages/twenty-server/src/engine/core-modules/messaging/dtos/timeline-thread.dto.ts index f8b9e881a048..c1a27a014e3c 100644 --- a/packages/twenty-server/src/engine/core-modules/messaging/dtos/timeline-thread.dto.ts +++ b/packages/twenty-server/src/engine/core-modules/messaging/dtos/timeline-thread.dto.ts @@ -1,10 +1,11 @@ -import { ObjectType, Field, ID } from '@nestjs/graphql'; +import { ObjectType, Field } from '@nestjs/graphql'; +import { UUIDScalarType } from 'src/engine/api/graphql/workspace-schema-builder/graphql-types/scalars'; import { TimelineThreadParticipant } from 'src/engine/core-modules/messaging/dtos/timeline-thread-participant.dto'; @ObjectType('TimelineThread') export class TimelineThread { - @Field(() => ID) + @Field(() => UUIDScalarType) id: string; @Field() diff --git a/packages/twenty-server/src/engine/core-modules/messaging/timeline-messaging.resolver.ts b/packages/twenty-server/src/engine/core-modules/messaging/timeline-messaging.resolver.ts index 504951138529..6ed83dc9d215 100644 --- a/packages/twenty-server/src/engine/core-modules/messaging/timeline-messaging.resolver.ts +++ b/packages/twenty-server/src/engine/core-modules/messaging/timeline-messaging.resolver.ts @@ -1,12 +1,4 @@ -import { - Args, - Query, - Resolver, - Int, - ArgsType, - Field, - ID, -} from '@nestjs/graphql'; +import { Args, Query, Resolver, Int, ArgsType, Field } from '@nestjs/graphql'; import { UseGuards } from '@nestjs/common'; import { Max } from 'class-validator'; @@ -20,10 +12,11 @@ import { TimelineThreadsWithTotal } from 'src/engine/core-modules/messaging/dtos import { AuthUser } from 'src/engine/decorators/auth/auth-user.decorator'; import { UserService } from 'src/engine/core-modules/user/services/user.service'; import { User } from 'src/engine/core-modules/user/user.entity'; +import { UUIDScalarType } from 'src/engine/api/graphql/workspace-schema-builder/graphql-types/scalars'; @ArgsType() class GetTimelineThreadsFromPersonIdArgs { - @Field(() => ID) + @Field(() => UUIDScalarType) personId: string; @Field(() => Int) @@ -36,7 +29,7 @@ class GetTimelineThreadsFromPersonIdArgs { @ArgsType() class GetTimelineThreadsFromCompanyIdArgs { - @Field(() => ID) + @Field(() => UUIDScalarType) companyId: string; @Field(() => Int) diff --git a/packages/twenty-server/src/engine/core-modules/user-workspace/user-workspace.entity.ts b/packages/twenty-server/src/engine/core-modules/user-workspace/user-workspace.entity.ts index cd6d184789a9..57d6cc196901 100644 --- a/packages/twenty-server/src/engine/core-modules/user-workspace/user-workspace.entity.ts +++ b/packages/twenty-server/src/engine/core-modules/user-workspace/user-workspace.entity.ts @@ -1,4 +1,4 @@ -import { Field, ID, ObjectType } from '@nestjs/graphql'; +import { Field, ObjectType } from '@nestjs/graphql'; import { IDField } from '@ptc-org/nestjs-query-graphql'; import { @@ -14,12 +14,13 @@ import { import { User } from 'src/engine/core-modules/user/user.entity'; import { Workspace } from 'src/engine/core-modules/workspace/workspace.entity'; +import { UUIDScalarType } from 'src/engine/api/graphql/workspace-schema-builder/graphql-types/scalars'; @Entity({ name: 'userWorkspace', schema: 'core' }) @ObjectType('UserWorkspace') @Unique('IndexOnUserIdAndWorkspaceIdUnique', ['userId', 'workspaceId']) export class UserWorkspace { - @IDField(() => ID) + @IDField(() => UUIDScalarType) @PrimaryGeneratedColumn('uuid') id: string; diff --git a/packages/twenty-server/src/engine/core-modules/user/user.entity.ts b/packages/twenty-server/src/engine/core-modules/user/user.entity.ts index 189881e3b665..ca61cadb9a11 100644 --- a/packages/twenty-server/src/engine/core-modules/user/user.entity.ts +++ b/packages/twenty-server/src/engine/core-modules/user/user.entity.ts @@ -1,4 +1,4 @@ -import { ID, Field, ObjectType } from '@nestjs/graphql'; +import { Field, ObjectType } from '@nestjs/graphql'; import { Entity, @@ -15,11 +15,12 @@ import { AppToken } from 'src/engine/core-modules/app-token/app-token.entity'; import { Workspace } from 'src/engine/core-modules/workspace/workspace.entity'; import { WorkspaceMember } from 'src/engine/core-modules/user/dtos/workspace-member.dto'; import { UserWorkspace } from 'src/engine/core-modules/user-workspace/user-workspace.entity'; +import { UUIDScalarType } from 'src/engine/api/graphql/workspace-schema-builder/graphql-types/scalars'; @Entity({ name: 'user', schema: 'core' }) @ObjectType('User') export class User { - @IDField(() => ID) + @IDField(() => UUIDScalarType) @PrimaryGeneratedColumn('uuid') id: string; diff --git a/packages/twenty-server/src/engine/core-modules/workspace/workspace.entity.ts b/packages/twenty-server/src/engine/core-modules/workspace/workspace.entity.ts index 4aea4e776389..09bd051b82bd 100644 --- a/packages/twenty-server/src/engine/core-modules/workspace/workspace.entity.ts +++ b/packages/twenty-server/src/engine/core-modules/workspace/workspace.entity.ts @@ -1,4 +1,4 @@ -import { Field, ID, ObjectType } from '@nestjs/graphql'; +import { Field, ObjectType } from '@nestjs/graphql'; import { IDField, UnPagedRelation } from '@ptc-org/nestjs-query-graphql'; import { @@ -16,6 +16,7 @@ import { FeatureFlagEntity } from 'src/engine/core-modules/feature-flag/feature- import { BillingSubscription } from 'src/engine/core-modules/billing/entities/billing-subscription.entity'; import { UserWorkspace } from 'src/engine/core-modules/user-workspace/user-workspace.entity'; import { AppToken } from 'src/engine/core-modules/app-token/app-token.entity'; +import { UUIDScalarType } from 'src/engine/api/graphql/workspace-schema-builder/graphql-types/scalars'; @Entity({ name: 'workspace', schema: 'core' }) @ObjectType('Workspace') @@ -24,7 +25,7 @@ import { AppToken } from 'src/engine/core-modules/app-token/app-token.entity'; nullable: true, }) export class Workspace { - @IDField(() => ID) + @IDField(() => UUIDScalarType) @PrimaryGeneratedColumn('uuid') id: string; diff --git a/packages/twenty-server/src/engine/metadata-modules/field-metadata/dtos/delete-field.input.ts b/packages/twenty-server/src/engine/metadata-modules/field-metadata/dtos/delete-field.input.ts index 8a217d769e9a..ab6716a781f6 100644 --- a/packages/twenty-server/src/engine/metadata-modules/field-metadata/dtos/delete-field.input.ts +++ b/packages/twenty-server/src/engine/metadata-modules/field-metadata/dtos/delete-field.input.ts @@ -1,9 +1,13 @@ -import { InputType, ID } from '@nestjs/graphql'; +import { InputType } from '@nestjs/graphql'; import { IDField } from '@ptc-org/nestjs-query-graphql'; +import { UUIDScalarType } from 'src/engine/api/graphql/workspace-schema-builder/graphql-types/scalars'; + @InputType() export class DeleteOneFieldInput { - @IDField(() => ID, { description: 'The id of the field to delete.' }) + @IDField(() => UUIDScalarType, { + description: 'The id of the field to delete.', + }) id!: string; } diff --git a/packages/twenty-server/src/engine/metadata-modules/field-metadata/dtos/field-metadata.dto.ts b/packages/twenty-server/src/engine/metadata-modules/field-metadata/dtos/field-metadata.dto.ts index 97082a5e56a3..6033b30f0801 100644 --- a/packages/twenty-server/src/engine/metadata-modules/field-metadata/dtos/field-metadata.dto.ts +++ b/packages/twenty-server/src/engine/metadata-modules/field-metadata/dtos/field-metadata.dto.ts @@ -1,7 +1,6 @@ import { Field, HideField, - ID, ObjectType, registerEnumType, } from '@nestjs/graphql'; @@ -33,6 +32,7 @@ import { FieldMetadataType } from 'src/engine/metadata-modules/field-metadata/fi import { IsFieldMetadataDefaultValue } from 'src/engine/metadata-modules/field-metadata/validators/is-field-metadata-default-value.validator'; import { IsFieldMetadataOptions } from 'src/engine/metadata-modules/field-metadata/validators/is-field-metadata-options.validator'; import { IsValidMetadataName } from 'src/engine/decorators/metadata/is-valid-metadata-name.decorator'; +import { UUIDScalarType } from 'src/engine/api/graphql/workspace-schema-builder/graphql-types/scalars'; registerEnumType(FieldMetadataType, { name: 'FieldMetadataType', @@ -61,7 +61,7 @@ export class FieldMetadataDTO< > { @IsUUID() @IsNotEmpty() - @IDField(() => ID) + @IDField(() => UUIDScalarType) id: string; @IsEnum(FieldMetadataType) diff --git a/packages/twenty-server/src/engine/metadata-modules/field-metadata/dtos/update-field.input.ts b/packages/twenty-server/src/engine/metadata-modules/field-metadata/dtos/update-field.input.ts index ffa8049a672e..81f2ef8bd13c 100644 --- a/packages/twenty-server/src/engine/metadata-modules/field-metadata/dtos/update-field.input.ts +++ b/packages/twenty-server/src/engine/metadata-modules/field-metadata/dtos/update-field.input.ts @@ -1,7 +1,6 @@ import { Field, HideField, - ID, InputType, OmitType, PartialType, @@ -10,6 +9,7 @@ import { import { Type } from 'class-transformer'; import { IsNotEmpty, IsUUID, ValidateNested } from 'class-validator'; +import { UUIDScalarType } from 'src/engine/api/graphql/workspace-schema-builder/graphql-types/scalars'; import { FieldMetadataDTO } from 'src/engine/metadata-modules/field-metadata/dtos/field-metadata.dto'; @InputType() @@ -28,7 +28,9 @@ export class UpdateFieldInput extends OmitType( export class UpdateOneFieldMetadataInput { @IsUUID() @IsNotEmpty() - @Field(() => ID, { description: 'The id of the record to update' }) + @Field(() => UUIDScalarType, { + description: 'The id of the record to update', + }) id!: string; @Type(() => UpdateFieldInput) diff --git a/packages/twenty-server/src/engine/metadata-modules/object-metadata/dtos/delete-object.input.ts b/packages/twenty-server/src/engine/metadata-modules/object-metadata/dtos/delete-object.input.ts index 578f63b320f9..7e10cd638f5e 100644 --- a/packages/twenty-server/src/engine/metadata-modules/object-metadata/dtos/delete-object.input.ts +++ b/packages/twenty-server/src/engine/metadata-modules/object-metadata/dtos/delete-object.input.ts @@ -1,12 +1,15 @@ -import { ID, InputType } from '@nestjs/graphql'; +import { InputType } from '@nestjs/graphql'; import { BeforeDeleteOne, IDField } from '@ptc-org/nestjs-query-graphql'; +import { UUIDScalarType } from 'src/engine/api/graphql/workspace-schema-builder/graphql-types/scalars'; import { BeforeDeleteOneObject } from 'src/engine/metadata-modules/object-metadata/hooks/before-delete-one-object.hook'; @InputType() @BeforeDeleteOne(BeforeDeleteOneObject) export class DeleteOneObjectInput { - @IDField(() => ID, { description: 'The id of the record to delete.' }) + @IDField(() => UUIDScalarType, { + description: 'The id of the record to delete.', + }) id!: string; } diff --git a/packages/twenty-server/src/engine/metadata-modules/object-metadata/dtos/object-metadata.dto.ts b/packages/twenty-server/src/engine/metadata-modules/object-metadata/dtos/object-metadata.dto.ts index 15804368af6d..425aebbe2d11 100644 --- a/packages/twenty-server/src/engine/metadata-modules/object-metadata/dtos/object-metadata.dto.ts +++ b/packages/twenty-server/src/engine/metadata-modules/object-metadata/dtos/object-metadata.dto.ts @@ -1,4 +1,4 @@ -import { ObjectType, ID, Field, HideField } from '@nestjs/graphql'; +import { ObjectType, Field, HideField } from '@nestjs/graphql'; import { Authorize, @@ -9,6 +9,7 @@ import { QueryOptions, } from '@ptc-org/nestjs-query-graphql'; +import { UUIDScalarType } from 'src/engine/api/graphql/workspace-schema-builder/graphql-types/scalars'; import { FieldMetadataDTO } from 'src/engine/metadata-modules/field-metadata/dtos/field-metadata.dto'; import { BeforeDeleteOneObject } from 'src/engine/metadata-modules/object-metadata/hooks/before-delete-one-object.hook'; @@ -26,7 +27,7 @@ import { BeforeDeleteOneObject } from 'src/engine/metadata-modules/object-metada @BeforeDeleteOne(BeforeDeleteOneObject) @CursorConnection('fields', () => FieldMetadataDTO) export class ObjectMetadataDTO { - @IDField(() => ID) + @IDField(() => UUIDScalarType) id: string; @Field() diff --git a/packages/twenty-server/src/engine/metadata-modules/relation-metadata/dtos/relation-metadata.dto.ts b/packages/twenty-server/src/engine/metadata-modules/relation-metadata/dtos/relation-metadata.dto.ts index 9e58d94865bb..b7d04156176e 100644 --- a/packages/twenty-server/src/engine/metadata-modules/relation-metadata/dtos/relation-metadata.dto.ts +++ b/packages/twenty-server/src/engine/metadata-modules/relation-metadata/dtos/relation-metadata.dto.ts @@ -1,6 +1,5 @@ import { ObjectType, - ID, Field, HideField, registerEnumType, @@ -18,6 +17,7 @@ import { import { ObjectMetadataDTO } from 'src/engine/metadata-modules/object-metadata/dtos/object-metadata.dto'; import { RelationMetadataType } from 'src/engine/metadata-modules/relation-metadata/relation-metadata.entity'; import { BeforeDeleteOneRelation } from 'src/engine/metadata-modules/relation-metadata/hooks/before-delete-one-relation.hook'; +import { UUIDScalarType } from 'src/engine/api/graphql/workspace-schema-builder/graphql-types/scalars'; registerEnumType(RelationMetadataType, { name: 'RelationMetadataType', @@ -40,7 +40,7 @@ registerEnumType(RelationMetadataType, { @Relation('fromObjectMetadata', () => ObjectMetadataDTO) @Relation('toObjectMetadata', () => ObjectMetadataDTO) export class RelationMetadataDTO { - @IDField(() => ID) + @IDField(() => UUIDScalarType) id: string; @Field(() => RelationMetadataType)