/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; /** * Request body for updating a job. */ export type JobsUpdateRequestBody = { /** * The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. */ version: string; /** * The job title. */ title?: string | null | undefined; /** * The date when the employee was hired or rehired for the job. */ hireDate?: string | undefined; /** * Whether the employee owns at least 2% of the company. */ twoPercentShareholder?: boolean | undefined; /** * Whether this job is eligible for workers' compensation coverage in the state of Washington (WA). */ stateWcCovered?: boolean | null | undefined; /** * The risk class code for workers' compensation in Washington state. Please visit [Washington state's Risk Class page](https://www.lni.wa.gov/insurance/rates-risk-classes/risk-classes-for-workers-compensation/risk-class-lookup#/) to learn more. */ stateWcClassCode?: string | null | undefined; }; /** @internal */ export type JobsUpdateRequestBody$Outbound = { version: string; title?: string | null | undefined; hire_date?: string | undefined; two_percent_shareholder?: boolean | undefined; state_wc_covered?: boolean | null | undefined; state_wc_class_code?: string | null | undefined; }; /** @internal */ export const JobsUpdateRequestBody$outboundSchema: z.ZodType< JobsUpdateRequestBody$Outbound, z.ZodTypeDef, JobsUpdateRequestBody > = z.object({ version: z.string(), title: z.nullable(z.string()).optional(), hireDate: z.string().optional(), twoPercentShareholder: z.boolean().optional(), stateWcCovered: z.nullable(z.boolean()).optional(), stateWcClassCode: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { hireDate: "hire_date", twoPercentShareholder: "two_percent_shareholder", stateWcCovered: "state_wc_covered", stateWcClassCode: "state_wc_class_code", }); }); export function jobsUpdateRequestBodyToJSON( jobsUpdateRequestBody: JobsUpdateRequestBody, ): string { return JSON.stringify( JobsUpdateRequestBody$outboundSchema.parse(jobsUpdateRequestBody), ); }