-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathtypes.ts
More file actions
41 lines (34 loc) · 1016 Bytes
/
types.ts
File metadata and controls
41 lines (34 loc) · 1016 Bytes
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
// the executionPLan for the CLI is a bit differnt to the runtime's perspective
import { Trigger, UUID, WorkflowOptions } from '@openfn/lexicon';
// Ie config can be a string
export type JobNodeID = string;
export type OldCLIWorkflow = {
id?: string; // UUID for this plan
start?: JobNodeID;
jobs: CLIJobNode[];
};
export type CLIExecutionPlan = {
id?: string;
options?: WorkflowOptions;
workflow: {
id?: UUID;
name?: string;
steps: Array<CLIJobNode | Trigger>;
globals?: string;
};
};
export type CLIJobNode = {
id?: string;
expression?: string; // path or expression
configuration?: string | object; // path or credential object
data?: any;
next?: string | Record<JobNodeID, true | CLIJobEdge>;
// We can accept a single adaptor or multiple
// The CLI will convert it to adaptors as an array
adaptor?: string;
adaptors?: string[];
};
export type CLIJobEdge = {
condition?: string; // Javascript expression (function body, not function)
label?: string;
};