/* * 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 PostV1EmployeesEmployeeIdRecurringReimbursementsHeaderXGustoAPIVersion = { 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 PostV1EmployeesEmployeeIdRecurringReimbursementsHeaderXGustoAPIVersion = ClosedEnum< typeof PostV1EmployeesEmployeeIdRecurringReimbursementsHeaderXGustoAPIVersion >; export type PostV1EmployeesEmployeeIdRecurringReimbursementsRequestBody = { /** * The description of the reimbursement */ description: string; /** * The dollar amount of the reimbursement */ amount: number; }; export type PostV1EmployeesEmployeeIdRecurringReimbursementsRequest = { /** * 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?: | PostV1EmployeesEmployeeIdRecurringReimbursementsHeaderXGustoAPIVersion | undefined; /** * The UUID of the employee */ employeeId: string; requestBody: PostV1EmployeesEmployeeIdRecurringReimbursementsRequestBody; }; export type PostV1EmployeesEmployeeIdRecurringReimbursementsResponse = { httpMeta: HTTPMetadata; /** * successful */ recurringReimbursement?: RecurringReimbursement | undefined; }; /** @internal */ export const PostV1EmployeesEmployeeIdRecurringReimbursementsHeaderXGustoAPIVersion$outboundSchema: z.ZodNativeEnum< typeof PostV1EmployeesEmployeeIdRecurringReimbursementsHeaderXGustoAPIVersion > = z.nativeEnum( PostV1EmployeesEmployeeIdRecurringReimbursementsHeaderXGustoAPIVersion, ); /** @internal */ export type PostV1EmployeesEmployeeIdRecurringReimbursementsRequestBody$Outbound = { description: string; amount: number; }; /** @internal */ export const PostV1EmployeesEmployeeIdRecurringReimbursementsRequestBody$outboundSchema: z.ZodType< PostV1EmployeesEmployeeIdRecurringReimbursementsRequestBody$Outbound, z.ZodTypeDef, PostV1EmployeesEmployeeIdRecurringReimbursementsRequestBody > = z.object({ description: z.string(), amount: z.number(), }); export function postV1EmployeesEmployeeIdRecurringReimbursementsRequestBodyToJSON( postV1EmployeesEmployeeIdRecurringReimbursementsRequestBody: PostV1EmployeesEmployeeIdRecurringReimbursementsRequestBody, ): string { return JSON.stringify( PostV1EmployeesEmployeeIdRecurringReimbursementsRequestBody$outboundSchema .parse(postV1EmployeesEmployeeIdRecurringReimbursementsRequestBody), ); } /** @internal */ export type PostV1EmployeesEmployeeIdRecurringReimbursementsRequest$Outbound = { "X-Gusto-API-Version": string; employee_id: string; RequestBody: PostV1EmployeesEmployeeIdRecurringReimbursementsRequestBody$Outbound; }; /** @internal */ export const PostV1EmployeesEmployeeIdRecurringReimbursementsRequest$outboundSchema: z.ZodType< PostV1EmployeesEmployeeIdRecurringReimbursementsRequest$Outbound, z.ZodTypeDef, PostV1EmployeesEmployeeIdRecurringReimbursementsRequest > = z.object({ xGustoAPIVersion: PostV1EmployeesEmployeeIdRecurringReimbursementsHeaderXGustoAPIVersion$outboundSchema .default("2025-06-15"), employeeId: z.string(), requestBody: z.lazy(() => PostV1EmployeesEmployeeIdRecurringReimbursementsRequestBody$outboundSchema ), }).transform((v) => { return remap$(v, { xGustoAPIVersion: "X-Gusto-API-Version", employeeId: "employee_id", requestBody: "RequestBody", }); }); export function postV1EmployeesEmployeeIdRecurringReimbursementsRequestToJSON( postV1EmployeesEmployeeIdRecurringReimbursementsRequest: PostV1EmployeesEmployeeIdRecurringReimbursementsRequest, ): string { return JSON.stringify( PostV1EmployeesEmployeeIdRecurringReimbursementsRequest$outboundSchema .parse(postV1EmployeesEmployeeIdRecurringReimbursementsRequest), ); } /** @internal */ export const PostV1EmployeesEmployeeIdRecurringReimbursementsResponse$inboundSchema: z.ZodType< PostV1EmployeesEmployeeIdRecurringReimbursementsResponse, 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 postV1EmployeesEmployeeIdRecurringReimbursementsResponseFromJSON( jsonString: string, ): SafeParseResult< PostV1EmployeesEmployeeIdRecurringReimbursementsResponse, SDKValidationError > { return safeParse( jsonString, (x) => PostV1EmployeesEmployeeIdRecurringReimbursementsResponse$inboundSchema .parse(JSON.parse(x)), `Failed to parse 'PostV1EmployeesEmployeeIdRecurringReimbursementsResponse' from JSON`, ); }