@ampsec/platform-client 61.0.0 → 61.1.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/flows.dto.d.ts +329 -54
- package/build/src/dto/flows.dto.js +16 -3
- package/build/src/dto/flows.dto.js.map +1 -1
- package/build/src/dto/notification.dto.d.ts +121 -0
- package/build/src/dto/notification.dto.js +6 -1
- package/build/src/dto/notification.dto.js.map +1 -1
- package/build/src/dto/platform/platform.flows.dto.d.ts +242 -38
- package/build/src/dto/platform/platform.flows.dto.js +1 -1
- package/build/src/dto/platform/platform.flows.dto.js.map +1 -1
- package/package.json +1 -1
- package/src/dto/flows.dto.ts +19 -3
- package/src/dto/notification.dto.ts +6 -0
- package/src/dto/platform/platform.flows.dto.ts +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports._CreateNotificationDto = exports._NotificationDto = exports._NotificationUpsertDto = exports._EmailNotificationUpsertDto = exports._SlackNotificationUpsertDto = exports._BaseNotificationUpsertDto = exports._EmailDeliveryStrategy = exports._SlackDeliveryStrategy = exports._FindingContentStrategy = exports._TemplateContentStrategy = exports._RawContentStrategy = exports._NotificationAddress = exports.DeliveryStrategyKind = exports.ContentStrategyKind = exports.NotificationStatus = void 0;
|
|
3
|
+
exports._CreateNotificationDto = exports._NotificationDto = exports._NotificationUpsertDto = exports._EmailNotificationUpsertDto = exports._SlackNotificationUpsertDto = exports._BaseNotificationUpsertDto = exports._EmailDeliveryStrategy = exports._SlackDeliveryStrategy = exports._FindingContentStrategy = exports._TemplateContentStrategy = exports._RawContentStrategy = exports._FlowContext = exports._FlowContextKey = exports._NotificationAddress = exports.DeliveryStrategyKind = exports.ContentStrategyKind = exports.NotificationStatus = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const base_dto_1 = require("./base.dto");
|
|
6
6
|
var NotificationStatus;
|
|
@@ -29,21 +29,26 @@ exports._NotificationAddress = zod_1.z.object({
|
|
|
29
29
|
users: zod_1.z.array(zod_1.z.union([zod_1.z.string(), zod_1.z.number()])).optional(),
|
|
30
30
|
webhooks: zod_1.z.array(zod_1.z.string()).optional(),
|
|
31
31
|
});
|
|
32
|
+
exports._FlowContextKey = zod_1.z.enum(['TONE', 'ACTION_GET_INSTRUCTIONS_ENABLED']);
|
|
33
|
+
exports._FlowContext = zod_1.z.record(exports._FlowContextKey, zod_1.z.any());
|
|
32
34
|
exports._RawContentStrategy = zod_1.z.object({
|
|
33
35
|
kind: zod_1.z.literal(ContentStrategyKind.RAW),
|
|
34
36
|
content: zod_1.z.string(),
|
|
35
37
|
subject: zod_1.z.string().optional(),
|
|
36
38
|
context: zod_1.z.record(zod_1.z.string()).optional(),
|
|
39
|
+
flowContext: exports._FlowContext.optional(),
|
|
37
40
|
// TODO context: z.record(z.union([z.string(), z.number(), z.boolean(), z.null(), z.undefined()])).optional(),
|
|
38
41
|
});
|
|
39
42
|
exports._TemplateContentStrategy = zod_1.z.object({
|
|
40
43
|
kind: zod_1.z.literal(ContentStrategyKind.TEMPLATE),
|
|
41
44
|
templateId: zod_1.z.string(),
|
|
42
45
|
context: zod_1.z.record(zod_1.z.string()),
|
|
46
|
+
flowContext: exports._FlowContext.optional(),
|
|
43
47
|
});
|
|
44
48
|
exports._FindingContentStrategy = zod_1.z.object({
|
|
45
49
|
kind: zod_1.z.literal(ContentStrategyKind.FINDING),
|
|
46
50
|
fid: zod_1.z.string(),
|
|
51
|
+
flowContext: exports._FlowContext.optional(),
|
|
47
52
|
});
|
|
48
53
|
const _BaseDeliveryStrategy = zod_1.z.object({
|
|
49
54
|
copySecOpsTeam: zod_1.z.boolean().optional(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notification.dto.js","sourceRoot":"","sources":["../../../src/dto/notification.dto.ts"],"names":[],"mappings":";;;AAAA,6BAAsB;AACtB,yCAA6D;AAE7D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OAAO,EAAE,CAAC,QAAQ,EAAE;KACvC,CAAC;IACF,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC1B,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC1B,uEAAuE;IACvE,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC3B,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC/B,CAAC,CACH,CAAC"}
|
|
@@ -2,13 +2,43 @@ import { z } from 'zod';
|
|
|
2
2
|
import { FlowSpecStatusKind } from '../flows.dto';
|
|
3
3
|
export declare const _PlatformFlowSpecUpsertDto: z.ZodObject<{
|
|
4
4
|
filter: z.ZodObject<{
|
|
5
|
-
cohorts: z.ZodArray<z.
|
|
5
|
+
cohorts: z.ZodArray<z.ZodObject<{
|
|
6
|
+
id: z.ZodString;
|
|
7
|
+
kind: z.ZodEnum<["ORGANIZATION", "DEPARTMENT", "USER", "RISK_CONTRIBUTOR"]>;
|
|
8
|
+
displayValue: z.ZodString;
|
|
9
|
+
value: z.ZodString;
|
|
10
|
+
inclusive: z.ZodBoolean;
|
|
11
|
+
}, "strip", z.ZodTypeAny, {
|
|
12
|
+
inclusive: boolean;
|
|
13
|
+
value: string;
|
|
14
|
+
id: string;
|
|
15
|
+
displayValue: string;
|
|
16
|
+
kind: "USER" | "ORGANIZATION" | "DEPARTMENT" | "RISK_CONTRIBUTOR";
|
|
17
|
+
}, {
|
|
18
|
+
inclusive: boolean;
|
|
19
|
+
value: string;
|
|
20
|
+
id: string;
|
|
21
|
+
displayValue: string;
|
|
22
|
+
kind: "USER" | "ORGANIZATION" | "DEPARTMENT" | "RISK_CONTRIBUTOR";
|
|
23
|
+
}>, "many">;
|
|
6
24
|
custom: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
7
25
|
}, "strip", z.ZodTypeAny, {
|
|
8
|
-
cohorts:
|
|
26
|
+
cohorts: {
|
|
27
|
+
inclusive: boolean;
|
|
28
|
+
value: string;
|
|
29
|
+
id: string;
|
|
30
|
+
displayValue: string;
|
|
31
|
+
kind: "USER" | "ORGANIZATION" | "DEPARTMENT" | "RISK_CONTRIBUTOR";
|
|
32
|
+
}[];
|
|
9
33
|
custom?: Record<string, unknown> | undefined;
|
|
10
34
|
}, {
|
|
11
|
-
cohorts:
|
|
35
|
+
cohorts: {
|
|
36
|
+
inclusive: boolean;
|
|
37
|
+
value: string;
|
|
38
|
+
id: string;
|
|
39
|
+
displayValue: string;
|
|
40
|
+
kind: "USER" | "ORGANIZATION" | "DEPARTMENT" | "RISK_CONTRIBUTOR";
|
|
41
|
+
}[];
|
|
12
42
|
custom?: Record<string, unknown> | undefined;
|
|
13
43
|
}>;
|
|
14
44
|
name: z.ZodString;
|
|
@@ -18,26 +48,36 @@ export declare const _PlatformFlowSpecUpsertDto: z.ZodObject<{
|
|
|
18
48
|
fslStrategy: z.ZodDefault<z.ZodOptional<z.ZodEnum<["STANDARD"]>>>;
|
|
19
49
|
triggerFilter: z.ZodObject<{
|
|
20
50
|
trigger: z.ZodArray<z.ZodObject<{
|
|
21
|
-
|
|
22
|
-
displayValue: z.
|
|
51
|
+
id: z.ZodString;
|
|
52
|
+
displayValue: z.ZodString;
|
|
53
|
+
cid: z.ZodOptional<z.ZodString>;
|
|
54
|
+
eventType: z.ZodString;
|
|
23
55
|
}, "strip", z.ZodTypeAny, {
|
|
24
|
-
|
|
25
|
-
displayValue
|
|
56
|
+
id: string;
|
|
57
|
+
displayValue: string;
|
|
58
|
+
eventType: string;
|
|
59
|
+
cid?: string | undefined;
|
|
26
60
|
}, {
|
|
27
|
-
|
|
28
|
-
displayValue
|
|
61
|
+
id: string;
|
|
62
|
+
displayValue: string;
|
|
63
|
+
eventType: string;
|
|
64
|
+
cid?: string | undefined;
|
|
29
65
|
}>, "many">;
|
|
30
66
|
custom: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
31
67
|
}, "strip", z.ZodTypeAny, {
|
|
32
68
|
trigger: {
|
|
33
|
-
|
|
34
|
-
displayValue
|
|
69
|
+
id: string;
|
|
70
|
+
displayValue: string;
|
|
71
|
+
eventType: string;
|
|
72
|
+
cid?: string | undefined;
|
|
35
73
|
}[];
|
|
36
74
|
custom?: Record<string, unknown> | undefined;
|
|
37
75
|
}, {
|
|
38
76
|
trigger: {
|
|
39
|
-
|
|
40
|
-
displayValue
|
|
77
|
+
id: string;
|
|
78
|
+
displayValue: string;
|
|
79
|
+
eventType: string;
|
|
80
|
+
cid?: string | undefined;
|
|
41
81
|
}[];
|
|
42
82
|
custom?: Record<string, unknown> | undefined;
|
|
43
83
|
}>;
|
|
@@ -78,12 +118,21 @@ export declare const _PlatformFlowSpecUpsertDto: z.ZodObject<{
|
|
|
78
118
|
actions: z.ZodOptional<z.ZodObject<{
|
|
79
119
|
includeInstructions: z.ZodOptional<z.ZodBoolean>;
|
|
80
120
|
expirationActionId: z.ZodOptional<z.ZodString>;
|
|
121
|
+
simpleTriageYesActId: z.ZodOptional<z.ZodString>;
|
|
122
|
+
simpleTriageNoActId: z.ZodOptional<z.ZodString>;
|
|
123
|
+
resolveNowActionId: z.ZodOptional<z.ZodString>;
|
|
81
124
|
}, "strip", z.ZodTypeAny, {
|
|
82
125
|
includeInstructions?: boolean | undefined;
|
|
83
126
|
expirationActionId?: string | undefined;
|
|
127
|
+
simpleTriageYesActId?: string | undefined;
|
|
128
|
+
simpleTriageNoActId?: string | undefined;
|
|
129
|
+
resolveNowActionId?: string | undefined;
|
|
84
130
|
}, {
|
|
85
131
|
includeInstructions?: boolean | undefined;
|
|
86
132
|
expirationActionId?: string | undefined;
|
|
133
|
+
simpleTriageYesActId?: string | undefined;
|
|
134
|
+
simpleTriageNoActId?: string | undefined;
|
|
135
|
+
resolveNowActionId?: string | undefined;
|
|
87
136
|
}>>;
|
|
88
137
|
rewards: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
89
138
|
isUpperBound: z.ZodBoolean;
|
|
@@ -104,13 +153,36 @@ export declare const _PlatformFlowSpecUpsertDto: z.ZodObject<{
|
|
|
104
153
|
value?: number | undefined;
|
|
105
154
|
units?: string | undefined;
|
|
106
155
|
}>, "many">>;
|
|
156
|
+
customMessage: z.ZodOptional<z.ZodObject<{
|
|
157
|
+
template: z.ZodString;
|
|
158
|
+
append: z.ZodBoolean;
|
|
159
|
+
}, "strip", z.ZodTypeAny, {
|
|
160
|
+
template: string;
|
|
161
|
+
append: boolean;
|
|
162
|
+
}, {
|
|
163
|
+
template: string;
|
|
164
|
+
append: boolean;
|
|
165
|
+
}>>;
|
|
166
|
+
scheduleConfig: z.ZodOptional<z.ZodObject<{
|
|
167
|
+
required: z.ZodBoolean;
|
|
168
|
+
}, "strip", z.ZodTypeAny, {
|
|
169
|
+
required: boolean;
|
|
170
|
+
}, {
|
|
171
|
+
required: boolean;
|
|
172
|
+
}>>;
|
|
107
173
|
id: z.ZodOptional<z.ZodString>;
|
|
108
174
|
createdAt: z.ZodOptional<z.ZodString>;
|
|
109
175
|
updatedAt: z.ZodOptional<z.ZodString>;
|
|
110
176
|
deletedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
111
177
|
}, "strip", z.ZodTypeAny, {
|
|
112
178
|
filter: {
|
|
113
|
-
cohorts:
|
|
179
|
+
cohorts: {
|
|
180
|
+
inclusive: boolean;
|
|
181
|
+
value: string;
|
|
182
|
+
id: string;
|
|
183
|
+
displayValue: string;
|
|
184
|
+
kind: "USER" | "ORGANIZATION" | "DEPARTMENT" | "RISK_CONTRIBUTOR";
|
|
185
|
+
}[];
|
|
114
186
|
custom?: Record<string, unknown> | undefined;
|
|
115
187
|
};
|
|
116
188
|
name: string;
|
|
@@ -120,8 +192,10 @@ export declare const _PlatformFlowSpecUpsertDto: z.ZodObject<{
|
|
|
120
192
|
fslStrategy: "STANDARD";
|
|
121
193
|
triggerFilter: {
|
|
122
194
|
trigger: {
|
|
123
|
-
|
|
124
|
-
displayValue
|
|
195
|
+
id: string;
|
|
196
|
+
displayValue: string;
|
|
197
|
+
eventType: string;
|
|
198
|
+
cid?: string | undefined;
|
|
125
199
|
}[];
|
|
126
200
|
custom?: Record<string, unknown> | undefined;
|
|
127
201
|
};
|
|
@@ -142,6 +216,9 @@ export declare const _PlatformFlowSpecUpsertDto: z.ZodObject<{
|
|
|
142
216
|
actions?: {
|
|
143
217
|
includeInstructions?: boolean | undefined;
|
|
144
218
|
expirationActionId?: string | undefined;
|
|
219
|
+
simpleTriageYesActId?: string | undefined;
|
|
220
|
+
simpleTriageNoActId?: string | undefined;
|
|
221
|
+
resolveNowActionId?: string | undefined;
|
|
145
222
|
} | undefined;
|
|
146
223
|
rewards?: {
|
|
147
224
|
minutes: number;
|
|
@@ -150,13 +227,26 @@ export declare const _PlatformFlowSpecUpsertDto: z.ZodObject<{
|
|
|
150
227
|
value?: number | undefined;
|
|
151
228
|
units?: string | undefined;
|
|
152
229
|
}[] | undefined;
|
|
230
|
+
customMessage?: {
|
|
231
|
+
template: string;
|
|
232
|
+
append: boolean;
|
|
233
|
+
} | undefined;
|
|
234
|
+
scheduleConfig?: {
|
|
235
|
+
required: boolean;
|
|
236
|
+
} | undefined;
|
|
153
237
|
id?: string | undefined;
|
|
154
238
|
createdAt?: string | undefined;
|
|
155
239
|
updatedAt?: string | undefined;
|
|
156
240
|
deletedAt?: string | null | undefined;
|
|
157
241
|
}, {
|
|
158
242
|
filter: {
|
|
159
|
-
cohorts:
|
|
243
|
+
cohorts: {
|
|
244
|
+
inclusive: boolean;
|
|
245
|
+
value: string;
|
|
246
|
+
id: string;
|
|
247
|
+
displayValue: string;
|
|
248
|
+
kind: "USER" | "ORGANIZATION" | "DEPARTMENT" | "RISK_CONTRIBUTOR";
|
|
249
|
+
}[];
|
|
160
250
|
custom?: Record<string, unknown> | undefined;
|
|
161
251
|
};
|
|
162
252
|
name: string;
|
|
@@ -165,8 +255,10 @@ export declare const _PlatformFlowSpecUpsertDto: z.ZodObject<{
|
|
|
165
255
|
tid: string;
|
|
166
256
|
triggerFilter: {
|
|
167
257
|
trigger: {
|
|
168
|
-
|
|
169
|
-
displayValue
|
|
258
|
+
id: string;
|
|
259
|
+
displayValue: string;
|
|
260
|
+
eventType: string;
|
|
261
|
+
cid?: string | undefined;
|
|
170
262
|
}[];
|
|
171
263
|
custom?: Record<string, unknown> | undefined;
|
|
172
264
|
};
|
|
@@ -188,6 +280,9 @@ export declare const _PlatformFlowSpecUpsertDto: z.ZodObject<{
|
|
|
188
280
|
actions?: {
|
|
189
281
|
includeInstructions?: boolean | undefined;
|
|
190
282
|
expirationActionId?: string | undefined;
|
|
283
|
+
simpleTriageYesActId?: string | undefined;
|
|
284
|
+
simpleTriageNoActId?: string | undefined;
|
|
285
|
+
resolveNowActionId?: string | undefined;
|
|
191
286
|
} | undefined;
|
|
192
287
|
rewards?: {
|
|
193
288
|
minutes: number;
|
|
@@ -196,6 +291,13 @@ export declare const _PlatformFlowSpecUpsertDto: z.ZodObject<{
|
|
|
196
291
|
value?: number | undefined;
|
|
197
292
|
units?: string | undefined;
|
|
198
293
|
}[] | undefined;
|
|
294
|
+
customMessage?: {
|
|
295
|
+
template: string;
|
|
296
|
+
append: boolean;
|
|
297
|
+
} | undefined;
|
|
298
|
+
scheduleConfig?: {
|
|
299
|
+
required: boolean;
|
|
300
|
+
} | undefined;
|
|
199
301
|
id?: string | undefined;
|
|
200
302
|
createdAt?: string | undefined;
|
|
201
303
|
updatedAt?: string | undefined;
|
|
@@ -214,37 +316,77 @@ export declare const _PlatformFlowSpecDto: z.ZodObject<{
|
|
|
214
316
|
fslStrategy: z.ZodDefault<z.ZodOptional<z.ZodEnum<["STANDARD"]>>>;
|
|
215
317
|
triggerFilter: z.ZodObject<{
|
|
216
318
|
trigger: z.ZodArray<z.ZodObject<{
|
|
217
|
-
|
|
218
|
-
displayValue: z.
|
|
319
|
+
id: z.ZodString;
|
|
320
|
+
displayValue: z.ZodString;
|
|
321
|
+
cid: z.ZodOptional<z.ZodString>;
|
|
322
|
+
eventType: z.ZodString;
|
|
219
323
|
}, "strip", z.ZodTypeAny, {
|
|
220
|
-
|
|
221
|
-
displayValue
|
|
324
|
+
id: string;
|
|
325
|
+
displayValue: string;
|
|
326
|
+
eventType: string;
|
|
327
|
+
cid?: string | undefined;
|
|
222
328
|
}, {
|
|
223
|
-
|
|
224
|
-
displayValue
|
|
329
|
+
id: string;
|
|
330
|
+
displayValue: string;
|
|
331
|
+
eventType: string;
|
|
332
|
+
cid?: string | undefined;
|
|
225
333
|
}>, "many">;
|
|
226
334
|
custom: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
227
335
|
}, "strip", z.ZodTypeAny, {
|
|
228
336
|
trigger: {
|
|
229
|
-
|
|
230
|
-
displayValue
|
|
337
|
+
id: string;
|
|
338
|
+
displayValue: string;
|
|
339
|
+
eventType: string;
|
|
340
|
+
cid?: string | undefined;
|
|
231
341
|
}[];
|
|
232
342
|
custom?: Record<string, unknown> | undefined;
|
|
233
343
|
}, {
|
|
234
344
|
trigger: {
|
|
235
|
-
|
|
236
|
-
displayValue
|
|
345
|
+
id: string;
|
|
346
|
+
displayValue: string;
|
|
347
|
+
eventType: string;
|
|
348
|
+
cid?: string | undefined;
|
|
237
349
|
}[];
|
|
238
350
|
custom?: Record<string, unknown> | undefined;
|
|
239
351
|
}>;
|
|
240
352
|
filter: z.ZodObject<{
|
|
241
|
-
cohorts: z.ZodArray<z.
|
|
353
|
+
cohorts: z.ZodArray<z.ZodObject<{
|
|
354
|
+
id: z.ZodString;
|
|
355
|
+
kind: z.ZodEnum<["ORGANIZATION", "DEPARTMENT", "USER", "RISK_CONTRIBUTOR"]>;
|
|
356
|
+
displayValue: z.ZodString;
|
|
357
|
+
value: z.ZodString;
|
|
358
|
+
inclusive: z.ZodBoolean;
|
|
359
|
+
}, "strip", z.ZodTypeAny, {
|
|
360
|
+
inclusive: boolean;
|
|
361
|
+
value: string;
|
|
362
|
+
id: string;
|
|
363
|
+
displayValue: string;
|
|
364
|
+
kind: "USER" | "ORGANIZATION" | "DEPARTMENT" | "RISK_CONTRIBUTOR";
|
|
365
|
+
}, {
|
|
366
|
+
inclusive: boolean;
|
|
367
|
+
value: string;
|
|
368
|
+
id: string;
|
|
369
|
+
displayValue: string;
|
|
370
|
+
kind: "USER" | "ORGANIZATION" | "DEPARTMENT" | "RISK_CONTRIBUTOR";
|
|
371
|
+
}>, "many">;
|
|
242
372
|
custom: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
243
373
|
}, "strip", z.ZodTypeAny, {
|
|
244
|
-
cohorts:
|
|
374
|
+
cohorts: {
|
|
375
|
+
inclusive: boolean;
|
|
376
|
+
value: string;
|
|
377
|
+
id: string;
|
|
378
|
+
displayValue: string;
|
|
379
|
+
kind: "USER" | "ORGANIZATION" | "DEPARTMENT" | "RISK_CONTRIBUTOR";
|
|
380
|
+
}[];
|
|
245
381
|
custom?: Record<string, unknown> | undefined;
|
|
246
382
|
}, {
|
|
247
|
-
cohorts:
|
|
383
|
+
cohorts: {
|
|
384
|
+
inclusive: boolean;
|
|
385
|
+
value: string;
|
|
386
|
+
id: string;
|
|
387
|
+
displayValue: string;
|
|
388
|
+
kind: "USER" | "ORGANIZATION" | "DEPARTMENT" | "RISK_CONTRIBUTOR";
|
|
389
|
+
}[];
|
|
248
390
|
custom?: Record<string, unknown> | undefined;
|
|
249
391
|
}>;
|
|
250
392
|
engagementChannelCids: z.ZodArray<z.ZodString, "many">;
|
|
@@ -284,12 +426,21 @@ export declare const _PlatformFlowSpecDto: z.ZodObject<{
|
|
|
284
426
|
actions: z.ZodOptional<z.ZodObject<{
|
|
285
427
|
includeInstructions: z.ZodOptional<z.ZodBoolean>;
|
|
286
428
|
expirationActionId: z.ZodOptional<z.ZodString>;
|
|
429
|
+
simpleTriageYesActId: z.ZodOptional<z.ZodString>;
|
|
430
|
+
simpleTriageNoActId: z.ZodOptional<z.ZodString>;
|
|
431
|
+
resolveNowActionId: z.ZodOptional<z.ZodString>;
|
|
287
432
|
}, "strip", z.ZodTypeAny, {
|
|
288
433
|
includeInstructions?: boolean | undefined;
|
|
289
434
|
expirationActionId?: string | undefined;
|
|
435
|
+
simpleTriageYesActId?: string | undefined;
|
|
436
|
+
simpleTriageNoActId?: string | undefined;
|
|
437
|
+
resolveNowActionId?: string | undefined;
|
|
290
438
|
}, {
|
|
291
439
|
includeInstructions?: boolean | undefined;
|
|
292
440
|
expirationActionId?: string | undefined;
|
|
441
|
+
simpleTriageYesActId?: string | undefined;
|
|
442
|
+
simpleTriageNoActId?: string | undefined;
|
|
443
|
+
resolveNowActionId?: string | undefined;
|
|
293
444
|
}>>;
|
|
294
445
|
rewards: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
295
446
|
isUpperBound: z.ZodBoolean;
|
|
@@ -310,6 +461,23 @@ export declare const _PlatformFlowSpecDto: z.ZodObject<{
|
|
|
310
461
|
value?: number | undefined;
|
|
311
462
|
units?: string | undefined;
|
|
312
463
|
}>, "many">>;
|
|
464
|
+
customMessage: z.ZodOptional<z.ZodObject<{
|
|
465
|
+
template: z.ZodString;
|
|
466
|
+
append: z.ZodBoolean;
|
|
467
|
+
}, "strip", z.ZodTypeAny, {
|
|
468
|
+
template: string;
|
|
469
|
+
append: boolean;
|
|
470
|
+
}, {
|
|
471
|
+
template: string;
|
|
472
|
+
append: boolean;
|
|
473
|
+
}>>;
|
|
474
|
+
scheduleConfig: z.ZodOptional<z.ZodObject<{
|
|
475
|
+
required: z.ZodBoolean;
|
|
476
|
+
}, "strip", z.ZodTypeAny, {
|
|
477
|
+
required: boolean;
|
|
478
|
+
}, {
|
|
479
|
+
required: boolean;
|
|
480
|
+
}>>;
|
|
313
481
|
activity: z.ZodOptional<z.ZodObject<{
|
|
314
482
|
lastTriggered: z.ZodOptional<z.ZodString>;
|
|
315
483
|
activeCount: z.ZodDefault<z.ZodNumber>;
|
|
@@ -325,7 +493,13 @@ export declare const _PlatformFlowSpecDto: z.ZodObject<{
|
|
|
325
493
|
}>>;
|
|
326
494
|
}, "strip", z.ZodTypeAny, {
|
|
327
495
|
filter: {
|
|
328
|
-
cohorts:
|
|
496
|
+
cohorts: {
|
|
497
|
+
inclusive: boolean;
|
|
498
|
+
value: string;
|
|
499
|
+
id: string;
|
|
500
|
+
displayValue: string;
|
|
501
|
+
kind: "USER" | "ORGANIZATION" | "DEPARTMENT" | "RISK_CONTRIBUTOR";
|
|
502
|
+
}[];
|
|
329
503
|
custom?: Record<string, unknown> | undefined;
|
|
330
504
|
};
|
|
331
505
|
name: string;
|
|
@@ -339,8 +513,10 @@ export declare const _PlatformFlowSpecDto: z.ZodObject<{
|
|
|
339
513
|
fslStrategy: "STANDARD";
|
|
340
514
|
triggerFilter: {
|
|
341
515
|
trigger: {
|
|
342
|
-
|
|
343
|
-
displayValue
|
|
516
|
+
id: string;
|
|
517
|
+
displayValue: string;
|
|
518
|
+
eventType: string;
|
|
519
|
+
cid?: string | undefined;
|
|
344
520
|
}[];
|
|
345
521
|
custom?: Record<string, unknown> | undefined;
|
|
346
522
|
};
|
|
@@ -361,6 +537,9 @@ export declare const _PlatformFlowSpecDto: z.ZodObject<{
|
|
|
361
537
|
actions?: {
|
|
362
538
|
includeInstructions?: boolean | undefined;
|
|
363
539
|
expirationActionId?: string | undefined;
|
|
540
|
+
simpleTriageYesActId?: string | undefined;
|
|
541
|
+
simpleTriageNoActId?: string | undefined;
|
|
542
|
+
resolveNowActionId?: string | undefined;
|
|
364
543
|
} | undefined;
|
|
365
544
|
rewards?: {
|
|
366
545
|
minutes: number;
|
|
@@ -369,6 +548,13 @@ export declare const _PlatformFlowSpecDto: z.ZodObject<{
|
|
|
369
548
|
value?: number | undefined;
|
|
370
549
|
units?: string | undefined;
|
|
371
550
|
}[] | undefined;
|
|
551
|
+
customMessage?: {
|
|
552
|
+
template: string;
|
|
553
|
+
append: boolean;
|
|
554
|
+
} | undefined;
|
|
555
|
+
scheduleConfig?: {
|
|
556
|
+
required: boolean;
|
|
557
|
+
} | undefined;
|
|
372
558
|
activity?: {
|
|
373
559
|
activeCount: number;
|
|
374
560
|
totalCount: number;
|
|
@@ -376,7 +562,13 @@ export declare const _PlatformFlowSpecDto: z.ZodObject<{
|
|
|
376
562
|
} | undefined;
|
|
377
563
|
}, {
|
|
378
564
|
filter: {
|
|
379
|
-
cohorts:
|
|
565
|
+
cohorts: {
|
|
566
|
+
inclusive: boolean;
|
|
567
|
+
value: string;
|
|
568
|
+
id: string;
|
|
569
|
+
displayValue: string;
|
|
570
|
+
kind: "USER" | "ORGANIZATION" | "DEPARTMENT" | "RISK_CONTRIBUTOR";
|
|
571
|
+
}[];
|
|
380
572
|
custom?: Record<string, unknown> | undefined;
|
|
381
573
|
};
|
|
382
574
|
name: string;
|
|
@@ -389,8 +581,10 @@ export declare const _PlatformFlowSpecDto: z.ZodObject<{
|
|
|
389
581
|
deletedAt: string | null;
|
|
390
582
|
triggerFilter: {
|
|
391
583
|
trigger: {
|
|
392
|
-
|
|
393
|
-
displayValue
|
|
584
|
+
id: string;
|
|
585
|
+
displayValue: string;
|
|
586
|
+
eventType: string;
|
|
587
|
+
cid?: string | undefined;
|
|
394
588
|
}[];
|
|
395
589
|
custom?: Record<string, unknown> | undefined;
|
|
396
590
|
};
|
|
@@ -412,6 +606,9 @@ export declare const _PlatformFlowSpecDto: z.ZodObject<{
|
|
|
412
606
|
actions?: {
|
|
413
607
|
includeInstructions?: boolean | undefined;
|
|
414
608
|
expirationActionId?: string | undefined;
|
|
609
|
+
simpleTriageYesActId?: string | undefined;
|
|
610
|
+
simpleTriageNoActId?: string | undefined;
|
|
611
|
+
resolveNowActionId?: string | undefined;
|
|
415
612
|
} | undefined;
|
|
416
613
|
rewards?: {
|
|
417
614
|
minutes: number;
|
|
@@ -420,6 +617,13 @@ export declare const _PlatformFlowSpecDto: z.ZodObject<{
|
|
|
420
617
|
value?: number | undefined;
|
|
421
618
|
units?: string | undefined;
|
|
422
619
|
}[] | undefined;
|
|
620
|
+
customMessage?: {
|
|
621
|
+
template: string;
|
|
622
|
+
append: boolean;
|
|
623
|
+
} | undefined;
|
|
624
|
+
scheduleConfig?: {
|
|
625
|
+
required: boolean;
|
|
626
|
+
} | undefined;
|
|
423
627
|
activity?: {
|
|
424
628
|
lastTriggered?: string | undefined;
|
|
425
629
|
activeCount?: number | undefined;
|
|
@@ -29,7 +29,7 @@ exports.NOOP_FLOW_SPEC = {
|
|
|
29
29
|
description: 'Used internally to drop trigger events',
|
|
30
30
|
fslStrategy: 'STANDARD',
|
|
31
31
|
triggerFilter: {
|
|
32
|
-
trigger: [{
|
|
32
|
+
trigger: [{ id: '000000000000', displayValue: 'NOOP', eventType: '' }],
|
|
33
33
|
},
|
|
34
34
|
filter: {
|
|
35
35
|
cohorts: [],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"platform.flows.dto.js","sourceRoot":"","sources":["../../../../src/dto/platform/platform.flows.dto.ts"],"names":[],"mappings":";;;AACA,4CAAsH;AACtH,yDAAoE;AAEpE;;;;GAIG;AACU,QAAA,0BAA0B,GAAG,8BAAkB,CAAC;AAGhD,QAAA,oBAAoB,GAAG,wBAAY,CAAC;AAGjD;;;;GAIG;AACU,QAAA,2BAA2B,GAAG,+BAAmB,CAAC,KAAK,CAAC,qCAAkB,CAAC,CAAC;AAG5E,QAAA,qBAAqB,GAAG,yBAAa,CAAC,KAAK,CAAC,+BAAY,CAAC,CAAC;AAG1D,QAAA,cAAc,GAAwB;IACjD,EAAE,EAAE,cAAc;IAClB,GAAG,EAAE,cAAc;IACnB,MAAM,EAAE,8BAAkB,CAAC,MAAM;IACjC,qBAAqB,EAAE,EAAE;IACzB,SAAS,EAAE,0BAA0B;IACrC,SAAS,EAAE,0BAA0B;IACrC,SAAS,EAAE,IAAI;IACf,IAAI,EAAE,2BAA2B;IACjC,WAAW,EAAE,wCAAwC;IACrD,WAAW,EAAE,UAAU;IACvB,aAAa,EAAE;QACb,OAAO,EAAE,CAAC,EAAC,
|
|
1
|
+
{"version":3,"file":"platform.flows.dto.js","sourceRoot":"","sources":["../../../../src/dto/platform/platform.flows.dto.ts"],"names":[],"mappings":";;;AACA,4CAAsH;AACtH,yDAAoE;AAEpE;;;;GAIG;AACU,QAAA,0BAA0B,GAAG,8BAAkB,CAAC;AAGhD,QAAA,oBAAoB,GAAG,wBAAY,CAAC;AAGjD;;;;GAIG;AACU,QAAA,2BAA2B,GAAG,+BAAmB,CAAC,KAAK,CAAC,qCAAkB,CAAC,CAAC;AAG5E,QAAA,qBAAqB,GAAG,yBAAa,CAAC,KAAK,CAAC,+BAAY,CAAC,CAAC;AAG1D,QAAA,cAAc,GAAwB;IACjD,EAAE,EAAE,cAAc;IAClB,GAAG,EAAE,cAAc;IACnB,MAAM,EAAE,8BAAkB,CAAC,MAAM;IACjC,qBAAqB,EAAE,EAAE;IACzB,SAAS,EAAE,0BAA0B;IACrC,SAAS,EAAE,0BAA0B;IACrC,SAAS,EAAE,IAAI;IACf,IAAI,EAAE,2BAA2B;IACjC,WAAW,EAAE,wCAAwC;IACrD,WAAW,EAAE,UAAU;IACvB,aAAa,EAAE;QACb,OAAO,EAAE,CAAC,EAAC,EAAE,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,EAAE,SAAS,EAAE,EAAE,EAAC,CAAC;KACrE;IACD,MAAM,EAAE;QACN,OAAO,EAAE,EAAE;KACZ;CACF,CAAC"}
|
package/package.json
CHANGED
package/src/dto/flows.dto.ts
CHANGED
|
@@ -94,9 +94,12 @@ export enum FlowSpecStatusKind {
|
|
|
94
94
|
}
|
|
95
95
|
|
|
96
96
|
const _FlowTrigger = z.object({
|
|
97
|
-
|
|
98
|
-
displayValue: z.string()
|
|
97
|
+
id: z.string(),
|
|
98
|
+
displayValue: z.string(),
|
|
99
|
+
cid: z.string().optional(),
|
|
100
|
+
eventType: z.string(),
|
|
99
101
|
});
|
|
102
|
+
|
|
100
103
|
export type FlowTrigger = z.infer<typeof _FlowTrigger>;
|
|
101
104
|
|
|
102
105
|
const _FlowTriggerFilter = z.object({
|
|
@@ -105,7 +108,15 @@ const _FlowTriggerFilter = z.object({
|
|
|
105
108
|
});
|
|
106
109
|
export type FlowTriggerFilter = z.infer<typeof _FlowTriggerFilter>;
|
|
107
110
|
const _FlowFilter = z.object({
|
|
108
|
-
cohorts: z.array(
|
|
111
|
+
cohorts: z.array(
|
|
112
|
+
z.object({
|
|
113
|
+
id: z.string(),
|
|
114
|
+
kind: z.enum(['ORGANIZATION', 'DEPARTMENT', 'USER', 'RISK_CONTRIBUTOR']),
|
|
115
|
+
displayValue: z.string(),
|
|
116
|
+
value: z.string(),
|
|
117
|
+
inclusive: z.boolean(),
|
|
118
|
+
})
|
|
119
|
+
),
|
|
109
120
|
custom: z.record(z.unknown()).optional(),
|
|
110
121
|
});
|
|
111
122
|
const _FlowTone = z.object({
|
|
@@ -122,6 +133,9 @@ export const _FlowActions = z.object({
|
|
|
122
133
|
includeInstructions: z.boolean().optional(),
|
|
123
134
|
// TODO instructions contact address???
|
|
124
135
|
expirationActionId: z.string().optional(),
|
|
136
|
+
simpleTriageYesActId: z.string().optional(),
|
|
137
|
+
simpleTriageNoActId: z.string().optional(),
|
|
138
|
+
resolveNowActionId: z.string().optional(),
|
|
125
139
|
});
|
|
126
140
|
export type FlowActions = z.infer<typeof _FlowActions>;
|
|
127
141
|
export const _FlowRewardsConfig = z.object({
|
|
@@ -150,6 +164,8 @@ export const _FlowSpecDto = _BaseDto.merge(
|
|
|
150
164
|
reminderInterval: _FlowInterval.optional(),
|
|
151
165
|
actions: _FlowActions.optional(),
|
|
152
166
|
rewards: z.array(_FlowRewardsConfig).optional(),
|
|
167
|
+
customMessage: z.object({template: z.string(), append: z.boolean()}).optional(),
|
|
168
|
+
scheduleConfig: z.object({required: z.boolean()}).optional(),
|
|
153
169
|
activity: z
|
|
154
170
|
.object({
|
|
155
171
|
lastTriggered: z.string().optional(),
|
|
@@ -28,11 +28,15 @@ export const _NotificationAddress = z.object({
|
|
|
28
28
|
webhooks: z.array(z.string()).optional(),
|
|
29
29
|
});
|
|
30
30
|
|
|
31
|
+
export const _FlowContextKey = z.enum(['TONE', 'ACTION_GET_INSTRUCTIONS_ENABLED']);
|
|
32
|
+
export const _FlowContext = z.record(_FlowContextKey, z.any());
|
|
33
|
+
|
|
31
34
|
export const _RawContentStrategy = z.object({
|
|
32
35
|
kind: z.literal(ContentStrategyKind.RAW),
|
|
33
36
|
content: z.string(),
|
|
34
37
|
subject: z.string().optional(),
|
|
35
38
|
context: z.record(z.string()).optional(),
|
|
39
|
+
flowContext: _FlowContext.optional(),
|
|
36
40
|
// TODO context: z.record(z.union([z.string(), z.number(), z.boolean(), z.null(), z.undefined()])).optional(),
|
|
37
41
|
});
|
|
38
42
|
export type RawContentStrategy = z.infer<typeof _RawContentStrategy>;
|
|
@@ -41,12 +45,14 @@ export const _TemplateContentStrategy = z.object({
|
|
|
41
45
|
kind: z.literal(ContentStrategyKind.TEMPLATE),
|
|
42
46
|
templateId: z.string(),
|
|
43
47
|
context: z.record(z.string()),
|
|
48
|
+
flowContext: _FlowContext.optional(),
|
|
44
49
|
});
|
|
45
50
|
export type TemplateContentStrategy = z.infer<typeof _TemplateContentStrategy>;
|
|
46
51
|
|
|
47
52
|
export const _FindingContentStrategy = z.object({
|
|
48
53
|
kind: z.literal(ContentStrategyKind.FINDING),
|
|
49
54
|
fid: z.string(),
|
|
55
|
+
flowContext: _FlowContext.optional(),
|
|
50
56
|
});
|
|
51
57
|
export type FindingContentStrategy = z.infer<typeof _FindingContentStrategy>;
|
|
52
58
|
|
|
@@ -36,7 +36,7 @@ export const NOOP_FLOW_SPEC: PlatformFlowSpecDto = {
|
|
|
36
36
|
description: 'Used internally to drop trigger events',
|
|
37
37
|
fslStrategy: 'STANDARD',
|
|
38
38
|
triggerFilter: {
|
|
39
|
-
trigger: [{
|
|
39
|
+
trigger: [{id: '000000000000', displayValue: 'NOOP', eventType: ''}],
|
|
40
40
|
},
|
|
41
41
|
filter: {
|
|
42
42
|
cohorts: [],
|