@pxp-nd/flow 1.0.52 → 1.0.53
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.
|
@@ -11,9 +11,6 @@
|
|
|
11
11
|
* 08-Jul-2021 Jaime Rivera Created
|
|
12
12
|
* 18-Jul-2023 SP28JUL23 Mercedes Zambrana Add deleteFlow, saveFlowName, duplicateFlow
|
|
13
13
|
* 02-Aug-2023 SP11AUG23 Mercedes Zambrana Add validations in deleteFlow and saveFlow
|
|
14
|
-
* 15-Aug-2023 SP25AUG23 Rensi Arteaga Add logic to duplicate flows templates nadd icons
|
|
15
|
-
* 17-Aug-2023 SP25AUG23 Mercedes Zambrana Add insertEventFlow
|
|
16
|
-
* 18-Aug-2023 SP25AUG23 Mercedes Zambrana Add removeFlow
|
|
17
14
|
* ******************************************************************************
|
|
18
15
|
*/
|
|
19
16
|
import { EntityManager } from 'typeorm';
|
|
@@ -31,8 +28,5 @@ declare class Flow extends Controller {
|
|
|
31
28
|
saveFlow(params: Record<string, any>, manager: EntityManager): Promise<unknown>;
|
|
32
29
|
getFlowRender(params: Record<string, any>): Promise<unknown>;
|
|
33
30
|
sortNodesByConnections(nodes: any[], connections: any[]): any[];
|
|
34
|
-
insertEventFlow(params: Record<string, any>, manager: EntityManager): Promise<unknown>;
|
|
35
|
-
removeFlow(params: Record<string, any>, manager: EntityManager): Promise<unknown>;
|
|
36
|
-
changeStatusFlow(params: Record<string, any>, manager: EntityManager): Promise<unknown>;
|
|
37
31
|
}
|
|
38
32
|
export default Flow;
|
package/dist/controllers/Flow.js
CHANGED
|
@@ -481,23 +481,6 @@ let Flow = class Flow extends core_1.Controller {
|
|
|
481
481
|
return { success: false };
|
|
482
482
|
}
|
|
483
483
|
}
|
|
484
|
-
async changeStatusFlow(params, manager) {
|
|
485
|
-
let dataFlow = await (0, core_1.__)(Flow_1.default.findOne(params.flowId));
|
|
486
|
-
if (dataFlow) {
|
|
487
|
-
if (dataFlow.status === 'draft' || dataFlow.status === 'paused') {
|
|
488
|
-
//change to active
|
|
489
|
-
dataFlow.status = 'active';
|
|
490
|
-
}
|
|
491
|
-
else if (dataFlow.status === 'active') {
|
|
492
|
-
dataFlow.status = 'paused';
|
|
493
|
-
}
|
|
494
|
-
const updFlow = await (0, core_1.__)(manager.save(dataFlow));
|
|
495
|
-
return { success: true };
|
|
496
|
-
}
|
|
497
|
-
else {
|
|
498
|
-
return { success: false };
|
|
499
|
-
}
|
|
500
|
-
}
|
|
501
484
|
};
|
|
502
485
|
__decorate([
|
|
503
486
|
(0, core_1.Get)(),
|
|
@@ -580,15 +563,6 @@ __decorate([
|
|
|
580
563
|
__metadata("design:paramtypes", [Object, typeorm_1.EntityManager]),
|
|
581
564
|
__metadata("design:returntype", Promise)
|
|
582
565
|
], Flow.prototype, "removeFlow", null);
|
|
583
|
-
__decorate([
|
|
584
|
-
(0, core_1.Post)(),
|
|
585
|
-
(0, core_1.DbSettings)('Orm'),
|
|
586
|
-
(0, core_1.ReadOnly)(false),
|
|
587
|
-
(0, core_1.Log)(true),
|
|
588
|
-
__metadata("design:type", Function),
|
|
589
|
-
__metadata("design:paramtypes", [Object, typeorm_1.EntityManager]),
|
|
590
|
-
__metadata("design:returntype", Promise)
|
|
591
|
-
], Flow.prototype, "changeStatusFlow", null);
|
|
592
566
|
Flow = __decorate([
|
|
593
567
|
(0, core_1.Model)('flow-nd/Flow')
|
|
594
568
|
], Flow);
|
package/dist/entity/Action.d.ts
CHANGED
package/dist/entity/Action.js
CHANGED
|
@@ -79,10 +79,6 @@ __decorate([
|
|
|
79
79
|
(0, typeorm_1.OneToMany)(() => Node_1.default, eventNode => eventNode.actionEvent),
|
|
80
80
|
__metadata("design:type", Array)
|
|
81
81
|
], Action.prototype, "eventNodes", void 0);
|
|
82
|
-
__decorate([
|
|
83
|
-
(0, typeorm_1.Column)({ type: 'varchar', length: 200 }),
|
|
84
|
-
__metadata("design:type", String)
|
|
85
|
-
], Action.prototype, "icon", void 0);
|
|
86
82
|
Action = __decorate([
|
|
87
83
|
(0, typeorm_1.Entity)({ name: 'twf_action' })
|
|
88
84
|
], Action);
|
package/dist/entity/Flow.d.ts
CHANGED
package/dist/entity/Flow.js
CHANGED
|
@@ -54,14 +54,6 @@ __decorate([
|
|
|
54
54
|
(0, typeorm_1.OneToMany)(() => Node_1.default, node => node.flow),
|
|
55
55
|
__metadata("design:type", Array)
|
|
56
56
|
], Flow.prototype, "nodes", void 0);
|
|
57
|
-
__decorate([
|
|
58
|
-
(0, typeorm_1.Column)({ type: 'varchar', length: 200 }),
|
|
59
|
-
__metadata("design:type", String)
|
|
60
|
-
], Flow.prototype, "icon", void 0);
|
|
61
|
-
__decorate([
|
|
62
|
-
(0, typeorm_1.Column)({ type: 'varchar', length: 30 }),
|
|
63
|
-
__metadata("design:type", String)
|
|
64
|
-
], Flow.prototype, "status", void 0);
|
|
65
57
|
Flow = __decorate([
|
|
66
58
|
(0, typeorm_1.Entity)({ name: 'twf_flow' })
|
|
67
59
|
], Flow);
|