/* * 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 { EmployeeSection603HighEarnerStatus, EmployeeSection603HighEarnerStatus$inboundSchema, } from "../components/employeesection603highearnerstatus.js"; import { EmployeeSection603HighEarnerStatusUpdateRequest, EmployeeSection603HighEarnerStatusUpdateRequest$Outbound, EmployeeSection603HighEarnerStatusUpdateRequest$outboundSchema, } from "../components/employeesection603highearnerstatusupdaterequest.js"; import { HTTPMetadata, HTTPMetadata$inboundSchema, } from "../components/httpmetadata.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 PatchV1EmployeesEmployeeUuidSection603HighEarnerStatusesEffectiveYearHeaderXGustoAPIVersion = { 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 PatchV1EmployeesEmployeeUuidSection603HighEarnerStatusesEffectiveYearHeaderXGustoAPIVersion = ClosedEnum< typeof PatchV1EmployeesEmployeeUuidSection603HighEarnerStatusesEffectiveYearHeaderXGustoAPIVersion >; export type PatchV1EmployeesEmployeeUuidSection603HighEarnerStatusesEffectiveYearRequest = { /** * The UUID of the employee */ employeeUuid: string; /** * The effective year for the Section 603 status */ effectiveYear: number; /** * 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?: | PatchV1EmployeesEmployeeUuidSection603HighEarnerStatusesEffectiveYearHeaderXGustoAPIVersion | undefined; employeeSection603HighEarnerStatusUpdateRequest: EmployeeSection603HighEarnerStatusUpdateRequest; }; export type PatchV1EmployeesEmployeeUuidSection603HighEarnerStatusesEffectiveYearResponse = { httpMeta: HTTPMetadata; /** * successful */ employeeSection603HighEarnerStatus?: | EmployeeSection603HighEarnerStatus | undefined; }; /** @internal */ export const PatchV1EmployeesEmployeeUuidSection603HighEarnerStatusesEffectiveYearHeaderXGustoAPIVersion$outboundSchema: z.ZodNativeEnum< typeof PatchV1EmployeesEmployeeUuidSection603HighEarnerStatusesEffectiveYearHeaderXGustoAPIVersion > = z.nativeEnum( PatchV1EmployeesEmployeeUuidSection603HighEarnerStatusesEffectiveYearHeaderXGustoAPIVersion, ); /** @internal */ export type PatchV1EmployeesEmployeeUuidSection603HighEarnerStatusesEffectiveYearRequest$Outbound = { employee_uuid: string; effective_year: number; "X-Gusto-API-Version": string; "Employee-Section603-High-Earner-Status-Update-Request": EmployeeSection603HighEarnerStatusUpdateRequest$Outbound; }; /** @internal */ export const PatchV1EmployeesEmployeeUuidSection603HighEarnerStatusesEffectiveYearRequest$outboundSchema: z.ZodType< PatchV1EmployeesEmployeeUuidSection603HighEarnerStatusesEffectiveYearRequest$Outbound, z.ZodTypeDef, PatchV1EmployeesEmployeeUuidSection603HighEarnerStatusesEffectiveYearRequest > = z.object({ employeeUuid: z.string(), effectiveYear: z.number().int(), xGustoAPIVersion: PatchV1EmployeesEmployeeUuidSection603HighEarnerStatusesEffectiveYearHeaderXGustoAPIVersion$outboundSchema .default("2025-06-15"), employeeSection603HighEarnerStatusUpdateRequest: EmployeeSection603HighEarnerStatusUpdateRequest$outboundSchema, }).transform((v) => { return remap$(v, { employeeUuid: "employee_uuid", effectiveYear: "effective_year", xGustoAPIVersion: "X-Gusto-API-Version", employeeSection603HighEarnerStatusUpdateRequest: "Employee-Section603-High-Earner-Status-Update-Request", }); }); export function patchV1EmployeesEmployeeUuidSection603HighEarnerStatusesEffectiveYearRequestToJSON( patchV1EmployeesEmployeeUuidSection603HighEarnerStatusesEffectiveYearRequest: PatchV1EmployeesEmployeeUuidSection603HighEarnerStatusesEffectiveYearRequest, ): string { return JSON.stringify( PatchV1EmployeesEmployeeUuidSection603HighEarnerStatusesEffectiveYearRequest$outboundSchema .parse( patchV1EmployeesEmployeeUuidSection603HighEarnerStatusesEffectiveYearRequest, ), ); } /** @internal */ export const PatchV1EmployeesEmployeeUuidSection603HighEarnerStatusesEffectiveYearResponse$inboundSchema: z.ZodType< PatchV1EmployeesEmployeeUuidSection603HighEarnerStatusesEffectiveYearResponse, z.ZodTypeDef, unknown > = z.object({ HttpMeta: HTTPMetadata$inboundSchema, "Employee-Section603-High-Earner-Status": EmployeeSection603HighEarnerStatus$inboundSchema.optional(), }).transform((v) => { return remap$(v, { "HttpMeta": "httpMeta", "Employee-Section603-High-Earner-Status": "employeeSection603HighEarnerStatus", }); }); export function patchV1EmployeesEmployeeUuidSection603HighEarnerStatusesEffectiveYearResponseFromJSON( jsonString: string, ): SafeParseResult< PatchV1EmployeesEmployeeUuidSection603HighEarnerStatusesEffectiveYearResponse, SDKValidationError > { return safeParse( jsonString, (x) => PatchV1EmployeesEmployeeUuidSection603HighEarnerStatusesEffectiveYearResponse$inboundSchema .parse(JSON.parse(x)), `Failed to parse 'PatchV1EmployeesEmployeeUuidSection603HighEarnerStatusesEffectiveYearResponse' from JSON`, ); }