/* * 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 RedebitRecoveryCaseHeaderXGustoAPIVersion = { 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 RedebitRecoveryCaseHeaderXGustoAPIVersion = ClosedEnum< typeof RedebitRecoveryCaseHeaderXGustoAPIVersion >; export type RedebitRecoveryCaseRequest = { /** * 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?: RedebitRecoveryCaseHeaderXGustoAPIVersion | undefined; /** * The UUID of the recovery case */ recoveryCaseUuid: string; }; export type RedebitRecoveryCaseResponse = { httpMeta: HTTPMetadata; }; /** @internal */ export const RedebitRecoveryCaseHeaderXGustoAPIVersion$outboundSchema: z.ZodNativeEnum = z .nativeEnum(RedebitRecoveryCaseHeaderXGustoAPIVersion); /** @internal */ export type RedebitRecoveryCaseRequest$Outbound = { "X-Gusto-API-Version": string; recovery_case_uuid: string; }; /** @internal */ export const RedebitRecoveryCaseRequest$outboundSchema: z.ZodType< RedebitRecoveryCaseRequest$Outbound, z.ZodTypeDef, RedebitRecoveryCaseRequest > = z.object({ xGustoAPIVersion: RedebitRecoveryCaseHeaderXGustoAPIVersion$outboundSchema .default("2025-06-15"), recoveryCaseUuid: z.string(), }).transform((v) => { return remap$(v, { xGustoAPIVersion: "X-Gusto-API-Version", recoveryCaseUuid: "recovery_case_uuid", }); }); export function redebitRecoveryCaseRequestToJSON( redebitRecoveryCaseRequest: RedebitRecoveryCaseRequest, ): string { return JSON.stringify( RedebitRecoveryCaseRequest$outboundSchema.parse(redebitRecoveryCaseRequest), ); } /** @internal */ export const RedebitRecoveryCaseResponse$inboundSchema: z.ZodType< RedebitRecoveryCaseResponse, z.ZodTypeDef, unknown > = z.object({ HttpMeta: HTTPMetadata$inboundSchema, }).transform((v) => { return remap$(v, { "HttpMeta": "httpMeta", }); }); export function redebitRecoveryCaseResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => RedebitRecoveryCaseResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RedebitRecoveryCaseResponse' from JSON`, ); }