@ampsec/platform-client 62.12.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",
@@ -85,6 +86,26 @@ export declare const _FindingContentStrategy: z.ZodObject<{
85
86
  flowContext?: Record<string, any> | undefined;
86
87
  }>;
87
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>;
88
109
  export declare const _SlackDeliveryStrategy: z.ZodObject<{
89
110
  copySecOpsTeam: z.ZodOptional<z.ZodBoolean>;
90
111
  to: z.ZodObject<{
@@ -199,6 +220,24 @@ export declare const _BaseNotificationUpsertDto: z.ZodObject<{
199
220
  context: Record<string, string>;
200
221
  templateId: string;
201
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;
202
241
  }>]>;
203
242
  fid: z.ZodOptional<z.ZodString>;
204
243
  uid: z.ZodOptional<z.ZodString>;
@@ -220,6 +259,12 @@ export declare const _BaseNotificationUpsertDto: z.ZodObject<{
220
259
  kind: ContentStrategyKind.FINDING;
221
260
  fid: string;
222
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;
223
268
  };
224
269
  id?: string | undefined;
225
270
  createdAt?: string | undefined;
@@ -245,6 +290,12 @@ export declare const _BaseNotificationUpsertDto: z.ZodObject<{
245
290
  kind: ContentStrategyKind.FINDING;
246
291
  fid: string;
247
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;
248
299
  };
249
300
  id?: string | undefined;
250
301
  createdAt?: string | undefined;
@@ -307,6 +358,24 @@ export declare const _SlackNotificationUpsertDto: z.ZodObject<{
307
358
  context: Record<string, string>;
308
359
  templateId: string;
309
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;
310
379
  }>]>;
311
380
  agentId: z.ZodOptional<z.ZodString>;
312
381
  deliveryChannel: z.ZodLiteral<DeliveryStrategyKind.SLACK>;
@@ -365,6 +434,12 @@ export declare const _SlackNotificationUpsertDto: z.ZodObject<{
365
434
  kind: ContentStrategyKind.FINDING;
366
435
  fid: string;
367
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;
368
443
  };
369
444
  deliveryChannel: DeliveryStrategyKind.SLACK;
370
445
  deliveryStrategy: {
@@ -401,6 +476,12 @@ export declare const _SlackNotificationUpsertDto: z.ZodObject<{
401
476
  kind: ContentStrategyKind.FINDING;
402
477
  fid: string;
403
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;
404
485
  };
405
486
  deliveryChannel: DeliveryStrategyKind.SLACK;
406
487
  deliveryStrategy: {
@@ -475,6 +556,24 @@ export declare const _EmailNotificationUpsertDto: z.ZodObject<{
475
556
  context: Record<string, string>;
476
557
  templateId: string;
477
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;
478
577
  }>]>;
479
578
  agentId: z.ZodOptional<z.ZodString>;
480
579
  deliveryChannel: z.ZodLiteral<DeliveryStrategyKind.EMAIL>;
@@ -518,6 +617,12 @@ export declare const _EmailNotificationUpsertDto: z.ZodObject<{
518
617
  kind: ContentStrategyKind.FINDING;
519
618
  fid: string;
520
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;
521
626
  };
522
627
  deliveryChannel: DeliveryStrategyKind.EMAIL;
523
628
  deliveryStrategy: {
@@ -551,6 +656,12 @@ export declare const _EmailNotificationUpsertDto: z.ZodObject<{
551
656
  kind: ContentStrategyKind.FINDING;
552
657
  fid: string;
553
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;
554
665
  };
555
666
  deliveryChannel: DeliveryStrategyKind.EMAIL;
556
667
  deliveryStrategy: {
@@ -622,6 +733,24 @@ export declare const _NotificationUpsertDto: z.ZodDiscriminatedUnion<"deliveryCh
622
733
  context: Record<string, string>;
623
734
  templateId: string;
624
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;
625
754
  }>]>;
626
755
  agentId: z.ZodOptional<z.ZodString>;
627
756
  deliveryChannel: z.ZodLiteral<DeliveryStrategyKind.SLACK>;
@@ -680,6 +809,12 @@ export declare const _NotificationUpsertDto: z.ZodDiscriminatedUnion<"deliveryCh
680
809
  kind: ContentStrategyKind.FINDING;
681
810
  fid: string;
682
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;
683
818
  };
