/* * 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 { PeopleBatchResults, PeopleBatchResults$inboundSchema, } from "../components/peoplebatchresults.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 GetV1PeopleBatchesPeopleBatchUuidHeaderXGustoAPIVersion = { 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 GetV1PeopleBatchesPeopleBatchUuidHeaderXGustoAPIVersion = ClosedEnum; export type GetV1PeopleBatchesPeopleBatchUuidRequest = { /** * The UUID of the people batch */ peopleBatchUuid: string; /** * 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?: | GetV1PeopleBatchesPeopleBatchUuidHeaderXGustoAPIVersion | undefined; }; export type GetV1PeopleBatchesPeopleBatchUuidResponse = { httpMeta: HTTPMetadata; /** * successful */ peopleBatchResults?: PeopleBatchResults | undefined; }; /** @internal */ export const GetV1PeopleBatchesPeopleBatchUuidHeaderXGustoAPIVersion$outboundSchema: z.ZodNativeEnum< typeof GetV1PeopleBatchesPeopleBatchUuidHeaderXGustoAPIVersion > = z.nativeEnum(GetV1PeopleBatchesPeopleBatchUuidHeaderXGustoAPIVersion); /** @internal */ export type GetV1PeopleBatchesPeopleBatchUuidRequest$Outbound = { people_batch_uuid: string; "X-Gusto-API-Version": string; }; /** @internal */ export const GetV1PeopleBatchesPeopleBatchUuidRequest$outboundSchema: z.ZodType< GetV1PeopleBatchesPeopleBatchUuidRequest$Outbound, z.ZodTypeDef, GetV1PeopleBatchesPeopleBatchUuidRequest > = z.object({ peopleBatchUuid: z.string(), xGustoAPIVersion: GetV1PeopleBatchesPeopleBatchUuidHeaderXGustoAPIVersion$outboundSchema .default("2025-06-15"), }).transform((v) => { return remap$(v, { peopleBatchUuid: "people_batch_uuid", xGustoAPIVersion: "X-Gusto-API-Version", }); }); export function getV1PeopleBatchesPeopleBatchUuidRequestToJSON( getV1PeopleBatchesPeopleBatchUuidRequest: GetV1PeopleBatchesPeopleBatchUuidRequest, ): string { return JSON.stringify( GetV1PeopleBatchesPeopleBatchUuidRequest$outboundSchema.parse( getV1PeopleBatchesPeopleBatchUuidRequest, ), ); } /** @internal */ export const GetV1PeopleBatchesPeopleBatchUuidResponse$inboundSchema: z.ZodType< GetV1PeopleBatchesPeopleBatchUuidResponse, z.ZodTypeDef, unknown > = z.object({ HttpMeta: HTTPMetadata$inboundSchema, "People-Batch-Results": PeopleBatchResults$inboundSchema.optional(), }).transform((v) => { return remap$(v, { "HttpMeta": "httpMeta", "People-Batch-Results": "peopleBatchResults", }); }); export function getV1PeopleBatchesPeopleBatchUuidResponseFromJSON( jsonString: string, ): SafeParseResult< GetV1PeopleBatchesPeopleBatchUuidResponse, SDKValidationError > { return safeParse( jsonString, (x) => GetV1PeopleBatchesPeopleBatchUuidResponse$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'GetV1PeopleBatchesPeopleBatchUuidResponse' from JSON`, ); }