twenty / packages /twenty-server /src /engine /metadata-modules /front-component /dtos /update-front-component.input.ts
Jules
Initial clean CRM deployment with prebuilt assets
d9494a5
Raw
History Blame Contribute Delete
1.04 kB
import { Field, HideField, InputType } from '@nestjs/graphql';
import { Type } from 'class-transformer';
import {
IsNotEmpty,
IsOptional,
IsString,
IsUUID,
ValidateNested,
} from 'class-validator';
import { UUIDScalarType } from 'src/engine/api/graphql/workspace-schema-builder/graphql-types/scalars';
@InputType()
export class UpdateFrontComponentInputUpdates {
@IsOptional()
@IsString()
@Field({ nullable: true })
name?: string;
@IsOptional()
@IsString()
@Field({ nullable: true })
description?: string;
@IsOptional()
@IsString()
@HideField()
builtComponentChecksum?: string;
}
@InputType()
export class UpdateFrontComponentInput {
@IsUUID()
@IsNotEmpty()
@Field(() => UUIDScalarType, {
description: 'The id of the front component to update',
})
id: string;
@Type(() => UpdateFrontComponentInputUpdates)
@ValidateNested()
@Field(() => UpdateFrontComponentInputUpdates, {
description: 'The front component fields to update',
})
update: UpdateFrontComponentInputUpdates;
}