/* * 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 { EscalationPathNodeIfElseV2, EscalationPathNodeIfElseV2$inboundSchema, EscalationPathNodeIfElseV2$Outbound, EscalationPathNodeIfElseV2$outboundSchema, } from "./escalationpathnodeifelsev2.js"; import { EscalationPathNodeLevelV2, EscalationPathNodeLevelV2$inboundSchema, EscalationPathNodeLevelV2$Outbound, EscalationPathNodeLevelV2$outboundSchema, } from "./escalationpathnodelevelv2.js"; import { EscalationPathNodeRepeatV2, EscalationPathNodeRepeatV2$inboundSchema, EscalationPathNodeRepeatV2$Outbound, EscalationPathNodeRepeatV2$outboundSchema, } from "./escalationpathnoderepeatv2.js"; /** * The type of this node: level or branch */ export const EscalationPathNodeV2Type = { IfElse: "if_else", Repeat: "repeat", Level: "level", NotifyChannel: "notify_channel", } as const; /** * The type of this node: level or branch */ export type EscalationPathNodeV2Type = ClosedEnum< typeof EscalationPathNodeV2Type >; export type EscalationPathNodeV2 = { /** * Unique internal ID of the escalation path node */ id: string; ifElse?: EscalationPathNodeIfElseV2 | undefined; level?: EscalationPathNodeLevelV2 | undefined; repeat?: EscalationPathNodeRepeatV2 | undefined; /** * The type of this node: level or branch */ type: EscalationPathNodeV2Type; }; /** @internal */ export const EscalationPathNodeV2Type$inboundSchema: z.ZodNativeEnum< typeof EscalationPathNodeV2Type > = z.nativeEnum(EscalationPathNodeV2Type); /** @internal */ export const EscalationPathNodeV2Type$outboundSchema: z.ZodNativeEnum< typeof EscalationPathNodeV2Type > = EscalationPathNodeV2Type$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace EscalationPathNodeV2Type$ { /** @deprecated use `EscalationPathNodeV2Type$inboundSchema` instead. */ export const inboundSchema = EscalationPathNodeV2Type$inboundSchema; /** @deprecated use `EscalationPathNodeV2Type$outboundSchema` instead. */ export const outboundSchema = EscalationPathNodeV2Type$outboundSchema; } /** @internal */ export const EscalationPathNodeV2$inboundSchema: z.ZodType< EscalationPathNodeV2, z.ZodTypeDef, unknown > = z.object({ id: z.string(), if_else: EscalationPathNodeIfElseV2$inboundSchema.optional(), level: EscalationPathNodeLevelV2$inboundSchema.optional(), repeat: EscalationPathNodeRepeatV2$inboundSchema.optional(), type: EscalationPathNodeV2Type$inboundSchema, }).transform((v) => { return remap$(v, { "if_else": "ifElse", }); }); /** @internal */ export type EscalationPathNodeV2$Outbound = { id: string; if_else?: EscalationPathNodeIfElseV2$Outbound | undefined; level?: EscalationPathNodeLevelV2$Outbound | undefined; repeat?: EscalationPathNodeRepeatV2$Outbound | undefined; type: string; }; /** @internal */ export const EscalationPathNodeV2$outboundSchema: z.ZodType< EscalationPathNodeV2$Outbound, z.ZodTypeDef, EscalationPathNodeV2 > = z.object({ id: z.string(), ifElse: EscalationPathNodeIfElseV2$outboundSchema.optional(), level: EscalationPathNodeLevelV2$outboundSchema.optional(), repeat: EscalationPathNodeRepeatV2$outboundSchema.optional(), type: EscalationPathNodeV2Type$outboundSchema, }).transform((v) => { return remap$(v, { ifElse: "if_else", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace EscalationPathNodeV2$ { /** @deprecated use `EscalationPathNodeV2$inboundSchema` instead. */ export const inboundSchema = EscalationPathNodeV2$inboundSchema; /** @deprecated use `EscalationPathNodeV2$outboundSchema` instead. */ export const outboundSchema = EscalationPathNodeV2$outboundSchema; /** @deprecated use `EscalationPathNodeV2$Outbound` instead. */ export type Outbound = EscalationPathNodeV2$Outbound; }