From b2fac7b77e5dbbf5d7990a3da2ce410c451c0871 Mon Sep 17 00:00:00 2001 From: Marie Stoppa Date: Wed, 8 Jan 2025 12:12:29 +0100 Subject: [PATCH 1/2] Remove identifierFieldMetadataId from createObjectInput --- .../dtos/create-object.input.ts | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/packages/twenty-server/src/engine/metadata-modules/object-metadata/dtos/create-object.input.ts b/packages/twenty-server/src/engine/metadata-modules/object-metadata/dtos/create-object.input.ts index 005ae71a05e2..e6b953c7caf8 100644 --- a/packages/twenty-server/src/engine/metadata-modules/object-metadata/dtos/create-object.input.ts +++ b/packages/twenty-server/src/engine/metadata-modules/object-metadata/dtos/create-object.input.ts @@ -1,13 +1,7 @@ import { Field, HideField, InputType } from '@nestjs/graphql'; import { BeforeCreateOne } from '@ptc-org/nestjs-query-graphql'; -import { - IsBoolean, - IsNotEmpty, - IsOptional, - IsString, - IsUUID, -} from 'class-validator'; +import { IsBoolean, IsNotEmpty, IsOptional, IsString } from 'class-validator'; import GraphQLJSON from 'graphql-type-json'; import { FieldMetadataSettings } from 'src/engine/metadata-modules/field-metadata/interfaces/field-metadata-settings.interface'; @@ -62,16 +56,6 @@ export class CreateObjectInput { @HideField() workspaceId: string; - @IsUUID() - @IsOptional() - @Field({ nullable: true }) - labelIdentifierFieldMetadataId?: string; - - @IsUUID() - @IsOptional() - @Field({ nullable: true }) - imageIdentifierFieldMetadataId?: string; - @IsBoolean() @IsOptional() @Field({ nullable: true }) From 0d608cc35759c695ad52513822aca60aeee0ddd5 Mon Sep 17 00:00:00 2001 From: Marie Stoppa Date: Wed, 8 Jan 2025 14:59:04 +0100 Subject: [PATCH 2/2] update generated-metadata --- .../src/generated-metadata/graphql.ts | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/packages/twenty-front/src/generated-metadata/graphql.ts b/packages/twenty-front/src/generated-metadata/graphql.ts index 417a5c9696d1..5d4ba1c77128 100644 --- a/packages/twenty-front/src/generated-metadata/graphql.ts +++ b/packages/twenty-front/src/generated-metadata/graphql.ts @@ -199,6 +199,13 @@ export type CreateAppTokenInput = { expiresAt: Scalars['DateTime']['input']; }; +export type CreateDraftFromWorkflowVersionInput = { + /** Workflow ID */ + workflowId: Scalars['String']['input']; + /** Workflow version ID */ + workflowVersionIdToCopy: Scalars['String']['input']; +}; + export type CreateFieldInput = { defaultValue?: InputMaybe; description?: InputMaybe; @@ -221,10 +228,8 @@ export type CreateFieldInput = { export type CreateObjectInput = { description?: InputMaybe; icon?: InputMaybe; - imageIdentifierFieldMetadataId?: InputMaybe; isLabelSyncedWithName?: InputMaybe; isRemote?: InputMaybe; - labelIdentifierFieldMetadataId?: InputMaybe; labelPlural: Scalars['String']['input']; labelSingular: Scalars['String']['input']; namePlural: Scalars['String']['input']; @@ -579,6 +584,7 @@ export type Mutation = { challenge: LoginToken; checkoutSession: SessionEntity; computeStepOutputSchema: Scalars['JSON']['output']; + createDraftFromWorkflowVersion: Scalars['Boolean']['output']; createOIDCIdentityProvider: SetupSsoOutput; createOneAppToken: AppToken; createOneField: Field; @@ -685,6 +691,11 @@ export type MutationComputeStepOutputSchemaArgs = { }; +export type MutationCreateDraftFromWorkflowVersionArgs = { + input: CreateDraftFromWorkflowVersionInput; +}; + + export type MutationCreateOidcIdentityProviderArgs = { input: SetupOidcSsoInput; };