twenty / packages /twenty-server /src /engine /metadata-modules /logic-function /dtos /logic-function-source.input.ts
Jules
Initial clean CRM deployment with prebuilt assets
d9494a5
Raw
History Blame Contribute Delete
530 Bytes
import { Field, InputType } from '@nestjs/graphql';
import { IsString, Matches } from 'class-validator';
import { HANDLER_NAME_REGEX } from 'src/engine/metadata-modules/logic-function/constants/handler.contant';
@InputType()
export class LogicFunctionSourceInput {
@IsString()
@Field({ nullable: false })
sourceHandlerCode: string;
@IsString()
@Matches(HANDLER_NAME_REGEX, {
message: 'handlerName must be a valid JavaScript identifier or dotted path',
})
@Field({ nullable: false })
handlerName: string;
}