/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; import { EscalationPathNodePayloadV2, EscalationPathNodePayloadV2$inboundSchema, EscalationPathNodePayloadV2$Outbound, EscalationPathNodePayloadV2$outboundSchema, } from "./escalationpathnodepayloadv2.js"; import { WeekdayIntervalConfigV2, WeekdayIntervalConfigV2$inboundSchema, WeekdayIntervalConfigV2$Outbound, WeekdayIntervalConfigV2$outboundSchema, } from "./weekdayintervalconfigv2.js"; export type CreatePathRequestBody = { /** * The name of this escalation path, for the user's reference. */ name: string; /** * The nodes that form the levels and branches of this escalation path. */ path: Array; /** * The working hours for this escalation path. */ workingHours?: Array | undefined; }; /** @internal */ export const CreatePathRequestBody$inboundSchema: z.ZodType< CreatePathRequestBody, z.ZodTypeDef, unknown > = z.object({ name: z.string(), path: z.array(EscalationPathNodePayloadV2$inboundSchema), working_hours: z.array(WeekdayIntervalConfigV2$inboundSchema).optional(), }).transform((v) => { return remap$(v, { "working_hours": "workingHours", }); }); /** @internal */ export type CreatePathRequestBody$Outbound = { name: string; path: Array; working_hours?: Array | undefined; }; /** @internal */ export const CreatePathRequestBody$outboundSchema: z.ZodType< CreatePathRequestBody$Outbound, z.ZodTypeDef, CreatePathRequestBody > = z.object({ name: z.string(), path: z.array(EscalationPathNodePayloadV2$outboundSchema), workingHours: z.array(WeekdayIntervalConfigV2$outboundSchema).optional(), }).transform((v) => { return remap$(v, { workingHours: "working_hours", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CreatePathRequestBody$ { /** @deprecated use `CreatePathRequestBody$inboundSchema` instead. */ export const inboundSchema = CreatePathRequestBody$inboundSchema; /** @deprecated use `CreatePathRequestBody$outboundSchema` instead. */ export const outboundSchema = CreatePathRequestBody$outboundSchema; /** @deprecated use `CreatePathRequestBody$Outbound` instead. */ export type Outbound = CreatePathRequestBody$Outbound; }