Spaces:
Build error
Build error
File size: 2,269 Bytes
d9494a5 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 | import { Field, Float, InputType } from '@nestjs/graphql';
import {
IsBoolean,
IsEnum,
IsNotEmpty,
IsNumber,
IsObject,
IsOptional,
IsString,
IsUUID,
} from 'class-validator';
import GraphQLJSON from 'graphql-type-json';
import { UUIDScalarType } from 'src/engine/api/graphql/workspace-schema-builder/graphql-types/scalars';
import { type CommandMenuItemPayload } from 'src/engine/metadata-modules/command-menu-item/dtos/command-menu-item-payload.union';
import { CommandMenuItemAvailabilityType } from 'src/engine/metadata-modules/command-menu-item/enums/command-menu-item-availability-type.enum';
import { EngineComponentKey } from 'src/engine/metadata-modules/command-menu-item/enums/engine-component-key.enum';
@InputType()
export class CreateCommandMenuItemInput {
@IsUUID()
@IsOptional()
@Field(() => UUIDScalarType, { nullable: true })
workflowVersionId?: string;
@IsUUID()
@IsOptional()
@Field(() => UUIDScalarType, { nullable: true })
frontComponentId?: string;
@IsEnum(EngineComponentKey)
@IsNotEmpty()
@Field(() => EngineComponentKey)
engineComponentKey: EngineComponentKey;
@IsString()
@IsNotEmpty()
@Field()
label: string;
@IsString()
@IsOptional()
@Field({ nullable: true })
icon?: string;
@IsString()
@IsOptional()
@Field({ nullable: true })
shortLabel?: string;
@IsNumber()
@IsOptional()
@Field(() => Float, { nullable: true })
position?: number;
@IsBoolean()
@IsOptional()
@Field({ nullable: true })
isPinned?: boolean;
@IsEnum(CommandMenuItemAvailabilityType)
@IsOptional()
@Field(() => CommandMenuItemAvailabilityType, { nullable: true })
availabilityType?: CommandMenuItemAvailabilityType;
@IsString({ each: true })
@IsOptional()
@Field(() => [String], { nullable: true })
hotKeys?: string[];
@IsString()
@IsOptional()
@Field({ nullable: true })
conditionalAvailabilityExpression?: string;
@IsUUID()
@IsOptional()
@Field(() => UUIDScalarType, { nullable: true })
availabilityObjectMetadataId?: string;
@IsObject()
@IsOptional()
@Field(() => GraphQLJSON, { nullable: true })
payload?: CommandMenuItemPayload;
@IsUUID()
@IsOptional()
@Field(() => UUIDScalarType, { nullable: true })
pageLayoutId?: string;
}
|