/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; import { ClosedEnum } from "../../types/enums.js"; import { EngineParamBindingPayloadV2, EngineParamBindingPayloadV2$inboundSchema, EngineParamBindingPayloadV2$Outbound, EngineParamBindingPayloadV2$outboundSchema, } from "./engineparambindingpayloadv2.js"; /** * option defining whether to cause subsequent alerts to increase the severity */ export const PrioritySeverity = { SeverityFirstWins: "severity-first-wins", SeverityMax: "severity-max", } as const; /** * option defining whether to cause subsequent alerts to increase the severity */ export type PrioritySeverity = ClosedEnum; export type AlertRouteIncidentTemplatePayloadV2 = { /** * lookup of the priority options for each custom field in the template */ customFieldPriorities: { [k: string]: string }; /** * Custom field keys mapped to values */ customFields?: { [k: string]: EngineParamBindingPayloadV2 } | undefined; incidentMode?: EngineParamBindingPayloadV2 | undefined; incidentType?: EngineParamBindingPayloadV2 | undefined; name?: EngineParamBindingPayloadV2 | undefined; /** * option defining whether to cause subsequent alerts to increase the severity */ prioritySeverity: PrioritySeverity; severity?: EngineParamBindingPayloadV2 | undefined; summary?: EngineParamBindingPayloadV2 | undefined; workspace?: EngineParamBindingPayloadV2 | undefined; }; /** @internal */ export const PrioritySeverity$inboundSchema: z.ZodNativeEnum< typeof PrioritySeverity > = z.nativeEnum(PrioritySeverity); /** @internal */ export const PrioritySeverity$outboundSchema: z.ZodNativeEnum< typeof PrioritySeverity > = PrioritySeverity$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PrioritySeverity$ { /** @deprecated use `PrioritySeverity$inboundSchema` instead. */ export const inboundSchema = PrioritySeverity$inboundSchema; /** @deprecated use `PrioritySeverity$outboundSchema` instead. */ export const outboundSchema = PrioritySeverity$outboundSchema; } /** @internal */ export const AlertRouteIncidentTemplatePayloadV2$inboundSchema: z.ZodType< AlertRouteIncidentTemplatePayloadV2, z.ZodTypeDef, unknown > = z.object({ custom_field_priorities: z.record(z.string()), custom_fields: z.record(EngineParamBindingPayloadV2$inboundSchema).optional(), incident_mode: EngineParamBindingPayloadV2$inboundSchema.optional(), incident_type: EngineParamBindingPayloadV2$inboundSchema.optional(), name: EngineParamBindingPayloadV2$inboundSchema.optional(), priority_severity: PrioritySeverity$inboundSchema, severity: EngineParamBindingPayloadV2$inboundSchema.optional(), summary: EngineParamBindingPayloadV2$inboundSchema.optional(), workspace: EngineParamBindingPayloadV2$inboundSchema.optional(), }).transform((v) => { return remap$(v, { "custom_field_priorities": "customFieldPriorities", "custom_fields": "customFields", "incident_mode": "incidentMode", "incident_type": "incidentType", "priority_severity": "prioritySeverity", }); }); /** @internal */ export type AlertRouteIncidentTemplatePayloadV2$Outbound = { custom_field_priorities: { [k: string]: string }; custom_fields?: | { [k: string]: EngineParamBindingPayloadV2$Outbound } | undefined; incident_mode?: EngineParamBindingPayloadV2$Outbound | undefined; incident_type?: EngineParamBindingPayloadV2$Outbound | undefined; name?: EngineParamBindingPayloadV2$Outbound | undefined; priority_severity: string; severity?: EngineParamBindingPayloadV2$Outbound | undefined; summary?: EngineParamBindingPayloadV2$Outbound | undefined; workspace?: EngineParamBindingPayloadV2$Outbound | undefined; }; /** @internal */ export const AlertRouteIncidentTemplatePayloadV2$outboundSchema: z.ZodType< AlertRouteIncidentTemplatePayloadV2$Outbound, z.ZodTypeDef, AlertRouteIncidentTemplatePayloadV2 > = z.object({ customFieldPriorities: z.record(z.string()), customFields: z.record(EngineParamBindingPayloadV2$outboundSchema).optional(), incidentMode: EngineParamBindingPayloadV2$outboundSchema.optional(), incidentType: EngineParamBindingPayloadV2$outboundSchema.optional(), name: EngineParamBindingPayloadV2$outboundSchema.optional(), prioritySeverity: PrioritySeverity$outboundSchema, severity: EngineParamBindingPayloadV2$outboundSchema.optional(), summary: EngineParamBindingPayloadV2$outboundSchema.optional(), workspace: EngineParamBindingPayloadV2$outboundSchema.optional(), }).transform((v) => { return remap$(v, { customFieldPriorities: "custom_field_priorities", customFields: "custom_fields", incidentMode: "incident_mode", incidentType: "incident_type", prioritySeverity: "priority_severity", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace AlertRouteIncidentTemplatePayloadV2$ { /** @deprecated use `AlertRouteIncidentTemplatePayloadV2$inboundSchema` instead. */ export const inboundSchema = AlertRouteIncidentTemplatePayloadV2$inboundSchema; /** @deprecated use `AlertRouteIncidentTemplatePayloadV2$outboundSchema` instead. */ export const outboundSchema = AlertRouteIncidentTemplatePayloadV2$outboundSchema; /** @deprecated use `AlertRouteIncidentTemplatePayloadV2$Outbound` instead. */ export type Outbound = AlertRouteIncidentTemplatePayloadV2$Outbound; }