@venturialstd/workflow 0.1.164 → 0.1.165
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/README.md +238 -238
- package/dist/controllers/workflow-node.controller.d.ts +3 -1
- package/dist/controllers/workflow-node.controller.d.ts.map +1 -1
- package/dist/controllers/workflow-node.controller.js +6 -3
- package/dist/controllers/workflow-node.controller.js.map +1 -1
- package/dist/dtos/index.d.ts +0 -1
- package/dist/dtos/index.d.ts.map +1 -1
- package/dist/dtos/index.js +0 -1
- package/dist/dtos/index.js.map +1 -1
- package/dist/index.d.ts +0 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -2
- package/dist/index.js.map +1 -1
- package/dist/modules/chatgpt/types/purpose-memory.types.js +15 -15
- package/dist/modules/webhook/controllers/webhook-receiver.controller.d.ts +11 -0
- package/dist/modules/webhook/controllers/webhook-receiver.controller.d.ts.map +1 -1
- package/dist/modules/webhook/controllers/webhook-receiver.controller.js +15 -0
- package/dist/modules/webhook/controllers/webhook-receiver.controller.js.map +1 -1
- package/dist/modules/webhook/services/webhook-received.service.d.ts.map +1 -1
- package/dist/modules/webhook/services/webhook-received.service.js +36 -12
- package/dist/modules/webhook/services/webhook-received.service.js.map +1 -1
- package/dist/services/workflow-module.service.d.ts +3 -1
- package/dist/services/workflow-module.service.d.ts.map +1 -1
- package/dist/services/workflow-module.service.js +6 -2
- package/dist/services/workflow-module.service.js.map +1 -1
- package/dist/services/workflow-sse.service.d.ts +1 -4
- package/dist/services/workflow-sse.service.d.ts.map +1 -1
- package/dist/services/workflow-sse.service.js +0 -8
- package/dist/services/workflow-sse.service.js.map +1 -1
- package/dist/services/workflow-webhook.service.d.ts +8 -0
- package/dist/services/workflow-webhook.service.d.ts.map +1 -1
- package/dist/services/workflow-webhook.service.js +16 -0
- package/dist/services/workflow-webhook.service.js.map +1 -1
- package/dist/workflow-core.module.d.ts.map +1 -1
- package/dist/workflow-core.module.js +0 -5
- package/dist/workflow-core.module.js.map +1 -1
- package/package.json +3 -2
- package/dist/dtos/create-workflow-canvas-element.dto.d.ts +0 -13
- package/dist/dtos/create-workflow-canvas-element.dto.d.ts.map +0 -1
- package/dist/dtos/create-workflow-canvas-element.dto.js +0 -61
- package/dist/dtos/create-workflow-canvas-element.dto.js.map +0 -1
- package/dist/entities/workflow-canvas-element.entity.d.ts +0 -21
- package/dist/entities/workflow-canvas-element.entity.d.ts.map +0 -1
- package/dist/entities/workflow-canvas-element.entity.js +0 -100
- package/dist/entities/workflow-canvas-element.entity.js.map +0 -1
- package/dist/services/workflow-canvas-element.service.d.ts +0 -15
- package/dist/services/workflow-canvas-element.service.d.ts.map +0 -1
- package/dist/services/workflow-canvas-element.service.js +0 -67
- package/dist/services/workflow-canvas-element.service.js.map +0 -1
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
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;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.CreateWorkflowCanvasElementDto = void 0;
|
|
13
|
-
const class_validator_1 = require("class-validator");
|
|
14
|
-
class CreateWorkflowCanvasElementDto {
|
|
15
|
-
workflowId;
|
|
16
|
-
elementId;
|
|
17
|
-
type;
|
|
18
|
-
position;
|
|
19
|
-
size;
|
|
20
|
-
style;
|
|
21
|
-
data;
|
|
22
|
-
}
|
|
23
|
-
exports.CreateWorkflowCanvasElementDto = CreateWorkflowCanvasElementDto;
|
|
24
|
-
__decorate([
|
|
25
|
-
(0, class_validator_1.IsString)(),
|
|
26
|
-
(0, class_validator_1.IsNotEmpty)(),
|
|
27
|
-
__metadata("design:type", String)
|
|
28
|
-
], CreateWorkflowCanvasElementDto.prototype, "workflowId", void 0);
|
|
29
|
-
__decorate([
|
|
30
|
-
(0, class_validator_1.IsString)(),
|
|
31
|
-
(0, class_validator_1.IsNotEmpty)(),
|
|
32
|
-
(0, class_validator_1.MaxLength)(255),
|
|
33
|
-
__metadata("design:type", String)
|
|
34
|
-
], CreateWorkflowCanvasElementDto.prototype, "elementId", void 0);
|
|
35
|
-
__decorate([
|
|
36
|
-
(0, class_validator_1.IsString)(),
|
|
37
|
-
(0, class_validator_1.IsNotEmpty)(),
|
|
38
|
-
(0, class_validator_1.MaxLength)(64),
|
|
39
|
-
__metadata("design:type", String)
|
|
40
|
-
], CreateWorkflowCanvasElementDto.prototype, "type", void 0);
|
|
41
|
-
__decorate([
|
|
42
|
-
(0, class_validator_1.IsNotEmpty)(),
|
|
43
|
-
(0, class_validator_1.IsObject)(),
|
|
44
|
-
__metadata("design:type", Object)
|
|
45
|
-
], CreateWorkflowCanvasElementDto.prototype, "position", void 0);
|
|
46
|
-
__decorate([
|
|
47
|
-
(0, class_validator_1.IsOptional)(),
|
|
48
|
-
(0, class_validator_1.IsObject)(),
|
|
49
|
-
__metadata("design:type", Object)
|
|
50
|
-
], CreateWorkflowCanvasElementDto.prototype, "size", void 0);
|
|
51
|
-
__decorate([
|
|
52
|
-
(0, class_validator_1.IsOptional)(),
|
|
53
|
-
(0, class_validator_1.IsObject)(),
|
|
54
|
-
__metadata("design:type", Object)
|
|
55
|
-
], CreateWorkflowCanvasElementDto.prototype, "style", void 0);
|
|
56
|
-
__decorate([
|
|
57
|
-
(0, class_validator_1.IsOptional)(),
|
|
58
|
-
(0, class_validator_1.IsObject)(),
|
|
59
|
-
__metadata("design:type", Object)
|
|
60
|
-
], CreateWorkflowCanvasElementDto.prototype, "data", void 0);
|
|
61
|
-
//# sourceMappingURL=create-workflow-canvas-element.dto.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-workflow-canvas-element.dto.js","sourceRoot":"","sources":["../../src/dtos/create-workflow-canvas-element.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAwF;AAExF,MAAa,8BAA8B;IAGzC,UAAU,CAAS;IAKnB,SAAS,CAAS;IAKlB,IAAI,CAAS;IAIb,QAAQ,CAA2B;IAInC,IAAI,CAAiC;IAIrC,KAAK,CAAkC;IAIvC,IAAI,CAAkC;CACvC;AA9BD,wEA8BC;AA3BC;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;kEACM;AAKnB;IAHC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,2BAAS,EAAC,GAAG,CAAC;;iEACG;AAKlB;IAHC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,2BAAS,EAAC,EAAE,CAAC;;4DACD;AAIb;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;gEACwB;AAInC;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;4DAC0B;AAIrC;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;6DAC4B;AAIvC;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;4DAC2B"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { Workflow } from './workflow.entity';
|
|
2
|
-
export type WorkflowCanvasElementPosition = {
|
|
3
|
-
x: number;
|
|
4
|
-
y: number;
|
|
5
|
-
};
|
|
6
|
-
export type WorkflowCanvasElementSize = Record<string, number>;
|
|
7
|
-
export type WorkflowCanvasElementStyle = Record<string, unknown>;
|
|
8
|
-
export declare class WorkflowCanvasElement {
|
|
9
|
-
id: string;
|
|
10
|
-
workflowId: string;
|
|
11
|
-
workflow: Workflow;
|
|
12
|
-
elementId: string;
|
|
13
|
-
type: string;
|
|
14
|
-
position: WorkflowCanvasElementPosition;
|
|
15
|
-
size?: WorkflowCanvasElementSize | null;
|
|
16
|
-
style?: WorkflowCanvasElementStyle | null;
|
|
17
|
-
data?: Record<string, unknown> | null;
|
|
18
|
-
createdAt: Date;
|
|
19
|
-
updatedAt: Date;
|
|
20
|
-
}
|
|
21
|
-
//# sourceMappingURL=workflow-canvas-element.entity.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-canvas-element.entity.d.ts","sourceRoot":"","sources":["../../src/entities/workflow-canvas-element.entity.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAG7C,MAAM,MAAM,6BAA6B,GAAG;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAGrE,MAAM,MAAM,yBAAyB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAG/D,MAAM,MAAM,0BAA0B,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAEjE,qBACa,qBAAqB;IAEhC,EAAE,EAAE,MAAM,CAAC;IAKX,UAAU,EAAE,MAAM,CAAC;IAGnB,QAAQ,EAAE,QAAQ,CAAC;IAMnB,SAAS,EAAE,MAAM,CAAC;IAMlB,IAAI,EAAE,MAAM,CAAC;IAIb,QAAQ,EAAE,6BAA6B,CAAC;IAKxC,IAAI,CAAC,EAAE,yBAAyB,GAAG,IAAI,CAAC;IAKxC,KAAK,CAAC,EAAE,0BAA0B,GAAG,IAAI,CAAC;IAM1C,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IAQtC,SAAS,EAAE,IAAI,CAAC;IAQhB,SAAS,EAAE,IAAI,CAAC;CACjB"}
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
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;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.WorkflowCanvasElement = void 0;
|
|
13
|
-
const class_validator_1 = require("class-validator");
|
|
14
|
-
const typeorm_1 = require("typeorm");
|
|
15
|
-
const workflow_entity_1 = require("./workflow.entity");
|
|
16
|
-
let WorkflowCanvasElement = class WorkflowCanvasElement {
|
|
17
|
-
id;
|
|
18
|
-
workflowId;
|
|
19
|
-
workflow;
|
|
20
|
-
elementId;
|
|
21
|
-
type;
|
|
22
|
-
position;
|
|
23
|
-
size;
|
|
24
|
-
style;
|
|
25
|
-
data;
|
|
26
|
-
createdAt;
|
|
27
|
-
updatedAt;
|
|
28
|
-
};
|
|
29
|
-
exports.WorkflowCanvasElement = WorkflowCanvasElement;
|
|
30
|
-
__decorate([
|
|
31
|
-
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
|
32
|
-
__metadata("design:type", String)
|
|
33
|
-
], WorkflowCanvasElement.prototype, "id", void 0);
|
|
34
|
-
__decorate([
|
|
35
|
-
(0, class_validator_1.IsString)(),
|
|
36
|
-
(0, class_validator_1.IsNotEmpty)(),
|
|
37
|
-
(0, typeorm_1.Column)(),
|
|
38
|
-
__metadata("design:type", String)
|
|
39
|
-
], WorkflowCanvasElement.prototype, "workflowId", void 0);
|
|
40
|
-
__decorate([
|
|
41
|
-
(0, typeorm_1.ManyToOne)(() => workflow_entity_1.Workflow, { onDelete: 'CASCADE' }),
|
|
42
|
-
__metadata("design:type", workflow_entity_1.Workflow)
|
|
43
|
-
], WorkflowCanvasElement.prototype, "workflow", void 0);
|
|
44
|
-
__decorate([
|
|
45
|
-
(0, class_validator_1.IsString)(),
|
|
46
|
-
(0, class_validator_1.IsNotEmpty)(),
|
|
47
|
-
(0, typeorm_1.Column)(),
|
|
48
|
-
__metadata("design:type", String)
|
|
49
|
-
], WorkflowCanvasElement.prototype, "elementId", void 0);
|
|
50
|
-
__decorate([
|
|
51
|
-
(0, class_validator_1.IsString)(),
|
|
52
|
-
(0, class_validator_1.IsNotEmpty)(),
|
|
53
|
-
(0, typeorm_1.Column)({ type: 'varchar', length: 64 }),
|
|
54
|
-
__metadata("design:type", String)
|
|
55
|
-
], WorkflowCanvasElement.prototype, "type", void 0);
|
|
56
|
-
__decorate([
|
|
57
|
-
(0, class_validator_1.IsObject)(),
|
|
58
|
-
(0, typeorm_1.Column)({ type: 'jsonb' }),
|
|
59
|
-
__metadata("design:type", Object)
|
|
60
|
-
], WorkflowCanvasElement.prototype, "position", void 0);
|
|
61
|
-
__decorate([
|
|
62
|
-
(0, class_validator_1.IsObject)(),
|
|
63
|
-
(0, class_validator_1.IsOptional)(),
|
|
64
|
-
(0, typeorm_1.Column)({ type: 'jsonb', nullable: true }),
|
|
65
|
-
__metadata("design:type", Object)
|
|
66
|
-
], WorkflowCanvasElement.prototype, "size", void 0);
|
|
67
|
-
__decorate([
|
|
68
|
-
(0, class_validator_1.IsObject)(),
|
|
69
|
-
(0, class_validator_1.IsOptional)(),
|
|
70
|
-
(0, typeorm_1.Column)({ type: 'jsonb', nullable: true }),
|
|
71
|
-
__metadata("design:type", Object)
|
|
72
|
-
], WorkflowCanvasElement.prototype, "style", void 0);
|
|
73
|
-
__decorate([
|
|
74
|
-
(0, class_validator_1.IsObject)(),
|
|
75
|
-
(0, class_validator_1.IsOptional)(),
|
|
76
|
-
(0, typeorm_1.Column)({ type: 'jsonb', nullable: true }),
|
|
77
|
-
__metadata("design:type", Object)
|
|
78
|
-
], WorkflowCanvasElement.prototype, "data", void 0);
|
|
79
|
-
__decorate([
|
|
80
|
-
(0, typeorm_1.CreateDateColumn)({
|
|
81
|
-
name: 'createdAt',
|
|
82
|
-
nullable: false,
|
|
83
|
-
type: 'timestamptz',
|
|
84
|
-
default: () => 'CURRENT_TIMESTAMP',
|
|
85
|
-
}),
|
|
86
|
-
__metadata("design:type", Date)
|
|
87
|
-
], WorkflowCanvasElement.prototype, "createdAt", void 0);
|
|
88
|
-
__decorate([
|
|
89
|
-
(0, typeorm_1.UpdateDateColumn)({
|
|
90
|
-
name: 'updatedAt',
|
|
91
|
-
nullable: false,
|
|
92
|
-
type: 'timestamptz',
|
|
93
|
-
default: () => 'CURRENT_TIMESTAMP',
|
|
94
|
-
}),
|
|
95
|
-
__metadata("design:type", Date)
|
|
96
|
-
], WorkflowCanvasElement.prototype, "updatedAt", void 0);
|
|
97
|
-
exports.WorkflowCanvasElement = WorkflowCanvasElement = __decorate([
|
|
98
|
-
(0, typeorm_1.Entity)('workflow_canvas_element')
|
|
99
|
-
], WorkflowCanvasElement);
|
|
100
|
-
//# sourceMappingURL=workflow-canvas-element.entity.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-canvas-element.entity.js","sourceRoot":"","sources":["../../src/entities/workflow-canvas-element.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA6E;AAC7E,qCAOiB;AAEjB,uDAA6C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E;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;mDACJ;AAQtC;IANC,IAAA,0BAAgB,EAAC;QAChB,IAAI,EAAE,WAAW;QACjB,QAAQ,EAAE,KAAK;QACf,IAAI,EAAE,aAAa;QACnB,OAAO,EAAE,GAAG,EAAE,CAAC,mBAAmB;KACnC,CAAC;8BACS,IAAI;wDAAC;AAQhB;IANC,IAAA,0BAAgB,EAAC;QAChB,IAAI,EAAE,WAAW;QACjB,QAAQ,EAAE,KAAK;QACf,IAAI,EAAE,aAAa;QACnB,OAAO,EAAE,GAAG,EAAE,CAAC,mBAAmB;KACnC,CAAC;8BACS,IAAI;wDAAC;gCA1DL,qBAAqB;IADjC,IAAA,gBAAM,EAAC,yBAAyB,CAAC;GACrB,qBAAqB,CA2DjC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { CrudRequest } from '@dataui/crud';
|
|
2
|
-
import { TypeOrmCrudService } from '@dataui/crud-typeorm';
|
|
3
|
-
import { Repository } from 'typeorm';
|
|
4
|
-
import { WorkflowCanvasElement } from '../entities/workflow-canvas-element.entity';
|
|
5
|
-
import { WorkflowSSEService } from './workflow-sse.service';
|
|
6
|
-
export declare class WorkflowCanvasElementService extends TypeOrmCrudService<WorkflowCanvasElement> {
|
|
7
|
-
readonly repo: Repository<WorkflowCanvasElement>;
|
|
8
|
-
private readonly sseService;
|
|
9
|
-
constructor(repo: Repository<WorkflowCanvasElement>, sseService: WorkflowSSEService);
|
|
10
|
-
createOne(req: CrudRequest, dto: Partial<WorkflowCanvasElement>): Promise<WorkflowCanvasElement>;
|
|
11
|
-
updateOne(req: CrudRequest, dto: Partial<WorkflowCanvasElement>): Promise<WorkflowCanvasElement>;
|
|
12
|
-
deleteOne(req: CrudRequest): Promise<void | WorkflowCanvasElement>;
|
|
13
|
-
getElementsByWorkflowId(workflowId: string): Promise<WorkflowCanvasElement[]>;
|
|
14
|
-
}
|
|
15
|
-
//# sourceMappingURL=workflow-canvas-element.service.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-canvas-element.service.d.ts","sourceRoot":"","sources":["../../src/services/workflow-canvas-element.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAG1D,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAErC,OAAO,EAAE,qBAAqB,EAAE,MAAM,4CAA4C,CAAC;AACnF,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAE5D,qBACa,4BAA6B,SAAQ,kBAAkB,CAAC,qBAAqB,CAAC;aAGvE,IAAI,EAAE,UAAU,CAAC,qBAAqB,CAAC;IACvD,OAAO,CAAC,QAAQ,CAAC,UAAU;gBADX,IAAI,EAAE,UAAU,CAAC,qBAAqB,CAAC,EACtC,UAAU,EAAE,kBAAkB;IAK3C,SAAS,CAAC,GAAG,EAAE,WAAW,EAAE,GAAG,EAAE,OAAO,CAAC,qBAAqB,CAAC,GAAG,OAAO,CAAC,qBAAqB,CAAC;IAQhG,SAAS,CAAC,GAAG,EAAE,WAAW,EAAE,GAAG,EAAE,OAAO,CAAC,qBAAqB,CAAC,GAAG,OAAO,CAAC,qBAAqB,CAAC;IAQhG,SAAS,CAAC,GAAG,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,GAAG,qBAAqB,CAAC;IAUlE,uBAAuB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,qBAAqB,EAAE,CAAC;CAMpF"}
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
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;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
-
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
-
};
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.WorkflowCanvasElementService = void 0;
|
|
16
|
-
const crud_typeorm_1 = require("@dataui/crud-typeorm");
|
|
17
|
-
const common_1 = require("@nestjs/common");
|
|
18
|
-
const typeorm_1 = require("@nestjs/typeorm");
|
|
19
|
-
const typeorm_2 = require("typeorm");
|
|
20
|
-
const workflow_canvas_element_entity_1 = require("../entities/workflow-canvas-element.entity");
|
|
21
|
-
const workflow_sse_service_1 = require("./workflow-sse.service");
|
|
22
|
-
let WorkflowCanvasElementService = class WorkflowCanvasElementService extends crud_typeorm_1.TypeOrmCrudService {
|
|
23
|
-
repo;
|
|
24
|
-
sseService;
|
|
25
|
-
constructor(repo, sseService) {
|
|
26
|
-
super(repo);
|
|
27
|
-
this.repo = repo;
|
|
28
|
-
this.sseService = sseService;
|
|
29
|
-
}
|
|
30
|
-
async createOne(req, dto) {
|
|
31
|
-
const result = await super.createOne(req, dto);
|
|
32
|
-
if (result?.workflowId) {
|
|
33
|
-
this.sseService.emitEditorCanvasElementsUpdated(result.workflowId);
|
|
34
|
-
}
|
|
35
|
-
return result;
|
|
36
|
-
}
|
|
37
|
-
async updateOne(req, dto) {
|
|
38
|
-
const result = await super.updateOne(req, dto);
|
|
39
|
-
if (result?.workflowId) {
|
|
40
|
-
this.sseService.emitEditorCanvasElementsUpdated(result.workflowId);
|
|
41
|
-
}
|
|
42
|
-
return result;
|
|
43
|
-
}
|
|
44
|
-
async deleteOne(req) {
|
|
45
|
-
const found = await this.getOneOrFail(req, false);
|
|
46
|
-
const workflowId = found.workflowId;
|
|
47
|
-
const result = await super.deleteOne(req);
|
|
48
|
-
if (workflowId) {
|
|
49
|
-
this.sseService.emitEditorCanvasElementsUpdated(workflowId);
|
|
50
|
-
}
|
|
51
|
-
return result;
|
|
52
|
-
}
|
|
53
|
-
async getElementsByWorkflowId(workflowId) {
|
|
54
|
-
return this.repo.find({
|
|
55
|
-
where: { workflowId },
|
|
56
|
-
order: { createdAt: 'ASC' },
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
};
|
|
60
|
-
exports.WorkflowCanvasElementService = WorkflowCanvasElementService;
|
|
61
|
-
exports.WorkflowCanvasElementService = WorkflowCanvasElementService = __decorate([
|
|
62
|
-
(0, common_1.Injectable)(),
|
|
63
|
-
__param(0, (0, typeorm_1.InjectRepository)(workflow_canvas_element_entity_1.WorkflowCanvasElement)),
|
|
64
|
-
__metadata("design:paramtypes", [typeorm_2.Repository,
|
|
65
|
-
workflow_sse_service_1.WorkflowSSEService])
|
|
66
|
-
], WorkflowCanvasElementService);
|
|
67
|
-
//# sourceMappingURL=workflow-canvas-element.service.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-canvas-element.service.js","sourceRoot":"","sources":["../../src/services/workflow-canvas-element.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,uDAA0D;AAC1D,2CAA4C;AAC5C,6CAAmD;AACnD,qCAAqC;AAErC,+FAAmF;AACnF,iEAA4D;AAGrD,IAAM,4BAA4B,GAAlC,MAAM,4BAA6B,SAAQ,iCAAyC;IAGvE;IACC;IAHnB,YAEkB,IAAuC,EACtC,UAA8B;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