5fc4e810f7
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
38 lines
866 B
TypeScript
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;
|
|
}
|