/* * 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 { 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 GetV1PayrollsPayrollUuidEmployeesEmployeeUuidPayStubHeaderXGustoAPIVersion = { 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 GetV1PayrollsPayrollUuidEmployeesEmployeeUuidPayStubHeaderXGustoAPIVersion = ClosedEnum< typeof GetV1PayrollsPayrollUuidEmployeesEmployeeUuidPayStubHeaderXGustoAPIVersion >; export type GetV1PayrollsPayrollUuidEmployeesEmployeeUuidPayStubRequest = { /** * 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?: | GetV1PayrollsPayrollUuidEmployeesEmployeeUuidPayStubHeaderXGustoAPIVersion | undefined; /** * The UUID of the payroll */ payrollId: string; /** * The UUID of the employee */ employeeId: string; }; export type GetV1PayrollsPayrollUuidEmployeesEmployeeUuidPayStubResponse = { httpMeta: HTTPMetadata; /** * successful */ responseStream?: ReadableStream | undefined; }; /** @internal */ export const GetV1PayrollsPayrollUuidEmployeesEmployeeUuidPayStubHeaderXGustoAPIVersion$outboundSchema: z.ZodNativeEnum< typeof GetV1PayrollsPayrollUuidEmployeesEmployeeUuidPayStubHeaderXGustoAPIVersion > = z.nativeEnum( GetV1PayrollsPayrollUuidEmployeesEmployeeUuidPayStubHeaderXGustoAPIVersion, ); /** @internal */ export type GetV1PayrollsPayrollUuidEmployeesEmployeeUuidPayStubRequest$Outbound = { "X-Gusto-API-Version": string; payroll_id: string; employee_id: string; }; /** @internal */ export const GetV1PayrollsPayrollUuidEmployeesEmployeeUuidPayStubRequest$outboundSchema: z.ZodType< GetV1PayrollsPayrollUuidEmployeesEmployeeUuidPayStubRequest$Outbound, z.ZodTypeDef, GetV1PayrollsPayrollUuidEmployeesEmployeeUuidPayStubRequest > = z.object({ xGustoAPIVersion: GetV1PayrollsPayrollUuidEmployeesEmployeeUuidPayStubHeaderXGustoAPIVersion$outboundSchema .default("2025-06-15"), payrollId: z.string(), employeeId: z.string(), }).transform((v) => { return remap$(v, { xGustoAPIVersion: "X-Gusto-API-Version", payrollId: "payroll_id", employeeId: "employee_id", }); }); export function getV1PayrollsPayrollUuidEmployeesEmployeeUuidPayStubRequestToJSON( getV1PayrollsPayrollUuidEmployeesEmployeeUuidPayStubRequest: GetV1PayrollsPayrollUuidEmployeesEmployeeUuidPayStubRequest, ): string { return JSON.stringify( GetV1PayrollsPayrollUuidEmployeesEmployeeUuidPayStubRequest$outboundSchema .parse(getV1PayrollsPayrollUuidEmployeesEmployeeUuidPayStubRequest), ); } /** @internal */ export const GetV1PayrollsPayrollUuidEmployeesEmployeeUuidPayStubResponse$inboundSchema: z.ZodType< GetV1PayrollsPayrollUuidEmployeesEmployeeUuidPayStubResponse, z.ZodTypeDef, unknown > = z.object({ HttpMeta: HTTPMetadata$inboundSchema, "response-stream": z.instanceof(ReadableStream).optional(), }).transform((v) => { return remap$(v, { "HttpMeta": "httpMeta", "response-stream": "responseStream", }); }); export function getV1PayrollsPayrollUuidEmployeesEmployeeUuidPayStubResponseFromJSON( jsonString: string, ): SafeParseResult< GetV1PayrollsPayrollUuidEmployeesEmployeeUuidPayStubResponse, SDKValidationError > { return safeParse( jsonString, (x) => GetV1PayrollsPayrollUuidEmployeesEmployeeUuidPayStubResponse$inboundSchema .parse(JSON.parse(x)), `Failed to parse 'GetV1PayrollsPayrollUuidEmployeesEmployeeUuidPayStubResponse' from JSON`, ); }