@dcupl/common 1.9.4 → 1.10.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/common.umd.js +1 -1
- package/dist/browser/common.umd.js.map +1 -1
- package/dist/esm/types/index.d.ts +0 -4
- package/dist/esm/types/index.js +0 -4
- package/dist/esm/types/index.js.map +1 -1
- package/dist/node/index.cjs.js +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/dist/esm/types/api/file.types.d.ts +0 -56
- package/dist/esm/types/api/file.types.js +0 -2
- package/dist/esm/types/api/file.types.js.map +0 -1
- package/dist/esm/types/rest-api/rest-api.types.d.ts +0 -119
- package/dist/esm/types/rest-api/rest-api.types.js +0 -2
- package/dist/esm/types/rest-api/rest-api.types.js.map +0 -1
- package/dist/esm/types/runner/runner.types.d.ts +0 -22
- package/dist/esm/types/runner/runner.types.js +0 -2
- package/dist/esm/types/runner/runner.types.js.map +0 -1
- package/dist/esm/types/workflow/index.d.ts +0 -1
- package/dist/esm/types/workflow/index.js +0 -2
- package/dist/esm/types/workflow/index.js.map +0 -1
- package/dist/esm/types/workflow/steps/data-mapper.types.d.ts +0 -27
- package/dist/esm/types/workflow/steps/data-mapper.types.js +0 -2
- package/dist/esm/types/workflow/steps/data-mapper.types.js.map +0 -1
- package/dist/esm/types/workflow/steps/dcupl-files.types.d.ts +0 -52
- package/dist/esm/types/workflow/steps/dcupl-files.types.js +0 -2
- package/dist/esm/types/workflow/steps/dcupl-files.types.js.map +0 -1
- package/dist/esm/types/workflow/steps/git-files.types.d.ts +0 -62
- package/dist/esm/types/workflow/steps/git-files.types.js +0 -2
- package/dist/esm/types/workflow/steps/git-files.types.js.map +0 -1
- package/dist/esm/types/workflow/steps/instance.types.d.ts +0 -23
- package/dist/esm/types/workflow/steps/instance.types.js +0 -2
- package/dist/esm/types/workflow/steps/instance.types.js.map +0 -1
- package/dist/esm/types/workflow/steps/request.types.d.ts +0 -21
- package/dist/esm/types/workflow/steps/request.types.js +0 -2
- package/dist/esm/types/workflow/steps/request.types.js.map +0 -1
- package/dist/esm/types/workflow/steps/s3-files.types.d.ts +0 -54
- package/dist/esm/types/workflow/steps/s3-files.types.js +0 -2
- package/dist/esm/types/workflow/steps/s3-files.types.js.map +0 -1
- package/dist/esm/types/workflow/steps/script.types.d.ts +0 -11
- package/dist/esm/types/workflow/steps/script.types.js +0 -2
- package/dist/esm/types/workflow/steps/script.types.js.map +0 -1
- package/dist/esm/types/workflow/workflow.types.d.ts +0 -283
- package/dist/esm/types/workflow/workflow.types.js +0 -4
- package/dist/esm/types/workflow/workflow.types.js.map +0 -1
|
@@ -1,283 +0,0 @@
|
|
|
1
|
-
import { _WorkflowStepDcuplFiles } from './steps/dcupl-files.types';
|
|
2
|
-
import { _WorkflowStepS3Files } from './steps/s3-files.types';
|
|
3
|
-
import { _WorkflowStepGitFiles } from './steps/git-files.types';
|
|
4
|
-
import { _WorkflowStepScript } from './steps/script.types';
|
|
5
|
-
import { _WorkflowStepRequest } from './steps/request.types';
|
|
6
|
-
import { _WorkflowStepInstance } from './steps/instance.types';
|
|
7
|
-
import { _WorkflowStepDataMapper } from './steps/data-mapper.types';
|
|
8
|
-
export declare namespace Workflow {
|
|
9
|
-
type Template = {
|
|
10
|
-
key: string;
|
|
11
|
-
config: WorkflowConfig;
|
|
12
|
-
auth?: WorkflowAuth[];
|
|
13
|
-
name?: string;
|
|
14
|
-
description?: string;
|
|
15
|
-
version?: string;
|
|
16
|
-
variables?: Record<string, string>;
|
|
17
|
-
};
|
|
18
|
-
type WorkflowAuth = {
|
|
19
|
-
type: 'api-key';
|
|
20
|
-
value: string;
|
|
21
|
-
};
|
|
22
|
-
/**
|
|
23
|
-
*
|
|
24
|
-
* Response
|
|
25
|
-
*
|
|
26
|
-
*/
|
|
27
|
-
type WorkflowResponseType = 'script' | 'status' | 'debug';
|
|
28
|
-
type WorkflowResponseConfigBase = {
|
|
29
|
-
type: WorkflowResponseType;
|
|
30
|
-
};
|
|
31
|
-
type WorkflowResponseScript = WorkflowResponseConfigBase & {
|
|
32
|
-
type: 'script';
|
|
33
|
-
options: {
|
|
34
|
-
script: string;
|
|
35
|
-
headers?: Record<string, string>;
|
|
36
|
-
};
|
|
37
|
-
};
|
|
38
|
-
type WorkflowResponseStatus = WorkflowResponseConfigBase & {
|
|
39
|
-
type: 'status';
|
|
40
|
-
};
|
|
41
|
-
type WorkflowResponseDebug = WorkflowResponseConfigBase & {
|
|
42
|
-
type: 'debug';
|
|
43
|
-
};
|
|
44
|
-
type WorkflowResponseConfig = WorkflowResponseScript | WorkflowResponseStatus | WorkflowResponseDebug;
|
|
45
|
-
type WorkflowConfig = {
|
|
46
|
-
trigger: Trigger[];
|
|
47
|
-
steps: WorkflowStep[];
|
|
48
|
-
catch?: WorkflowStep;
|
|
49
|
-
response: WorkflowResponseConfig;
|
|
50
|
-
};
|
|
51
|
-
/**
|
|
52
|
-
*
|
|
53
|
-
* Trigger
|
|
54
|
-
*
|
|
55
|
-
*/
|
|
56
|
-
type TriggerType = 'request' | 'manual' | 'cron';
|
|
57
|
-
type TriggerBase = {
|
|
58
|
-
key: string;
|
|
59
|
-
type: TriggerType;
|
|
60
|
-
};
|
|
61
|
-
type TriggerRequestMethod = 'GET' | 'POST';
|
|
62
|
-
type TriggerRequest = TriggerBase & {
|
|
63
|
-
type: 'request';
|
|
64
|
-
path: string;
|
|
65
|
-
methods: TriggerRequestMethod[];
|
|
66
|
-
};
|
|
67
|
-
type TriggerManual = TriggerBase & {
|
|
68
|
-
type: 'manual';
|
|
69
|
-
};
|
|
70
|
-
type TriggerCron = TriggerBase & {
|
|
71
|
-
type: 'cron';
|
|
72
|
-
/**
|
|
73
|
-
* Cron expression
|
|
74
|
-
* second 0-59
|
|
75
|
-
* minute 0-59
|
|
76
|
-
* hour 0-23
|
|
77
|
-
* day of month 1-31
|
|
78
|
-
* month 1-12 (or names, see below)
|
|
79
|
-
* day of week 0-7 (0 or 7 is Sunday, or use names)
|
|
80
|
-
*
|
|
81
|
-
* @example '0 0 1 * *' // every day at 1am
|
|
82
|
-
* @example \*\/5 * * * * *' -> star slash 5 means every 5 seconds
|
|
83
|
-
*/
|
|
84
|
-
cronTime: string;
|
|
85
|
-
timezone?: string;
|
|
86
|
-
};
|
|
87
|
-
type Trigger = TriggerRequest | TriggerManual | TriggerCron;
|
|
88
|
-
/**
|
|
89
|
-
*
|
|
90
|
-
* Step
|
|
91
|
-
*
|
|
92
|
-
*/
|
|
93
|
-
type WorflowStepType = 'request' | 'script' | 'git-files' | 'dcupl-files' | 's3-files' | 'data-mapper' | 'dcupl-instance';
|
|
94
|
-
type WorkflowStepBase = {
|
|
95
|
-
key: string;
|
|
96
|
-
name?: string;
|
|
97
|
-
description?: string;
|
|
98
|
-
skip?: boolean;
|
|
99
|
-
};
|
|
100
|
-
/**
|
|
101
|
-
* Dcupl Instance
|
|
102
|
-
*/
|
|
103
|
-
export import StepDcuplFiles = _WorkflowStepDcuplFiles;
|
|
104
|
-
export import StepS3Files = _WorkflowStepS3Files;
|
|
105
|
-
export import StepGitFiles = _WorkflowStepGitFiles;
|
|
106
|
-
export import StepScript = _WorkflowStepScript;
|
|
107
|
-
export import StepRequest = _WorkflowStepRequest;
|
|
108
|
-
export import StepInstance = _WorkflowStepInstance;
|
|
109
|
-
export import StepDataMapper = _WorkflowStepDataMapper;
|
|
110
|
-
type WorkflowStep = StepDcuplFiles.Step | StepS3Files.Step | StepGitFiles.Step | StepScript.Step | StepRequest.Step | StepInstance.Step | StepDataMapper.Step;
|
|
111
|
-
/**
|
|
112
|
-
* Server Config
|
|
113
|
-
*/
|
|
114
|
-
type Workflow = {
|
|
115
|
-
uid: string;
|
|
116
|
-
key: string;
|
|
117
|
-
template: Template;
|
|
118
|
-
runnerUid: string;
|
|
119
|
-
projectId: string;
|
|
120
|
-
v: string;
|
|
121
|
-
createdAt: string;
|
|
122
|
-
changedAt: string;
|
|
123
|
-
runtime: WorkflowRuntime;
|
|
124
|
-
};
|
|
125
|
-
type WorkflowRuntime = {
|
|
126
|
-
workflowTimeout: number;
|
|
127
|
-
scriptTimeout: number;
|
|
128
|
-
instanceScriptTimeout: number;
|
|
129
|
-
requestTimeout: number;
|
|
130
|
-
max_heap_size: number;
|
|
131
|
-
scriptWorkers: number;
|
|
132
|
-
workflowWorkers: number;
|
|
133
|
-
};
|
|
134
|
-
type StepResultType = 'value' | 'context';
|
|
135
|
-
type StepResultBase = {
|
|
136
|
-
error?: string;
|
|
137
|
-
};
|
|
138
|
-
type StepResultValueBase<T = any> = StepResultBase & {
|
|
139
|
-
type: 'value';
|
|
140
|
-
value?: T;
|
|
141
|
-
};
|
|
142
|
-
type StepResultContextBase = StepResultBase & {
|
|
143
|
-
type: 'context';
|
|
144
|
-
context?: RunContext;
|
|
145
|
-
};
|
|
146
|
-
type StepResult = StepResultValueBase | StepResultContextBase;
|
|
147
|
-
type WorkflowStepResultStatus = 'processing' | 'completed' | 'failed';
|
|
148
|
-
type WorkflowStepResult<Result = any> = {
|
|
149
|
-
key: string;
|
|
150
|
-
status: WorkflowStepResultStatus;
|
|
151
|
-
result?: Result;
|
|
152
|
-
error?: any;
|
|
153
|
-
start: number;
|
|
154
|
-
end: number;
|
|
155
|
-
duration: number;
|
|
156
|
-
};
|
|
157
|
-
type WorkflowContext = {
|
|
158
|
-
runContext: RunContext;
|
|
159
|
-
stepResults: WorkflowStepResult[];
|
|
160
|
-
};
|
|
161
|
-
type SimpleRequestObject = {
|
|
162
|
-
method: string;
|
|
163
|
-
body?: any;
|
|
164
|
-
params?: any;
|
|
165
|
-
query?: any;
|
|
166
|
-
headers?: any;
|
|
167
|
-
};
|
|
168
|
-
type RunContext = {
|
|
169
|
-
run: {
|
|
170
|
-
id: string;
|
|
171
|
-
};
|
|
172
|
-
workflow: Workflow.Workflow;
|
|
173
|
-
request: SimpleRequestObject;
|
|
174
|
-
variables?: Record<string, any>;
|
|
175
|
-
[key: string]: any;
|
|
176
|
-
};
|
|
177
|
-
/**
|
|
178
|
-
* Api Types
|
|
179
|
-
*/
|
|
180
|
-
type InstanceStatus = 'waiting' | 'processing' | 'ready' | 'updating' | 'error' | 'stopped';
|
|
181
|
-
type StatusResponse = {
|
|
182
|
-
key: string;
|
|
183
|
-
uid: string;
|
|
184
|
-
status: InstanceStatus;
|
|
185
|
-
createdAt: string;
|
|
186
|
-
changedAt: string;
|
|
187
|
-
templateVersion?: string;
|
|
188
|
-
v: string;
|
|
189
|
-
};
|
|
190
|
-
type ApiInstanceRuntimeResponse = {
|
|
191
|
-
used_heap_size: number;
|
|
192
|
-
max_heap_size: number;
|
|
193
|
-
};
|
|
194
|
-
type DetailsResponse = StatusResponse & {
|
|
195
|
-
runtime: ApiInstanceRuntimeResponse;
|
|
196
|
-
invocations: Invocation[];
|
|
197
|
-
};
|
|
198
|
-
type ManagerStatus = 'idle';
|
|
199
|
-
type ManagerMeta = {
|
|
200
|
-
total: number;
|
|
201
|
-
};
|
|
202
|
-
type ManagerStatusRuntime = {
|
|
203
|
-
used_heap_size: number;
|
|
204
|
-
total_used_heap_size: number;
|
|
205
|
-
max_heap_size: number;
|
|
206
|
-
available_heap_size: number;
|
|
207
|
-
cpus: number;
|
|
208
|
-
workers: {
|
|
209
|
-
workflow: number;
|
|
210
|
-
script: number;
|
|
211
|
-
};
|
|
212
|
-
};
|
|
213
|
-
type ManagerEvent = {
|
|
214
|
-
type: 'fetch_config' | 'init' | 'initialized' | 'start' | 'stop';
|
|
215
|
-
createdAt: string;
|
|
216
|
-
data?: any;
|
|
217
|
-
};
|
|
218
|
-
type ManagerStatusResponse = {
|
|
219
|
-
status: ManagerStatus;
|
|
220
|
-
meta: ManagerMeta;
|
|
221
|
-
runtime: ManagerStatusRuntime;
|
|
222
|
-
instances: DetailsResponse[];
|
|
223
|
-
events: ManagerEvent[];
|
|
224
|
-
};
|
|
225
|
-
/**
|
|
226
|
-
* Invocations
|
|
227
|
-
*/
|
|
228
|
-
type InvocationStatus = 'completed' | 'failed';
|
|
229
|
-
type InvocationType = 'project' | 'workflow' | 'total';
|
|
230
|
-
type Invocation = {
|
|
231
|
-
key: string;
|
|
232
|
-
type: InvocationType;
|
|
233
|
-
completed: number;
|
|
234
|
-
failed: number;
|
|
235
|
-
workflowKey?: string;
|
|
236
|
-
projectId?: string;
|
|
237
|
-
};
|
|
238
|
-
/**
|
|
239
|
-
* Logs
|
|
240
|
-
*/
|
|
241
|
-
type WorkflowStatus = 'running' | 'completed' | 'failed';
|
|
242
|
-
type LogEntry = {
|
|
243
|
-
runId: string;
|
|
244
|
-
workflowKey: string;
|
|
245
|
-
status: WorkflowStatus;
|
|
246
|
-
start: number;
|
|
247
|
-
end: number;
|
|
248
|
-
duration: number;
|
|
249
|
-
startedAt: Date | string;
|
|
250
|
-
context?: Workflow.WorkflowContext;
|
|
251
|
-
result?: any;
|
|
252
|
-
};
|
|
253
|
-
type LogStatistics = {
|
|
254
|
-
count: number;
|
|
255
|
-
completed: number;
|
|
256
|
-
failed: number;
|
|
257
|
-
avg: number;
|
|
258
|
-
min: number;
|
|
259
|
-
max: number;
|
|
260
|
-
median: number;
|
|
261
|
-
p95: number;
|
|
262
|
-
p99: number;
|
|
263
|
-
};
|
|
264
|
-
type RunLogSummaryRun = {
|
|
265
|
-
runId: string;
|
|
266
|
-
status: WorkflowStatus;
|
|
267
|
-
duration: number;
|
|
268
|
-
startedAt: string | Date;
|
|
269
|
-
};
|
|
270
|
-
type RunLogSummary = LogStatistics & {
|
|
271
|
-
runs: RunLogSummaryRun[];
|
|
272
|
-
};
|
|
273
|
-
/**
|
|
274
|
-
* DTO's
|
|
275
|
-
*/
|
|
276
|
-
type DeployDto = {
|
|
277
|
-
runnerUid: string;
|
|
278
|
-
template: Template;
|
|
279
|
-
};
|
|
280
|
-
type UndeployDto = {
|
|
281
|
-
uid: string;
|
|
282
|
-
};
|
|
283
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"workflow.types.js","sourceRoot":"","sources":["../../../../src/types/workflow/workflow.types.ts"],"names":[],"mappings":"AAQA,MAAM,KAAW,QAAQ,CA6VxB;AA7VD,WAAiB,QAAQ;AA6VzB,CAAC,EA7VgB,QAAQ,KAAR,QAAQ,QA6VxB"}
|