684
819
  deliveryChannel: DeliveryStrategyKind.SLACK;
685
820
  deliveryStrategy: {
@@ -716,6 +851,12 @@ export declare const _NotificationUpsertDto: z.ZodDiscriminatedUnion<"deliveryCh
716
851
  kind: ContentStrategyKind.FINDING;
717
852
  fid: string;
718
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;
719
860
  };
720
861
  deliveryChannel: DeliveryStrategyKind.SLACK;
721
862
  deliveryStrategy: {
@@ -788,6 +929,24 @@ export declare const _NotificationUpsertDto: z.ZodDiscriminatedUnion<"deliveryCh
788
929
  context: Record<string, string>;
789
930
  templateId: string;
790
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;
791
950
  }>]>;
792
951
  agentId: z.ZodOptional<z.ZodString>;
793
952
  deliveryChannel: z.ZodLiteral<DeliveryStrategyKind.EMAIL>;
@@ -831,6 +990,12 @@ export declare const _NotificationUpsertDto: z.ZodDiscriminatedUnion<"deliveryCh
831
990
  kind: ContentStrategyKind.FINDING;
832
991
  fid: string;
833
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;
834
999
  };
835
1000
  deliveryChannel: DeliveryStrategyKind.EMAIL;
836
1001
  deliveryStrategy: {
@@ -864,6 +1029,12 @@ export declare const _NotificationUpsertDto: z.ZodDiscriminatedUnion<"deliveryCh
864
1029
  kind: ContentStrategyKind.FINDING;
865
1030
  fid: string;
866
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;
867
1038
  };
868
1039
  deliveryChannel: DeliveryStrategyKind.EMAIL;
869
1040
  deliveryStrategy: {
@@ -935,6 +1106,24 @@ export declare const _NotificationDto: z.ZodIntersection<z.ZodDiscriminatedUnion
935
1106
  context: Record<string, string>;
936
1107
  templateId: string;
937
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;
938
1127
  }>]>;
939
1128
  agentId: z.ZodOptional<z.ZodString>;
940
1129
  deliveryChannel: z.ZodLiteral<DeliveryStrategyKind.SLACK>;
@@ -993,6 +1182,12 @@ export declare const _NotificationDto: z.ZodIntersection<z.ZodDiscriminatedUnion
993
1182
  kind: ContentStrategyKind.FINDING;
994
1183
  fid: string;
995
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;
996
1191
  };
997
1192
  deliveryChannel: DeliveryStrategyKind.SLACK;
998
1193
  deliveryStrategy: {
@@ -1029,6 +1224,12 @@ export declare const _NotificationDto: z.ZodIntersection<z.ZodDiscriminatedUnion
1029
1224
  kind: ContentStrategyKind.FINDING;
1030
1225
  fid: string;
1031
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;
1032
1233
  };
1033
1234
  deliveryChannel: DeliveryStrategyKind.SLACK;
1034
1235
  deliveryStrategy: {
@@ -1101,6 +1302,24 @@ export declare const _NotificationDto: z.ZodIntersection<z.ZodDiscriminatedUnion
1101
1302
  context: Record<string, string>;
1102
1303
  templateId: string;
1103
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;
1104
1323
  }>]>;
1105
1324
  agentId: z.ZodOptional<z.ZodString>;
1106
1325
  deliveryChannel: z.ZodLiteral<DeliveryStrategyKind.EMAIL>;
@@ -1144,6 +1363,12 @@ export declare const _NotificationDto: z.ZodIntersection<z.ZodDiscriminatedUnion
1144
1363
  kind: ContentStrategyKind.FINDING;
1145
1364
  fid: string;
1146
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;
1147
1372
  };
1148
1373
  deliveryChannel: DeliveryStrategyKind.EMAIL;
1149
1374
  deliveryStrategy: {
@@ -1177,6 +1402,12 @@ export declare const _NotificationDto: z.ZodIntersection<z.ZodDiscriminatedUnion
1177
1402
  kind: ContentStrategyKind.FINDING;
1178
1403
  fid: string;
1179
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;
1180
1411
  };
1181
1412
  deliveryChannel: DeliveryStrategyKind.EMAIL;
