/* * 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 { WireInRequest, WireInRequest$inboundSchema, } from "../components/wireinrequest.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 GetCompaniesCompanyUuidWireInRequestUuidHeaderXGustoAPIVersion = { 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 GetCompaniesCompanyUuidWireInRequestUuidHeaderXGustoAPIVersion = ClosedEnum< typeof GetCompaniesCompanyUuidWireInRequestUuidHeaderXGustoAPIVersion >; export type GetCompaniesCompanyUuidWireInRequestUuidRequest = { /** * The UUID of the company */ companyUuid: string; /** * 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?: | GetCompaniesCompanyUuidWireInRequestUuidHeaderXGustoAPIVersion | undefined; /** * 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 GetCompaniesCompanyUuidWireInRequestUuidResponse = { httpMeta: HTTPMetadata; /** * Success */ wireInRequestList?: Array | undefined; }; /** @internal */ export const GetCompaniesCompanyUuidWireInRequestUuidHeaderXGustoAPIVersion$outboundSchema: z.ZodNativeEnum< typeof GetCompaniesCompanyUuidWireInRequestUuidHeaderXGustoAPIVersion > = z.nativeEnum( GetCompaniesCompanyUuidWireInRequestUuidHeaderXGustoAPIVersion, ); /** @internal */ export type GetCompaniesCompanyUuidWireInRequestUuidRequest$Outbound = { company_uuid: string; "X-Gusto-API-Version": string; page?: number | undefined; per?: number | undefined; }; /** @internal */ export const GetCompaniesCompanyUuidWireInRequestUuidRequest$outboundSchema: z.ZodType< GetCompaniesCompanyUuidWireInRequestUuidRequest$Outbound, z.ZodTypeDef, GetCompaniesCompanyUuidWireInRequestUuidRequest > = z.object({ companyUuid: z.string(), xGustoAPIVersion: GetCompaniesCompanyUuidWireInRequestUuidHeaderXGustoAPIVersion$outboundSchema .default("2025-06-15"), page: z.number().int().optional(), per: z.number().int().optional(), }).transform((v) => { return remap$(v, { companyUuid: "company_uuid", xGustoAPIVersion: "X-Gusto-API-Version", }); }); export function getCompaniesCompanyUuidWireInRequestUuidRequestToJSON( getCompaniesCompanyUuidWireInRequestUuidRequest: GetCompaniesCompanyUuidWireInRequestUuidRequest, ): string { return JSON.stringify( GetCompaniesCompanyUuidWireInRequestUuidRequest$outboundSchema.parse( getCompaniesCompanyUuidWireInRequestUuidRequest, ), ); } /** @internal */ export const GetCompaniesCompanyUuidWireInRequestUuidResponse$inboundSchema: z.ZodType< GetCompaniesCompanyUuidWireInRequestUuidResponse, z.ZodTypeDef, unknown > = z.object({ HttpMeta: HTTPMetadata$inboundSchema, "Wire-In-Request-List": z.array(WireInRequest$inboundSchema).optional(), }).transform((v) => { return remap$(v, { "HttpMeta": "httpMeta", "Wire-In-Request-List": "wireInRequestList", }); }); export function getCompaniesCompanyUuidWireInRequestUuidResponseFromJSON( jsonString: string, ): SafeParseResult< GetCompaniesCompanyUuidWireInRequestUuidResponse, SDKValidationError > { return safeParse( jsonString, (x) => GetCompaniesCompanyUuidWireInRequestUuidResponse$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'GetCompaniesCompanyUuidWireInRequestUuidResponse' from JSON`, ); }