@ampsec/platform-client 62.12.0 → 62.14.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,23 @@ 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
+ flowContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
94
+ }, "strip", z.ZodTypeAny, {
95
+ kind: ContentStrategyKind.CUSTOM_CONTENT;
96
+ content: string;
97
+ fid?: string | undefined;
98
+ flowContext?: Record<string, any> | undefined;
99
+ }, {
100
+ kind: ContentStrategyKind.CUSTOM_CONTENT;
101
+ content: string;
102
+ fid?: string | undefined;
103
+ flowContext?: Record<string, any> | undefined;
104
+ }>;
105
+ export type CustomContentStrategy = z.infer<typeof _CustomContentStrategy>;
88
106
  export declare const _SlackDeliveryStrategy: z.ZodObject<{
89
107
  copySecOpsTeam: z.ZodOptional<z.ZodBoolean>;
90
108
  to: z.ZodObject<{
@@ -199,6 +217,21 @@ export declare const _BaseNotificationUpsertDto: z.ZodObject<{
199
217
  context: Record<string, string>;
200
218
  templateId: string;
201
219
  flowContext?: Record<string, any> | undefined;
220
+ }>, z.ZodObject<{
221
+ kind: z.ZodLiteral<ContentStrategyKind.CUSTOM_CONTENT>;
222
+ content: z.ZodString;
223
+ fid: z.ZodOptional<z.ZodString>;
224
+ flowContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
225
+ }, "strip", z.ZodTypeAny, {
226
+ kind: ContentStrategyKind.CUSTOM_CONTENT;
227
+ content: string;
228
+ fid?: string | undefined;
229
+ flowContext?: Record<string, any> | undefined;
230
+ }, {
231
+ kind: ContentStrategyKind.CUSTOM_CONTENT;
232
+ content: string;
233
+ fid?: string | undefined;
234
+ flowContext?: Record<string, any> | undefined;
202
235
  }>]>;
203
236
  fid: z.ZodOptional<z.ZodString>;
204
237
  uid: z.ZodOptional<z.ZodString>;
@@ -220,6 +253,11 @@ export declare const _BaseNotificationUpsertDto: z.ZodObject<{
220
253
  kind: ContentStrategyKind.FINDING;
221
254
  fid: string;
222
255
  flowContext?: Record<string, any> | undefined;
256
+ } | {
257
+ kind: ContentStrategyKind.CUSTOM_CONTENT;
258
+ content: string;
259
+ fid?: string | undefined;
260
+ flowContext?: Record<string, any> | undefined;
223
261
  };
224
262
  id?: string | undefined;
225
263
  createdAt?: string | undefined;
@@ -245,6 +283,11 @@ export declare const _BaseNotificationUpsertDto: z.ZodObject<{
245
283
  kind: ContentStrategyKind.FINDING;
246
284
  fid: string;
247
285
  flowContext?: Record<string, any> | undefined;
286
+ } | {
287
+ kind: ContentStrategyKind.CUSTOM_CONTENT;
288
+ content: string;
289
+ fid?: string | undefined;
290
+ flowContext?: Record<string, any> | undefined;
248
291
  };
249
292
  id?: string | undefined;
250
293
  createdAt?: string | undefined;
@@ -307,6 +350,21 @@ export declare const _SlackNotificationUpsertDto: z.ZodObject<{
307
350
  context: Record<string, string>;
308
351
  templateId: string;
309
352
  flowContext?: Record<string, any> | undefined;
353
+ }>, z.ZodObject<{
354
+ kind: z.ZodLiteral<ContentStrategyKind.CUSTOM_CONTENT>;
355
+ content: z.ZodString;
356
+ fid: z.ZodOptional<z.ZodString>;
357
+ flowContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
358
+ }, "strip", z.ZodTypeAny, {
359
+ kind: ContentStrategyKind.CUSTOM_CONTENT;
360
+ content: string;
361
+ fid?: string | undefined;
362
+ flowContext?: Record<string, any> | undefined;
363
+ }, {
364
+ kind: ContentStrategyKind.CUSTOM_CONTENT;
365
+ content: string;
366
+ fid?: string | undefined;
367
+ flowContext?: Record<string, any> | undefined;
310
368
  }>]>;
