@ampsec/platform-client 79.1.0 → 79.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/src/dto/flows.dto.d.ts +495 -279
- package/build/src/dto/flows.dto.js +12 -0
- package/build/src/dto/flows.dto.js.map +1 -1
- package/build/src/dto/notification.dto.d.ts +700 -94
- package/build/src/dto/notification.dto.js +13 -2
- package/build/src/dto/notification.dto.js.map +1 -1
- package/build/src/dto/platform/platform.flows.dto.d.ts +228 -112
- package/package.json +1 -1
- package/src/dto/flows.dto.ts +13 -0
- package/src/dto/notification.dto.ts +20 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports._CreateNotificationDto = exports._NotificationDto = exports._NotificationUpsertDto = exports._EmailNotificationUpsertDto = exports._SlackNotificationUpsertDto = exports._BaseNotificationUpsertDto = exports._EmailDeliveryStrategy = exports._SlackDeliveryStrategy = exports._CustomContentStrategy = exports._FindingContentStrategy = exports._TemplateContentStrategy = exports._RawContentStrategy = exports._FlowContext = exports._NotificationAddress = exports.DeliveryModeKind = exports.DeliveryStrategyKind = exports.ContentStrategyKind = exports.NotificationActionKind = exports.NotificationContextKind = exports.NotificationStatus = void 0;
|
|
3
|
+
exports._CreateNotificationDto = exports._NotificationDto = exports._NotificationUpsertDto = exports._TeamsNotificationUpsertDto = exports._EmailNotificationUpsertDto = exports._SlackNotificationUpsertDto = exports._BaseNotificationUpsertDto = exports._EmailDeliveryStrategy = exports._TeamsDeliveryStrategy = exports._SlackDeliveryStrategy = exports._CustomContentStrategy = exports._FindingContentStrategy = exports._TemplateContentStrategy = exports._RawContentStrategy = exports._FlowContext = exports._NotificationAddress = exports.DeliveryModeKind = exports.DeliveryStrategyKind = exports.ContentStrategyKind = exports.NotificationActionKind = exports.NotificationContextKind = exports.NotificationStatus = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const base_dto_1 = require("./base.dto");
|
|
6
6
|
var NotificationStatus;
|
|
@@ -46,6 +46,7 @@ var DeliveryStrategyKind;
|
|
|
46
46
|
(function (DeliveryStrategyKind) {
|
|
47
47
|
DeliveryStrategyKind["EMAIL"] = "EMAIL";
|
|
48
48
|
DeliveryStrategyKind["SLACK"] = "SLACK";
|
|
49
|
+
DeliveryStrategyKind["TEAMS"] = "TEAMS";
|
|
49
50
|
})(DeliveryStrategyKind || (exports.DeliveryStrategyKind = DeliveryStrategyKind = {}));
|
|
50
51
|
var DeliveryModeKind;
|
|
51
52
|
(function (DeliveryModeKind) {
|
|
@@ -101,6 +102,12 @@ exports._SlackDeliveryStrategy = _BaseDeliveryStrategy.merge(zod_1.z.object({
|
|
|
101
102
|
}),
|
|
102
103
|
teamId: zod_1.z.string(),
|
|
103
104
|
}));
|
|
105
|
+
exports._TeamsDeliveryStrategy = _BaseDeliveryStrategy.merge(zod_1.z.object({
|
|
106
|
+
to: zod_1.z.object({
|
|
107
|
+
cid: zod_1.z.string().optional(),
|
|
108
|
+
users: zod_1.z.array(zod_1.z.string()).optional(),
|
|
109
|
+
}),
|
|
110
|
+
}));
|
|
104
111
|
exports._EmailDeliveryStrategy = _BaseDeliveryStrategy.merge(zod_1.z.object({
|
|
105
112
|
to: zod_1.z.object({
|
|
106
113
|
users: zod_1.z.array(zod_1.z.string()),
|
|
@@ -127,8 +134,12 @@ exports._EmailNotificationUpsertDto = exports._BaseNotificationUpsertDto.merge(z
|
|
|
127
134
|
deliveryChannel: zod_1.z.literal(DeliveryStrategyKind.EMAIL),
|
|
128
135
|
deliveryStrategy: exports._EmailDeliveryStrategy,
|
|
129
136
|
}));
|
|
137
|
+
exports._TeamsNotificationUpsertDto = exports._BaseNotificationUpsertDto.merge(zod_1.z.object({
|
|
138
|
+
deliveryChannel: zod_1.z.literal(DeliveryStrategyKind.TEAMS),
|
|
139
|
+
deliveryStrategy: exports._TeamsDeliveryStrategy,
|
|
140
|
+
}));
|
|
130
141
|
// TODO when will this happen? or will it happen at all? https://github.com/colinhacks/zod/issues/2106 🤷♂️
|
|
131
|
-
exports._NotificationUpsertDto = zod_1.z.discriminatedUnion('deliveryChannel', [exports._SlackNotificationUpsertDto, exports._EmailNotificationUpsertDto]);
|
|
142
|
+
exports._NotificationUpsertDto = zod_1.z.discriminatedUnion('deliveryChannel', [exports._SlackNotificationUpsertDto, exports._EmailNotificationUpsertDto, exports._TeamsNotificationUpsertDto]);
|
|
132
143
|
exports._NotificationDto = exports._NotificationUpsertDto.and(base_dto_1._BaseDto);
|
|
133
144
|
exports._CreateNotificationDto = base_dto_1._BaseUpsertDto.merge(zod_1.z.object({
|
|
134
145
|
test: zod_1.z.boolean().optional(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notification.dto.js","sourceRoot":"","sources":["../../../src/dto/notification.dto.ts"],"names":[],"mappings":";;;AAAA,6BAAsB;AACtB,yCAA6D;AAE7D,IAAY,kBAMX;AAND,WAAY,kBAAkB;IAC5B,qCAAe,CAAA;IACf,yCAAmB,CAAA;IACnB,yCAAmB,CAAA;IACnB,mCAAa,CAAA;IACb,mCAAa,CAAA;AACf,CAAC,EANW,kBAAkB,kCAAlB,kBAAkB,QAM7B;AAED,IAAY,uBAaX;AAbD,WAAY,uBAAuB;IACjC,8CAAmB,CAAA;IACnB,wEAAwE;IACxE,wCAAa,CAAA;IACb,sEAA2C,CAAA;IAC3C,4DAAiC,CAAA;IACjC,4CAAiB,CAAA;IACjB,2EAA2E;IAC3E,gDAAqB,CAAA;IACrB,kEAAuC,CAAA;IACvC,wFAA6D,CAAA;IAC7D,gFAAqD,CAAA;IACrD,wDAA6B,CAAA;AAC/B,CAAC,EAbW,uBAAuB,uCAAvB,uBAAuB,QAalC;AAED,IAAY,sBAOX;AAPD,WAAY,sBAAsB;IAChC,uDAA6B,CAAA;IAC7B,+DAAqC,CAAA;IACrC,yDAA+B,CAAA;IAC/B,qDAA2B,CAAA;IAC3B,2CAAiB,CAAA;IACjB,qEAA2C,CAAA;AAC7C,CAAC,EAPW,sBAAsB,sCAAtB,sBAAsB,QAOjC;AAED,IAAY,mBAKX;AALD,WAAY,mBAAmB;IAC7B,kCAAW,CAAA;IACX,4CAAqB,CAAA;IACrB,0CAAmB,CAAA;IACnB,wDAAiC,CAAA;AACnC,CAAC,EALW,mBAAmB,mCAAnB,mBAAmB,QAK9B;AAED,IAAY,
|
|
1
|
+
{"version":3,"file":"notification.dto.js","sourceRoot":"","sources":["../../../src/dto/notification.dto.ts"],"names":[],"mappings":";;;AAAA,6BAAsB;AACtB,yCAA6D;AAE7D,IAAY,kBAMX;AAND,WAAY,kBAAkB;IAC5B,qCAAe,CAAA;IACf,yCAAmB,CAAA;IACnB,yCAAmB,CAAA;IACnB,mCAAa,CAAA;IACb,mCAAa,CAAA;AACf,CAAC,EANW,kBAAkB,kCAAlB,kBAAkB,QAM7B;AAED,IAAY,uBAaX;AAbD,WAAY,uBAAuB;IACjC,8CAAmB,CAAA;IACnB,wEAAwE;IACxE,wCAAa,CAAA;IACb,sEAA2C,CAAA;IAC3C,4DAAiC,CAAA;IACjC,4CAAiB,CAAA;IACjB,2EAA2E;IAC3E,gDAAqB,CAAA;IACrB,kEAAuC,CAAA;IACvC,wFAA6D,CAAA;IAC7D,gFAAqD,CAAA;IACrD,wDAA6B,CAAA;AAC/B,CAAC,EAbW,uBAAuB,uCAAvB,uBAAuB,QAalC;AAED,IAAY,sBAOX;AAPD,WAAY,sBAAsB;IAChC,uDAA6B,CAAA;IAC7B,+DAAqC,CAAA;IACrC,yDAA+B,CAAA;IAC/B,qDAA2B,CAAA;IAC3B,2CAAiB,CAAA;IACjB,qEAA2C,CAAA;AAC7C,CAAC,EAPW,sBAAsB,sCAAtB,sBAAsB,QAOjC;AAED,IAAY,mBAKX;AALD,WAAY,mBAAmB;IAC7B,kCAAW,CAAA;IACX,4CAAqB,CAAA;IACrB,0CAAmB,CAAA;IACnB,wDAAiC,CAAA;AACnC,CAA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,CAAC"}
|
|
@@ -256,6 +256,32 @@ export declare const _PlatformFlowSpecUpsertDto: z.ZodObject<z.objectUtil.extend
|
|
|
256
256
|
findingStatus?: import("..").FindingStatus | null | undefined;
|
|
257
257
|
responseMessage?: string | undefined;
|
|
258
258
|
}>>;
|
|
259
|
+
actionButtons: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
260
|
+
id: z.ZodString;
|
|
261
|
+
actions: z.ZodArray<z.ZodObject<{
|
|
262
|
+
actionId: z.ZodNullable<z.ZodString>;
|
|
263
|
+
}, "strip", z.ZodTypeAny, {
|
|
264
|
+
actionId: string | null;
|
|
265
|
+
}, {
|
|
266
|
+
actionId: string | null;
|
|
267
|
+
}>, "many">;
|
|
268
|
+
findingStatus: z.ZodNullable<z.ZodNativeEnum<typeof import("..").FindingStatus>>;
|
|
269
|
+
actionLabel: z.ZodString;
|
|
270
|
+
}, "strip", z.ZodTypeAny, {
|
|
271
|
+
id: string;
|
|
272
|
+
actions: {
|
|
273
|
+
actionId: string | null;
|
|
274
|
+
}[];
|
|
275
|
+
findingStatus: import("..").FindingStatus | null;
|
|
276
|
+
actionLabel: string;
|
|
277
|
+
}, {
|
|
278
|
+
id: string;
|
|
279
|
+
actions: {
|
|
280
|
+
actionId: string | null;
|
|
281
|
+
}[];
|
|
282
|
+
findingStatus: import("..").FindingStatus | null;
|
|
283
|
+
actionLabel: string;
|
|
284
|
+
}>, "many">>;
|
|
259
285
|
}, "strip", z.ZodTypeAny, {
|
|
260
286
|
includeInstructions?: boolean | undefined;
|
|
261
287
|
includeMarkComplete?: boolean | undefined;
|
|
@@ -283,6 +309,14 @@ export declare const _PlatformFlowSpecUpsertDto: z.ZodObject<z.objectUtil.extend
|
|
|
283
309
|
findingStatus?: import("..").FindingStatus | null | undefined;
|
|
284
310
|
responseMessage?: string | undefined;
|
|
285
311
|
} | undefined;
|
|
312
|
+
actionButtons?: {
|
|
313
|
+
id: string;
|
|
314
|
+
actions: {
|
|
315
|
+
actionId: string | null;
|
|
316
|
+
}[];
|
|
317
|
+
findingStatus: import("..").FindingStatus | null;
|
|
318
|
+
actionLabel: string;
|
|
319
|
+
}[] | undefined;
|
|
286
320
|
}, {
|
|
287
321
|
includeInstructions?: boolean | undefined;
|
|
288
322
|
includeMarkComplete?: boolean | undefined;
|
|
@@ -310,6 +344,14 @@ export declare const _PlatformFlowSpecUpsertDto: z.ZodObject<z.objectUtil.extend
|
|
|
310
344
|
findingStatus?: import("..").FindingStatus | null | undefined;
|
|
311
345
|
responseMessage?: string | undefined;
|
|
312
346
|
} | undefined;
|
|
347
|
+
actionButtons?: {
|
|
348
|
+
id: string;
|
|
349
|
+
actions: {
|
|
350
|
+
actionId: string | null;
|
|
351
|
+
}[];
|
|
352
|
+
findingStatus: import("..").FindingStatus | null;
|
|
353
|
+
actionLabel: string;
|
|
354
|
+
}[] | undefined;
|
|
313
355
|
}>>;
|
|
314
356
|
escalation: z.ZodOptional<z.ZodObject<{
|
|
315
357
|
interval: z.ZodObject<{
|
|
@@ -454,6 +496,42 @@ export declare const _PlatformFlowSpecUpsertDto: z.ZodObject<z.objectUtil.extend
|
|
|
454
496
|
createdAt?: string | undefined;
|
|
455
497
|
updatedAt?: string | undefined;
|
|
456
498
|
deletedAt?: string | null | undefined;
|
|
499
|
+
actions?: {
|
|
500
|
+
includeInstructions?: boolean | undefined;
|
|
501
|
+
includeMarkComplete?: boolean | undefined;
|
|
502
|
+
expirationActionId?: string | undefined;
|
|
503
|
+
expirationAction?: {
|
|
504
|
+
actionId: string | null;
|
|
505
|
+
findingStatus?: import("..").FindingStatus | null | undefined;
|
|
506
|
+
responseMessage?: string | undefined;
|
|
507
|
+
} | undefined;
|
|
508
|
+
simpleTriageYesActId?: string | undefined;
|
|
509
|
+
simpleTriageNoActId?: string | undefined;
|
|
510
|
+
resolveNowActionId?: string | undefined;
|
|
511
|
+
resolveNowAction?: {
|
|
512
|
+
actionId: string | null;
|
|
513
|
+
findingStatus?: import("..").FindingStatus | null | undefined;
|
|
514
|
+
responseMessage?: string | undefined;
|
|
515
|
+
} | undefined;
|
|
516
|
+
scheduleResolutionAction?: {
|
|
517
|
+
actionId: string | null;
|
|
518
|
+
findingStatus?: import("..").FindingStatus | null | undefined;
|
|
519
|
+
responseMessage?: string | undefined;
|
|
520
|
+
} | undefined;
|
|
521
|
+
launchAction?: {
|
|
522
|
+
actionId: string | null;
|
|
523
|
+
findingStatus?: import("..").FindingStatus | null | undefined;
|
|
524
|
+
responseMessage?: string | undefined;
|
|
525
|
+
} | undefined;
|
|
526
|
+
actionButtons?: {
|
|
527
|
+
id: string;
|
|
528
|
+
actions: {
|
|
529
|
+
actionId: string | null;
|
|
530
|
+
}[];
|
|
531
|
+
findingStatus: import("..").FindingStatus | null;
|
|
532
|
+
actionLabel: string;
|
|
533
|
+
}[] | undefined;
|
|
534
|
+
} | undefined;
|
|
457
535
|
tone?: {
|
|
458
536
|
kind?: string | undefined;
|
|
459
537
|
} | undefined;
|
|
@@ -489,34 +567,6 @@ export declare const _PlatformFlowSpecUpsertDto: z.ZodObject<z.objectUtil.extend
|
|
|
489
567
|
value?: number | undefined;
|
|
490
568
|
units?: string | undefined;
|
|
491
569
|
} | undefined;
|
|
492
|
-
actions?: {
|
|
493
|
-
includeInstructions?: boolean | undefined;
|
|
494
|
-
includeMarkComplete?: boolean | undefined;
|
|
495
|
-
expirationActionId?: string | undefined;
|
|
496
|
-
expirationAction?: {
|
|
497
|
-
actionId: string | null;
|
|
498
|
-
findingStatus?: import("..").FindingStatus | null | undefined;
|
|
499
|
-
responseMessage?: string | undefined;
|
|
500
|
-
} | undefined;
|
|
501
|
-
simpleTriageYesActId?: string | undefined;
|
|
502
|
-
simpleTriageNoActId?: string | undefined;
|
|
503
|
-
resolveNowActionId?: string | undefined;
|
|
504
|
-
resolveNowAction?: {
|
|
505
|
-
actionId: string | null;
|
|
506
|
-
findingStatus?: import("..").FindingStatus | null | undefined;
|
|
507
|
-
responseMessage?: string | undefined;
|
|
508
|
-
} | undefined;
|
|
509
|
-
scheduleResolutionAction?: {
|
|
510
|
-
actionId: string | null;
|
|
511
|
-
findingStatus?: import("..").FindingStatus | null | undefined;
|
|
512
|
-
responseMessage?: string | undefined;
|
|
513
|
-
} | undefined;
|
|
514
|
-
launchAction?: {
|
|
515
|
-
actionId: string | null;
|
|
516
|
-
findingStatus?: import("..").FindingStatus | null | undefined;
|
|
517
|
-
responseMessage?: string | undefined;
|
|
518
|
-
} | undefined;
|
|
519
|
-
} | undefined;
|
|
520
570
|
escalation?: {
|
|
521
571
|
interval: {
|
|
522
572
|
minutes: number;
|
|
@@ -576,6 +626,42 @@ export declare const _PlatformFlowSpecUpsertDto: z.ZodObject<z.objectUtil.extend
|
|
|
576
626
|
createdAt?: string | undefined;
|
|
577
627
|
updatedAt?: string | undefined;
|
|
578
628
|
deletedAt?: string | null | undefined;
|
|
629
|
+
actions?: {
|
|
630
|
+
includeInstructions?: boolean | undefined;
|
|
631
|
+
includeMarkComplete?: boolean | undefined;
|
|
632
|
+
expirationActionId?: string | undefined;
|
|
633
|
+
expirationAction?: {
|
|
634
|
+
actionId: string | null;
|
|
635
|
+
findingStatus?: import("..").FindingStatus | null | undefined;
|
|
636
|
+
responseMessage?: string | undefined;
|
|
637
|
+
} | undefined;
|
|
638
|
+
simpleTriageYesActId?: string | undefined;
|
|
639
|
+
simpleTriageNoActId?: string | undefined;
|
|
640
|
+
resolveNowActionId?: string | undefined;
|
|
641
|
+
resolveNowAction?: {
|
|
642
|
+
actionId: string | null;
|
|
643
|
+
findingStatus?: import("..").FindingStatus | null | undefined;
|
|
644
|
+
responseMessage?: string | undefined;
|
|
645
|
+
} | undefined;
|
|
646
|
+
scheduleResolutionAction?: {
|
|
647
|
+
actionId: string | null;
|
|
648
|
+
findingStatus?: import("..").FindingStatus | null | undefined;
|
|
649
|
+
responseMessage?: string | undefined;
|
|
650
|
+
} | undefined;
|
|
651
|
+
launchAction?: {
|
|
652
|
+
actionId: string | null;
|
|
653
|
+
findingStatus?: import("..").FindingStatus | null | undefined;
|
|
654
|
+
responseMessage?: string | undefined;
|
|
655
|
+
} | undefined;
|
|
656
|
+
actionButtons?: {
|
|
657
|
+
id: string;
|
|
658
|
+
actions: {
|
|
659
|
+
actionId: string | null;
|
|
660
|
+
}[];
|
|
661
|
+
findingStatus: import("..").FindingStatus | null;
|
|
662
|
+
actionLabel: string;
|
|
663
|
+
}[] | undefined;
|
|
664
|
+
} | undefined;
|
|
579
665
|
fslStrategy?: "STANDARD" | undefined;
|
|
580
666
|
tone?: {
|
|
581
667
|
kind?: string | undefined;
|
|
@@ -612,34 +698,6 @@ export declare const _PlatformFlowSpecUpsertDto: z.ZodObject<z.objectUtil.extend
|
|
|
612
698
|
value?: number | undefined;
|
|
613
699
|
units?: string | undefined;
|
|
614
700
|
} | undefined;
|
|
615
|
-
actions?: {
|
|
616
|
-
includeInstructions?: boolean | undefined;
|
|
617
|
-
includeMarkComplete?: boolean | undefined;
|
|
618
|
-
expirationActionId?: string | undefined;
|
|
619
|
-
expirationAction?: {
|
|
620
|
-
actionId: string | null;
|
|
621
|
-
findingStatus?: import("..").FindingStatus | null | undefined;
|
|
622
|
-
responseMessage?: string | undefined;
|
|
623
|
-
} | undefined;
|
|
624
|
-
simpleTriageYesActId?: string | undefined;
|
|
625
|
-
simpleTriageNoActId?: string | undefined;
|
|
626
|
-
resolveNowActionId?: string | undefined;
|
|
627
|
-
resolveNowAction?: {
|
|
628
|
-
actionId: string | null;
|
|
629
|
-
findingStatus?: import("..").FindingStatus | null | undefined;
|
|
630
|
-
responseMessage?: string | undefined;
|
|
631
|
-
} | undefined;
|
|
632
|
-
scheduleResolutionAction?: {
|
|
633
|
-
actionId: string | null;
|
|
634
|
-
findingStatus?: import("..").FindingStatus | null | undefined;
|
|
635
|
-
responseMessage?: string | undefined;
|
|
636
|
-
} | undefined;
|
|
637
|
-
launchAction?: {
|
|
638
|
-
actionId: string | null;
|
|
639
|
-
findingStatus?: import("..").FindingStatus | null | undefined;
|
|
640
|
-
responseMessage?: string | undefined;
|
|
641
|
-
} | undefined;
|
|
642
|
-
} | undefined;
|
|
643
701
|
escalation?: {
|
|
644
702
|
interval: {
|
|
645
703
|
minutes: number;
|
|
@@ -928,6 +986,32 @@ export declare const _PlatformFlowSpecDto: z.ZodObject<z.objectUtil.extendShape<
|
|
|
928
986
|
findingStatus?: import("..").FindingStatus | null | undefined;
|
|
929
987
|
responseMessage?: string | undefined;
|
|
930
988
|
}>>;
|
|
989
|
+
actionButtons: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
990
|
+
id: z.ZodString;
|
|
991
|
+
actions: z.ZodArray<z.ZodObject<{
|
|
992
|
+
actionId: z.ZodNullable<z.ZodString>;
|
|
993
|
+
}, "strip", z.ZodTypeAny, {
|
|
994
|
+
actionId: string | null;
|
|
995
|
+
}, {
|
|
996
|
+
actionId: string | null;
|
|
997
|
+
}>, "many">;
|
|
998
|
+
findingStatus: z.ZodNullable<z.ZodNativeEnum<typeof import("..").FindingStatus>>;
|
|
999
|
+
actionLabel: z.ZodString;
|
|
1000
|
+
}, "strip", z.ZodTypeAny, {
|
|
1001
|
+
id: string;
|
|
1002
|
+
actions: {
|
|
1003
|
+
actionId: string | null;
|
|
1004
|
+
}[];
|
|
1005
|
+
findingStatus: import("..").FindingStatus | null;
|
|
1006
|
+
actionLabel: string;
|
|
1007
|
+
}, {
|
|
1008
|
+
id: string;
|
|
1009
|
+
actions: {
|
|
1010
|
+
actionId: string | null;
|
|
1011
|
+
}[];
|
|
1012
|
+
findingStatus: import("..").FindingStatus | null;
|
|
1013
|
+
actionLabel: string;
|
|
1014
|
+
}>, "many">>;
|
|
931
1015
|
}, "strip", z.ZodTypeAny, {
|
|
932
1016
|
includeInstructions?: boolean | undefined;
|
|
933
1017
|
includeMarkComplete?: boolean | undefined;
|
|
@@ -955,6 +1039,14 @@ export declare const _PlatformFlowSpecDto: z.ZodObject<z.objectUtil.extendShape<
|
|
|
955
1039
|
findingStatus?: import("..").FindingStatus | null | undefined;
|
|
956
1040
|
responseMessage?: string | undefined;
|
|
957
1041
|
} | undefined;
|
|
1042
|
+
actionButtons?: {
|
|
1043
|
+
id: string;
|
|
1044
|
+
actions: {
|
|
1045
|
+
actionId: string | null;
|
|
1046
|
+
}[];
|
|
1047
|
+
findingStatus: import("..").FindingStatus | null;
|
|
1048
|
+
actionLabel: string;
|
|
1049
|
+
}[] | undefined;
|
|
958
1050
|
}, {
|
|
959
1051
|
includeInstructions?: boolean | undefined;
|
|
960
1052
|
includeMarkComplete?: boolean | undefined;
|
|
@@ -982,6 +1074,14 @@ export declare const _PlatformFlowSpecDto: z.ZodObject<z.objectUtil.extendShape<
|
|
|
982
1074
|
findingStatus?: import("..").FindingStatus | null | undefined;
|
|
983
1075
|
responseMessage?: string | undefined;
|
|
984
1076
|
} | undefined;
|
|
1077
|
+
actionButtons?: {
|
|
1078
|
+
id: string;
|
|
1079
|
+
actions: {
|
|
1080
|
+
actionId: string | null;
|
|
1081
|
+
}[];
|
|
1082
|
+
findingStatus: import("..").FindingStatus | null;
|
|
1083
|
+
actionLabel: string;
|
|
1084
|
+
}[] | undefined;
|
|
985
1085
|
}>>;
|
|
986
1086
|
escalation: z.ZodOptional<z.ZodObject<{
|
|
987
1087
|
interval: z.ZodObject<{
|
|
@@ -1121,6 +1221,42 @@ export declare const _PlatformFlowSpecDto: z.ZodObject<z.objectUtil.extendShape<
|
|
|
1121
1221
|
custom?: Record<string, unknown> | undefined;
|
|
1122
1222
|
};
|
|
1123
1223
|
engagementChannelCids: string[];
|
|
1224
|
+
actions?: {
|
|
1225
|
+
includeInstructions?: boolean | undefined;
|
|
1226
|
+
includeMarkComplete?: boolean | undefined;
|
|
1227
|
+
expirationActionId?: string | undefined;
|
|
1228
|
+
expirationAction?: {
|
|
1229
|
+
actionId: string | null;
|
|
1230
|
+
findingStatus?: import("..").FindingStatus | null | undefined;
|
|
1231
|
+
responseMessage?: string | undefined;
|
|
1232
|
+
} | undefined;
|
|
1233
|
+
simpleTriageYesActId?: string | undefined;
|
|
1234
|
+
simpleTriageNoActId?: string | undefined;
|
|
1235
|
+
resolveNowActionId?: string | undefined;
|
|
1236
|
+
resolveNowAction?: {
|
|
1237
|
+
actionId: string | null;
|
|
1238
|
+
findingStatus?: import("..").FindingStatus | null | undefined;
|
|
1239
|
+
responseMessage?: string | undefined;
|
|
1240
|
+
} | undefined;
|
|
1241
|
+
scheduleResolutionAction?: {
|
|
1242
|
+
actionId: string | null;
|
|
1243
|
+
findingStatus?: import("..").FindingStatus | null | undefined;
|
|
1244
|
+
responseMessage?: string | undefined;
|
|
1245
|
+
} | undefined;
|
|
1246
|
+
launchAction?: {
|
|
1247
|
+
actionId: string | null;
|
|
1248
|
+
findingStatus?: import("..").FindingStatus | null | undefined;
|
|
1249
|
+
responseMessage?: string | undefined;
|
|
1250
|
+
} | undefined;
|
|
1251
|
+
actionButtons?: {
|
|
1252
|
+
id: string;
|
|
1253
|
+
actions: {
|
|
1254
|
+
actionId: string | null;
|
|
1255
|
+
}[];
|
|
1256
|
+
findingStatus: import("..").FindingStatus | null;
|
|
1257
|
+
actionLabel: string;
|
|
1258
|
+
}[] | undefined;
|
|
1259
|
+
} | undefined;
|
|
1124
1260
|
tone?: {
|
|
1125
1261
|
kind?: string | undefined;
|
|
1126
1262
|
} | undefined;
|
|
@@ -1156,34 +1292,6 @@ export declare const _PlatformFlowSpecDto: z.ZodObject<z.objectUtil.extendShape<
|
|
|
1156
1292
|
value?: number | undefined;
|
|
1157
1293
|
units?: string | undefined;
|
|
1158
1294
|
} | undefined;
|
|
1159
|
-
actions?: {
|
|
1160
|
-
includeInstructions?: boolean | undefined;
|
|
1161
|
-
includeMarkComplete?: boolean | undefined;
|
|
1162
|
-
expirationActionId?: string | undefined;
|
|
1163
|
-
expirationAction?: {
|
|
1164
|
-
actionId: string | null;
|
|
1165
|
-
findingStatus?: import("..").FindingStatus | null | undefined;
|
|
1166
|
-
responseMessage?: string | undefined;
|
|
1167
|
-
} | undefined;
|
|
1168
|
-
simpleTriageYesActId?: string | undefined;
|
|
1169
|
-
simpleTriageNoActId?: string | undefined;
|
|
1170
|
-
resolveNowActionId?: string | undefined;
|
|
1171
|
-
resolveNowAction?: {
|
|
1172
|
-
actionId: string | null;
|
|
1173
|
-
findingStatus?: import("..").FindingStatus | null | undefined;
|
|
1174
|
-
responseMessage?: string | undefined;
|
|
1175
|
-
} | undefined;
|
|
1176
|
-
scheduleResolutionAction?: {
|
|
1177
|
-
actionId: string | null;
|
|
1178
|
-
findingStatus?: import("..").FindingStatus | null | undefined;
|
|
1179
|
-
responseMessage?: string | undefined;
|
|
1180
|
-
} | undefined;
|
|
1181
|
-
launchAction?: {
|
|
1182
|
-
actionId: string | null;
|
|
1183
|
-
findingStatus?: import("..").FindingStatus | null | undefined;
|
|
1184
|
-
responseMessage?: string | undefined;
|
|
1185
|
-
} | undefined;
|
|
1186
|
-
} | undefined;
|
|
1187
1295
|
escalation?: {
|
|
1188
1296
|
interval: {
|
|
1189
1297
|
minutes: number;
|
|
@@ -1251,6 +1359,42 @@ export declare const _PlatformFlowSpecDto: z.ZodObject<z.objectUtil.extendShape<
|
|
|
1251
1359
|
custom?: Record<string, unknown> | undefined;
|
|
1252
1360
|
};
|
|
1253
1361
|
engagementChannelCids: string[];
|
|
1362
|
+
actions?: {
|
|
1363
|
+
includeInstructions?: boolean | undefined;
|
|
1364
|
+
includeMarkComplete?: boolean | undefined;
|
|
1365
|
+
expirationActionId?: string | undefined;
|
|
1366
|
+
expirationAction?: {
|
|
1367
|
+
actionId: string | null;
|
|
1368
|
+
findingStatus?: import("..").FindingStatus | null | undefined;
|
|
1369
|
+
responseMessage?: string | undefined;
|
|
1370
|
+
} | undefined;
|
|
1371
|
+
simpleTriageYesActId?: string | undefined;
|
|
1372
|
+
simpleTriageNoActId?: string | undefined;
|
|
1373
|
+
resolveNowActionId?: string | undefined;
|
|
1374
|
+
resolveNowAction?: {
|
|
1375
|
+
actionId: string | null;
|
|
1376
|
+
findingStatus?: import("..").FindingStatus | null | undefined;
|
|
1377
|
+
responseMessage?: string | undefined;
|
|
1378
|
+
} | undefined;
|
|
1379
|
+
scheduleResolutionAction?: {
|
|
1380
|
+
actionId: string | null;
|
|
1381
|
+
findingStatus?: import("..").FindingStatus | null | undefined;
|
|
1382
|
+
responseMessage?: string | undefined;
|
|
1383
|
+
} | undefined;
|
|
1384
|
+
launchAction?: {
|
|
1385
|
+
actionId: string | null;
|
|
1386
|
+
findingStatus?: import("..").FindingStatus | null | undefined;
|
|
1387
|
+
responseMessage?: string | undefined;
|
|
1388
|
+
} | undefined;
|
|
1389
|
+
actionButtons?: {
|
|
1390
|
+
id: string;
|
|
1391
|
+
actions: {
|
|
1392
|
+
actionId: string | null;
|
|
1393
|
+
}[];
|
|
1394
|
+
findingStatus: import("..").FindingStatus | null;
|
|
1395
|
+
actionLabel: string;
|
|
1396
|
+
}[] | undefined;
|
|
1397
|
+
} | undefined;
|
|
1254
1398
|
fslStrategy?: "STANDARD" | undefined;
|
|
1255
1399
|
tone?: {
|
|
1256
1400
|
kind?: string | undefined;
|
|
@@ -1287,34 +1431,6 @@ export declare const _PlatformFlowSpecDto: z.ZodObject<z.objectUtil.extendShape<
|
|
|
1287
1431
|
value?: number | undefined;
|
|
1288
1432
|
units?: string | undefined;
|
|
1289
1433
|
} | undefined;
|
|
1290
|
-
actions?: {
|
|
1291
|
-
includeInstructions?: boolean | undefined;
|
|
1292
|
-
includeMarkComplete?: boolean | undefined;
|
|
1293
|
-
expirationActionId?: string | undefined;
|
|
1294
|
-
expirationAction?: {
|
|
1295
|
-
actionId: string | null;
|
|
1296
|
-
findingStatus?: import("..").FindingStatus | null | undefined;
|
|
1297
|
-
responseMessage?: string | undefined;
|
|
1298
|
-
} | undefined;
|
|
1299
|
-
simpleTriageYesActId?: string | undefined;
|
|
1300
|
-
simpleTriageNoActId?: string | undefined;
|
|
1301
|
-
resolveNowActionId?: string | undefined;
|
|
1302
|
-
resolveNowAction?: {
|
|
1303
|
-
actionId: string | null;
|
|
1304
|
-
findingStatus?: import("..").FindingStatus | null | undefined;
|
|
1305
|
-
responseMessage?: string | undefined;
|
|
1306
|
-
} | undefined;
|
|
1307
|
-
scheduleResolutionAction?: {
|
|
1308
|
-
actionId: string | null;
|
|
1309
|
-
findingStatus?: import("..").FindingStatus | null | undefined;
|
|
1310
|
-
responseMessage?: string | undefined;
|
|
1311
|
-
} | undefined;
|
|
1312
|
-
launchAction?: {
|
|
1313
|
-
actionId: string | null;
|
|
1314
|
-
findingStatus?: import("..").FindingStatus | null | undefined;
|
|
1315
|
-
responseMessage?: string | undefined;
|
|
1316
|
-
} | undefined;
|
|
1317
|
-
} | undefined;
|
|
1318
1434
|
escalation?: {
|
|
1319
1435
|
interval: {
|
|
1320
1436
|
minutes: number;
|
package/package.json
CHANGED
package/src/dto/flows.dto.ts
CHANGED
|
@@ -143,6 +143,17 @@ export const _FlowInterval = z.object({
|
|
|
143
143
|
});
|
|
144
144
|
export type FlowInterval = z.infer<typeof _FlowInterval>;
|
|
145
145
|
|
|
146
|
+
const _FlowActionButton = z.object({
|
|
147
|
+
id: z.string(),
|
|
148
|
+
actions: z
|
|
149
|
+
.object({
|
|
150
|
+
actionId: z.string().nullable(),
|
|
151
|
+
})
|
|
152
|
+
.array(),
|
|
153
|
+
findingStatus: z.nativeEnum(FindingStatus).nullable(),
|
|
154
|
+
actionLabel: z.string().max(24),
|
|
155
|
+
});
|
|
156
|
+
|
|
146
157
|
const _FlowActionDetails = z.object({
|
|
147
158
|
actionId: z.string().nullable(),
|
|
148
159
|
findingStatus: z.nativeEnum(FindingStatus).optional().nullable(),
|
|
@@ -176,6 +187,8 @@ export const _FlowActions = z.object({
|
|
|
176
187
|
scheduleResolutionAction: _FlowActionDetails.optional(),
|
|
177
188
|
|
|
178
189
|
launchAction: _FlowActionDetails.optional(),
|
|
190
|
+
// TODO: validate and adjust max actions supported after v0
|
|
191
|
+
actionButtons: z.array(_FlowActionButton).max(6).optional(),
|
|
179
192
|
});
|
|
180
193
|
export type FlowActions = z.infer<typeof _FlowActions>;
|
|
181
194
|
export const _FlowRewardsConfig = z.object({
|
|
@@ -43,6 +43,7 @@ export enum ContentStrategyKind {
|
|
|
43
43
|
export enum DeliveryStrategyKind {
|
|
44
44
|
EMAIL = 'EMAIL',
|
|
45
45
|
SLACK = 'SLACK',
|
|
46
|
+
TEAMS = 'TEAMS',
|
|
46
47
|
}
|
|
47
48
|
|
|
48
49
|
export enum DeliveryModeKind {
|
|
@@ -114,6 +115,16 @@ export const _SlackDeliveryStrategy = _BaseDeliveryStrategy.merge(
|
|
|
114
115
|
);
|
|
115
116
|
export type SlackDeliveryStrategy = z.infer<typeof _SlackDeliveryStrategy>;
|
|
116
117
|
|
|
118
|
+
export const _TeamsDeliveryStrategy = _BaseDeliveryStrategy.merge(
|
|
119
|
+
z.object({
|
|
120
|
+
to: z.object({
|
|
121
|
+
cid: z.string().optional(),
|
|
122
|
+
users: z.array(z.string()).optional(),
|
|
123
|
+
}),
|
|
124
|
+
})
|
|
125
|
+
);
|
|
126
|
+
export type TeamsDeliveryStrategy = z.infer<typeof _TeamsDeliveryStrategy>;
|
|
127
|
+
|
|
117
128
|
export const _EmailDeliveryStrategy = _BaseDeliveryStrategy.merge(
|
|
118
129
|
z.object({
|
|
119
130
|
to: z.object({
|
|
@@ -155,8 +166,16 @@ export const _EmailNotificationUpsertDto = _BaseNotificationUpsertDto.merge(
|
|
|
155
166
|
);
|
|
156
167
|
export type EmailNotificationUpsertDto = z.infer<typeof _EmailNotificationUpsertDto>;
|
|
157
168
|
|
|
169
|
+
export const _TeamsNotificationUpsertDto = _BaseNotificationUpsertDto.merge(
|
|
170
|
+
z.object({
|
|
171
|
+
deliveryChannel: z.literal(DeliveryStrategyKind.TEAMS),
|
|
172
|
+
deliveryStrategy: _TeamsDeliveryStrategy,
|
|
173
|
+
})
|
|
174
|
+
);
|
|
175
|
+
export type TeamsNotificationUpsertDto = z.infer<typeof _TeamsNotificationUpsertDto>;
|
|
176
|
+
|
|
158
177
|
// TODO when will this happen? or will it happen at all? https://github.com/colinhacks/zod/issues/2106 🤷♂️
|
|
159
|
-
export const _NotificationUpsertDto = z.discriminatedUnion('deliveryChannel', [_SlackNotificationUpsertDto, _EmailNotificationUpsertDto]);
|
|
178
|
+
export const _NotificationUpsertDto = z.discriminatedUnion('deliveryChannel', [_SlackNotificationUpsertDto, _EmailNotificationUpsertDto, _TeamsNotificationUpsertDto]);
|
|
160
179
|
export type NotificationUpsertDto = z.infer<typeof _NotificationUpsertDto>;
|
|
161
180
|
|
|
162
181
|
export const _NotificationDto = _NotificationUpsertDto.and(_BaseDto);
|