Files
twenty/packages/twenty-server/src/engine/metadata-modules/front-component/dtos/update-front-component.input.ts
T
Charles Bochet 5fc4e810f7 Front Extensibility: Introduce Front Component Entity (#17175)
As part of the extensibility effort, we are introducing a new engine
entity called "Front Component". This represents a dynamic react
component that will be rendered in CommandMenu actions or in PageLayout
widgets

This PR introduce the entity and all the necessary boilerplate to make
it syncable and cachable in the engine
2026-01-16 17:23:46 +01:00

38 lines
866 B
TypeScript

import { Field, 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;
}
@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;
}