311
369
  agentId: z.ZodOptional<z.ZodString>;
312
370
  deliveryChannel: z.ZodLiteral<DeliveryStrategyKind.SLACK>;
@@ -365,6 +423,11 @@ export declare const _SlackNotificationUpsertDto: z.ZodObject<{
365
423
  kind: ContentStrategyKind.FINDING;
366
424
  fid: string;
367
425
  flowContext?: Record<string, any> | undefined;
426
+ } | {
427
+ kind: ContentStrategyKind.CUSTOM_CONTENT;
428
+ content: string;
429
+ fid?: string | undefined;
430
+ flowContext?: Record<string, any> | undefined;
368
431
  };
369
432
  deliveryChannel: DeliveryStrategyKind.SLACK;
370
433
  deliveryStrategy: {
@@ -401,6 +464,11 @@ export declare const _SlackNotificationUpsertDto: z.ZodObject<{
401
464
  kind: ContentStrategyKind.FINDING;
402
465
  fid: string;
403
466
  flowContext?: Record<string, any> | undefined;
467
+ } | {
468
+ kind: ContentStrategyKind.CUSTOM_CONTENT;
469
+ content: string;
470
+ fid?: string | undefined;
471
+ flowContext?: Record<string, any> | undefined;
404
472
  };
405
473
  deliveryChannel: DeliveryStrategyKind.SLACK;
406
474
  deliveryStrategy: {
@@ -475,6 +543,21 @@ export declare const _EmailNotificationUpsertDto: z.ZodObject<{
475
543
  context: Record<string, string>;
476
544
  templateId: string;
477
545
  flowContext?: Record<string, any> | undefined;
546
+ }>, z.ZodObject<{
547
+ kind: z.ZodLiteral<ContentStrategyKind.CUSTOM_CONTENT>;
548
+ content: z.ZodString;
549
+ fid: z.ZodOptional<z.ZodString>;
550
+ flowContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
551
+ }, "strip", z.ZodTypeAny, {
552
+ kind: ContentStrategyKind.CUSTOM_CONTENT;
553
+ content: string;
554
+ fid?: string | undefined;
555
+ flowContext?: Record<string, any> | undefined;
556
+ }, {
557
+ kind: ContentStrategyKind.CUSTOM_CONTENT;
558
+ content: string;
559
+ fid?: string | undefined;
560
+ flowContext?: Record<string, any> | undefined;
478
561
  }>]>;
479
562
  agentId: z.ZodOptional<z.ZodString>;
480
563
  deliveryChannel: z.ZodLiteral<DeliveryStrategyKind.EMAIL>;
@@ -518,6 +601,11 @@ export declare const _EmailNotificationUpsertDto: z.ZodObject<{
518
601
  kind: ContentStrategyKind.FINDING;
519
602
  fid: string;
520
603
  flowContext?: Record<string, any> | undefined;
604
+ } | {
605
+ kind: ContentStrategyKind.CUSTOM_CONTENT;
606
+ content: string;
607
+ fid?: string | undefined;
608
+ flowContext?: Record<string, any> | undefined;
521
609
  };
522
610
  deliveryChannel: DeliveryStrategyKind.EMAIL;
523
611
  deliveryStrategy: {
@@ -551,6 +639,11 @@ export declare const _EmailNotificationUpsertDto: z.ZodObject<{
551
639
  kind: ContentStrategyKind.FINDING;
552
640
  fid: string;
553
641
  flowContext?: Record<string, any> | undefined;
642
+ } | {
643
+ kind: ContentStrategyKind.CUSTOM_CONTENT;
644
+ content: string;
645
+ fid?: string | undefined;
646
+ flowContext?: Record<string, any> | undefined;
554
647
  };
555
648
  deliveryChannel: DeliveryStrategyKind.EMAIL;
556
649
  deliveryStrategy: {
@@ -622,6 +715,21 @@ export declare const _NotificationUpsertDto: z.ZodDiscriminatedUnion<"deliveryCh
622
715
  context: Record<string, string>;
623
716
  templateId: string;
624
717
  flowContext?: Record<string, any> | undefined;
718
+ }>, z.ZodObject<{
719
+ kind: z.ZodLiteral<ContentStrategyKind.CUSTOM_CONTENT>;
720
+ content: z.ZodString;
721
+ fid: z.ZodOptional<z.ZodString>;
722
+ flowContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
723
+ }, "strip", z.ZodTypeAny, {
724
+ kind: ContentStrategyKind.CUSTOM_CONTENT;
725
+ content: string;
726
+ fid?: string | undefined;
727
+ flowContext?: Record<string, any> | undefined;
728
+ }, {
729
+ kind: ContentStrategyKind.CUSTOM_CONTENT;
730
+ content: string;
731
+ fid?: string | undefined;
732
+ flowContext?: Record<string, any> | undefined;
625
733
  }>]>;
626
734
  agentId: z.ZodOptional<z.ZodString>;
627
735
  deliveryChannel: z.ZodLiteral<DeliveryStrategyKind.SLACK>;
@@ -680,6 +788,11 @@ export declare const _NotificationUpsertDto: z.ZodDiscriminatedUnion<"deliveryCh
680
788
  kind: ContentStrategyKind.FINDING;
681
789
  fid: string;
682
790
  flowContext?: Record<string, any> | undefined;
791
+ } | {
792
+ kind: ContentStrategyKind.CUSTOM_CONTENT;
793
+ content: string;
794
+ fid?: string | undefined;
795
+ flowContext?: Record<string, any> | undefined;
683
796
  };
