/* * 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 { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { HTTPMetadata, HTTPMetadata$inboundSchema, } from "../components/httpmetadata.js"; import { Rehire, Rehire$inboundSchema } from "../components/rehire.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; /** * Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. */ export const GetV1EmployeesEmployeeIdRehireHeaderXGustoAPIVersion = { TwoThousandAndTwentyFiveMinus06Minus15: "2025-06-15", } as const; /** * Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. */ export type GetV1EmployeesEmployeeIdRehireHeaderXGustoAPIVersion = ClosedEnum< typeof GetV1EmployeesEmployeeIdRehireHeaderXGustoAPIVersion >; export type GetV1EmployeesEmployeeIdRehireRequest = { /** * Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. */ xGustoAPIVersion?: | GetV1EmployeesEmployeeIdRehireHeaderXGustoAPIVersion | undefined; /** * The UUID of the employee */ employeeId: string; }; export type GetV1EmployeesEmployeeIdRehireResponse = { httpMeta: HTTPMetadata; /** * Success */ rehire?: Rehire | undefined; }; /** @internal */ export const GetV1EmployeesEmployeeIdRehireHeaderXGustoAPIVersion$outboundSchema: z.ZodNativeEnum = z.nativeEnum(GetV1EmployeesEmployeeIdRehireHeaderXGustoAPIVersion); /** @internal */ export type GetV1EmployeesEmployeeIdRehireRequest$Outbound = { "X-Gusto-API-Version": string; employee_id: string; }; /** @internal */ export const GetV1EmployeesEmployeeIdRehireRequest$outboundSchema: z.ZodType< GetV1EmployeesEmployeeIdRehireRequest$Outbound, z.ZodTypeDef, GetV1EmployeesEmployeeIdRehireRequest > = z.object({ xGustoAPIVersion: GetV1EmployeesEmployeeIdRehireHeaderXGustoAPIVersion$outboundSchema.default( "2025-06-15", ), employeeId: z.string(), }).transform((v) => { return remap$(v, { xGustoAPIVersion: "X-Gusto-API-Version", employeeId: "employee_id", }); }); export function getV1EmployeesEmployeeIdRehireRequestToJSON( getV1EmployeesEmployeeIdRehireRequest: GetV1EmployeesEmployeeIdRehireRequest, ): string { return JSON.stringify( GetV1EmployeesEmployeeIdRehireRequest$outboundSchema.parse( getV1EmployeesEmployeeIdRehireRequest, ), ); } /** @internal */ export const GetV1EmployeesEmployeeIdRehireResponse$inboundSchema: z.ZodType< GetV1EmployeesEmployeeIdRehireResponse, z.ZodTypeDef, unknown > = z.object({ HttpMeta: HTTPMetadata$inboundSchema, Rehire: Rehire$inboundSchema.optional(), }).transform((v) => { return remap$(v, { "HttpMeta": "httpMeta", "Rehire": "rehire", }); }); export function getV1EmployeesEmployeeIdRehireResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => GetV1EmployeesEmployeeIdRehireResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetV1EmployeesEmployeeIdRehireResponse' from JSON`, ); }