/* * 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 GetV1EmployeesEmployeeIdRecurringReimbursementsHeaderXGustoAPIVersion = { 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 GetV1EmployeesEmployeeIdRecurringReimbursementsHeaderXGustoAPIVersion = ClosedEnum< typeof GetV1EmployeesEmployeeIdRecurringReimbursementsHeaderXGustoAPIVersion >; export type GetV1EmployeesEmployeeIdRecurringReimbursementsRequest = { /** * 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?: | GetV1EmployeesEmployeeIdRecurringReimbursementsHeaderXGustoAPIVersion | undefined; /** * The UUID of the employee */ employeeId: string; /** * The page that is requested. When unspecified, will load all objects unless endpoint forces pagination. */ page?: number | undefined; /** * Number of objects per page. For majority of endpoints will default to 25 */ per?: number | undefined; }; export type GetV1EmployeesEmployeeIdRecurringReimbursementsResponse = { httpMeta: HTTPMetadata; /** * successful */ recurringReimbursementList?: Array | undefined; }; /** @internal */ export const GetV1EmployeesEmployeeIdRecurringReimbursementsHeaderXGustoAPIVersion$outboundSchema: z.ZodNativeEnum< typeof GetV1EmployeesEmployeeIdRecurringReimbursementsHeaderXGustoAPIVersion > = z.nativeEnum( GetV1EmployeesEmployeeIdRecurringReimbursementsHeaderXGustoAPIVersion, ); /** @internal */ export type GetV1EmployeesEmployeeIdRecurringReimbursementsRequest$Outbound = { "X-Gusto-API-Version": string; employee_id: string; page?: number | undefined; per?: number | undefined; }; /** @internal */ export const GetV1EmployeesEmployeeIdRecurringReimbursementsRequest$outboundSchema: z.ZodType< GetV1EmployeesEmployeeIdRecurringReimbursementsRequest$Outbound, z.ZodTypeDef, GetV1EmployeesEmployeeIdRecurringReimbursementsRequest > = z.object({ xGustoAPIVersion: GetV1EmployeesEmployeeIdRecurringReimbursementsHeaderXGustoAPIVersion$outboundSchema .default("2025-06-15"), employeeId: z.string(), page: z.number().int().optional(), per: z.number().int().optional(), }).transform((v) => { return remap$(v, { xGustoAPIVersion: "X-Gusto-API-Version", employeeId: "employee_id", }); }); export function getV1EmployeesEmployeeIdRecurringReimbursementsRequestToJSON( getV1EmployeesEmployeeIdRecurringReimbursementsRequest: GetV1EmployeesEmployeeIdRecurringReimbursementsRequest, ): string { return JSON.stringify( GetV1EmployeesEmployeeIdRecurringReimbursementsRequest$outboundSchema.parse( getV1EmployeesEmployeeIdRecurringReimbursementsRequest, ), ); } /** @internal */ export const GetV1EmployeesEmployeeIdRecurringReimbursementsResponse$inboundSchema: z.ZodType< GetV1EmployeesEmployeeIdRecurringReimbursementsResponse, z.ZodTypeDef, unknown > = z.object({ HttpMeta: HTTPMetadata$inboundSchema, "Recurring-Reimbursement-List": z.array( RecurringReimbursement$inboundSchema, ).optional(), }).transform((v) => { return remap$(v, { "HttpMeta": "httpMeta", "Recurring-Reimbursement-List": "recurringReimbursementList", }); }); export function getV1EmployeesEmployeeIdRecurringReimbursementsResponseFromJSON( jsonString: string, ): SafeParseResult< GetV1EmployeesEmployeeIdRecurringReimbursementsResponse, SDKValidationError > { return safeParse( jsonString, (x) => GetV1EmployeesEmployeeIdRecurringReimbursementsResponse$inboundSchema .parse(JSON.parse(x)), `Failed to parse 'GetV1EmployeesEmployeeIdRecurringReimbursementsResponse' from JSON`, ); }