684
797
  deliveryChannel: DeliveryStrategyKind.SLACK;
685
798
  deliveryStrategy: {
@@ -716,6 +829,11 @@ export declare const _NotificationUpsertDto: z.ZodDiscriminatedUnion<"deliveryCh
716
829
  kind: ContentStrategyKind.FINDING;
717
830
  fid: string;
718
831
  flowContext?: Record<string, any> | undefined;
832
+ } | {
833
+ kind: ContentStrategyKind.CUSTOM_CONTENT;
834
+ content: string;
835
+ fid?: string | undefined;
836
+ flowContext?: Record<string, any> | undefined;
719
837
  };
720
838
  deliveryChannel: DeliveryStrategyKind.SLACK;
721
839
  deliveryStrategy: {
@@ -788,6 +906,21 @@ export declare const _NotificationUpsertDto: z.ZodDiscriminatedUnion<"deliveryCh
788
906
  context: Record<string, string>;
789
907
  templateId: string;
790
908
  flowContext?: Record<string, any> | undefined;
909
+ }>, z.ZodObject<{
910
+ kind: z.ZodLiteral<ContentStrategyKind.CUSTOM_CONTENT>;
911
+ content: z.ZodString;
912
+ fid: z.ZodOptional<z.ZodString>;
913
+ flowContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
914
+ }, "strip", z.ZodTypeAny, {
915
+ kind: ContentStrategyKind.CUSTOM_CONTENT;
916
+ content: string;
917
+ fid?: string | undefined;
918
+ flowContext?: Record<string, any> | undefined;
919
+ }, {
920
+ kind: ContentStrategyKind.CUSTOM_CONTENT;
921
+ content: string;
922
+ fid?: string | undefined;
923
+ flowContext?: Record<string, any> | undefined;
791
924
  }>]>;
792
925
  agentId: z.ZodOptional<z.ZodString>;
793
926
  deliveryChannel: z.ZodLiteral<DeliveryStrategyKind.EMAIL>;
@@ -831,6 +964,11 @@ export declare const _NotificationUpsertDto: z.ZodDiscriminatedUnion<"deliveryCh
831
964
  kind: ContentStrategyKind.FINDING;
832
965
  fid: string;
833
966
  flowContext?: Record<string, any> | undefined;
