@abyss-project/console 16.1.0 → 17.1.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.
Files changed (125) hide show
  1. package/dist/api/index.d.ts +0 -1
  2. package/dist/api/index.js +0 -1
  3. package/dist/api/index.js.map +1 -1
  4. package/dist/index.d.ts +0 -107
  5. package/dist/index.js +1 -130
  6. package/dist/index.js.map +1 -1
  7. package/dist/types/dto/index.d.ts +0 -1
  8. package/dist/types/dto/index.js +0 -1
  9. package/dist/types/dto/index.js.map +1 -1
  10. package/dist/types/enum/api-error.enum.d.ts +0 -16
  11. package/dist/types/enum/api-error.enum.js +0 -16
  12. package/dist/types/enum/api-error.enum.js.map +1 -1
  13. package/dist/types/enum/flow.internal.enum.d.ts +9 -0
  14. package/dist/types/enum/flow.internal.enum.js +14 -0
  15. package/dist/types/enum/flow.internal.enum.js.map +1 -0
  16. package/dist/types/enum/index.d.ts +1 -2
  17. package/dist/types/enum/index.js +1 -2
  18. package/dist/types/enum/index.js.map +1 -1
  19. package/dist/types/index.d.ts +0 -1
  20. package/dist/types/index.js +0 -1
  21. package/dist/types/index.js.map +1 -1
  22. package/dist/types/interface/api/index.d.ts +0 -6
  23. package/dist/types/interface/api/index.js +0 -6
  24. package/dist/types/interface/api/index.js.map +1 -1
  25. package/dist/types/interface/api/requests/domain-verification.admin.request.d.ts +0 -1
  26. package/dist/types/interface/api/responses/report.admin.response.d.ts +3 -65
  27. package/dist/types/interface/index.d.ts +0 -8
  28. package/dist/types/interface/index.js +0 -8
  29. package/dist/types/interface/index.js.map +1 -1
  30. package/dist/types/interface/models/project.model.d.ts +0 -2
  31. package/dist/utils/index.d.ts +0 -1
  32. package/dist/utils/index.js +0 -1
  33. package/dist/utils/index.js.map +1 -1
  34. package/package.json +1 -2
  35. package/tsconfig.json +0 -12
  36. package/dist/api/workflow.admin.api.d.ts +0 -56
  37. package/dist/api/workflow.admin.api.js +0 -233
  38. package/dist/api/workflow.admin.api.js.map +0 -1
  39. package/dist/api/workflow.api.d.ts +0 -34
  40. package/dist/api/workflow.api.js +0 -155
  41. package/dist/api/workflow.api.js.map +0 -1
  42. package/dist/types/constants/index.d.ts +0 -2
  43. package/dist/types/constants/index.js +0 -19
  44. package/dist/types/constants/index.js.map +0 -1
  45. package/dist/types/constants/webhook.constants.d.ts +0 -9
  46. package/dist/types/constants/webhook.constants.js +0 -13
  47. package/dist/types/constants/webhook.constants.js.map +0 -1
  48. package/dist/types/constants/workflow.constants.d.ts +0 -28
  49. package/dist/types/constants/workflow.constants.js +0 -32
  50. package/dist/types/constants/workflow.constants.js.map +0 -1
  51. package/dist/types/dto/workflow.dto.d.ts +0 -764
  52. package/dist/types/dto/workflow.dto.js +0 -4
  53. package/dist/types/dto/workflow.dto.js.map +0 -1
  54. package/dist/types/enum/email.enum.d.ts +0 -32
  55. package/dist/types/enum/email.enum.js +0 -41
  56. package/dist/types/enum/email.enum.js.map +0 -1
  57. package/dist/types/enum/workflow.enum.d.ts +0 -192
  58. package/dist/types/enum/workflow.enum.js +0 -213
  59. package/dist/types/enum/workflow.enum.js.map +0 -1
  60. package/dist/types/interface/api/requests/workflow-webhook.public.request.d.ts +0 -3
  61. package/dist/types/interface/api/requests/workflow-webhook.public.request.js +0 -3
  62. package/dist/types/interface/api/requests/workflow-webhook.public.request.js.map +0 -1
  63. package/dist/types/interface/api/requests/workflow.admin.request.d.ts +0 -184
  64. package/dist/types/interface/api/requests/workflow.admin.request.js +0 -3
  65. package/dist/types/interface/api/requests/workflow.admin.request.js.map +0 -1
  66. package/dist/types/interface/api/requests/workflow.request.d.ts +0 -267
  67. package/dist/types/interface/api/requests/workflow.request.js +0 -3
  68. package/dist/types/interface/api/requests/workflow.request.js.map +0 -1
  69. package/dist/types/interface/api/responses/workflow-webhook.public.response.d.ts +0 -5
  70. package/dist/types/interface/api/responses/workflow-webhook.public.response.js +0 -3
  71. package/dist/types/interface/api/responses/workflow-webhook.public.response.js.map +0 -1
  72. package/dist/types/interface/api/responses/workflow.admin.response.d.ts +0 -134
  73. package/dist/types/interface/api/responses/workflow.admin.response.js +0 -3
  74. package/dist/types/interface/api/responses/workflow.admin.response.js.map +0 -1
  75. package/dist/types/interface/api/responses/workflow.response.d.ts +0 -195
  76. package/dist/types/interface/api/responses/workflow.response.js +0 -16
  77. package/dist/types/interface/api/responses/workflow.response.js.map +0 -1
  78. package/dist/types/interface/models/workflow-email-send.model.d.ts +0 -19
  79. package/dist/types/interface/models/workflow-email-send.model.js +0 -3
  80. package/dist/types/interface/models/workflow-email-send.model.js.map +0 -1
  81. package/dist/types/interface/models/workflow-execution.model.d.ts +0 -29
  82. package/dist/types/interface/models/workflow-execution.model.js +0 -3
  83. package/dist/types/interface/models/workflow-execution.model.js.map +0 -1
  84. package/dist/types/interface/models/workflow-step-connection.model.d.ts +0 -11
  85. package/dist/types/interface/models/workflow-step-connection.model.js +0 -3
  86. package/dist/types/interface/models/workflow-step-connection.model.js.map +0 -1
  87. package/dist/types/interface/models/workflow-step-execution.model.d.ts +0 -25
  88. package/dist/types/interface/models/workflow-step-execution.model.js +0 -3
  89. package/dist/types/interface/models/workflow-step-execution.model.js.map +0 -1
  90. package/dist/types/interface/models/workflow-step.model.d.ts +0 -17
  91. package/dist/types/interface/models/workflow-step.model.js +0 -3
  92. package/dist/types/interface/models/workflow-step.model.js.map +0 -1
  93. package/dist/types/interface/models/workflow-trigger.model.d.ts +0 -28
  94. package/dist/types/interface/models/workflow-trigger.model.js +0 -3
  95. package/dist/types/interface/models/workflow-trigger.model.js.map +0 -1
  96. package/dist/types/interface/models/workflow-webhook.model.d.ts +0 -29
  97. package/dist/types/interface/models/workflow-webhook.model.js +0 -3
  98. package/dist/types/interface/models/workflow-webhook.model.js.map +0 -1
  99. package/dist/types/interface/models/workflow.model.d.ts +0 -23
  100. package/dist/types/interface/models/workflow.model.js +0 -3
  101. package/dist/types/interface/models/workflow.model.js.map +0 -1
  102. package/dist/utils/workflow-credit.utils.d.ts +0 -20
  103. package/dist/utils/workflow-credit.utils.js +0 -69
  104. package/dist/utils/workflow-credit.utils.js.map +0 -1
  105. package/dist/workflow/index.d.ts +0 -2
  106. package/dist/workflow/index.js +0 -19
  107. package/dist/workflow/index.js.map +0 -1
  108. package/dist/workflow/trigger-catalog.d.ts +0 -5
  109. package/dist/workflow/trigger-catalog.js +0 -101
  110. package/dist/workflow/trigger-catalog.js.map +0 -1
  111. package/dist/workflow/trigger-samples.d.ts +0 -2
  112. package/dist/workflow/trigger-samples.js +0 -305
  113. package/dist/workflow/trigger-samples.js.map +0 -1
  114. package/dist/workflow-expressions/functions.d.ts +0 -78
  115. package/dist/workflow-expressions/functions.js +0 -71
  116. package/dist/workflow-expressions/functions.js.map +0 -1
  117. package/dist/workflow-expressions/index.d.ts +0 -3
  118. package/dist/workflow-expressions/index.js +0 -20
  119. package/dist/workflow-expressions/index.js.map +0 -1
  120. package/dist/workflow-expressions/resolver.d.ts +0 -2
  121. package/dist/workflow-expressions/resolver.js +0 -17
  122. package/dist/workflow-expressions/resolver.js.map +0 -1
  123. package/dist/workflow-expressions/types.d.ts +0 -68
  124. package/dist/workflow-expressions/types.js +0 -28
  125. package/dist/workflow-expressions/types.js.map +0 -1
