@ampsec/platform-client 62.11.0 → 62.13.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.
|
@@ -9,7 +9,8 @@ export declare enum NotificationStatus {
|
|
|
9
9
|
export declare enum ContentStrategyKind {
|
|
10
10
|
RAW = "RAW",
|
|
11
11
|
TEMPLATE = "TEMPLATE",
|
|
12
|
-
FINDING = "FINDING"
|
|
12
|
+
FINDING = "FINDING",
|
|
13
|
+
CUSTOM_CONTENT = "CUSTOM_CONTENT"
|
|
13
14
|
}
|
|
14
15
|
export declare enum DeliveryStrategyKind {
|
|
15
16
|
EMAIL = "EMAIL",
|
|
@@ -33,59 +34,78 @@ export declare const _NotificationAddress: z.ZodObject<{
|
|
|
33
34
|
users?: (string | number)[] | undefined;
|
|
34
35
|
webhooks?: string[] | undefined;
|
|
35
36
|
}>;
|
|
36
|
-
export declare const
|
|
37
|
-
export declare const _FlowContext: z.ZodRecord<z.ZodEnum<["TONE", "ACTION_GET_INSTRUCTIONS_ENABLED", "GHOST_MODE_ENABLED", "REMINDER_COUNT"]>, z.ZodAny>;
|
|
37
|
+
export declare const _FlowContext: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
38
38
|
export declare const _RawContentStrategy: z.ZodObject<{
|
|
39
39
|
kind: z.ZodLiteral<ContentStrategyKind.RAW>;
|
|
40
40
|
content: z.ZodString;
|
|
41
41
|
subject: z.ZodOptional<z.ZodString>;
|
|
42
42
|
context: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
43
|
-
flowContext: z.ZodOptional<z.ZodRecord<z.
|
|
43
|
+
flowContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
44
44
|
}, "strip", z.ZodTypeAny, {
|
|
45
45
|
kind: ContentStrategyKind.RAW;
|
|
46
46
|
content: string;
|
|
47
47
|
subject?: string | undefined;
|
|
48
48
|
context?: Record<string, string> | undefined;
|
|
49
|
-
flowContext?:
|
|
49
|
+
flowContext?: Record<string, any> | undefined;
|
|
50
50
|
}, {
|
|
51
51
|
kind: ContentStrategyKind.RAW;
|
|
52
52
|
content: string;
|
|
53
53
|
subject?: string | undefined;
|
|
54
54
|
context?: Record<string, string> | undefined;
|
|
55
|
-
flowContext?:
|
|
55
|
+
flowContext?: Record<string, any> | undefined;
|
|
56
56
|
}>;
|
|
57
57
|
export type RawContentStrategy = z.infer<typeof _RawContentStrategy>;
|
|
58
58
|
export declare const _TemplateContentStrategy: z.ZodObject<{
|
|
59
59
|
kind: z.ZodLiteral<ContentStrategyKind.TEMPLATE>;
|
|
60
60
|
templateId: z.ZodString;
|
|
61
61
|
context: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
62
|
-
flowContext: z.ZodOptional<z.ZodRecord<z.
|
|
62
|
+
flowContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
63
63
|
}, "strip", z.ZodTypeAny, {
|
|
64
64
|
kind: ContentStrategyKind.TEMPLATE;
|
|
65
65
|
context: Record<string, string>;
|
|
66
66
|
templateId: string;
|
|
67
|
-
flowContext?:
|
|
67
|
+
flowContext?: Record<string, any> | undefined;
|
|
68
68
|
}, {
|
|
69
69
|
kind: ContentStrategyKind.TEMPLATE;
|
|
70
70
|
context: Record<string, string>;
|
|
71
71
|
templateId: string;
|
|
72
|
-
flowContext?:
|
|
72
|
+
flowContext?: Record<string, any> | undefined;
|
|
73
73
|
}>;
|
|
74
74
|
export type TemplateContentStrategy = z.infer<typeof _TemplateContentStrategy>;
|
|
75
75
|
export declare const _FindingContentStrategy: z.ZodObject<{
|
|
76
76
|
kind: z.ZodLiteral<ContentStrategyKind.FINDING>;
|
|
77
77
|
fid: z.ZodString;
|
|
78
|
-
flowContext: z.ZodOptional<z.ZodRecord<z.
|
|
78
|
+
flowContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
79
79
|
}, "strip", z.ZodTypeAny, {
|
|
80
80
|
kind: ContentStrategyKind.FINDING;
|
|
81
81
|
fid: string;
|
|
82
|
-
flowContext?:
|
|
82
|
+
flowContext?: Record<string, any> | undefined;
|
|
83
83
|
}, {
|
|
84
84
|
kind: ContentStrategyKind.FINDING;
|
|
85
85
|
fid: string;
|
|
86
|
-
flowContext?:
|
|
86
|
+
flowContext?: Record<string, any> | undefined;
|
|
87
87
|
}>;
|
|
88
88
|
export type FindingContentStrategy = z.infer<typeof _FindingContentStrategy>;
|
|
89
|
+
export declare const _CustomContentStrategy: z.ZodObject<{
|
|
90
|
+
kind: z.ZodLiteral<ContentStrategyKind.CUSTOM_CONTENT>;
|
|
91
|
+
content: z.ZodString;
|
|
92
|
+
fid: z.ZodOptional<z.ZodString>;
|
|
93
|
+
includeGeneratedMessage: z.ZodOptional<z.ZodBoolean>;
|
|
94
|
+
flowContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
95
|
+
}, "strip", z.ZodTypeAny, {
|
|
96
|
+
kind: ContentStrategyKind.CUSTOM_CONTENT;
|
|
97
|
+
content: string;
|
|
98
|
+
fid?: string | undefined;
|
|
99
|
+
includeGeneratedMessage?: boolean | undefined;
|
|
100
|
+
flowContext?: Record<string, any> | undefined;
|
|
101
|
+
}, {
|
|
102
|
+
kind: ContentStrategyKind.CUSTOM_CONTENT;
|
|
103
|
+
content: string;
|
|
104
|
+
fid?: string | undefined;
|
|
105
|
+
includeGeneratedMessage?: boolean | undefined;
|
|
106
|
+
flowContext?: Record<string, any> | undefined;
|
|
107
|
+
}>;
|
|
108
|
+
export type CustomContentStrategy = z.infer<typeof _CustomContentStrategy>;
|
|
89
109
|
export declare const _SlackDeliveryStrategy: z.ZodObject<{
|
|
90
110
|
copySecOpsTeam: z.ZodOptional<z.ZodBoolean>;
|
|
91
111
|
to: z.ZodObject<{
|
|
@@ -160,46 +180,64 @@ export declare const _BaseNotificationUpsertDto: z.ZodObject<{
|
|
|
160
180
|
content: z.ZodString;
|
|
161
181
|
subject: z.ZodOptional<z.ZodString>;
|
|
162
182
|
context: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
163
|
-
flowContext: z.ZodOptional<z.ZodRecord<z.
|
|
183
|
+
flowContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
164
184
|
}, "strip", z.ZodTypeAny, {
|
|
165
185
|
kind: ContentStrategyKind.RAW;
|
|
166
186
|
content: string;
|
|
167
187
|
subject?: string | undefined;
|
|
168
188
|
context?: Record<string, string> | undefined;
|
|
169
|
-
flowContext?:
|
|
189
|
+
flowContext?: Record<string, any> | undefined;
|
|
170
190
|
}, {
|
|
171
191
|
kind: ContentStrategyKind.RAW;
|
|
172
192
|
content: string;
|
|
173
193
|
subject?: string | undefined;
|
|
174
194
|
context?: Record<string, string> | undefined;
|
|
175
|
-
flowContext?:
|
|
195
|
+
flowContext?: Record<string, any> | undefined;
|
|
176
196
|
}>, z.ZodObject<{
|
|
177
197
|
kind: z.ZodLiteral<ContentStrategyKind.FINDING>;
|
|
178
198
|
fid: z.ZodString;
|
|
179
|
-
flowContext: z.ZodOptional<z.ZodRecord<z.
|
|
199
|
+
flowContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
180
200
|
}, "strip", z.ZodTypeAny, {
|
|
181
201
|
kind: ContentStrategyKind.FINDING;
|
|
182
202
|
fid: string;
|
|
183
|
-
flowContext?:
|
|
203
|
+
flowContext?: Record<string, any> | undefined;
|
|
184
204
|
}, {
|
|
185
205
|
kind: ContentStrategyKind.FINDING;
|
|
186
206
|
fid: string;
|
|
187
|
-
flowContext?:
|
|
207
|
+
flowContext?: Record<string, any> | undefined;
|
|
188
208
|
}>, z.ZodObject<{
|
|
189
209
|
kind: z.ZodLiteral<ContentStrategyKind.TEMPLATE>;
|
|
190
210
|
templateId: z.ZodString;
|
|
191
211
|
context: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
192
|
-
flowContext: z.ZodOptional<z.ZodRecord<z.
|
|
212
|
+
flowContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
193
213
|
}, "strip", z.ZodTypeAny, {
|
|
194
214
|
kind: ContentStrategyKind.TEMPLATE;
|
|
195
215
|
context: Record<string, string>;
|
|
196
216
|
templateId: string;
|
|
197
|
-
flowContext?:
|
|
217
|
+
flowContext?: Record<string, any> | undefined;
|
|
198
218
|
}, {
|
|
199
219
|
kind: ContentStrategyKind.TEMPLATE;
|
|
200
220
|
context: Record<string, string>;
|
|
201
221
|
templateId: string;
|
|
202
|
-
flowContext?:
|
|
222
|
+
flowContext?: Record<string, any> | undefined;
|
|
223
|
+
}>, z.ZodObject<{
|
|
224
|
+
kind: z.ZodLiteral<ContentStrategyKind.CUSTOM_CONTENT>;
|
|
225
|
+
content: z.ZodString;
|
|
226
|
+
fid: z.ZodOptional<z.ZodString>;
|
|
227
|
+
includeGeneratedMessage: z.ZodOptional<z.ZodBoolean>;
|
|
228
|
+
flowContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
229
|
+
}, "strip", z.ZodTypeAny, {
|
|
230
|
+
kind: ContentStrategyKind.CUSTOM_CONTENT;
|
|
231
|
+
content: string;
|
|
232
|
+
fid?: string | undefined;
|
|
233
|
+
includeGeneratedMessage?: boolean | undefined;
|
|
234
|
+
flowContext?: Record<string, any> | undefined;
|
|
235
|
+
}, {
|
|
236
|
+
kind: ContentStrategyKind.CUSTOM_CONTENT;
|
|
237
|
+
content: string;
|
|
238
|
+
fid?: string | undefined;
|
|
239
|
+
includeGeneratedMessage?: boolean | undefined;
|
|
240
|
+
flowContext?: Record<string, any> | undefined;
|
|
203
241
|
}>]>;
|
|
204
242
|
fid: z.ZodOptional<z.ZodString>;
|
|
205
243
|
uid: z.ZodOptional<z.ZodString>;
|
|
@@ -211,16 +249,22 @@ export declare const _BaseNotificationUpsertDto: z.ZodObject<{
|
|
|
211
249
|
content: string;
|
|
212
250
|
subject?: string | undefined;
|
|
213
251
|
context?: Record<string, string> | undefined;
|
|
214
|
-
flowContext?:
|
|
252
|
+
flowContext?: Record<string, any> | undefined;
|
|
215
253
|
} | {
|
|
216
254
|
kind: ContentStrategyKind.TEMPLATE;
|
|
217
255
|
context: Record<string, string>;
|
|
218
256
|
templateId: string;
|
|
219
|
-
flowContext?:
|
|
257
|
+
flowContext?: Record<string, any> | undefined;
|
|
220
258
|
} | {
|
|
221
259
|
kind: ContentStrategyKind.FINDING;
|
|
222
260
|
fid: string;
|
|
223
|
-
flowContext?:
|
|
261
|
+
flowContext?: Record<string, any> | undefined;
|
|
262
|
+
} | {
|
|
263
|
+
kind: ContentStrategyKind.CUSTOM_CONTENT;
|
|
264
|
+
content: string;
|
|
265
|
+
fid?: string | undefined;
|
|
266
|
+
includeGeneratedMessage?: boolean | undefined;
|
|
267
|
+
flowContext?: Record<string, any> | undefined;
|
|
224
268
|
};
|
|
225
269
|
id?: string | undefined;
|
|
226
270
|
createdAt?: string | undefined;
|
|
@@ -236,16 +280,22 @@ export declare const _BaseNotificationUpsertDto: z.ZodObject<{
|
|
|
236
280
|
content: string;
|
|
237
281
|
subject?: string | undefined;
|
|
238
282
|
context?: Record<string, string> | undefined;
|
|
239
|
-
flowContext?:
|
|
283
|
+
flowContext?: Record<string, any> | undefined;
|
|
240
284
|
} | {
|
|
241
285
|
kind: ContentStrategyKind.TEMPLATE;
|
|
242
286
|
context: Record<string, string>;
|
|
243
287
|
templateId: string;
|
|
244
|
-
flowContext?:
|
|
288
|
+
flowContext?: Record<string, any> | undefined;
|
|
245
289
|
} | {
|
|
246
290
|
kind: ContentStrategyKind.FINDING;
|
|
247
291
|
fid: string;
|
|
248
|
-
flowContext?:
|
|
292
|
+
flowContext?: Record<string, any> | undefined;
|
|
293
|
+
} | {
|
|
294
|
+
kind: ContentStrategyKind.CUSTOM_CONTENT;
|
|
295
|
+
content: string;
|
|
296
|
+
fid?: string | undefined;
|
|
297
|
+
includeGeneratedMessage?: boolean | undefined;
|
|
298
|
+
flowContext?: Record<string, any> | undefined;
|
|
249
299
|
};
|
|
250
300
|
id?: string | undefined;
|
|
251
301
|
createdAt?: string | undefined;
|
|
@@ -268,46 +318,64 @@ export declare const _SlackNotificationUpsertDto: z.ZodObject<{
|
|
|
268
318
|
content: z.ZodString;
|
|
269
319
|
subject: z.ZodOptional<z.ZodString>;
|
|
270
320
|
context: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
271
|
-
flowContext: z.ZodOptional<z.ZodRecord<z.
|
|
321
|
+
flowContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
272
322
|
}, "strip", z.ZodTypeAny, {
|
|
273
323
|
kind: ContentStrategyKind.RAW;
|
|
274
324
|
content: string;
|
|
275
325
|
subject?: string | undefined;
|
|
276
326
|
context?: Record<string, string> | undefined;
|
|
277
|
-
flowContext?:
|
|
327
|
+
flowContext?: Record<string, any> | undefined;
|
|
278
328
|
}, {
|
|
279
329
|
kind: ContentStrategyKind.RAW;
|
|
280
330
|
content: string;
|
|
281
331
|
subject?: string | undefined;
|
|
282
332
|
context?: Record<string, string> | undefined;
|
|
283
|
-
flowContext?:
|
|
333
|
+
flowContext?: Record<string, any> | undefined;
|
|
284
334
|
}>, z.ZodObject<{
|
|
285
335
|
kind: z.ZodLiteral<ContentStrategyKind.FINDING>;
|
|
286
336
|
fid: z.ZodString;
|
|
287
|
-
flowContext: z.ZodOptional<z.ZodRecord<z.
|
|
337
|
+
flowContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
288
338
|
}, "strip", z.ZodTypeAny, {
|
|
289
339
|
kind: ContentStrategyKind.FINDING;
|
|
290
340
|
fid: string;
|
|
291
|
-
flowContext?:
|
|
341
|
+
flowContext?: Record<string, any> | undefined;
|
|
292
342
|
}, {
|
|
293
343
|
kind: ContentStrategyKind.FINDING;
|
|
294
344
|
fid: string;
|
|
295
|
-
flowContext?:
|
|
345
|
+
flowContext?: Record<string, any> | undefined;
|
|
296
346
|
}>, z.ZodObject<{
|
|
297
347
|
kind: z.ZodLiteral<ContentStrategyKind.TEMPLATE>;
|
|
298
348
|
templateId: z.ZodString;
|
|
299
349
|
context: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
300
|
-
flowContext: z.ZodOptional<z.ZodRecord<z.
|
|
350
|
+
flowContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
301
351
|
}, "strip", z.ZodTypeAny, {
|
|
302
352
|
kind: ContentStrategyKind.TEMPLATE;
|
|
303
353
|
context: Record<string, string>;
|
|
304
354
|
templateId: string;
|
|
305
|
-
flowContext?:
|
|
355
|
+
flowContext?: Record<string, any> | undefined;
|
|
306
356
|
}, {
|
|
307
357
|
kind: ContentStrategyKind.TEMPLATE;
|
|
308
358
|
context: Record<string, string>;
|
|
309
359
|
templateId: string;
|
|
310
|
-
flowContext?:
|
|
360
|
+
flowContext?: Record<string, any> | undefined;
|
|
361
|
+
}>, z.ZodObject<{
|
|
362
|
+
kind: z.ZodLiteral<ContentStrategyKind.CUSTOM_CONTENT>;
|
|
363
|
+
content: z.ZodString;
|
|
364
|
+
fid: z.ZodOptional<z.ZodString>;
|
|
365
|
+
includeGeneratedMessage: z.ZodOptional<z.ZodBoolean>;
|
|
366
|
+
flowContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
367
|
+
}, "strip", z.ZodTypeAny, {
|
|
368
|
+
kind: ContentStrategyKind.CUSTOM_CONTENT;
|
|
369
|
+
content: string;
|
|
370
|
+
fid?: string | undefined;
|
|
371
|
+
includeGeneratedMessage?: boolean | undefined;
|
|
372
|
+
flowContext?: Record<string, any> | undefined;
|
|
373
|
+
}, {
|
|
374
|
+
kind: ContentStrategyKind.CUSTOM_CONTENT;
|
|
375
|
+
content: string;
|
|
376
|
+
fid?: string | undefined;
|
|
377
|
+
includeGeneratedMessage?: boolean | undefined;
|
|
378
|
+
flowContext?: Record<string, any> | undefined;
|
|
311
379
|
}>]>;
|
|
312
380
|
agentId: z.ZodOptional<z.ZodString>;
|
|
313
381
|
deliveryChannel: z.ZodLiteral<DeliveryStrategyKind.SLACK>;
|
|
@@ -356,16 +424,22 @@ export declare const _SlackNotificationUpsertDto: z.ZodObject<{
|
|
|
356
424
|
content: string;
|
|
357
425
|
subject?: string | undefined;
|
|
358
426
|
context?: Record<string, string> | undefined;
|
|
359
|
-
flowContext?:
|
|
427
|
+
flowContext?: Record<string, any> | undefined;
|
|
360
428
|
} | {
|
|
361
429
|
kind: ContentStrategyKind.TEMPLATE;
|
|
362
430
|
context: Record<string, string>;
|
|
363
431
|
templateId: string;
|
|
364
|
-
flowContext?:
|
|
432
|
+
flowContext?: Record<string, any> | undefined;
|
|
365
433
|
} | {
|
|
366
434
|
kind: ContentStrategyKind.FINDING;
|
|
367
435
|
fid: string;
|
|
368
|
-
flowContext?:
|
|
436
|
+
flowContext?: Record<string, any> | undefined;
|
|
437
|
+
} | {
|
|
438
|
+
kind: ContentStrategyKind.CUSTOM_CONTENT;
|
|
439
|
+
content: string;
|
|
440
|
+
fid?: string | undefined;
|
|
441
|
+
includeGeneratedMessage?: boolean | undefined;
|
|
442
|
+
flowContext?: Record<string, any> | undefined;
|
|
369
443
|
};
|
|
370
444
|
deliveryChannel: DeliveryStrategyKind.SLACK;
|
|
371
445
|
deliveryStrategy: {
|
|
@@ -392,16 +466,22 @@ export declare const _SlackNotificationUpsertDto: z.ZodObject<{
|
|
|
392
466
|
content: string;
|
|
393
467
|
subject?: string | undefined;
|
|
394
468
|
context?: Record<string, string> | undefined;
|
|
395
|
-
flowContext?:
|
|
469
|
+
flowContext?: Record<string, any> | undefined;
|
|
396
470
|
} | {
|
|
397
471
|
kind: ContentStrategyKind.TEMPLATE;
|
|
398
472
|
context: Record<string, string>;
|
|
399
473
|
templateId: string;
|
|
400
|
-
flowContext?:
|
|
474
|
+
flowContext?: Record<string, any> | undefined;
|
|
401
475
|
} | {
|
|
402
476
|
kind: ContentStrategyKind.FINDING;
|
|
403
477
|
fid: string;
|
|
404
|
-
flowContext?:
|
|
478
|
+
flowContext?: Record<string, any> | undefined;
|
|
479
|
+
} | {
|
|
480
|
+
kind: ContentStrategyKind.CUSTOM_CONTENT;
|
|
481
|
+
content: string;
|
|
482
|
+
fid?: string | undefined;
|
|
483
|
+
includeGeneratedMessage?: boolean | undefined;
|
|
484
|
+
flowContext?: Record<string, any> | undefined;
|
|
405
485
|
};
|
|
406
486
|
deliveryChannel: DeliveryStrategyKind.SLACK;
|
|
407
487
|
deliveryStrategy: {
|
|
@@ -436,46 +516,64 @@ export declare const _EmailNotificationUpsertDto: z.ZodObject<{
|
|
|
436
516
|
content: z.ZodString;
|
|
437
517
|
subject: z.ZodOptional<z.ZodString>;
|
|
438
518
|
context: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
439
|
-
flowContext: z.ZodOptional<z.ZodRecord<z.
|
|
519
|
+
flowContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
440
520
|
}, "strip", z.ZodTypeAny, {
|
|
441
521
|
kind: ContentStrategyKind.RAW;
|
|
442
522
|
content: string;
|
|
443
523
|
subject?: string | undefined;
|
|
444
524
|
context?: Record<string, string> | undefined;
|
|
445
|
-
flowContext?:
|
|
525
|
+
flowContext?: Record<string, any> | undefined;
|
|
446
526
|
}, {
|
|
447
527
|
kind: ContentStrategyKind.RAW;
|
|
448
528
|
content: string;
|
|
449
529
|
subject?: string | undefined;
|
|
450
530
|
context?: Record<string, string> | undefined;
|
|
451
|
-
flowContext?:
|
|
531
|
+
flowContext?: Record<string, any> | undefined;
|
|
452
532
|
}>, z.ZodObject<{
|
|
453
533
|
kind: z.ZodLiteral<ContentStrategyKind.FINDING>;
|
|
454
534
|
fid: z.ZodString;
|
|
455
|
-
flowContext: z.ZodOptional<z.ZodRecord<z.
|
|
535
|
+
flowContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
456
536
|
}, "strip", z.ZodTypeAny, {
|
|
457
537
|
kind: ContentStrategyKind.FINDING;
|
|
458
538
|
fid: string;
|
|
459
|
-
flowContext?:
|
|
539
|
+
flowContext?: Record<string, any> | undefined;
|
|
460
540
|
}, {
|
|
461
541
|
kind: ContentStrategyKind.FINDING;
|
|
462
542
|
fid: string;
|
|
463
|
-
flowContext?:
|
|
543
|
+
flowContext?: Record<string, any> | undefined;
|
|
464
544
|
}>, z.ZodObject<{
|
|
465
545
|
kind: z.ZodLiteral<ContentStrategyKind.TEMPLATE>;
|
|
466
546
|
templateId: z.ZodString;
|
|
467
547
|
context: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
468
|
-
flowContext: z.ZodOptional<z.ZodRecord<z.
|
|
548
|
+
flowContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
469
549
|
}, "strip", z.ZodTypeAny, {
|
|
470
550
|
kind: ContentStrategyKind.TEMPLATE;
|
|
471
551
|
context: Record<string, string>;
|
|
472
552
|
templateId: string;
|
|
473
|
-
flowContext?:
|
|
553
|
+
flowContext?: Record<string, any> | undefined;
|
|
474
554
|
}, {
|
|
475
555
|
kind: ContentStrategyKind.TEMPLATE;
|
|
476
556
|
context: Record<string, string>;
|
|
477
557
|
templateId: string;
|
|
478
|
-
flowContext?:
|
|
558
|
+
flowContext?: Record<string, any> | undefined;
|
|
559
|
+
}>, z.ZodObject<{
|
|
560
|
+
kind: z.ZodLiteral<ContentStrategyKind.CUSTOM_CONTENT>;
|
|
561
|
+
content: z.ZodString;
|
|
562
|
+
fid: z.ZodOptional<z.ZodString>;
|
|
563
|
+
includeGeneratedMessage: z.ZodOptional<z.ZodBoolean>;
|
|
564
|
+
flowContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
565
|
+
}, "strip", z.ZodTypeAny, {
|
|
566
|
+
kind: ContentStrategyKind.CUSTOM_CONTENT;
|
|
567
|
+
content: string;
|
|
568
|
+
fid?: string | undefined;
|
|
569
|
+
includeGeneratedMessage?: boolean | undefined;
|
|
570
|
+
flowContext?: Record<string, any> | undefined;
|
|
571
|
+
}, {
|
|
572
|
+
kind: ContentStrategyKind.CUSTOM_CONTENT;
|
|
573
|
+
content: string;
|
|
574
|
+
fid?: string | undefined;
|
|
575
|
+
includeGeneratedMessage?: boolean | undefined;
|
|
576
|
+
flowContext?: Record<string, any> | undefined;
|
|
479
577
|
}>]>;
|
|
480
578
|
agentId: z.ZodOptional<z.ZodString>;
|
|
481
579
|
deliveryChannel: z.ZodLiteral<DeliveryStrategyKind.EMAIL>;
|
|
@@ -509,16 +607,22 @@ export declare const _EmailNotificationUpsertDto: z.ZodObject<{
|
|
|
509
607
|
content: string;
|
|
510
608
|
subject?: string | undefined;
|
|
511
609
|
context?: Record<string, string> | undefined;
|
|
512
|
-
flowContext?:
|
|
610
|
+
flowContext?: Record<string, any> | undefined;
|
|
513
611
|
} | {
|
|
514
612
|
kind: ContentStrategyKind.TEMPLATE;
|
|
515
613
|
context: Record<string, string>;
|
|
516
614
|
templateId: string;
|
|
517
|
-
flowContext?:
|
|
615
|
+
flowContext?: Record<string, any> | undefined;
|
|
518
616
|
} | {
|
|
519
617
|
kind: ContentStrategyKind.FINDING;
|
|
520
618
|
fid: string;
|
|
521
|
-
flowContext?:
|
|
619
|
+
flowContext?: Record<string, any> | undefined;
|
|
620
|
+
} | {
|
|
621
|
+
kind: ContentStrategyKind.CUSTOM_CONTENT;
|
|
622
|
+
content: string;
|
|
623
|
+
fid?: string | undefined;
|
|
624
|
+
includeGeneratedMessage?: boolean | undefined;
|
|
625
|
+
flowContext?: Record<string, any> | undefined;
|
|
522
626
|
};
|
|
523
627
|
deliveryChannel: DeliveryStrategyKind.EMAIL;
|
|
524
628
|
deliveryStrategy: {
|
|
@@ -542,16 +646,22 @@ export declare const _EmailNotificationUpsertDto: z.ZodObject<{
|
|
|
542
646
|
content: string;
|
|
543
647
|
subject?: string | undefined;
|
|
544
648
|
context?: Record<string, string> | undefined;
|
|
545
|
-
flowContext?:
|
|
649
|
+
flowContext?: Record<string, any> | undefined;
|
|
546
650
|
} | {
|
|
547
651
|
kind: ContentStrategyKind.TEMPLATE;
|
|
548
652
|
context: Record<string, string>;
|
|
549
653
|
templateId: string;
|
|
550
|
-
flowContext?:
|
|
654
|
+
flowContext?: Record<string, any> | undefined;
|
|
551
655
|
} | {
|
|
552
656
|
kind: ContentStrategyKind.FINDING;
|
|
553
657
|
fid: string;
|
|
554
|
-
flowContext?:
|
|
658
|
+
flowContext?: Record<string, any> | undefined;
|
|
659
|
+
} | {
|
|
660
|
+
kind: ContentStrategyKind.CUSTOM_CONTENT;
|
|
661
|
+
content: string;
|
|
662
|
+
fid?: string | undefined;
|
|
663
|
+
includeGeneratedMessage?: boolean | undefined;
|
|
664
|
+
flowContext?: Record<string, any> | undefined;
|
|
555
665
|
};
|
|
556
666
|
deliveryChannel: DeliveryStrategyKind.EMAIL;
|
|
557
667
|
deliveryStrategy: {
|
|
@@ -583,46 +693,64 @@ export declare const _NotificationUpsertDto: z.ZodDiscriminatedUnion<"deliveryCh
|
|
|
583
693
|
content: z.ZodString;
|
|
584
694
|
subject: z.ZodOptional<z.ZodString>;
|
|
585
695
|
context: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
586
|
-
flowContext: z.ZodOptional<z.ZodRecord<z.
|
|
696
|
+
flowContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
587
697
|
}, "strip", z.ZodTypeAny, {
|
|
588
698
|
kind: ContentStrategyKind.RAW;
|
|
589
699
|
content: string;
|
|
590
700
|
subject?: string | undefined;
|
|
591
701
|
context?: Record<string, string> | undefined;
|
|
592
|
-
flowContext?:
|
|
702
|
+
flowContext?: Record<string, any> | undefined;
|
|
593
703
|
}, {
|
|
594
704
|
kind: ContentStrategyKind.RAW;
|
|
595
705
|
content: string;
|
|
596
706
|
subject?: string | undefined;
|
|
597
707
|
context?: Record<string, string> | undefined;
|
|
598
|
-
flowContext?:
|
|
708
|
+
flowContext?: Record<string, any> | undefined;
|
|
599
709
|
}>, z.ZodObject<{
|
|
600
710
|
kind: z.ZodLiteral<ContentStrategyKind.FINDING>;
|
|
601
711
|
fid: z.ZodString;
|
|
602
|
-
flowContext: z.ZodOptional<z.ZodRecord<z.
|
|
712
|
+
flowContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
603
713
|
}, "strip", z.ZodTypeAny, {
|
|
604
714
|
kind: ContentStrategyKind.FINDING;
|
|
605
715
|
fid: string;
|
|
606
|
-
flowContext?:
|
|
716
|
+
flowContext?: Record<string, any> | undefined;
|
|
607
717
|
}, {
|
|
608
718
|
kind: ContentStrategyKind.FINDING;
|
|
609
719
|
fid: string;
|
|
610
|
-
flowContext?:
|
|
720
|
+
flowContext?: Record<string, any> | undefined;
|
|
611
721
|
}>, z.ZodObject<{
|
|
612
722
|
kind: z.ZodLiteral<ContentStrategyKind.TEMPLATE>;
|
|
613
723
|
templateId: z.ZodString;
|
|
614
724
|
context: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
615
|
-
flowContext: z.ZodOptional<z.ZodRecord<z.
|
|
725
|
+
flowContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
616
726
|
}, "strip", z.ZodTypeAny, {
|
|
617
727
|
kind: ContentStrategyKind.TEMPLATE;
|
|
618
728
|
context: Record<string, string>;
|
|
619
729
|
templateId: string;
|
|
620
|
-
flowContext?:
|
|
730
|
+
flowContext?: Record<string, any> | undefined;
|
|
621
731
|
}, {
|
|
622
732
|
kind: ContentStrategyKind.TEMPLATE;
|
|
623
733
|
context: Record<string, string>;
|
|
624
734
|
templateId: string;
|
|
625
|
-
flowContext?:
|
|
735
|
+
flowContext?: Record<string, any> | undefined;
|
|
736
|
+
}>, z.ZodObject<{
|
|
737
|
+
kind: z.ZodLiteral<ContentStrategyKind.CUSTOM_CONTENT>;
|
|
738
|
+
content: z.ZodString;
|
|
739
|
+
fid: z.ZodOptional<z.ZodString>;
|
|
740
|
+
includeGeneratedMessage: z.ZodOptional<z.ZodBoolean>;
|
|
741
|
+
flowContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
742
|
+
}, "strip", z.ZodTypeAny, {
|
|
743
|
+
kind: ContentStrategyKind.CUSTOM_CONTENT;
|
|
744
|
+
content: string;
|
|
745
|
+
fid?: string | undefined;
|
|
746
|
+
includeGeneratedMessage?: boolean | undefined;
|
|
747
|
+
flowContext?: Record<string, any> | undefined;
|
|
748
|
+
}, {
|
|
749
|
+
kind: ContentStrategyKind.CUSTOM_CONTENT;
|
|
750
|
+
content: string;
|
|
751
|
+
fid?: string | undefined;
|
|
752
|
+
includeGeneratedMessage?: boolean | undefined;
|
|
753
|
+
flowContext?: Record<string, any> | undefined;
|
|
626
754
|
}>]>;
|
|
627
755
|
agentId: z.ZodOptional<z.ZodString>;
|
|
628
756
|
deliveryChannel: z.ZodLiteral<DeliveryStrategyKind.SLACK>;
|
|
@@ -671,16 +799,22 @@ export declare const _NotificationUpsertDto: z.ZodDiscriminatedUnion<"deliveryCh
|
|
|
671
799
|
content: string;
|
|
672
800
|
subject?: string | undefined;
|
|
673
801
|
context?: Record<string, string> | undefined;
|
|
674
|
-
flowContext?:
|
|
802
|
+
flowContext?: Record<string, any> | undefined;
|
|
675
803
|
} | {
|
|
676
804
|
kind: ContentStrategyKind.TEMPLATE;
|
|
677
805
|
context: Record<string, string>;
|
|
678
806
|
templateId: string;
|
|
679
|
-
flowContext?:
|
|
807
|
+
flowContext?: Record<string, any> | undefined;
|
|
680
808
|
} | {
|
|
681
809
|
kind: ContentStrategyKind.FINDING;
|
|
682
810
|
fid: string;
|
|
683
|
-
flowContext?:
|
|
811
|
+
flowContext?: Record<string, any> | undefined;
|
|
812
|
+
} | {
|
|
813
|
+
kind: ContentStrategyKind.CUSTOM_CONTENT;
|
|
814
|
+
content: string;
|
|
815
|
+
fid?: string | undefined;
|
|
816
|
+
includeGeneratedMessage?: boolean | undefined;
|
|
817
|
+
flowContext?: Record<string, any> | undefined;
|
|
684
818
|
};
|
|
685
819
|
deliveryChannel: DeliveryStrategyKind.SLACK;
|
|
686
820
|
deliveryStrategy: {
|
|
@@ -707,16 +841,22 @@ export declare const _NotificationUpsertDto: z.ZodDiscriminatedUnion<"deliveryCh
|
|
|
707
841
|
content: string;
|
|
708
842
|
subject?: string | undefined;
|
|
709
843
|
context?: Record<string, string> | undefined;
|
|
710
|
-
flowContext?:
|
|
844
|
+
flowContext?: Record<string, any> | undefined;
|
|
711
845
|
} | {
|
|
712
846
|
kind: ContentStrategyKind.TEMPLATE;
|
|
713
847
|
context: Record<string, string>;
|
|
714
848
|
templateId: string;
|
|
715
|
-
flowContext?:
|
|
849
|
+
flowContext?: Record<string, any> | undefined;
|
|
716
850
|
} | {
|
|
717
851
|
kind: ContentStrategyKind.FINDING;
|
|
718
852
|
fid: string;
|
|
719
|
-
flowContext?:
|
|
853
|
+
flowContext?: Record<string, any> | undefined;
|
|
854
|
+
} | {
|
|
855
|
+
kind: ContentStrategyKind.CUSTOM_CONTENT;
|
|
856
|
+
content: string;
|
|
857
|
+
fid?: string | undefined;
|
|
858
|
+
includeGeneratedMessage?: boolean | undefined;
|
|
859
|
+
flowContext?: Record<string, any> | undefined;
|
|
720
860
|
};
|
|
721
861
|
deliveryChannel: DeliveryStrategyKind.SLACK;
|
|
722
862
|
deliveryStrategy: {
|
|
@@ -749,46 +889,64 @@ export declare const _NotificationUpsertDto: z.ZodDiscriminatedUnion<"deliveryCh
|
|
|
749
889
|
content: z.ZodString;
|
|
750
890
|
subject: z.ZodOptional<z.ZodString>;
|
|
751
891
|
context: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
752
|
-
flowContext: z.ZodOptional<z.ZodRecord<z.
|
|
892
|
+
flowContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
753
893
|
}, "strip", z.ZodTypeAny, {
|
|
754
894
|
kind: ContentStrategyKind.RAW;
|
|
755
895
|
content: string;
|
|
756
896
|
subject?: string | undefined;
|
|
757
897
|
context?: Record<string, string> | undefined;
|
|
758
|
-
flowContext?:
|
|
898
|
+
flowContext?: Record<string, any> | undefined;
|
|
759
899
|
}, {
|
|
760
900
|
kind: ContentStrategyKind.RAW;
|
|
761
901
|
content: string;
|
|
762
902
|
subject?: string | undefined;
|
|
763
903
|
context?: Record<string, string> | undefined;
|
|
764
|
-
flowContext?:
|
|
904
|
+
flowContext?: Record<string, any> | undefined;
|
|
765
905
|
}>, z.ZodObject<{
|
|
766
906
|
kind: z.ZodLiteral<ContentStrategyKind.FINDING>;
|
|
767
907
|
fid: z.ZodString;
|
|
768
|
-
flowContext: z.ZodOptional<z.ZodRecord<z.
|
|
908
|
+
flowContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
769
909
|
}, "strip", z.ZodTypeAny, {
|
|
770
910
|
kind: ContentStrategyKind.FINDING;
|
|
771
911
|
fid: string;
|
|
772
|
-
flowContext?:
|
|
912
|
+
flowContext?: Record<string, any> | undefined;
|
|
773
913
|
}, {
|
|
774
914
|
kind: ContentStrategyKind.FINDING;
|
|
775
915
|
fid: string;
|
|
776
|
-
flowContext?:
|
|
916
|
+
flowContext?: Record<string, any> | undefined;
|
|
777
917
|
}>, z.ZodObject<{
|
|
778
918
|
kind: z.ZodLiteral<ContentStrategyKind.TEMPLATE>;
|
|
779
919
|
templateId: z.ZodString;
|
|
780
920
|
context: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
781
|
-
flowContext: z.ZodOptional<z.ZodRecord<z.
|
|
921
|
+
flowContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
782
922
|
}, "strip", z.ZodTypeAny, {
|
|
783
923
|
kind: ContentStrategyKind.TEMPLATE;
|
|
784
924
|
context: Record<string, string>;
|
|
785
925
|
templateId: string;
|
|
786
|
-
flowContext?:
|
|
926
|
+
flowContext?: Record<string, any> | undefined;
|
|
787
927
|
}, {
|
|
788
928
|
kind: ContentStrategyKind.TEMPLATE;
|
|
789
929
|
context: Record<string, string>;
|
|
790
930
|
templateId: string;
|
|
791
|
-
flowContext?:
|
|
931
|
+
flowContext?: Record<string, any> | undefined;
|
|
932
|
+
}>, z.ZodObject<{
|
|
933
|
+
kind: z.ZodLiteral<ContentStrategyKind.CUSTOM_CONTENT>;
|
|
934
|
+
content: z.ZodString;
|
|
935
|
+
fid: z.ZodOptional<z.ZodString>;
|
|
936
|
+
includeGeneratedMessage: z.ZodOptional<z.ZodBoolean>;
|
|
937
|
+
flowContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
938
|
+
}, "strip", z.ZodTypeAny, {
|
|
939
|
+
kind: ContentStrategyKind.CUSTOM_CONTENT;
|
|
940
|
+
content: string;
|
|
941
|
+
fid?: string | undefined;
|
|
942
|
+
includeGeneratedMessage?: boolean | undefined;
|
|
943
|
+
flowContext?: Record<string, any> | undefined;
|
|
944
|
+
}, {
|
|
945
|
+
kind: ContentStrategyKind.CUSTOM_CONTENT;
|
|
946
|
+
content: string;
|
|
947
|
+
fid?: string | undefined;
|
|
948
|
+
includeGeneratedMessage?: boolean | undefined;
|
|
949
|
+
flowContext?: Record<string, any> | undefined;
|
|
792
950
|
}>]>;
|
|
793
951
|
agentId: z.ZodOptional<z.ZodString>;
|
|
794
952
|
deliveryChannel: z.ZodLiteral<DeliveryStrategyKind.EMAIL>;
|
|
@@ -822,16 +980,22 @@ export declare const _NotificationUpsertDto: z.ZodDiscriminatedUnion<"deliveryCh
|
|
|
822
980
|
content: string;
|
|
823
981
|
subject?: string | undefined;
|
|
824
982
|
context?: Record<string, string> | undefined;
|
|
825
|
-
flowContext?:
|
|
983
|
+
flowContext?: Record<string, any> | undefined;
|
|
826
984
|
} | {
|
|
827
985
|
kind: ContentStrategyKind.TEMPLATE;
|
|
828
986
|
context: Record<string, string>;
|
|
829
987
|
templateId: string;
|
|
830
|
-
flowContext?:
|
|
988
|
+
flowContext?: Record<string, any> | undefined;
|
|
831
989
|
} | {
|
|
832
990
|
kind: ContentStrategyKind.FINDING;
|
|
833
991
|
fid: string;
|
|
834
|
-
flowContext?:
|
|
992
|
+
flowContext?: Record<string, any> | undefined;
|
|
993
|
+
} | {
|
|
994
|
+
kind: ContentStrategyKind.CUSTOM_CONTENT;
|
|
995
|
+
content: string;
|
|
996
|
+
fid?: string | undefined;
|
|
997
|
+
includeGeneratedMessage?: boolean | undefined;
|
|
998
|
+
flowContext?: Record<string, any> | undefined;
|
|
835
999
|
};
|
|
836
1000
|
deliveryChannel: DeliveryStrategyKind.EMAIL;
|
|
837
1001
|
deliveryStrategy: {
|
|
@@ -855,16 +1019,22 @@ export declare const _NotificationUpsertDto: z.ZodDiscriminatedUnion<"deliveryCh
|
|
|
855
1019
|
content: string;
|
|
856
1020
|
subject?: string | undefined;
|
|
857
1021
|
context?: Record<string, string> | undefined;
|
|
858
|
-
flowContext?:
|
|
1022
|
+
flowContext?: Record<string, any> | undefined;
|
|
859
1023
|
} | {
|
|
860
1024
|
kind: ContentStrategyKind.TEMPLATE;
|
|
861
1025
|
context: Record<string, string>;
|
|
862
1026
|
templateId: string;
|
|
863
|
-
flowContext?:
|
|
1027
|
+
flowContext?: Record<string, any> | undefined;
|
|
864
1028
|
} | {
|
|
865
1029
|
kind: ContentStrategyKind.FINDING;
|
|
866
1030
|
fid: string;
|
|
867
|
-
flowContext?:
|
|
1031
|
+
flowContext?: Record<string, any> | undefined;
|
|
1032
|
+
} | {
|
|
1033
|
+
kind: ContentStrategyKind.CUSTOM_CONTENT;
|
|
1034
|
+
content: string;
|
|
1035
|
+
fid?: string | undefined;
|
|
1036
|
+
includeGeneratedMessage?: boolean | undefined;
|
|
1037
|
+
flowContext?: Record<string, any> | undefined;
|
|
868
1038
|
};
|
|
869
1039
|
deliveryChannel: DeliveryStrategyKind.EMAIL;
|
|
870
1040
|
deliveryStrategy: {
|
|
@@ -896,46 +1066,64 @@ export declare const _NotificationDto: z.ZodIntersection<z.ZodDiscriminatedUnion
|
|
|
896
1066
|
content: z.ZodString;
|
|
897
1067
|
subject: z.ZodOptional<z.ZodString>;
|
|
898
1068
|
context: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
899
|
-
flowContext: z.ZodOptional<z.ZodRecord<z.
|
|
1069
|
+
flowContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
900
1070
|
}, "strip", z.ZodTypeAny, {
|
|
901
1071
|
kind: ContentStrategyKind.RAW;
|
|
902
1072
|
content: string;
|
|
903
1073
|
subject?: string | undefined;
|
|
904
1074
|
context?: Record<string, string> | undefined;
|
|
905
|
-
flowContext?:
|
|
1075
|
+
flowContext?: Record<string, any> | undefined;
|
|
906
1076
|
}, {
|
|
907
1077
|
kind: ContentStrategyKind.RAW;
|
|
908
1078
|
content: string;
|
|
909
1079
|
subject?: string | undefined;
|
|
910
1080
|
context?: Record<string, string> | undefined;
|
|
911
|
-
flowContext?:
|
|
1081
|
+
flowContext?: Record<string, any> | undefined;
|
|
912
1082
|
}>, z.ZodObject<{
|
|
913
1083
|
kind: z.ZodLiteral<ContentStrategyKind.FINDING>;
|
|
914
1084
|
fid: z.ZodString;
|
|
915
|
-
flowContext: z.ZodOptional<z.ZodRecord<z.
|
|
1085
|
+
flowContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
916
1086
|
}, "strip", z.ZodTypeAny, {
|
|
917
1087
|
kind: ContentStrategyKind.FINDING;
|
|
918
1088
|
fid: string;
|
|
919
|
-
flowContext?:
|
|
1089
|
+
flowContext?: Record<string, any> | undefined;
|
|
920
1090
|
}, {
|
|
921
1091
|
kind: ContentStrategyKind.FINDING;
|
|
922
1092
|
fid: string;
|
|
923
|
-
flowContext?:
|
|
1093
|
+
flowContext?: Record<string, any> | undefined;
|
|
924
1094
|
}>, z.ZodObject<{
|
|
925
1095
|
kind: z.ZodLiteral<ContentStrategyKind.TEMPLATE>;
|
|
926
1096
|
templateId: z.ZodString;
|
|
927
1097
|
context: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
928
|
-
flowContext: z.ZodOptional<z.ZodRecord<z.
|
|
1098
|
+
flowContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
929
1099
|
}, "strip", z.ZodTypeAny, {
|
|
930
1100
|
kind: ContentStrategyKind.TEMPLATE;
|
|
931
1101
|
context: Record<string, string>;
|
|
932
1102
|
templateId: string;
|
|
933
|
-
flowContext?:
|
|
1103
|
+
flowContext?: Record<string, any> | undefined;
|
|
934
1104
|
}, {
|
|
935
1105
|
kind: ContentStrategyKind.TEMPLATE;
|
|
936
1106
|
context: Record<string, string>;
|
|
937
1107
|
templateId: string;
|
|
938
|
-
flowContext?:
|
|
1108
|
+
flowContext?: Record<string, any> | undefined;
|
|
1109
|
+
}>, z.ZodObject<{
|
|
1110
|
+
kind: z.ZodLiteral<ContentStrategyKind.CUSTOM_CONTENT>;
|
|
1111
|
+
content: z.ZodString;
|
|
1112
|
+
fid: z.ZodOptional<z.ZodString>;
|
|
1113
|
+
includeGeneratedMessage: z.ZodOptional<z.ZodBoolean>;
|
|
1114
|
+
flowContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
1115
|
+
}, "strip", z.ZodTypeAny, {
|
|
1116
|
+
kind: ContentStrategyKind.CUSTOM_CONTENT;
|
|
1117
|
+
content: string;
|
|
1118
|
+
fid?: string | undefined;
|
|
1119
|
+
includeGeneratedMessage?: boolean | undefined;
|
|
1120
|
+
flowContext?: Record<string, any> | undefined;
|
|
1121
|
+
}, {
|
|
1122
|
+
kind: ContentStrategyKind.CUSTOM_CONTENT;
|
|
1123
|
+
content: string;
|
|
1124
|
+
fid?: string | undefined;
|
|
1125
|
+
includeGeneratedMessage?: boolean | undefined;
|
|
1126
|
+
flowContext?: Record<string, any> | undefined;
|
|
939
1127
|
}>]>;
|
|
940
1128
|
agentId: z.ZodOptional<z.ZodString>;
|
|
941
1129
|
deliveryChannel: z.ZodLiteral<DeliveryStrategyKind.SLACK>;
|
|
@@ -984,16 +1172,22 @@ export declare const _NotificationDto: z.ZodIntersection<z.ZodDiscriminatedUnion
|
|
|
984
1172
|
content: string;
|
|
985
1173
|
subject?: string | undefined;
|
|
986
1174
|
context?: Record<string, string> | undefined;
|
|
987
|
-
flowContext?:
|
|
1175
|
+
flowContext?: Record<string, any> | undefined;
|
|
988
1176
|
} | {
|
|
989
1177
|
kind: ContentStrategyKind.TEMPLATE;
|
|
990
1178
|
context: Record<string, string>;
|
|
991
1179
|
templateId: string;
|
|
992
|
-
flowContext?:
|
|
1180
|
+
flowContext?: Record<string, any> | undefined;
|
|
993
1181
|
} | {
|
|
994
1182
|
kind: ContentStrategyKind.FINDING;
|
|
995
1183
|
fid: string;
|
|
996
|
-
flowContext?:
|
|
1184
|
+
flowContext?: Record<string, any> | undefined;
|
|
1185
|
+
} | {
|
|
1186
|
+
kind: ContentStrategyKind.CUSTOM_CONTENT;
|
|
1187
|
+
content: string;
|
|
1188
|
+
fid?: string | undefined;
|
|
1189
|
+
includeGeneratedMessage?: boolean | undefined;
|
|
1190
|
+
flowContext?: Record<string, any> | undefined;
|
|
997
1191
|
};
|
|
998
1192
|
deliveryChannel: DeliveryStrategyKind.SLACK;
|
|
999
1193
|
deliveryStrategy: {
|
|
@@ -1020,16 +1214,22 @@ export declare const _NotificationDto: z.ZodIntersection<z.ZodDiscriminatedUnion
|
|
|
1020
1214
|
content: string;
|
|
1021
1215
|
subject?: string | undefined;
|
|
1022
1216
|
context?: Record<string, string> | undefined;
|
|
1023
|
-
flowContext?:
|
|
1217
|
+
flowContext?: Record<string, any> | undefined;
|
|
1024
1218
|
} | {
|
|
1025
1219
|
kind: ContentStrategyKind.TEMPLATE;
|
|
1026
1220
|
context: Record<string, string>;
|
|
1027
1221
|
templateId: string;
|
|
1028
|
-
flowContext?:
|
|
1222
|
+
flowContext?: Record<string, any> | undefined;
|
|
1029
1223
|
} | {
|
|
1030
1224
|
kind: ContentStrategyKind.FINDING;
|
|
1031
1225
|
fid: string;
|
|
1032
|
-
flowContext?:
|
|
1226
|
+
flowContext?: Record<string, any> | undefined;
|
|
1227
|
+
} | {
|
|
1228
|
+
kind: ContentStrategyKind.CUSTOM_CONTENT;
|
|
1229
|
+
content: string;
|
|
1230
|
+
fid?: string | undefined;
|
|
1231
|
+
includeGeneratedMessage?: boolean | undefined;
|
|
1232
|
+
flowContext?: Record<string, any> | undefined;
|
|
1033
1233
|
};
|
|
1034
1234
|
deliveryChannel: DeliveryStrategyKind.SLACK;
|
|
1035
1235
|
deliveryStrategy: {
|
|
@@ -1062,46 +1262,64 @@ export declare const _NotificationDto: z.ZodIntersection<z.ZodDiscriminatedUnion
|
|
|
1062
1262
|
content: z.ZodString;
|
|
1063
1263
|
subject: z.ZodOptional<z.ZodString>;
|
|
1064
1264
|
context: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1065
|
-
flowContext: z.ZodOptional<z.ZodRecord<z.
|
|
1265
|
+
flowContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
1066
1266
|
}, "strip", z.ZodTypeAny, {
|
|
1067
1267
|
kind: ContentStrategyKind.RAW;
|
|
1068
1268
|
content: string;
|
|
1069
1269
|
subject?: string | undefined;
|
|
1070
1270
|
context?: Record<string, string> | undefined;
|
|
1071
|
-
flowContext?:
|
|
1271
|
+
flowContext?: Record<string, any> | undefined;
|
|
1072
1272
|
}, {
|
|
1073
1273
|
kind: ContentStrategyKind.RAW;
|
|
1074
1274
|
content: string;
|
|
1075
1275
|
subject?: string | undefined;
|
|
1076
1276
|
context?: Record<string, string> | undefined;
|
|
1077
|
-
flowContext?:
|
|
1277
|
+
flowContext?: Record<string, any> | undefined;
|
|
1078
1278
|
}>, z.ZodObject<{
|
|
1079
1279
|
kind: z.ZodLiteral<ContentStrategyKind.FINDING>;
|
|
1080
1280
|
fid: z.ZodString;
|
|
1081
|
-
flowContext: z.ZodOptional<z.ZodRecord<z.
|
|
1281
|
+
flowContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
1082
1282
|
}, "strip", z.ZodTypeAny, {
|
|
1083
1283
|
kind: ContentStrategyKind.FINDING;
|
|
1084
1284
|
fid: string;
|
|
1085
|
-
flowContext?:
|
|
1285
|
+
flowContext?: Record<string, any> | undefined;
|
|
1086
1286
|
}, {
|
|
1087
1287
|
kind: ContentStrategyKind.FINDING;
|
|
1088
1288
|
fid: string;
|
|
1089
|
-
flowContext?:
|
|
1289
|
+
flowContext?: Record<string, any> | undefined;
|
|
1090
1290
|
}>, z.ZodObject<{
|
|
1091
1291
|
kind: z.ZodLiteral<ContentStrategyKind.TEMPLATE>;
|
|
1092
1292
|
templateId: z.ZodString;
|
|
1093
1293
|
context: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
1094
|
-
flowContext: z.ZodOptional<z.ZodRecord<z.
|
|
1294
|
+
flowContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
1095
1295
|
}, "strip", z.ZodTypeAny, {
|
|
1096
1296
|
kind: ContentStrategyKind.TEMPLATE;
|
|
1097
1297
|
context: Record<string, string>;
|
|
1098
1298
|
templateId: string;
|
|
1099
|
-
flowContext?:
|
|
1299
|
+
flowContext?: Record<string, any> | undefined;
|
|
1100
1300
|
}, {
|
|
1101
1301
|
kind: ContentStrategyKind.TEMPLATE;
|
|
1102
1302
|
context: Record<string, string>;
|
|
1103
1303
|
templateId: string;
|
|
1104
|
-
flowContext?:
|
|
1304
|
+
flowContext?: Record<string, any> | undefined;
|
|
1305
|
+
}>, z.ZodObject<{
|
|
1306
|
+
kind: z.ZodLiteral<ContentStrategyKind.CUSTOM_CONTENT>;
|
|
1307
|
+
content: z.ZodString;
|
|
1308
|
+
fid: z.ZodOptional<z.ZodString>;
|
|
1309
|
+
includeGeneratedMessage: z.ZodOptional<z.ZodBoolean>;
|
|
1310
|
+
flowContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
1311
|
+
}, "strip", z.ZodTypeAny, {
|
|
1312
|
+
kind: ContentStrategyKind.CUSTOM_CONTENT;
|
|
1313
|
+
content: string;
|
|
1314
|
+
fid?: string | undefined;
|
|
1315
|
+
includeGeneratedMessage?: boolean | undefined;
|
|
1316
|
+
flowContext?: Record<string, any> | undefined;
|
|
1317
|
+
}, {
|
|
1318
|
+
kind: ContentStrategyKind.CUSTOM_CONTENT;
|
|
1319
|
+
content: string;
|
|
1320
|
+
fid?: string | undefined;
|
|
1321
|
+
includeGeneratedMessage?: boolean | undefined;
|
|
1322
|
+
flowContext?: Record<string, any> | undefined;
|
|
1105
1323
|
}>]>;
|
|
1106
1324
|
agentId: z.ZodOptional<z.ZodString>;
|
|
1107
1325
|
deliveryChannel: z.ZodLiteral<DeliveryStrategyKind.EMAIL>;
|
|
@@ -1135,16 +1353,22 @@ export declare const _NotificationDto: z.ZodIntersection<z.ZodDiscriminatedUnion
|
|
|
1135
1353
|
content: string;
|
|
1136
1354
|
subject?: string | undefined;
|
|
1137
1355
|
context?: Record<string, string> | undefined;
|
|
1138
|
-
flowContext?:
|
|
1356
|
+
flowContext?: Record<string, any> | undefined;
|
|
1139
1357
|
} | {
|
|
1140
1358
|
kind: ContentStrategyKind.TEMPLATE;
|
|
1141
1359
|
context: Record<string, string>;
|
|
1142
1360
|
templateId: string;
|
|
1143
|
-
flowContext?:
|
|
1361
|
+
flowContext?: Record<string, any> | undefined;
|
|
1144
1362
|
} | {
|
|
1145
1363
|
kind: ContentStrategyKind.FINDING;
|
|
1146
1364
|
fid: string;
|
|
1147
|
-
flowContext?:
|
|
1365
|
+
flowContext?: Record<string, any> | undefined;
|
|
1366
|
+
} | {
|
|
1367
|
+
kind: ContentStrategyKind.CUSTOM_CONTENT;
|
|
1368
|
+
content: string;
|
|
1369
|
+
fid?: string | undefined;
|
|
1370
|
+
includeGeneratedMessage?: boolean | undefined;
|
|
1371
|
+
flowContext?: Record<string, any> | undefined;
|
|
1148
1372
|
};
|
|
1149
1373
|
deliveryChannel: DeliveryStrategyKind.EMAIL;
|
|
1150
1374
|
deliveryStrategy: {
|
|
@@ -1168,16 +1392,22 @@ export declare const _NotificationDto: z.ZodIntersection<z.ZodDiscriminatedUnion
|
|
|
1168
1392
|
content: string;
|
|
1169
1393
|
subject?: string | undefined;
|
|
1170
1394
|
context?: Record<string, string> | undefined;
|
|
1171
|
-
flowContext?:
|
|
1395
|
+
flowContext?: Record<string, any> | undefined;
|
|
1172
1396
|
} | {
|
|
1173
1397
|
kind: ContentStrategyKind.TEMPLATE;
|
|
1174
1398
|
context: Record<string, string>;
|
|
1175
1399
|
templateId: string;
|
|
1176
|
-
flowContext?:
|
|
1400
|
+
flowContext?: Record<string, any> | undefined;
|
|
1177
1401
|
} | {
|
|
1178
1402
|
kind: ContentStrategyKind.FINDING;
|
|
1179
1403
|
fid: string;
|
|
1180
|
-
flowContext?:
|
|
1404
|
+
flowContext?: Record<string, any> | undefined;
|
|
1405
|
+
} | {
|
|
1406
|
+
kind: ContentStrategyKind.CUSTOM_CONTENT;
|
|
1407
|
+
content: string;
|
|
1408
|
+
fid?: string | undefined;
|
|
1409
|
+
includeGeneratedMessage?: boolean | undefined;
|
|
1410
|
+
flowContext?: Record<string, any> | undefined;
|
|
1181
1411
|
};
|
|
1182
1412
|
deliveryChannel: DeliveryStrategyKind.EMAIL;
|
|
1183
1413
|
deliveryStrategy: {
|
|
@@ -1223,19 +1453,19 @@ export declare const _CreateNotificationDto: z.ZodObject<{
|
|
|
1223
1453
|
content: z.ZodString;
|
|
1224
1454
|
subject: z.ZodOptional<z.ZodString>;
|
|
1225
1455
|
context: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1226
|
-
flowContext: z.ZodOptional<z.ZodRecord<z.
|
|
1456
|
+
flowContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
1227
1457
|
}, "strip", z.ZodTypeAny, {
|
|
1228
1458
|
kind: ContentStrategyKind.RAW;
|
|
1229
1459
|
content: string;
|
|
1230
1460
|
subject?: string | undefined;
|
|
1231
1461
|
context?: Record<string, string> | undefined;
|
|
1232
|
-
flowContext?:
|
|
1462
|
+
flowContext?: Record<string, any> | undefined;
|
|
1233
1463
|
}, {
|
|
1234
1464
|
kind: ContentStrategyKind.RAW;
|
|
1235
1465
|
content: string;
|
|
1236
1466
|
subject?: string | undefined;
|
|
1237
1467
|
context?: Record<string, string> | undefined;
|
|
1238
|
-
flowContext?:
|
|
1468
|
+
flowContext?: Record<string, any> | undefined;
|
|
1239
1469
|
}>;
|
|
1240
1470
|
options: z.ZodObject<{
|
|
1241
1471
|
copySecOpsTeam: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -1257,7 +1487,7 @@ export declare const _CreateNotificationDto: z.ZodObject<{
|
|
|
1257
1487
|
content: string;
|
|
1258
1488
|
subject?: string | undefined;
|
|
1259
1489
|
context?: Record<string, string> | undefined;
|
|
1260
|
-
flowContext?:
|
|
1490
|
+
flowContext?: Record<string, any> | undefined;
|
|
1261
1491
|
};
|
|
1262
1492
|
channel: DeliveryStrategyKind;
|
|
1263
1493
|
id?: string | undefined;
|
|
@@ -1278,7 +1508,7 @@ export declare const _CreateNotificationDto: z.ZodObject<{
|
|
|
1278
1508
|
content: string;
|
|
1279
1509
|
subject?: string | undefined;
|
|
1280
1510
|
context?: Record<string, string> | undefined;
|
|
1281
|
-
flowContext?:
|
|
1511
|
+
flowContext?: Record<string, any> | undefined;
|
|
1282
1512
|
};
|
|
1283
1513
|
channel: DeliveryStrategyKind;
|
|
1284
1514
|
id?: string | undefined;
|
|
@@ -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.
|
|
3
|
+
exports._CreateNotificationDto = exports._NotificationDto = exports._NotificationUpsertDto = exports._EmailNotificationUpsertDto = exports._SlackNotificationUpsertDto = exports._BaseNotificationUpsertDto = exports._EmailDeliveryStrategy = exports._SlackDeliveryStrategy = exports._CustomContentStrategy = exports._FindingContentStrategy = exports._TemplateContentStrategy = exports._RawContentStrategy = exports._FlowContext = 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;
|
|
@@ -15,6 +15,7 @@ var ContentStrategyKind;
|
|
|
15
15
|
ContentStrategyKind["RAW"] = "RAW";
|
|
16
16
|
ContentStrategyKind["TEMPLATE"] = "TEMPLATE";
|
|
17
17
|
ContentStrategyKind["FINDING"] = "FINDING";
|
|
18
|
+
ContentStrategyKind["CUSTOM_CONTENT"] = "CUSTOM_CONTENT";
|
|
18
19
|
})(ContentStrategyKind || (exports.ContentStrategyKind = ContentStrategyKind = {}));
|
|
19
20
|
var DeliveryStrategyKind;
|
|
20
21
|
(function (DeliveryStrategyKind) {
|
|
@@ -29,8 +30,11 @@ exports._NotificationAddress = zod_1.z.object({
|
|
|
29
30
|
users: zod_1.z.array(zod_1.z.union([zod_1.z.string(), zod_1.z.number()])).optional(),
|
|
30
31
|
webhooks: zod_1.z.array(zod_1.z.string()).optional(),
|
|
31
32
|
});
|
|
32
|
-
|
|
33
|
-
|
|
33
|
+
// export const _FlowContextKey = z.enum(['TONE', 'ACTION_GET_INSTRUCTIONS_ENABLED', 'GHOST_MODE_ENABLED', 'ROOT_NOTIFICATION_ID', 'REMINDER_COUNT']);
|
|
34
|
+
// Use a generic string key for flow context temporarily to reduce dev time
|
|
35
|
+
// until engagement flow builder base functionality is implemented
|
|
36
|
+
// TODO : Switch back to enum key (or a more well defined schema) once the engagement functionality is stable
|
|
37
|
+
exports._FlowContext = zod_1.z.record(zod_1.z.string(), zod_1.z.any());
|
|
34
38
|
exports._RawContentStrategy = zod_1.z.object({
|
|
35
39
|
kind: zod_1.z.literal(ContentStrategyKind.RAW),
|
|
36
40
|
content: zod_1.z.string(),
|
|
@@ -50,6 +54,13 @@ exports._FindingContentStrategy = zod_1.z.object({
|
|
|
50
54
|
fid: zod_1.z.string(),
|
|
51
55
|
flowContext: exports._FlowContext.optional(),
|
|
52
56
|
});
|
|
57
|
+
exports._CustomContentStrategy = zod_1.z.object({
|
|
58
|
+
kind: zod_1.z.literal(ContentStrategyKind.CUSTOM_CONTENT),
|
|
59
|
+
content: zod_1.z.string(),
|
|
60
|
+
fid: zod_1.z.string().optional(),
|
|
61
|
+
includeGeneratedMessage: zod_1.z.boolean().optional(),
|
|
62
|
+
flowContext: exports._FlowContext.optional(),
|
|
63
|
+
});
|
|
53
64
|
const _BaseDeliveryStrategy = zod_1.z.object({
|
|
54
65
|
copySecOpsTeam: zod_1.z.boolean().optional(),
|
|
55
66
|
});
|
|
@@ -71,7 +82,7 @@ exports._EmailDeliveryStrategy = _BaseDeliveryStrategy.merge(zod_1.z.object({
|
|
|
71
82
|
exports._BaseNotificationUpsertDto = base_dto_1._BaseUpsertDto.merge(zod_1.z.object({
|
|
72
83
|
status: zod_1.z.nativeEnum(NotificationStatus),
|
|
73
84
|
// TODO when will this happen? or will it happen at all? https://github.com/colinhacks/zod/issues/2106 🤷♂️
|
|
74
|
-
contentStrategy: zod_1.z.discriminatedUnion('kind', [exports._RawContentStrategy, exports._FindingContentStrategy, exports._TemplateContentStrategy]),
|
|
85
|
+
contentStrategy: zod_1.z.discriminatedUnion('kind', [exports._RawContentStrategy, exports._FindingContentStrategy, exports._TemplateContentStrategy, exports._CustomContentStrategy]),
|
|
75
86
|
fid: zod_1.z.string().optional(),
|
|
76
87
|
uid: zod_1.z.string().optional(),
|
|
77
88
|
agentId: zod_1.z.string().optional(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notification.dto.js","sourceRoot":"","sources":["../../../src/dto/notification.dto.ts"],"names":[],"mappings":";;;AAAA,6BAAsB;AACtB,yCAA6D;AAE7D,IAAY,kBAKX;AALD,WAAY,kBAAkB;IAC5B,yCAAmB,CAAA;IACnB,yCAAmB,CAAA;IACnB,mCAAa,CAAA;IACb,mCAAa,CAAA;AACf,CAAC,EALW,kBAAkB,kCAAlB,kBAAkB,QAK7B;AAED,IAAY,
|
|
1
|
+
{"version":3,"file":"notification.dto.js","sourceRoot":"","sources":["../../../src/dto/notification.dto.ts"],"names":[],"mappings":"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"}
|
package/package.json
CHANGED
|
@@ -12,6 +12,7 @@ export enum ContentStrategyKind {
|
|
|
12
12
|
RAW = 'RAW',
|
|
13
13
|
TEMPLATE = 'TEMPLATE',
|
|
14
14
|
FINDING = 'FINDING',
|
|
15
|
+
CUSTOM_CONTENT = 'CUSTOM_CONTENT',
|
|
15
16
|
}
|
|
16
17
|
|
|
17
18
|
export enum DeliveryStrategyKind {
|
|
@@ -28,8 +29,11 @@ export const _NotificationAddress = z.object({
|
|
|
28
29
|
webhooks: z.array(z.string()).optional(),
|
|
29
30
|
});
|
|
30
31
|
|
|
31
|
-
export const _FlowContextKey = z.enum(['TONE', 'ACTION_GET_INSTRUCTIONS_ENABLED', 'GHOST_MODE_ENABLED', 'REMINDER_COUNT']);
|
|
32
|
-
|
|
32
|
+
// export const _FlowContextKey = z.enum(['TONE', 'ACTION_GET_INSTRUCTIONS_ENABLED', 'GHOST_MODE_ENABLED', 'ROOT_NOTIFICATION_ID', 'REMINDER_COUNT']);
|
|
33
|
+
// Use a generic string key for flow context temporarily to reduce dev time
|
|
34
|
+
// until engagement flow builder base functionality is implemented
|
|
35
|
+
// TODO : Switch back to enum key (or a more well defined schema) once the engagement functionality is stable
|
|
36
|
+
export const _FlowContext = z.record(z.string(), z.any());
|
|
33
37
|
|
|
34
38
|
export const _RawContentStrategy = z.object({
|
|
35
39
|
kind: z.literal(ContentStrategyKind.RAW),
|
|
@@ -56,6 +60,15 @@ export const _FindingContentStrategy = z.object({
|
|
|
56
60
|
});
|
|
57
61
|
export type FindingContentStrategy = z.infer<typeof _FindingContentStrategy>;
|
|
58
62
|
|
|
63
|
+
export const _CustomContentStrategy = z.object({
|
|
64
|
+
kind: z.literal(ContentStrategyKind.CUSTOM_CONTENT),
|
|
65
|
+
content: z.string(),
|
|
66
|
+
fid: z.string().optional(),
|
|
67
|
+
includeGeneratedMessage: z.boolean().optional(),
|
|
68
|
+
flowContext: _FlowContext.optional(),
|
|
69
|
+
});
|
|
70
|
+
export type CustomContentStrategy = z.infer<typeof _CustomContentStrategy>;
|
|
71
|
+
|
|
59
72
|
const _BaseDeliveryStrategy = z.object({
|
|
60
73
|
copySecOpsTeam: z.boolean().optional(),
|
|
61
74
|
});
|
|
@@ -87,7 +100,7 @@ export const _BaseNotificationUpsertDto = _BaseUpsertDto.merge(
|
|
|
87
100
|
z.object({
|
|
88
101
|
status: z.nativeEnum(NotificationStatus),
|
|
89
102
|
// TODO when will this happen? or will it happen at all? https://github.com/colinhacks/zod/issues/2106 🤷♂️
|
|
90
|
-
contentStrategy: z.discriminatedUnion('kind', [_RawContentStrategy, _FindingContentStrategy, _TemplateContentStrategy]),
|
|
103
|
+
contentStrategy: z.discriminatedUnion('kind', [_RawContentStrategy, _FindingContentStrategy, _TemplateContentStrategy, _CustomContentStrategy]),
|
|
91
104
|
fid: z.string().optional(),
|
|
92
105
|
uid: z.string().optional(),
|
|
93
106
|
agentId: z.string().optional(),
|