/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; import { ScheduleLayerV2, ScheduleLayerV2$inboundSchema, ScheduleLayerV2$Outbound, ScheduleLayerV2$outboundSchema, } from "./schedulelayerv2.js"; import { ScheduleRotationHandoverV2, ScheduleRotationHandoverV2$inboundSchema, ScheduleRotationHandoverV2$Outbound, ScheduleRotationHandoverV2$outboundSchema, } from "./schedulerotationhandoverv2.js"; import { ScheduleRotationWorkingIntervalUpdatePayloadV2, ScheduleRotationWorkingIntervalUpdatePayloadV2$inboundSchema, ScheduleRotationWorkingIntervalUpdatePayloadV2$Outbound, ScheduleRotationWorkingIntervalUpdatePayloadV2$outboundSchema, } from "./schedulerotationworkingintervalupdatepayloadv2.js"; import { UserReferencePayloadV1, UserReferencePayloadV1$inboundSchema, UserReferencePayloadV1$Outbound, UserReferencePayloadV1$outboundSchema, } from "./userreferencepayloadv1.js"; export type ScheduleRotationUpdatePayloadV2 = { effectiveFrom?: Date | undefined; handoverStartAt?: Date | undefined; handovers?: Array | undefined; /** * Unique identifier of the rotation */ id?: string | undefined; layers?: Array | undefined; /** * Name of the rotation */ name?: string | undefined; users?: Array | undefined; workingInterval?: | Array | undefined; }; /** @internal */ export const ScheduleRotationUpdatePayloadV2$inboundSchema: z.ZodType< ScheduleRotationUpdatePayloadV2, z.ZodTypeDef, unknown > = z.object({ effective_from: z.string().datetime({ offset: true }).transform(v => new Date(v) ).optional(), handover_start_at: z.string().datetime({ offset: true }).transform(v => new Date(v) ).optional(), handovers: z.array(ScheduleRotationHandoverV2$inboundSchema).optional(), id: z.string().optional(), layers: z.array(ScheduleLayerV2$inboundSchema).optional(), name: z.string().optional(), users: z.array(UserReferencePayloadV1$inboundSchema).optional(), working_interval: z.array( ScheduleRotationWorkingIntervalUpdatePayloadV2$inboundSchema, ).optional(), }).transform((v) => { return remap$(v, { "effective_from": "effectiveFrom", "handover_start_at": "handoverStartAt", "working_interval": "workingInterval", }); }); /** @internal */ export type ScheduleRotationUpdatePayloadV2$Outbound = { effective_from?: string | undefined; handover_start_at?: string | undefined; handovers?: Array | undefined; id?: string | undefined; layers?: Array | undefined; name?: string | undefined; users?: Array | undefined; working_interval?: | Array | undefined; }; /** @internal */ export const ScheduleRotationUpdatePayloadV2$outboundSchema: z.ZodType< ScheduleRotationUpdatePayloadV2$Outbound, z.ZodTypeDef, ScheduleRotationUpdatePayloadV2 > = z.object({ effectiveFrom: z.date().transform(v => v.toISOString()).optional(), handoverStartAt: z.date().transform(v => v.toISOString()).optional(), handovers: z.array(ScheduleRotationHandoverV2$outboundSchema).optional(), id: z.string().optional(), layers: z.array(ScheduleLayerV2$outboundSchema).optional(), name: z.string().optional(), users: z.array(UserReferencePayloadV1$outboundSchema).optional(), workingInterval: z.array( ScheduleRotationWorkingIntervalUpdatePayloadV2$outboundSchema, ).optional(), }).transform((v) => { return remap$(v, { effectiveFrom: "effective_from", handoverStartAt: "handover_start_at", workingInterval: "working_interval", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ScheduleRotationUpdatePayloadV2$ { /** @deprecated use `ScheduleRotationUpdatePayloadV2$inboundSchema` instead. */ export const inboundSchema = ScheduleRotationUpdatePayloadV2$inboundSchema; /** @deprecated use `ScheduleRotationUpdatePayloadV2$outboundSchema` instead. */ export const outboundSchema = ScheduleRotationUpdatePayloadV2$outboundSchema; /** @deprecated use `ScheduleRotationUpdatePayloadV2$Outbound` instead. */ export type Outbound = ScheduleRotationUpdatePayloadV2$Outbound; }