/* * 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"; import { EmployeeStateTaxQuestion, EmployeeStateTaxQuestion$inboundSchema, } from "./employeestatetaxquestion.js"; export type EmployeeStateTaxesList = { /** * The uuid of the employee state field. */ uuid?: string | undefined; /** * The employee's uuid */ employeeUuid?: string | undefined; /** * Two letter US state abbreviation */ state?: string | undefined; fileNewHireReport?: boolean | null | undefined; isWorkState?: boolean | undefined; questions?: Array | undefined; }; /** @internal */ export const EmployeeStateTaxesList$inboundSchema: z.ZodType< EmployeeStateTaxesList, z.ZodTypeDef, unknown > = z.object({ uuid: z.string().optional(), employee_uuid: z.string().optional(), state: z.string().optional(), file_new_hire_report: z.nullable(z.boolean()).optional(), is_work_state: z.boolean().optional(), questions: z.array(EmployeeStateTaxQuestion$inboundSchema).optional(), }).transform((v) => { return remap$(v, { "employee_uuid": "employeeUuid", "file_new_hire_report": "fileNewHireReport", "is_work_state": "isWorkState", }); }); export function employeeStateTaxesListFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => EmployeeStateTaxesList$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'EmployeeStateTaxesList' from JSON`, ); }