967
+ } | {
968
+ kind: ContentStrategyKind.CUSTOM_CONTENT;
969
+ content: string;
970
+ fid?: string | undefined;
971
+ flowContext?: Record<string, any> | undefined;
834
972
  };
835
973
  deliveryChannel: DeliveryStrategyKind.EMAIL;
836
974
  deliveryStrategy: {
@@ -864,6 +1002,11 @@ export declare const _NotificationUpsertDto: z.ZodDiscriminatedUnion<"deliveryCh
864
1002
  kind: ContentStrategyKind.FINDING;
865
1003
  fid: string;
866
1004
  flowContext?: Record<string, any> | undefined;
1005
+ } | {
1006
+ kind: ContentStrategyKind.CUSTOM_CONTENT;
1007
+ content: string;
1008
+ fid?: string | undefined;
1009
+ flowContext?: Record<string, any> | undefined;
867
1010
  };
868
1011
  deliveryChannel: DeliveryStrategyKind.EMAIL;
869
1012
  deliveryStrategy: {
@@ -935,6 +1078,21 @@ export declare const _NotificationDto: z.ZodIntersection<z.ZodDiscriminatedUnion
935
1078
  context: Record<string, string>;
936
1079
  templateId: string;
937
1080
  flowContext?: Record<string, any> | undefined;
1081
+ }>, z.ZodObject<{
1082
+ kind: z.ZodLiteral<ContentStrategyKind.CUSTOM_CONTENT>;
1083
+ content: z.ZodString;
1084
+ fid: z.ZodOptional<z.ZodString>;
1085
+ flowContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
1086
+ }, "strip", z.ZodTypeAny, {
1087
+ kind: ContentStrategyKind.CUSTOM_CONTENT;
1088
+ content: string;
1089
+ fid?: string | undefined;
1090
+ flowContext?: Record<string, any> | undefined;
1091
+ }, {
1092
+ kind: ContentStrategyKind.CUSTOM_CONTENT;
1093
+ content: string;
1094
+ fid?: string | undefined;
1095
+ flowContext?: Record<string, any> | undefined;
938
1096
  }>]>;
939
1097
  agentId: z.ZodOptional<z.ZodString>;
940
1098
  deliveryChannel: z.ZodLiteral<DeliveryStrategyKind.SLACK>;
@@ -993,6 +1151,11 @@ export declare const _NotificationDto: z.ZodIntersection<z.ZodDiscriminatedUnion
993
1151
  kind: ContentStrategyKind.FINDING;
994
1152
  fid: string;
995
1153
  flowContext?: Record<string, any> | undefined;
1154
+ } | {
1155
+ kind: ContentStrategyKind.CUSTOM_CONTENT;
1156
+ content: string;
1157
+ fid?: string | undefined;
1158
+ flowContext?: Record<string, any> | undefined;
996
1159
  };
997
1160
  deliveryChannel: DeliveryStrategyKind.SLACK;
998
1161
  deliveryStrategy: {
@@ -1029,6 +1192,11 @@ export declare const _NotificationDto: z.ZodIntersection<z.ZodDiscriminatedUnion
1029
1192
  kind: ContentStrategyKind.FINDING;
1030
1193
  fid: string;
1031
1194
  flowContext?: Record<string, any> | undefined;
1195
+ } | {
1196
+ kind: ContentStrategyKind.CUSTOM_CONTENT;
1197
+ content: string;
1198
+ fid?: string | undefined;
1199
+ flowContext?: Record<string, any> | undefined;
1032
1200
  };
1033
1201
  deliveryChannel: DeliveryStrategyKind.SLACK;
