/* * 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 { RecurringReimbursement, RecurringReimbursement$inboundSchema, } from "../components/recurringreimbursement.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 GetV1RecurringReimbursementsHeaderXGustoAPIVersion = { 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 GetV1RecurringReimbursementsHeaderXGustoAPIVersion = ClosedEnum< typeof GetV1RecurringReimbursementsHeaderXGustoAPIVersion >; export type GetV1RecurringReimbursementsRequest = { /** * 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?: | GetV1RecurringReimbursementsHeaderXGustoAPIVersion | undefined; /** * The UUID of the reimbursement */ id: string; }; export type GetV1RecurringReimbursementsResponse = { httpMeta: HTTPMetadata; /** * successful */ recurringReimbursement?: RecurringReimbursement | undefined; }; /** @internal */ export const GetV1RecurringReimbursementsHeaderXGustoAPIVersion$outboundSchema: z.ZodNativeEnum = z .nativeEnum(GetV1RecurringReimbursementsHeaderXGustoAPIVersion); /** @internal */ export type GetV1RecurringReimbursementsRequest$Outbound = { "X-Gusto-API-Version": string; id: string; }; /** @internal */ export const GetV1RecurringReimbursementsRequest$outboundSchema: z.ZodType< GetV1RecurringReimbursementsRequest$Outbound, z.ZodTypeDef, GetV1RecurringReimbursementsRequest > = z.object({ xGustoAPIVersion: GetV1RecurringReimbursementsHeaderXGustoAPIVersion$outboundSchema.default( "2025-06-15", ), id: z.string(), }).transform((v) => { return remap$(v, { xGustoAPIVersion: "X-Gusto-API-Version", }); }); export function getV1RecurringReimbursementsRequestToJSON( getV1RecurringReimbursementsRequest: GetV1RecurringReimbursementsRequest, ): string { return JSON.stringify( GetV1RecurringReimbursementsRequest$outboundSchema.parse( getV1RecurringReimbursementsRequest, ), ); } /** @internal */ export const GetV1RecurringReimbursementsResponse$inboundSchema: z.ZodType< GetV1RecurringReimbursementsResponse, z.ZodTypeDef, unknown > = z.object({ HttpMeta: HTTPMetadata$inboundSchema, "Recurring-Reimbursement": RecurringReimbursement$inboundSchema.optional(), }).transform((v) => { return remap$(v, { "HttpMeta": "httpMeta", "Recurring-Reimbursement": "recurringReimbursement", }); }); export function getV1RecurringReimbursementsResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => GetV1RecurringReimbursementsResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetV1RecurringReimbursementsResponse' from JSON`, ); }