@abyss-project/console 1.0.19 → 1.0.21
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/workflow.api.d.ts +2 -1
- package/dist/api/workflow.api.js +6 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.js +3 -0
- package/dist/types/dto/workflow.dto.d.ts +0 -8
- package/dist/types/enum/workflow.enum.d.ts +6 -0
- package/dist/types/enum/workflow.enum.js +8 -1
- package/dist/types/interface/api/requests/workflow.request.d.ts +23 -4
- package/dist/types/interface/api/responses/workflow.response.d.ts +10 -0
- package/dist/types/interface/index.d.ts +1 -0
- package/dist/types/interface/index.js +1 -0
- package/dist/types/interface/models/workflow-step-connection.model.d.ts +18 -0
- package/dist/types/interface/models/workflow-step-connection.model.js +2 -0
- package/dist/types/interface/models/workflow-step.model.d.ts +0 -3
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
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';
|
|
1
|
+
import { ICreateWorkflowParams, ICreateWorkflowBody, IPaginateWorkflowParams, IPaginateWorkflowQuery, IGetWorkflowParams, IUpdateWorkflowParams, IUpdateWorkflowBody, IUpdateWorkflowStatusParams, IUpdateWorkflowStatusBody, IDeleteWorkflowParams, ICreateWorkflowStepParams, ICreateWorkflowStepBody, IListWorkflowStepsParams, IUpdateWorkflowStepParams, IUpdateWorkflowStepBody, IDeleteWorkflowStepParams, IListWorkflowStepConnectionsParams, IPaginateWorkflowExecutionParams, IPaginateWorkflowExecutionQuery, IGetWorkflowExecutionParams, IGetWorkflowExecutionStatsParams, IGetWorkflowExecutionStatsQuery, ICancelWorkflowExecutionParams, ICreateWorkflowTriggerParams, ICreateWorkflowTriggerBody, IListWorkflowTriggersParams, IGetWorkflowTriggerParams, IUpdateWorkflowTriggerParams, IUpdateWorkflowTriggerBody, IDeleteWorkflowTriggerParams, ICreateWorkflowResponse, IPaginateWorkflowResponse, IGetWorkflowResponse, IUpdateWorkflowResponse, IDeleteWorkflowResponse, ICreateWorkflowStepResponse, IListWorkflowStepResponse, IUpdateWorkflowStepResponse, IDeleteWorkflowStepResponse, IListWorkflowStepConnectionResponse, IPaginateWorkflowExecutionResponse, IGetWorkflowExecutionResponse, IGetStatsWorkflowExecutionResponse, ICancelWorkflowExecutionResponse, ICreateWorkflowTriggerResponse, IListWorkflowTriggersResponse, IGetWorkflowTriggerResponse, IUpdateWorkflowTriggerResponse, IDeleteWorkflowTriggerResponse } 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>;
|
|
@@ -9,6 +9,7 @@ export declare const createWorkflowStep: (params: ICreateWorkflowStepParams, bod
|
|
|
9
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 listWorkflowStepConnections: (params: IListWorkflowStepConnectionsParams) => Promise<IListWorkflowStepConnectionResponse>;
|
|
12
13
|
export declare const paginateWorkflowExecution: (params: IPaginateWorkflowExecutionParams, query: IPaginateWorkflowExecutionQuery) => Promise<IPaginateWorkflowExecutionResponse>;
|
|
13
14
|
export declare const getWorkflowExecution: (params: IGetWorkflowExecutionParams) => Promise<IGetWorkflowExecutionResponse>;
|
|
14
15
|
export declare const getWorkflowStats: (params: IGetWorkflowExecutionStatsParams, query?: IGetWorkflowExecutionStatsQuery) => Promise<IGetStatsWorkflowExecutionResponse>;
|
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.deleteWorkflowStep = exports.updateWorkflowStep = exports.listWorkflowStep = exports.createWorkflowStep = exports.deleteWorkflow = exports.updateWorkflowStatus = exports.updateWorkflow = exports.getWorkflow = exports.paginateWorkflow = exports.createWorkflow = void 0;
|
|
3
|
+
exports.deleteWorkflowTrigger = exports.updateWorkflowTrigger = exports.getWorkflowTrigger = exports.listWorkflowTrigger = exports.createWorkflowTrigger = exports.cancelWorkflowExecution = exports.getWorkflowStats = exports.getWorkflowExecution = exports.paginateWorkflowExecution = exports.listWorkflowStepConnections = 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);
|
|
@@ -52,6 +52,11 @@ const deleteWorkflowStep = async (params) => {
|
|
|
52
52
|
return response.data;
|
|
53
53
|
};
|
|
54
54
|
exports.deleteWorkflowStep = deleteWorkflowStep;
|
|
55
|
+
const listWorkflowStepConnections = async (params) => {
|
|
56
|
+
const response = await __1.AbyssConsoleCore.axios.get(`/workflow/${params.projectId}/${params.workflowId}/connection`);
|
|
57
|
+
return response.data;
|
|
58
|
+
};
|
|
59
|
+
exports.listWorkflowStepConnections = listWorkflowStepConnections;
|
|
55
60
|
const paginateWorkflowExecution = async (params, query) => {
|
|
56
61
|
const response = await __1.AbyssConsoleCore.axios.get(`/workflow/${params.projectId}/${params.workflowId}/execution`, { params: query });
|
|
57
62
|
return response.data;
|
package/dist/index.d.ts
CHANGED
|
@@ -95,6 +95,9 @@ type AbyssConsoleCoreSDK = {
|
|
|
95
95
|
update: typeof workflowApi.updateWorkflowStep;
|
|
96
96
|
delete: typeof workflowApi.deleteWorkflowStep;
|
|
97
97
|
};
|
|
98
|
+
connection: {
|
|
99
|
+
list: typeof workflowApi.listWorkflowStepConnections;
|
|
100
|
+
};
|
|
98
101
|
execution: {
|
|
99
102
|
paginate: typeof workflowApi.paginateWorkflowExecution;
|
|
100
103
|
get: typeof workflowApi.getWorkflowExecution;
|
package/dist/index.js
CHANGED
|
@@ -89,6 +89,9 @@ class AbyssConsoleCore {
|
|
|
89
89
|
update: workflowApi.updateWorkflowStep,
|
|
90
90
|
delete: workflowApi.deleteWorkflowStep,
|
|
91
91
|
},
|
|
92
|
+
connection: {
|
|
93
|
+
list: workflowApi.listWorkflowStepConnections,
|
|
94
|
+
},
|
|
92
95
|
execution: {
|
|
93
96
|
paginate: workflowApi.paginateWorkflowExecution,
|
|
94
97
|
get: workflowApi.getWorkflowExecution,
|
|
@@ -33,12 +33,6 @@ export interface ISwitchStepConfig {
|
|
|
33
33
|
conditions: ISwitchCondition[];
|
|
34
34
|
defaultTargetStepId: string | null;
|
|
35
35
|
}
|
|
36
|
-
export interface ISwitchBranchConfig {
|
|
37
|
-
isDefaultBranch: boolean;
|
|
38
|
-
field?: string;
|
|
39
|
-
operator?: SwitchConditionOperator;
|
|
40
|
-
value?: string;
|
|
41
|
-
}
|
|
42
36
|
export interface ICallWebhookActionConfig {
|
|
43
37
|
actionType: WorkflowActionType.CALL_WEBHOOK;
|
|
44
38
|
url: string;
|
|
@@ -51,9 +45,7 @@ export interface ICallWebhookActionConfig {
|
|
|
51
45
|
}
|
|
52
46
|
export interface IInviteToProjectActionConfig {
|
|
53
47
|
actionType: WorkflowActionType.INVITE_TO_PROJECT;
|
|
54
|
-
projectId: string;
|
|
55
48
|
permissions: string[];
|
|
56
|
-
message?: string;
|
|
57
49
|
}
|
|
58
50
|
export type IActionStepConfig = ICallWebhookActionConfig | IInviteToProjectActionConfig;
|
|
59
51
|
export type StepConfig = IFilterStepConfig | ISleepStepConfig | ISwitchStepConfig | IActionStepConfig;
|
|
@@ -22,6 +22,12 @@ export declare enum WorkflowActionType {
|
|
|
22
22
|
CALL_WEBHOOK = "CALL_WEBHOOK",
|
|
23
23
|
INVITE_TO_PROJECT = "INVITE_TO_PROJECT"
|
|
24
24
|
}
|
|
25
|
+
export declare enum WorkflowConnectionType {
|
|
26
|
+
SEQUENTIAL = "SEQUENTIAL",
|
|
27
|
+
CONDITIONAL = "CONDITIONAL",
|
|
28
|
+
DEFAULT = "DEFAULT",
|
|
29
|
+
MERGE = "MERGE"
|
|
30
|
+
}
|
|
25
31
|
export declare enum WorkflowStepStatus {
|
|
26
32
|
PENDING = "PENDING",
|
|
27
33
|
RUNNING = "RUNNING",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.HttpMethod = exports.SwitchConditionOperator = exports.FilterOperator = exports.WebhookStatus = exports.WebhookDirection = exports.WorkflowExecutionStatus = exports.WorkflowStepStatus = exports.WorkflowActionType = exports.WorkflowStepType = exports.WorkflowTemplate = exports.WorkflowTriggerType = exports.WorkflowStatus = void 0;
|
|
3
|
+
exports.HttpMethod = exports.SwitchConditionOperator = exports.FilterOperator = exports.WebhookStatus = exports.WebhookDirection = exports.WorkflowExecutionStatus = exports.WorkflowStepStatus = exports.WorkflowConnectionType = exports.WorkflowActionType = exports.WorkflowStepType = exports.WorkflowTemplate = exports.WorkflowTriggerType = exports.WorkflowStatus = void 0;
|
|
4
4
|
var WorkflowStatus;
|
|
5
5
|
(function (WorkflowStatus) {
|
|
6
6
|
WorkflowStatus["DRAFT"] = "DRAFT";
|
|
@@ -30,6 +30,13 @@ var WorkflowActionType;
|
|
|
30
30
|
WorkflowActionType["CALL_WEBHOOK"] = "CALL_WEBHOOK";
|
|
31
31
|
WorkflowActionType["INVITE_TO_PROJECT"] = "INVITE_TO_PROJECT";
|
|
32
32
|
})(WorkflowActionType || (exports.WorkflowActionType = WorkflowActionType = {}));
|
|
33
|
+
var WorkflowConnectionType;
|
|
34
|
+
(function (WorkflowConnectionType) {
|
|
35
|
+
WorkflowConnectionType["SEQUENTIAL"] = "SEQUENTIAL";
|
|
36
|
+
WorkflowConnectionType["CONDITIONAL"] = "CONDITIONAL";
|
|
37
|
+
WorkflowConnectionType["DEFAULT"] = "DEFAULT";
|
|
38
|
+
WorkflowConnectionType["MERGE"] = "MERGE";
|
|
39
|
+
})(WorkflowConnectionType || (exports.WorkflowConnectionType = WorkflowConnectionType = {}));
|
|
33
40
|
var WorkflowStepStatus;
|
|
34
41
|
(function (WorkflowStepStatus) {
|
|
35
42
|
WorkflowStepStatus["PENDING"] = "PENDING";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { WorkflowStatus, WorkflowTemplate, WorkflowExecutionStatus, WorkflowTriggerType, WorkflowStepType } from '../../../enum/workflow.enum';
|
|
2
|
-
import { IWorkflowSettings, StepConfig
|
|
2
|
+
import { IWorkflowSettings, StepConfig } from '../../../dto/workflow.dto';
|
|
3
3
|
import { ITriggerFilter } from '../../models/workflow-trigger.model';
|
|
4
4
|
import { QueryPaginate } from '../type-message/base-paginate';
|
|
5
5
|
export type ICreateWorkflowParams = {
|
|
@@ -53,9 +53,16 @@ export interface ICreateWorkflowStepBody {
|
|
|
53
53
|
type: WorkflowStepType;
|
|
54
54
|
description?: string | null;
|
|
55
55
|
config: StepConfig;
|
|
56
|
-
parentWorkflowStepId?: string | null;
|
|
57
56
|
isEnabled?: boolean;
|
|
58
|
-
|
|
57
|
+
afterStepId?: string | null;
|
|
58
|
+
beforeStepId?: string | null;
|
|
59
|
+
condition?: {
|
|
60
|
+
field: string;
|
|
61
|
+
operator: 'equals' | 'not_equals' | 'contains' | 'greater_than' | 'less_than';
|
|
62
|
+
value: any;
|
|
63
|
+
};
|
|
64
|
+
label?: string;
|
|
65
|
+
order?: number;
|
|
59
66
|
}
|
|
60
67
|
export interface IListWorkflowStepsParams {
|
|
61
68
|
projectId: string;
|
|
@@ -71,14 +78,26 @@ export interface IUpdateWorkflowStepBody {
|
|
|
71
78
|
type?: WorkflowStepType;
|
|
72
79
|
description?: string | null;
|
|
73
80
|
config?: StepConfig;
|
|
74
|
-
parentWorkflowStepId?: string | null;
|
|
75
81
|
isEnabled?: boolean;
|
|
82
|
+
afterStepId?: string | null;
|
|
83
|
+
beforeStepId?: string | null;
|
|
84
|
+
condition?: {
|
|
85
|
+
field: string;
|
|
86
|
+
operator: 'equals' | 'not_equals' | 'contains' | 'greater_than' | 'less_than';
|
|
87
|
+
value: any;
|
|
88
|
+
};
|
|
89
|
+
label?: string;
|
|
90
|
+
order?: number;
|
|
76
91
|
}
|
|
77
92
|
export interface IDeleteWorkflowStepParams {
|
|
78
93
|
projectId: string;
|
|
79
94
|
workflowId: string;
|
|
80
95
|
workflowStepId: string;
|
|
81
96
|
}
|
|
97
|
+
export interface IListWorkflowStepConnectionsParams {
|
|
98
|
+
projectId: string;
|
|
99
|
+
workflowId: string;
|
|
100
|
+
}
|
|
82
101
|
export interface IPaginateWorkflowExecutionParams {
|
|
83
102
|
projectId: string;
|
|
84
103
|
workflowId: string;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { IWorkflow } from '../../models/workflow.model';
|
|
2
2
|
import { IWorkflowStep } from '../../models/workflow-step.model';
|
|
3
|
+
import { IWorkflowStepConnection } from '../../models/workflow-step-connection.model';
|
|
3
4
|
import { IWorkflowExecution } from '../../models/workflow-execution.model';
|
|
4
5
|
import { IWorkflowTrigger } from '../../models/workflow-trigger.model';
|
|
5
6
|
import { IResponse } from '../type-message/response';
|
|
@@ -35,6 +36,15 @@ export type IUpdateWorkflowStepResponse = IResponse<IUpdateWorkflowStepData>;
|
|
|
35
36
|
export interface IDeleteWorkflowStepData {
|
|
36
37
|
}
|
|
37
38
|
export type IDeleteWorkflowStepResponse = IResponse<IDeleteWorkflowStepData>;
|
|
39
|
+
export interface IAddStepWorkflowData {
|
|
40
|
+
step: IWorkflowStep;
|
|
41
|
+
connections: IWorkflowStepConnection[];
|
|
42
|
+
}
|
|
43
|
+
export type IAddStepWorkflowResponse = IResponse<IAddStepWorkflowData>;
|
|
44
|
+
export interface IListWorkflowStepConnectionData {
|
|
45
|
+
connections: IWorkflowStepConnection[];
|
|
46
|
+
}
|
|
47
|
+
export type IListWorkflowStepConnectionResponse = IResponse<IListWorkflowStepConnectionData>;
|
|
38
48
|
export type IPaginateWorkflowExecutionResponse = IResponse<BasePaginate<IWorkflowExecution>>;
|
|
39
49
|
export interface IGetWorkflowExecutionData {
|
|
40
50
|
workflowExecution: IWorkflowExecution;
|
|
@@ -3,6 +3,7 @@ export * from './models/project.model';
|
|
|
3
3
|
export * from './models/workflow.model';
|
|
4
4
|
export * from './models/workflow-trigger.model';
|
|
5
5
|
export * from './models/workflow-step.model';
|
|
6
|
+
export * from './models/workflow-step-connection.model';
|
|
6
7
|
export * from './models/workflow-execution.model';
|
|
7
8
|
export * from './models/workflow-step-execution.model';
|
|
8
9
|
export * from './models/workflow-webhook.model';
|
|
@@ -19,6 +19,7 @@ __exportStar(require("./models/project.model"), exports);
|
|
|
19
19
|
__exportStar(require("./models/workflow.model"), exports);
|
|
20
20
|
__exportStar(require("./models/workflow-trigger.model"), exports);
|
|
21
21
|
__exportStar(require("./models/workflow-step.model"), exports);
|
|
22
|
+
__exportStar(require("./models/workflow-step-connection.model"), exports);
|
|
22
23
|
__exportStar(require("./models/workflow-execution.model"), exports);
|
|
23
24
|
__exportStar(require("./models/workflow-step-execution.model"), exports);
|
|
24
25
|
__exportStar(require("./models/workflow-webhook.model"), exports);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { WorkflowConnectionType } from '../../enum/workflow.enum';
|
|
2
|
+
export interface WorkflowCondition {
|
|
3
|
+
field: string;
|
|
4
|
+
operator: 'equals' | 'not_equals' | 'contains' | 'greater_than' | 'less_than';
|
|
5
|
+
value: any;
|
|
6
|
+
}
|
|
7
|
+
export interface IWorkflowStepConnection {
|
|
8
|
+
id: string;
|
|
9
|
+
workflowId: string;
|
|
10
|
+
fromStepId: string | null;
|
|
11
|
+
toStepId: string | null;
|
|
12
|
+
type: WorkflowConnectionType;
|
|
13
|
+
label: string | null;
|
|
14
|
+
condition: WorkflowCondition | null;
|
|
15
|
+
order: number;
|
|
16
|
+
createdAt?: Date;
|
|
17
|
+
updatedAt?: Date;
|
|
18
|
+
}
|
|
@@ -8,12 +8,9 @@ export interface IWorkflowStep {
|
|
|
8
8
|
name: string;
|
|
9
9
|
description: string | null;
|
|
10
10
|
config: WorkflowStepConfig;
|
|
11
|
-
parentWorkflowStepId: string | null;
|
|
12
11
|
continueOnError: boolean;
|
|
13
12
|
isEnabled: boolean;
|
|
14
13
|
createdAt?: Date;
|
|
15
14
|
updatedAt?: Date;
|
|
16
15
|
workflow?: IWorkflow;
|
|
17
|
-
parentWorkflowStep?: IWorkflowStep;
|
|
18
|
-
childWorkflowStep?: IWorkflowStep[];
|
|
19
16
|
}
|