@@ -1,195 +0,0 @@
1
- import { IWorkflow } from '../../models/workflow.model';
2
- import { IWorkflowStep } from '../../models/workflow-step.model';
3
- import { IWorkflowStepConnection } from '../../models/workflow-step-connection.model';
4
- import { IWorkflowExecution } from '../../models/workflow-execution.model';
5
- import { IWorkflowTrigger } from '../../models/workflow-trigger.model';
6
- import { MonitorAlertRuleTriggerState, WorkflowTemplate } from '../../../enum/workflow.enum';
7
- import { IResponse } from '../type-message/response';
8
- import { BasePaginate } from '../type-message/base-paginate';
9
- export interface ICreateWorkflowData {
10
- workflow: IWorkflow;
11
- }
12
- export type ICreateWorkflowResponse = IResponse<ICreateWorkflowData>;
13
- export interface ICreateWorkflowFromTemplateData {
14
- workflow: IWorkflow;
15
- }
16
- export type ICreateWorkflowFromTemplateResponse = IResponse<ICreateWorkflowFromTemplateData>;
17
- export interface IWorkflowListItem extends IWorkflow {
18
- template: WorkflowTemplate | null;
19
- templateIntact: boolean;
20
- updatedByUserId: string | null;
21
- }
22
- export type IPaginateWorkflowResponse = IResponse<BasePaginate<IWorkflowListItem>>;
23
- export interface IGetWorkflowData {
24
- workflow: IWorkflow;
25
- }
26
- export type IGetWorkflowResponse = IResponse<IGetWorkflowData>;
27
- export interface IUpdateWorkflowData {
28
- workflow: IWorkflow;
29
- }
30
- export type IUpdateWorkflowResponse = IResponse<IUpdateWorkflowData>;
31
- export interface IDeleteWorkflowData {
32
- }
33
- export type IDeleteWorkflowResponse = IResponse<IDeleteWorkflowData>;
34
- export interface IExecuteWorkflowData {
35
- workflowExecution: IWorkflowExecution;
36
- }
37
- export type IExecuteWorkflowResponse = IResponse<IExecuteWorkflowData>;
38
- export interface ICreateWorkflowStepData {
39
- workflowStep: IWorkflowStep;
40
- }
41
- export type ICreateWorkflowStepResponse = IResponse<ICreateWorkflowStepData>;
42
- export interface IListWorkflowStepData {
43
- workflowSteps: IWorkflowStep[];
44
- }
45
- export type IListWorkflowStepResponse = IResponse<IListWorkflowStepData>;
46
- export interface IUpdateWorkflowStepData {
47
- workflowStep: IWorkflowStep;
48
- }
49
- export type IUpdateWorkflowStepResponse = IResponse<IUpdateWorkflowStepData>;
50
- export interface IDeleteWorkflowStepData {
51
- }
52
- export type IDeleteWorkflowStepResponse = IResponse<IDeleteWorkflowStepData>;
53
- export interface IAddStepWorkflowData {
54
- step: IWorkflowStep;
55
- connections: IWorkflowStepConnection[];
56
- }
57
- export type IAddStepWorkflowResponse = IResponse<IAddStepWorkflowData>;
58
- export interface IListWorkflowStepConnectionData {
59
- connections: IWorkflowStepConnection[];
60
- }
61
- export type IListWorkflowStepConnectionResponse = IResponse<IListWorkflowStepConnectionData>;
62
- export interface IUpdateWorkflowStepConnectionData {
63
- connection: IWorkflowStepConnection;
64
- }
65
- export type IUpdateWorkflowStepConnectionResponse = IResponse<IUpdateWorkflowStepConnectionData>;
66
- export type IPaginateWorkflowExecutionResponse = IResponse<BasePaginate<IWorkflowExecution>>;
67
- export interface IGetWorkflowExecutionData {
68
- workflowExecution: IWorkflowExecution;
69
- }
70
- export type IGetWorkflowExecutionResponse = IResponse<IGetWorkflowExecutionData>;
71
- export interface IWorkflowExecutionStats {
72
- total: number;
73
- pending: number;
74
- running: number;
75
- completed: number;
76
- failed: number;
77
- cancelled: number;
78
- quotaExceeded: number;
79
- averageDurationMs: number | null;
80
- successRate: number | null;
81
- }
82
- export interface IGetStatsWorkflowExecutionData {
83
- stats: IWorkflowExecutionStats;
84
- }
85
- export type IGetStatsWorkflowExecutionResponse = IResponse<IGetStatsWorkflowExecutionData>;
86
- export interface ICancelWorkflowExecutionData {
87
- workflowExecution: IWorkflowExecution;
88
- }
89
- export type ICancelWorkflowExecutionResponse = IResponse<ICancelWorkflowExecutionData>;
90
- export interface IWorkflowExecutionTimeSeriesBucket {
91
- date: string;
92
- total: number;
93
- completed: number;
94
- failed: number;
95
- cancelled: number;
96
- quotaExceeded: number;
97
- running: number;
98
- pending: number;
99
- avgDurationMs: number | null;
100
- }
101
- export interface IGetTimeSeriesWorkflowExecutionData {
102
- timeSeries: IWorkflowExecutionTimeSeriesBucket[];
103
- }
104
- export type IGetTimeSeriesWorkflowExecutionResponse = IResponse<IGetTimeSeriesWorkflowExecutionData>;
105
- export interface IProjectWorkflowAnalyticsPerWorkflow {
106
- workflowId: string;
107
- workflowName: string;
108
- total: number;
109
- completed: number;
110
- failed: number;
111
- cancelled: number;
112
- quotaExceeded: number;
113
- avgDurationMs: number | null;
114
- successRate: number | null;
115
- }
116
- export interface IGetProjectWorkflowAnalyticsData {
117
- stats: IWorkflowExecutionStats;
118
- timeSeries: IWorkflowExecutionTimeSeriesBucket[];
119
- perWorkflow: IProjectWorkflowAnalyticsPerWorkflow[];
120
- totalWorkflows: number;
121
- activeWorkflows: number;
122
- }
123
- export type IGetProjectWorkflowAnalyticsResponse = IResponse<IGetProjectWorkflowAnalyticsData>;
124
- export interface ICreateWorkflowTriggerData {
125
- workflowTrigger: IWorkflowTrigger;
126
- }
127
- export type ICreateWorkflowTriggerResponse = IResponse<ICreateWorkflowTriggerData>;
128
- export interface IListWorkflowTriggersData {
129
- workflowTriggers: IWorkflowTrigger[];
130
- monitorAlertRuleStates: Record<string, MonitorAlertRuleTriggerState>;
131
- }
132
- export type IListWorkflowTriggersResponse = IResponse<IListWorkflowTriggersData>;
133
- export interface IGetWorkflowTriggerData {
134
- workflowTrigger: IWorkflowTrigger;
135
- monitorAlertRuleState: MonitorAlertRuleTriggerState | null;
136
- }
137
- export type IGetWorkflowTriggerResponse = IResponse<IGetWorkflowTriggerData>;
138
- export interface IUpdateWorkflowTriggerData {
139
- workflowTrigger: IWorkflowTrigger;
140
- }
141
- export type IUpdateWorkflowTriggerResponse = IResponse<IUpdateWorkflowTriggerData>;
142
- export interface IDeleteWorkflowTriggerData {
143
- }
144
- export type IDeleteWorkflowTriggerResponse = IResponse<IDeleteWorkflowTriggerData>;
145
- export interface IGetWorkflowTriggerStatsData {
146
- total: number;
147
- completed: number;
148
- failed: number;
149
- last24h: number;
150
- byDay: Array<{
151
- date: string;
152
- total: number;
153
- completed: number;
154
- failed: number;
155
- }>;
156
- }
157
- export type IGetWorkflowTriggerStatsResponse = IResponse<IGetWorkflowTriggerStatsData>;
158
- export interface IGetWorkflowTriggerWithWorkflowData {
159
- workflowTrigger: IWorkflowTrigger;
160
- workflow: IWorkflow;
161
- }
162
- export type IGetWorkflowTriggerWithWorkflowResponse = IResponse<IGetWorkflowTriggerWithWorkflowData>;
163
- export interface IListWorkflowByMonitorAlertRuleData {
164
- workflows: IWorkflow[];
165
- }
166
- export type IListWorkflowByMonitorAlertRuleResponse = IResponse<IListWorkflowByMonitorAlertRuleData>;
167
- export declare enum WorkflowExecutionSSEEvent {
168
- EXECUTION_STARTED = "EXECUTION_STARTED",
169
- EXECUTION_RUNNING = "EXECUTION_RUNNING",
170
- EXECUTION_COMPLETED = "EXECUTION_COMPLETED",
171
- EXECUTION_FAILED = "EXECUTION_FAILED",
172
- EXECUTION_CANCELLED = "EXECUTION_CANCELLED",
173
- STEP_RUNNING = "STEP_RUNNING",
174
- STEP_COMPLETED = "STEP_COMPLETED",
175
- STEP_FAILED = "STEP_FAILED",
176
- STEP_SKIPPED = "STEP_SKIPPED"
177
- }
178
- export interface IWorkflowExecutionSSEPayloadInput {
179
- workflowId: string;
180
- executionId: string;
181
- status: string;
182
- stepId?: string;
183
- stepExecutionId?: string;
184
- error?: string;
185
- durationMs?: number;
186
- retryNumber?: number;
187
- parentExecutionId?: string;
188
- }
189
- export interface IWorkflowExecutionSSEPayload extends IWorkflowExecutionSSEPayloadInput {
190
- timestamp: string;
191
- }
192
- export interface IWorkflowExecutionSSEMessage {
193
- type: WorkflowExecutionSSEEvent;
194
- payload: IWorkflowExecutionSSEPayload;
195
- }
@@ -1,16 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.WorkflowExecutionSSEEvent = void 0;
4
- var WorkflowExecutionSSEEvent;
5
- (function (WorkflowExecutionSSEEvent) {
6
- WorkflowExecutionSSEEvent["EXECUTION_STARTED"] = "EXECUTION_STARTED";
7
- WorkflowExecutionSSEEvent["EXECUTION_RUNNING"] = "EXECUTION_RUNNING";
8
- WorkflowExecutionSSEEvent["EXECUTION_COMPLETED"] = "EXECUTION_COMPLETED";
9
- WorkflowExecutionSSEEvent["EXECUTION_FAILED"] = "EXECUTION_FAILED";
10
- WorkflowExecutionSSEEvent["EXECUTION_CANCELLED"] = "EXECUTION_CANCELLED";
11
- WorkflowExecutionSSEEvent["STEP_RUNNING"] = "STEP_RUNNING";
12
- WorkflowExecutionSSEEvent["STEP_COMPLETED"] = "STEP_COMPLETED";
13
- WorkflowExecutionSSEEvent["STEP_FAILED"] = "STEP_FAILED";
14
- WorkflowExecutionSSEEvent["STEP_SKIPPED"] = "STEP_SKIPPED";
15
- })(WorkflowExecutionSSEEvent || (exports.WorkflowExecutionSSEEvent = WorkflowExecutionSSEEvent = {}));
16
- //# sourceMappingURL=workflow.response.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"workflow.response.js","sourceRoot":"","sources":["../../../../../src/types/interface/api/responses/workflow.response.ts"],"names":[],"mappings":";;;AAyPA,IAAY,yBAUX;AAVD,WAAY,yBAAyB;IACnC,oEAAuC,CAAA;IACvC,oEAAuC,CAAA;IACvC,wEAA2C,CAAA;IAC3C,kEAAqC,CAAA;IACrC,wEAA2C,CAAA;IAC3C,0DAA6B,CAAA;IAC7B,8DAAiC,CAAA;IACjC,wDAA2B,CAAA;IAC3B,0DAA6B,CAAA;AAC/B,CAAC,EAVW,yBAAyB,yCAAzB,yBAAyB,QAUpC"}
@@ -1,19 +0,0 @@
1
- import { EmailSenderKind, EmailSendStatus } from '../../enum/email.enum';
2
- import { WorkflowFailureCode } from '../../enum/workflow.enum';
3
- export interface IWorkflowEmailSend {
4
- id: string;
5
- projectId: string;
6
- workflowId: string;
7
- executionId: string;
8
- rootExecutionId: string;
9
- stepId: string;
10
- smtpServerId: string | null;
11
- sender: EmailSenderKind;
12
- recipientUserId: string | null;
13
- recipientAddressHash: string;
14
- recipientLabel: string;
15
- subject: string;
16
- status: EmailSendStatus;
17
- errorCode: WorkflowFailureCode | null;
18
- createdAt?: Date;
19
- }
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=workflow-email-send.model.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"workflow-email-send.model.js","sourceRoot":"","sources":["../../../../src/types/interface/models/workflow-email-send.model.ts"],"names":[],"mappings":""}
@@ -1,29 +0,0 @@
1
- import { WorkflowExecutionOutcome, WorkflowExecutionStatus, WorkflowFailureCode } from '../../enum/workflow.enum';
2
- import { IWorkflow } from './workflow.model';
3
- import { IWorkflowTrigger } from './workflow-trigger.model';
4
- import { IWorkflowStepExecution } from './workflow-step-execution.model';
5
- export interface IWorkflowExecution {
6
- id: string;
7
- workflowId: string;
8
- workflowTriggerId: string;
9
- status: WorkflowExecutionStatus;
10
- eventKey: string | null;
11
- startedAt: Date;
12
- completedAt: Date | null;
13
- failedAt: Date | null;
14
- cancelledAt: Date | null;
15
- error: string | null;
16
- errorCode: WorkflowFailureCode | null;
17
- outcome: WorkflowExecutionOutcome | null;
18
- context: Record<string, any>;
19
- metadata: Record<string, any> | null;
20
- retryNumber: number;
21
- creditCost: number | null;
22
- overQuota: boolean;
23
- parentExecutionId: string | null;
24
- createdAt?: Date;
25
- updatedAt?: Date;
26
- workflow?: IWorkflow;
27
- workflowTrigger?: IWorkflowTrigger;
28
- workflowStepExecutions?: IWorkflowStepExecution[];
29
- }
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=workflow-execution.model.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"workflow-execution.model.js","sourceRoot":"","sources":["../../../../src/types/interface/models/workflow-execution.model.ts"],"names":[],"mappings":""}
@@ -1,11 +0,0 @@
1
- export interface IWorkflowStepConnection {
2
- id: string;
3
- workflowId: string;
4
- fromStepId: string | null;
5
- toStepId: string | null;
6
- label: string | null;
7
- expression: string | null;
8
- order: number;
9
- createdAt?: Date;
10
- updatedAt?: Date;
11
- }
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=workflow-step-connection.model.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"workflow-step-connection.model.js","sourceRoot":"","sources":["../../../../src/types/interface/models/workflow-step-connection.model.ts"],"names":[],"mappings":""}
@@ -1,25 +0,0 @@
1
- import { WorkflowContext } from '../../../workflow-expressions';
2
- import { WorkflowStepStatus } from '../../enum/workflow.enum';
3
- import { IWorkflowExecution } from './workflow-execution.model';
4
- import { IWorkflowStep } from './workflow-step.model';
5
- export interface IWorkflowStepExecution {
6
- id: string;
7
- workflowExecutionId: string;
8
- workflowStepId: string;
9
- status: WorkflowStepStatus;
10
- startedAt: Date | null;
11
- completedAt: Date | null;
12
- failedAt: Date | null;
13
- skippedAt: Date | null;
14
- error: string | null;
15
- inputData: Record<string, any> | null;
16
- outputData: Record<string, any> | null;
17
- context: WorkflowContext | null;
18
- retryCount: number | null;
19
- metadata: Record<string, any> | null;
20
- executionOrder: number;
21
- createdAt?: Date;
22
- updatedAt?: Date;
23
- workflowExecution?: IWorkflowExecution;
24
- workflowStep?: IWorkflowStep;
25
- }
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=workflow-step-execution.model.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"workflow-step-execution.model.js","sourceRoot":"","sources":["../../../../src/types/interface/models/workflow-step-execution.model.ts"],"names":[],"mappings":""}
@@ -1,17 +0,0 @@
1
- import { StepConfig as WorkflowStepConfig } from '../../dto/workflow.dto';
2
- import { WorkflowStepType } from '../../enum/workflow.enum';
3
- import { IWorkflow } from './workflow.model';
4
- export interface IWorkflowStep {
5
- id: string;
6
- workflowId: string;
7
- type: WorkflowStepType;
8
- name: string;
9
- description: string | null;
10
- config: WorkflowStepConfig;
11
- continueOnError: boolean;
12
- isEnabled: boolean;
13
- timeout: number | null;
14
- createdAt?: Date;
15
- updatedAt?: Date;
16
- workflow?: IWorkflow;
17
- }
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=workflow-step.model.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"workflow-step.model.js","sourceRoot":"","sources":["../../../../src/types/interface/models/workflow-step.model.ts"],"names":[],"mappings":""}
@@ -1,28 +0,0 @@
1
- import { WorkflowTriggerType } from '../../enum/workflow.enum';
2
- import { IMonitorAlertRuleTriggerConfig } from '../../dto/workflow.dto';
3
- import { IWorkflow } from './workflow.model';
4
- export interface ITriggerFilter {
5
- expression?: string;
6
- }
7
- export interface IUserRegistrationTriggerConfig {
8
- }
9
- export interface IWebhookTriggerConfig {
10
- signatureSecret: string | null;
11
- signatureHeader: string | null;
12
- secretToken: string;
13
- }
14
- export type TriggerConfig = IUserRegistrationTriggerConfig | IWebhookTriggerConfig | IMonitorAlertRuleTriggerConfig | Record<string, never>;
15
- export interface IWorkflowTrigger {
16
- id: string;
17
- workflowId: string;
18
- type: WorkflowTriggerType;
19
- name: string;
20
- description: string | null;
21
- config: TriggerConfig;
22
- filters: ITriggerFilter[];
23
- isActive: boolean;
24
- lastScheduledAt: Date | null;
25
- createdAt?: Date;
26
- updatedAt?: Date;
27
- workflow?: IWorkflow;
28
- }
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=workflow-trigger.model.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"workflow-trigger.model.js","sourceRoot":"","sources":["../../../../src/types/interface/models/workflow-trigger.model.ts"],"names":[],"mappings":""}
@@ -1,29 +0,0 @@
1
- import { WebhookDirection, WebhookStatus, HttpMethod } from '../../enum/workflow.enum';
2
- import { IWorkflowExecution } from './workflow-execution.model';
3
- import { IWorkflowStepExecution } from './workflow-step-execution.model';
4
- export interface IWorkflowWebhook {
5
- id: string;
6
- direction: WebhookDirection;
7
- workflowExecutionId: string | null;
8
- workflowStepExecutionId: string | null;
9
- url: string;
10
- method: HttpMethod;
11
- headers: Record<string, string>;
12
- body: Record<string, any> | null;
13
- status: WebhookStatus;
14
- statusCode: number | null;
15
- response: Record<string, any> | null;
16
- error: string | null;
17
- retryCount: number | null;
18
- processedAt: Date | null;
19
- signatureHeader: string | null;
20
- signatureSecret: string | null;
21
- signatureEntryKey: string | null;
22
- timeout: number;
23
- maxRetries: number;
24
- retryDelay: number;
25
- createdAt?: Date;
26
- updatedAt?: Date;
27
- workflowExecution?: IWorkflowExecution;
28
- workflowStepExecution?: IWorkflowStepExecution;
29
- }
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=workflow-webhook.model.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"workflow-webhook.model.js","sourceRoot":"","sources":["../../../../src/types/interface/models/workflow-webhook.model.ts"],"names":[],"mappings":""}
@@ -1,23 +0,0 @@
1
- import { WorkflowStatus, WorkflowTemplate } from '../../enum/workflow.enum';
2
- import { IWorkflowSettings } from '../../dto/workflow.dto';
3
- import { IProject } from './project.model';
4
- import { IWorkflowTrigger } from './workflow-trigger.model';
5
- import { IWorkflowStep } from './workflow-step.model';
6
- import { IWorkflowExecution } from './workflow-execution.model';
7
- export interface IWorkflow {
8
- id: string;
9
- projectId: string;
10
- name: string;
11
- description: string | null;
12
- template: WorkflowTemplate | null;
13
- status: WorkflowStatus;
14
- settings: IWorkflowSettings;
15
- userId: string;
16
- emailRecipientsLeftCount?: number;
17
- createdAt?: Date;
18
- updatedAt?: Date;
19
- project?: IProject | null;
20
- workflowTriggers?: IWorkflowTrigger[];
21
- workflowSteps?: IWorkflowStep[];
22
- workflowExecutions?: IWorkflowExecution[];
23
- }
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=workflow.model.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"workflow.model.js","sourceRoot":"","sources":["../../../../src/types/interface/models/workflow.model.ts"],"names":[],"mappings":""}
@@ -1,20 +0,0 @@
1
- import { WorkflowStepType } from '../types/enum/workflow.enum';
2
- export declare const WORKFLOW_STEP_CREDIT_COST: Readonly<Record<WorkflowStepType, number>>;
3
- export declare const computeWorkflowCreditCost: (steps: {
4
- type: WorkflowStepType;
5
- }[]) => number;
6
- export interface IWorkflowCreditStructure {
7
- steps: {
8
- id: string;
9
- type: WorkflowStepType;
10
- isEnabled?: boolean;
11
- }[];
12
- connections: IWorkflowCreditConnection[];
13
- }
14
- export interface IWorkflowCreditConnection {
15
- fromStepId: string | null;
16
- toStepId: string | null;
17
- order?: number;
18
- expression?: string | null;
19
- }
20
- export declare const computeWorkflowMaxCreditCost: (structure: IWorkflowCreditStructure) => number;
@@ -1,69 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.computeWorkflowMaxCreditCost = exports.computeWorkflowCreditCost = exports.WORKFLOW_STEP_CREDIT_COST = void 0;
4
- const workflow_enum_1 = require("../types/enum/workflow.enum");
5
- exports.WORKFLOW_STEP_CREDIT_COST = Object.freeze({
6
- [workflow_enum_1.WorkflowStepType.FILTER]: 0,
7
- [workflow_enum_1.WorkflowStepType.SWITCH]: 0,
8
- [workflow_enum_1.WorkflowStepType.SLEEP]: 0,
9
- [workflow_enum_1.WorkflowStepType.ACTION]: 1,
10
- [workflow_enum_1.WorkflowStepType.CODE]: 5,
11
- });
12
- const computeWorkflowCreditCost = (steps) => steps.reduce((total, step) => total + exports.WORKFLOW_STEP_CREDIT_COST[step.type], 0);
13
- exports.computeWorkflowCreditCost = computeWorkflowCreditCost;
14
- const byOrder = (a, b) => (a.order ?? 0) - (b.order ?? 0);
15
- const alwaysMatches = (connection) => connection.expression === null || connection.expression?.trim() === '';
16
- const computeWorkflowMaxCreditCost = (structure) => {
17
- const stepsById = new Map(structure.steps.map((step) => [step.id, step]));
18
- const entryConnection = structure.connections
19
- .filter((connection) => connection.fromStepId === null)
20
- .sort(byOrder)[0];
21
- if (!entryConnection || entryConnection.toStepId === null) {
22
- return 0;
23
- }
24
- const outgoing = new Map();
25
- for (const connection of structure.connections) {
26
- if (connection.fromStepId !== null) {
27
- outgoing.set(connection.fromStepId, [
28
- ...(outgoing.get(connection.fromStepId) ?? []),
29
- connection,
30
- ]);
31
- }
32
- }
33
- const candidatesByStepId = new Map();
34
- for (const [stepId, connections] of outgoing) {
35
- const candidates = [];
36
- for (const connection of [...connections].sort(byOrder)) {
37
- candidates.push(connection.toStepId);
38
- if (alwaysMatches(connection)) {
39
- break;
40
- }
41
- }
42
- candidatesByStepId.set(stepId, candidates);
43
- }
44
- const memo = new Map();
45
- const visiting = new Set();
46
- const costFrom = (stepId) => {
47
- const step = stepsById.get(stepId);
48
- if (!step || visiting.has(stepId)) {
49
- return 0;
50
- }
51
- const known = memo.get(stepId);
52
- if (known !== undefined) {
53
- return known;
54
- }
55
- const isEnabled = step.isEnabled !== false;
56
- let total = 0;
57
- if (isEnabled || step.type !== workflow_enum_1.WorkflowStepType.FILTER) {
58
- visiting.add(stepId);
59
- const downstream = Math.max(0, ...(candidatesByStepId.get(stepId) ?? []).map((toStepId) => toStepId === null ? 0 : costFrom(toStepId)));
60
- visiting.delete(stepId);
61
- total = (isEnabled ? exports.WORKFLOW_STEP_CREDIT_COST[step.type] : 0) + downstream;
62
- }
63
- memo.set(stepId, total);
64
- return total;
65
- };
66
- return costFrom(entryConnection.toStepId);
67
- };
68
- exports.computeWorkflowMaxCreditCost = computeWorkflowMaxCreditCost;
69
- //# sourceMappingURL=workflow-credit.utils.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"workflow-credit.utils.js","sourceRoot":"","sources":["../../src/utils/workflow-credit.utils.ts"],"names":[],"mappings":";;;AAAA,+DAA+D;AAMlD,QAAA,yBAAyB,GAA+C,MAAM,CAAC,MAAM,CAAC;IACjG,CAAC,gCAAgB,CAAC,MAAM,CAAC,EAAE,CAAC;IAC5B,CAAC,gCAAgB,CAAC,MAAM,CAAC,EAAE,CAAC;IAC5B,CAAC,gCAAgB,CAAC,KAAK,CAAC,EAAE,CAAC;IAC3B,CAAC,gCAAgB,CAAC,MAAM,CAAC,EAAE,CAAC;IAC5B,CAAC,gCAAgB,CAAC,IAAI,CAAC,EAAE,CAAC;CAC3B,CAAC,CAAC;AAGI,MAAM,yBAAyB,GAAG,CAAC,KAAmC,EAAU,EAAE,CACvF,KAAK,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,KAAK,GAAG,iCAAyB,CAAC,IAAI,CAAC,IAA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G,CACzB,CAAC,EACD,GAAG,CAAC,kBAAkB,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CACzD,QAAQ,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAC3C,CACF,CAAC;YACF,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;YACxB,KAAK,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,iCAAyB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC;QAC9E,CAAC;QACD,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;QACxB,OAAO,KAAK,CAAC;IACf,CAAC,CAAC;IAEF,OAAO,QAAQ,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAC;AAC5C,CAAC,CAAC;AA7DW,QAAA,4BAA4B,gCA6DvC"}
@@ -1,2 +0,0 @@
1
- export * from './trigger-catalog';
2
- export * from './trigger-samples';
@@ -1,19 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./trigger-catalog"), exports);
18
- __exportStar(require("./trigger-samples"), exports);
19
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/workflow/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oDAAkC;AAClC,oDAAkC"}
@@ -1,5 +0,0 @@
1
- import { TriggerFamily, WorkflowTriggerType } from '../types/enum/workflow.enum';
2
- import { IWorkflowProjectServices } from '../types/dto/workflow.dto';
3
- export declare const NEVER_EMITTED_TRIGGERS: readonly WorkflowTriggerType[];
4
- export declare const triggerFamily: (type: WorkflowTriggerType) => TriggerFamily;
5
- export declare const proposedTriggers: (services: IWorkflowProjectServices) => WorkflowTriggerType[];