@pxp-nd/flow 1.0.70 → 1.0.72
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/controllers/Flow.d.ts +1 -0
- package/dist/controllers/Flow.js +62 -0
- package/package.json +1 -1
- package/.yalc/@pxp-nd/flow/.yalc/@pxp-nd/flow/README.md +0 -1
- package/.yalc/@pxp-nd/flow/.yalc/@pxp-nd/flow/dist/controllers/Action.d.ts +0 -20
- package/.yalc/@pxp-nd/flow/.yalc/@pxp-nd/flow/dist/controllers/Action.js +0 -82
- package/.yalc/@pxp-nd/flow/.yalc/@pxp-nd/flow/dist/controllers/ActionType.d.ts +0 -17
- package/.yalc/@pxp-nd/flow/.yalc/@pxp-nd/flow/dist/controllers/ActionType.js +0 -28
- package/.yalc/@pxp-nd/flow/.yalc/@pxp-nd/flow/dist/controllers/Event.d.ts +0 -17
- package/.yalc/@pxp-nd/flow/.yalc/@pxp-nd/flow/dist/controllers/Event.js +0 -28
- package/.yalc/@pxp-nd/flow/.yalc/@pxp-nd/flow/dist/controllers/FieldMap.d.ts +0 -17
- package/.yalc/@pxp-nd/flow/.yalc/@pxp-nd/flow/dist/controllers/FieldMap.js +0 -28
- package/.yalc/@pxp-nd/flow/.yalc/@pxp-nd/flow/dist/controllers/Flow.d.ts +0 -24
- package/.yalc/@pxp-nd/flow/.yalc/@pxp-nd/flow/dist/controllers/Flow.js +0 -116
- package/.yalc/@pxp-nd/flow/.yalc/@pxp-nd/flow/dist/controllers/FlowInstance.d.ts +0 -20
- package/.yalc/@pxp-nd/flow/.yalc/@pxp-nd/flow/dist/controllers/FlowInstance.js +0 -78
- package/.yalc/@pxp-nd/flow/.yalc/@pxp-nd/flow/dist/controllers/Node.d.ts +0 -23
- package/.yalc/@pxp-nd/flow/.yalc/@pxp-nd/flow/dist/controllers/Node.js +0 -273
- package/.yalc/@pxp-nd/flow/.yalc/@pxp-nd/flow/dist/controllers/NodeInstance.d.ts +0 -21
- package/.yalc/@pxp-nd/flow/.yalc/@pxp-nd/flow/dist/controllers/NodeInstance.js +0 -165
- package/.yalc/@pxp-nd/flow/.yalc/@pxp-nd/flow/dist/controllers/OriginName.d.ts +0 -17
- package/.yalc/@pxp-nd/flow/.yalc/@pxp-nd/flow/dist/controllers/OriginName.js +0 -28
- package/.yalc/@pxp-nd/flow/.yalc/@pxp-nd/flow/dist/controllers/index.d.ts +0 -11
- package/.yalc/@pxp-nd/flow/.yalc/@pxp-nd/flow/dist/controllers/index.js +0 -25
- package/.yalc/@pxp-nd/flow/.yalc/@pxp-nd/flow/dist/entity/Action.d.ts +0 -20
- package/.yalc/@pxp-nd/flow/.yalc/@pxp-nd/flow/dist/entity/Action.js +0 -85
- package/.yalc/@pxp-nd/flow/.yalc/@pxp-nd/flow/dist/entity/ActionType.d.ts +0 -16
- package/.yalc/@pxp-nd/flow/.yalc/@pxp-nd/flow/dist/entity/ActionType.js +0 -71
- package/.yalc/@pxp-nd/flow/.yalc/@pxp-nd/flow/dist/entity/Event.d.ts +0 -9
- package/.yalc/@pxp-nd/flow/.yalc/@pxp-nd/flow/dist/entity/Event.js +0 -44
- package/.yalc/@pxp-nd/flow/.yalc/@pxp-nd/flow/dist/entity/FieldMap.d.ts +0 -11
- package/.yalc/@pxp-nd/flow/.yalc/@pxp-nd/flow/dist/entity/FieldMap.js +0 -52
- package/.yalc/@pxp-nd/flow/.yalc/@pxp-nd/flow/dist/entity/Flow.d.ts +0 -14
- package/.yalc/@pxp-nd/flow/.yalc/@pxp-nd/flow/dist/entity/Flow.js +0 -60
- package/.yalc/@pxp-nd/flow/.yalc/@pxp-nd/flow/dist/entity/FlowInstance.d.ts +0 -16
- package/.yalc/@pxp-nd/flow/.yalc/@pxp-nd/flow/dist/entity/FlowInstance.js +0 -69
- package/.yalc/@pxp-nd/flow/.yalc/@pxp-nd/flow/dist/entity/Node.d.ts +0 -23
- package/.yalc/@pxp-nd/flow/.yalc/@pxp-nd/flow/dist/entity/Node.js +0 -93
- package/.yalc/@pxp-nd/flow/.yalc/@pxp-nd/flow/dist/entity/NodeConnection.d.ts +0 -10
- package/.yalc/@pxp-nd/flow/.yalc/@pxp-nd/flow/dist/entity/NodeConnection.js +0 -49
- package/.yalc/@pxp-nd/flow/.yalc/@pxp-nd/flow/dist/entity/NodeInstance.d.ts +0 -13
- package/.yalc/@pxp-nd/flow/.yalc/@pxp-nd/flow/dist/entity/NodeInstance.js +0 -58
- package/.yalc/@pxp-nd/flow/.yalc/@pxp-nd/flow/dist/entity/OriginName.d.ts +0 -9
- package/.yalc/@pxp-nd/flow/.yalc/@pxp-nd/flow/dist/entity/OriginName.js +0 -43
- package/.yalc/@pxp-nd/flow/.yalc/@pxp-nd/flow/dist/entity/index.d.ts +0 -23
- package/.yalc/@pxp-nd/flow/.yalc/@pxp-nd/flow/dist/entity/index.js +0 -27
- package/.yalc/@pxp-nd/flow/.yalc/@pxp-nd/flow/dist/index.d.ts +0 -3
- package/.yalc/@pxp-nd/flow/.yalc/@pxp-nd/flow/dist/index.js +0 -15
- package/.yalc/@pxp-nd/flow/.yalc/@pxp-nd/flow/dist/subscribers/Event.d.ts +0 -21
- package/.yalc/@pxp-nd/flow/.yalc/@pxp-nd/flow/dist/subscribers/Event.js +0 -83
- package/.yalc/@pxp-nd/flow/.yalc/@pxp-nd/flow/dist/subscribers/index.d.ts +0 -3
- package/.yalc/@pxp-nd/flow/.yalc/@pxp-nd/flow/dist/subscribers/index.js +0 -6
- package/.yalc/@pxp-nd/flow/.yalc/@pxp-nd/flow/package.json +0 -39
- package/.yalc/@pxp-nd/flow/.yalc/@pxp-nd/flow/tsconfig.json +0 -29
- package/.yalc/@pxp-nd/flow/.yalc/@pxp-nd/flow/yalc.sig +0 -1
- package/.yalc/@pxp-nd/flow/README.md +0 -1
- package/.yalc/@pxp-nd/flow/dist/controllers/Action.d.ts +0 -20
- package/.yalc/@pxp-nd/flow/dist/controllers/Action.js +0 -82
- package/.yalc/@pxp-nd/flow/dist/controllers/ActionType.d.ts +0 -17
- package/.yalc/@pxp-nd/flow/dist/controllers/ActionType.js +0 -28
- package/.yalc/@pxp-nd/flow/dist/controllers/Event.d.ts +0 -17
- package/.yalc/@pxp-nd/flow/dist/controllers/Event.js +0 -28
- package/.yalc/@pxp-nd/flow/dist/controllers/FieldMap.d.ts +0 -17
- package/.yalc/@pxp-nd/flow/dist/controllers/FieldMap.js +0 -28
- package/.yalc/@pxp-nd/flow/dist/controllers/Flow.d.ts +0 -33
- package/.yalc/@pxp-nd/flow/dist/controllers/Flow.js +0 -469
- package/.yalc/@pxp-nd/flow/dist/controllers/FlowInstance.d.ts +0 -20
- package/.yalc/@pxp-nd/flow/dist/controllers/FlowInstance.js +0 -84
- package/.yalc/@pxp-nd/flow/dist/controllers/Node.d.ts +0 -23
- package/.yalc/@pxp-nd/flow/dist/controllers/Node.js +0 -273
- package/.yalc/@pxp-nd/flow/dist/controllers/NodeInstance.d.ts +0 -21
- package/.yalc/@pxp-nd/flow/dist/controllers/NodeInstance.js +0 -191
- package/.yalc/@pxp-nd/flow/dist/controllers/OriginName.d.ts +0 -17
- package/.yalc/@pxp-nd/flow/dist/controllers/OriginName.js +0 -28
- package/.yalc/@pxp-nd/flow/dist/controllers/index.d.ts +0 -11
- package/.yalc/@pxp-nd/flow/dist/controllers/index.js +0 -25
- package/.yalc/@pxp-nd/flow/dist/entity/Action.d.ts +0 -20
- package/.yalc/@pxp-nd/flow/dist/entity/Action.js +0 -85
- package/.yalc/@pxp-nd/flow/dist/entity/ActionType.d.ts +0 -16
- package/.yalc/@pxp-nd/flow/dist/entity/ActionType.js +0 -71
- package/.yalc/@pxp-nd/flow/dist/entity/Event.d.ts +0 -9
- package/.yalc/@pxp-nd/flow/dist/entity/Event.js +0 -44
- package/.yalc/@pxp-nd/flow/dist/entity/FieldMap.d.ts +0 -11
- package/.yalc/@pxp-nd/flow/dist/entity/FieldMap.js +0 -52
- package/.yalc/@pxp-nd/flow/dist/entity/Flow.d.ts +0 -14
- package/.yalc/@pxp-nd/flow/dist/entity/Flow.js +0 -60
- package/.yalc/@pxp-nd/flow/dist/entity/FlowInstance.d.ts +0 -16
- package/.yalc/@pxp-nd/flow/dist/entity/FlowInstance.js +0 -69
- package/.yalc/@pxp-nd/flow/dist/entity/Node.d.ts +0 -23
- package/.yalc/@pxp-nd/flow/dist/entity/Node.js +0 -93
- package/.yalc/@pxp-nd/flow/dist/entity/NodeConnection.d.ts +0 -10
- package/.yalc/@pxp-nd/flow/dist/entity/NodeConnection.js +0 -49
- package/.yalc/@pxp-nd/flow/dist/entity/NodeInstance.d.ts +0 -13
- package/.yalc/@pxp-nd/flow/dist/entity/NodeInstance.js +0 -58
- package/.yalc/@pxp-nd/flow/dist/entity/OriginName.d.ts +0 -9
- package/.yalc/@pxp-nd/flow/dist/entity/OriginName.js +0 -43
- package/.yalc/@pxp-nd/flow/dist/entity/index.d.ts +0 -23
- package/.yalc/@pxp-nd/flow/dist/entity/index.js +0 -27
- package/.yalc/@pxp-nd/flow/dist/index.d.ts +0 -3
- package/.yalc/@pxp-nd/flow/dist/index.js +0 -19
- package/.yalc/@pxp-nd/flow/dist/subscribers/Event.d.ts +0 -21
- package/.yalc/@pxp-nd/flow/dist/subscribers/Event.js +0 -84
- package/.yalc/@pxp-nd/flow/dist/subscribers/index.d.ts +0 -3
- package/.yalc/@pxp-nd/flow/dist/subscribers/index.js +0 -6
- package/.yalc/@pxp-nd/flow/package.json +0 -39
- package/.yalc/@pxp-nd/flow/tsconfig.json +0 -29
- package/.yalc/@pxp-nd/flow/yalc.lock +0 -9
- package/.yalc/@pxp-nd/flow/yalc.sig +0 -1
- package/yalc.lock +0 -9
|
@@ -35,6 +35,7 @@ declare class Flow extends Controller {
|
|
|
35
35
|
insertEventFlow(params: Record<string, any>, manager: EntityManager): Promise<unknown>;
|
|
36
36
|
removeFlow(params: Record<string, any>, manager: EntityManager): Promise<unknown>;
|
|
37
37
|
changeStatusFlow(params: Record<string, any>, manager: EntityManager): Promise<unknown>;
|
|
38
|
+
validateFlow(flowId: number, manager: EntityManager): Promise<unknown>;
|
|
38
39
|
basicFlowList(params: Record<string, any>): Promise<unknown>;
|
|
39
40
|
}
|
|
40
41
|
export default Flow;
|
package/dist/controllers/Flow.js
CHANGED
|
@@ -18,12 +18,35 @@
|
|
|
18
18
|
* 01-Sep-2023 SP08SEP23 Rensi Arteaga add base flow list
|
|
19
19
|
* ******************************************************************************
|
|
20
20
|
*/
|
|
21
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
22
|
+
if (k2 === undefined) k2 = k;
|
|
23
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
24
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
25
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
26
|
+
}
|
|
27
|
+
Object.defineProperty(o, k2, desc);
|
|
28
|
+
}) : (function(o, m, k, k2) {
|
|
29
|
+
if (k2 === undefined) k2 = k;
|
|
30
|
+
o[k2] = m[k];
|
|
31
|
+
}));
|
|
32
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
33
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
34
|
+
}) : function(o, v) {
|
|
35
|
+
o["default"] = v;
|
|
36
|
+
});
|
|
21
37
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
22
38
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
23
39
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
24
40
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
25
41
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
26
42
|
};
|
|
43
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
44
|
+
if (mod && mod.__esModule) return mod;
|
|
45
|
+
var result = {};
|
|
46
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
47
|
+
__setModuleDefault(result, mod);
|
|
48
|
+
return result;
|
|
49
|
+
};
|
|
27
50
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
28
51
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
29
52
|
};
|
|
@@ -33,6 +56,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
33
56
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
34
57
|
const typeorm_1 = require("typeorm");
|
|
35
58
|
const core_1 = require("@pxp-nd/core");
|
|
59
|
+
const _ = __importStar(require("lodash"));
|
|
36
60
|
const Node_1 = __importDefault(require("../entity/Node"));
|
|
37
61
|
const Action_1 = __importDefault(require("../entity/Action"));
|
|
38
62
|
const NodeConnection_1 = __importDefault(require("../entity/NodeConnection"));
|
|
@@ -488,6 +512,7 @@ let Flow = class Flow extends core_1.Controller {
|
|
|
488
512
|
let dataFlow = await (0, core_1.__)(Flow_1.default.findOne(params.flowId));
|
|
489
513
|
if (dataFlow) {
|
|
490
514
|
if (dataFlow.status === 'off') {
|
|
515
|
+
await this.validateFlow(params.flowId, manager);
|
|
491
516
|
//change to active
|
|
492
517
|
dataFlow.status = 'on';
|
|
493
518
|
}
|
|
@@ -503,6 +528,43 @@ let Flow = class Flow extends core_1.Controller {
|
|
|
503
528
|
return { success: false };
|
|
504
529
|
}
|
|
505
530
|
}
|
|
531
|
+
async validateFlow(flowId, manager) {
|
|
532
|
+
const nodes = await Node_1.default.find({ flowId, isActive: true });
|
|
533
|
+
let res = '';
|
|
534
|
+
for (const node of nodes) {
|
|
535
|
+
const configActionType = !node.action.actionType.schemaJson ? {} : JSON.parse(node.action.actionType.schemaJson);
|
|
536
|
+
const configAction = !node.action.schemaJson ? {} : JSON.parse(node.action.schemaJson);
|
|
537
|
+
const config = _.merge({}, configActionType, configAction);
|
|
538
|
+
const required = [];
|
|
539
|
+
for (const key in config) {
|
|
540
|
+
if (config.hasOwnProperty(key)) {
|
|
541
|
+
const prop = config[key];
|
|
542
|
+
if (prop && typeof prop === "object" &&
|
|
543
|
+
((prop.validate && prop.validate.shape.includes('required')) ||
|
|
544
|
+
(prop.formComponent && prop.formComponent.validate && prop.formComponent.validate.shape.includes('required')))) {
|
|
545
|
+
required.push(key);
|
|
546
|
+
}
|
|
547
|
+
}
|
|
548
|
+
}
|
|
549
|
+
const valueNode = !node.actionConfigJson ? {} : JSON.parse(node.actionConfigJson);
|
|
550
|
+
const valueAction = !node.action.configJsonTemplate ? {} : JSON.parse(node.action.configJsonTemplate);
|
|
551
|
+
const values = _.merge({}, valueAction, valueNode);
|
|
552
|
+
const missingRequired = [];
|
|
553
|
+
required.forEach((property) => {
|
|
554
|
+
if (!values.hasOwnProperty(property)) {
|
|
555
|
+
missingRequired.push(property);
|
|
556
|
+
}
|
|
557
|
+
});
|
|
558
|
+
if (missingRequired.length > 0) {
|
|
559
|
+
res += `In node ${node.action.name} you have missing fields: ${missingRequired.join(',')}, `;
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
if (res != '') {
|
|
563
|
+
res = res.slice(0, -2);
|
|
564
|
+
throw new core_1.PxpError(400, 'Please resolve these issues before starting the flow: ' + res);
|
|
565
|
+
}
|
|
566
|
+
return true;
|
|
567
|
+
}
|
|
506
568
|
async basicFlowList(params) {
|
|
507
569
|
const isActive = params._isActive;
|
|
508
570
|
const type = params._type;
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
# flow-nd
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Effex 2021
|
|
3
|
-
*
|
|
4
|
-
* MIT
|
|
5
|
-
*
|
|
6
|
-
* Member Controller
|
|
7
|
-
*
|
|
8
|
-
* @summary Member Controller
|
|
9
|
-
* @author Favio Figueroa
|
|
10
|
-
*
|
|
11
|
-
* Created at : 2021-07-08 12:55:38
|
|
12
|
-
* Last modified :
|
|
13
|
-
*/
|
|
14
|
-
import { EntityManager } from 'typeorm';
|
|
15
|
-
import { Controller } from '@pxp-nd/core';
|
|
16
|
-
declare class Action extends Controller {
|
|
17
|
-
getFieldMapByAction(params: Record<string, any>, manager: EntityManager): Promise<unknown>;
|
|
18
|
-
getActions(params: Record<string, any>, manager: EntityManager): Promise<unknown>;
|
|
19
|
-
}
|
|
20
|
-
export default Action;
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Effex 2021
|
|
4
|
-
*
|
|
5
|
-
* MIT
|
|
6
|
-
*
|
|
7
|
-
* Member Controller
|
|
8
|
-
*
|
|
9
|
-
* @summary Member Controller
|
|
10
|
-
* @author Favio Figueroa
|
|
11
|
-
*
|
|
12
|
-
* Created at : 2021-07-08 12:55:38
|
|
13
|
-
* Last modified :
|
|
14
|
-
*/
|
|
15
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
16
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
17
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
18
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
19
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
20
|
-
};
|
|
21
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
22
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
23
|
-
};
|
|
24
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
25
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
26
|
-
};
|
|
27
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
-
const typeorm_1 = require("typeorm");
|
|
29
|
-
const core_1 = require("@pxp-nd/core");
|
|
30
|
-
const Action_1 = __importDefault(require("../entity/Action"));
|
|
31
|
-
const FieldMap_1 = __importDefault(require("../entity/FieldMap"));
|
|
32
|
-
const OriginName_1 = __importDefault(require("../entity/OriginName"));
|
|
33
|
-
let Action = class Action extends core_1.Controller {
|
|
34
|
-
async getFieldMapByAction(params, manager) {
|
|
35
|
-
const { originName } = params;
|
|
36
|
-
const fieldMapData = await core_1.__(manager.createQueryBuilder(FieldMap_1.default, 'fm')
|
|
37
|
-
.innerJoin(OriginName_1.default, 'on', 'on.originNameId = fm.originNameId')
|
|
38
|
-
.where("on.name = :n ", { n: originName })
|
|
39
|
-
.getMany());
|
|
40
|
-
return fieldMapData;
|
|
41
|
-
}
|
|
42
|
-
async getActions(params, manager) {
|
|
43
|
-
const { actionTypeName, actionId } = params;
|
|
44
|
-
/* const actionsData = await __(getManager().createQueryBuilder(ActionEntity, 'ae')
|
|
45
|
-
.innerJoin(ActionTypeEntity, 'ate', 'ae.actionTypeId = ate.actionTypeId')
|
|
46
|
-
.where(`ate.name = '${actionTypeName}' `)
|
|
47
|
-
.getMany()
|
|
48
|
-
);*/
|
|
49
|
-
const actionsFind = await Action_1.default.find({
|
|
50
|
-
relations: ['actionType'],
|
|
51
|
-
where: {
|
|
52
|
-
...(actionTypeName ? { actionType: {
|
|
53
|
-
name: actionTypeName
|
|
54
|
-
} } : {}),
|
|
55
|
-
...(actionId ? { actionId: actionId } : {}),
|
|
56
|
-
}
|
|
57
|
-
});
|
|
58
|
-
return { data: actionsFind };
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
|
-
__decorate([
|
|
62
|
-
core_1.Get(),
|
|
63
|
-
core_1.DbSettings('Orm'),
|
|
64
|
-
core_1.ReadOnly(false),
|
|
65
|
-
core_1.Log(true),
|
|
66
|
-
__metadata("design:type", Function),
|
|
67
|
-
__metadata("design:paramtypes", [Object, typeorm_1.EntityManager]),
|
|
68
|
-
__metadata("design:returntype", Promise)
|
|
69
|
-
], Action.prototype, "getFieldMapByAction", null);
|
|
70
|
-
__decorate([
|
|
71
|
-
core_1.Get(),
|
|
72
|
-
core_1.DbSettings('Orm'),
|
|
73
|
-
core_1.ReadOnly(true),
|
|
74
|
-
core_1.Log(true),
|
|
75
|
-
__metadata("design:type", Function),
|
|
76
|
-
__metadata("design:paramtypes", [Object, typeorm_1.EntityManager]),
|
|
77
|
-
__metadata("design:returntype", Promise)
|
|
78
|
-
], Action.prototype, "getActions", null);
|
|
79
|
-
Action = __decorate([
|
|
80
|
-
core_1.Model('flow-nd/Action')
|
|
81
|
-
], Action);
|
|
82
|
-
exports.default = Action;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Effex 2021
|
|
3
|
-
*
|
|
4
|
-
* MIT
|
|
5
|
-
*
|
|
6
|
-
* Member Controller
|
|
7
|
-
*
|
|
8
|
-
* @summary Member Controller
|
|
9
|
-
* @author Favio Figueroa
|
|
10
|
-
*
|
|
11
|
-
* Created at : 2021-07-08 12:55:38
|
|
12
|
-
* Last modified :
|
|
13
|
-
*/
|
|
14
|
-
import { Controller } from '@pxp-nd/core';
|
|
15
|
-
declare class ActionType extends Controller {
|
|
16
|
-
}
|
|
17
|
-
export default ActionType;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Effex 2021
|
|
4
|
-
*
|
|
5
|
-
* MIT
|
|
6
|
-
*
|
|
7
|
-
* Member Controller
|
|
8
|
-
*
|
|
9
|
-
* @summary Member Controller
|
|
10
|
-
* @author Favio Figueroa
|
|
11
|
-
*
|
|
12
|
-
* Created at : 2021-07-08 12:55:38
|
|
13
|
-
* Last modified :
|
|
14
|
-
*/
|
|
15
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
16
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
17
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
18
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
19
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
20
|
-
};
|
|
21
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
const core_1 = require("@pxp-nd/core");
|
|
23
|
-
let ActionType = class ActionType extends core_1.Controller {
|
|
24
|
-
};
|
|
25
|
-
ActionType = __decorate([
|
|
26
|
-
core_1.Model('flow-nd/ActionType')
|
|
27
|
-
], ActionType);
|
|
28
|
-
exports.default = ActionType;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Effex 2021
|
|
3
|
-
*
|
|
4
|
-
* MIT
|
|
5
|
-
*
|
|
6
|
-
* Member Controller
|
|
7
|
-
*
|
|
8
|
-
* @summary Member Controller
|
|
9
|
-
* @author Favio Figueroa
|
|
10
|
-
*
|
|
11
|
-
* Created at : 2021-07-08 12:55:38
|
|
12
|
-
* Last modified :
|
|
13
|
-
*/
|
|
14
|
-
import { Controller } from '@pxp-nd/core';
|
|
15
|
-
declare class Event extends Controller {
|
|
16
|
-
}
|
|
17
|
-
export default Event;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Effex 2021
|
|
4
|
-
*
|
|
5
|
-
* MIT
|
|
6
|
-
*
|
|
7
|
-
* Member Controller
|
|
8
|
-
*
|
|
9
|
-
* @summary Member Controller
|
|
10
|
-
* @author Favio Figueroa
|
|
11
|
-
*
|
|
12
|
-
* Created at : 2021-07-08 12:55:38
|
|
13
|
-
* Last modified :
|
|
14
|
-
*/
|
|
15
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
16
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
17
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
18
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
19
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
20
|
-
};
|
|
21
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
const core_1 = require("@pxp-nd/core");
|
|
23
|
-
let Event = class Event extends core_1.Controller {
|
|
24
|
-
};
|
|
25
|
-
Event = __decorate([
|
|
26
|
-
core_1.Model('flow-nd/Event')
|
|
27
|
-
], Event);
|
|
28
|
-
exports.default = Event;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Effex 2021
|
|
3
|
-
*
|
|
4
|
-
* MIT
|
|
5
|
-
*
|
|
6
|
-
* Member Controller
|
|
7
|
-
*
|
|
8
|
-
* @summary Member Controller
|
|
9
|
-
* @author Favio Figueroa
|
|
10
|
-
*
|
|
11
|
-
* Created at : 2021-07-08 12:55:38
|
|
12
|
-
* Last modified :
|
|
13
|
-
*/
|
|
14
|
-
import { Controller } from '@pxp-nd/core';
|
|
15
|
-
declare class FieldMap extends Controller {
|
|
16
|
-
}
|
|
17
|
-
export default FieldMap;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Effex 2021
|
|
4
|
-
*
|
|
5
|
-
* MIT
|
|
6
|
-
*
|
|
7
|
-
* Member Controller
|
|
8
|
-
*
|
|
9
|
-
* @summary Member Controller
|
|
10
|
-
* @author Favio Figueroa
|
|
11
|
-
*
|
|
12
|
-
* Created at : 2021-07-08 12:55:38
|
|
13
|
-
* Last modified :
|
|
14
|
-
*/
|
|
15
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
16
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
17
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
18
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
19
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
20
|
-
};
|
|
21
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
const core_1 = require("@pxp-nd/core");
|
|
23
|
-
let FieldMap = class FieldMap extends core_1.Controller {
|
|
24
|
-
};
|
|
25
|
-
FieldMap = __decorate([
|
|
26
|
-
core_1.Model('flow-nd/FieldMap')
|
|
27
|
-
], FieldMap);
|
|
28
|
-
exports.default = FieldMap;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Effex 2021
|
|
3
|
-
*
|
|
4
|
-
* MIT
|
|
5
|
-
*
|
|
6
|
-
* Flow Controller
|
|
7
|
-
*
|
|
8
|
-
* @summary Flow Controller
|
|
9
|
-
* @author Jaime Figueroa
|
|
10
|
-
*
|
|
11
|
-
* Created at : 2021-07-08 12:55:38
|
|
12
|
-
* Last modified :
|
|
13
|
-
*/
|
|
14
|
-
import { EntityManager } from 'typeorm';
|
|
15
|
-
import { Controller } from '@pxp-nd/core';
|
|
16
|
-
declare class Flow extends Controller {
|
|
17
|
-
get(params: Record<string, any>): Promise<unknown>;
|
|
18
|
-
copyNodeConnections(nodeId: number, newNodeId: number, newFlowId: number, manager: EntityManager): Promise<void>;
|
|
19
|
-
copyNode(node: Record<any, any>, newFlowId: number, manager: EntityManager): Promise<{
|
|
20
|
-
nodeId: any;
|
|
21
|
-
}>;
|
|
22
|
-
createFlowFromFlow(params: Record<string, any>, manager: EntityManager): Promise<unknown>;
|
|
23
|
-
}
|
|
24
|
-
export default Flow;
|
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Effex 2021
|
|
4
|
-
*
|
|
5
|
-
* MIT
|
|
6
|
-
*
|
|
7
|
-
* Flow Controller
|
|
8
|
-
*
|
|
9
|
-
* @summary Flow Controller
|
|
10
|
-
* @author Jaime Figueroa
|
|
11
|
-
*
|
|
12
|
-
* Created at : 2021-07-08 12:55:38
|
|
13
|
-
* Last modified :
|
|
14
|
-
*/
|
|
15
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
16
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
17
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
18
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
19
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
20
|
-
};
|
|
21
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
22
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
23
|
-
};
|
|
24
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
25
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
26
|
-
};
|
|
27
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
-
const typeorm_1 = require("typeorm");
|
|
29
|
-
const core_1 = require("@pxp-nd/core");
|
|
30
|
-
const Node_1 = __importDefault(require("../entity/Node"));
|
|
31
|
-
const NodeConnection_1 = __importDefault(require("../entity/NodeConnection"));
|
|
32
|
-
const Flow_1 = __importDefault(require("../entity/Flow"));
|
|
33
|
-
let Flow = class Flow extends core_1.Controller {
|
|
34
|
-
async get(params) {
|
|
35
|
-
const nodes = await Node_1.default.find({ flowId: params.flowId });
|
|
36
|
-
const restNodes = [];
|
|
37
|
-
for (let node of nodes) {
|
|
38
|
-
const { actionConfigJson, action: { actionType: { schemaJson } } } = node;
|
|
39
|
-
const actionConfigJsonObject = actionConfigJson ? JSON.parse(actionConfigJson) : {};
|
|
40
|
-
const schemaJsonObject = schemaJson ? JSON.parse(schemaJson) : {};
|
|
41
|
-
const valuesForShowingInNode = {};
|
|
42
|
-
Object.entries(schemaJsonObject).filter(([n, sjo]) => sjo.showInNode === true).forEach(([nameKey, json]) => {
|
|
43
|
-
valuesForShowingInNode[nameKey] = {
|
|
44
|
-
label: json.label,
|
|
45
|
-
value: actionConfigJsonObject[nameKey] || null
|
|
46
|
-
};
|
|
47
|
-
});
|
|
48
|
-
const nodeRow = {
|
|
49
|
-
...node,
|
|
50
|
-
valuesForShowingInNode
|
|
51
|
-
};
|
|
52
|
-
const connections = await NodeConnection_1.default.find({ nodeIdMaster: node.nodeId });
|
|
53
|
-
restNodes.push({ node: nodeRow, connections: connections.map(c => c.nodeIdChild) });
|
|
54
|
-
}
|
|
55
|
-
return restNodes;
|
|
56
|
-
}
|
|
57
|
-
async copyNodeConnections(nodeId, newNodeId, newFlowId, manager) {
|
|
58
|
-
const connections = await core_1.__(NodeConnection_1.default.find({ nodeIdMaster: nodeId }));
|
|
59
|
-
for (let connection of connections) {
|
|
60
|
-
const newNodeConnection = new NodeConnection_1.default();
|
|
61
|
-
const { nodeConnectionId, nodeIdMaster, nodeIdChild, createdAt, modifiedAt, ...nodeConnectionToCopy } = connection;
|
|
62
|
-
// get node from nodeIdChild
|
|
63
|
-
const dataNodeChild = await Node_1.default.findOne({ nodeId: connection.nodeIdChild });
|
|
64
|
-
const { nodeId: newNodeIdChild } = await this.copyNode(dataNodeChild, newFlowId, manager);
|
|
65
|
-
Object.assign(newNodeConnection, { ...nodeConnectionToCopy, nodeIdMaster: newNodeId, nodeIdChild: newNodeIdChild });
|
|
66
|
-
const insertNewNodeConnection = await core_1.__(manager.save(NodeConnection_1.default, newNodeConnection));
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
async copyNode(node, newFlowId, manager) {
|
|
70
|
-
// insert new node
|
|
71
|
-
const newNode = new Node_1.default();
|
|
72
|
-
const { nodeId, flowId, createdAt, modifiedAt, actionConfigJson, ...nodeToCopy } = node;
|
|
73
|
-
Object.assign(newNode, { ...nodeToCopy, flowId: newFlowId });
|
|
74
|
-
const insertNewNode = await core_1.__(manager.save(Node_1.default, newNode));
|
|
75
|
-
// insert connection
|
|
76
|
-
await this.copyNodeConnections(node.nodeId, insertNewNode.nodeId, newFlowId, manager);
|
|
77
|
-
return { nodeId: insertNewNode.nodeId };
|
|
78
|
-
}
|
|
79
|
-
async createFlowFromFlow(params, manager) {
|
|
80
|
-
// we need clone the flow selected
|
|
81
|
-
const dataFlow = await core_1.__(Flow_1.default.findOne(params.flowId));
|
|
82
|
-
const { flowId, createdAt, modifiedAt, nodes, ...flowToCopy } = dataFlow;
|
|
83
|
-
const newFlow = new Flow_1.default();
|
|
84
|
-
Object.assign(newFlow, flowToCopy);
|
|
85
|
-
newFlow.name = params.name;
|
|
86
|
-
newFlow.description = params.description;
|
|
87
|
-
const insertNewFlow = await core_1.__(manager.save(Flow_1.default, newFlow));
|
|
88
|
-
// create the nodes
|
|
89
|
-
// get the first node "the trigger node"
|
|
90
|
-
const dataNode = await Node_1.default.findOne({ where: { flowId: params.flowId }, order: { nodeId: "ASC" } });
|
|
91
|
-
dataNode && await this.copyNode(dataNode, insertNewFlow.flowId, manager);
|
|
92
|
-
return { flowId: insertNewFlow.flowId };
|
|
93
|
-
}
|
|
94
|
-
};
|
|
95
|
-
__decorate([
|
|
96
|
-
core_1.Get(),
|
|
97
|
-
core_1.DbSettings('Orm'),
|
|
98
|
-
core_1.ReadOnly(true),
|
|
99
|
-
core_1.Log(true),
|
|
100
|
-
__metadata("design:type", Function),
|
|
101
|
-
__metadata("design:paramtypes", [Object]),
|
|
102
|
-
__metadata("design:returntype", Promise)
|
|
103
|
-
], Flow.prototype, "get", null);
|
|
104
|
-
__decorate([
|
|
105
|
-
core_1.Post(),
|
|
106
|
-
core_1.DbSettings('Orm'),
|
|
107
|
-
core_1.ReadOnly(false),
|
|
108
|
-
core_1.Log(true),
|
|
109
|
-
__metadata("design:type", Function),
|
|
110
|
-
__metadata("design:paramtypes", [Object, typeorm_1.EntityManager]),
|
|
111
|
-
__metadata("design:returntype", Promise)
|
|
112
|
-
], Flow.prototype, "createFlowFromFlow", null);
|
|
113
|
-
Flow = __decorate([
|
|
114
|
-
core_1.Model('flow-nd/Flow')
|
|
115
|
-
], Flow);
|
|
116
|
-
exports.default = Flow;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Kplian 2021
|
|
3
|
-
*
|
|
4
|
-
* MIT
|
|
5
|
-
*
|
|
6
|
-
* NodeInstance Controller
|
|
7
|
-
*
|
|
8
|
-
* @summary Member Controller
|
|
9
|
-
* @author Favio Figueroa
|
|
10
|
-
* Jaime Rivera
|
|
11
|
-
*
|
|
12
|
-
* Created at : 2021-07-08 12:55:38
|
|
13
|
-
* Last modified :
|
|
14
|
-
*/
|
|
15
|
-
import { EntityManager } from 'typeorm';
|
|
16
|
-
import { Controller } from '@pxp-nd/core';
|
|
17
|
-
declare class FlowInstance extends Controller {
|
|
18
|
-
processPending(params: Record<string, any>, manager: EntityManager): Promise<unknown>;
|
|
19
|
-
}
|
|
20
|
-
export default FlowInstance;
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Kplian 2021
|
|
4
|
-
*
|
|
5
|
-
* MIT
|
|
6
|
-
*
|
|
7
|
-
* NodeInstance Controller
|
|
8
|
-
*
|
|
9
|
-
* @summary Member Controller
|
|
10
|
-
* @author Favio Figueroa
|
|
11
|
-
* Jaime Rivera
|
|
12
|
-
*
|
|
13
|
-
* Created at : 2021-07-08 12:55:38
|
|
14
|
-
* Last modified :
|
|
15
|
-
*/
|
|
16
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
17
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
18
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
19
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
20
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
21
|
-
};
|
|
22
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
23
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
24
|
-
};
|
|
25
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
-
};
|
|
28
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
const typeorm_1 = require("typeorm");
|
|
30
|
-
const core_1 = require("@pxp-nd/core");
|
|
31
|
-
const FlowInstance_1 = __importDefault(require("../entity/FlowInstance"));
|
|
32
|
-
const common_1 = require("@pxp-nd/common");
|
|
33
|
-
const NodeInstance_1 = __importDefault(require("./NodeInstance"));
|
|
34
|
-
const NodeInstance_2 = __importDefault(require("../entity/NodeInstance"));
|
|
35
|
-
const Node_1 = __importDefault(require("../entity/Node"));
|
|
36
|
-
class FlowInstance extends core_1.Controller {
|
|
37
|
-
async processPending(params, manager) {
|
|
38
|
-
const flag = await common_1.GlobalData.findOne({ data: 'wf_processing_pending_flows_flag' });
|
|
39
|
-
if (flag) {
|
|
40
|
-
if (flag.value == 'true') {
|
|
41
|
-
throw new core_1.PxpError(400, 'Already processing pending flows');
|
|
42
|
-
}
|
|
43
|
-
flag.value = 'true';
|
|
44
|
-
let flowInstanceIdProcessing = -1;
|
|
45
|
-
await typeorm_1.getManager().save(flag);
|
|
46
|
-
try {
|
|
47
|
-
const maxFlows = await common_1.GlobalData.findOne({ data: 'wf_max_concurrent_flows_process' });
|
|
48
|
-
const flowInstances = await FlowInstance_1.default.find({ take: (maxFlows && maxFlows.value), where: [{ status: 'pending' }], order: { flowInstanceId: "ASC" } });
|
|
49
|
-
for (const flowInstance of flowInstances) {
|
|
50
|
-
flowInstanceIdProcessing = flowInstance.flowInstanceId;
|
|
51
|
-
const node = await Node_1.default.findOne({ where: { actionId: flowInstance.actionId, flowId: flowInstance.flowId } });
|
|
52
|
-
const CNodeInstance = new NodeInstance_1.default('flow-nd', NodeInstance_2.default);
|
|
53
|
-
await CNodeInstance.RecursiveInstance({ node, flowInstance });
|
|
54
|
-
flowInstance.status = 'processed';
|
|
55
|
-
await manager.save(flowInstance);
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
catch (error) {
|
|
59
|
-
flag.value = 'false';
|
|
60
|
-
await typeorm_1.getManager().save(flag);
|
|
61
|
-
throw new core_1.PxpError(400, 'Error processing flow: ' + flowInstanceIdProcessing);
|
|
62
|
-
}
|
|
63
|
-
flag.value = 'false';
|
|
64
|
-
await typeorm_1.getManager().save(flag);
|
|
65
|
-
}
|
|
66
|
-
return { success: true };
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
__decorate([
|
|
70
|
-
core_1.Post(),
|
|
71
|
-
core_1.DbSettings('Orm'),
|
|
72
|
-
core_1.ReadOnly(false),
|
|
73
|
-
core_1.Log(true),
|
|
74
|
-
__metadata("design:type", Function),
|
|
75
|
-
__metadata("design:paramtypes", [Object, typeorm_1.EntityManager]),
|
|
76
|
-
__metadata("design:returntype", Promise)
|
|
77
|
-
], FlowInstance.prototype, "processPending", null);
|
|
78
|
-
exports.default = FlowInstance;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Effex 2021
|
|
3
|
-
*
|
|
4
|
-
* MIT
|
|
5
|
-
*
|
|
6
|
-
* Member Controller
|
|
7
|
-
*
|
|
8
|
-
* @summary Member Controller
|
|
9
|
-
* @author Favio Figueroa
|
|
10
|
-
*
|
|
11
|
-
* Created at : 2021-07-08 12:55:38
|
|
12
|
-
* Last modified :
|
|
13
|
-
*/
|
|
14
|
-
import { EntityManager } from 'typeorm';
|
|
15
|
-
import { Controller } from '@pxp-nd/core';
|
|
16
|
-
declare class Node extends Controller {
|
|
17
|
-
getNodeData(node: any, dataId: any, manager: EntityManager): Promise<string>;
|
|
18
|
-
add(params: Record<string, any>, manager: EntityManager): Promise<unknown>;
|
|
19
|
-
AddActionConfigJson(params: Record<string, any>, manager: EntityManager): Promise<unknown>;
|
|
20
|
-
getParameterizedNode(params: Record<string, any>, manager: EntityManager): Promise<unknown>;
|
|
21
|
-
executeActionJson(params: Record<string, any>, manager: EntityManager): Promise<unknown>;
|
|
22
|
-
}
|
|
23
|
-
export default Node;
|