/* * 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 creating a job. */ export type JobsCreateRequestBody = { /** * The job title. */ title: string | null; /** * The date when the employee was hired or rehired for the job. */ hireDate: string; /** * 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 JobsCreateRequestBody$Outbound = { title: string | null; hire_date: string; two_percent_shareholder?: boolean | undefined; state_wc_covered?: boolean | null | undefined; state_wc_class_code?: string | null | undefined; }; /** @internal */ export const JobsCreateRequestBody$outboundSchema: z.ZodType< JobsCreateRequestBody$Outbound, z.ZodTypeDef, JobsCreateRequestBody > = z.object({ title: z.nullable(z.string()), hireDate: z.string(), 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 jobsCreateRequestBodyToJSON( jobsCreateRequestBody: JobsCreateRequestBody, ): string { return JSON.stringify( JobsCreateRequestBody$outboundSchema.parse(jobsCreateRequestBody), ); }