/* * 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 { ClosedEnum } from "../../types/enums.js"; /** * The employee's employment status. Supplying an invalid option will set the employment_status to *not_set*. */ export const RehireBodyEmploymentStatus = { PartTime: "part_time", FullTime: "full_time", PartTimeEligible: "part_time_eligible", Variable: "variable", Seasonal: "seasonal", NotSet: "not_set", } as const; /** * The employee's employment status. Supplying an invalid option will set the employment_status to *not_set*. */ export type RehireBodyEmploymentStatus = ClosedEnum< typeof RehireBodyEmploymentStatus >; export type RehireBody = { /** * The day when the employee returns to work. */ effectiveDate: string; /** * The boolean flag indicating whether Gusto will file a new hire report for the employee. */ fileNewHireReport: boolean; /** * The uuid of the employee's work location. */ workLocationUuid: string; /** * The employee's employment status. Supplying an invalid option will set the employment_status to *not_set*. */ employmentStatus?: RehireBodyEmploymentStatus | undefined; /** * Whether the employee is a two percent shareholder of the company. This field only applies to companies with an S-Corp entity type. */ twoPercentShareholder?: boolean | undefined; }; /** @internal */ export const RehireBodyEmploymentStatus$outboundSchema: z.ZodNativeEnum< typeof RehireBodyEmploymentStatus > = z.nativeEnum(RehireBodyEmploymentStatus); /** @internal */ export type RehireBody$Outbound = { effective_date: string; file_new_hire_report: boolean; work_location_uuid: string; employment_status?: string | undefined; two_percent_shareholder?: boolean | undefined; }; /** @internal */ export const RehireBody$outboundSchema: z.ZodType< RehireBody$Outbound, z.ZodTypeDef, RehireBody > = z.object({ effectiveDate: z.string(), fileNewHireReport: z.boolean(), workLocationUuid: z.string(), employmentStatus: RehireBodyEmploymentStatus$outboundSchema.optional(), twoPercentShareholder: z.boolean().optional(), }).transform((v) => { return remap$(v, { effectiveDate: "effective_date", fileNewHireReport: "file_new_hire_report", workLocationUuid: "work_location_uuid", employmentStatus: "employment_status", twoPercentShareholder: "two_percent_shareholder", }); }); export function rehireBodyToJSON(rehireBody: RehireBody): string { return JSON.stringify(RehireBody$outboundSchema.parse(rehireBody)); }