/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type PayrollPayPeriodType = { /** * The start date, inclusive, of the pay period. */ startDate?: string | undefined; /** * The start date, inclusive, of the pay period. */ endDate?: string | undefined; /** * The UUID of the pay schedule for the payroll. */ payScheduleUuid?: string | null | undefined; }; /** @internal */ export const PayrollPayPeriodType$inboundSchema: z.ZodType< PayrollPayPeriodType, z.ZodTypeDef, unknown > = z.object({ start_date: z.string().optional(), end_date: z.string().optional(), pay_schedule_uuid: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { "start_date": "startDate", "end_date": "endDate", "pay_schedule_uuid": "payScheduleUuid", }); }); export function payrollPayPeriodTypeFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => PayrollPayPeriodType$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PayrollPayPeriodType' from JSON`, ); }