/* * 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 { EmployeeBenefit, EmployeeBenefit$inboundSchema, } from "../components/employeebenefit.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 GetV1EmployeeBenefitsEmployeeBenefitIdHeaderXGustoAPIVersion = { 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 GetV1EmployeeBenefitsEmployeeBenefitIdHeaderXGustoAPIVersion = ClosedEnum< typeof GetV1EmployeeBenefitsEmployeeBenefitIdHeaderXGustoAPIVersion >; export type GetV1EmployeeBenefitsEmployeeBenefitIdRequest = { /** * 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?: | GetV1EmployeeBenefitsEmployeeBenefitIdHeaderXGustoAPIVersion | undefined; /** * The UUID of the employee benefit. */ employeeBenefitId: string; }; export type GetV1EmployeeBenefitsEmployeeBenefitIdResponse = { httpMeta: HTTPMetadata; /** * Example response */ employeeBenefit?: EmployeeBenefit | undefined; }; /** @internal */ export const GetV1EmployeeBenefitsEmployeeBenefitIdHeaderXGustoAPIVersion$outboundSchema: z.ZodNativeEnum< typeof GetV1EmployeeBenefitsEmployeeBenefitIdHeaderXGustoAPIVersion > = z.nativeEnum( GetV1EmployeeBenefitsEmployeeBenefitIdHeaderXGustoAPIVersion, ); /** @internal */ export type GetV1EmployeeBenefitsEmployeeBenefitIdRequest$Outbound = { "X-Gusto-API-Version": string; employee_benefit_id: string; }; /** @internal */ export const GetV1EmployeeBenefitsEmployeeBenefitIdRequest$outboundSchema: z.ZodType< GetV1EmployeeBenefitsEmployeeBenefitIdRequest$Outbound, z.ZodTypeDef, GetV1EmployeeBenefitsEmployeeBenefitIdRequest > = z.object({ xGustoAPIVersion: GetV1EmployeeBenefitsEmployeeBenefitIdHeaderXGustoAPIVersion$outboundSchema .default("2025-06-15"), employeeBenefitId: z.string(), }).transform((v) => { return remap$(v, { xGustoAPIVersion: "X-Gusto-API-Version", employeeBenefitId: "employee_benefit_id", }); }); export function getV1EmployeeBenefitsEmployeeBenefitIdRequestToJSON( getV1EmployeeBenefitsEmployeeBenefitIdRequest: GetV1EmployeeBenefitsEmployeeBenefitIdRequest, ): string { return JSON.stringify( GetV1EmployeeBenefitsEmployeeBenefitIdRequest$outboundSchema.parse( getV1EmployeeBenefitsEmployeeBenefitIdRequest, ), ); } /** @internal */ export const GetV1EmployeeBenefitsEmployeeBenefitIdResponse$inboundSchema: z.ZodType< GetV1EmployeeBenefitsEmployeeBenefitIdResponse, z.ZodTypeDef, unknown > = z.object({ HttpMeta: HTTPMetadata$inboundSchema, "Employee-Benefit": EmployeeBenefit$inboundSchema.optional(), }).transform((v) => { return remap$(v, { "HttpMeta": "httpMeta", "Employee-Benefit": "employeeBenefit", }); }); export function getV1EmployeeBenefitsEmployeeBenefitIdResponseFromJSON( jsonString: string, ): SafeParseResult< GetV1EmployeeBenefitsEmployeeBenefitIdResponse, SDKValidationError > { return safeParse( jsonString, (x) => GetV1EmployeeBenefitsEmployeeBenefitIdResponse$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'GetV1EmployeeBenefitsEmployeeBenefitIdResponse' from JSON`, ); }