@or-sdk/idw 4.0.3-beta.1764.0 → 4.0.3-beta.1804.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/cjs/dto/flowUpsert.dto.js +1 -7
- package/dist/cjs/dto/flowUpsert.dto.js.map +1 -1
- package/dist/esm/dto/flowUpsert.dto.js +1 -7
- package/dist/esm/dto/flowUpsert.dto.js.map +1 -1
- package/dist/types/dto/flowUpsert.dto.d.ts +3 -1
- package/dist/types/dto/flowUpsert.dto.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/dto/flowUpsert.dto.ts +1 -8
|
@@ -12,12 +12,6 @@ var __assign = (this && this.__assign) || function () {
|
|
|
12
12
|
};
|
|
13
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
14
|
exports.flowActivateDataDto = exports.flowUpsertDataDto = void 0;
|
|
15
|
-
var getFlowSteps = function (trees) {
|
|
16
|
-
return Object.values(trees).reduce(function (acc, tree) {
|
|
17
|
-
var _a, _b;
|
|
18
|
-
return (_b = acc + ((_a = ((tree.steps || []).filter(function (step) { return step.type !== 'empty'; }))) === null || _a === void 0 ? void 0 : _a.length)) !== null && _b !== void 0 ? _b : 0;
|
|
19
|
-
}, 0);
|
|
20
|
-
};
|
|
21
15
|
function flowUpsertDataDto(flow) {
|
|
22
16
|
var _a = flow.data, description = _a.description, label = _a.label, trees = _a.trees, meta = _a.meta;
|
|
23
17
|
var id = flow.id, botId = flow.botId, dateCreated = flow.dateCreated, dateModified = flow.dateModified;
|
|
@@ -28,7 +22,7 @@ function flowUpsertDataDto(flow) {
|
|
|
28
22
|
dateModified: dateModified,
|
|
29
23
|
description: description,
|
|
30
24
|
label: label,
|
|
31
|
-
|
|
25
|
+
trees: trees,
|
|
32
26
|
meta: meta,
|
|
33
27
|
};
|
|
34
28
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flowUpsert.dto.js","sourceRoot":"","sources":["../../../src/dto/flowUpsert.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAEA,
|
|
1
|
+
{"version":3,"file":"flowUpsert.dto.js","sourceRoot":"","sources":["../../../src/dto/flowUpsert.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAEA,SAAgB,iBAAiB,CAAC,IAAc;IACxC,IAAA,KAAsC,IAAI,CAAC,IAAI,EAA7C,WAAW,iBAAA,EAAE,KAAK,WAAA,EAAE,KAAK,WAAA,EAAE,IAAI,UAAc,CAAC;IAC9C,IAAA,EAAE,GAAuC,IAAI,GAA3C,EAAE,KAAK,GAAgC,IAAI,MAApC,EAAE,WAAW,GAAmB,IAAI,YAAvB,EAAE,YAAY,GAAK,IAAI,aAAT,CAAU;IACtD,OAAO;QACL,EAAE,IAAA;QACF,KAAK,OAAA;QACL,WAAW,aAAA;QACX,YAAY,cAAA;QACZ,WAAW,aAAA;QACX,KAAK,OAAA;QACL,KAAK,OAAA;QACL,IAAI,MAAA;KACL,CAAC;AACJ,CAAC;AAbD,8CAaC;AAED,SAAgB,mBAAmB,CAAC,IAAc;IAChC,IAAA,KAAe,IAAI,CAAC,IAAI,SAAhB,EAAR,GAAG,mBAAG,EAAE,KAAA,CAAiB;IACzC,oBACK,GAAG,EACN;AACJ,CAAC;AALD,kDAKC"}
|
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
const getFlowSteps = (trees) => {
|
|
2
|
-
return Object.values(trees).reduce((acc, tree) => {
|
|
3
|
-
var _a, _b;
|
|
4
|
-
return (_b = acc + ((_a = ((tree.steps || []).filter(step => step.type !== 'empty'))) === null || _a === void 0 ? void 0 : _a.length)) !== null && _b !== void 0 ? _b : 0;
|
|
5
|
-
}, 0);
|
|
6
|
-
};
|
|
7
1
|
export function flowUpsertDataDto(flow) {
|
|
8
2
|
const { description, label, trees, meta } = flow.data;
|
|
9
3
|
const { id, botId, dateCreated, dateModified } = flow;
|
|
@@ -14,7 +8,7 @@ export function flowUpsertDataDto(flow) {
|
|
|
14
8
|
dateModified,
|
|
15
9
|
description,
|
|
16
10
|
label,
|
|
17
|
-
|
|
11
|
+
trees,
|
|
18
12
|
meta,
|
|
19
13
|
};
|
|
20
14
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flowUpsert.dto.js","sourceRoot":"","sources":["../../../src/dto/flowUpsert.dto.ts"],"names":[],"mappings":"AAEA,MAAM,
|
|
1
|
+
{"version":3,"file":"flowUpsert.dto.js","sourceRoot":"","sources":["../../../src/dto/flowUpsert.dto.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,iBAAiB,CAAC,IAAc;IAC9C,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC,IAAI,CAAC;IACtD,MAAM,EAAE,EAAE,EAAE,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,GAAG,IAAI,CAAC;IACtD,OAAO;QACL,EAAE;QACF,KAAK;QACL,WAAW;QACX,YAAY;QACZ,WAAW;QACX,KAAK;QACL,KAAK;QACL,IAAI;KACL,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,mBAAmB,CAAC,IAAc;IAChD,MAAM,EAAE,IAAI,EAAE,EAAE,GAAG,GAAG,EAAE,EAAE,EAAE,GAAG,IAAI,CAAC,IAAI,CAAC;IACzC,yBACK,GAAG,EACN;AACJ,CAAC"}
|
|
@@ -6,7 +6,9 @@ export declare function flowUpsertDataDto(flow: FlowType): {
|
|
|
6
6
|
dateModified: number;
|
|
7
7
|
description: string;
|
|
8
8
|
label: string;
|
|
9
|
-
|
|
9
|
+
trees: {
|
|
10
|
+
[key: string]: import("@or-sdk/deployer").Tree;
|
|
11
|
+
};
|
|
10
12
|
meta: {
|
|
11
13
|
[key: string]: unknown;
|
|
12
14
|
idw?: import("@or-sdk/deployer").IDWFlowMeta | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flowUpsert.dto.d.ts","sourceRoot":"","sources":["../../../src/dto/flowUpsert.dto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,IAAI,QAAQ,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"flowUpsert.dto.d.ts","sourceRoot":"","sources":["../../../src/dto/flowUpsert.dto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,IAAI,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEpD,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,QAAQ;;;;;;;;;;;;;;EAa/C;AAED,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,QAAQ;;;EAKjD"}
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "4.0.3-beta.
|
|
2
|
+
"version": "4.0.3-beta.1804.0",
|
|
3
3
|
"name": "@or-sdk/idw",
|
|
4
4
|
"main": "dist/cjs/index.js",
|
|
5
5
|
"module": "dist/esm/index.js",
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
"access": "public"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@or-sdk/base": "^0.28.
|
|
28
|
-
"@or-sdk/deployer": "^1.1.
|
|
29
|
-
"@or-sdk/providers": "^0.2.
|
|
27
|
+
"@or-sdk/base": "^0.28.4-beta.1804.0",
|
|
28
|
+
"@or-sdk/deployer": "^1.1.6-beta.1804.0",
|
|
29
|
+
"@or-sdk/providers": "^0.2.5-beta.1804.0"
|
|
30
30
|
}
|
|
31
31
|
}
|
|
@@ -1,11 +1,5 @@
|
|
|
1
1
|
import { Flow as FlowType } from '@or-sdk/deployer';
|
|
2
2
|
|
|
3
|
-
const getFlowSteps = (trees: FlowType['data']['trees']): number => {
|
|
4
|
-
return Object.values(trees).reduce((acc, tree) => {
|
|
5
|
-
return acc + ((tree.steps || []).filter(step => step.type !== 'empty'))?.length ?? 0;
|
|
6
|
-
}, 0);
|
|
7
|
-
};
|
|
8
|
-
|
|
9
3
|
export function flowUpsertDataDto(flow: FlowType) {
|
|
10
4
|
const { description, label, trees, meta } = flow.data;
|
|
11
5
|
const { id, botId, dateCreated, dateModified } = flow;
|
|
@@ -16,12 +10,11 @@ export function flowUpsertDataDto(flow: FlowType) {
|
|
|
16
10
|
dateModified,
|
|
17
11
|
description,
|
|
18
12
|
label,
|
|
19
|
-
|
|
13
|
+
trees,
|
|
20
14
|
meta,
|
|
21
15
|
};
|
|
22
16
|
}
|
|
23
17
|
|
|
24
|
-
|
|
25
18
|
export function flowActivateDataDto(flow: FlowType) {
|
|
26
19
|
const { meta: { idw = {} } } = flow.data;
|
|
27
20
|
return {
|