@ampsec/platform-client 25.2.0 → 25.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/src/dto/enums/category.d.ts +1 -0
- package/build/src/dto/enums/category.js +1 -0
- package/build/src/dto/enums/category.js.map +1 -1
- package/build/src/dto/enums/notification.status.d.ts +5 -0
- package/build/src/dto/enums/notification.status.js +11 -0
- package/build/src/dto/enums/notification.status.js.map +1 -0
- package/build/src/dto/enums/notificationStep.type.d.ts +4 -0
- package/build/src/dto/enums/notificationStep.type.js +10 -0
- package/build/src/dto/enums/notificationStep.type.js.map +1 -0
- package/build/src/dto/enums/workflowTrigger.type.d.ts +4 -0
- package/build/src/dto/enums/workflowTrigger.type.js +10 -0
- package/build/src/dto/enums/workflowTrigger.type.js.map +1 -0
- package/build/src/dto/index.d.ts +2 -0
- package/build/src/dto/index.js +2 -0
- package/build/src/dto/index.js.map +1 -1
- package/build/src/dto/notification.dto.d.ts +26 -0
- package/build/src/dto/notification.dto.js +3 -0
- package/build/src/dto/notification.dto.js.map +1 -0
- package/build/src/dto/platform/platform.notification.dto.d.ts +4 -0
- package/build/src/dto/platform/platform.notification.dto.js +3 -0
- package/build/src/dto/platform/platform.notification.dto.js.map +1 -0
- package/build/src/dto/platform/platform.workflow.dto.d.ts +4 -0
- package/build/src/dto/platform/platform.workflow.dto.js +3 -0
- package/build/src/dto/platform/platform.workflow.dto.js.map +1 -0
- package/build/src/dto/platform/platform.workflowAssignment.dto.d.ts +4 -0
- package/build/src/dto/platform/platform.workflowAssignment.dto.js +3 -0
- package/build/src/dto/platform/platform.workflowAssignment.dto.js.map +1 -0
- package/build/src/dto/workflow.dto.d.ts +68 -0
- package/build/src/dto/workflow.dto.js +3 -0
- package/build/src/dto/workflow.dto.js.map +1 -0
- package/build/src/dto/workflowAssignment.dto.d.ts +8 -0
- package/build/src/dto/workflowAssignment.dto.js +3 -0
- package/build/src/dto/workflowAssignment.dto.js.map +1 -0
- package/package.json +1 -1
- package/src/dto/enums/category.ts +1 -0
- package/src/dto/enums/notification.status.ts +6 -0
- package/src/dto/enums/notificationStep.type.ts +5 -0
- package/src/dto/enums/workflowTrigger.type.ts +5 -0
- package/src/dto/index.ts +2 -0
- package/src/dto/notification.dto.ts +29 -0
- package/src/dto/platform/platform.notification.dto.ts +6 -0
- package/src/dto/platform/platform.workflow.dto.ts +6 -0
- package/src/dto/platform/platform.workflowAssignment.dto.ts +6 -0
- package/src/dto/workflow.dto.ts +83 -0
- package/src/dto/workflowAssignment.dto.ts +10 -0
|
@@ -10,6 +10,7 @@ var Category;
|
|
|
10
10
|
*/
|
|
11
11
|
Category["MFA"] = "MFA";
|
|
12
12
|
Category["IDENTITY"] = "IDENTITY";
|
|
13
|
+
Category["NOTIFICATION"] = "NOTIFICATION";
|
|
13
14
|
Category["TRAINING"] = "TRAINING";
|
|
14
15
|
Category["WEB_GATEWAY"] = "WEB_GATEWAY";
|
|
15
16
|
})(Category || (exports.Category = Category = {}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"category.js","sourceRoot":"","sources":["../../../../src/dto/enums/category.ts"],"names":[],"mappings":";;;AAAA,mCAAmC;AACnC,IAAY,
|
|
1
|
+
{"version":3,"file":"category.js","sourceRoot":"","sources":["../../../../src/dto/enums/category.ts"],"names":[],"mappings":";;;AAAA,mCAAmC;AACnC,IAAY,QAUX;AAVD,WAAY,QAAQ;IAClB,uBAAW,CAAA;IACX;;OAEG;IACH,uBAAW,CAAA;IACX,iCAAqB,CAAA;IACrB,yCAA6B,CAAA;IAC7B,iCAAqB,CAAA;IACrB,uCAA2B,CAAA;AAC7B,CAAC,EAVW,QAAQ,wBAAR,QAAQ,QAUnB"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NotificationStatus = void 0;
|
|
4
|
+
/* eslint-disable no-unused-vars */
|
|
5
|
+
var NotificationStatus;
|
|
6
|
+
(function (NotificationStatus) {
|
|
7
|
+
NotificationStatus["PENDING"] = "PENDING";
|
|
8
|
+
NotificationStatus["READ"] = "READ";
|
|
9
|
+
NotificationStatus["SENT"] = "SENT";
|
|
10
|
+
})(NotificationStatus || (exports.NotificationStatus = NotificationStatus = {}));
|
|
11
|
+
//# sourceMappingURL=notification.status.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notification.status.js","sourceRoot":"","sources":["../../../../src/dto/enums/notification.status.ts"],"names":[],"mappings":";;;AAAA,mCAAmC;AACnC,IAAY,kBAIX;AAJD,WAAY,kBAAkB;IAC5B,yCAAmB,CAAA;IACnB,mCAAa,CAAA;IACb,mCAAa,CAAA;AACf,CAAC,EAJW,kBAAkB,kCAAlB,kBAAkB,QAI7B"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NotificationStepType = void 0;
|
|
4
|
+
/* eslint-disable no-unused-vars */
|
|
5
|
+
var NotificationStepType;
|
|
6
|
+
(function (NotificationStepType) {
|
|
7
|
+
NotificationStepType["NOTIFICATION"] = "NOTIFICATION";
|
|
8
|
+
NotificationStepType["PAUSE"] = "PAUSE";
|
|
9
|
+
})(NotificationStepType || (exports.NotificationStepType = NotificationStepType = {}));
|
|
10
|
+
//# sourceMappingURL=notificationStep.type.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notificationStep.type.js","sourceRoot":"","sources":["../../../../src/dto/enums/notificationStep.type.ts"],"names":[],"mappings":";;;AAAA,mCAAmC;AACnC,IAAY,oBAGX;AAHD,WAAY,oBAAoB;IAC9B,qDAA6B,CAAA;IAC7B,uCAAe,CAAA;AACjB,CAAC,EAHW,oBAAoB,oCAApB,oBAAoB,QAG/B"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WorkflowTriggerType = void 0;
|
|
4
|
+
/* eslint-disable no-unused-vars */
|
|
5
|
+
var WorkflowTriggerType;
|
|
6
|
+
(function (WorkflowTriggerType) {
|
|
7
|
+
WorkflowTriggerType["FINDING"] = "FINDING";
|
|
8
|
+
WorkflowTriggerType["USER"] = "USER";
|
|
9
|
+
})(WorkflowTriggerType || (exports.WorkflowTriggerType = WorkflowTriggerType = {}));
|
|
10
|
+
//# sourceMappingURL=workflowTrigger.type.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflowTrigger.type.js","sourceRoot":"","sources":["../../../../src/dto/enums/workflowTrigger.type.ts"],"names":[],"mappings":";;;AAAA,mCAAmC;AACnC,IAAY,mBAGX;AAHD,WAAY,mBAAmB;IAC7B,0CAAmB,CAAA;IACnB,oCAAa,CAAA;AACf,CAAC,EAHW,mBAAmB,mCAAnB,mBAAmB,QAG9B"}
|
package/build/src/dto/index.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ export * from './extKeyMap.dto';
|
|
|
9
9
|
export * from './findings.dto';
|
|
10
10
|
export * from './jwt';
|
|
11
11
|
export * from './message.dto';
|
|
12
|
+
export * from './notification.dto';
|
|
12
13
|
export * from './page.dto';
|
|
13
14
|
export * from './platform';
|
|
14
15
|
export * from './providers.dto';
|
|
@@ -20,3 +21,4 @@ export * from './saasUsers.dto';
|
|
|
20
21
|
export * from './ampSetting.dto';
|
|
21
22
|
export * from './tenants.dto';
|
|
22
23
|
export * from './users.dto';
|
|
24
|
+
export * from './workflow.dto';
|
package/build/src/dto/index.js
CHANGED
|
@@ -25,6 +25,7 @@ __exportStar(require("./extKeyMap.dto"), exports);
|
|
|
25
25
|
__exportStar(require("./findings.dto"), exports);
|
|
26
26
|
__exportStar(require("./jwt"), exports);
|
|
27
27
|
__exportStar(require("./message.dto"), exports);
|
|
28
|
+
__exportStar(require("./notification.dto"), exports);
|
|
28
29
|
__exportStar(require("./page.dto"), exports);
|
|
29
30
|
__exportStar(require("./platform"), exports);
|
|
30
31
|
__exportStar(require("./providers.dto"), exports);
|
|
@@ -36,4 +37,5 @@ __exportStar(require("./saasUsers.dto"), exports);
|
|
|
36
37
|
__exportStar(require("./ampSetting.dto"), exports);
|
|
37
38
|
__exportStar(require("./tenants.dto"), exports);
|
|
38
39
|
__exportStar(require("./users.dto"), exports);
|
|
40
|
+
__exportStar(require("./workflow.dto"), exports);
|
|
39
41
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/dto/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA6B;AAC7B,+CAA6B;AAC7B,8CAA4B;AAC5B,6CAA2B;AAC3B,mDAAiC;AACjC,6CAA2B;AAC3B,0CAAwB;AACxB,kDAAgC;AAChC,iDAA+B;AAC/B,wCAAsB;AACtB,gDAA8B;AAC9B,6CAA2B;AAC3B,6CAA2B;AAC3B,kDAAgC;AAChC,sDAAoC;AACpC,yDAAuC;AACvC,mDAAiC;AACjC,uDAAqC;AACrC,kDAAgC;AAChC,mDAAiC;AACjC,gDAA8B;AAC9B,8CAA4B"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/dto/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA6B;AAC7B,+CAA6B;AAC7B,8CAA4B;AAC5B,6CAA2B;AAC3B,mDAAiC;AACjC,6CAA2B;AAC3B,0CAAwB;AACxB,kDAAgC;AAChC,iDAA+B;AAC/B,wCAAsB;AACtB,gDAA8B;AAC9B,qDAAmC;AACnC,6CAA2B;AAC3B,6CAA2B;AAC3B,kDAAgC;AAChC,sDAAoC;AACpC,yDAAuC;AACvC,mDAAiC;AACjC,uDAAqC;AACrC,kDAAgC;AAChC,mDAAiC;AACjC,gDAA8B;AAC9B,8CAA4B;AAC5B,iDAA+B"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { BaseDto } from './base.dto';
|
|
2
|
+
export type NotificationAddress = {
|
|
3
|
+
/** Connector ID for the notification channel */
|
|
4
|
+
cid: string;
|
|
5
|
+
/** Group IDs to which the notification is being sent */
|
|
6
|
+
groups?: string[] | number[];
|
|
7
|
+
/** User IDs to which the notification is being sent */
|
|
8
|
+
users?: string[] | number[];
|
|
9
|
+
/** Webhook URLs to which the notification is being sent */
|
|
10
|
+
webhooks?: string[];
|
|
11
|
+
};
|
|
12
|
+
export type NotificationUpsertDto = {
|
|
13
|
+
/** Workflow ID for which the notification is being created */
|
|
14
|
+
wfid: string;
|
|
15
|
+
/** Finding ID for which the notification is being created */
|
|
16
|
+
fid?: string;
|
|
17
|
+
/** Recipient address to which the notification is being sent */
|
|
18
|
+
to: NotificationAddress;
|
|
19
|
+
/** ID of the template to use for the notification */
|
|
20
|
+
templateId: string;
|
|
21
|
+
/** ID o fthe user to which the notification is being sent */
|
|
22
|
+
uid: string;
|
|
23
|
+
/** Step number in the workflow for which the notification is being created */
|
|
24
|
+
stepNumber: number;
|
|
25
|
+
};
|
|
26
|
+
export type NotificationDto = NotificationUpsertDto & BaseDto;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notification.dto.js","sourceRoot":"","sources":["../../../src/dto/notification.dto.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { NotificationDto, NotificationUpsertDto } from '../notification.dto';
|
|
2
|
+
import { TenantBased } from './tenant.based.dto';
|
|
3
|
+
export type PlatformNotificationUpsertDto = NotificationUpsertDto & TenantBased;
|
|
4
|
+
export type PlatformNotificationDto = NotificationDto & TenantBased;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"platform.notification.dto.js","sourceRoot":"","sources":["../../../../src/dto/platform/platform.notification.dto.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"platform.workflow.dto.js","sourceRoot":"","sources":["../../../../src/dto/platform/platform.workflow.dto.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { WorkflowAssignmentUpsertDto } from '../workflowAssignment.dto';
|
|
2
|
+
import { TenantBased } from './tenant.based.dto';
|
|
3
|
+
export type PlatformWorkflowAssignmentUpsertDto = WorkflowAssignmentUpsertDto & TenantBased;
|
|
4
|
+
export type PlatformWorkflowAssignmentDto = PlatformWorkflowAssignmentUpsertDto & TenantBased;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"platform.workflowAssignment.dto.js","sourceRoot":"","sources":["../../../../src/dto/platform/platform.workflowAssignment.dto.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { BaseDto } from './base.dto';
|
|
2
|
+
import { NotificationStepType } from './enums/notificationStep.type';
|
|
3
|
+
import { WorkflowTriggerType } from './enums/workflowTrigger.type';
|
|
4
|
+
export type NotificationStepData = {
|
|
5
|
+
/** Name of the device to which the notification of finding applies */
|
|
6
|
+
deviceName?: string;
|
|
7
|
+
/** Description of the notification of finding */
|
|
8
|
+
description?: string;
|
|
9
|
+
/** Due date associated with the finding */
|
|
10
|
+
dueDate?: string;
|
|
11
|
+
/** Name of the software to which the finding applies */
|
|
12
|
+
softwareName: string;
|
|
13
|
+
};
|
|
14
|
+
export type PauseStepData = {
|
|
15
|
+
/** Estimated duration, in minutes, to resolve the finding */
|
|
16
|
+
duration: number;
|
|
17
|
+
};
|
|
18
|
+
export type WorkflowStep = {
|
|
19
|
+
/** Number of the step in the workflow */
|
|
20
|
+
stepNumber: number;
|
|
21
|
+
/** Type of the notification step, either NOTIFICATION or PAUSE */
|
|
22
|
+
type: NotificationStepType;
|
|
23
|
+
/** ID of the template to be used for the notification */
|
|
24
|
+
templateId?: string;
|
|
25
|
+
/** Data associated with the notification step */
|
|
26
|
+
data: NotificationStepData | PauseStepData;
|
|
27
|
+
/** Step number to transition the workflow to on success */
|
|
28
|
+
successStepNumber: number | null;
|
|
29
|
+
/** Step number to transition the workflow to on failure */
|
|
30
|
+
failureStepNumber: number | null;
|
|
31
|
+
/** Duration, in days, to wait before executing the next step in the workflow */
|
|
32
|
+
pauseDuration?: number | null;
|
|
33
|
+
};
|
|
34
|
+
export type WorkflowTriggerRule = {
|
|
35
|
+
[propName: string]: string | number | boolean | null | {
|
|
36
|
+
[propName: string]: string | number | boolean | WorkflowTriggerRule;
|
|
37
|
+
} | WorkflowTriggerRule[];
|
|
38
|
+
};
|
|
39
|
+
export type WorkflowTrigger = {
|
|
40
|
+
/** Type of the trigger */
|
|
41
|
+
type: WorkflowTriggerType;
|
|
42
|
+
/** Rule to which the applicable entity type must conform to trigger the workflow */
|
|
43
|
+
rule: unknown;
|
|
44
|
+
};
|
|
45
|
+
export type WorkflowUpsertDto = {
|
|
46
|
+
/** Name of the workflow */
|
|
47
|
+
name: string;
|
|
48
|
+
/** Description of the workflow */
|
|
49
|
+
description?: string;
|
|
50
|
+
/** Trigger that begins execution of the workflow */
|
|
51
|
+
trigger: WorkflowTrigger;
|
|
52
|
+
/** Steps in the workflow */
|
|
53
|
+
steps?: WorkflowStep[];
|
|
54
|
+
};
|
|
55
|
+
export type WorkflowDto = BaseDto & WorkflowUpsertDto;
|
|
56
|
+
export type WorkflowProgressUpsertDto = {
|
|
57
|
+
/** ID of the workflow */
|
|
58
|
+
wfid: string;
|
|
59
|
+
/** ID of the finding for which the workflow is being executed */
|
|
60
|
+
fid?: string | null;
|
|
61
|
+
/** Step number to transition the workflow to next */
|
|
62
|
+
nextStep: number;
|
|
63
|
+
/** ID of the user for which the workflow is being executed */
|
|
64
|
+
uid: string | null;
|
|
65
|
+
/** whether or not this instance of the workflow has been completed */
|
|
66
|
+
workflowCompleted: boolean;
|
|
67
|
+
};
|
|
68
|
+
export type WorkflowProgressDto = BaseDto & WorkflowProgressUpsertDto;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflow.dto.js","sourceRoot":"","sources":["../../../src/dto/workflow.dto.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { BaseDto } from './base.dto';
|
|
2
|
+
export type WorkflowAssignmentUpsertDto = {
|
|
3
|
+
/** ID of the workflow */
|
|
4
|
+
wfid: string;
|
|
5
|
+
/** ID of the user to which the workflow is being assigned */
|
|
6
|
+
uid: string;
|
|
7
|
+
};
|
|
8
|
+
export type WorkflowAssignmentDto = BaseDto & WorkflowAssignmentUpsertDto;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflowAssignment.dto.js","sourceRoot":"","sources":["../../../src/dto/workflowAssignment.dto.ts"],"names":[],"mappings":""}
|
package/package.json
CHANGED
package/src/dto/index.ts
CHANGED
|
@@ -9,6 +9,7 @@ export * from './extKeyMap.dto';
|
|
|
9
9
|
export * from './findings.dto';
|
|
10
10
|
export * from './jwt';
|
|
11
11
|
export * from './message.dto';
|
|
12
|
+
export * from './notification.dto';
|
|
12
13
|
export * from './page.dto';
|
|
13
14
|
export * from './platform';
|
|
14
15
|
export * from './providers.dto';
|
|
@@ -20,3 +21,4 @@ export * from './saasUsers.dto';
|
|
|
20
21
|
export * from './ampSetting.dto';
|
|
21
22
|
export * from './tenants.dto';
|
|
22
23
|
export * from './users.dto';
|
|
24
|
+
export * from './workflow.dto';
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import {BaseDto} from './base.dto';
|
|
2
|
+
|
|
3
|
+
export type NotificationAddress = {
|
|
4
|
+
/** Connector ID for the notification channel */
|
|
5
|
+
cid: string;
|
|
6
|
+
/** Group IDs to which the notification is being sent */
|
|
7
|
+
groups?: string[] | number[];
|
|
8
|
+
/** User IDs to which the notification is being sent */
|
|
9
|
+
users?: string[] | number[];
|
|
10
|
+
/** Webhook URLs to which the notification is being sent */
|
|
11
|
+
webhooks?: string[];
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export type NotificationUpsertDto = {
|
|
15
|
+
/** Workflow ID for which the notification is being created */
|
|
16
|
+
wfid: string;
|
|
17
|
+
/** Finding ID for which the notification is being created */
|
|
18
|
+
fid?: string;
|
|
19
|
+
/** Recipient address to which the notification is being sent */
|
|
20
|
+
to: NotificationAddress;
|
|
21
|
+
/** ID of the template to use for the notification */
|
|
22
|
+
templateId: string;
|
|
23
|
+
/** ID o fthe user to which the notification is being sent */
|
|
24
|
+
uid: string;
|
|
25
|
+
/** Step number in the workflow for which the notification is being created */
|
|
26
|
+
stepNumber: number;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export type NotificationDto = NotificationUpsertDto & BaseDto;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import {NotificationDto, NotificationUpsertDto} from '../notification.dto';
|
|
2
|
+
import {TenantBased} from './tenant.based.dto';
|
|
3
|
+
|
|
4
|
+
export type PlatformNotificationUpsertDto = NotificationUpsertDto & TenantBased;
|
|
5
|
+
|
|
6
|
+
export type PlatformNotificationDto = NotificationDto & TenantBased;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import {WorkflowAssignmentUpsertDto} from '../workflowAssignment.dto';
|
|
2
|
+
import {TenantBased} from './tenant.based.dto';
|
|
3
|
+
|
|
4
|
+
export type PlatformWorkflowAssignmentUpsertDto = WorkflowAssignmentUpsertDto & TenantBased;
|
|
5
|
+
|
|
6
|
+
export type PlatformWorkflowAssignmentDto = PlatformWorkflowAssignmentUpsertDto & TenantBased;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import {BaseDto} from './base.dto';
|
|
2
|
+
import {NotificationStepType} from './enums/notificationStep.type';
|
|
3
|
+
import {WorkflowTriggerType} from './enums/workflowTrigger.type';
|
|
4
|
+
|
|
5
|
+
export type NotificationStepData = {
|
|
6
|
+
/** Name of the device to which the notification of finding applies */
|
|
7
|
+
deviceName?: string;
|
|
8
|
+
/** Description of the notification of finding */
|
|
9
|
+
description?: string;
|
|
10
|
+
/** Due date associated with the finding */
|
|
11
|
+
dueDate?: string;
|
|
12
|
+
/** Name of the software to which the finding applies */
|
|
13
|
+
softwareName: string;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export type PauseStepData = {
|
|
17
|
+
/** Estimated duration, in minutes, to resolve the finding */
|
|
18
|
+
duration: number;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export type WorkflowStep = {
|
|
22
|
+
/** Number of the step in the workflow */
|
|
23
|
+
stepNumber: number;
|
|
24
|
+
/** Type of the notification step, either NOTIFICATION or PAUSE */
|
|
25
|
+
type: NotificationStepType;
|
|
26
|
+
/** ID of the template to be used for the notification */
|
|
27
|
+
templateId?: string;
|
|
28
|
+
/** Data associated with the notification step */
|
|
29
|
+
data: NotificationStepData | PauseStepData;
|
|
30
|
+
/** Step number to transition the workflow to on success */
|
|
31
|
+
successStepNumber: number | null;
|
|
32
|
+
/** Step number to transition the workflow to on failure */
|
|
33
|
+
failureStepNumber: number | null;
|
|
34
|
+
/** Duration, in days, to wait before executing the next step in the workflow */
|
|
35
|
+
pauseDuration?: number | null;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export type WorkflowTriggerRule = {
|
|
39
|
+
[propName: string]:
|
|
40
|
+
| string
|
|
41
|
+
| number
|
|
42
|
+
| boolean
|
|
43
|
+
| null
|
|
44
|
+
| {
|
|
45
|
+
[propName: string]: string | number | boolean | WorkflowTriggerRule;
|
|
46
|
+
}
|
|
47
|
+
| WorkflowTriggerRule[];
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
export type WorkflowTrigger = {
|
|
51
|
+
/** Type of the trigger */
|
|
52
|
+
type: WorkflowTriggerType;
|
|
53
|
+
/** Rule to which the applicable entity type must conform to trigger the workflow */
|
|
54
|
+
rule: unknown;
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
export type WorkflowUpsertDto = {
|
|
58
|
+
/** Name of the workflow */
|
|
59
|
+
name: string;
|
|
60
|
+
/** Description of the workflow */
|
|
61
|
+
description?: string;
|
|
62
|
+
/** Trigger that begins execution of the workflow */
|
|
63
|
+
trigger: WorkflowTrigger;
|
|
64
|
+
/** Steps in the workflow */
|
|
65
|
+
steps?: WorkflowStep[];
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
export type WorkflowDto = BaseDto & WorkflowUpsertDto;
|
|
69
|
+
|
|
70
|
+
export type WorkflowProgressUpsertDto = {
|
|
71
|
+
/** ID of the workflow */
|
|
72
|
+
wfid: string;
|
|
73
|
+
/** ID of the finding for which the workflow is being executed */
|
|
74
|
+
fid?: string | null;
|
|
75
|
+
/** Step number to transition the workflow to next */
|
|
76
|
+
nextStep: number;
|
|
77
|
+
/** ID of the user for which the workflow is being executed */
|
|
78
|
+
uid: string | null;
|
|
79
|
+
/** whether or not this instance of the workflow has been completed */
|
|
80
|
+
workflowCompleted: boolean;
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
export type WorkflowProgressDto = BaseDto & WorkflowProgressUpsertDto;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import {BaseDto} from './base.dto';
|
|
2
|
+
|
|
3
|
+
export type WorkflowAssignmentUpsertDto = {
|
|
4
|
+
/** ID of the workflow */
|
|
5
|
+
wfid: string;
|
|
6
|
+
/** ID of the user to which the workflow is being assigned */
|
|
7
|
+
uid: string;
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export type WorkflowAssignmentDto = BaseDto & WorkflowAssignmentUpsertDto;
|