@or-sdk/flows 0.27.0-beta.427.0 → 0.27.1-beta.531.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/CHANGELOG.md +67 -0
- package/dist/cjs/Flows.js +158 -361
- package/dist/cjs/Flows.js.map +1 -1
- package/dist/cjs/constants.js +7 -2
- package/dist/cjs/constants.js.map +1 -1
- package/dist/esm/Flows.js +123 -276
- package/dist/esm/Flows.js.map +1 -1
- package/dist/esm/constants.js +10 -1
- package/dist/esm/constants.js.map +1 -1
- package/dist/types/Flows.d.ts +16 -91
- package/dist/types/Flows.d.ts.map +1 -0
- package/dist/types/constants.d.ts +5 -1
- package/dist/types/constants.d.ts.map +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/types.d.ts +5 -22
- package/dist/types/types.d.ts.map +1 -0
- package/dist/types/utils/deleteUnusedStepTemplates.d.ts +1 -0
- package/dist/types/utils/deleteUnusedStepTemplates.d.ts.map +1 -0
- package/dist/types/utils/index.d.ts +1 -0
- package/dist/types/utils/index.d.ts.map +1 -0
- package/dist/types/utils/listUnusedStepTemplates.d.ts +1 -0
- package/dist/types/utils/listUnusedStepTemplates.d.ts.map +1 -0
- package/package.json +12 -14
- package/src/Flows.ts +147 -432
- package/src/constants.ts +11 -1
- package/src/types.ts +6 -26
- package/tsconfig.dev.json +2 -2
- package/tsconfig.esm.json +6 -3
- package/tsconfig.types.json +2 -1
package/dist/types/Flows.d.ts
CHANGED
|
@@ -1,98 +1,23 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { List } from '@or-sdk/base';
|
|
2
|
+
import { GraphqlResponseCheckExecution } from '@or-sdk/data-hub';
|
|
3
|
+
import { Flow, PollingResultActivateSuccess, PollingResultDeactivateSuccess, StepTemplateRaw } from '@or-sdk/deployer';
|
|
4
|
+
import { FlowsConfig, ListFlowsParams, StepTemplateToDelete } from './types';
|
|
5
|
+
import { Taggable } from '@or-sdk/tags';
|
|
6
|
+
export declare class Flows implements Taggable<Flow> {
|
|
7
|
+
private readonly dataHub;
|
|
8
|
+
private readonly deployer;
|
|
9
|
+
private readonly tags;
|
|
7
10
|
constructor(params: FlowsConfig);
|
|
8
11
|
init(): Promise<void>;
|
|
9
|
-
deleteFlow(flow: {
|
|
10
|
-
id: string;
|
|
11
|
-
}, flowAlias?: string, temporarily?: boolean): Promise<unknown>;
|
|
12
|
-
recoverFlow(flow: {
|
|
13
|
-
id: string;
|
|
14
|
-
}): Promise<unknown>;
|
|
15
|
-
getFlowById(id: string, projection?: string[], sandbox?: boolean): Promise<Flow>;
|
|
16
|
-
getFlows({ query, projection, includeDeleted, includeExisting, sandbox, limit, offset }?: ListFlowsParams): Promise<List<Flow>>;
|
|
17
|
-
getFlowEvents({ flowId, alias }: {
|
|
18
|
-
flowId: string;
|
|
19
|
-
alias: string;
|
|
20
|
-
}): Promise<unknown>;
|
|
21
|
-
getTriggerFlows(triggers?: never[]): Promise<unknown>;
|
|
22
|
-
listVersions(query: {
|
|
23
|
-
flowId?: string;
|
|
24
|
-
botId?: string;
|
|
25
|
-
version?: string;
|
|
26
|
-
}): Promise<any[]>;
|
|
27
|
-
getVersion(params: {
|
|
28
|
-
flowId: string;
|
|
29
|
-
version: string;
|
|
30
|
-
}): Promise<any>;
|
|
31
|
-
listFlowVersionsByBotId(params: {
|
|
32
|
-
botId: string;
|
|
33
|
-
}): Promise<any[]>;
|
|
34
|
-
loadLogs(params: {
|
|
35
|
-
flowId: string;
|
|
36
|
-
next: string;
|
|
37
|
-
startTime: number;
|
|
38
|
-
endTime: number;
|
|
39
|
-
limit: number;
|
|
40
|
-
filter: string;
|
|
41
|
-
relativeTime: boolean;
|
|
42
|
-
}): Promise<unknown>;
|
|
43
|
-
saveFlow(flow: Flow, { previousVersion }?: {
|
|
44
|
-
previousVersion?: string;
|
|
45
|
-
}): Promise<{
|
|
46
|
-
id: any;
|
|
47
|
-
version: any;
|
|
48
|
-
accountId: string;
|
|
49
|
-
number: string;
|
|
50
|
-
data: {
|
|
51
|
-
label: string;
|
|
52
|
-
isHidden: boolean;
|
|
53
|
-
type: unknown;
|
|
54
|
-
deploy: {
|
|
55
|
-
timeout?: number | undefined;
|
|
56
|
-
memory?: number | undefined;
|
|
57
|
-
role: string;
|
|
58
|
-
};
|
|
59
|
-
description: string;
|
|
60
|
-
stepTemplates: StepTemplateRaw[];
|
|
61
|
-
trees: {
|
|
62
|
-
[key: string]: import("@or-sdk/deployer").Tree;
|
|
63
|
-
};
|
|
64
|
-
packages: unknown;
|
|
65
|
-
meta: {
|
|
66
|
-
[key: string]: unknown;
|
|
67
|
-
};
|
|
68
|
-
color: string | null;
|
|
69
|
-
categories: string[] | null;
|
|
70
|
-
annotations: import("@or-sdk/deployer").Annotation[] | null;
|
|
71
|
-
};
|
|
72
|
-
botId: string;
|
|
73
|
-
tags?: string[] | undefined;
|
|
74
|
-
}>;
|
|
75
|
-
getFlowsByBotId(botId: string, projection: string[]): Promise<List<Flow>>;
|
|
76
|
-
getRemoteDataOutsByBotId(id: string): Promise<any>;
|
|
77
|
-
static getEmptyStep(stepId?: string): {
|
|
78
|
-
id: string;
|
|
79
|
-
icon: string;
|
|
80
|
-
iconType: string;
|
|
81
|
-
iconUrl: string;
|
|
82
|
-
shape: string;
|
|
83
|
-
type: string;
|
|
84
|
-
pinLabel: boolean;
|
|
85
|
-
stepInputData: {};
|
|
86
|
-
};
|
|
87
|
-
static getEmptyFlow(botId: string): any;
|
|
88
|
-
static getNewFlow(botId: string, flowTemplate: any): Promise<any>;
|
|
89
12
|
listFlows(botId?: string, params?: ListFlowsParams): Promise<List<Flow>>;
|
|
90
13
|
getFlow(id: string): Promise<Flow>;
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
14
|
+
saveFlow(source: Flow): Promise<Flow>;
|
|
15
|
+
deleteFlow(source: Flow, flowAlias?: string): Promise<GraphqlResponseCheckExecution>;
|
|
16
|
+
activateFlow(source: Flow, interactiveDebug?: boolean): Promise<PollingResultActivateSuccess>;
|
|
17
|
+
deactivateFlow(source: Flow, flowAlias: string, deleteLambda?: boolean): Promise<PollingResultDeactivateSuccess>;
|
|
18
|
+
addTags(source: Flow, tagNames: string[]): Promise<Flow>;
|
|
19
|
+
removeTags(source: Flow, tagNames: string[]): Promise<Flow>;
|
|
96
20
|
static listUnusedStepTemplates(source: Flow): StepTemplateRaw[];
|
|
97
21
|
static deleteUnusedStepTemplates(source: Flow, stepTemplates?: StepTemplateToDelete[]): Flow;
|
|
98
22
|
}
|
|
23
|
+
//# sourceMappingURL=Flows.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Flows.d.ts","sourceRoot":"","sources":["../../src/Flows.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAY,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAW,6BAA6B,EAA0D,MAAM,kBAAkB,CAAC;AAClI,OAAO,EAAY,IAAI,EAAE,4BAA4B,EAAE,8BAA8B,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACjI,OAAO,EAAE,WAAW,EAAoB,eAAe,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAE/F,OAAO,EAAQ,QAAQ,EAA0C,MAAM,cAAc,CAAC;AAUtF,qBAAa,KAAM,YAAW,QAAQ,CAAC,IAAI,CAAC;IAC1C,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAU;IAClC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAW;IACpC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAO;gBAShB,MAAM,EAAE,WAAW;IAuBzB,IAAI;IAgBG,SAAS,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAsDxE,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAwBlC,QAAQ,CAAC,MAAM,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;IAqBrC,UAAU,CAAC,MAAM,EAAE,IAAI,EAAE,SAAS,SAAQ,GAAG,OAAO,CAAC,6BAA6B,CAAC;IAsCnF,YAAY,CAAC,MAAM,EAAE,IAAI,EAAE,gBAAgB,UAAQ,GAAG,OAAO,CAAC,4BAA4B,CAAC;IAU3F,cAAc,CAAC,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,YAAY,UAAQ,GAAG,OAAO,CAAC,8BAA8B,CAAC;IAU9G,OAAO,CAAC,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAsBxD,UAAU,CAAC,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;WAsB1D,uBAAuB,CAAC,MAAM,EAAE,IAAI,GAAG,eAAe,EAAE;WAYxD,yBAAyB,CAAC,MAAM,EAAE,IAAI,EAAE,aAAa,GAAE,oBAAoB,EAAO,GAAG,IAAI;CAIxG"}
|
|
@@ -1 +1,5 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { DATA_HUB_SERVICE_KEY } from '@or-sdk/data-hub';
|
|
2
|
+
export { DEPLOYER_SERVICE_KEY } from '@or-sdk/deployer';
|
|
3
|
+
export declare const QUERY_DELETE = "mutation deleteTemporarily($entity: EntityType!, $data: DeleteInput!) {\n deleteTemporarily(entity: $entity, data: $data) {\n ... on AsyncRequest {\n requestId\n }\n }\n}";
|
|
4
|
+
export declare const ENTITY_NAME = "FLOW";
|
|
5
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAExD,eAAO,MAAM,YAAY,4LAMvB,CAAC;AAEH,eAAO,MAAM,WAAW,SAAS,CAAC"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,cAAc,SAAS,CAAC"}
|
package/dist/types/types.d.ts
CHANGED
|
@@ -4,9 +4,8 @@ export declare type FlowsConfig = {
|
|
|
4
4
|
token: Token;
|
|
5
5
|
discoveryUrl?: string;
|
|
6
6
|
accountId?: string;
|
|
7
|
-
|
|
7
|
+
dataHubUrl?: string;
|
|
8
8
|
deployerUrl?: string;
|
|
9
|
-
sdkApiUrl?: string;
|
|
10
9
|
};
|
|
11
10
|
export declare type FlowListResponse = {
|
|
12
11
|
count: number;
|
|
@@ -14,28 +13,12 @@ export declare type FlowListResponse = {
|
|
|
14
13
|
last?: string;
|
|
15
14
|
};
|
|
16
15
|
export declare type ListFlowsParams = {
|
|
17
|
-
includeDeleted
|
|
18
|
-
includeExisting
|
|
19
|
-
projection
|
|
20
|
-
query?: {
|
|
21
|
-
[key: string]: any;
|
|
22
|
-
};
|
|
23
|
-
sandbox?: boolean;
|
|
24
|
-
limit?: number;
|
|
25
|
-
offset?: number;
|
|
16
|
+
includeDeleted: boolean;
|
|
17
|
+
includeExisting: boolean;
|
|
18
|
+
projection: string[];
|
|
26
19
|
};
|
|
27
20
|
export declare type StepTemplateToDelete = {
|
|
28
21
|
id: string;
|
|
29
22
|
[key: string]: unknown;
|
|
30
23
|
};
|
|
31
|
-
|
|
32
|
-
id: string;
|
|
33
|
-
data: {
|
|
34
|
-
deploy: {
|
|
35
|
-
role: string;
|
|
36
|
-
};
|
|
37
|
-
};
|
|
38
|
-
};
|
|
39
|
-
export declare type ActivateFlowParams = DeactivageFlowParams & {
|
|
40
|
-
interactiveDebug?: boolean;
|
|
41
|
-
};
|
|
24
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAExC,oBAAY,WAAW,GAAG;IAIxB,KAAK,EAAE,KAAK,CAAC;IAKb,YAAY,CAAC,EAAE,MAAM,CAAC;IAKtB,SAAS,CAAC,EAAE,MAAM,CAAC;IAKnB,UAAU,CAAC,EAAE,MAAM,CAAC;IAKpB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,oBAAY,gBAAgB,GAAG;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,oBAAY,eAAe,GAAG;IAC5B,cAAc,EAAE,OAAO,CAAC;IACxB,eAAe,EAAE,OAAO,CAAC;IACzB,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB,CAAC;AAEF,oBAAY,oBAAoB,GAAG;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB,CAAC"}
|
|
@@ -2,3 +2,4 @@ import { Flow } from '@or-sdk/deployer';
|
|
|
2
2
|
import { StepTemplateToDelete } from '../types';
|
|
3
3
|
declare function deleteUnusedStepTemplates(source: Flow, stepTemplates?: StepTemplateToDelete[]): Flow;
|
|
4
4
|
export default deleteUnusedStepTemplates;
|
|
5
|
+
//# sourceMappingURL=deleteUnusedStepTemplates.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deleteUnusedStepTemplates.d.ts","sourceRoot":"","sources":["../../../src/utils/deleteUnusedStepTemplates.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAExC,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAEhD,iBAAS,yBAAyB,CAAC,MAAM,EAAE,IAAI,EAAE,aAAa,GAAE,oBAAoB,EAAO,GAAG,IAAI,CAkBjG;AAED,eAAe,yBAAyB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,IAAI,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAC/E,OAAO,EAAE,OAAO,IAAI,yBAAyB,EAAE,MAAM,6BAA6B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"listUnusedStepTemplates.d.ts","sourceRoot":"","sources":["../../../src/utils/listUnusedStepTemplates.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEzD,iBAAS,uBAAuB,CAAC,MAAM,EAAE,IAAI,GAAG,eAAe,EAAE,CAgBhE;AAED,eAAe,uBAAuB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,34 +1,32 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.27.0-beta.427.0",
|
|
3
2
|
"name": "@or-sdk/flows",
|
|
3
|
+
"version": "0.27.1-beta.531.0",
|
|
4
4
|
"main": "dist/cjs/index.js",
|
|
5
5
|
"module": "dist/esm/index.js",
|
|
6
6
|
"types": "dist/types/index.d.ts",
|
|
7
7
|
"scripts": {
|
|
8
|
-
"build": "
|
|
9
|
-
"build:watch": "concurrently -r --hide 1,2 \"npm run build:watch:cjs\" \"npm run build:watch:esm\" \"npm run build:watch:types\"",
|
|
8
|
+
"build": "pnpm clean && pnpm build:esm && pnpm build:cjs",
|
|
10
9
|
"build:cjs": "tsc --project tsconfig.json",
|
|
11
|
-
"build:watch:cjs": "tsc --project tsconfig.json -w",
|
|
12
10
|
"build:esm": "tsc --project tsconfig.esm.json",
|
|
13
|
-
"build:watch:esm": "tsc --project tsconfig.esm.json -w",
|
|
14
11
|
"build:types": "tsc --project tsconfig.types.json",
|
|
12
|
+
"build:watch": "concurrently -r --hide 1,2 \"pnpm build:watch:cjs\" \"pnpm build:watch:esm\" \"pnpm build:watch:types\"",
|
|
13
|
+
"build:watch:cjs": "tsc --project tsconfig.json -w",
|
|
14
|
+
"build:watch:esm": "tsc --project tsconfig.esm.json -w",
|
|
15
15
|
"build:watch:types": "tsc --project tsconfig.types.json -w",
|
|
16
16
|
"clean": "rm -rf ./dist",
|
|
17
|
-
"dev": "
|
|
17
|
+
"dev": "pnpm build:watch:esm"
|
|
18
|
+
},
|
|
19
|
+
"dependencies": {
|
|
20
|
+
"@or-sdk/base": "^0.26.3",
|
|
21
|
+
"@or-sdk/data-hub": "^0.25.0",
|
|
22
|
+
"@or-sdk/deployer": "^0.25.0",
|
|
23
|
+
"@or-sdk/tags": "^0.25.1-beta.531.0"
|
|
18
24
|
},
|
|
19
25
|
"devDependencies": {
|
|
20
|
-
"@types/uuid": "^8.3.4",
|
|
21
26
|
"concurrently": "^6.4.0",
|
|
22
27
|
"typescript": "^4.4.4"
|
|
23
28
|
},
|
|
24
29
|
"publishConfig": {
|
|
25
30
|
"access": "public"
|
|
26
|
-
},
|
|
27
|
-
"dependencies": {
|
|
28
|
-
"@or-sdk/base": "^0.24.3-beta.427.0",
|
|
29
|
-
"@or-sdk/data-hub": "^0.23.9-beta.427.0",
|
|
30
|
-
"@or-sdk/deployer": "^0.24.6-beta.427.0",
|
|
31
|
-
"@or-sdk/tags": "^0.25.0-beta.427.0",
|
|
32
|
-
"uuid": "^8.3.2"
|
|
33
31
|
}
|
|
34
32
|
}
|