- add test button to workflow code step - add test tab to workflow code step https://github.com/user-attachments/assets/e180a827-7321-49a2-8026-88490c557da2  
63 lines
1.4 KiB
TypeScript
63 lines
1.4 KiB
TypeScript
import {
|
|
Column,
|
|
CreateDateColumn,
|
|
Entity,
|
|
PrimaryGeneratedColumn,
|
|
UpdateDateColumn,
|
|
} from 'typeorm';
|
|
|
|
import { InputSchema } from 'src/modules/workflow/workflow-builder/types/input-schema.type';
|
|
|
|
export enum ServerlessFunctionSyncStatus {
|
|
NOT_READY = 'NOT_READY',
|
|
READY = 'READY',
|
|
}
|
|
|
|
export enum ServerlessFunctionRuntime {
|
|
NODE18 = 'nodejs18.x',
|
|
}
|
|
|
|
@Entity('serverlessFunction')
|
|
export class ServerlessFunctionEntity {
|
|
@PrimaryGeneratedColumn('uuid')
|
|
id: string;
|
|
|
|
@Column({ nullable: false })
|
|
name: string;
|
|
|
|
@Column({ nullable: true })
|
|
description: string;
|
|
|
|
@Column({ nullable: true })
|
|
latestVersion: string;
|
|
|
|
@Column({ nullable: false, type: 'jsonb', default: [] })
|
|
publishedVersions: string[];
|
|
|
|
@Column({ nullable: true, type: 'jsonb' })
|
|
latestVersionInputSchema: InputSchema;
|
|
|
|
@Column({ nullable: false, default: ServerlessFunctionRuntime.NODE18 })
|
|
runtime: ServerlessFunctionRuntime;
|
|
|
|
@Column({ nullable: true })
|
|
layerVersion: number;
|
|
|
|
@Column({
|
|
nullable: false,
|
|
default: ServerlessFunctionSyncStatus.NOT_READY,
|
|
type: 'enum',
|
|
enum: ServerlessFunctionSyncStatus,
|
|
})
|
|
syncStatus: ServerlessFunctionSyncStatus;
|
|
|
|
@Column({ nullable: false, type: 'uuid' })
|
|
workspaceId: string;
|
|
|
|
@CreateDateColumn({ type: 'timestamptz' })
|
|
createdAt: Date;
|
|
|
|
@UpdateDateColumn({ type: 'timestamptz' })
|
|
updatedAt: Date;
|
|
}
|