@dcupl/common 1.7.2 → 1.8.0
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/common.js +1 -0
- package/dist/lib-esm/analytics.controller.js +2 -2
- package/dist/lib-esm/analytics.controller.js.map +1 -1
- package/dist/lib-esm/cache.controller.js +3 -3
- package/dist/lib-esm/cache.controller.js.map +1 -1
- package/dist/lib-esm/changeDetection.js +1 -1
- package/dist/lib-esm/changeDetection.js.map +1 -1
- package/dist/lib-esm/dependency-graph.d.ts +18 -0
- package/dist/lib-esm/dependency-graph.js +252 -0
- package/dist/lib-esm/dependency-graph.js.map +1 -0
- package/dist/lib-esm/getAggregation.js +54 -24
- package/dist/lib-esm/getAggregation.js.map +1 -1
- package/dist/lib-esm/getFacets.js +1 -1
- package/dist/lib-esm/getFacets.js.map +1 -1
- package/dist/lib-esm/index.d.ts +2 -0
- package/dist/lib-esm/index.js +2 -0
- package/dist/lib-esm/index.js.map +1 -1
- package/dist/lib-esm/indices.controller.js +2 -2
- package/dist/lib-esm/indices.controller.js.map +1 -1
- package/dist/lib-esm/object-hash.d.ts +1 -0
- package/dist/lib-esm/object-hash.js +33 -0
- package/dist/lib-esm/object-hash.js.map +1 -0
- package/dist/lib-esm/query-builder.js +1 -1
- package/dist/lib-esm/query-builder.js.map +1 -1
- package/dist/lib-esm/queryData.js +1 -1
- package/dist/lib-esm/queryData.js.map +1 -1
- package/dist/lib-esm/template-parser.d.ts +6 -0
- package/dist/lib-esm/template-parser.js +21 -0
- package/dist/lib-esm/template-parser.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +6 -8
- package/dist/lib-cjs/analytics.controller.d.ts +0 -85
- package/dist/lib-cjs/analytics.controller.js +0 -121
- package/dist/lib-cjs/analytics.controller.js.map +0 -1
- package/dist/lib-cjs/cache.controller.d.ts +0 -11
- package/dist/lib-cjs/cache.controller.js +0 -46
- package/dist/lib-cjs/cache.controller.js.map +0 -1
- package/dist/lib-cjs/changeDetection.d.ts +0 -40
- package/dist/lib-cjs/changeDetection.js +0 -148
- package/dist/lib-cjs/changeDetection.js.map +0 -1
- package/dist/lib-cjs/computeSuggestions.d.ts +0 -3
- package/dist/lib-cjs/computeSuggestions.js +0 -79
- package/dist/lib-cjs/computeSuggestions.js.map +0 -1
- package/dist/lib-cjs/getAggregation.d.ts +0 -3
- package/dist/lib-cjs/getAggregation.js +0 -249
- package/dist/lib-cjs/getAggregation.js.map +0 -1
- package/dist/lib-cjs/getFacets.d.ts +0 -3
- package/dist/lib-cjs/getFacets.js +0 -138
- package/dist/lib-cjs/getFacets.js.map +0 -1
- package/dist/lib-cjs/helper.d.ts +0 -10
- package/dist/lib-cjs/helper.js +0 -100
- package/dist/lib-cjs/helper.js.map +0 -1
- package/dist/lib-cjs/index.d.ts +0 -16
- package/dist/lib-cjs/index.js +0 -33
- package/dist/lib-cjs/index.js.map +0 -1
- package/dist/lib-cjs/indices.controller.d.ts +0 -13
- package/dist/lib-cjs/indices.controller.js +0 -171
- package/dist/lib-cjs/indices.controller.js.map +0 -1
- package/dist/lib-cjs/performance.d.ts +0 -7
- package/dist/lib-cjs/performance.js +0 -36
- package/dist/lib-cjs/performance.js.map +0 -1
- package/dist/lib-cjs/pivot.d.ts +0 -28
- package/dist/lib-cjs/pivot.js +0 -292
- package/dist/lib-cjs/pivot.js.map +0 -1
- package/dist/lib-cjs/property-parser.d.ts +0 -5
- package/dist/lib-cjs/property-parser.js +0 -115
- package/dist/lib-cjs/property-parser.js.map +0 -1
- package/dist/lib-cjs/query-builder.d.ts +0 -27
- package/dist/lib-cjs/query-builder.js +0 -252
- package/dist/lib-cjs/query-builder.js.map +0 -1
- package/dist/lib-cjs/query.helper.d.ts +0 -6
- package/dist/lib-cjs/query.helper.js +0 -180
- package/dist/lib-cjs/query.helper.js.map +0 -1
- package/dist/lib-cjs/queryData.d.ts +0 -18
- package/dist/lib-cjs/queryData.js +0 -462
- package/dist/lib-cjs/queryData.js.map +0 -1
- package/dist/lib-cjs/script.controller.d.ts +0 -14
- package/dist/lib-cjs/script.controller.js +0 -82
- package/dist/lib-cjs/script.controller.js.map +0 -1
- package/dist/lib-cjs/types/aggregation.types.d.ts +0 -48
- package/dist/lib-cjs/types/aggregation.types.js +0 -3
- package/dist/lib-cjs/types/aggregation.types.js.map +0 -1
- package/dist/lib-cjs/types/api/file.types.d.ts +0 -36
- package/dist/lib-cjs/types/api/file.types.js +0 -3
- package/dist/lib-cjs/types/api/file.types.js.map +0 -1
- package/dist/lib-cjs/types/app-loader.types.d.ts +0 -219
- package/dist/lib-cjs/types/app-loader.types.js +0 -3
- package/dist/lib-cjs/types/app-loader.types.js.map +0 -1
- package/dist/lib-cjs/types/data.types.d.ts +0 -21
- package/dist/lib-cjs/types/data.types.js +0 -3
- package/dist/lib-cjs/types/data.types.js.map +0 -1
- package/dist/lib-cjs/types/dcupl.types.d.ts +0 -121
- package/dist/lib-cjs/types/dcupl.types.js +0 -3
- package/dist/lib-cjs/types/dcupl.types.js.map +0 -1
- package/dist/lib-cjs/types/facets.types.d.ts +0 -19
- package/dist/lib-cjs/types/facets.types.js +0 -3
- package/dist/lib-cjs/types/facets.types.js.map +0 -1
- package/dist/lib-cjs/types/filter.types.d.ts +0 -121
- package/dist/lib-cjs/types/filter.types.js +0 -3
- package/dist/lib-cjs/types/filter.types.js.map +0 -1
- package/dist/lib-cjs/types/group-by.types.d.ts +0 -13
- package/dist/lib-cjs/types/group-by.types.js +0 -3
- package/dist/lib-cjs/types/group-by.types.js.map +0 -1
- package/dist/lib-cjs/types/index.d.ts +0 -20
- package/dist/lib-cjs/types/index.js +0 -37
- package/dist/lib-cjs/types/index.js.map +0 -1
- package/dist/lib-cjs/types/internal.types.d.ts +0 -5
- package/dist/lib-cjs/types/internal.types.js +0 -3
- package/dist/lib-cjs/types/internal.types.js.map +0 -1
- package/dist/lib-cjs/types/list.types.d.ts +0 -49
- package/dist/lib-cjs/types/list.types.js +0 -3
- package/dist/lib-cjs/types/list.types.js.map +0 -1
- package/dist/lib-cjs/types/model.types.d.ts +0 -358
- package/dist/lib-cjs/types/model.types.js +0 -19
- package/dist/lib-cjs/types/model.types.js.map +0 -1
- package/dist/lib-cjs/types/projection.types.d.ts +0 -20
- package/dist/lib-cjs/types/projection.types.js +0 -3
- package/dist/lib-cjs/types/projection.types.js.map +0 -1
- package/dist/lib-cjs/types/quality.types.d.ts +0 -72
- package/dist/lib-cjs/types/quality.types.js +0 -3
- package/dist/lib-cjs/types/quality.types.js.map +0 -1
- package/dist/lib-cjs/types/query.types.d.ts +0 -80
- package/dist/lib-cjs/types/query.types.js +0 -15
- package/dist/lib-cjs/types/query.types.js.map +0 -1
- package/dist/lib-cjs/types/rest-api/rest-api.types.d.ts +0 -118
- package/dist/lib-cjs/types/rest-api/rest-api.types.js +0 -3
- package/dist/lib-cjs/types/rest-api/rest-api.types.js.map +0 -1
- package/dist/lib-cjs/types/runner/runner.types.d.ts +0 -22
- package/dist/lib-cjs/types/runner/runner.types.js +0 -3
- package/dist/lib-cjs/types/runner/runner.types.js.map +0 -1
- package/dist/lib-cjs/types/section.types.d.ts +0 -16
- package/dist/lib-cjs/types/section.types.js +0 -3
- package/dist/lib-cjs/types/section.types.js.map +0 -1
- package/dist/lib-cjs/types/suggestion.types.d.ts +0 -28
- package/dist/lib-cjs/types/suggestion.types.js +0 -3
- package/dist/lib-cjs/types/suggestion.types.js.map +0 -1
- package/dist/lib-cjs/types/testing.types.d.ts +0 -68
- package/dist/lib-cjs/types/testing.types.js +0 -3
- package/dist/lib-cjs/types/testing.types.js.map +0 -1
- package/dist/lib-cjs/types/workflow/workflow.types.d.ts +0 -341
- package/dist/lib-cjs/types/workflow/workflow.types.js +0 -3
- package/dist/lib-cjs/types/workflow/workflow.types.js.map +0 -1
- package/dist/tsconfig-cjs.tsbuildinfo +0 -1
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
import { AppLoaderConfiguration } from '../app-loader.types';
|
|
2
|
-
export declare namespace RestApi {
|
|
3
|
-
type Template = {
|
|
4
|
-
key: string;
|
|
5
|
-
dcuplConfig: DcuplConfig;
|
|
6
|
-
vGuardEnabled: boolean;
|
|
7
|
-
auth?: InstanceAuth[];
|
|
8
|
-
name?: string;
|
|
9
|
-
description?: string;
|
|
10
|
-
version?: string;
|
|
11
|
-
};
|
|
12
|
-
type Instance = {
|
|
13
|
-
uid: string;
|
|
14
|
-
key: string;
|
|
15
|
-
template: Template;
|
|
16
|
-
runnerUid: string;
|
|
17
|
-
projectId: string;
|
|
18
|
-
v: string;
|
|
19
|
-
createdAt: string;
|
|
20
|
-
changedAt: string;
|
|
21
|
-
runtime?: InstanceRuntime;
|
|
22
|
-
};
|
|
23
|
-
type DcuplConfig = {
|
|
24
|
-
projectId: string;
|
|
25
|
-
apiKey: string;
|
|
26
|
-
processOptions: AppLoaderConfiguration.ProcessOptions;
|
|
27
|
-
loaderFetchOptions?: AppLoaderConfiguration.FetchOptions;
|
|
28
|
-
};
|
|
29
|
-
type InstanceAuth = {
|
|
30
|
-
type: 'api-key';
|
|
31
|
-
value: string;
|
|
32
|
-
};
|
|
33
|
-
type InstanceRuntime = {
|
|
34
|
-
max_heap_size: number;
|
|
35
|
-
};
|
|
36
|
-
/**
|
|
37
|
-
* Api Types
|
|
38
|
-
*/
|
|
39
|
-
type InstanceStatus = 'waiting' | 'processing' | 'ready' | 'updating' | 'error' | 'stopped';
|
|
40
|
-
type StatusResponse = {
|
|
41
|
-
key: string;
|
|
42
|
-
uid: string;
|
|
43
|
-
status: InstanceStatus;
|
|
44
|
-
createdAt: string;
|
|
45
|
-
changedAt: string;
|
|
46
|
-
templateVersion?: string;
|
|
47
|
-
v: string;
|
|
48
|
-
};
|
|
49
|
-
type InstanceEvent = {
|
|
50
|
-
type: 'create' | 'start' | 'initialized' | 'update' | 'stop' | 'error';
|
|
51
|
-
createdAt: string;
|
|
52
|
-
data?: any;
|
|
53
|
-
};
|
|
54
|
-
type ApiInstanceRuntimeResponse = {
|
|
55
|
-
used_heap_size: number;
|
|
56
|
-
max_heap_size: number;
|
|
57
|
-
};
|
|
58
|
-
type DetailsResponse = {
|
|
59
|
-
key: string;
|
|
60
|
-
uid: string;
|
|
61
|
-
runtime: ApiInstanceRuntimeResponse;
|
|
62
|
-
invocations: Invocation[];
|
|
63
|
-
};
|
|
64
|
-
/**
|
|
65
|
-
* Invocations
|
|
66
|
-
*/
|
|
67
|
-
type InvocationStatus = 'completed' | 'failed';
|
|
68
|
-
type InvocationType = 'project' | 'instance' | 'instance-action' | 'total';
|
|
69
|
-
type Invocation = {
|
|
70
|
-
key: string;
|
|
71
|
-
type: InvocationType;
|
|
72
|
-
action: string;
|
|
73
|
-
completed: number;
|
|
74
|
-
failed: number;
|
|
75
|
-
instanceKey?: string;
|
|
76
|
-
projectId?: string;
|
|
77
|
-
};
|
|
78
|
-
/**
|
|
79
|
-
* Manager Types
|
|
80
|
-
*/
|
|
81
|
-
type ManagerStatus = 'idle' | 'processing';
|
|
82
|
-
type ManagerStatusRuntime = {
|
|
83
|
-
used_heap_size: number;
|
|
84
|
-
total_used_heap_size: number;
|
|
85
|
-
workers: number;
|
|
86
|
-
};
|
|
87
|
-
type ManagerStatusResponse = {
|
|
88
|
-
status: ManagerStatus;
|
|
89
|
-
meta: ManagerMeta;
|
|
90
|
-
runtime: ManagerStatusRuntime;
|
|
91
|
-
instances: StatusResponse[];
|
|
92
|
-
events: ManagerEvent[];
|
|
93
|
-
};
|
|
94
|
-
type ManagerEvent = {
|
|
95
|
-
type: 'fetch_config' | 'init' | 'initialized' | 'start' | 'stop';
|
|
96
|
-
createdAt: string;
|
|
97
|
-
data?: any;
|
|
98
|
-
};
|
|
99
|
-
type ManagerMeta = {
|
|
100
|
-
total: number;
|
|
101
|
-
waiting: number;
|
|
102
|
-
processing: number;
|
|
103
|
-
ready: number;
|
|
104
|
-
error: number;
|
|
105
|
-
stopped: number;
|
|
106
|
-
updating: number;
|
|
107
|
-
};
|
|
108
|
-
/**
|
|
109
|
-
* DTO's
|
|
110
|
-
*/
|
|
111
|
-
type DeployDto = {
|
|
112
|
-
runnerUid: string;
|
|
113
|
-
template: Template;
|
|
114
|
-
};
|
|
115
|
-
type UndeployDto = {
|
|
116
|
-
uid: string;
|
|
117
|
-
};
|
|
118
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rest-api.types.js","sourceRoot":"","sources":["../../../../src/types/rest-api/rest-api.types.ts"],"names":[],"mappings":""}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { RestApi } from '../rest-api/rest-api.types';
|
|
2
|
-
import { Workflow } from '../workflow/workflow.types';
|
|
3
|
-
export declare namespace Runner {
|
|
4
|
-
type Setup = {
|
|
5
|
-
uid: string;
|
|
6
|
-
url: string;
|
|
7
|
-
type: 'app-runner' | 'workflow-runner';
|
|
8
|
-
runnerApiKey: string;
|
|
9
|
-
runnerKey: string;
|
|
10
|
-
};
|
|
11
|
-
type WorkflowRunnerConfig = {
|
|
12
|
-
workflows: Workflow.Workflow[];
|
|
13
|
-
v: string;
|
|
14
|
-
};
|
|
15
|
-
type RestApiRunnerConfig = {
|
|
16
|
-
instances: RestApi.Instance[];
|
|
17
|
-
processMode: 'parallel' | 'sequential' | 'batch';
|
|
18
|
-
timeoutBetweenInstances?: number;
|
|
19
|
-
batchSize?: number;
|
|
20
|
-
v: string;
|
|
21
|
-
};
|
|
22
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"runner.types.js","sourceRoot":"","sources":["../../../../src/types/runner/runner.types.ts"],"names":[],"mappings":""}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { ListItem } from './data.types';
|
|
2
|
-
import { Aggregation } from './aggregation.types';
|
|
3
|
-
export type GroupByResponse = {
|
|
4
|
-
_meta: {
|
|
5
|
-
currentSize: number;
|
|
6
|
-
initialSize: number;
|
|
7
|
-
};
|
|
8
|
-
items: SectionItem[];
|
|
9
|
-
};
|
|
10
|
-
export type SectionItem = ListItem & {
|
|
11
|
-
_meta: {
|
|
12
|
-
size: number;
|
|
13
|
-
};
|
|
14
|
-
_aggregates: Aggregation[];
|
|
15
|
-
_items: ListItem[];
|
|
16
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"section.types.js","sourceRoot":"","sources":["../../../src/types/section.types.ts"],"names":[],"mappings":""}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { DcuplQuery, DcuplQueryGroup, DcuplQueryTransformOptions } from './query.types';
|
|
2
|
-
type SuggestionOptionsBase = {
|
|
3
|
-
attribute: string;
|
|
4
|
-
value: any;
|
|
5
|
-
max?: number;
|
|
6
|
-
calculateResultKeys?: boolean;
|
|
7
|
-
excludeUndefineds?: boolean;
|
|
8
|
-
excludeNulls?: boolean;
|
|
9
|
-
transform?: DcuplQueryTransformOptions[];
|
|
10
|
-
};
|
|
11
|
-
type SuggestionOptionsFiltered = SuggestionOptionsBase & {
|
|
12
|
-
relevantData?: 'filtered';
|
|
13
|
-
excludeQuery?: never;
|
|
14
|
-
};
|
|
15
|
-
type SuggestionOptionsAll = SuggestionOptionsBase & {
|
|
16
|
-
relevantData?: 'all';
|
|
17
|
-
excludeQuery?: never;
|
|
18
|
-
};
|
|
19
|
-
type SuggestionOptionsExcludequery = SuggestionOptionsBase & {
|
|
20
|
-
relevantData: 'excludeQuery';
|
|
21
|
-
excludeQuery: Partial<DcuplQuery | DcuplQueryGroup>;
|
|
22
|
-
};
|
|
23
|
-
export type SuggestionOptions = SuggestionOptionsFiltered | SuggestionOptionsAll | SuggestionOptionsExcludequery;
|
|
24
|
-
export type Suggestion = {
|
|
25
|
-
value: string;
|
|
26
|
-
keys: string[];
|
|
27
|
-
};
|
|
28
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"suggestion.types.js","sourceRoot":"","sources":["../../../src/types/suggestion.types.ts"],"names":[],"mappings":""}
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
export type DcuplTestTriggerOptions = {
|
|
2
|
-
type: 'manual' | 'chron';
|
|
3
|
-
cron?: string;
|
|
4
|
-
};
|
|
5
|
-
export type DcuplTestScenario = {
|
|
6
|
-
key: string;
|
|
7
|
-
name: string;
|
|
8
|
-
processOptions: any;
|
|
9
|
-
testConfigKey: string;
|
|
10
|
-
trigger: DcuplTestTriggerOptions;
|
|
11
|
-
};
|
|
12
|
-
export type DcuplTestScenarioConfig = DcuplTestScenario[];
|
|
13
|
-
export type TestRunnerOptions = {
|
|
14
|
-
projectId: string;
|
|
15
|
-
apiKey: string;
|
|
16
|
-
baseUrl: string;
|
|
17
|
-
loaderFileName: string;
|
|
18
|
-
processOptions: any;
|
|
19
|
-
testConfigKey: string;
|
|
20
|
-
include?: string[];
|
|
21
|
-
exclude?: string[];
|
|
22
|
-
};
|
|
23
|
-
export type DcuplApplicationTestingConfig = {
|
|
24
|
-
key: string;
|
|
25
|
-
startupDuration?: number;
|
|
26
|
-
processDuration?: number;
|
|
27
|
-
downloadDuration?: number;
|
|
28
|
-
maxPercentageOfUnusedData?: number;
|
|
29
|
-
maxAmountOfUnusedAttributes?: number;
|
|
30
|
-
errorTracking?: DcuplErrorTrackingTestingConfig;
|
|
31
|
-
models?: DcuplModelTestingConfig[];
|
|
32
|
-
};
|
|
33
|
-
export type DcuplErrorTrackingTestingConfig = {
|
|
34
|
-
allowModelDefinitionErrors?: boolean;
|
|
35
|
-
allowMissingReferences?: boolean;
|
|
36
|
-
allowMissingData?: boolean;
|
|
37
|
-
};
|
|
38
|
-
export type DcuplModelTestingConfig = {
|
|
39
|
-
key: string;
|
|
40
|
-
modelKey: string;
|
|
41
|
-
minSize?: number;
|
|
42
|
-
maxSize?: number;
|
|
43
|
-
requiredAttributes?: string[];
|
|
44
|
-
};
|
|
45
|
-
export type Stats = {
|
|
46
|
-
suites: number;
|
|
47
|
-
tests: number;
|
|
48
|
-
passes: number;
|
|
49
|
-
pending: number;
|
|
50
|
-
failures: number;
|
|
51
|
-
start: string;
|
|
52
|
-
end: string;
|
|
53
|
-
duration: number;
|
|
54
|
-
};
|
|
55
|
-
export type Test = {
|
|
56
|
-
title: string;
|
|
57
|
-
fullTitle: string;
|
|
58
|
-
file: string;
|
|
59
|
-
duration: number;
|
|
60
|
-
state: string;
|
|
61
|
-
ctx: any;
|
|
62
|
-
parent: string;
|
|
63
|
-
};
|
|
64
|
-
export type TestRunnerResult = {
|
|
65
|
-
stats: Stats;
|
|
66
|
-
tests: Test[];
|
|
67
|
-
config: DcuplApplicationTestingConfig;
|
|
68
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"testing.types.js","sourceRoot":"","sources":["../../../src/types/testing.types.ts"],"names":[],"mappings":""}
|
|
@@ -1,341 +0,0 @@
|
|
|
1
|
-
import { DataContainer } from '../data.types';
|
|
2
|
-
import { ModelDefinition } from '../model.types';
|
|
3
|
-
import { AppLoaderConfiguration } from '../app-loader.types';
|
|
4
|
-
import { ListItem } from '../data.types';
|
|
5
|
-
export declare namespace Workflow {
|
|
6
|
-
type Template = {
|
|
7
|
-
key: string;
|
|
8
|
-
config: WorkflowConfig;
|
|
9
|
-
auth?: WorkflowAuth[];
|
|
10
|
-
name?: string;
|
|
11
|
-
description?: string;
|
|
12
|
-
version?: string;
|
|
13
|
-
variables?: Record<string, string>;
|
|
14
|
-
};
|
|
15
|
-
type WorkflowAuth = {
|
|
16
|
-
type: 'api-key';
|
|
17
|
-
value: string;
|
|
18
|
-
};
|
|
19
|
-
/**
|
|
20
|
-
*
|
|
21
|
-
* Response
|
|
22
|
-
*
|
|
23
|
-
*/
|
|
24
|
-
type WorkflowResponseType = 'script' | 'status' | 'debug';
|
|
25
|
-
type WorkflowResponseConfigBase = {
|
|
26
|
-
type: WorkflowResponseType;
|
|
27
|
-
headers?: Record<string, string>;
|
|
28
|
-
};
|
|
29
|
-
type WorkflowResponseScript = WorkflowResponseConfigBase & {
|
|
30
|
-
type: 'script';
|
|
31
|
-
script: string;
|
|
32
|
-
};
|
|
33
|
-
type WorkflowResponseStatus = WorkflowResponseConfigBase & {
|
|
34
|
-
type: 'status';
|
|
35
|
-
};
|
|
36
|
-
type WorkflowResponseDebug = WorkflowResponseConfigBase & {
|
|
37
|
-
type: 'debug';
|
|
38
|
-
};
|
|
39
|
-
type WorkflowResponseConfig = WorkflowResponseScript | WorkflowResponseStatus | WorkflowResponseDebug;
|
|
40
|
-
type WorkflowConfig = {
|
|
41
|
-
trigger: Trigger[];
|
|
42
|
-
steps: WorkflowStep[];
|
|
43
|
-
catch?: WorkflowStep;
|
|
44
|
-
response: WorkflowResponseConfig;
|
|
45
|
-
};
|
|
46
|
-
/**
|
|
47
|
-
*
|
|
48
|
-
* Trigger
|
|
49
|
-
*
|
|
50
|
-
*/
|
|
51
|
-
type TriggerType = 'request' | 'manual' | 'cron';
|
|
52
|
-
type TriggerBase = {
|
|
53
|
-
key: string;
|
|
54
|
-
type: TriggerType;
|
|
55
|
-
};
|
|
56
|
-
type TriggerRequestMethod = 'GET' | 'POST';
|
|
57
|
-
type TriggerRequest = TriggerBase & {
|
|
58
|
-
type: 'request';
|
|
59
|
-
path: string;
|
|
60
|
-
methods: TriggerRequestMethod[];
|
|
61
|
-
scripts?: {
|
|
62
|
-
success?: string;
|
|
63
|
-
};
|
|
64
|
-
};
|
|
65
|
-
type TriggerManual = TriggerBase & {
|
|
66
|
-
type: 'manual';
|
|
67
|
-
};
|
|
68
|
-
type TriggerCron = TriggerBase & {
|
|
69
|
-
type: 'cron';
|
|
70
|
-
/**
|
|
71
|
-
* Cron expression
|
|
72
|
-
* second 0-59
|
|
73
|
-
* minute 0-59
|
|
74
|
-
* hour 0-23
|
|
75
|
-
* day of month 1-31
|
|
76
|
-
* month 1-12 (or names, see below)
|
|
77
|
-
* day of week 0-7 (0 or 7 is Sunday, or use names)
|
|
78
|
-
*
|
|
79
|
-
* @example '0 0 1 * *' // every day at 1am
|
|
80
|
-
* @example \*\/5 * * * * *' -> star slash 5 means every 5 seconds
|
|
81
|
-
*/
|
|
82
|
-
cronTime: string;
|
|
83
|
-
timezone?: string;
|
|
84
|
-
};
|
|
85
|
-
type Trigger = TriggerRequest | TriggerManual | TriggerCron;
|
|
86
|
-
/**
|
|
87
|
-
*
|
|
88
|
-
* Step
|
|
89
|
-
*
|
|
90
|
-
*/
|
|
91
|
-
type WorflowStepType = 'request' | 'script' | 'git-push' | 'git-pull' | 'files-read' | 'files-write' | 'dcupl-instance';
|
|
92
|
-
type WorkflowStepBase = {
|
|
93
|
-
key: string;
|
|
94
|
-
type: WorflowStepType;
|
|
95
|
-
name?: string;
|
|
96
|
-
description?: string;
|
|
97
|
-
skip?: boolean;
|
|
98
|
-
};
|
|
99
|
-
/**
|
|
100
|
-
* Request
|
|
101
|
-
*/
|
|
102
|
-
type WorkflowRequestMethod = 'GET' | 'POST' | 'PUT' | 'DELETE';
|
|
103
|
-
type WorkflowStepRequestOptions = {
|
|
104
|
-
url: string;
|
|
105
|
-
method: WorkflowRequestMethod;
|
|
106
|
-
body?: any;
|
|
107
|
-
headers?: Record<string, string>;
|
|
108
|
-
};
|
|
109
|
-
type WorkflowStepRequest = WorkflowStepBase & {
|
|
110
|
-
type: 'request';
|
|
111
|
-
options: WorkflowStepRequestOptions;
|
|
112
|
-
scripts?: {
|
|
113
|
-
error?: string;
|
|
114
|
-
success?: string;
|
|
115
|
-
};
|
|
116
|
-
};
|
|
117
|
-
/**
|
|
118
|
-
* Script
|
|
119
|
-
*/
|
|
120
|
-
type WorkflowStepScript = WorkflowStepBase & {
|
|
121
|
-
type: 'script';
|
|
122
|
-
script: string;
|
|
123
|
-
};
|
|
124
|
-
/**
|
|
125
|
-
* Dcupl Instance
|
|
126
|
-
*/
|
|
127
|
-
type WorkflowStepDcuplInstanceDataContainer = Omit<DataContainer, 'data'> & {
|
|
128
|
-
data: string | ListItem[];
|
|
129
|
-
};
|
|
130
|
-
type WorkflowStepDcuplInstance = WorkflowStepBase & {
|
|
131
|
-
type: 'dcupl-instance';
|
|
132
|
-
apiKey: string;
|
|
133
|
-
processOptions: AppLoaderConfiguration.ProcessOptions;
|
|
134
|
-
fetchOptions?: AppLoaderConfiguration.FetchOptions;
|
|
135
|
-
dataContainers?: WorkflowStepDcuplInstanceDataContainer[];
|
|
136
|
-
models?: ModelDefinition[];
|
|
137
|
-
loaderConfig?: AppLoaderConfiguration.ProjectConfiguration;
|
|
138
|
-
scriptName?: string;
|
|
139
|
-
script?: string;
|
|
140
|
-
};
|
|
141
|
-
/**
|
|
142
|
-
* Git Push
|
|
143
|
-
*/
|
|
144
|
-
type WorkflowGitPushStepFile = {
|
|
145
|
-
path: string;
|
|
146
|
-
content: string;
|
|
147
|
-
message?: string;
|
|
148
|
-
};
|
|
149
|
-
type WorkflowGitPushStepOptions = {
|
|
150
|
-
auth: {
|
|
151
|
-
user: string;
|
|
152
|
-
token: string;
|
|
153
|
-
};
|
|
154
|
-
repository: {
|
|
155
|
-
user: string;
|
|
156
|
-
repo: string;
|
|
157
|
-
/**
|
|
158
|
-
* default: main
|
|
159
|
-
*/
|
|
160
|
-
branch?: string;
|
|
161
|
-
};
|
|
162
|
-
files: WorkflowGitPushStepFile[];
|
|
163
|
-
};
|
|
164
|
-
type WorkflowStepGitPush = WorkflowStepBase & {
|
|
165
|
-
type: 'git-push';
|
|
166
|
-
options: WorkflowGitPushStepOptions;
|
|
167
|
-
};
|
|
168
|
-
/**
|
|
169
|
-
* Git Pull
|
|
170
|
-
*/
|
|
171
|
-
type WorkflowGitPullStepFile = {
|
|
172
|
-
key: string;
|
|
173
|
-
path: string;
|
|
174
|
-
};
|
|
175
|
-
type WorkflowGitPullStepOptions = {
|
|
176
|
-
auth: {
|
|
177
|
-
user: string;
|
|
178
|
-
token: string;
|
|
179
|
-
};
|
|
180
|
-
repository: {
|
|
181
|
-
user: string;
|
|
182
|
-
repo: string;
|
|
183
|
-
/**
|
|
184
|
-
* default: main
|
|
185
|
-
*/
|
|
186
|
-
branch?: string;
|
|
187
|
-
};
|
|
188
|
-
files: WorkflowGitPullStepFile[];
|
|
189
|
-
};
|
|
190
|
-
type WorkflowStepGitPull = WorkflowStepBase & {
|
|
191
|
-
type: 'git-pull';
|
|
192
|
-
options: WorkflowGitPullStepOptions;
|
|
193
|
-
};
|
|
194
|
-
/**
|
|
195
|
-
* Files Write
|
|
196
|
-
*/
|
|
197
|
-
type WorkflowFilesWriteFile = {
|
|
198
|
-
path: string;
|
|
199
|
-
content: string;
|
|
200
|
-
};
|
|
201
|
-
type WorkflowFilesWriteStepOptions = {
|
|
202
|
-
apiKey: string;
|
|
203
|
-
version: string;
|
|
204
|
-
files: WorkflowFilesWriteFile[];
|
|
205
|
-
};
|
|
206
|
-
type WorkflowStepFilesWrite = WorkflowStepBase & {
|
|
207
|
-
type: 'files-write';
|
|
208
|
-
options: WorkflowFilesWriteStepOptions;
|
|
209
|
-
};
|
|
210
|
-
/**
|
|
211
|
-
* Files Read
|
|
212
|
-
*/
|
|
213
|
-
type WorkflowFilesReadFile = {
|
|
214
|
-
key: string;
|
|
215
|
-
path: string;
|
|
216
|
-
};
|
|
217
|
-
type WorkflowFilesReadStepOptions = {
|
|
218
|
-
apiKey: string;
|
|
219
|
-
version: string;
|
|
220
|
-
files: WorkflowFilesReadFile[];
|
|
221
|
-
};
|
|
222
|
-
type WorkflowStepFilesRead = WorkflowStepBase & {
|
|
223
|
-
type: 'files-read';
|
|
224
|
-
options: WorkflowFilesReadStepOptions;
|
|
225
|
-
};
|
|
226
|
-
type WorkflowStep = WorkflowStepRequest | WorkflowStepScript | WorkflowStepGitPush | WorkflowStepGitPull | WorkflowStepDcuplInstance | WorkflowStepFilesWrite | WorkflowStepFilesRead;
|
|
227
|
-
/**
|
|
228
|
-
* Server Config
|
|
229
|
-
*/
|
|
230
|
-
type Workflow = {
|
|
231
|
-
uid: string;
|
|
232
|
-
key: string;
|
|
233
|
-
template: Template;
|
|
234
|
-
runnerUid: string;
|
|
235
|
-
projectId: string;
|
|
236
|
-
v: string;
|
|
237
|
-
createdAt: string;
|
|
238
|
-
changedAt: string;
|
|
239
|
-
runtime?: WorkflowRuntime;
|
|
240
|
-
logContext?: boolean;
|
|
241
|
-
};
|
|
242
|
-
type WorkflowRuntime = {
|
|
243
|
-
workflowTimeout: number;
|
|
244
|
-
scriptTimeout: number;
|
|
245
|
-
requestTimeout: number;
|
|
246
|
-
abortController: AbortController;
|
|
247
|
-
max_heap_size: number;
|
|
248
|
-
};
|
|
249
|
-
type WorkflowStepResult = {
|
|
250
|
-
key: string;
|
|
251
|
-
status: 'success' | 'error';
|
|
252
|
-
result: any;
|
|
253
|
-
start: number;
|
|
254
|
-
end: number;
|
|
255
|
-
};
|
|
256
|
-
type WorkflowContext = {
|
|
257
|
-
runContext: RunContext;
|
|
258
|
-
stepResults: WorkflowStepResult[];
|
|
259
|
-
runtimeConfig: Workflow.WorkflowRuntime;
|
|
260
|
-
};
|
|
261
|
-
type SimpleRequestObject = {
|
|
262
|
-
body: any;
|
|
263
|
-
params: any;
|
|
264
|
-
query: any;
|
|
265
|
-
method: string;
|
|
266
|
-
headers: any;
|
|
267
|
-
};
|
|
268
|
-
type RunContext = {
|
|
269
|
-
projectId: string;
|
|
270
|
-
workflow: Workflow.Workflow;
|
|
271
|
-
request: SimpleRequestObject;
|
|
272
|
-
[key: string]: any;
|
|
273
|
-
};
|
|
274
|
-
/**
|
|
275
|
-
* Api Types
|
|
276
|
-
*/
|
|
277
|
-
type InstanceStatus = 'waiting' | 'processing' | 'ready' | 'updating' | 'error' | 'stopped';
|
|
278
|
-
type StatusResponse = {
|
|
279
|
-
key: string;
|
|
280
|
-
uid: string;
|
|
281
|
-
status: InstanceStatus;
|
|
282
|
-
createdAt: string;
|
|
283
|
-
changedAt: string;
|
|
284
|
-
templateVersion?: string;
|
|
285
|
-
v: string;
|
|
286
|
-
};
|
|
287
|
-
type ApiInstanceRuntimeResponse = {
|
|
288
|
-
used_heap_size: number;
|
|
289
|
-
max_heap_size: number;
|
|
290
|
-
};
|
|
291
|
-
type DetailsResponse = {
|
|
292
|
-
key: string;
|
|
293
|
-
uid: string;
|
|
294
|
-
runtime: ApiInstanceRuntimeResponse;
|
|
295
|
-
invocations: Invocation[];
|
|
296
|
-
};
|
|
297
|
-
type ManagerStatus = 'idle';
|
|
298
|
-
type ManagerMeta = {
|
|
299
|
-
total: number;
|
|
300
|
-
};
|
|
301
|
-
type ManagerStatusRuntime = {
|
|
302
|
-
used_heap_size: number;
|
|
303
|
-
total_used_heap_size: number;
|
|
304
|
-
workers: number;
|
|
305
|
-
};
|
|
306
|
-
type ManagerEvent = {
|
|
307
|
-
type: 'fetch_config' | 'init' | 'initialized' | 'start' | 'stop';
|
|
308
|
-
createdAt: string;
|
|
309
|
-
data?: any;
|
|
310
|
-
};
|
|
311
|
-
type ManagerStatusResponse = {
|
|
312
|
-
status: ManagerStatus;
|
|
313
|
-
meta: ManagerMeta;
|
|
314
|
-
runtime: ManagerStatusRuntime;
|
|
315
|
-
instances: StatusResponse[];
|
|
316
|
-
events: ManagerEvent[];
|
|
317
|
-
};
|
|
318
|
-
/**
|
|
319
|
-
* Invocations
|
|
320
|
-
*/
|
|
321
|
-
type InvocationStatus = 'completed' | 'failed';
|
|
322
|
-
type InvocationType = 'project' | 'workflow' | 'total';
|
|
323
|
-
type Invocation = {
|
|
324
|
-
key: string;
|
|
325
|
-
type: InvocationType;
|
|
326
|
-
completed: number;
|
|
327
|
-
failed: number;
|
|
328
|
-
instanceKey?: string;
|
|
329
|
-
projectId?: string;
|
|
330
|
-
};
|
|
331
|
-
/**
|
|
332
|
-
* DTO's
|
|
333
|
-
*/
|
|
334
|
-
type DeployDto = {
|
|
335
|
-
runnerUid: string;
|
|
336
|
-
template: Template;
|
|
337
|
-
};
|
|
338
|
-
type UndeployDto = {
|
|
339
|
-
uid: string;
|
|
340
|
-
};
|
|
341
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"workflow.types.js","sourceRoot":"","sources":["../../../../src/types/workflow/workflow.types.ts"],"names":[],"mappings":""}
|