UNPKG

@ply-ct/ply

Version:

REST API Automated Testing

101 lines (100 loc) 2.44 kB
export interface Flow { type: 'flow'; id?: string; path: string; attributes?: { [key: string]: string; }; readonly?: boolean; steps?: Step[]; subflows?: Subflow[]; variables?: { [key: string]: { type: 'string' | 'boolean' | 'number' | 'Date' | 'object'; }; }; } export interface Step { id: string; name: string; /** * Logical path for descriptor, or for custom steps * this is the module path to ts file. */ path: string; attributes?: { [key: string]: string; }; type: 'step'; links?: Link[]; } export interface Link { id: string; to: string; attributes?: { [key: string]: string; }; type: 'link'; event?: 'Finish' | 'Error' | 'Cancel' | 'Delay' | 'Resume'; result?: string; } export interface Subflow { id: string; name: string; steps?: Step[]; attributes?: { [key: string]: string; }; type: 'subflow'; } export declare type FlowElementStatus = 'Pending' | 'In Progress' | 'Waiting' | 'Failed' | 'Errored' | 'Completed' | 'Canceled'; export declare type Values = { [key: string]: string | boolean | number | Date | object; }; export interface FlowInstance { id: string; runId?: string; flowPath: string; status: FlowElementStatus; stepInstances?: StepInstance[]; subflowInstances?: SubflowInstance[]; values?: { [key: string]: string | boolean | number | Date | object; }; start?: Date; end?: Date; data?: any; } export interface StepInstance { id: string; flowInstanceId: string; stepId: string; status: FlowElementStatus; message?: string; result?: string; start?: Date; end?: Date; data?: any; } export interface SubflowInstance { id: string; flowInstanceId: string; subflowId: string; status: FlowElementStatus; stepInstances?: StepInstance[]; start?: Date; end?: Date; } export declare type FlowEventType = 'start' | 'exec' | 'finish' | 'error'; export declare type FlowElementType = 'flow' | 'step' | 'link' | 'subflow' | 'note'; export interface FlowEvent { eventType: FlowEventType; elementType: FlowElementType; flowPath: string; flowInstanceId: string; instance: FlowInstance | SubflowInstance | StepInstance; } /** * Without path */ export declare const getFlowName: (flow: Flow) => string;