1034
1202
  deliveryStrategy: {
@@ -1101,6 +1269,21 @@ export declare const _NotificationDto: z.ZodIntersection<z.ZodDiscriminatedUnion
1101
1269
  context: Record<string, string>;
1102
1270
  templateId: string;
1103
1271
  flowContext?: Record<string, any> | undefined;
1272
+ }>, z.ZodObject<{
1273
+ kind: z.ZodLiteral<ContentStrategyKind.CUSTOM_CONTENT>;
1274
+ content: z.ZodString;
1275
+ fid: z.ZodOptional<z.ZodString>;
1276
+ flowContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
1277
+ }, "strip", z.ZodTypeAny, {
1278
+ kind: ContentStrategyKind.CUSTOM_CONTENT;
1279
+ content: string;
1280
+ fid?: string | undefined;
1281
+ flowContext?: Record<string, any> | undefined;
1282
+ }, {
1283
+ kind: ContentStrategyKind.CUSTOM_CONTENT;
1284
+ content: string;
1285
+ fid?: string | undefined;
1286
+ flowContext?: Record<string, any> | undefined;
1104
1287
  }>]>;
1105
1288
  agentId: z.ZodOptional<z.ZodString>;
1106
1289
  deliveryChannel: z.ZodLiteral<DeliveryStrategyKind.EMAIL>;
@@ -1144,6 +1327,11 @@ export declare const _NotificationDto: z.ZodIntersection<z.ZodDiscriminatedUnion
1144
1327
  kind: ContentStrategyKind.FINDING;
1145
1328
  fid: string;
1146
1329
  flowContext?: Record<string, any> | undefined;
1330
+ } | {
1331
+ kind: ContentStrategyKind.CUSTOM_CONTENT;
1332
+ content: string;
1333
+ fid?: string | undefined;
1334
+ flowContext?: Record<string, any> | undefined;
1147
1335
  };
1148
1336
  deliveryChannel: DeliveryStrategyKind.EMAIL;
1149
1337
  deliveryStrategy: {
@@ -1177,6 +1365,11 @@ export declare const _NotificationDto: z.ZodIntersection<z.ZodDiscriminatedUnion
1177
1365
  kind: ContentStrategyKind.FINDING;
1178
1366
  fid: string;
1179
1367
  flowContext?: Record<string, any> | undefined;
1368
+ } | {
1369
+ kind: ContentStrategyKind.CUSTOM_CONTENT;
1370
+ content: string;
1371
+ fid?: string | undefined;
1372
+ flowContext?: Record<string, any> | undefined;
1180
1373
  };
1181
1374
  deliveryChannel: DeliveryStrategyKind.EMAIL;
1182
1375
  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,12 @@ 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
+ flowContext: exports._FlowContext.optional(),
62
+ });
56
63
  const _BaseDeliveryStrategy = zod_1.z.object({
57
64
  copySecOpsTeam: zod_1.z.boolean().optional(),
58
65
  });
@@ -74,7 +81,7 @@ exports._EmailDeliveryStrategy = _BaseDeliveryStrategy.merge(zod_1.z.object({
74
81
  exports._BaseNotificationUpsertDto = base_dto_1._BaseUpsertDto.merge(zod_1.z.object({
75
82
  status: zod_1.z.nativeEnum(NotificationStatus),
76
83
  // 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]),
84
+ contentStrategy: zod_1.z.discriminatedUnion('kind', [exports._RawContentStrategy, exports._FindingContentStrategy, exports._TemplateContentStrategy, exports._CustomContentStrategy]),
78
85
  fid: zod_1.z.string().optional(),
79
86
  uid: zod_1.z.string().optional(),
80
87
  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,EAAE;IAC1B,MAAM,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,KAAK,CA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,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.14.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,14 @@ 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
+ flowContext: _FlowContext.optional(),
68
+ });
69
+ export type CustomContentStrategy = z.infer<typeof _CustomContentStrategy>;
70
+
62
71
  const _BaseDeliveryStrategy = z.object({
63
72
  copySecOpsTeam: z.boolean().optional(),
64
73
  });
@@ -90,7 +99,7 @@ export const _BaseNotificationUpsertDto = _BaseUpsertDto.merge(
90
99
  z.object({
91
100
  status: z.nativeEnum(NotificationStatus),
92
101
  // 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]),
102
+ contentStrategy: z.discriminatedUnion('kind', [_RawContentStrategy, _FindingContentStrategy, _TemplateContentStrategy, _CustomContentStrategy]),
94
103
  fid: z.string().optional(),
95
104
  uid: z.string().optional(),
96
105
  agentId: z.string().optional(),