@abyss-project/console 1.0.77 → 1.0.78
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/internal-ticket.api.d.ts +3 -1
- package/dist/api/internal-ticket.api.js +11 -1
- 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/index.d.ts +1 -0
- package/dist/types/dto/index.js +1 -0
- package/dist/types/dto/internal-ticket-activity.dto.d.ts +97 -0
- package/dist/types/dto/internal-ticket-activity.dto.js +3 -0
- package/dist/types/dto/workflow.dto.d.ts +174 -6
- package/dist/types/dto/workflow.dto.js +1 -0
- package/dist/types/enum/workflow.enum.d.ts +7 -2
- package/dist/types/enum/workflow.enum.js +5 -0
- package/dist/types/interface/api/requests/internal-ticket.request.d.ts +19 -0
- package/dist/types/interface/api/requests/workflow.request.d.ts +8 -1
- package/dist/types/interface/api/responses/internal-ticket.response.d.ts +12 -0
- package/dist/types/interface/api/responses/workflow.response.d.ts +18 -0
- package/dist/types/interface/models/internal-ticket-activity.model.d.ts +4 -3
- package/dist/types/interface/models/internal-ticket-artifact-rule.model.d.ts +2 -0
- package/dist/types/interface/models/internal-ticket-attachment.model.d.ts +3 -2
- package/dist/workflow-expressions/functions.d.ts +78 -0
- package/dist/workflow-expressions/functions.js +65 -0
- package/dist/workflow-expressions/index.d.ts +1 -0
- package/dist/workflow-expressions/index.js +1 -0
- package/dist/workflow-expressions/types.d.ts +42 -3
- package/dist/workflow-expressions/types.js +2 -0
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ICreateBoardCardInternalTicketParams, ICreateBoardCardInternalTicketBody, ICreateBoardCardInternalTicketResponse, ICreateInternalTicketParams, ICreateInternalTicketBody, IPaginateInternalTicketParams, IPaginateInternalTicketQuery, IGetInternalTicketParams, IUpdateInternalTicketParams, IUpdateInternalTicketBody, IDeleteInternalTicketParams, ICreateInternalTicketMessageParams, ICreateInternalTicketMessageBody, IUpdateInternalTicketMessageParams, IUpdateInternalTicketMessageBody, IDeleteInternalTicketMessageParams, IPaginateInternalTicketMessageParams, IPaginateInternalTicketMessageQuery, ICreateInternalTicketMessageAttachmentParams, ICreateInternalTicketMessageAttachmentBody, IDeleteInternalTicketMessageAttachmentParams, ICreateInternalTicketAttachmentParams, ICreateInternalTicketAttachmentBody, IDeleteInternalTicketAttachmentParams, IPaginateInternalTicketActivityParams, IPaginateInternalTicketActivityQuery, IFollowInternalTicketParams, IUnfollowInternalTicketParams, IListInternalTicketFollowerParams, IAddInternalTicketMessageReactionParams, IAddInternalTicketMessageReactionBody, IRemoveInternalTicketMessageReactionParams, ICreateInternalTicketResponse, IPaginateInternalTicketResponse, IGetInternalTicketResponse, IUpdateInternalTicketResponse, IDeleteInternalTicketResponse, ICreateInternalTicketMessageResponse, IUpdateInternalTicketMessageResponse, IDeleteInternalTicketMessageResponse, IPaginateInternalTicketMessageResponse, ICreateInternalTicketMessageAttachmentResponse, IDeleteInternalTicketMessageAttachmentResponse, ICreateInternalTicketAttachmentResponse, IDeleteInternalTicketAttachmentResponse, IPaginateInternalTicketActivityResponse, IFollowInternalTicketResponse, IUnfollowInternalTicketResponse, IListInternalTicketFollowerResponse, IAddInternalTicketMessageReactionResponse, IRemoveInternalTicketMessageReactionResponse, IAddInternalTicketAssigneeParams, IAddInternalTicketAssigneeBody, IRemoveInternalTicketAssigneeParams, IListInternalTicketAssigneeParams, IAddInternalTicketAssigneeResponse, IRemoveInternalTicketAssigneeResponse, IListInternalTicketAssigneeResponse, IBulkArchiveInternalTicketParams, IBulkArchiveInternalTicketBody, IBulkArchiveInternalTicketResponse, IBulkUnarchiveInternalTicketParams, IBulkUnarchiveInternalTicketBody, IBulkUnarchiveInternalTicketResponse, IBulkDeleteInternalTicketParams, IBulkDeleteInternalTicketBody, IBulkDeleteInternalTicketResponse, IAddInternalTicketTagParams, IAddInternalTicketTagBody, IRemoveInternalTicketTagParams, IListInternalTicketTicketTagParams, IAddInternalTicketTagResponse, IRemoveInternalTicketTagResponse, IListInternalTicketTicketTagResponse, IAddInternalTicketArtifactParams, IAddInternalTicketArtifactBody, IRemoveInternalTicketArtifactParams, IListInternalTicketArtifactParams, IAddInternalTicketArtifactResponse, IRemoveInternalTicketArtifactResponse, IListInternalTicketArtifactResponse, IListProjectInternalTicketArtifactParams, IListProjectInternalTicketArtifactResponse } from '../types';
|
|
1
|
+
import { ICreateBoardCardInternalTicketParams, ICreateBoardCardInternalTicketBody, ICreateBoardCardInternalTicketResponse, ICreateInternalTicketParams, ICreateInternalTicketBody, IPaginateInternalTicketParams, IPaginateInternalTicketQuery, IGetInternalTicketParams, IUpdateInternalTicketParams, IUpdateInternalTicketBody, IDeleteInternalTicketParams, ICreateInternalTicketMessageParams, ICreateInternalTicketMessageBody, IUpdateInternalTicketMessageParams, IUpdateInternalTicketMessageBody, IDeleteInternalTicketMessageParams, IPaginateInternalTicketMessageParams, IPaginateInternalTicketMessageQuery, ICreateInternalTicketMessageAttachmentParams, ICreateInternalTicketMessageAttachmentBody, IDeleteInternalTicketMessageAttachmentParams, ICreateInternalTicketAttachmentParams, ICreateInternalTicketAttachmentBody, IDeleteInternalTicketAttachmentParams, IGetInternalTicketAttachmentDownloadUrlParams, IPaginateInternalTicketActivityParams, IPaginateInternalTicketActivityQuery, IFollowInternalTicketParams, IUnfollowInternalTicketParams, IListInternalTicketFollowerParams, IAddInternalTicketMessageReactionParams, IAddInternalTicketMessageReactionBody, IRemoveInternalTicketMessageReactionParams, ICreateInternalTicketResponse, IPaginateInternalTicketResponse, IGetInternalTicketResponse, IUpdateInternalTicketResponse, IDeleteInternalTicketResponse, ICreateInternalTicketMessageResponse, IUpdateInternalTicketMessageResponse, IDeleteInternalTicketMessageResponse, IPaginateInternalTicketMessageResponse, ICreateInternalTicketMessageAttachmentResponse, IDeleteInternalTicketMessageAttachmentResponse, ICreateInternalTicketAttachmentResponse, IDeleteInternalTicketAttachmentResponse, IGetInternalTicketAttachmentDownloadUrlResponse, IPaginateInternalTicketActivityResponse, IFollowInternalTicketResponse, IUnfollowInternalTicketResponse, IListInternalTicketFollowerResponse, IAddInternalTicketMessageReactionResponse, IRemoveInternalTicketMessageReactionResponse, IAddInternalTicketAssigneeParams, IAddInternalTicketAssigneeBody, IRemoveInternalTicketAssigneeParams, IListInternalTicketAssigneeParams, IAddInternalTicketAssigneeResponse, IRemoveInternalTicketAssigneeResponse, IListInternalTicketAssigneeResponse, IBulkArchiveInternalTicketParams, IBulkArchiveInternalTicketBody, IBulkArchiveInternalTicketResponse, IBulkUnarchiveInternalTicketParams, IBulkUnarchiveInternalTicketBody, IBulkUnarchiveInternalTicketResponse, IBulkDeleteInternalTicketParams, IBulkDeleteInternalTicketBody, IBulkDeleteInternalTicketResponse, IAddInternalTicketTagParams, IAddInternalTicketTagBody, IRemoveInternalTicketTagParams, IListInternalTicketTicketTagParams, IAddInternalTicketTagResponse, IRemoveInternalTicketTagResponse, IListInternalTicketTicketTagResponse, IAddInternalTicketArtifactParams, IAddInternalTicketArtifactBody, IRemoveInternalTicketArtifactParams, IUpdateInternalTicketArtifactParams, IUpdateInternalTicketArtifactBody, IListInternalTicketArtifactParams, IAddInternalTicketArtifactResponse, IRemoveInternalTicketArtifactResponse, IUpdateInternalTicketArtifactResponse, IListInternalTicketArtifactResponse, IListProjectInternalTicketArtifactParams, IListProjectInternalTicketArtifactResponse } from '../types';
|
|
2
2
|
export declare const createInternalTicket: (params: ICreateInternalTicketParams, body: ICreateInternalTicketBody) => Promise<ICreateInternalTicketResponse>;
|
|
3
3
|
export declare const paginateInternalTicket: (params: IPaginateInternalTicketParams, query: IPaginateInternalTicketQuery) => Promise<IPaginateInternalTicketResponse>;
|
|
4
4
|
export declare const getInternalTicket: (params: IGetInternalTicketParams) => Promise<IGetInternalTicketResponse>;
|
|
@@ -12,6 +12,7 @@ export declare const createInternalTicketMessageAttachment: (params: ICreateInte
|
|
|
12
12
|
export declare const deleteInternalTicketMessageAttachment: (params: IDeleteInternalTicketMessageAttachmentParams) => Promise<IDeleteInternalTicketMessageAttachmentResponse>;
|
|
13
13
|
export declare const createInternalTicketAttachment: (params: ICreateInternalTicketAttachmentParams, body: ICreateInternalTicketAttachmentBody) => Promise<ICreateInternalTicketAttachmentResponse>;
|
|
14
14
|
export declare const deleteInternalTicketAttachment: (params: IDeleteInternalTicketAttachmentParams) => Promise<IDeleteInternalTicketAttachmentResponse>;
|
|
15
|
+
export declare const getInternalTicketAttachmentDownloadUrl: (params: IGetInternalTicketAttachmentDownloadUrlParams) => Promise<IGetInternalTicketAttachmentDownloadUrlResponse>;
|
|
15
16
|
export declare const paginateInternalTicketActivity: (params: IPaginateInternalTicketActivityParams, query: IPaginateInternalTicketActivityQuery) => Promise<IPaginateInternalTicketActivityResponse>;
|
|
16
17
|
export declare const followInternalTicket: (params: IFollowInternalTicketParams) => Promise<IFollowInternalTicketResponse>;
|
|
17
18
|
export declare const unfollowInternalTicket: (params: IUnfollowInternalTicketParams) => Promise<IUnfollowInternalTicketResponse>;
|
|
@@ -30,5 +31,6 @@ export declare const removeInternalTicketTag: (params: IRemoveInternalTicketTagP
|
|
|
30
31
|
export declare const listInternalTicketTicketTag: (params: IListInternalTicketTicketTagParams) => Promise<IListInternalTicketTicketTagResponse>;
|
|
31
32
|
export declare const addInternalTicketArtifact: (params: IAddInternalTicketArtifactParams, body: IAddInternalTicketArtifactBody) => Promise<IAddInternalTicketArtifactResponse>;
|
|
32
33
|
export declare const removeInternalTicketArtifact: (params: IRemoveInternalTicketArtifactParams) => Promise<IRemoveInternalTicketArtifactResponse>;
|
|
34
|
+
export declare const updateInternalTicketArtifact: (params: IUpdateInternalTicketArtifactParams, body: IUpdateInternalTicketArtifactBody) => Promise<IUpdateInternalTicketArtifactResponse>;
|
|
33
35
|
export declare const listInternalTicketArtifact: (params: IListInternalTicketArtifactParams) => Promise<IListInternalTicketArtifactResponse>;
|
|
34
36
|
export declare const listProjectInternalTicketArtifact: (params: IListProjectInternalTicketArtifactParams) => Promise<IListProjectInternalTicketArtifactResponse>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.listProjectInternalTicketArtifact = exports.listInternalTicketArtifact = exports.removeInternalTicketArtifact = exports.addInternalTicketArtifact = exports.listInternalTicketTicketTag = exports.removeInternalTicketTag = exports.addInternalTicketTag = exports.bulkDeleteInternalTicket = exports.bulkUnarchiveInternalTicket = exports.bulkArchiveInternalTicket = exports.createBoardCardInternalTicket = exports.listInternalTicketAssignee = exports.removeInternalTicketAssignee = exports.addInternalTicketAssignee = exports.removeInternalTicketMessageReaction = exports.addInternalTicketMessageReaction = exports.listInternalTicketFollower = exports.unfollowInternalTicket = exports.followInternalTicket = exports.paginateInternalTicketActivity = exports.deleteInternalTicketAttachment = exports.createInternalTicketAttachment = exports.deleteInternalTicketMessageAttachment = exports.createInternalTicketMessageAttachment = exports.paginateInternalTicketMessage = exports.deleteInternalTicketMessage = exports.updateInternalTicketMessage = exports.createInternalTicketMessage = exports.deleteInternalTicket = exports.updateInternalTicket = exports.getInternalTicket = exports.paginateInternalTicket = exports.createInternalTicket = void 0;
|
|
3
|
+
exports.listProjectInternalTicketArtifact = exports.listInternalTicketArtifact = exports.updateInternalTicketArtifact = exports.removeInternalTicketArtifact = exports.addInternalTicketArtifact = exports.listInternalTicketTicketTag = exports.removeInternalTicketTag = exports.addInternalTicketTag = exports.bulkDeleteInternalTicket = exports.bulkUnarchiveInternalTicket = exports.bulkArchiveInternalTicket = exports.createBoardCardInternalTicket = exports.listInternalTicketAssignee = exports.removeInternalTicketAssignee = exports.addInternalTicketAssignee = exports.removeInternalTicketMessageReaction = exports.addInternalTicketMessageReaction = exports.listInternalTicketFollower = exports.unfollowInternalTicket = exports.followInternalTicket = exports.paginateInternalTicketActivity = exports.getInternalTicketAttachmentDownloadUrl = exports.deleteInternalTicketAttachment = exports.createInternalTicketAttachment = exports.deleteInternalTicketMessageAttachment = exports.createInternalTicketMessageAttachment = exports.paginateInternalTicketMessage = exports.deleteInternalTicketMessage = exports.updateInternalTicketMessage = exports.createInternalTicketMessage = exports.deleteInternalTicket = exports.updateInternalTicket = exports.getInternalTicket = exports.paginateInternalTicket = exports.createInternalTicket = void 0;
|
|
4
4
|
const __1 = require("..");
|
|
5
5
|
const createInternalTicket = async (params, body) => {
|
|
6
6
|
const response = await __1.AbyssConsoleCore.axios.post(`/internal-ticket/${params.projectId}`, body);
|
|
@@ -67,6 +67,11 @@ const deleteInternalTicketAttachment = async (params) => {
|
|
|
67
67
|
return response.data;
|
|
68
68
|
};
|
|
69
69
|
exports.deleteInternalTicketAttachment = deleteInternalTicketAttachment;
|
|
70
|
+
const getInternalTicketAttachmentDownloadUrl = async (params) => {
|
|
71
|
+
const response = await __1.AbyssConsoleCore.axios.get(`/internal-ticket/${params.projectId}/${params.internalTicketId}/attachment/${params.internalTicketAttachmentId}/download-url`);
|
|
72
|
+
return response.data;
|
|
73
|
+
};
|
|
74
|
+
exports.getInternalTicketAttachmentDownloadUrl = getInternalTicketAttachmentDownloadUrl;
|
|
70
75
|
const paginateInternalTicketActivity = async (params, query) => {
|
|
71
76
|
const response = await __1.AbyssConsoleCore.axios.get(`/internal-ticket/${params.projectId}/${params.internalTicketId}/activity`, { params: query });
|
|
72
77
|
return response.data;
|
|
@@ -157,6 +162,11 @@ const removeInternalTicketArtifact = async (params) => {
|
|
|
157
162
|
return response.data;
|
|
158
163
|
};
|
|
159
164
|
exports.removeInternalTicketArtifact = removeInternalTicketArtifact;
|
|
165
|
+
const updateInternalTicketArtifact = async (params, body) => {
|
|
166
|
+
const response = await __1.AbyssConsoleCore.axios.put(`/internal-ticket/${params.projectId}/${params.internalTicketId}/artifact/${params.internalTicketArtifactId}`, body);
|
|
167
|
+
return response.data;
|
|
168
|
+
};
|
|
169
|
+
exports.updateInternalTicketArtifact = updateInternalTicketArtifact;
|
|
160
170
|
const listInternalTicketArtifact = async (params) => {
|
|
161
171
|
const response = await __1.AbyssConsoleCore.axios.get(`/internal-ticket/${params.projectId}/${params.internalTicketId}/artifact`);
|
|
162
172
|
return response.data;
|
|
@@ -1,4 +1,4 @@
|
|
|
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, IGetWorkflowTriggerWithWorkflowParams, ICreateWorkflowResponse, IPaginateWorkflowResponse, IGetWorkflowResponse, IUpdateWorkflowResponse, IDeleteWorkflowResponse, IExecuteWorkflowResponse, ICreateWorkflowStepResponse, IListWorkflowStepResponse, IUpdateWorkflowStepResponse, IDeleteWorkflowStepResponse, IListWorkflowStepConnectionResponse, IUpdateWorkflowStepConnectionResponse, IPaginateWorkflowExecutionResponse, IGetWorkflowExecutionResponse, IGetStatsWorkflowExecutionResponse, ICancelWorkflowExecutionResponse, IGetTimeSeriesWorkflowExecutionResponse, ICreateWorkflowTriggerResponse, IListWorkflowTriggersResponse, IGetWorkflowTriggerResponse, IUpdateWorkflowTriggerResponse, IDeleteWorkflowTriggerResponse, IGetWorkflowTriggerStatsResponse, IGetWorkflowTriggerWithWorkflowResponse } from '../types';
|
|
1
|
+
import { IGetProjectWorkflowAnalyticsParams, IGetProjectWorkflowAnalyticsQuery, 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, IGetWorkflowTriggerWithWorkflowParams, IGetProjectWorkflowAnalyticsResponse, ICreateWorkflowResponse, IPaginateWorkflowResponse, IGetWorkflowResponse, IUpdateWorkflowResponse, IDeleteWorkflowResponse, IExecuteWorkflowResponse, ICreateWorkflowStepResponse, IListWorkflowStepResponse, IUpdateWorkflowStepResponse, IDeleteWorkflowStepResponse, IListWorkflowStepConnectionResponse, IUpdateWorkflowStepConnectionResponse, IPaginateWorkflowExecutionResponse, IGetWorkflowExecutionResponse, IGetStatsWorkflowExecutionResponse, ICancelWorkflowExecutionResponse, IGetTimeSeriesWorkflowExecutionResponse, ICreateWorkflowTriggerResponse, IListWorkflowTriggersResponse, IGetWorkflowTriggerResponse, IUpdateWorkflowTriggerResponse, IDeleteWorkflowTriggerResponse, IGetWorkflowTriggerStatsResponse, IGetWorkflowTriggerWithWorkflowResponse } 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>;
|
|
@@ -6,6 +6,7 @@ export declare const updateWorkflow: (params: IUpdateWorkflowParams, body: IUpda
|
|
|
6
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 executeWorkflow: (params: IExecuteWorkflowParams, body?: IExecuteWorkflowBody) => Promise<IExecuteWorkflowResponse>;
|
|
9
|
+
export declare const getProjectWorkflowAnalytics: (params: IGetProjectWorkflowAnalyticsParams, query: IGetProjectWorkflowAnalyticsQuery) => Promise<IGetProjectWorkflowAnalyticsResponse>;
|
|
9
10
|
export declare const createWorkflowStep: (params: ICreateWorkflowStepParams, body: ICreateWorkflowStepBody) => Promise<ICreateWorkflowStepResponse>;
|
|
10
11
|
export declare const listWorkflowStep: (params: IListWorkflowStepsParams) => Promise<IListWorkflowStepResponse>;
|
|
11
12
|
export declare const updateWorkflowStep: (params: IUpdateWorkflowStepParams, body: IUpdateWorkflowStepBody) => Promise<IUpdateWorkflowStepResponse>;
|
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.getWorkflowTriggerWithWorkflow = 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;
|
|
3
|
+
exports.getWorkflowTriggerWithWorkflow = 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.getProjectWorkflowAnalytics = 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);
|
|
@@ -37,6 +37,11 @@ const executeWorkflow = async (params, body) => {
|
|
|
37
37
|
return response.data;
|
|
38
38
|
};
|
|
39
39
|
exports.executeWorkflow = executeWorkflow;
|
|
40
|
+
const getProjectWorkflowAnalytics = async (params, query) => {
|
|
41
|
+
const response = await __1.AbyssConsoleCore.axios.get(`/workflow/${params.projectId}/analytics`, { params: query });
|
|
42
|
+
return response.data;
|
|
43
|
+
};
|
|
44
|
+
exports.getProjectWorkflowAnalytics = getProjectWorkflowAnalytics;
|
|
40
45
|
const createWorkflowStep = async (params, body) => {
|
|
41
46
|
const response = await __1.AbyssConsoleCore.axios.post(`/workflow/${params.projectId}/${params.workflowId}/step`, body);
|
|
42
47
|
return response.data;
|
package/dist/index.d.ts
CHANGED
|
@@ -149,6 +149,7 @@ type AbyssConsoleCoreSDK = {
|
|
|
149
149
|
attachment: {
|
|
150
150
|
create: typeof internalTicketApi.createInternalTicketAttachment;
|
|
151
151
|
delete: typeof internalTicketApi.deleteInternalTicketAttachment;
|
|
152
|
+
getDownloadUrl: typeof internalTicketApi.getInternalTicketAttachmentDownloadUrl;
|
|
152
153
|
};
|
|
153
154
|
activity: {
|
|
154
155
|
paginate: typeof internalTicketApi.paginateInternalTicketActivity;
|
|
@@ -175,6 +176,7 @@ type AbyssConsoleCoreSDK = {
|
|
|
175
176
|
artifact: {
|
|
176
177
|
add: typeof internalTicketApi.addInternalTicketArtifact;
|
|
177
178
|
remove: typeof internalTicketApi.removeInternalTicketArtifact;
|
|
179
|
+
update: typeof internalTicketApi.updateInternalTicketArtifact;
|
|
178
180
|
list: typeof internalTicketApi.listInternalTicketArtifact;
|
|
179
181
|
listProject: typeof internalTicketApi.listProjectInternalTicketArtifact;
|
|
180
182
|
};
|
|
@@ -221,6 +223,7 @@ type AbyssConsoleCoreSDK = {
|
|
|
221
223
|
updateStatus: typeof workflowApi.updateWorkflowStatus;
|
|
222
224
|
delete: typeof workflowApi.deleteWorkflow;
|
|
223
225
|
execute: typeof workflowApi.executeWorkflow;
|
|
226
|
+
analytics: typeof workflowApi.getProjectWorkflowAnalytics;
|
|
224
227
|
step: {
|
|
225
228
|
create: typeof workflowApi.createWorkflowStep;
|
|
226
229
|
list: typeof workflowApi.listWorkflowStep;
|
package/dist/index.js
CHANGED
|
@@ -91,6 +91,7 @@ class AbyssConsoleCore {
|
|
|
91
91
|
updateStatus: workflowApi.updateWorkflowStatus,
|
|
92
92
|
delete: workflowApi.deleteWorkflow,
|
|
93
93
|
execute: workflowApi.executeWorkflow,
|
|
94
|
+
analytics: workflowApi.getProjectWorkflowAnalytics,
|
|
94
95
|
step: {
|
|
95
96
|
create: workflowApi.createWorkflowStep,
|
|
96
97
|
list: workflowApi.listWorkflowStep,
|
|
@@ -254,6 +255,7 @@ class AbyssConsoleCore {
|
|
|
254
255
|
attachment: {
|
|
255
256
|
create: internalTicketApi.createInternalTicketAttachment,
|
|
256
257
|
delete: internalTicketApi.deleteInternalTicketAttachment,
|
|
258
|
+
getDownloadUrl: internalTicketApi.getInternalTicketAttachmentDownloadUrl,
|
|
257
259
|
},
|
|
258
260
|
activity: {
|
|
259
261
|
paginate: internalTicketApi.paginateInternalTicketActivity,
|
|
@@ -280,6 +282,7 @@ class AbyssConsoleCore {
|
|
|
280
282
|
artifact: {
|
|
281
283
|
add: internalTicketApi.addInternalTicketArtifact,
|
|
282
284
|
remove: internalTicketApi.removeInternalTicketArtifact,
|
|
285
|
+
update: internalTicketApi.updateInternalTicketArtifact,
|
|
283
286
|
list: internalTicketApi.listInternalTicketArtifact,
|
|
284
287
|
listProject: internalTicketApi.listProjectInternalTicketArtifact,
|
|
285
288
|
},
|
package/dist/types/dto/index.js
CHANGED
|
@@ -15,4 +15,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./domain-verification.dto"), exports);
|
|
18
|
+
__exportStar(require("./internal-ticket-activity.dto"), exports);
|
|
18
19
|
__exportStar(require("./workflow.dto"), exports);
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { InternalTicketActivityType } from '../enum';
|
|
2
|
+
export interface IStatusChangedActivityData {
|
|
3
|
+
fromStatus: string | null;
|
|
4
|
+
toStatus: string;
|
|
5
|
+
reason?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface IPriorityChangedActivityData {
|
|
8
|
+
fromPriorityId: string | null;
|
|
9
|
+
fromPriorityName: string | null;
|
|
10
|
+
toPriorityId: string;
|
|
11
|
+
toPriorityName: string;
|
|
12
|
+
}
|
|
13
|
+
export interface IPriorityConfirmedActivityData {
|
|
14
|
+
confirmedByUserId: string;
|
|
15
|
+
priorityId: string | null;
|
|
16
|
+
priorityName: string | null;
|
|
17
|
+
}
|
|
18
|
+
export interface ICategoryChangedActivityData {
|
|
19
|
+
fromCategoryId: string | null;
|
|
20
|
+
fromCategoryName: string | null;
|
|
21
|
+
toCategoryId: string;
|
|
22
|
+
toCategoryName: string | null;
|
|
23
|
+
}
|
|
24
|
+
export interface ISectionChangedActivityData {
|
|
25
|
+
fromSectionId: string | null;
|
|
26
|
+
fromSectionName: string | null;
|
|
27
|
+
toSectionId: string;
|
|
28
|
+
toSectionName: string | null;
|
|
29
|
+
}
|
|
30
|
+
export interface IAssignedActivityData {
|
|
31
|
+
assignedToUserId?: string;
|
|
32
|
+
assigneeUserId?: string;
|
|
33
|
+
}
|
|
34
|
+
export interface IUnassignedActivityData {
|
|
35
|
+
previousUserId?: string;
|
|
36
|
+
assigneeUserId?: string;
|
|
37
|
+
}
|
|
38
|
+
export interface IMessageAddedActivityData {
|
|
39
|
+
messageId: string;
|
|
40
|
+
}
|
|
41
|
+
export interface IAttachmentAddedActivityData {
|
|
42
|
+
attachmentId: string;
|
|
43
|
+
attachmentName: string | null;
|
|
44
|
+
}
|
|
45
|
+
export interface IAttachmentRemovedActivityData {
|
|
46
|
+
attachmentId: string;
|
|
47
|
+
attachmentName: string | null;
|
|
48
|
+
}
|
|
49
|
+
export interface IArchivedActivityData {
|
|
50
|
+
}
|
|
51
|
+
export interface IUnarchivedActivityData {
|
|
52
|
+
}
|
|
53
|
+
export interface IBoardCardCreatedActivityData {
|
|
54
|
+
boardCardId?: string;
|
|
55
|
+
}
|
|
56
|
+
export interface IFollowerAddedActivityData {
|
|
57
|
+
followerUserId: string;
|
|
58
|
+
}
|
|
59
|
+
export interface IFollowerRemovedActivityData {
|
|
60
|
+
followerUserId: string;
|
|
61
|
+
}
|
|
62
|
+
export interface ITagAddedActivityData {
|
|
63
|
+
internalTicketTagId: string;
|
|
64
|
+
}
|
|
65
|
+
export interface ITagRemovedActivityData {
|
|
66
|
+
internalTicketTagId: string;
|
|
67
|
+
}
|
|
68
|
+
export interface IArtifactAddedActivityData {
|
|
69
|
+
internalTicketArtifactId: string;
|
|
70
|
+
label: string;
|
|
71
|
+
value?: string;
|
|
72
|
+
}
|
|
73
|
+
export interface IArtifactRemovedActivityData {
|
|
74
|
+
internalTicketArtifactId: string;
|
|
75
|
+
}
|
|
76
|
+
export type InternalTicketActivityDataMap = {
|
|
77
|
+
[InternalTicketActivityType.STATUS_CHANGED]: IStatusChangedActivityData;
|
|
78
|
+
[InternalTicketActivityType.PRIORITY_CHANGED]: IPriorityChangedActivityData;
|
|
79
|
+
[InternalTicketActivityType.PRIORITY_CONFIRMED]: IPriorityConfirmedActivityData;
|
|
80
|
+
[InternalTicketActivityType.CATEGORY_CHANGED]: ICategoryChangedActivityData;
|
|
81
|
+
[InternalTicketActivityType.SECTION_CHANGED]: ISectionChangedActivityData;
|
|
82
|
+
[InternalTicketActivityType.ASSIGNED]: IAssignedActivityData;
|
|
83
|
+
[InternalTicketActivityType.UNASSIGNED]: IUnassignedActivityData;
|
|
84
|
+
[InternalTicketActivityType.MESSAGE_ADDED]: IMessageAddedActivityData;
|
|
85
|
+
[InternalTicketActivityType.ATTACHMENT_ADDED]: IAttachmentAddedActivityData;
|
|
86
|
+
[InternalTicketActivityType.ATTACHMENT_REMOVED]: IAttachmentRemovedActivityData;
|
|
87
|
+
[InternalTicketActivityType.ARCHIVED]: IArchivedActivityData;
|
|
88
|
+
[InternalTicketActivityType.UNARCHIVED]: IUnarchivedActivityData;
|
|
89
|
+
[InternalTicketActivityType.BOARD_CARD_CREATED]: IBoardCardCreatedActivityData;
|
|
90
|
+
[InternalTicketActivityType.FOLLOWER_ADDED]: IFollowerAddedActivityData;
|
|
91
|
+
[InternalTicketActivityType.FOLLOWER_REMOVED]: IFollowerRemovedActivityData;
|
|
92
|
+
[InternalTicketActivityType.TAG_ADDED]: ITagAddedActivityData;
|
|
93
|
+
[InternalTicketActivityType.TAG_REMOVED]: ITagRemovedActivityData;
|
|
94
|
+
[InternalTicketActivityType.ARTIFACT_ADDED]: IArtifactAddedActivityData;
|
|
95
|
+
[InternalTicketActivityType.ARTIFACT_REMOVED]: IArtifactRemovedActivityData;
|
|
96
|
+
};
|
|
97
|
+
export type InternalTicketActivityData = InternalTicketActivityDataMap[InternalTicketActivityType];
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { HttpMethod, WorkflowActionType } from '../enum';
|
|
1
|
+
import { HttpMethod, WorkflowActionType, WorkflowTriggerType, InternalTicketActivityType } from '../enum';
|
|
2
|
+
import { InternalTicketActivityData } from './internal-ticket-activity.dto';
|
|
2
3
|
export interface IUserRegistrationWorkflowTriggerData {
|
|
3
4
|
userId: string;
|
|
4
5
|
email: string;
|
|
@@ -114,18 +115,22 @@ export interface IShortLinkRenewWorkflowTriggerData {
|
|
|
114
115
|
export interface IInternalTicketCreateWorkflowTriggerData {
|
|
115
116
|
ticketId: string;
|
|
116
117
|
title: string;
|
|
118
|
+
description?: string;
|
|
119
|
+
status: string;
|
|
117
120
|
sectionId: string;
|
|
118
121
|
sectionName: string;
|
|
119
122
|
creatorUserId: string;
|
|
120
123
|
projectId: string;
|
|
121
124
|
priority?: string;
|
|
122
125
|
category?: string;
|
|
126
|
+
tags?: string[];
|
|
123
127
|
createdAt: string;
|
|
124
128
|
}
|
|
125
129
|
export interface IInternalTicketDeleteWorkflowTriggerData {
|
|
126
130
|
ticketId: string;
|
|
127
131
|
title: string;
|
|
128
132
|
sectionId: string;
|
|
133
|
+
sectionName: string;
|
|
129
134
|
deletedByUserId: string;
|
|
130
135
|
projectId: string;
|
|
131
136
|
deletedAt: string;
|
|
@@ -134,53 +139,116 @@ export interface IInternalTicketStatusChangeWorkflowTriggerData {
|
|
|
134
139
|
ticketId: string;
|
|
135
140
|
title: string;
|
|
136
141
|
sectionId: string;
|
|
142
|
+
sectionName: string;
|
|
137
143
|
fromStatus: string;
|
|
138
144
|
toStatus: string;
|
|
139
145
|
reason?: string;
|
|
140
146
|
changedByUserId: string;
|
|
141
147
|
projectId: string;
|
|
148
|
+
priority?: string;
|
|
149
|
+
category?: string;
|
|
150
|
+
tags?: string[];
|
|
142
151
|
changedAt: string;
|
|
143
152
|
}
|
|
144
153
|
export interface IInternalTicketMessageWorkflowTriggerData {
|
|
145
154
|
ticketId: string;
|
|
146
155
|
title: string;
|
|
147
156
|
sectionId: string;
|
|
157
|
+
sectionName: string;
|
|
148
158
|
messageId: string;
|
|
149
159
|
messagePreview: string;
|
|
150
160
|
authorUserId: string;
|
|
151
161
|
mentionedUserIds: string[];
|
|
162
|
+
replyToMessageId?: string;
|
|
163
|
+
replyToAuthorUserId?: string;
|
|
152
164
|
projectId: string;
|
|
165
|
+
status: string;
|
|
153
166
|
createdAt: string;
|
|
154
167
|
}
|
|
155
168
|
export interface IInternalTicketAssignWorkflowTriggerData {
|
|
156
169
|
ticketId: string;
|
|
157
170
|
title: string;
|
|
158
171
|
sectionId: string;
|
|
172
|
+
sectionName: string;
|
|
159
173
|
assignedUserId: string;
|
|
160
174
|
assignedByUserId: string;
|
|
161
175
|
projectId: string;
|
|
176
|
+
status: string;
|
|
177
|
+
priority?: string;
|
|
178
|
+
category?: string;
|
|
179
|
+
tags?: string[];
|
|
162
180
|
assignedAt: string;
|
|
163
181
|
}
|
|
164
182
|
export interface IInternalTicketUnassignWorkflowTriggerData {
|
|
165
183
|
ticketId: string;
|
|
166
184
|
title: string;
|
|
167
185
|
sectionId: string;
|
|
186
|
+
sectionName: string;
|
|
168
187
|
unassignedUserId: string;
|
|
169
188
|
unassignedByUserId: string;
|
|
170
189
|
projectId: string;
|
|
190
|
+
status: string;
|
|
191
|
+
priority?: string;
|
|
192
|
+
category?: string;
|
|
193
|
+
tags?: string[];
|
|
171
194
|
unassignedAt: string;
|
|
172
195
|
}
|
|
173
196
|
export interface IInternalTicketActivityWorkflowTriggerData {
|
|
174
197
|
ticketId: string;
|
|
175
198
|
title: string;
|
|
176
199
|
sectionId: string;
|
|
177
|
-
|
|
200
|
+
sectionName: string;
|
|
201
|
+
activityType: InternalTicketActivityType;
|
|
178
202
|
userId: string;
|
|
179
203
|
projectId: string;
|
|
180
|
-
|
|
204
|
+
status: string;
|
|
205
|
+
priority?: string;
|
|
206
|
+
category?: string;
|
|
207
|
+
tags?: string[];
|
|
208
|
+
data?: InternalTicketActivityData;
|
|
181
209
|
createdAt: string;
|
|
182
210
|
}
|
|
183
|
-
export
|
|
211
|
+
export interface IInternalTicketMessageReplyWorkflowTriggerData {
|
|
212
|
+
ticketId: string;
|
|
213
|
+
title: string;
|
|
214
|
+
sectionId: string;
|
|
215
|
+
sectionName: string;
|
|
216
|
+
messageId: string;
|
|
217
|
+
messagePreview: string;
|
|
218
|
+
authorUserId: string;
|
|
219
|
+
replyToMessageId: string;
|
|
220
|
+
replyToAuthorUserId: string;
|
|
221
|
+
projectId: string;
|
|
222
|
+
status: string;
|
|
223
|
+
createdAt: string;
|
|
224
|
+
}
|
|
225
|
+
export type WorkflowTriggerData = IUserRegistrationWorkflowTriggerData | IWebhookWorkflowTriggerData | IUserJoinProjectWorkflowTriggerData | IUserLeaveProjectWorkflowTriggerData | IUserInviteProjectWorkflowTriggerData | IUserDeclineProjectWorkflowTriggerData | IFormSubmissionWorkflowTriggerData | IShortLinkClickWorkflowTriggerData | IFormCreateWorkflowTriggerData | IFormUpdateWorkflowTriggerData | IFormDeleteWorkflowTriggerData | IShortLinkCreateWorkflowTriggerData | IShortLinkUpdateWorkflowTriggerData | IShortLinkDeleteWorkflowTriggerData | IShortLinkRenewWorkflowTriggerData | IInternalTicketCreateWorkflowTriggerData | IInternalTicketDeleteWorkflowTriggerData | IInternalTicketStatusChangeWorkflowTriggerData | IInternalTicketMessageWorkflowTriggerData | IInternalTicketAssignWorkflowTriggerData | IInternalTicketUnassignWorkflowTriggerData | IInternalTicketActivityWorkflowTriggerData | IInternalTicketMessageReplyWorkflowTriggerData | Record<string, any>;
|
|
226
|
+
export type WorkflowTriggerDataMap = {
|
|
227
|
+
[WorkflowTriggerType.USER_REGISTRATION]: IUserRegistrationWorkflowTriggerData;
|
|
228
|
+
[WorkflowTriggerType.WEBHOOK]: IWebhookWorkflowTriggerData;
|
|
229
|
+
[WorkflowTriggerType.MANUAL]: Record<string, any>;
|
|
230
|
+
[WorkflowTriggerType.USER_JOIN_PROJECT]: IUserJoinProjectWorkflowTriggerData;
|
|
231
|
+
[WorkflowTriggerType.USER_LEAVE_PROJECT]: IUserLeaveProjectWorkflowTriggerData;
|
|
232
|
+
[WorkflowTriggerType.USER_INVITE_PROJECT]: IUserInviteProjectWorkflowTriggerData;
|
|
233
|
+
[WorkflowTriggerType.USER_DECLINE_PROJECT]: IUserDeclineProjectWorkflowTriggerData;
|
|
234
|
+
[WorkflowTriggerType.FORM_SUBMISSION]: IFormSubmissionWorkflowTriggerData;
|
|
235
|
+
[WorkflowTriggerType.FORM_CREATE]: IFormCreateWorkflowTriggerData;
|
|
236
|
+
[WorkflowTriggerType.FORM_UPDATE]: IFormUpdateWorkflowTriggerData;
|
|
237
|
+
[WorkflowTriggerType.FORM_DELETE]: IFormDeleteWorkflowTriggerData;
|
|
238
|
+
[WorkflowTriggerType.SHORT_LINK_CREATE]: IShortLinkCreateWorkflowTriggerData;
|
|
239
|
+
[WorkflowTriggerType.SHORT_LINK_UPDATE]: IShortLinkUpdateWorkflowTriggerData;
|
|
240
|
+
[WorkflowTriggerType.SHORT_LINK_DELETE]: IShortLinkDeleteWorkflowTriggerData;
|
|
241
|
+
[WorkflowTriggerType.SHORT_LINK_RENEW]: IShortLinkRenewWorkflowTriggerData;
|
|
242
|
+
[WorkflowTriggerType.SHORT_LINK_CLICK]: IShortLinkClickWorkflowTriggerData;
|
|
243
|
+
[WorkflowTriggerType.INTERNAL_TICKET_CREATE]: IInternalTicketCreateWorkflowTriggerData;
|
|
244
|
+
[WorkflowTriggerType.INTERNAL_TICKET_DELETE]: IInternalTicketDeleteWorkflowTriggerData;
|
|
245
|
+
[WorkflowTriggerType.INTERNAL_TICKET_STATUS_CHANGE]: IInternalTicketStatusChangeWorkflowTriggerData;
|
|
246
|
+
[WorkflowTriggerType.INTERNAL_TICKET_MESSAGE]: IInternalTicketMessageWorkflowTriggerData;
|
|
247
|
+
[WorkflowTriggerType.INTERNAL_TICKET_ASSIGN]: IInternalTicketAssignWorkflowTriggerData;
|
|
248
|
+
[WorkflowTriggerType.INTERNAL_TICKET_UNASSIGN]: IInternalTicketUnassignWorkflowTriggerData;
|
|
249
|
+
[WorkflowTriggerType.INTERNAL_TICKET_ACTIVITY]: IInternalTicketActivityWorkflowTriggerData;
|
|
250
|
+
[WorkflowTriggerType.INTERNAL_TICKET_MESSAGE_REPLY]: IInternalTicketMessageReplyWorkflowTriggerData;
|
|
251
|
+
};
|
|
184
252
|
export interface IFilterStepOutputData {
|
|
185
253
|
passed: boolean;
|
|
186
254
|
reason?: string;
|
|
@@ -209,7 +277,29 @@ export interface ICodeStepOutputData {
|
|
|
209
277
|
result?: unknown;
|
|
210
278
|
error?: string;
|
|
211
279
|
}
|
|
212
|
-
export
|
|
280
|
+
export interface ISendSlackMessageStepOutputData {
|
|
281
|
+
sent: boolean;
|
|
282
|
+
channelId?: string;
|
|
283
|
+
ts?: string;
|
|
284
|
+
error?: string;
|
|
285
|
+
}
|
|
286
|
+
export interface ISendDiscordMessageStepOutputData {
|
|
287
|
+
sent: boolean;
|
|
288
|
+
channelId?: string;
|
|
289
|
+
messageId?: string;
|
|
290
|
+
error?: string;
|
|
291
|
+
}
|
|
292
|
+
export interface ISendSlackWebhookStepOutputData {
|
|
293
|
+
sent: boolean;
|
|
294
|
+
statusCode?: number;
|
|
295
|
+
error?: string;
|
|
296
|
+
}
|
|
297
|
+
export interface ISendDiscordWebhookStepOutputData {
|
|
298
|
+
sent: boolean;
|
|
299
|
+
statusCode?: number;
|
|
300
|
+
error?: string;
|
|
301
|
+
}
|
|
302
|
+
export type StepOutputData = IFilterStepOutputData | ISleepStepOutputData | ISwitchStepOutputData | ICallWebhookStepOutputData | IInviteToProjectStepOutputData | ICodeStepOutputData | ISendSlackMessageStepOutputData | ISendDiscordMessageStepOutputData | ISendSlackWebhookStepOutputData | ISendDiscordWebhookStepOutputData | Record<string, unknown>;
|
|
213
303
|
export interface IFilterStepConfig {
|
|
214
304
|
expression: string;
|
|
215
305
|
}
|
|
@@ -245,7 +335,85 @@ export interface ITriggerWorkflowActionConfig {
|
|
|
245
335
|
workflowTriggerId: string;
|
|
246
336
|
body?: Record<string, any> | string;
|
|
247
337
|
}
|
|
248
|
-
export
|
|
338
|
+
export interface ISendSlackMessageActionConfig {
|
|
339
|
+
actionType: WorkflowActionType.SEND_SLACK_MESSAGE;
|
|
340
|
+
target: 'dm' | 'channel';
|
|
341
|
+
channelId?: string;
|
|
342
|
+
userId?: string;
|
|
343
|
+
message: string;
|
|
344
|
+
embeds?: ISlackWebhookEmbed[];
|
|
345
|
+
}
|
|
346
|
+
export interface ISendDiscordMessageActionConfig {
|
|
347
|
+
actionType: WorkflowActionType.SEND_DISCORD_MESSAGE;
|
|
348
|
+
target: 'dm' | 'channel';
|
|
349
|
+
channelId?: string;
|
|
350
|
+
userId?: string;
|
|
351
|
+
message: string;
|
|
352
|
+
embeds?: IDiscordWebhookEmbed[];
|
|
353
|
+
}
|
|
354
|
+
export interface ISlackWebhookEmbed {
|
|
355
|
+
fallback?: string;
|
|
356
|
+
color?: string;
|
|
357
|
+
author_name?: string;
|
|
358
|
+
author_link?: string;
|
|
359
|
+
author_icon?: string;
|
|
360
|
+
title?: string;
|
|
361
|
+
title_link?: string;
|
|
362
|
+
text?: string;
|
|
363
|
+
fields?: Array<{
|
|
364
|
+
title: string;
|
|
365
|
+
value: string;
|
|
366
|
+
short?: boolean;
|
|
367
|
+
}>;
|
|
368
|
+
image_url?: string;
|
|
369
|
+
thumb_url?: string;
|
|
370
|
+
footer?: string;
|
|
371
|
+
footer_icon?: string;
|
|
372
|
+
}
|
|
373
|
+
export interface ISendSlackWebhookActionConfig {
|
|
374
|
+
actionType: WorkflowActionType.SEND_SLACK_WEBHOOK;
|
|
375
|
+
webhookUrl: string;
|
|
376
|
+
message?: string;
|
|
377
|
+
embeds?: ISlackWebhookEmbed[];
|
|
378
|
+
username?: string;
|
|
379
|
+
icon_url?: string;
|
|
380
|
+
}
|
|
381
|
+
export interface IDiscordWebhookEmbed {
|
|
382
|
+
title?: string;
|
|
383
|
+
description?: string;
|
|
384
|
+
url?: string;
|
|
385
|
+
color?: number;
|
|
386
|
+
timestamp?: string;
|
|
387
|
+
footer?: {
|
|
388
|
+
text: string;
|
|
389
|
+
icon_url?: string;
|
|
390
|
+
};
|
|
391
|
+
thumbnail?: {
|
|
392
|
+
url: string;
|
|
393
|
+
};
|
|
394
|
+
image?: {
|
|
395
|
+
url: string;
|
|
396
|
+
};
|
|
397
|
+
author?: {
|
|
398
|
+
name: string;
|
|
399
|
+
url?: string;
|
|
400
|
+
icon_url?: string;
|
|
401
|
+
};
|
|
402
|
+
fields?: Array<{
|
|
403
|
+
name: string;
|
|
404
|
+
value: string;
|
|
405
|
+
inline?: boolean;
|
|
406
|
+
}>;
|
|
407
|
+
}
|
|
408
|
+
export interface ISendDiscordWebhookActionConfig {
|
|
409
|
+
actionType: WorkflowActionType.SEND_DISCORD_WEBHOOK;
|
|
410
|
+
webhookUrl: string;
|
|
411
|
+
message?: string;
|
|
412
|
+
embeds?: IDiscordWebhookEmbed[];
|
|
413
|
+
username?: string;
|
|
414
|
+
avatar_url?: string;
|
|
415
|
+
}
|
|
416
|
+
export type IActionStepConfig = ICallWebhookActionConfig | IInviteToProjectActionConfig | ITriggerWorkflowActionConfig | ISendSlackMessageActionConfig | ISendDiscordMessageActionConfig | ISendSlackWebhookActionConfig | ISendDiscordWebhookActionConfig;
|
|
249
417
|
export type StepConfig = IFilterStepConfig | ISleepStepConfig | ISwitchStepConfig | ICodeStepConfig | IActionStepConfig;
|
|
250
418
|
export interface IWorkflowSettings {
|
|
251
419
|
maxExecutionsPerHour?: number;
|
|
@@ -27,7 +27,8 @@ export declare enum WorkflowTriggerType {
|
|
|
27
27
|
INTERNAL_TICKET_MESSAGE = "INTERNAL_TICKET_MESSAGE",
|
|
28
28
|
INTERNAL_TICKET_ASSIGN = "INTERNAL_TICKET_ASSIGN",
|
|
29
29
|
INTERNAL_TICKET_UNASSIGN = "INTERNAL_TICKET_UNASSIGN",
|
|
30
|
-
INTERNAL_TICKET_ACTIVITY = "INTERNAL_TICKET_ACTIVITY"
|
|
30
|
+
INTERNAL_TICKET_ACTIVITY = "INTERNAL_TICKET_ACTIVITY",
|
|
31
|
+
INTERNAL_TICKET_MESSAGE_REPLY = "INTERNAL_TICKET_MESSAGE_REPLY"
|
|
31
32
|
}
|
|
32
33
|
export declare enum WorkflowTemplate {
|
|
33
34
|
AUTO_INVITE_BY_DOMAIN = "AUTO_INVITE_BY_DOMAIN"
|
|
@@ -42,7 +43,11 @@ export declare enum WorkflowStepType {
|
|
|
42
43
|
export declare enum WorkflowActionType {
|
|
43
44
|
CALL_WEBHOOK = "CALL_WEBHOOK",
|
|
44
45
|
INVITE_TO_PROJECT = "INVITE_TO_PROJECT",
|
|
45
|
-
TRIGGER_WORKFLOW = "TRIGGER_WORKFLOW"
|
|
46
|
+
TRIGGER_WORKFLOW = "TRIGGER_WORKFLOW",
|
|
47
|
+
SEND_SLACK_MESSAGE = "SEND_SLACK_MESSAGE",
|
|
48
|
+
SEND_DISCORD_MESSAGE = "SEND_DISCORD_MESSAGE",
|
|
49
|
+
SEND_SLACK_WEBHOOK = "SEND_SLACK_WEBHOOK",
|
|
50
|
+
SEND_DISCORD_WEBHOOK = "SEND_DISCORD_WEBHOOK"
|
|
46
51
|
}
|
|
47
52
|
export declare enum WorkflowStepStatus {
|
|
48
53
|
PENDING = "PENDING",
|
|
@@ -33,6 +33,7 @@ var WorkflowTriggerType;
|
|
|
33
33
|
WorkflowTriggerType["INTERNAL_TICKET_ASSIGN"] = "INTERNAL_TICKET_ASSIGN";
|
|
34
34
|
WorkflowTriggerType["INTERNAL_TICKET_UNASSIGN"] = "INTERNAL_TICKET_UNASSIGN";
|
|
35
35
|
WorkflowTriggerType["INTERNAL_TICKET_ACTIVITY"] = "INTERNAL_TICKET_ACTIVITY";
|
|
36
|
+
WorkflowTriggerType["INTERNAL_TICKET_MESSAGE_REPLY"] = "INTERNAL_TICKET_MESSAGE_REPLY";
|
|
36
37
|
})(WorkflowTriggerType || (exports.WorkflowTriggerType = WorkflowTriggerType = {}));
|
|
37
38
|
var WorkflowTemplate;
|
|
38
39
|
(function (WorkflowTemplate) {
|
|
@@ -51,6 +52,10 @@ var WorkflowActionType;
|
|
|
51
52
|
WorkflowActionType["CALL_WEBHOOK"] = "CALL_WEBHOOK";
|
|
52
53
|
WorkflowActionType["INVITE_TO_PROJECT"] = "INVITE_TO_PROJECT";
|
|
53
54
|
WorkflowActionType["TRIGGER_WORKFLOW"] = "TRIGGER_WORKFLOW";
|
|
55
|
+
WorkflowActionType["SEND_SLACK_MESSAGE"] = "SEND_SLACK_MESSAGE";
|
|
56
|
+
WorkflowActionType["SEND_DISCORD_MESSAGE"] = "SEND_DISCORD_MESSAGE";
|
|
57
|
+
WorkflowActionType["SEND_SLACK_WEBHOOK"] = "SEND_SLACK_WEBHOOK";
|
|
58
|
+
WorkflowActionType["SEND_DISCORD_WEBHOOK"] = "SEND_DISCORD_WEBHOOK";
|
|
54
59
|
})(WorkflowActionType || (exports.WorkflowActionType = WorkflowActionType = {}));
|
|
55
60
|
var WorkflowStepStatus;
|
|
56
61
|
(function (WorkflowStepStatus) {
|
|
@@ -10,6 +10,11 @@ export interface ICreateInternalTicketBody {
|
|
|
10
10
|
internalTicketPriorityId: string;
|
|
11
11
|
internalTicketCategoryId?: string;
|
|
12
12
|
priorityReason?: string;
|
|
13
|
+
tagIds?: string[];
|
|
14
|
+
artifacts?: {
|
|
15
|
+
label: string;
|
|
16
|
+
value: string;
|
|
17
|
+
}[];
|
|
13
18
|
}
|
|
14
19
|
export interface IPaginateInternalTicketParams {
|
|
15
20
|
projectId: string;
|
|
@@ -131,6 +136,11 @@ export interface IDeleteInternalTicketAttachmentParams {
|
|
|
131
136
|
internalTicketId: string;
|
|
132
137
|
internalTicketAttachmentId: string;
|
|
133
138
|
}
|
|
139
|
+
export interface IGetInternalTicketAttachmentDownloadUrlParams {
|
|
140
|
+
projectId: string;
|
|
141
|
+
internalTicketId: string;
|
|
142
|
+
internalTicketAttachmentId: string;
|
|
143
|
+
}
|
|
134
144
|
export interface IPaginateInternalTicketActivityParams {
|
|
135
145
|
projectId: string;
|
|
136
146
|
internalTicketId: string;
|
|
@@ -208,6 +218,15 @@ export interface IRemoveInternalTicketArtifactParams {
|
|
|
208
218
|
internalTicketId: string;
|
|
209
219
|
internalTicketArtifactId: string;
|
|
210
220
|
}
|
|
221
|
+
export interface IUpdateInternalTicketArtifactParams {
|
|
222
|
+
projectId: string;
|
|
223
|
+
internalTicketId: string;
|
|
224
|
+
internalTicketArtifactId: string;
|
|
225
|
+
}
|
|
226
|
+
export interface IUpdateInternalTicketArtifactBody {
|
|
227
|
+
label?: string;
|
|
228
|
+
value?: string;
|
|
229
|
+
}
|
|
211
230
|
export interface IListInternalTicketArtifactParams {
|
|
212
231
|
projectId: string;
|
|
213
232
|
internalTicketId: string;
|
|
@@ -15,7 +15,7 @@ export interface IPaginateWorkflowParams {
|
|
|
15
15
|
projectId: string;
|
|
16
16
|
}
|
|
17
17
|
export interface IPaginateWorkflowQuery extends QueryPaginate {
|
|
18
|
-
status?: WorkflowStatus;
|
|
18
|
+
status?: WorkflowStatus | WorkflowStatus[];
|
|
19
19
|
search?: string;
|
|
20
20
|
orderBy?: 'name' | 'createdAt' | 'updatedAt' | 'status';
|
|
21
21
|
orderDirection?: 'ASC' | 'DESC';
|
|
@@ -156,6 +156,13 @@ export interface IGetTimeSeriesWorkflowExecutionQuery {
|
|
|
156
156
|
period: 'minute' | 'hour' | 'day' | 'week' | 'month';
|
|
157
157
|
days: number;
|
|
158
158
|
}
|
|
159
|
+
export interface IGetProjectWorkflowAnalyticsParams {
|
|
160
|
+
projectId: string;
|
|
161
|
+
}
|
|
162
|
+
export interface IGetProjectWorkflowAnalyticsQuery {
|
|
163
|
+
period: 'minute' | 'hour' | 'day' | 'week' | 'month';
|
|
164
|
+
days: number;
|
|
165
|
+
}
|
|
159
166
|
export interface ICreateWorkflowTriggerParams {
|
|
160
167
|
projectId: string;
|
|
161
168
|
workflowId: string;
|
|
@@ -5,6 +5,7 @@ import { IInternalTicketMessageReaction } from '../../models/internal-ticket-mes
|
|
|
5
5
|
import { IInternalTicketActivity } from '../../models/internal-ticket-activity.model';
|
|
6
6
|
import { IInternalTicketFollower } from '../../models/internal-ticket-follower.model';
|
|
7
7
|
import { IInternalTicketTicketTag } from '../../models/internal-ticket-ticket-tag.model';
|
|
8
|
+
import { IInternalTicketAttachment } from '../../models/internal-ticket-attachment.model';
|
|
8
9
|
import { IInternalTicketArtifact } from '../../models/internal-ticket-artifact.model';
|
|
9
10
|
import { IResponse } from '../type-message/response';
|
|
10
11
|
import { BasePaginate } from '../type-message/base-paginate';
|
|
@@ -60,6 +61,11 @@ export type ICreateInternalTicketAttachmentResponse = IResponse<ICreateInternalT
|
|
|
60
61
|
export interface IDeleteInternalTicketAttachmentData {
|
|
61
62
|
}
|
|
62
63
|
export type IDeleteInternalTicketAttachmentResponse = IResponse<IDeleteInternalTicketAttachmentData>;
|
|
64
|
+
export interface IGetInternalTicketAttachmentDownloadUrlData {
|
|
65
|
+
downloadUrl: string;
|
|
66
|
+
expireAt: number;
|
|
67
|
+
}
|
|
68
|
+
export type IGetInternalTicketAttachmentDownloadUrlResponse = IResponse<IGetInternalTicketAttachmentDownloadUrlData>;
|
|
63
69
|
export type IPaginateInternalTicketActivityResponse = IResponse<BasePaginate<IInternalTicketActivity>>;
|
|
64
70
|
export interface IFollowInternalTicketData {
|
|
65
71
|
internalTicketFollower: IInternalTicketFollower;
|
|
@@ -99,8 +105,10 @@ export interface IInternalTicketSSEPayloadInput {
|
|
|
99
105
|
internalTicketFollower?: IInternalTicketFollower;
|
|
100
106
|
internalTicketActivity?: IInternalTicketActivity;
|
|
101
107
|
internalTicketTicketTag?: IInternalTicketTicketTag;
|
|
108
|
+
internalTicketAttachment?: IInternalTicketAttachment;
|
|
102
109
|
internalTicketArtifact?: IInternalTicketArtifact;
|
|
103
110
|
assigneeUserId?: string;
|
|
111
|
+
internalTicketMessageId?: string | null;
|
|
104
112
|
}
|
|
105
113
|
export interface IInternalTicketSSEPayload extends IInternalTicketSSEPayloadInput {
|
|
106
114
|
timestamp: string;
|
|
@@ -138,6 +146,10 @@ export type IAddInternalTicketArtifactResponse = IResponse<IAddInternalTicketArt
|
|
|
138
146
|
export interface IRemoveInternalTicketArtifactData {
|
|
139
147
|
}
|
|
140
148
|
export type IRemoveInternalTicketArtifactResponse = IResponse<IRemoveInternalTicketArtifactData>;
|
|
149
|
+
export interface IUpdateInternalTicketArtifactData {
|
|
150
|
+
internalTicketArtifact: IInternalTicketArtifact;
|
|
151
|
+
}
|
|
152
|
+
export type IUpdateInternalTicketArtifactResponse = IResponse<IUpdateInternalTicketArtifactData>;
|
|
141
153
|
export interface IListInternalTicketArtifactData {
|
|
142
154
|
internalTicketArtifacts: IInternalTicketArtifact[];
|
|
143
155
|
}
|
|
@@ -90,6 +90,24 @@ export interface IGetTimeSeriesWorkflowExecutionData {
|
|
|
90
90
|
timeSeries: IWorkflowExecutionTimeSeriesBucket[];
|
|
91
91
|
}
|
|
92
92
|
export type IGetTimeSeriesWorkflowExecutionResponse = IResponse<IGetTimeSeriesWorkflowExecutionData>;
|
|
93
|
+
export interface IProjectWorkflowAnalyticsPerWorkflow {
|
|
94
|
+
workflowId: string;
|
|
95
|
+
workflowName: string;
|
|
96
|
+
total: number;
|
|
97
|
+
completed: number;
|
|
98
|
+
failed: number;
|
|
99
|
+
cancelled: number;
|
|
100
|
+
avgDurationMs: number | null;
|
|
101
|
+
successRate: number | null;
|
|
102
|
+
}
|
|
103
|
+
export interface IGetProjectWorkflowAnalyticsData {
|
|
104
|
+
stats: IWorkflowExecutionStats;
|
|
105
|
+
timeSeries: IWorkflowExecutionTimeSeriesBucket[];
|
|
106
|
+
perWorkflow: IProjectWorkflowAnalyticsPerWorkflow[];
|
|
107
|
+
totalWorkflows: number;
|
|
108
|
+
activeWorkflows: number;
|
|
109
|
+
}
|
|
110
|
+
export type IGetProjectWorkflowAnalyticsResponse = IResponse<IGetProjectWorkflowAnalyticsData>;
|
|
93
111
|
export interface ICreateWorkflowTriggerData {
|
|
94
112
|
workflowTrigger: IWorkflowTrigger;
|
|
95
113
|
}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { InternalTicketActivityType } from '../../enum';
|
|
2
|
+
import { InternalTicketActivityDataMap } from '../../dto';
|
|
2
3
|
import { IInternalTicket } from './internal-ticket.model';
|
|
3
|
-
export interface IInternalTicketActivity {
|
|
4
|
+
export interface IInternalTicketActivity<T extends InternalTicketActivityType = InternalTicketActivityType> {
|
|
4
5
|
id: string;
|
|
5
6
|
internalTicketId: string;
|
|
6
7
|
userId: string;
|
|
7
|
-
type:
|
|
8
|
-
data: Record<string, any>;
|
|
8
|
+
type: T;
|
|
9
|
+
data: T extends keyof InternalTicketActivityDataMap ? InternalTicketActivityDataMap[T] : Record<string, any>;
|
|
9
10
|
createdAt?: Date;
|
|
10
11
|
updatedAt?: Date;
|
|
11
12
|
internalTicket?: IInternalTicket;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
export type ArtifactRuleConditionType = 'ALWAYS' | 'TAG' | 'CATEGORY' | 'PRIORITY';
|
|
2
|
+
export type ArtifactRuleBehaviorType = 'REQUIRED' | 'SUGGESTED';
|
|
2
3
|
export interface IInternalTicketArtifactRule {
|
|
3
4
|
id: string;
|
|
4
5
|
internalTicketArtifactTypeId: string;
|
|
5
6
|
conditionType: ArtifactRuleConditionType;
|
|
6
7
|
conditionId: string | null;
|
|
8
|
+
behaviorType: ArtifactRuleBehaviorType;
|
|
7
9
|
createdAt?: Date;
|
|
8
10
|
updatedAt?: Date;
|
|
9
11
|
}
|
|
@@ -8,8 +8,9 @@ export interface IInternalTicketAttachment {
|
|
|
8
8
|
mimeType: string | null;
|
|
9
9
|
sizeOctet: number;
|
|
10
10
|
storageId: string;
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
thumbnailId: string | null;
|
|
12
|
+
thumbnailPublicAccessId: string | null;
|
|
13
|
+
thumbnailPublicAccessPassword: string | null;
|
|
13
14
|
userId: string;
|
|
14
15
|
createdAt?: Date;
|
|
15
16
|
updatedAt?: Date;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
export declare const WORKFLOW_FN_RATE_LIMIT_MAX_CALLS = 50;
|
|
2
|
+
export declare const WORKFLOW_FN_RATE_LIMIT_WINDOW_MS = 10000;
|
|
3
|
+
export declare const WORKFLOW_FN_CALL_TIMEOUT_MS = 5000;
|
|
4
|
+
export interface IWfnTicket {
|
|
5
|
+
id: string;
|
|
6
|
+
title: string;
|
|
7
|
+
description: string | null;
|
|
8
|
+
status: string;
|
|
9
|
+
sectionId: string;
|
|
10
|
+
sectionName: string;
|
|
11
|
+
priorityId: string | null;
|
|
12
|
+
priorityName: string | null;
|
|
13
|
+
categoryId: string | null;
|
|
14
|
+
categoryName: string | null;
|
|
15
|
+
creatorUserId: string;
|
|
16
|
+
assignedToUserId: string | null;
|
|
17
|
+
createdAt: string;
|
|
18
|
+
updatedAt: string;
|
|
19
|
+
resolvedAt: string | null;
|
|
20
|
+
closedAt: string | null;
|
|
21
|
+
archivedAt: string | null;
|
|
22
|
+
}
|
|
23
|
+
export interface IWfnTicketTag {
|
|
24
|
+
id: string;
|
|
25
|
+
name: string;
|
|
26
|
+
color: string | null;
|
|
27
|
+
}
|
|
28
|
+
export interface IWfnTicketArtifact {
|
|
29
|
+
id: string;
|
|
30
|
+
label: string;
|
|
31
|
+
value: string;
|
|
32
|
+
typeName: string | null;
|
|
33
|
+
}
|
|
34
|
+
export interface IWfnSection {
|
|
35
|
+
id: string;
|
|
36
|
+
name: string;
|
|
37
|
+
description: string | null;
|
|
38
|
+
color: string | null;
|
|
39
|
+
icon: string | null;
|
|
40
|
+
categories: {
|
|
41
|
+
id: string;
|
|
42
|
+
name: string;
|
|
43
|
+
color: string | null;
|
|
44
|
+
}[];
|
|
45
|
+
priorities: {
|
|
46
|
+
id: string;
|
|
47
|
+
name: string;
|
|
48
|
+
color: string | null;
|
|
49
|
+
}[];
|
|
50
|
+
tags: {
|
|
51
|
+
id: string;
|
|
52
|
+
name: string;
|
|
53
|
+
color: string | null;
|
|
54
|
+
}[];
|
|
55
|
+
}
|
|
56
|
+
export interface IWfnMember {
|
|
57
|
+
userId: string;
|
|
58
|
+
email: string;
|
|
59
|
+
alias: string;
|
|
60
|
+
name: string | null;
|
|
61
|
+
familyName: string | null;
|
|
62
|
+
permissions: string[];
|
|
63
|
+
}
|
|
64
|
+
export interface IWorkflowFunctionParam {
|
|
65
|
+
name: string;
|
|
66
|
+
type: string;
|
|
67
|
+
description: string;
|
|
68
|
+
optional?: boolean;
|
|
69
|
+
}
|
|
70
|
+
export interface IWorkflowFunctionDef {
|
|
71
|
+
name: string;
|
|
72
|
+
description: string;
|
|
73
|
+
parameters: IWorkflowFunctionParam[];
|
|
74
|
+
returnType: string;
|
|
75
|
+
}
|
|
76
|
+
export declare const WORKFLOW_FUNCTION_DEFS: IWorkflowFunctionDef[];
|
|
77
|
+
export type WorkflowFn = (...args: any[]) => Promise<unknown>;
|
|
78
|
+
export type WorkflowFnMap = Map<string, WorkflowFn>;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WORKFLOW_FUNCTION_DEFS = exports.WORKFLOW_FN_CALL_TIMEOUT_MS = exports.WORKFLOW_FN_RATE_LIMIT_WINDOW_MS = exports.WORKFLOW_FN_RATE_LIMIT_MAX_CALLS = void 0;
|
|
4
|
+
exports.WORKFLOW_FN_RATE_LIMIT_MAX_CALLS = 50;
|
|
5
|
+
exports.WORKFLOW_FN_RATE_LIMIT_WINDOW_MS = 10000;
|
|
6
|
+
exports.WORKFLOW_FN_CALL_TIMEOUT_MS = 5000;
|
|
7
|
+
exports.WORKFLOW_FUNCTION_DEFS = [
|
|
8
|
+
{
|
|
9
|
+
name: 'getTicket',
|
|
10
|
+
description: 'Get internal ticket data by ID (with section, priority, category)',
|
|
11
|
+
parameters: [{ name: 'ticketId', type: 'string', description: 'The ticket ID (UUID)' }],
|
|
12
|
+
returnType: 'IWfnTicket | null',
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
name: 'getTicketFollowers',
|
|
16
|
+
description: 'Get user IDs of all followers of a ticket',
|
|
17
|
+
parameters: [{ name: 'ticketId', type: 'string', description: 'The ticket ID (UUID)' }],
|
|
18
|
+
returnType: 'string[]',
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
name: 'getTicketAssignees',
|
|
22
|
+
description: 'Get user IDs of all assignees of a ticket',
|
|
23
|
+
parameters: [{ name: 'ticketId', type: 'string', description: 'The ticket ID (UUID)' }],
|
|
24
|
+
returnType: 'string[]',
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
name: 'getTicketTags',
|
|
28
|
+
description: 'Get tags attached to a ticket',
|
|
29
|
+
parameters: [{ name: 'ticketId', type: 'string', description: 'The ticket ID (UUID)' }],
|
|
30
|
+
returnType: 'IWfnTicketTag[]',
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
name: 'getTicketArtifacts',
|
|
34
|
+
description: 'Get artifacts (custom fields) of a ticket',
|
|
35
|
+
parameters: [{ name: 'ticketId', type: 'string', description: 'The ticket ID (UUID)' }],
|
|
36
|
+
returnType: 'IWfnTicketArtifact[]',
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
name: 'getSection',
|
|
40
|
+
description: 'Get a ticket section with its categories, priorities, and tags',
|
|
41
|
+
parameters: [{ name: 'sectionId', type: 'string', description: 'The section ID (UUID)' }],
|
|
42
|
+
returnType: 'IWfnSection | null',
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
name: 'getSectionTicketCount',
|
|
46
|
+
description: 'Count tickets in a section, optionally filtered by status',
|
|
47
|
+
parameters: [
|
|
48
|
+
{ name: 'sectionId', type: 'string', description: 'The section ID (UUID)' },
|
|
49
|
+
{ name: 'status', type: 'string', description: 'Optional status filter (e.g. "IN_PROGRESS")', optional: true },
|
|
50
|
+
],
|
|
51
|
+
returnType: 'number',
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
name: 'getProjectAdmins',
|
|
55
|
+
description: 'Get user IDs of all project admins (FULL_ACCESS permission)',
|
|
56
|
+
parameters: [],
|
|
57
|
+
returnType: 'string[]',
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
name: 'getProjectMembers',
|
|
61
|
+
description: 'Get all project members with their info',
|
|
62
|
+
parameters: [],
|
|
63
|
+
returnType: 'IWfnMember[]',
|
|
64
|
+
},
|
|
65
|
+
];
|
|
@@ -16,3 +16,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./resolver"), exports);
|
|
18
18
|
__exportStar(require("./types"), exports);
|
|
19
|
+
__exportStar(require("./functions"), exports);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IProject, IWorkflow, IWorkflowTrigger, IWorkflowStep, IWorkflowStepExecution, IWorkflowStepConnection, IWorkflowExecution, IIpAddress, IDomainVerification, ISecret, IVariable,
|
|
1
|
+
import type { IProject, IWorkflow, IWorkflowTrigger, IWorkflowStep, IWorkflowStepExecution, IWorkflowStepConnection, IWorkflowExecution, IIpAddress, IDomainVerification, ISecret, IVariable, WorkflowTriggerDataMap } from '../types';
|
|
2
2
|
export declare enum ExpressionMode {
|
|
3
3
|
EXPRESSION = "EXPRESSION",
|
|
4
4
|
TEMPLATE = "TEMPLATE",
|
|
@@ -13,21 +13,43 @@ export declare enum DataSourceType {
|
|
|
13
13
|
SECRETS = "secrets",
|
|
14
14
|
VARIABLES = "variables",
|
|
15
15
|
PROJECT = "project",
|
|
16
|
+
ORGANIZATION = "organization",
|
|
16
17
|
WORKFLOW = "workflow",
|
|
17
18
|
WORKFLOW_EXECUTION = "workflowExecutions",
|
|
18
19
|
STEP_EXECUTIONS = "stepExecutions",
|
|
19
20
|
STEPS = "steps",
|
|
20
21
|
CONNECTIONS = "connections",
|
|
21
|
-
ABYSS = "abyss"
|
|
22
|
+
ABYSS = "abyss",
|
|
23
|
+
MEMBERS = "members"
|
|
24
|
+
}
|
|
25
|
+
export interface IWorkflowOrganizationIntegration {
|
|
26
|
+
id: string;
|
|
27
|
+
type: string;
|
|
28
|
+
botToken: string;
|
|
29
|
+
teamId: string | null;
|
|
30
|
+
guildId: string | null;
|
|
31
|
+
scope: string[];
|
|
32
|
+
disabledAt: Date | null;
|
|
33
|
+
config: unknown;
|
|
34
|
+
}
|
|
35
|
+
export interface IWorkflowOrganization {
|
|
36
|
+
id: string;
|
|
37
|
+
name: string;
|
|
38
|
+
slug: string;
|
|
39
|
+
description: string | null;
|
|
40
|
+
}
|
|
41
|
+
export interface IWorkflowOrganizationAdmin {
|
|
42
|
+
organizationIntegrations: IWorkflowOrganizationIntegration[];
|
|
22
43
|
}
|
|
23
44
|
export interface WorkflowContext {
|
|
24
45
|
[DataSourceType.PROJECT]: Pick<IProject, 'id'> & {
|
|
25
46
|
name: string;
|
|
26
47
|
};
|
|
48
|
+
[DataSourceType.ORGANIZATION]: IWorkflowOrganization;
|
|
27
49
|
[DataSourceType.WORKFLOW]: Pick<IWorkflow, 'id' | 'name' | 'description' | 'template' | 'status' | 'settings'>;
|
|
28
50
|
[DataSourceType.WORKFLOW_EXECUTION]?: Pick<IWorkflowExecution, 'id' | 'status' | 'startedAt' | 'completedAt' | 'context' | 'metadata'>;
|
|
29
51
|
[DataSourceType.WORKFLOW_TRIGGER]: IWorkflowTrigger & {
|
|
30
|
-
data:
|
|
52
|
+
data: Partial<WorkflowTriggerDataMap>;
|
|
31
53
|
};
|
|
32
54
|
[DataSourceType.WORKFLOW_TRIGGERS]: Record<string, IWorkflowTrigger>;
|
|
33
55
|
[DataSourceType.STEP_EXECUTIONS]: Record<string, IWorkflowStepExecution>;
|
|
@@ -45,4 +67,21 @@ export interface WorkflowContext {
|
|
|
45
67
|
api: string;
|
|
46
68
|
site: string;
|
|
47
69
|
}>;
|
|
70
|
+
[DataSourceType.MEMBERS]: Record<string, IWorkflowMember>;
|
|
71
|
+
}
|
|
72
|
+
export interface WorkflowContextAdmin {
|
|
73
|
+
discordBotToken: string;
|
|
74
|
+
organization: IWorkflowOrganizationAdmin;
|
|
75
|
+
}
|
|
76
|
+
export interface IWorkflowMember {
|
|
77
|
+
userId: string;
|
|
78
|
+
email: string;
|
|
79
|
+
alias: string;
|
|
80
|
+
name: string | null;
|
|
81
|
+
familyName: string | null;
|
|
82
|
+
permissions: string[];
|
|
83
|
+
oauthProviders: {
|
|
84
|
+
type: number;
|
|
85
|
+
accountId: string;
|
|
86
|
+
}[];
|
|
48
87
|
}
|
|
@@ -17,10 +17,12 @@ var DataSourceType;
|
|
|
17
17
|
DataSourceType["SECRETS"] = "secrets";
|
|
18
18
|
DataSourceType["VARIABLES"] = "variables";
|
|
19
19
|
DataSourceType["PROJECT"] = "project";
|
|
20
|
+
DataSourceType["ORGANIZATION"] = "organization";
|
|
20
21
|
DataSourceType["WORKFLOW"] = "workflow";
|
|
21
22
|
DataSourceType["WORKFLOW_EXECUTION"] = "workflowExecutions";
|
|
22
23
|
DataSourceType["STEP_EXECUTIONS"] = "stepExecutions";
|
|
23
24
|
DataSourceType["STEPS"] = "steps";
|
|
24
25
|
DataSourceType["CONNECTIONS"] = "connections";
|
|
25
26
|
DataSourceType["ABYSS"] = "abyss";
|
|
27
|
+
DataSourceType["MEMBERS"] = "members";
|
|
26
28
|
})(DataSourceType || (exports.DataSourceType = DataSourceType = {}));
|