463ce43442
closes https://github.com/twentyhq/core-team-issues/issues/2180 https://github.com/user-attachments/assets/a898455d-eb1c-4d22-b585-785e98fc38a7
69 lines
1.3 KiB
TypeScript
69 lines
1.3 KiB
TypeScript
import { Field, HideField, ObjectType } from '@nestjs/graphql';
|
|
|
|
import {
|
|
IsDateString,
|
|
IsNotEmpty,
|
|
IsOptional,
|
|
IsString,
|
|
IsUUID,
|
|
} from 'class-validator';
|
|
|
|
import { UUIDScalarType } from 'src/engine/api/graphql/workspace-schema-builder/graphql-types/scalars';
|
|
import { ApplicationTokenPairDTO } from 'src/engine/core-modules/application/dtos/application-token-pair.dto';
|
|
|
|
@ObjectType('FrontComponent')
|
|
export class FrontComponentDTO {
|
|
@IsUUID()
|
|
@IsNotEmpty()
|
|
@Field(() => UUIDScalarType)
|
|
id: string;
|
|
|
|
@IsString()
|
|
@Field()
|
|
name: string;
|
|
|
|
@IsString()
|
|
@IsOptional()
|
|
@Field({ nullable: true })
|
|
description?: string;
|
|
|
|
@IsString()
|
|
@Field()
|
|
sourceComponentPath: string;
|
|
|
|
@IsString()
|
|
@Field()
|
|
builtComponentPath: string;
|
|
|
|
@IsString()
|
|
@Field()
|
|
componentName: string;
|
|
|
|
@IsString()
|
|
@IsNotEmpty()
|
|
@Field()
|
|
builtComponentChecksum: string;
|
|
|
|
@IsUUID()
|
|
@IsOptional()
|
|
@Field(() => UUIDScalarType, { nullable: true })
|
|
universalIdentifier?: string;
|
|
|
|
@HideField()
|
|
workspaceId: string;
|
|
|
|
@Field(() => UUIDScalarType)
|
|
applicationId: string;
|
|
|
|
@IsDateString()
|
|
@Field()
|
|
createdAt: Date;
|
|
|
|
@IsDateString()
|
|
@Field()
|
|
updatedAt: Date;
|
|
|
|
@Field(() => ApplicationTokenPairDTO, { nullable: true })
|
|
applicationTokenPair?: ApplicationTokenPairDTO;
|
|
}
|