/* * 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 { EmployeeFederalTax, EmployeeFederalTax$inboundSchema, } from "../components/employeefederaltax.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 GetV1EmployeesEmployeeIdFederalTaxesHeaderXGustoAPIVersion = { 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 GetV1EmployeesEmployeeIdFederalTaxesHeaderXGustoAPIVersion = ClosedEnum; export type GetV1EmployeesEmployeeIdFederalTaxesRequest = { /** * 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?: | GetV1EmployeesEmployeeIdFederalTaxesHeaderXGustoAPIVersion | undefined; /** * The UUID of the employee */ employeeUuid: string; }; export type GetV1EmployeesEmployeeIdFederalTaxesResponse = { httpMeta: HTTPMetadata; /** * Successful */ employeeFederalTax?: EmployeeFederalTax | undefined; }; /** @internal */ export const GetV1EmployeesEmployeeIdFederalTaxesHeaderXGustoAPIVersion$outboundSchema: z.ZodNativeEnum< typeof GetV1EmployeesEmployeeIdFederalTaxesHeaderXGustoAPIVersion > = z.nativeEnum(GetV1EmployeesEmployeeIdFederalTaxesHeaderXGustoAPIVersion); /** @internal */ export type GetV1EmployeesEmployeeIdFederalTaxesRequest$Outbound = { "X-Gusto-API-Version": string; employee_uuid: string; }; /** @internal */ export const GetV1EmployeesEmployeeIdFederalTaxesRequest$outboundSchema: z.ZodType< GetV1EmployeesEmployeeIdFederalTaxesRequest$Outbound, z.ZodTypeDef, GetV1EmployeesEmployeeIdFederalTaxesRequest > = z.object({ xGustoAPIVersion: GetV1EmployeesEmployeeIdFederalTaxesHeaderXGustoAPIVersion$outboundSchema .default("2025-06-15"), employeeUuid: z.string(), }).transform((v) => { return remap$(v, { xGustoAPIVersion: "X-Gusto-API-Version", employeeUuid: "employee_uuid", }); }); export function getV1EmployeesEmployeeIdFederalTaxesRequestToJSON( getV1EmployeesEmployeeIdFederalTaxesRequest: GetV1EmployeesEmployeeIdFederalTaxesRequest, ): string { return JSON.stringify( GetV1EmployeesEmployeeIdFederalTaxesRequest$outboundSchema.parse( getV1EmployeesEmployeeIdFederalTaxesRequest, ), ); } /** @internal */ export const GetV1EmployeesEmployeeIdFederalTaxesResponse$inboundSchema: z.ZodType< GetV1EmployeesEmployeeIdFederalTaxesResponse, z.ZodTypeDef, unknown > = z.object({ HttpMeta: HTTPMetadata$inboundSchema, "Employee-Federal-Tax": EmployeeFederalTax$inboundSchema.optional(), }).transform((v) => { return remap$(v, { "HttpMeta": "httpMeta", "Employee-Federal-Tax": "employeeFederalTax", }); }); export function getV1EmployeesEmployeeIdFederalTaxesResponseFromJSON( jsonString: string, ): SafeParseResult< GetV1EmployeesEmployeeIdFederalTaxesResponse, SDKValidationError > { return safeParse( jsonString, (x) => GetV1EmployeesEmployeeIdFederalTaxesResponse$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'GetV1EmployeesEmployeeIdFederalTaxesResponse' from JSON`, ); }