Infer function input in workflow step (#8308)
- add `inputSchema` column in serverless function. This is an array of parameters, with their name and type - on serverless function id update, get the `inputSchema` + store empty settings in step - from step settings, build the form TODO in next PR: - use field type to decide what kind of form should be printed - have a strategy to handle object as input https://github.com/user-attachments/assets/ed96f919-24b5-4baf-a051-31f76f45e575
This commit is contained in:
@ -0,0 +1,14 @@
|
||||
import { Field, ObjectType } from '@nestjs/graphql';
|
||||
|
||||
import { IsString } from 'class-validator';
|
||||
|
||||
@ObjectType()
|
||||
export class FunctionParameter {
|
||||
@IsString()
|
||||
@Field(() => String)
|
||||
name: string;
|
||||
|
||||
@IsString()
|
||||
@Field(() => String)
|
||||
type: string;
|
||||
}
|
||||
@ -20,6 +20,7 @@ import {
|
||||
} from 'class-validator';
|
||||
|
||||
import { UUIDScalarType } from 'src/engine/api/graphql/workspace-schema-builder/graphql-types/scalars';
|
||||
import { FunctionParameter } from 'src/engine/metadata-modules/serverless-function/dtos/function-parameter.dto';
|
||||
import { ServerlessFunctionSyncStatus } from 'src/engine/metadata-modules/serverless-function/serverless-function.entity';
|
||||
|
||||
registerEnumType(ServerlessFunctionSyncStatus, {
|
||||
@ -64,6 +65,10 @@ export class ServerlessFunctionDTO {
|
||||
@Field(() => [String], { nullable: false })
|
||||
publishedVersions: string[];
|
||||
|
||||
@IsArray()
|
||||
@Field(() => [FunctionParameter], { nullable: true })
|
||||
latestVersionInputSchema: FunctionParameter[] | null;
|
||||
|
||||
@IsEnum(ServerlessFunctionSyncStatus)
|
||||
@IsNotEmpty()
|
||||
@Field(() => ServerlessFunctionSyncStatus)
|
||||
|
||||
Reference in New Issue
Block a user