@abyss-project/console 1.0.1 → 1.0.3
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 +1 -1
- package/dist/api/index.d.ts +1 -2
- package/dist/api/index.js +1 -2
- package/dist/api/ip-address.api.d.ts +6 -0
- package/dist/api/ip-address.api.js +29 -0
- package/dist/api/project.admin.api.d.ts +2 -0
- package/dist/api/project.admin.api.js +9 -0
- package/dist/api/project.api.d.ts +3 -0
- package/dist/api/project.api.js +14 -0
- package/dist/api/workflow.admin.api.d.ts +8 -8
- package/dist/api/workflow.admin.api.js +29 -24
- package/dist/api/workflow.api.d.ts +11 -6
- package/dist/api/workflow.api.js +60 -23
- package/dist/index.d.ts +64 -31
- package/dist/index.js +87 -47
- package/dist/types/constants/index.d.ts +1 -0
- package/dist/types/constants/index.js +17 -0
- package/dist/types/constants/webhook.constants.d.ts +6 -0
- package/dist/types/constants/webhook.constants.js +9 -0
- package/dist/types/dto/index.d.ts +1 -0
- package/dist/types/dto/index.js +1 -0
- package/dist/types/dto/workflow.dto.d.ts +63 -0
- package/dist/types/dto/workflow.dto.js +2 -0
- package/dist/types/enum/api-error.enum.d.ts +27 -3
- package/dist/types/enum/api-error.enum.js +27 -3
- package/dist/types/enum/index.d.ts +1 -0
- package/dist/types/enum/index.js +1 -0
- package/dist/types/enum/workflow.enum.d.ts +82 -0
- package/dist/types/enum/workflow.enum.js +97 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.js +1 -0
- package/dist/types/interface/api/index.d.ts +6 -0
- package/dist/types/interface/api/index.js +6 -0
- package/dist/types/interface/api/requests/ip-address.request.d.ts +32 -0
- package/dist/types/interface/api/requests/ip-address.request.js +2 -0
- package/dist/types/interface/api/requests/project.admin.request.d.ts +3 -0
- package/dist/types/interface/api/requests/project.admin.request.js +2 -0
- package/dist/types/interface/api/requests/project.request.d.ts +6 -0
- package/dist/types/interface/api/requests/project.request.js +2 -0
- package/dist/types/interface/api/requests/workflow-webhook-trigger.request.d.ts +66 -0
- package/dist/types/interface/api/requests/workflow-webhook-trigger.request.js +2 -0
- package/dist/types/interface/api/requests/workflow-webhook.request.d.ts +123 -0
- package/dist/types/interface/api/requests/workflow-webhook.request.js +2 -0
- package/dist/types/interface/api/requests/workflow.admin.request.d.ts +14 -20
- package/dist/types/interface/api/requests/workflow.request.d.ts +83 -46
- package/dist/types/interface/api/responses/ip-address.response.d.ts +21 -0
- package/dist/types/interface/api/responses/ip-address.response.js +2 -0
- package/dist/types/interface/api/responses/project.admin.response.d.ts +4 -0
- package/dist/types/interface/api/responses/project.admin.response.js +2 -0
- package/dist/types/interface/api/responses/project.response.d.ts +10 -0
- package/dist/types/interface/api/responses/project.response.js +2 -0
- package/dist/types/interface/api/responses/workflow-webhook-action.response.d.ts +24 -0
- package/dist/types/interface/api/responses/workflow-webhook-action.response.js +2 -0
- package/dist/types/interface/api/responses/workflow-webhook-public.response.d.ts +7 -0
- package/dist/types/interface/api/responses/workflow-webhook-public.response.js +2 -0
- package/dist/types/interface/api/responses/workflow-webhook-trigger.response.d.ts +41 -0
- package/dist/types/interface/api/responses/workflow-webhook-trigger.response.js +2 -0
- package/dist/types/interface/api/responses/workflow-webhook.response.d.ts +56 -0
- package/dist/types/interface/api/responses/workflow-webhook.response.js +2 -0
- package/dist/types/interface/api/responses/workflow.admin.response.d.ts +4 -3
- package/dist/types/interface/api/responses/workflow.response.d.ts +43 -18
- package/dist/types/interface/index.d.ts +5 -1
- package/dist/types/interface/index.js +5 -1
- package/dist/types/interface/models/domain-verification.model.d.ts +5 -4
- package/dist/types/interface/models/ip-address.model.d.ts +17 -0
- package/dist/types/interface/models/ip-address.model.js +11 -0
- package/dist/types/interface/models/ip-whitelist.model.d.ts +19 -0
- package/dist/types/interface/models/ip-whitelist.model.js +9 -0
- package/dist/types/interface/models/project.model.d.ts +3 -5
- package/dist/types/interface/models/trigger-filter.model.d.ts +0 -0
- package/dist/types/interface/models/trigger-filter.model.js +1 -0
- package/dist/types/interface/models/webhook-action-log.model.d.ts +22 -0
- package/dist/types/interface/models/webhook-action-log.model.js +9 -0
- package/dist/types/interface/models/webhook-trigger-log.model.d.ts +23 -0
- package/dist/types/interface/models/webhook-trigger-log.model.js +9 -0
- package/dist/types/interface/models/workflow-execution.model.d.ts +12 -66
- package/dist/types/interface/models/workflow-execution.model.js +0 -11
- package/dist/types/interface/models/workflow-step-config.model.d.ts +0 -0
- package/dist/types/interface/models/workflow-step-config.model.js +1 -0
- package/dist/types/interface/models/workflow-step-data.model.d.ts +0 -0
- package/dist/types/interface/models/workflow-step-data.model.js +1 -0
- package/dist/types/interface/models/workflow-step-execution.model.d.ts +23 -0
- package/dist/types/interface/models/workflow-step-execution.model.js +2 -0
- package/dist/types/interface/models/workflow-step.model.d.ts +10 -94
- package/dist/types/interface/models/workflow-step.model.js +0 -42
- package/dist/types/interface/models/workflow-trigger-config.model.d.ts +0 -0
- package/dist/types/interface/models/workflow-trigger-config.model.js +1 -0
- package/dist/types/interface/models/workflow-trigger.model.d.ts +35 -0
- package/dist/types/interface/models/workflow-trigger.model.js +2 -0
- package/dist/types/interface/models/workflow-webhook-action.model.d.ts +27 -0
- package/dist/types/interface/models/workflow-webhook-action.model.js +2 -0
- package/dist/types/interface/models/workflow-webhook-incoming-log.model.d.ts +19 -0
- package/dist/types/interface/models/workflow-webhook-incoming-log.model.js +2 -0
- package/dist/types/interface/models/workflow-webhook-outgoing-log.model.d.ts +21 -0
- package/dist/types/interface/models/workflow-webhook-outgoing-log.model.js +2 -0
- package/dist/types/interface/models/workflow-webhook-trigger-allowed-ip.model.d.ts +10 -0
- package/dist/types/interface/models/workflow-webhook-trigger-allowed-ip.model.js +2 -0
- package/dist/types/interface/models/workflow-webhook-trigger.model.d.ts +20 -0
- package/dist/types/interface/models/workflow-webhook-trigger.model.js +2 -0
- package/dist/types/interface/models/workflow-webhook.model.d.ts +27 -0
- package/dist/types/interface/models/workflow-webhook.model.js +2 -0
- package/dist/types/interface/models/workflow.model.d.ts +4 -72
- package/dist/types/interface/models/workflow.model.js +0 -22
- package/dist/utils/__tests__/ip-address-reference.utils.test.d.ts +0 -0
- package/dist/utils/__tests__/ip-address-reference.utils.test.js +1 -0
- package/dist/utils/__tests__/reference-resolver.examples.d.ts +0 -0
- package/dist/utils/__tests__/reference-resolver.examples.js +1 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.js +2 -0
- package/dist/utils/ip-address-reference.utils.d.ts +0 -0
- package/dist/utils/ip-address-reference.utils.js +1 -0
- package/dist/utils/ip-address-validator.utils.d.ts +14 -0
- package/dist/utils/ip-address-validator.utils.js +119 -0
- package/dist/utils/reference-resolver.utils.d.ts +52 -0
- package/dist/utils/reference-resolver.utils.js +219 -0
- package/package.json +1 -1
- package/USAGE_EXAMPLES.md +0 -257
- package/tsconfig.tsbuildinfo +0 -1
package/README.md
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
# Abyss Monitor
|
|
2
|
-
https://abyss-project.gitbook.io/abyss-
|
|
2
|
+
https://abyss-project.gitbook.io/abyss-console/
|
package/dist/api/index.d.ts
CHANGED
package/dist/api/index.js
CHANGED
|
@@ -14,8 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./monitor.api"), exports);
|
|
18
17
|
__exportStar(require("./domain-verification.admin.api"), exports);
|
|
19
18
|
__exportStar(require("./domain-verification.api"), exports);
|
|
20
|
-
__exportStar(require("./
|
|
19
|
+
__exportStar(require("./monitor.api"), exports);
|
|
21
20
|
__exportStar(require("./workflow.api"), exports);
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ICreateIpAddressParams, ICreateIpAddressBody, IListIpAddressParams, IGetIpAddressParams, IUpdateIpAddressParams, IUpdateIpAddressBody, IDeleteIpAddressParams, ICreateIpAddressResponse, IListIpAddressResponse, IGetIpAddressResponse, IUpdateIpAddressResponse, IDeleteIpAddressResponse } from '../types';
|
|
2
|
+
export declare const createIpAddress: (params: ICreateIpAddressParams, body: ICreateIpAddressBody) => Promise<ICreateIpAddressResponse>;
|
|
3
|
+
export declare const listIpAddress: (params: IListIpAddressParams) => Promise<IListIpAddressResponse>;
|
|
4
|
+
export declare const getIpAddress: (params: IGetIpAddressParams) => Promise<IGetIpAddressResponse>;
|
|
5
|
+
export declare const updateIpAddress: (params: IUpdateIpAddressParams, body: IUpdateIpAddressBody) => Promise<IUpdateIpAddressResponse>;
|
|
6
|
+
export declare const deleteIpAddress: (params: IDeleteIpAddressParams) => Promise<IDeleteIpAddressResponse>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.deleteIpAddress = exports.updateIpAddress = exports.getIpAddress = exports.listIpAddress = exports.createIpAddress = void 0;
|
|
4
|
+
const __1 = require("..");
|
|
5
|
+
const createIpAddress = async (params, body) => {
|
|
6
|
+
const response = await __1.AbyssConsoleCore.axios.post(`/ip-address/${params.projectId}`, body);
|
|
7
|
+
return response.data;
|
|
8
|
+
};
|
|
9
|
+
exports.createIpAddress = createIpAddress;
|
|
10
|
+
const listIpAddress = async (params) => {
|
|
11
|
+
const response = await __1.AbyssConsoleCore.axios.get(`/ip-address/${params.projectId}`);
|
|
12
|
+
return response.data;
|
|
13
|
+
};
|
|
14
|
+
exports.listIpAddress = listIpAddress;
|
|
15
|
+
const getIpAddress = async (params) => {
|
|
16
|
+
const response = await __1.AbyssConsoleCore.axios.get(`/ip-address/${params.projectId}/${params.ipAddressId}`);
|
|
17
|
+
return response.data;
|
|
18
|
+
};
|
|
19
|
+
exports.getIpAddress = getIpAddress;
|
|
20
|
+
const updateIpAddress = async (params, body) => {
|
|
21
|
+
const response = await __1.AbyssConsoleCore.axios.put(`/ip-address/${params.projectId}/${params.ipAddressId}`, body);
|
|
22
|
+
return response.data;
|
|
23
|
+
};
|
|
24
|
+
exports.updateIpAddress = updateIpAddress;
|
|
25
|
+
const deleteIpAddress = async (params) => {
|
|
26
|
+
const response = await __1.AbyssConsoleCore.axios.delete(`/ip-address/${params.projectId}/${params.ipAddressId}`);
|
|
27
|
+
return response.data;
|
|
28
|
+
};
|
|
29
|
+
exports.deleteIpAddress = deleteIpAddress;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.deleteProject = void 0;
|
|
4
|
+
const __1 = require("..");
|
|
5
|
+
const deleteProject = async (params) => {
|
|
6
|
+
const response = await __1.AbyssConsoleCore.axios.delete(`/project/admin/${params.projectId}`);
|
|
7
|
+
return response.data;
|
|
8
|
+
};
|
|
9
|
+
exports.deleteProject = deleteProject;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { IGetProjectParams, IActivateProjectParams, IGetProjectResponse, IActivateProjectResponse } from '../types';
|
|
2
|
+
export declare const getProject: (params: IGetProjectParams) => Promise<IGetProjectResponse>;
|
|
3
|
+
export declare const activateProject: (params: IActivateProjectParams) => Promise<IActivateProjectResponse>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.activateProject = exports.getProject = void 0;
|
|
4
|
+
const __1 = require("..");
|
|
5
|
+
const getProject = async (params) => {
|
|
6
|
+
const response = await __1.AbyssConsoleCore.axios.get(`/project/${params.projectId}`);
|
|
7
|
+
return response.data;
|
|
8
|
+
};
|
|
9
|
+
exports.getProject = getProject;
|
|
10
|
+
const activateProject = async (params) => {
|
|
11
|
+
const response = await __1.AbyssConsoleCore.axios.post(`/project/${params.projectId}/activate`);
|
|
12
|
+
return response.data;
|
|
13
|
+
};
|
|
14
|
+
exports.activateProject = activateProject;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const
|
|
3
|
-
export declare const
|
|
4
|
-
export declare const
|
|
5
|
-
export declare const
|
|
6
|
-
export declare const
|
|
7
|
-
export declare const
|
|
8
|
-
export declare const
|
|
1
|
+
import { IPaginateWorkflowAdminQuery, IGetWorkflowAdminParams, IUpdateWorkflowStatusAdminBody, IPaginateWorkflowExecutionsAdminQuery, ICancelWorkflowExecutionAdminParams, ITriggerWorkflowAdminParams, ITriggerWorkflowAdminBody, IPaginateWorkflowAdminResponse, IGetWorkflowAdminResponse, IUpdateWorkflowStatusAdminResponse, IDeleteWorkflowAdminResponse, IPaginateWorkflowExecutionAdminResponse, ICancelWorkflowExecutionAdminResponse, ITriggerWorkflowAdminResponse } from '../types';
|
|
2
|
+
export declare const paginateWorkflow: (query: IPaginateWorkflowAdminQuery) => Promise<IPaginateWorkflowAdminResponse>;
|
|
3
|
+
export declare const getWorkflow: (params: IGetWorkflowAdminParams) => Promise<IGetWorkflowAdminResponse>;
|
|
4
|
+
export declare const updateWorkflowStatus: (params: IGetWorkflowAdminParams, body: IUpdateWorkflowStatusAdminBody) => Promise<IUpdateWorkflowStatusAdminResponse>;
|
|
5
|
+
export declare const deleteWorkflow: (params: IGetWorkflowAdminParams) => Promise<IDeleteWorkflowAdminResponse>;
|
|
6
|
+
export declare const paginateWorkflowExecution: (query: IPaginateWorkflowExecutionsAdminQuery) => Promise<IPaginateWorkflowExecutionAdminResponse>;
|
|
7
|
+
export declare const cancelWorkflowExecution: (params: ICancelWorkflowExecutionAdminParams) => Promise<ICancelWorkflowExecutionAdminResponse>;
|
|
8
|
+
export declare const triggerWorkflow: (params: ITriggerWorkflowAdminParams, body: ITriggerWorkflowAdminBody) => Promise<ITriggerWorkflowAdminResponse>;
|
|
@@ -1,34 +1,39 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.triggerWorkflow = exports.cancelWorkflowExecution = exports.paginateWorkflowExecution = exports.deleteWorkflow = exports.updateWorkflowStatus = exports.getWorkflow = exports.paginateWorkflow = void 0;
|
|
4
4
|
const __1 = require("..");
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
})).data;
|
|
5
|
+
const paginateWorkflow = async (query) => {
|
|
6
|
+
const response = await __1.AbyssConsoleCore.axios.get(`/workflow/admin/paginate`, { params: query });
|
|
7
|
+
return response.data;
|
|
9
8
|
};
|
|
10
|
-
exports.
|
|
11
|
-
const
|
|
12
|
-
|
|
9
|
+
exports.paginateWorkflow = paginateWorkflow;
|
|
10
|
+
const getWorkflow = async (params) => {
|
|
11
|
+
const response = await __1.AbyssConsoleCore.axios.get(`/workflow/admin/${params.workflowId}`);
|
|
12
|
+
return response.data;
|
|
13
13
|
};
|
|
14
|
-
exports.
|
|
15
|
-
const
|
|
16
|
-
|
|
14
|
+
exports.getWorkflow = getWorkflow;
|
|
15
|
+
const updateWorkflowStatus = async (params, body) => {
|
|
16
|
+
const response = await __1.AbyssConsoleCore.axios.put(`/workflow/admin/${params.workflowId}/status`, body);
|
|
17
|
+
return response.data;
|
|
17
18
|
};
|
|
18
|
-
exports.
|
|
19
|
-
const
|
|
20
|
-
|
|
19
|
+
exports.updateWorkflowStatus = updateWorkflowStatus;
|
|
20
|
+
const deleteWorkflow = async (params) => {
|
|
21
|
+
const response = await __1.AbyssConsoleCore.axios.delete(`/workflow/admin/${params.workflowId}`);
|
|
22
|
+
return response.data;
|
|
21
23
|
};
|
|
22
|
-
exports.
|
|
23
|
-
const
|
|
24
|
-
|
|
24
|
+
exports.deleteWorkflow = deleteWorkflow;
|
|
25
|
+
const paginateWorkflowExecution = async (query) => {
|
|
26
|
+
const response = await __1.AbyssConsoleCore.axios.get(`/workflow/admin/execution/paginate`, { params: query });
|
|
27
|
+
return response.data;
|
|
25
28
|
};
|
|
26
|
-
exports.
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
+
exports.paginateWorkflowExecution = paginateWorkflowExecution;
|
|
30
|
+
const cancelWorkflowExecution = async (params) => {
|
|
31
|
+
const response = await __1.AbyssConsoleCore.axios.post(`/workflow/admin/execution/${params.workflowExecutionId}/cancel`);
|
|
32
|
+
return response.data;
|
|
29
33
|
};
|
|
30
|
-
exports.
|
|
31
|
-
const
|
|
32
|
-
|
|
34
|
+
exports.cancelWorkflowExecution = cancelWorkflowExecution;
|
|
35
|
+
const triggerWorkflow = async (params, body) => {
|
|
36
|
+
const response = await __1.AbyssConsoleCore.axios.post(`/workflow/admin/${params.workflowId}/trigger`, body);
|
|
37
|
+
return response.data;
|
|
33
38
|
};
|
|
34
|
-
exports.
|
|
39
|
+
exports.triggerWorkflow = triggerWorkflow;
|
|
@@ -1,15 +1,20 @@
|
|
|
1
|
-
import { ICreateWorkflowParams, ICreateWorkflowBody,
|
|
1
|
+
import { ICreateWorkflowParams, ICreateWorkflowBody, IPaginateWorkflowParams, IPaginateWorkflowQuery, IGetWorkflowParams, IUpdateWorkflowParams, IUpdateWorkflowBody, IUpdateWorkflowStatusParams, IUpdateWorkflowStatusBody, IDeleteWorkflowParams, ICreateWorkflowStepParams, ICreateWorkflowStepBody, IListWorkflowStepsParams, IUpdateWorkflowStepParams, IUpdateWorkflowStepBody, IDeleteWorkflowStepParams, IPaginateWorkflowExecutionParams, IPaginateWorkflowExecutionQuery, IGetWorkflowExecutionParams, IGetWorkflowExecutionStatsParams, IGetWorkflowExecutionStatsQuery, ICancelWorkflowExecutionParams, ICreateWorkflowTriggerParams, ICreateWorkflowTriggerBody, IListWorkflowTriggersParams, IGetWorkflowTriggerParams, IUpdateWorkflowTriggerParams, IUpdateWorkflowTriggerBody, IDeleteWorkflowTriggerParams, ICreateWorkflowResponse, IPaginateWorkflowResponse, IGetWorkflowResponse, IUpdateWorkflowResponse, IDeleteWorkflowResponse, ICreateWorkflowStepResponse, IListWorkflowStepResponse, IUpdateWorkflowStepResponse, IDeleteWorkflowStepResponse, IPaginateWorkflowExecutionResponse, IGetWorkflowExecutionResponse, IGetStatsWorkflowExecutionResponse, ICancelWorkflowExecutionResponse, ICreateWorkflowTriggerResponse, IListWorkflowTriggersResponse, IGetWorkflowTriggerResponse, IUpdateWorkflowTriggerResponse, IDeleteWorkflowTriggerResponse } from '../types';
|
|
2
2
|
export declare const createWorkflow: (params: ICreateWorkflowParams, body: ICreateWorkflowBody) => Promise<ICreateWorkflowResponse>;
|
|
3
|
-
export declare const paginateWorkflow: (params: IPaginateWorkflowParams, query
|
|
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
|
-
export declare const
|
|
6
|
+
export declare const updateWorkflowStatus: (params: IUpdateWorkflowStatusParams, body: IUpdateWorkflowStatusBody) => Promise<IUpdateWorkflowResponse>;
|
|
7
7
|
export declare const deleteWorkflow: (params: IDeleteWorkflowParams) => Promise<IDeleteWorkflowResponse>;
|
|
8
8
|
export declare const createWorkflowStep: (params: ICreateWorkflowStepParams, body: ICreateWorkflowStepBody) => Promise<ICreateWorkflowStepResponse>;
|
|
9
|
-
export declare const
|
|
9
|
+
export declare const listWorkflowStep: (params: IListWorkflowStepsParams) => Promise<IListWorkflowStepResponse>;
|
|
10
10
|
export declare const updateWorkflowStep: (params: IUpdateWorkflowStepParams, body: IUpdateWorkflowStepBody) => Promise<IUpdateWorkflowStepResponse>;
|
|
11
11
|
export declare const deleteWorkflowStep: (params: IDeleteWorkflowStepParams) => Promise<IDeleteWorkflowStepResponse>;
|
|
12
|
-
export declare const paginateWorkflowExecution: (params: IPaginateWorkflowExecutionParams, query
|
|
12
|
+
export declare const paginateWorkflowExecution: (params: IPaginateWorkflowExecutionParams, query: IPaginateWorkflowExecutionQuery) => Promise<IPaginateWorkflowExecutionResponse>;
|
|
13
13
|
export declare const getWorkflowExecution: (params: IGetWorkflowExecutionParams) => Promise<IGetWorkflowExecutionResponse>;
|
|
14
|
-
export declare const
|
|
14
|
+
export declare const getWorkflowStats: (params: IGetWorkflowExecutionStatsParams, query?: IGetWorkflowExecutionStatsQuery) => Promise<IGetStatsWorkflowExecutionResponse>;
|
|
15
15
|
export declare const cancelWorkflowExecution: (params: ICancelWorkflowExecutionParams) => Promise<ICancelWorkflowExecutionResponse>;
|
|
16
|
+
export declare const createWorkflowTrigger: (params: ICreateWorkflowTriggerParams, body: ICreateWorkflowTriggerBody) => Promise<ICreateWorkflowTriggerResponse>;
|
|
17
|
+
export declare const listWorkflowTrigger: (params: IListWorkflowTriggersParams) => Promise<IListWorkflowTriggersResponse>;
|
|
18
|
+
export declare const getWorkflowTrigger: (params: IGetWorkflowTriggerParams) => Promise<IGetWorkflowTriggerResponse>;
|
|
19
|
+
export declare const updateWorkflowTrigger: (params: IUpdateWorkflowTriggerParams, body: IUpdateWorkflowTriggerBody) => Promise<IUpdateWorkflowTriggerResponse>;
|
|
20
|
+
export declare const deleteWorkflowTrigger: (params: IDeleteWorkflowTriggerParams) => Promise<IDeleteWorkflowTriggerResponse>;
|
package/dist/api/workflow.api.js
CHANGED
|
@@ -1,62 +1,99 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.cancelWorkflowExecution = exports.
|
|
3
|
+
exports.deleteWorkflowTrigger = exports.updateWorkflowTrigger = exports.getWorkflowTrigger = exports.listWorkflowTrigger = exports.createWorkflowTrigger = exports.cancelWorkflowExecution = exports.getWorkflowStats = exports.getWorkflowExecution = exports.paginateWorkflowExecution = exports.deleteWorkflowStep = exports.updateWorkflowStep = exports.listWorkflowStep = exports.createWorkflowStep = 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);
|
|
7
|
+
return response.data;
|
|
7
8
|
};
|
|
8
9
|
exports.createWorkflow = createWorkflow;
|
|
9
10
|
const paginateWorkflow = async (params, query) => {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
})).data;
|
|
11
|
+
const response = await __1.AbyssConsoleCore.axios.get(`/workflow/${params.projectId}`, { params: query });
|
|
12
|
+
return response.data;
|
|
13
13
|
};
|
|
14
14
|
exports.paginateWorkflow = paginateWorkflow;
|
|
15
15
|
const getWorkflow = async (params) => {
|
|
16
|
-
|
|
16
|
+
const response = await __1.AbyssConsoleCore.axios.get(`/workflow/${params.projectId}/${params.workflowId}`);
|
|
17
|
+
return response.data;
|
|
17
18
|
};
|
|
18
19
|
exports.getWorkflow = getWorkflow;
|
|
19
20
|
const updateWorkflow = async (params, body) => {
|
|
20
|
-
|
|
21
|
+
const response = await __1.AbyssConsoleCore.axios.put(`/workflow/${params.projectId}/${params.workflowId}`, body);
|
|
22
|
+
return response.data;
|
|
21
23
|
};
|
|
22
24
|
exports.updateWorkflow = updateWorkflow;
|
|
23
|
-
const
|
|
24
|
-
|
|
25
|
+
const updateWorkflowStatus = async (params, body) => {
|
|
26
|
+
const response = await __1.AbyssConsoleCore.axios.put(`/workflow/${params.projectId}/${params.workflowId}/status`, body);
|
|
27
|
+
return response.data;
|
|
25
28
|
};
|
|
26
|
-
exports.
|
|
29
|
+
exports.updateWorkflowStatus = updateWorkflowStatus;
|
|
27
30
|
const deleteWorkflow = async (params) => {
|
|
28
|
-
|
|
31
|
+
const response = await __1.AbyssConsoleCore.axios.delete(`/workflow/${params.projectId}/${params.workflowId}`);
|
|
32
|
+
return response.data;
|
|
29
33
|
};
|
|
30
34
|
exports.deleteWorkflow = deleteWorkflow;
|
|
31
35
|
const createWorkflowStep = async (params, body) => {
|
|
32
|
-
|
|
36
|
+
const response = await __1.AbyssConsoleCore.axios.post(`/workflow/${params.projectId}/${params.workflowId}/step`, body);
|
|
37
|
+
return response.data;
|
|
33
38
|
};
|
|
34
39
|
exports.createWorkflowStep = createWorkflowStep;
|
|
35
|
-
const
|
|
36
|
-
|
|
40
|
+
const listWorkflowStep = async (params) => {
|
|
41
|
+
const response = await __1.AbyssConsoleCore.axios.get(`/workflow/${params.projectId}/${params.workflowId}/step`);
|
|
42
|
+
return response.data;
|
|
37
43
|
};
|
|
38
|
-
exports.
|
|
44
|
+
exports.listWorkflowStep = listWorkflowStep;
|
|
39
45
|
const updateWorkflowStep = async (params, body) => {
|
|
40
|
-
|
|
46
|
+
const response = await __1.AbyssConsoleCore.axios.put(`/workflow/${params.projectId}/${params.workflowId}/step/${params.workflowStepId}`, body);
|
|
47
|
+
return response.data;
|
|
41
48
|
};
|
|
42
49
|
exports.updateWorkflowStep = updateWorkflowStep;
|
|
43
50
|
const deleteWorkflowStep = async (params) => {
|
|
44
|
-
|
|
51
|
+
const response = await __1.AbyssConsoleCore.axios.delete(`/workflow/${params.projectId}/${params.workflowId}/step/${params.workflowStepId}`);
|
|
52
|
+
return response.data;
|
|
45
53
|
};
|
|
46
54
|
exports.deleteWorkflowStep = deleteWorkflowStep;
|
|
47
55
|
const paginateWorkflowExecution = async (params, query) => {
|
|
48
|
-
|
|
56
|
+
const response = await __1.AbyssConsoleCore.axios.get(`/workflow/${params.projectId}/${params.workflowId}/execution`, { params: query });
|
|
57
|
+
return response.data;
|
|
49
58
|
};
|
|
50
59
|
exports.paginateWorkflowExecution = paginateWorkflowExecution;
|
|
51
60
|
const getWorkflowExecution = async (params) => {
|
|
52
|
-
|
|
61
|
+
const response = await __1.AbyssConsoleCore.axios.get(`/workflow/${params.projectId}/${params.workflowId}/execution/${params.workflowExecutionId}`);
|
|
62
|
+
return response.data;
|
|
53
63
|
};
|
|
54
64
|
exports.getWorkflowExecution = getWorkflowExecution;
|
|
55
|
-
const
|
|
56
|
-
|
|
65
|
+
const getWorkflowStats = async (params, query) => {
|
|
66
|
+
const response = await __1.AbyssConsoleCore.axios.get(`/workflow/${params.projectId}/${params.workflowId}/execution/stats`, { params: query });
|
|
67
|
+
return response.data;
|
|
57
68
|
};
|
|
58
|
-
exports.
|
|
69
|
+
exports.getWorkflowStats = getWorkflowStats;
|
|
59
70
|
const cancelWorkflowExecution = async (params) => {
|
|
60
|
-
|
|
71
|
+
const response = await __1.AbyssConsoleCore.axios.post(`/workflow/${params.projectId}/${params.workflowId}/execution/${params.workflowExecutionId}/cancel`);
|
|
72
|
+
return response.data;
|
|
61
73
|
};
|
|
62
74
|
exports.cancelWorkflowExecution = cancelWorkflowExecution;
|
|
75
|
+
const createWorkflowTrigger = async (params, body) => {
|
|
76
|
+
const response = await __1.AbyssConsoleCore.axios.post(`/workflow/${params.projectId}/${params.workflowId}/trigger`, body);
|
|
77
|
+
return response.data;
|
|
78
|
+
};
|
|
79
|
+
exports.createWorkflowTrigger = createWorkflowTrigger;
|
|
80
|
+
const listWorkflowTrigger = async (params) => {
|
|
81
|
+
const response = await __1.AbyssConsoleCore.axios.get(`/workflow/${params.projectId}/${params.workflowId}/trigger`);
|
|
82
|
+
return response.data;
|
|
83
|
+
};
|
|
84
|
+
exports.listWorkflowTrigger = listWorkflowTrigger;
|
|
85
|
+
const getWorkflowTrigger = async (params) => {
|
|
86
|
+
const response = await __1.AbyssConsoleCore.axios.get(`/workflow/${params.projectId}/${params.workflowId}/trigger/${params.workflowTriggerId}`);
|
|
87
|
+
return response.data;
|
|
88
|
+
};
|
|
89
|
+
exports.getWorkflowTrigger = getWorkflowTrigger;
|
|
90
|
+
const updateWorkflowTrigger = async (params, body) => {
|
|
91
|
+
const response = await __1.AbyssConsoleCore.axios.put(`/workflow/${params.projectId}/${params.workflowId}/trigger/${params.workflowTriggerId}`, body);
|
|
92
|
+
return response.data;
|
|
93
|
+
};
|
|
94
|
+
exports.updateWorkflowTrigger = updateWorkflowTrigger;
|
|
95
|
+
const deleteWorkflowTrigger = async (params) => {
|
|
96
|
+
const response = await __1.AbyssConsoleCore.axios.delete(`/workflow/${params.projectId}/${params.workflowId}/trigger/${params.workflowTriggerId}`);
|
|
97
|
+
return response.data;
|
|
98
|
+
};
|
|
99
|
+
exports.deleteWorkflowTrigger = deleteWorkflowTrigger;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { IAxiosRetryConfig } from 'axios-retry';
|
|
2
|
-
import * as workflowApi from './api/workflow.api';
|
|
3
|
-
import * as workflowAdminApi from './api/workflow.admin.api';
|
|
4
2
|
import * as domainVerificationApi from './api/domain-verification.api';
|
|
5
3
|
import * as domainVerificationAdminApi from './api/domain-verification.admin.api';
|
|
6
4
|
import * as monitorApi from './api/monitor.api';
|
|
5
|
+
import * as workflowApi from './api/workflow.api';
|
|
6
|
+
import * as workflowAdminApi from './api/workflow.admin.api';
|
|
7
|
+
import * as ipAddressApi from './api/ip-address.api';
|
|
8
|
+
import * as projectApi from './api/project.api';
|
|
9
|
+
import * as projectAdminApi from './api/project.admin.api';
|
|
7
10
|
export * from './types';
|
|
8
11
|
export * from './utils';
|
|
9
12
|
export declare const API_KEY_APPLICATION_HEADER = "abyss-console-api-key-application";
|
|
@@ -18,56 +21,88 @@ type CoreConfig<TAdmin extends boolean = false> = {
|
|
|
18
21
|
baseURL?: string;
|
|
19
22
|
admin?: TAdmin;
|
|
20
23
|
};
|
|
24
|
+
type DomainVerificationAdminSDK = {
|
|
25
|
+
runCron: typeof domainVerificationAdminApi.runCron;
|
|
26
|
+
};
|
|
21
27
|
type WorkflowAdminSDK = {
|
|
22
|
-
paginate: typeof workflowAdminApi.
|
|
23
|
-
get: typeof workflowAdminApi.
|
|
24
|
-
updateStatus: typeof workflowAdminApi.
|
|
25
|
-
delete: typeof workflowAdminApi.
|
|
26
|
-
trigger: typeof workflowAdminApi.triggerWorkflowAdmin;
|
|
28
|
+
paginate: typeof workflowAdminApi.paginateWorkflow;
|
|
29
|
+
get: typeof workflowAdminApi.getWorkflow;
|
|
30
|
+
updateStatus: typeof workflowAdminApi.updateWorkflowStatus;
|
|
31
|
+
delete: typeof workflowAdminApi.deleteWorkflow;
|
|
27
32
|
execution: {
|
|
28
|
-
paginate: typeof workflowAdminApi.
|
|
29
|
-
cancel: typeof workflowAdminApi.
|
|
33
|
+
paginate: typeof workflowAdminApi.paginateWorkflowExecution;
|
|
34
|
+
cancel: typeof workflowAdminApi.cancelWorkflowExecution;
|
|
30
35
|
};
|
|
36
|
+
trigger: typeof workflowAdminApi.triggerWorkflow;
|
|
31
37
|
};
|
|
32
|
-
type
|
|
33
|
-
|
|
38
|
+
type ProjectAdminSDK = {
|
|
39
|
+
delete: typeof projectAdminApi.deleteProject;
|
|
40
|
+
};
|
|
41
|
+
type ProjectSDK = {
|
|
42
|
+
get: typeof projectApi.getProject;
|
|
43
|
+
activate: typeof projectApi.activateProject;
|
|
34
44
|
};
|
|
35
45
|
type AbyssConsoleCoreSDK<TAdmin extends boolean = false> = {
|
|
46
|
+
domainVerification: {
|
|
47
|
+
create: typeof domainVerificationApi.createDomainVerification;
|
|
48
|
+
list: typeof domainVerificationApi.listDomainVerification;
|
|
49
|
+
get: typeof domainVerificationApi.getDomainVerification;
|
|
50
|
+
verify: typeof domainVerificationApi.verifyDomainVerification;
|
|
51
|
+
regenerate: typeof domainVerificationApi.regenerateDomainVerification;
|
|
52
|
+
delete: typeof domainVerificationApi.deleteDomainVerification;
|
|
53
|
+
} & (TAdmin extends true ? {
|
|
54
|
+
admin: DomainVerificationAdminSDK;
|
|
55
|
+
} : object);
|
|
56
|
+
monitor: {
|
|
57
|
+
up: typeof monitorApi.upMonitor;
|
|
58
|
+
};
|
|
59
|
+
ipAddress: {
|
|
60
|
+
create: typeof ipAddressApi.createIpAddress;
|
|
61
|
+
list: typeof ipAddressApi.listIpAddress;
|
|
62
|
+
get: typeof ipAddressApi.getIpAddress;
|
|
63
|
+
update: typeof ipAddressApi.updateIpAddress;
|
|
64
|
+
delete: typeof ipAddressApi.deleteIpAddress;
|
|
65
|
+
};
|
|
66
|
+
project: ProjectSDK & (TAdmin extends true ? {
|
|
67
|
+
admin: ProjectAdminSDK;
|
|
68
|
+
} : object);
|
|
36
69
|
workflow: {
|
|
37
70
|
create: typeof workflowApi.createWorkflow;
|
|
38
71
|
paginate: typeof workflowApi.paginateWorkflow;
|
|
39
72
|
get: typeof workflowApi.getWorkflow;
|
|
40
73
|
update: typeof workflowApi.updateWorkflow;
|
|
41
|
-
updateStatus: typeof workflowApi.
|
|
74
|
+
updateStatus: typeof workflowApi.updateWorkflowStatus;
|
|
42
75
|
delete: typeof workflowApi.deleteWorkflow;
|
|
43
76
|
step: {
|
|
44
77
|
create: typeof workflowApi.createWorkflowStep;
|
|
45
|
-
list: typeof workflowApi.
|
|
78
|
+
list: typeof workflowApi.listWorkflowStep;
|
|
46
79
|
update: typeof workflowApi.updateWorkflowStep;
|
|
47
80
|
delete: typeof workflowApi.deleteWorkflowStep;
|
|
48
81
|
};
|
|
49
82
|
execution: {
|
|
50
83
|
paginate: typeof workflowApi.paginateWorkflowExecution;
|
|
51
84
|
get: typeof workflowApi.getWorkflowExecution;
|
|
52
|
-
|
|
85
|
+
getStats: typeof workflowApi.getWorkflowStats;
|
|
53
86
|
cancel: typeof workflowApi.cancelWorkflowExecution;
|
|
54
87
|
};
|
|
88
|
+
trigger: {
|
|
89
|
+
create: typeof workflowApi.createWorkflowTrigger;
|
|
90
|
+
list: typeof workflowApi.listWorkflowTrigger;
|
|
91
|
+
get: typeof workflowApi.getWorkflowTrigger;
|
|
92
|
+
update: typeof workflowApi.updateWorkflowTrigger;
|
|
93
|
+
delete: typeof workflowApi.deleteWorkflowTrigger;
|
|
94
|
+
};
|
|
55
95
|
} & (TAdmin extends true ? {
|
|
56
96
|
admin: WorkflowAdminSDK;
|
|
57
|
-
} :
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
admin: DomainVerificationAdminSDK;
|
|
67
|
-
} : {});
|
|
68
|
-
monitor: {
|
|
69
|
-
up: typeof monitorApi.upMonitor;
|
|
70
|
-
};
|
|
97
|
+
} : object);
|
|
98
|
+
};
|
|
99
|
+
type InternalConfig = {
|
|
100
|
+
token: string;
|
|
101
|
+
applicationApiKey: string;
|
|
102
|
+
applicationId: string;
|
|
103
|
+
adminToken: string;
|
|
104
|
+
baseURL: string;
|
|
105
|
+
admin: boolean;
|
|
71
106
|
};
|
|
72
107
|
export declare class AbyssConsoleCore {
|
|
73
108
|
private static config;
|
|
@@ -76,8 +111,6 @@ export declare class AbyssConsoleCore {
|
|
|
76
111
|
static get sdk(): AbyssConsoleCoreSDK<false> | AbyssConsoleCoreSDK<true>;
|
|
77
112
|
private static buildSDK;
|
|
78
113
|
static setConfig<TAdmin extends boolean = false>(config: CoreConfig<TAdmin>): void;
|
|
79
|
-
static getConfig():
|
|
80
|
-
admin: boolean;
|
|
81
|
-
};
|
|
114
|
+
static getConfig(): InternalConfig;
|
|
82
115
|
static enableAxiosRetry(axiosRetryConfig?: IAxiosRetryConfig): void;
|
|
83
116
|
}
|