/* * 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 { EmployeeCustomFieldList, EmployeeCustomFieldList$inboundSchema, } from "../components/employeecustomfieldlist.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 GetV1EmployeesEmployeeIdCustomFieldsHeaderXGustoAPIVersion = { 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 GetV1EmployeesEmployeeIdCustomFieldsHeaderXGustoAPIVersion = ClosedEnum; export type GetV1EmployeesEmployeeIdCustomFieldsRequest = { /** * The UUID of the employee */ employeeId: string; /** * The page that is requested. When unspecified, will load all objects unless endpoint forces pagination. */ page?: number | undefined; /** * Number of objects per page. For majority of endpoints will default to 25 */ per?: number | undefined; /** * 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?: | GetV1EmployeesEmployeeIdCustomFieldsHeaderXGustoAPIVersion | undefined; }; export type GetV1EmployeesEmployeeIdCustomFieldsResponse = { httpMeta: HTTPMetadata; /** * Success */ employeeCustomFieldList?: EmployeeCustomFieldList | undefined; }; /** @internal */ export const GetV1EmployeesEmployeeIdCustomFieldsHeaderXGustoAPIVersion$outboundSchema: z.ZodNativeEnum< typeof GetV1EmployeesEmployeeIdCustomFieldsHeaderXGustoAPIVersion > = z.nativeEnum(GetV1EmployeesEmployeeIdCustomFieldsHeaderXGustoAPIVersion); /** @internal */ export type GetV1EmployeesEmployeeIdCustomFieldsRequest$Outbound = { employee_id: string; page?: number | undefined; per?: number | undefined; "X-Gusto-API-Version": string; }; /** @internal */ export const GetV1EmployeesEmployeeIdCustomFieldsRequest$outboundSchema: z.ZodType< GetV1EmployeesEmployeeIdCustomFieldsRequest$Outbound, z.ZodTypeDef, GetV1EmployeesEmployeeIdCustomFieldsRequest > = z.object({ employeeId: z.string(), page: z.number().int().optional(), per: z.number().int().optional(), xGustoAPIVersion: GetV1EmployeesEmployeeIdCustomFieldsHeaderXGustoAPIVersion$outboundSchema .default("2025-06-15"), }).transform((v) => { return remap$(v, { employeeId: "employee_id", xGustoAPIVersion: "X-Gusto-API-Version", }); }); export function getV1EmployeesEmployeeIdCustomFieldsRequestToJSON( getV1EmployeesEmployeeIdCustomFieldsRequest: GetV1EmployeesEmployeeIdCustomFieldsRequest, ): string { return JSON.stringify( GetV1EmployeesEmployeeIdCustomFieldsRequest$outboundSchema.parse( getV1EmployeesEmployeeIdCustomFieldsRequest, ), ); } /** @internal */ export const GetV1EmployeesEmployeeIdCustomFieldsResponse$inboundSchema: z.ZodType< GetV1EmployeesEmployeeIdCustomFieldsResponse, z.ZodTypeDef, unknown > = z.object({ HttpMeta: HTTPMetadata$inboundSchema, "Employee-Custom-Field-List": EmployeeCustomFieldList$inboundSchema .optional(), }).transform((v) => { return remap$(v, { "HttpMeta": "httpMeta", "Employee-Custom-Field-List": "employeeCustomFieldList", }); }); export function getV1EmployeesEmployeeIdCustomFieldsResponseFromJSON( jsonString: string, ): SafeParseResult< GetV1EmployeesEmployeeIdCustomFieldsResponse, SDKValidationError > { return safeParse( jsonString, (x) => GetV1EmployeesEmployeeIdCustomFieldsResponse$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'GetV1EmployeesEmployeeIdCustomFieldsResponse' from JSON`, ); }