@ampsec/platform-client 81.7.0 → 81.8.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.
@@ -214,15 +214,12 @@ export const _FlowRewardsConfig = z.object({
214
214
  });
215
215
  export type FlowRewardsConfig = z.infer<typeof _FlowRewardsConfig>;
216
216
 
217
- export const _EngagementEscalationConfig = z.object({
218
- interval: _FlowInterval,
219
- engagementChannelConnectorIds: z.array(z.string()),
220
- });
221
217
  export type EngagementEscalationConfig = z.infer<typeof _EngagementEscalationConfig>;
222
218
 
223
219
  export enum EngagementRedirectionKind {
224
220
  SLACK_CHANNEL = 'SLACK_CHANNEL',
225
221
  TEAMS_CHANNEL = 'TEAMS_CHANNEL',
222
+ EMAIL_CHANNEL = 'EMAIL_CHANNEL',
226
223
  }
227
224
 
228
225
  export const _SlackChannelRedirection = z.object({
@@ -237,10 +234,22 @@ export const _TeamsChannelRedirection = z.object({
237
234
  includeUser: z.boolean().default(false),
238
235
  });
239
236
 
237
+ export const _EmailChannelRedirection = z.object({
238
+ kind: z.literal(EngagementRedirectionKind.EMAIL_CHANNEL),
239
+ channelId: z.string(),
240
+ includeUser: z.boolean().default(false),
241
+ });
242
+
240
243
  export type SlackChannelRedirection = z.infer<typeof _SlackChannelRedirection>;
241
244
 
242
245
  export type TeamsChannelRedirection = z.infer<typeof _TeamsChannelRedirection>;
243
246
 
247
+ export const _EngagementEscalationConfig = z.object({
248
+ interval: _FlowInterval,
249
+ engagementChannelConnectorIds: z.array(z.string()),
250
+ redirection: z.discriminatedUnion('kind', [_SlackChannelRedirection, _TeamsChannelRedirection, _EmailChannelRedirection]).optional(),
251
+ });
252
+
244
253
  export const _FlowSpecDto = _BaseDto.merge(
245
254
  z.object({
246
255
  id: z.string(),
@@ -262,7 +271,7 @@ export const _FlowSpecDto = _BaseDto.merge(
262
271
  actions: _FlowActions.optional(),
263
272
  escalation: _EngagementEscalationConfig.optional(),
264
273
  escalationToManager: _EngagementEscalationConfig.optional(),
265
- redirection: z.discriminatedUnion('kind', [_SlackChannelRedirection, _TeamsChannelRedirection]).optional(),
274
+ redirection: z.discriminatedUnion('kind', [_SlackChannelRedirection, _TeamsChannelRedirection, _EmailChannelRedirection]).optional(),
266
275
  rewards: z.array(_FlowRewardsConfig).optional(),
267
276
  customMessage: z.object({template: z.string().optional(), append: z.boolean().optional()}).optional(),
268
277
  additionalContext: z.object({data: z.string().optional()}).optional(),