/* * 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 { PartnerManagedCompanyTermsOfServiceResponse, PartnerManagedCompanyTermsOfServiceResponse$inboundSchema, } from "../components/partnermanagedcompanytermsofserviceresponse.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 GetV1PartnerManagedCompaniesCompanyUuidTermsOfServiceHeaderXGustoAPIVersion = { TwoThousandAndTwentySixMinus06Minus15: "2026-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 GetV1PartnerManagedCompaniesCompanyUuidTermsOfServiceHeaderXGustoAPIVersion = ClosedEnum< typeof GetV1PartnerManagedCompaniesCompanyUuidTermsOfServiceHeaderXGustoAPIVersion >; export type GetV1PartnerManagedCompaniesCompanyUuidTermsOfServiceRequest = { /** * 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?: | GetV1PartnerManagedCompaniesCompanyUuidTermsOfServiceHeaderXGustoAPIVersion | undefined; /** * The UUID of the company */ companyUuid: string; }; export type GetV1PartnerManagedCompaniesCompanyUuidTermsOfServiceResponse = { httpMeta: HTTPMetadata; /** * Example response */ partnerManagedCompanyTermsOfServiceResponse?: | PartnerManagedCompanyTermsOfServiceResponse | undefined; }; /** @internal */ export const GetV1PartnerManagedCompaniesCompanyUuidTermsOfServiceHeaderXGustoAPIVersion$outboundSchema: z.ZodNativeEnum< typeof GetV1PartnerManagedCompaniesCompanyUuidTermsOfServiceHeaderXGustoAPIVersion > = z.nativeEnum( GetV1PartnerManagedCompaniesCompanyUuidTermsOfServiceHeaderXGustoAPIVersion, ); /** @internal */ export type GetV1PartnerManagedCompaniesCompanyUuidTermsOfServiceRequest$Outbound = { "X-Gusto-API-Version": string; company_uuid: string; }; /** @internal */ export const GetV1PartnerManagedCompaniesCompanyUuidTermsOfServiceRequest$outboundSchema: z.ZodType< GetV1PartnerManagedCompaniesCompanyUuidTermsOfServiceRequest$Outbound, z.ZodTypeDef, GetV1PartnerManagedCompaniesCompanyUuidTermsOfServiceRequest > = z.object({ xGustoAPIVersion: GetV1PartnerManagedCompaniesCompanyUuidTermsOfServiceHeaderXGustoAPIVersion$outboundSchema .default("2026-06-15"), companyUuid: z.string(), }).transform((v) => { return remap$(v, { xGustoAPIVersion: "X-Gusto-API-Version", companyUuid: "company_uuid", }); }); export function getV1PartnerManagedCompaniesCompanyUuidTermsOfServiceRequestToJSON( getV1PartnerManagedCompaniesCompanyUuidTermsOfServiceRequest: GetV1PartnerManagedCompaniesCompanyUuidTermsOfServiceRequest, ): string { return JSON.stringify( GetV1PartnerManagedCompaniesCompanyUuidTermsOfServiceRequest$outboundSchema .parse(getV1PartnerManagedCompaniesCompanyUuidTermsOfServiceRequest), ); } /** @internal */ export const GetV1PartnerManagedCompaniesCompanyUuidTermsOfServiceResponse$inboundSchema: z.ZodType< GetV1PartnerManagedCompaniesCompanyUuidTermsOfServiceResponse, z.ZodTypeDef, unknown > = z.object({ HttpMeta: HTTPMetadata$inboundSchema, "Partner-Managed-Company-Terms-Of-Service-Response": PartnerManagedCompanyTermsOfServiceResponse$inboundSchema.optional(), }).transform((v) => { return remap$(v, { "HttpMeta": "httpMeta", "Partner-Managed-Company-Terms-Of-Service-Response": "partnerManagedCompanyTermsOfServiceResponse", }); }); export function getV1PartnerManagedCompaniesCompanyUuidTermsOfServiceResponseFromJSON( jsonString: string, ): SafeParseResult< GetV1PartnerManagedCompaniesCompanyUuidTermsOfServiceResponse, SDKValidationError > { return safeParse( jsonString, (x) => GetV1PartnerManagedCompaniesCompanyUuidTermsOfServiceResponse$inboundSchema .parse(JSON.parse(x)), `Failed to parse 'GetV1PartnerManagedCompaniesCompanyUuidTermsOfServiceResponse' from JSON`, ); }