1182
1413
  deliveryStrategy: {
@@ -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._FlowContext = 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._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) {
@@ -53,6 +54,13 @@ exports._FindingContentStrategy = zod_1.z.object({
53
54
  fid: zod_1.z.string(),
54
55
  flowContext: exports._FlowContext.optional(),
55
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
+ });
56
64
  const _BaseDeliveryStrategy = zod_1.z.object({
57
65
  copySecOpsTeam: zod_1.z.boolean().optional(),
58
66
  });
@@ -74,7 +82,7 @@ exports._EmailDeliveryStrategy = _BaseDeliveryStrategy.merge(zod_1.z.object({
74
82
  exports._BaseNotificationUpsertDto = base_dto_1._BaseUpsertDto.merge(zod_1.z.object({
75
83
  status: zod_1.z.nativeEnum(NotificationStatus),
76
84
  // TODO when will this happen? or will it happen at all? https://github.com/colinhacks/zod/issues/2106 🤷‍♂️
77
- 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]),
78
86
  fid: zod_1.z.string().optional(),
79
87
  uid: zod_1.z.string().optional(),
80
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,mBAIX;AAJD,WAAY,mBAAmB;IAC7B,kCAAW,CAAA;IACX,4CAAqB,CAAA;IACrB,0CAAmB,CAAA;AACrB,CAAC,EAJW,mBAAmB,mCAAnB,mBAAmB,QAI9B;AAED,IAAY,oBAKX;AALD,WAAY,oBAAoB;IAC9B,uCAAe,CAAA;IACf,oCAAoC;IACpC,+CAAuB,CAAA;IACvB,uCAAe,CAAA;AACjB,CAAC,EALW,oBAAoB,oCAApB,oBAAoB,QAK/B;AAEY,QAAA,oBAAoB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC3C,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,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OAAC,CAAC,kBAAkB,CAAC,iBAAiB,EAAE,CAAC,mCAA2B,EAAE,mCAA2B,CAAC,CAAC,CAAC;AAG7H,QAAA,gBAAgB,GAAG,8BAAsB,CAAC,GAAG,CAAC,mBAAQ,CAAC,CAAC;AAGxD,QAAA,sBAAsB,GAAG,yBAAc,CAAC,KAAK,CACxD,OAAC,CAAC,MAAM,CAAC;IACP,IAAI,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IAC5B,OAAO,EAAE,OAAC,CAAC,UAAU,CAAC,oBAAoB,CAAC;IAC3C,OAAO,EAAE,2BAAmB;IAC5B,OAAO,EAAE,OAAC,CAAC,MAAM,CAAC;QAChB,cAAc,EAAE,OAAC,CAAC,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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ampsec/platform-client",
3
- "version": "62.12.0",
3
+ "version": "62.13.0",
4
4
  "description": "",
5
5
  "main": "build/src/index.js",
6
6
  "runkitExampleFilename": "example/main.js",
@@ -53,4 +53,4 @@
53
53
  "/src",
54
54
  "/example"
55
55
  ]
56
- }
56
+ }
@@ -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 {
@@ -59,6 +60,15 @@ export const _FindingContentStrategy = z.object({
59
60
  });
60
61
  export type FindingContentStrategy = z.infer<typeof _FindingContentStrategy>;
61
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
+
62
72
  const _BaseDeliveryStrategy = z.object({
63
73
  copySecOpsTeam: z.boolean().optional(),
64
74
  });
@@ -90,7 +100,7 @@ export const _BaseNotificationUpsertDto = _BaseUpsertDto.merge(
90
100
  z.object({
91
101
  status: z.nativeEnum(NotificationStatus),
92
102
  // TODO when will this happen? or will it happen at all? https://github.com/colinhacks/zod/issues/2106 🤷‍♂️
93
- contentStrategy: z.discriminatedUnion('kind', [_RawContentStrategy, _FindingContentStrategy, _TemplateContentStrategy]),
103
+ contentStrategy: z.discriminatedUnion('kind', [_RawContentStrategy, _FindingContentStrategy, _TemplateContentStrategy, _CustomContentStrategy]),
94
104
  fid: z.string().optional(),
95
105
  uid: z.string().optional(),
96
106
  agentId: z.string().optional(),