@abyss-project/console 1.0.57 → 1.0.59
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/api/report.admin.api.d.ts +2 -0
- package/dist/api/report.admin.api.js +9 -0
- package/dist/api/workflow.api.d.ts +4 -1
- package/dist/api/workflow.api.js +16 -1
- package/dist/index.d.ts +10 -0
- package/dist/index.js +13 -1
- package/dist/types/constants/workflow.constants.d.ts +10 -0
- package/dist/types/constants/workflow.constants.js +11 -1
- package/dist/types/dto/workflow.dto.d.ts +1 -0
- package/dist/types/interface/api/index.d.ts +2 -0
- package/dist/types/interface/api/index.js +2 -0
- package/dist/types/interface/api/requests/report.admin.request.d.ts +7 -0
- package/dist/types/interface/api/requests/report.admin.request.js +2 -0
- package/dist/types/interface/api/requests/workflow-webhook.public.request.d.ts +1 -1
- package/dist/types/interface/api/requests/workflow.request.d.ts +20 -0
- package/dist/types/interface/api/responses/report.admin.response.d.ts +85 -0
- package/dist/types/interface/api/responses/report.admin.response.js +2 -0
- package/dist/types/interface/api/responses/workflow.response.d.ts +29 -0
- package/dist/types/interface/models/workflow-step-execution.model.d.ts +2 -0
- package/dist/types/interface/models/workflow-step.model.d.ts +1 -0
- package/dist/types/interface/models/workflow-trigger.model.d.ts +1 -0
- package/dist/workflow-expressions/types.d.ts +8 -1
- package/dist/workflow-expressions/types.js +8 -1
- package/package.json +1 -1
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getReportAdmin = void 0;
|
|
4
|
+
const __1 = require("..");
|
|
5
|
+
const getReportAdmin = async (body) => {
|
|
6
|
+
const response = await __1.AbyssConsoleCore.axios.post('/report/admin/report', body);
|
|
7
|
+
return response.data;
|
|
8
|
+
};
|
|
9
|
+
exports.getReportAdmin = getReportAdmin;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { ICreateWorkflowParams, ICreateWorkflowBody, IPaginateWorkflowParams, IPaginateWorkflowQuery, IGetWorkflowParams, IUpdateWorkflowParams, IUpdateWorkflowBody, IUpdateWorkflowStatusParams, IUpdateWorkflowStatusBody, IDeleteWorkflowParams, ICreateWorkflowStepParams, ICreateWorkflowStepBody, IListWorkflowStepsParams, IUpdateWorkflowStepParams, IUpdateWorkflowStepBody, IDeleteWorkflowStepParams, IListWorkflowStepConnectionsParams, IUpdateWorkflowStepConnectionParams, IUpdateWorkflowStepConnectionBody, IPaginateWorkflowExecutionParams, IPaginateWorkflowExecutionQuery, IGetWorkflowExecutionParams, IGetWorkflowExecutionStatsParams, IGetWorkflowExecutionStatsQuery, ICancelWorkflowExecutionParams, ICreateWorkflowTriggerParams, ICreateWorkflowTriggerBody, IListWorkflowTriggersParams, IGetWorkflowTriggerParams, IUpdateWorkflowTriggerParams, IUpdateWorkflowTriggerBody, IDeleteWorkflowTriggerParams, ICreateWorkflowResponse, IPaginateWorkflowResponse, IGetWorkflowResponse, IUpdateWorkflowResponse, IDeleteWorkflowResponse, ICreateWorkflowStepResponse, IListWorkflowStepResponse, IUpdateWorkflowStepResponse, IDeleteWorkflowStepResponse, IListWorkflowStepConnectionResponse, IUpdateWorkflowStepConnectionResponse, IPaginateWorkflowExecutionResponse, IGetWorkflowExecutionResponse, IGetStatsWorkflowExecutionResponse, ICancelWorkflowExecutionResponse, ICreateWorkflowTriggerResponse, IListWorkflowTriggersResponse, IGetWorkflowTriggerResponse, IUpdateWorkflowTriggerResponse, IDeleteWorkflowTriggerResponse } from '../types';
|
|
1
|
+
import { ICreateWorkflowParams, ICreateWorkflowBody, IPaginateWorkflowParams, IPaginateWorkflowQuery, IGetWorkflowParams, IUpdateWorkflowParams, IUpdateWorkflowBody, IUpdateWorkflowStatusParams, IUpdateWorkflowStatusBody, IDeleteWorkflowParams, IExecuteWorkflowParams, IExecuteWorkflowBody, ICreateWorkflowStepParams, ICreateWorkflowStepBody, IListWorkflowStepsParams, IUpdateWorkflowStepParams, IUpdateWorkflowStepBody, IDeleteWorkflowStepParams, IListWorkflowStepConnectionsParams, IUpdateWorkflowStepConnectionParams, IUpdateWorkflowStepConnectionBody, IPaginateWorkflowExecutionParams, IPaginateWorkflowExecutionQuery, IGetWorkflowExecutionParams, IGetWorkflowExecutionStatsParams, IGetWorkflowExecutionStatsQuery, ICancelWorkflowExecutionParams, IGetTimeSeriesWorkflowExecutionParams, IGetTimeSeriesWorkflowExecutionQuery, ICreateWorkflowTriggerParams, ICreateWorkflowTriggerBody, IListWorkflowTriggersParams, IGetWorkflowTriggerParams, IUpdateWorkflowTriggerParams, IUpdateWorkflowTriggerBody, IDeleteWorkflowTriggerParams, IGetWorkflowTriggerStatsParams, ICreateWorkflowResponse, IPaginateWorkflowResponse, IGetWorkflowResponse, IUpdateWorkflowResponse, IDeleteWorkflowResponse, IExecuteWorkflowResponse, ICreateWorkflowStepResponse, IListWorkflowStepResponse, IUpdateWorkflowStepResponse, IDeleteWorkflowStepResponse, IListWorkflowStepConnectionResponse, IUpdateWorkflowStepConnectionResponse, IPaginateWorkflowExecutionResponse, IGetWorkflowExecutionResponse, IGetStatsWorkflowExecutionResponse, ICancelWorkflowExecutionResponse, IGetTimeSeriesWorkflowExecutionResponse, ICreateWorkflowTriggerResponse, IListWorkflowTriggersResponse, IGetWorkflowTriggerResponse, IUpdateWorkflowTriggerResponse, IDeleteWorkflowTriggerResponse, IGetWorkflowTriggerStatsResponse } from '../types';
|
|
2
2
|
export declare const createWorkflow: (params: ICreateWorkflowParams, body: ICreateWorkflowBody) => Promise<ICreateWorkflowResponse>;
|
|
3
3
|
export declare const paginateWorkflow: (params: IPaginateWorkflowParams, query: IPaginateWorkflowQuery) => Promise<IPaginateWorkflowResponse>;
|
|
4
4
|
export declare const getWorkflow: (params: IGetWorkflowParams) => Promise<IGetWorkflowResponse>;
|
|
5
5
|
export declare const updateWorkflow: (params: IUpdateWorkflowParams, body: IUpdateWorkflowBody) => Promise<IUpdateWorkflowResponse>;
|
|
6
6
|
export declare const updateWorkflowStatus: (params: IUpdateWorkflowStatusParams, body: IUpdateWorkflowStatusBody) => Promise<IUpdateWorkflowResponse>;
|
|
7
7
|
export declare const deleteWorkflow: (params: IDeleteWorkflowParams) => Promise<IDeleteWorkflowResponse>;
|
|
8
|
+
export declare const executeWorkflow: (params: IExecuteWorkflowParams, body?: IExecuteWorkflowBody) => Promise<IExecuteWorkflowResponse>;
|
|
8
9
|
export declare const createWorkflowStep: (params: ICreateWorkflowStepParams, body: ICreateWorkflowStepBody) => Promise<ICreateWorkflowStepResponse>;
|
|
9
10
|
export declare const listWorkflowStep: (params: IListWorkflowStepsParams) => Promise<IListWorkflowStepResponse>;
|
|
10
11
|
export declare const updateWorkflowStep: (params: IUpdateWorkflowStepParams, body: IUpdateWorkflowStepBody) => Promise<IUpdateWorkflowStepResponse>;
|
|
@@ -15,8 +16,10 @@ export declare const paginateWorkflowExecution: (params: IPaginateWorkflowExecut
|
|
|
15
16
|
export declare const getWorkflowExecution: (params: IGetWorkflowExecutionParams) => Promise<IGetWorkflowExecutionResponse>;
|
|
16
17
|
export declare const getWorkflowStats: (params: IGetWorkflowExecutionStatsParams, query?: IGetWorkflowExecutionStatsQuery) => Promise<IGetStatsWorkflowExecutionResponse>;
|
|
17
18
|
export declare const cancelWorkflowExecution: (params: ICancelWorkflowExecutionParams) => Promise<ICancelWorkflowExecutionResponse>;
|
|
19
|
+
export declare const getWorkflowExecutionTimeSeries: (params: IGetTimeSeriesWorkflowExecutionParams, query?: IGetTimeSeriesWorkflowExecutionQuery) => Promise<IGetTimeSeriesWorkflowExecutionResponse>;
|
|
18
20
|
export declare const createWorkflowTrigger: (params: ICreateWorkflowTriggerParams, body: ICreateWorkflowTriggerBody) => Promise<ICreateWorkflowTriggerResponse>;
|
|
19
21
|
export declare const listWorkflowTrigger: (params: IListWorkflowTriggersParams) => Promise<IListWorkflowTriggersResponse>;
|
|
20
22
|
export declare const getWorkflowTrigger: (params: IGetWorkflowTriggerParams) => Promise<IGetWorkflowTriggerResponse>;
|
|
21
23
|
export declare const updateWorkflowTrigger: (params: IUpdateWorkflowTriggerParams, body: IUpdateWorkflowTriggerBody) => Promise<IUpdateWorkflowTriggerResponse>;
|
|
22
24
|
export declare const deleteWorkflowTrigger: (params: IDeleteWorkflowTriggerParams) => Promise<IDeleteWorkflowTriggerResponse>;
|
|
25
|
+
export declare const getWorkflowTriggerStats: (params: IGetWorkflowTriggerStatsParams) => Promise<IGetWorkflowTriggerStatsResponse>;
|
package/dist/api/workflow.api.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.deleteWorkflowTrigger = exports.updateWorkflowTrigger = exports.getWorkflowTrigger = exports.listWorkflowTrigger = exports.createWorkflowTrigger = exports.cancelWorkflowExecution = exports.getWorkflowStats = exports.getWorkflowExecution = exports.paginateWorkflowExecution = exports.updateWorkflowStepConnection = exports.listWorkflowStepConnections = exports.deleteWorkflowStep = exports.updateWorkflowStep = exports.listWorkflowStep = exports.createWorkflowStep = exports.deleteWorkflow = exports.updateWorkflowStatus = exports.updateWorkflow = exports.getWorkflow = exports.paginateWorkflow = exports.createWorkflow = void 0;
|
|
3
|
+
exports.getWorkflowTriggerStats = exports.deleteWorkflowTrigger = exports.updateWorkflowTrigger = exports.getWorkflowTrigger = exports.listWorkflowTrigger = exports.createWorkflowTrigger = exports.getWorkflowExecutionTimeSeries = exports.cancelWorkflowExecution = exports.getWorkflowStats = exports.getWorkflowExecution = exports.paginateWorkflowExecution = exports.updateWorkflowStepConnection = exports.listWorkflowStepConnections = exports.deleteWorkflowStep = exports.updateWorkflowStep = exports.listWorkflowStep = exports.createWorkflowStep = exports.executeWorkflow = exports.deleteWorkflow = exports.updateWorkflowStatus = exports.updateWorkflow = exports.getWorkflow = exports.paginateWorkflow = exports.createWorkflow = void 0;
|
|
4
4
|
const __1 = require("..");
|
|
5
5
|
const createWorkflow = async (params, body) => {
|
|
6
6
|
const response = await __1.AbyssConsoleCore.axios.post(`/workflow/${params.projectId}`, body);
|
|
@@ -32,6 +32,11 @@ const deleteWorkflow = async (params) => {
|
|
|
32
32
|
return response.data;
|
|
33
33
|
};
|
|
34
34
|
exports.deleteWorkflow = deleteWorkflow;
|
|
35
|
+
const executeWorkflow = async (params, body) => {
|
|
36
|
+
const response = await __1.AbyssConsoleCore.axios.post(`/workflow/${params.projectId}/${params.workflowId}/execute`, body || {});
|
|
37
|
+
return response.data;
|
|
38
|
+
};
|
|
39
|
+
exports.executeWorkflow = executeWorkflow;
|
|
35
40
|
const createWorkflowStep = async (params, body) => {
|
|
36
41
|
const response = await __1.AbyssConsoleCore.axios.post(`/workflow/${params.projectId}/${params.workflowId}/step`, body);
|
|
37
42
|
return response.data;
|
|
@@ -82,6 +87,11 @@ const cancelWorkflowExecution = async (params) => {
|
|
|
82
87
|
return response.data;
|
|
83
88
|
};
|
|
84
89
|
exports.cancelWorkflowExecution = cancelWorkflowExecution;
|
|
90
|
+
const getWorkflowExecutionTimeSeries = async (params, query) => {
|
|
91
|
+
const response = await __1.AbyssConsoleCore.axios.get(`/workflow/${params.projectId}/${params.workflowId}/execution/timeseries`, { params: query });
|
|
92
|
+
return response.data;
|
|
93
|
+
};
|
|
94
|
+
exports.getWorkflowExecutionTimeSeries = getWorkflowExecutionTimeSeries;
|
|
85
95
|
const createWorkflowTrigger = async (params, body) => {
|
|
86
96
|
const response = await __1.AbyssConsoleCore.axios.post(`/workflow/${params.projectId}/${params.workflowId}/trigger`, body);
|
|
87
97
|
return response.data;
|
|
@@ -107,3 +117,8 @@ const deleteWorkflowTrigger = async (params) => {
|
|
|
107
117
|
return response.data;
|
|
108
118
|
};
|
|
109
119
|
exports.deleteWorkflowTrigger = deleteWorkflowTrigger;
|
|
120
|
+
const getWorkflowTriggerStats = async (params) => {
|
|
121
|
+
const response = await __1.AbyssConsoleCore.axios.get(`/workflow/${params.projectId}/${params.workflowId}/trigger/${params.workflowTriggerId}/stats`);
|
|
122
|
+
return response.data;
|
|
123
|
+
};
|
|
124
|
+
exports.getWorkflowTriggerStats = getWorkflowTriggerStats;
|
package/dist/index.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ import * as secretPublicApi from './api/secret-public.api';
|
|
|
13
13
|
import * as variableApi from './api/variable.api';
|
|
14
14
|
import * as variableAccessApi from './api/variable-access.api';
|
|
15
15
|
import * as variablePublicApi from './api/variable-public.api';
|
|
16
|
+
import * as reportAdminApi from './api/report.admin.api';
|
|
16
17
|
export * from './types';
|
|
17
18
|
export * from './utils';
|
|
18
19
|
export * from './workflow-expressions';
|
|
@@ -27,7 +28,13 @@ type CoreConfig = {
|
|
|
27
28
|
adminToken?: string;
|
|
28
29
|
baseURL?: string;
|
|
29
30
|
};
|
|
31
|
+
export { getReportAdmin } from './api/report.admin.api';
|
|
30
32
|
type AbyssConsoleCoreSDK = {
|
|
33
|
+
report: {
|
|
34
|
+
admin: {
|
|
35
|
+
getReport: typeof reportAdminApi.getReportAdmin;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
31
38
|
domainVerification: {
|
|
32
39
|
create: typeof domainVerificationApi.createDomainVerification;
|
|
33
40
|
list: typeof domainVerificationApi.listDomainVerification;
|
|
@@ -115,6 +122,7 @@ type AbyssConsoleCoreSDK = {
|
|
|
115
122
|
update: typeof workflowApi.updateWorkflow;
|
|
116
123
|
updateStatus: typeof workflowApi.updateWorkflowStatus;
|
|
117
124
|
delete: typeof workflowApi.deleteWorkflow;
|
|
125
|
+
execute: typeof workflowApi.executeWorkflow;
|
|
118
126
|
step: {
|
|
119
127
|
create: typeof workflowApi.createWorkflowStep;
|
|
120
128
|
list: typeof workflowApi.listWorkflowStep;
|
|
@@ -130,6 +138,7 @@ type AbyssConsoleCoreSDK = {
|
|
|
130
138
|
get: typeof workflowApi.getWorkflowExecution;
|
|
131
139
|
getStats: typeof workflowApi.getWorkflowStats;
|
|
132
140
|
cancel: typeof workflowApi.cancelWorkflowExecution;
|
|
141
|
+
timeSeries: typeof workflowApi.getWorkflowExecutionTimeSeries;
|
|
133
142
|
};
|
|
134
143
|
trigger: {
|
|
135
144
|
create: typeof workflowApi.createWorkflowTrigger;
|
|
@@ -137,6 +146,7 @@ type AbyssConsoleCoreSDK = {
|
|
|
137
146
|
get: typeof workflowApi.getWorkflowTrigger;
|
|
138
147
|
update: typeof workflowApi.updateWorkflowTrigger;
|
|
139
148
|
delete: typeof workflowApi.deleteWorkflowTrigger;
|
|
149
|
+
getStats: typeof workflowApi.getWorkflowTriggerStats;
|
|
140
150
|
};
|
|
141
151
|
admin: {
|
|
142
152
|
paginate: typeof workflowAdminApi.paginateWorkflow;
|
package/dist/index.js
CHANGED
|
@@ -29,7 +29,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
29
29
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
30
30
|
};
|
|
31
31
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32
|
-
exports.AbyssConsoleCore = exports.WEBHOOK_SIGNATURE_ALGORITHM = exports.HEADER_WEBHOOK_SIGNATURE_NAME = exports.ADMIN_TOKEN_HEADER = exports.API_KEY_APPLICATION_HEADER = void 0;
|
|
32
|
+
exports.AbyssConsoleCore = exports.getReportAdmin = exports.WEBHOOK_SIGNATURE_ALGORITHM = exports.HEADER_WEBHOOK_SIGNATURE_NAME = exports.ADMIN_TOKEN_HEADER = exports.API_KEY_APPLICATION_HEADER = void 0;
|
|
33
33
|
const axios_1 = __importDefault(require("axios"));
|
|
34
34
|
const axios_retry_1 = __importStar(require("axios-retry"));
|
|
35
35
|
const domainVerificationApi = __importStar(require("./api/domain-verification.api"));
|
|
@@ -46,6 +46,7 @@ const secretPublicApi = __importStar(require("./api/secret-public.api"));
|
|
|
46
46
|
const variableApi = __importStar(require("./api/variable.api"));
|
|
47
47
|
const variableAccessApi = __importStar(require("./api/variable-access.api"));
|
|
48
48
|
const variablePublicApi = __importStar(require("./api/variable-public.api"));
|
|
49
|
+
const reportAdminApi = __importStar(require("./api/report.admin.api"));
|
|
49
50
|
__exportStar(require("./types"), exports);
|
|
50
51
|
__exportStar(require("./utils"), exports);
|
|
51
52
|
__exportStar(require("./workflow-expressions"), exports);
|
|
@@ -60,6 +61,8 @@ const RETRY_CODES = [
|
|
|
60
61
|
502,
|
|
61
62
|
503,
|
|
62
63
|
];
|
|
64
|
+
var report_admin_api_1 = require("./api/report.admin.api");
|
|
65
|
+
Object.defineProperty(exports, "getReportAdmin", { enumerable: true, get: function () { return report_admin_api_1.getReportAdmin; } });
|
|
63
66
|
class AbyssConsoleCore {
|
|
64
67
|
static get sdk() {
|
|
65
68
|
if (!AbyssConsoleCore._sdk) {
|
|
@@ -86,6 +89,7 @@ class AbyssConsoleCore {
|
|
|
86
89
|
update: workflowApi.updateWorkflow,
|
|
87
90
|
updateStatus: workflowApi.updateWorkflowStatus,
|
|
88
91
|
delete: workflowApi.deleteWorkflow,
|
|
92
|
+
execute: workflowApi.executeWorkflow,
|
|
89
93
|
step: {
|
|
90
94
|
create: workflowApi.createWorkflowStep,
|
|
91
95
|
list: workflowApi.listWorkflowStep,
|
|
@@ -101,6 +105,7 @@ class AbyssConsoleCore {
|
|
|
101
105
|
get: workflowApi.getWorkflowExecution,
|
|
102
106
|
getStats: workflowApi.getWorkflowStats,
|
|
103
107
|
cancel: workflowApi.cancelWorkflowExecution,
|
|
108
|
+
timeSeries: workflowApi.getWorkflowExecutionTimeSeries,
|
|
104
109
|
},
|
|
105
110
|
trigger: {
|
|
106
111
|
create: workflowApi.createWorkflowTrigger,
|
|
@@ -108,6 +113,7 @@ class AbyssConsoleCore {
|
|
|
108
113
|
get: workflowApi.getWorkflowTrigger,
|
|
109
114
|
update: workflowApi.updateWorkflowTrigger,
|
|
110
115
|
delete: workflowApi.deleteWorkflowTrigger,
|
|
116
|
+
getStats: workflowApi.getWorkflowTriggerStats,
|
|
111
117
|
},
|
|
112
118
|
admin: {
|
|
113
119
|
paginate: workflowAdminApi.paginateWorkflow,
|
|
@@ -129,7 +135,13 @@ class AbyssConsoleCore {
|
|
|
129
135
|
delete: projectAdminApi.deleteProject,
|
|
130
136
|
},
|
|
131
137
|
};
|
|
138
|
+
const reportSDK = {
|
|
139
|
+
admin: {
|
|
140
|
+
getReport: reportAdminApi.getReportAdmin,
|
|
141
|
+
},
|
|
142
|
+
};
|
|
132
143
|
const baseSDK = {
|
|
144
|
+
report: reportSDK,
|
|
133
145
|
domainVerification: domainVerificationSDK,
|
|
134
146
|
monitor: {
|
|
135
147
|
up: monitorApi.upMonitor,
|
|
@@ -6,6 +6,16 @@ export declare const SLEEP_DURATION_DEFAULT = 1;
|
|
|
6
6
|
export declare const CODE_STEP_TIMEOUT_MIN = 100;
|
|
7
7
|
export declare const CODE_STEP_TIMEOUT_MAX = 60000;
|
|
8
8
|
export declare const CODE_STEP_TIMEOUT_DEFAULT = 5000;
|
|
9
|
+
export declare const WORKFLOW_SETTINGS_MAX_EXECUTIONS_PER_HOUR_MIN = 1;
|
|
10
|
+
export declare const WORKFLOW_SETTINGS_MAX_EXECUTIONS_PER_HOUR_MAX = 10000;
|
|
11
|
+
export declare const WORKFLOW_SETTINGS_MAX_EXECUTIONS_PER_DAY_MIN = 1;
|
|
12
|
+
export declare const WORKFLOW_SETTINGS_MAX_EXECUTIONS_PER_DAY_MAX = 100000;
|
|
13
|
+
export declare const WORKFLOW_SETTINGS_MAX_RETRY_ATTEMPTS_MIN = 0;
|
|
14
|
+
export declare const WORKFLOW_SETTINGS_MAX_RETRY_ATTEMPTS_MAX = 10;
|
|
15
|
+
export declare const WORKFLOW_SETTINGS_RETRY_DELAY_SECONDS_MIN = 0;
|
|
16
|
+
export declare const WORKFLOW_SETTINGS_RETRY_DELAY_SECONDS_MAX = 3600;
|
|
17
|
+
export declare const WORKFLOW_SETTINGS_EXECUTION_TIMEOUT_MS_MIN = 60000;
|
|
18
|
+
export declare const WORKFLOW_SETTINGS_EXECUTION_TIMEOUT_MS_MAX = 7200000;
|
|
9
19
|
export declare const EXPRESSION_TIMEOUT_DEFAULT = 5000;
|
|
10
20
|
export declare const EXPRESSION_TIMEOUT_MAX = 30000;
|
|
11
21
|
export declare const EXPRESSION_CPU_TIMEOUT = 10000;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.EXPRESSION_MEMORY_LIMIT = exports.EXPRESSION_CPU_TIMEOUT = exports.EXPRESSION_TIMEOUT_MAX = exports.EXPRESSION_TIMEOUT_DEFAULT = exports.CODE_STEP_TIMEOUT_DEFAULT = exports.CODE_STEP_TIMEOUT_MAX = exports.CODE_STEP_TIMEOUT_MIN = exports.SLEEP_DURATION_DEFAULT = exports.SLEEP_DURATION_MAX = exports.SLEEP_DURATION_MIN = exports.WORKFLOW_STEP_TIMEOUT = exports.WORKFLOW_EXECUTION_TIMEOUT = void 0;
|
|
3
|
+
exports.EXPRESSION_MEMORY_LIMIT = exports.EXPRESSION_CPU_TIMEOUT = exports.EXPRESSION_TIMEOUT_MAX = exports.EXPRESSION_TIMEOUT_DEFAULT = exports.WORKFLOW_SETTINGS_EXECUTION_TIMEOUT_MS_MAX = exports.WORKFLOW_SETTINGS_EXECUTION_TIMEOUT_MS_MIN = exports.WORKFLOW_SETTINGS_RETRY_DELAY_SECONDS_MAX = exports.WORKFLOW_SETTINGS_RETRY_DELAY_SECONDS_MIN = exports.WORKFLOW_SETTINGS_MAX_RETRY_ATTEMPTS_MAX = exports.WORKFLOW_SETTINGS_MAX_RETRY_ATTEMPTS_MIN = exports.WORKFLOW_SETTINGS_MAX_EXECUTIONS_PER_DAY_MAX = exports.WORKFLOW_SETTINGS_MAX_EXECUTIONS_PER_DAY_MIN = exports.WORKFLOW_SETTINGS_MAX_EXECUTIONS_PER_HOUR_MAX = exports.WORKFLOW_SETTINGS_MAX_EXECUTIONS_PER_HOUR_MIN = exports.CODE_STEP_TIMEOUT_DEFAULT = exports.CODE_STEP_TIMEOUT_MAX = exports.CODE_STEP_TIMEOUT_MIN = exports.SLEEP_DURATION_DEFAULT = exports.SLEEP_DURATION_MAX = exports.SLEEP_DURATION_MIN = exports.WORKFLOW_STEP_TIMEOUT = exports.WORKFLOW_EXECUTION_TIMEOUT = void 0;
|
|
4
4
|
exports.WORKFLOW_EXECUTION_TIMEOUT = 60 * 60 * 1000;
|
|
5
5
|
exports.WORKFLOW_STEP_TIMEOUT = 15 * 60 * 1000;
|
|
6
6
|
exports.SLEEP_DURATION_MIN = 0;
|
|
@@ -9,6 +9,16 @@ exports.SLEEP_DURATION_DEFAULT = 1;
|
|
|
9
9
|
exports.CODE_STEP_TIMEOUT_MIN = 100;
|
|
10
10
|
exports.CODE_STEP_TIMEOUT_MAX = 60000;
|
|
11
11
|
exports.CODE_STEP_TIMEOUT_DEFAULT = 5000;
|
|
12
|
+
exports.WORKFLOW_SETTINGS_MAX_EXECUTIONS_PER_HOUR_MIN = 1;
|
|
13
|
+
exports.WORKFLOW_SETTINGS_MAX_EXECUTIONS_PER_HOUR_MAX = 10000;
|
|
14
|
+
exports.WORKFLOW_SETTINGS_MAX_EXECUTIONS_PER_DAY_MIN = 1;
|
|
15
|
+
exports.WORKFLOW_SETTINGS_MAX_EXECUTIONS_PER_DAY_MAX = 100000;
|
|
16
|
+
exports.WORKFLOW_SETTINGS_MAX_RETRY_ATTEMPTS_MIN = 0;
|
|
17
|
+
exports.WORKFLOW_SETTINGS_MAX_RETRY_ATTEMPTS_MAX = 10;
|
|
18
|
+
exports.WORKFLOW_SETTINGS_RETRY_DELAY_SECONDS_MIN = 0;
|
|
19
|
+
exports.WORKFLOW_SETTINGS_RETRY_DELAY_SECONDS_MAX = 3600;
|
|
20
|
+
exports.WORKFLOW_SETTINGS_EXECUTION_TIMEOUT_MS_MIN = 60000;
|
|
21
|
+
exports.WORKFLOW_SETTINGS_EXECUTION_TIMEOUT_MS_MAX = 7200000;
|
|
12
22
|
exports.EXPRESSION_TIMEOUT_DEFAULT = 5000;
|
|
13
23
|
exports.EXPRESSION_TIMEOUT_MAX = 30000;
|
|
14
24
|
exports.EXPRESSION_CPU_TIMEOUT = 10000;
|
|
@@ -16,6 +16,7 @@ export * from './requests/secret-access.request';
|
|
|
16
16
|
export * from './requests/variable.request';
|
|
17
17
|
export * from './requests/variable-public.request';
|
|
18
18
|
export * from './requests/variable-access.request';
|
|
19
|
+
export * from './requests/report.admin.request';
|
|
19
20
|
export * from './responses/monitor.response';
|
|
20
21
|
export * from './responses/domain-verification.response';
|
|
21
22
|
export * from './responses/domain-verification.admin.response';
|
|
@@ -31,3 +32,4 @@ export * from './responses/secret-access.response';
|
|
|
31
32
|
export * from './responses/variable.response';
|
|
32
33
|
export * from './responses/variable-public.response';
|
|
33
34
|
export * from './responses/variable-access.response';
|
|
35
|
+
export * from './responses/report.admin.response';
|
|
@@ -32,6 +32,7 @@ __exportStar(require("./requests/secret-access.request"), exports);
|
|
|
32
32
|
__exportStar(require("./requests/variable.request"), exports);
|
|
33
33
|
__exportStar(require("./requests/variable-public.request"), exports);
|
|
34
34
|
__exportStar(require("./requests/variable-access.request"), exports);
|
|
35
|
+
__exportStar(require("./requests/report.admin.request"), exports);
|
|
35
36
|
__exportStar(require("./responses/monitor.response"), exports);
|
|
36
37
|
__exportStar(require("./responses/domain-verification.response"), exports);
|
|
37
38
|
__exportStar(require("./responses/domain-verification.admin.response"), exports);
|
|
@@ -47,3 +48,4 @@ __exportStar(require("./responses/secret-access.response"), exports);
|
|
|
47
48
|
__exportStar(require("./responses/variable.response"), exports);
|
|
48
49
|
__exportStar(require("./responses/variable-public.response"), exports);
|
|
49
50
|
__exportStar(require("./responses/variable-access.response"), exports);
|
|
51
|
+
__exportStar(require("./responses/report.admin.response"), exports);
|
|
@@ -44,6 +44,13 @@ export interface IDeleteWorkflowParams {
|
|
|
44
44
|
projectId: string;
|
|
45
45
|
workflowId: string;
|
|
46
46
|
}
|
|
47
|
+
export interface IExecuteWorkflowParams {
|
|
48
|
+
projectId: string;
|
|
49
|
+
workflowId: string;
|
|
50
|
+
}
|
|
51
|
+
export interface IExecuteWorkflowBody {
|
|
52
|
+
triggerData?: Record<string, unknown>;
|
|
53
|
+
}
|
|
47
54
|
export interface ICreateWorkflowStepParams {
|
|
48
55
|
projectId: string;
|
|
49
56
|
workflowId: string;
|
|
@@ -140,6 +147,14 @@ export interface ICancelWorkflowExecutionParams {
|
|
|
140
147
|
workflowId: string;
|
|
141
148
|
workflowExecutionId: string;
|
|
142
149
|
}
|
|
150
|
+
export interface IGetTimeSeriesWorkflowExecutionParams {
|
|
151
|
+
projectId: string;
|
|
152
|
+
workflowId: string;
|
|
153
|
+
}
|
|
154
|
+
export interface IGetTimeSeriesWorkflowExecutionQuery {
|
|
155
|
+
period: 'hour' | 'day' | 'week';
|
|
156
|
+
days: number;
|
|
157
|
+
}
|
|
143
158
|
export interface ICreateWorkflowTriggerParams {
|
|
144
159
|
projectId: string;
|
|
145
160
|
workflowId: string;
|
|
@@ -178,3 +193,8 @@ export interface IDeleteWorkflowTriggerParams {
|
|
|
178
193
|
workflowId: string;
|
|
179
194
|
workflowTriggerId: string;
|
|
180
195
|
}
|
|
196
|
+
export interface IGetWorkflowTriggerStatsParams {
|
|
197
|
+
projectId: string;
|
|
198
|
+
workflowId: string;
|
|
199
|
+
workflowTriggerId: string;
|
|
200
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { ReportTimePeriod } from '../requests/report.admin.request';
|
|
2
|
+
export interface WorkflowExecutionsByPeriod {
|
|
3
|
+
period: string;
|
|
4
|
+
total: number;
|
|
5
|
+
completed: number;
|
|
6
|
+
failed: number;
|
|
7
|
+
cancelled: number;
|
|
8
|
+
}
|
|
9
|
+
export interface WorkflowReportMetrics {
|
|
10
|
+
totalWorkflows: number;
|
|
11
|
+
activeWorkflows: number;
|
|
12
|
+
totalExecutions: number;
|
|
13
|
+
completedExecutions: number;
|
|
14
|
+
failedExecutions: number;
|
|
15
|
+
cancelledExecutions: number;
|
|
16
|
+
successRate: number | null;
|
|
17
|
+
averageDurationMs: number | null;
|
|
18
|
+
executionsByPeriod: WorkflowExecutionsByPeriod[];
|
|
19
|
+
topWorkflowsByExecutions: Array<{
|
|
20
|
+
workflowId: string;
|
|
21
|
+
workflowName: string;
|
|
22
|
+
total: number;
|
|
23
|
+
completed: number;
|
|
24
|
+
failed: number;
|
|
25
|
+
successRate: number | null;
|
|
26
|
+
averageDurationMs: number | null;
|
|
27
|
+
}>;
|
|
28
|
+
ipAddresses: {
|
|
29
|
+
total: number;
|
|
30
|
+
};
|
|
31
|
+
variables: {
|
|
32
|
+
total: number;
|
|
33
|
+
active: number;
|
|
34
|
+
};
|
|
35
|
+
secrets: {
|
|
36
|
+
total: number;
|
|
37
|
+
active: number;
|
|
38
|
+
accessLogs: number;
|
|
39
|
+
failedAccesses: number;
|
|
40
|
+
};
|
|
41
|
+
stepMetrics: {
|
|
42
|
+
totalSteps: number;
|
|
43
|
+
stepsByType: Array<{
|
|
44
|
+
type: string;
|
|
45
|
+
count: number;
|
|
46
|
+
}>;
|
|
47
|
+
stepExecutionsByStatus: Array<{
|
|
48
|
+
status: string;
|
|
49
|
+
count: number;
|
|
50
|
+
}>;
|
|
51
|
+
averageStepDurationMs: number | null;
|
|
52
|
+
slowestSteps: Array<{
|
|
53
|
+
stepId: string;
|
|
54
|
+
stepName: string;
|
|
55
|
+
avgDurationMs: number;
|
|
56
|
+
}>;
|
|
57
|
+
};
|
|
58
|
+
triggerMetrics: {
|
|
59
|
+
totalTriggers: number;
|
|
60
|
+
triggersByType: Array<{
|
|
61
|
+
type: string;
|
|
62
|
+
count: number;
|
|
63
|
+
activeCount: number;
|
|
64
|
+
}>;
|
|
65
|
+
triggerExecutions: Array<{
|
|
66
|
+
triggerId: string;
|
|
67
|
+
triggerName: string;
|
|
68
|
+
type: string;
|
|
69
|
+
total: number;
|
|
70
|
+
completed: number;
|
|
71
|
+
failed: number;
|
|
72
|
+
}>;
|
|
73
|
+
};
|
|
74
|
+
domainVerifications: {
|
|
75
|
+
total: number;
|
|
76
|
+
verified: number;
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
export interface GetReportAdminResponse {
|
|
80
|
+
data: {
|
|
81
|
+
metrics: WorkflowReportMetrics & {
|
|
82
|
+
timePeriod: ReportTimePeriod;
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
}
|
|
@@ -21,6 +21,10 @@ export type IUpdateWorkflowResponse = IResponse<IUpdateWorkflowData>;
|
|
|
21
21
|
export interface IDeleteWorkflowData {
|
|
22
22
|
}
|
|
23
23
|
export type IDeleteWorkflowResponse = IResponse<IDeleteWorkflowData>;
|
|
24
|
+
export interface IExecuteWorkflowData {
|
|
25
|
+
workflowExecution: IWorkflowExecution;
|
|
26
|
+
}
|
|
27
|
+
export type IExecuteWorkflowResponse = IResponse<IExecuteWorkflowData>;
|
|
24
28
|
export interface ICreateWorkflowStepData {
|
|
25
29
|
workflowStep: IWorkflowStep;
|
|
26
30
|
}
|
|
@@ -72,6 +76,18 @@ export interface ICancelWorkflowExecutionData {
|
|
|
72
76
|
workflowExecution: IWorkflowExecution;
|
|
73
77
|
}
|
|
74
78
|
export type ICancelWorkflowExecutionResponse = IResponse<ICancelWorkflowExecutionData>;
|
|
79
|
+
export interface IWorkflowExecutionTimeSeriesBucket {
|
|
80
|
+
date: string;
|
|
81
|
+
total: number;
|
|
82
|
+
completed: number;
|
|
83
|
+
failed: number;
|
|
84
|
+
cancelled: number;
|
|
85
|
+
avgDurationMs: number | null;
|
|
86
|
+
}
|
|
87
|
+
export interface IGetTimeSeriesWorkflowExecutionData {
|
|
88
|
+
timeSeries: IWorkflowExecutionTimeSeriesBucket[];
|
|
89
|
+
}
|
|
90
|
+
export type IGetTimeSeriesWorkflowExecutionResponse = IResponse<IGetTimeSeriesWorkflowExecutionData>;
|
|
75
91
|
export interface ICreateWorkflowTriggerData {
|
|
76
92
|
workflowTrigger: IWorkflowTrigger;
|
|
77
93
|
}
|
|
@@ -91,3 +107,16 @@ export type IUpdateWorkflowTriggerResponse = IResponse<IUpdateWorkflowTriggerDat
|
|
|
91
107
|
export interface IDeleteWorkflowTriggerData {
|
|
92
108
|
}
|
|
93
109
|
export type IDeleteWorkflowTriggerResponse = IResponse<IDeleteWorkflowTriggerData>;
|
|
110
|
+
export interface IGetWorkflowTriggerStatsData {
|
|
111
|
+
total: number;
|
|
112
|
+
completed: number;
|
|
113
|
+
failed: number;
|
|
114
|
+
last24h: number;
|
|
115
|
+
byDay: Array<{
|
|
116
|
+
date: string;
|
|
117
|
+
total: number;
|
|
118
|
+
completed: number;
|
|
119
|
+
failed: number;
|
|
120
|
+
}>;
|
|
121
|
+
}
|
|
122
|
+
export type IGetWorkflowTriggerStatsResponse = IResponse<IGetWorkflowTriggerStatsData>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { WorkflowContext } from '../../../workflow-expressions';
|
|
1
2
|
import { WorkflowStepStatus } from '../../enum/workflow.enum';
|
|
2
3
|
import { IWorkflowExecution } from './workflow-execution.model';
|
|
3
4
|
import { IWorkflowStep } from './workflow-step.model';
|
|
@@ -13,6 +14,7 @@ export interface IWorkflowStepExecution {
|
|
|
13
14
|
error: string | null;
|
|
14
15
|
inputData: Record<string, any> | null;
|
|
15
16
|
outputData: Record<string, any> | null;
|
|
17
|
+
context: WorkflowContext | null;
|
|
16
18
|
retryCount: number | null;
|
|
17
19
|
metadata: Record<string, any> | null;
|
|
18
20
|
executionOrder: number;
|
|
@@ -8,6 +8,7 @@ export interface IUserRegistrationTriggerConfig {
|
|
|
8
8
|
export interface IWebhookTriggerConfig {
|
|
9
9
|
signatureSecret: string | null;
|
|
10
10
|
signatureHeader: string | null;
|
|
11
|
+
secretToken: string;
|
|
11
12
|
}
|
|
12
13
|
export type TriggerConfig = IUserRegistrationTriggerConfig | IWebhookTriggerConfig | Record<string, never>;
|
|
13
14
|
export interface IWorkflowTrigger {
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
import type { IProject, IWorkflow, IWorkflowTrigger, IWorkflowStep, IWorkflowStepExecution, IWorkflowExecution, IIpAddress, IDomainVerification, ISecret, IVariable, WorkflowTriggerData } from '../types';
|
|
1
|
+
import type { IProject, IWorkflow, IWorkflowTrigger, IWorkflowStep, IWorkflowStepExecution, IWorkflowStepConnection, IWorkflowExecution, IIpAddress, IDomainVerification, ISecret, IVariable, WorkflowTriggerData } from '../types';
|
|
2
|
+
export declare enum ExpressionMode {
|
|
3
|
+
EXPRESSION = "EXPRESSION",
|
|
4
|
+
TEMPLATE = "TEMPLATE",
|
|
5
|
+
CODE = "CODE"
|
|
6
|
+
}
|
|
2
7
|
export declare enum DataSourceType {
|
|
3
8
|
WORKFLOW_TRIGGER = "trigger",
|
|
4
9
|
WORKFLOW_TRIGGERS = "triggers",
|
|
@@ -12,6 +17,7 @@ export declare enum DataSourceType {
|
|
|
12
17
|
WORKFLOW_EXECUTION = "workflowExecutions",
|
|
13
18
|
STEP_EXECUTIONS = "stepExecutions",
|
|
14
19
|
STEPS = "steps",
|
|
20
|
+
CONNECTIONS = "connections",
|
|
15
21
|
ABYSS = "abyss"
|
|
16
22
|
}
|
|
17
23
|
export interface WorkflowContext {
|
|
@@ -34,6 +40,7 @@ export interface WorkflowContext {
|
|
|
34
40
|
}>;
|
|
35
41
|
[DataSourceType.SECRETS]: Record<string, Pick<ISecret, 'id' | 'key' | 'name'>>;
|
|
36
42
|
[DataSourceType.VARIABLES]: Record<string, Pick<IVariable, 'id' | 'key' | 'name' | 'value'>>;
|
|
43
|
+
[DataSourceType.CONNECTIONS]: Record<string, IWorkflowStepConnection>;
|
|
37
44
|
[DataSourceType.ABYSS]: Record<string, {
|
|
38
45
|
api: string;
|
|
39
46
|
site: string;
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DataSourceType = void 0;
|
|
3
|
+
exports.DataSourceType = exports.ExpressionMode = void 0;
|
|
4
|
+
var ExpressionMode;
|
|
5
|
+
(function (ExpressionMode) {
|
|
6
|
+
ExpressionMode["EXPRESSION"] = "EXPRESSION";
|
|
7
|
+
ExpressionMode["TEMPLATE"] = "TEMPLATE";
|
|
8
|
+
ExpressionMode["CODE"] = "CODE";
|
|
9
|
+
})(ExpressionMode || (exports.ExpressionMode = ExpressionMode = {}));
|
|
4
10
|
var DataSourceType;
|
|
5
11
|
(function (DataSourceType) {
|
|
6
12
|
DataSourceType["WORKFLOW_TRIGGER"] = "trigger";
|
|
@@ -15,5 +21,6 @@ var DataSourceType;
|
|
|
15
21
|
DataSourceType["WORKFLOW_EXECUTION"] = "workflowExecutions";
|
|
16
22
|
DataSourceType["STEP_EXECUTIONS"] = "stepExecutions";
|
|
17
23
|
DataSourceType["STEPS"] = "steps";
|
|
24
|
+
DataSourceType["CONNECTIONS"] = "connections";
|
|
18
25
|
DataSourceType["ABYSS"] = "abyss";
|
|
19
26
|
})(DataSourceType || (exports.DataSourceType = DataSourceType = {}));
|