/* * 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 { PayrollCheck, PayrollCheck$inboundSchema, } from "../components/payrollcheck.js"; import { PrintablePayrollChecksBody, PrintablePayrollChecksBody$Outbound, PrintablePayrollChecksBody$outboundSchema, } from "../components/printablepayrollchecksbody.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 PostV1PayrollsPayrollUuidGeneratedDocumentsPrintablePayrollChecksHeaderXGustoAPIVersion = { 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 PostV1PayrollsPayrollUuidGeneratedDocumentsPrintablePayrollChecksHeaderXGustoAPIVersion = ClosedEnum< typeof PostV1PayrollsPayrollUuidGeneratedDocumentsPrintablePayrollChecksHeaderXGustoAPIVersion >; export type PostV1PayrollsPayrollUuidGeneratedDocumentsPrintablePayrollChecksRequest = { /** * 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?: | PostV1PayrollsPayrollUuidGeneratedDocumentsPrintablePayrollChecksHeaderXGustoAPIVersion | undefined; /** * The UUID of the payroll */ payrollUuid: string; printablePayrollChecksBody: PrintablePayrollChecksBody; }; export type PostV1PayrollsPayrollUuidGeneratedDocumentsPrintablePayrollChecksResponse = { httpMeta: HTTPMetadata; /** * Example response */ payrollCheck?: PayrollCheck | undefined; }; /** @internal */ export const PostV1PayrollsPayrollUuidGeneratedDocumentsPrintablePayrollChecksHeaderXGustoAPIVersion$outboundSchema: z.ZodNativeEnum< typeof PostV1PayrollsPayrollUuidGeneratedDocumentsPrintablePayrollChecksHeaderXGustoAPIVersion > = z.nativeEnum( PostV1PayrollsPayrollUuidGeneratedDocumentsPrintablePayrollChecksHeaderXGustoAPIVersion, ); /** @internal */ export type PostV1PayrollsPayrollUuidGeneratedDocumentsPrintablePayrollChecksRequest$Outbound = { "X-Gusto-API-Version": string; payroll_uuid: string; "Printable-Payroll-Checks-Body": PrintablePayrollChecksBody$Outbound; }; /** @internal */ export const PostV1PayrollsPayrollUuidGeneratedDocumentsPrintablePayrollChecksRequest$outboundSchema: z.ZodType< PostV1PayrollsPayrollUuidGeneratedDocumentsPrintablePayrollChecksRequest$Outbound, z.ZodTypeDef, PostV1PayrollsPayrollUuidGeneratedDocumentsPrintablePayrollChecksRequest > = z.object({ xGustoAPIVersion: PostV1PayrollsPayrollUuidGeneratedDocumentsPrintablePayrollChecksHeaderXGustoAPIVersion$outboundSchema .default("2025-06-15"), payrollUuid: z.string(), printablePayrollChecksBody: PrintablePayrollChecksBody$outboundSchema, }).transform((v) => { return remap$(v, { xGustoAPIVersion: "X-Gusto-API-Version", payrollUuid: "payroll_uuid", printablePayrollChecksBody: "Printable-Payroll-Checks-Body", }); }); export function postV1PayrollsPayrollUuidGeneratedDocumentsPrintablePayrollChecksRequestToJSON( postV1PayrollsPayrollUuidGeneratedDocumentsPrintablePayrollChecksRequest: PostV1PayrollsPayrollUuidGeneratedDocumentsPrintablePayrollChecksRequest, ): string { return JSON.stringify( PostV1PayrollsPayrollUuidGeneratedDocumentsPrintablePayrollChecksRequest$outboundSchema .parse( postV1PayrollsPayrollUuidGeneratedDocumentsPrintablePayrollChecksRequest, ), ); } /** @internal */ export const PostV1PayrollsPayrollUuidGeneratedDocumentsPrintablePayrollChecksResponse$inboundSchema: z.ZodType< PostV1PayrollsPayrollUuidGeneratedDocumentsPrintablePayrollChecksResponse, z.ZodTypeDef, unknown > = z.object({ HttpMeta: HTTPMetadata$inboundSchema, "Payroll-Check": PayrollCheck$inboundSchema.optional(), }).transform((v) => { return remap$(v, { "HttpMeta": "httpMeta", "Payroll-Check": "payrollCheck", }); }); export function postV1PayrollsPayrollUuidGeneratedDocumentsPrintablePayrollChecksResponseFromJSON( jsonString: string, ): SafeParseResult< PostV1PayrollsPayrollUuidGeneratedDocumentsPrintablePayrollChecksResponse, SDKValidationError > { return safeParse( jsonString, (x) => PostV1PayrollsPayrollUuidGeneratedDocumentsPrintablePayrollChecksResponse$inboundSchema .parse(JSON.parse(x)), `Failed to parse 'PostV1PayrollsPayrollUuidGeneratedDocumentsPrintablePayrollChecksResponse' from JSON`, ); }