/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; export type HolidayPayPolicyRequestNewYearsDay = { selected?: boolean | undefined; }; export type HolidayPayPolicyRequestMlkDay = { selected?: boolean | undefined; }; export type HolidayPayPolicyRequestPresidentsDay = { selected?: boolean | undefined; }; export type HolidayPayPolicyRequestMemorialDay = { selected?: boolean | undefined; }; export type HolidayPayPolicyRequestJuneteenth = { selected?: boolean | undefined; }; export type HolidayPayPolicyRequestIndependenceDay = { selected?: boolean | undefined; }; export type HolidayPayPolicyRequestLaborDay = { selected?: boolean | undefined; }; export type HolidayPayPolicyRequestColumbusDay = { selected?: boolean | undefined; }; export type HolidayPayPolicyRequestVeteransDay = { selected?: boolean | undefined; }; export type HolidayPayPolicyRequestThanksgiving = { selected?: boolean | undefined; }; export type HolidayPayPolicyRequestChristmasDay = { selected?: boolean | undefined; }; /** * An object containing federal holiday objects, each containing a boolean selected property. */ export type HolidayPayPolicyRequestFederalHolidays = { newYearsDay?: HolidayPayPolicyRequestNewYearsDay | undefined; mlkDay?: HolidayPayPolicyRequestMlkDay | undefined; presidentsDay?: HolidayPayPolicyRequestPresidentsDay | undefined; memorialDay?: HolidayPayPolicyRequestMemorialDay | undefined; juneteenth?: HolidayPayPolicyRequestJuneteenth | undefined; independenceDay?: HolidayPayPolicyRequestIndependenceDay | undefined; laborDay?: HolidayPayPolicyRequestLaborDay | undefined; columbusDay?: HolidayPayPolicyRequestColumbusDay | undefined; veteransDay?: HolidayPayPolicyRequestVeteransDay | undefined; thanksgiving?: HolidayPayPolicyRequestThanksgiving | undefined; christmasDay?: HolidayPayPolicyRequestChristmasDay | undefined; }; /** * Request body for creating or updating a holiday pay policy */ export type HolidayPayPolicyRequest = { /** * An object containing federal holiday objects, each containing a boolean selected property. */ federalHolidays?: HolidayPayPolicyRequestFederalHolidays | undefined; }; /** @internal */ export type HolidayPayPolicyRequestNewYearsDay$Outbound = { selected?: boolean | undefined; }; /** @internal */ export const HolidayPayPolicyRequestNewYearsDay$outboundSchema: z.ZodType< HolidayPayPolicyRequestNewYearsDay$Outbound, z.ZodTypeDef, HolidayPayPolicyRequestNewYearsDay > = z.object({ selected: z.boolean().optional(), }); export function holidayPayPolicyRequestNewYearsDayToJSON( holidayPayPolicyRequestNewYearsDay: HolidayPayPolicyRequestNewYearsDay, ): string { return JSON.stringify( HolidayPayPolicyRequestNewYearsDay$outboundSchema.parse( holidayPayPolicyRequestNewYearsDay, ), ); } /** @internal */ export type HolidayPayPolicyRequestMlkDay$Outbound = { selected?: boolean | undefined; }; /** @internal */ export const HolidayPayPolicyRequestMlkDay$outboundSchema: z.ZodType< HolidayPayPolicyRequestMlkDay$Outbound, z.ZodTypeDef, HolidayPayPolicyRequestMlkDay > = z.object({ selected: z.boolean().optional(), }); export function holidayPayPolicyRequestMlkDayToJSON( holidayPayPolicyRequestMlkDay: HolidayPayPolicyRequestMlkDay, ): string { return JSON.stringify( HolidayPayPolicyRequestMlkDay$outboundSchema.parse( holidayPayPolicyRequestMlkDay, ), ); } /** @internal */ export type HolidayPayPolicyRequestPresidentsDay$Outbound = { selected?: boolean | undefined; }; /** @internal */ export const HolidayPayPolicyRequestPresidentsDay$outboundSchema: z.ZodType< HolidayPayPolicyRequestPresidentsDay$Outbound, z.ZodTypeDef, HolidayPayPolicyRequestPresidentsDay > = z.object({ selected: z.boolean().optional(), }); export function holidayPayPolicyRequestPresidentsDayToJSON( holidayPayPolicyRequestPresidentsDay: HolidayPayPolicyRequestPresidentsDay, ): string { return JSON.stringify( HolidayPayPolicyRequestPresidentsDay$outboundSchema.parse( holidayPayPolicyRequestPresidentsDay, ), ); } /** @internal */ export type HolidayPayPolicyRequestMemorialDay$Outbound = { selected?: boolean | undefined; }; /** @internal */ export const HolidayPayPolicyRequestMemorialDay$outboundSchema: z.ZodType< HolidayPayPolicyRequestMemorialDay$Outbound, z.ZodTypeDef, HolidayPayPolicyRequestMemorialDay > = z.object({ selected: z.boolean().optional(), }); export function holidayPayPolicyRequestMemorialDayToJSON( holidayPayPolicyRequestMemorialDay: HolidayPayPolicyRequestMemorialDay, ): string { return JSON.stringify( HolidayPayPolicyRequestMemorialDay$outboundSchema.parse( holidayPayPolicyRequestMemorialDay, ), ); } /** @internal */ export type HolidayPayPolicyRequestJuneteenth$Outbound = { selected?: boolean | undefined; }; /** @internal */ export const HolidayPayPolicyRequestJuneteenth$outboundSchema: z.ZodType< HolidayPayPolicyRequestJuneteenth$Outbound, z.ZodTypeDef, HolidayPayPolicyRequestJuneteenth > = z.object({ selected: z.boolean().optional(), }); export function holidayPayPolicyRequestJuneteenthToJSON( holidayPayPolicyRequestJuneteenth: HolidayPayPolicyRequestJuneteenth, ): string { return JSON.stringify( HolidayPayPolicyRequestJuneteenth$outboundSchema.parse( holidayPayPolicyRequestJuneteenth, ), ); } /** @internal */ export type HolidayPayPolicyRequestIndependenceDay$Outbound = { selected?: boolean | undefined; }; /** @internal */ export const HolidayPayPolicyRequestIndependenceDay$outboundSchema: z.ZodType< HolidayPayPolicyRequestIndependenceDay$Outbound, z.ZodTypeDef, HolidayPayPolicyRequestIndependenceDay > = z.object({ selected: z.boolean().optional(), }); export function holidayPayPolicyRequestIndependenceDayToJSON( holidayPayPolicyRequestIndependenceDay: HolidayPayPolicyRequestIndependenceDay, ): string { return JSON.stringify( HolidayPayPolicyRequestIndependenceDay$outboundSchema.parse( holidayPayPolicyRequestIndependenceDay, ), ); } /** @internal */ export type HolidayPayPolicyRequestLaborDay$Outbound = { selected?: boolean | undefined; }; /** @internal */ export const HolidayPayPolicyRequestLaborDay$outboundSchema: z.ZodType< HolidayPayPolicyRequestLaborDay$Outbound, z.ZodTypeDef, HolidayPayPolicyRequestLaborDay > = z.object({ selected: z.boolean().optional(), }); export function holidayPayPolicyRequestLaborDayToJSON( holidayPayPolicyRequestLaborDay: HolidayPayPolicyRequestLaborDay, ): string { return JSON.stringify( HolidayPayPolicyRequestLaborDay$outboundSchema.parse( holidayPayPolicyRequestLaborDay, ), ); } /** @internal */ export type HolidayPayPolicyRequestColumbusDay$Outbound = { selected?: boolean | undefined; }; /** @internal */ export const HolidayPayPolicyRequestColumbusDay$outboundSchema: z.ZodType< HolidayPayPolicyRequestColumbusDay$Outbound, z.ZodTypeDef, HolidayPayPolicyRequestColumbusDay > = z.object({ selected: z.boolean().optional(), }); export function holidayPayPolicyRequestColumbusDayToJSON( holidayPayPolicyRequestColumbusDay: HolidayPayPolicyRequestColumbusDay, ): string { return JSON.stringify( HolidayPayPolicyRequestColumbusDay$outboundSchema.parse( holidayPayPolicyRequestColumbusDay, ), ); } /** @internal */ export type HolidayPayPolicyRequestVeteransDay$Outbound = { selected?: boolean | undefined; }; /** @internal */ export const HolidayPayPolicyRequestVeteransDay$outboundSchema: z.ZodType< HolidayPayPolicyRequestVeteransDay$Outbound, z.ZodTypeDef, HolidayPayPolicyRequestVeteransDay > = z.object({ selected: z.boolean().optional(), }); export function holidayPayPolicyRequestVeteransDayToJSON( holidayPayPolicyRequestVeteransDay: HolidayPayPolicyRequestVeteransDay, ): string { return JSON.stringify( HolidayPayPolicyRequestVeteransDay$outboundSchema.parse( holidayPayPolicyRequestVeteransDay, ), ); } /** @internal */ export type HolidayPayPolicyRequestThanksgiving$Outbound = { selected?: boolean | undefined; }; /** @internal */ export const HolidayPayPolicyRequestThanksgiving$outboundSchema: z.ZodType< HolidayPayPolicyRequestThanksgiving$Outbound, z.ZodTypeDef, HolidayPayPolicyRequestThanksgiving > = z.object({ selected: z.boolean().optional(), }); export function holidayPayPolicyRequestThanksgivingToJSON( holidayPayPolicyRequestThanksgiving: HolidayPayPolicyRequestThanksgiving, ): string { return JSON.stringify( HolidayPayPolicyRequestThanksgiving$outboundSchema.parse( holidayPayPolicyRequestThanksgiving, ), ); } /** @internal */ export type HolidayPayPolicyRequestChristmasDay$Outbound = { selected?: boolean | undefined; }; /** @internal */ export const HolidayPayPolicyRequestChristmasDay$outboundSchema: z.ZodType< HolidayPayPolicyRequestChristmasDay$Outbound, z.ZodTypeDef, HolidayPayPolicyRequestChristmasDay > = z.object({ selected: z.boolean().optional(), }); export function holidayPayPolicyRequestChristmasDayToJSON( holidayPayPolicyRequestChristmasDay: HolidayPayPolicyRequestChristmasDay, ): string { return JSON.stringify( HolidayPayPolicyRequestChristmasDay$outboundSchema.parse( holidayPayPolicyRequestChristmasDay, ), ); } /** @internal */ export type HolidayPayPolicyRequestFederalHolidays$Outbound = { new_years_day?: HolidayPayPolicyRequestNewYearsDay$Outbound | undefined; mlk_day?: HolidayPayPolicyRequestMlkDay$Outbound | undefined; presidents_day?: HolidayPayPolicyRequestPresidentsDay$Outbound | undefined; memorial_day?: HolidayPayPolicyRequestMemorialDay$Outbound | undefined; juneteenth?: HolidayPayPolicyRequestJuneteenth$Outbound | undefined; independence_day?: | HolidayPayPolicyRequestIndependenceDay$Outbound | undefined; labor_day?: HolidayPayPolicyRequestLaborDay$Outbound | undefined; columbus_day?: HolidayPayPolicyRequestColumbusDay$Outbound | undefined; veterans_day?: HolidayPayPolicyRequestVeteransDay$Outbound | undefined; thanksgiving?: HolidayPayPolicyRequestThanksgiving$Outbound | undefined; christmas_day?: HolidayPayPolicyRequestChristmasDay$Outbound | undefined; }; /** @internal */ export const HolidayPayPolicyRequestFederalHolidays$outboundSchema: z.ZodType< HolidayPayPolicyRequestFederalHolidays$Outbound, z.ZodTypeDef, HolidayPayPolicyRequestFederalHolidays > = z.object({ newYearsDay: z.lazy(() => HolidayPayPolicyRequestNewYearsDay$outboundSchema) .optional(), mlkDay: z.lazy(() => HolidayPayPolicyRequestMlkDay$outboundSchema).optional(), presidentsDay: z.lazy(() => HolidayPayPolicyRequestPresidentsDay$outboundSchema ).optional(), memorialDay: z.lazy(() => HolidayPayPolicyRequestMemorialDay$outboundSchema) .optional(), juneteenth: z.lazy(() => HolidayPayPolicyRequestJuneteenth$outboundSchema) .optional(), independenceDay: z.lazy(() => HolidayPayPolicyRequestIndependenceDay$outboundSchema ).optional(), laborDay: z.lazy(() => HolidayPayPolicyRequestLaborDay$outboundSchema) .optional(), columbusDay: z.lazy(() => HolidayPayPolicyRequestColumbusDay$outboundSchema) .optional(), veteransDay: z.lazy(() => HolidayPayPolicyRequestVeteransDay$outboundSchema) .optional(), thanksgiving: z.lazy(() => HolidayPayPolicyRequestThanksgiving$outboundSchema) .optional(), christmasDay: z.lazy(() => HolidayPayPolicyRequestChristmasDay$outboundSchema) .optional(), }).transform((v) => { return remap$(v, { newYearsDay: "new_years_day", mlkDay: "mlk_day", presidentsDay: "presidents_day", memorialDay: "memorial_day", independenceDay: "independence_day", laborDay: "labor_day", columbusDay: "columbus_day", veteransDay: "veterans_day", christmasDay: "christmas_day", }); }); export function holidayPayPolicyRequestFederalHolidaysToJSON( holidayPayPolicyRequestFederalHolidays: HolidayPayPolicyRequestFederalHolidays, ): string { return JSON.stringify( HolidayPayPolicyRequestFederalHolidays$outboundSchema.parse( holidayPayPolicyRequestFederalHolidays, ), ); } /** @internal */ export type HolidayPayPolicyRequest$Outbound = { federal_holidays?: | HolidayPayPolicyRequestFederalHolidays$Outbound | undefined; }; /** @internal */ export const HolidayPayPolicyRequest$outboundSchema: z.ZodType< HolidayPayPolicyRequest$Outbound, z.ZodTypeDef, HolidayPayPolicyRequest > = z.object({ federalHolidays: z.lazy(() => HolidayPayPolicyRequestFederalHolidays$outboundSchema ).optional(), }).transform((v) => { return remap$(v, { federalHolidays: "federal_holidays", }); }); export function holidayPayPolicyRequestToJSON( holidayPayPolicyRequest: HolidayPayPolicyRequest, ): string { return JSON.stringify( HolidayPayPolicyRequest$outboundSchema.parse(holidayPayPolicyRequest), ); }