/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; import { ConditionPayloadV2, ConditionPayloadV2$inboundSchema, ConditionPayloadV2$Outbound, ConditionPayloadV2$outboundSchema, } from "./conditionpayloadv2.js"; import { EscalationPathNodePayloadV2, EscalationPathNodePayloadV2$inboundSchema, EscalationPathNodePayloadV2$Outbound, EscalationPathNodePayloadV2$outboundSchema, } from "./escalationpathnodepayloadv2.js"; export type EscalationPathNodeIfElsePayloadV2 = { /** * The condition that defines which branch to take */ conditions?: Array | undefined; /** * The nodes that form the levels if our condition is not met */ elsePath: Array; /** * The nodes that form the levels if our condition is met */ thenPath: Array; }; /** @internal */ export const EscalationPathNodeIfElsePayloadV2$inboundSchema: z.ZodType< EscalationPathNodeIfElsePayloadV2, z.ZodTypeDef, unknown > = z.object({ conditions: z.array(ConditionPayloadV2$inboundSchema).optional(), else_path: z.array(EscalationPathNodePayloadV2$inboundSchema), then_path: z.array(EscalationPathNodePayloadV2$inboundSchema), }).transform((v) => { return remap$(v, { "else_path": "elsePath", "then_path": "thenPath", }); }); /** @internal */ export type EscalationPathNodeIfElsePayloadV2$Outbound = { conditions?: Array | undefined; else_path: Array; then_path: Array; }; /** @internal */ export const EscalationPathNodeIfElsePayloadV2$outboundSchema: z.ZodType< EscalationPathNodeIfElsePayloadV2$Outbound, z.ZodTypeDef, EscalationPathNodeIfElsePayloadV2 > = z.object({ conditions: z.array(ConditionPayloadV2$outboundSchema).optional(), elsePath: z.array(EscalationPathNodePayloadV2$outboundSchema), thenPath: z.array(EscalationPathNodePayloadV2$outboundSchema), }).transform((v) => { return remap$(v, { elsePath: "else_path", thenPath: "then_path", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace EscalationPathNodeIfElsePayloadV2$ { /** @deprecated use `EscalationPathNodeIfElsePayloadV2$inboundSchema` instead. */ export const inboundSchema = EscalationPathNodeIfElsePayloadV2$inboundSchema; /** @deprecated use `EscalationPathNodeIfElsePayloadV2$outboundSchema` instead. */ export const outboundSchema = EscalationPathNodeIfElsePayloadV2$outboundSchema; /** @deprecated use `EscalationPathNodeIfElsePayloadV2$Outbound` instead. */ export type Outbound = EscalationPathNodeIfElsePayloadV2$Outbound; }