/* * 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 { PartnerManagedCompanyRetrieveTermsOfServiceRequest, PartnerManagedCompanyRetrieveTermsOfServiceRequest$Outbound, PartnerManagedCompanyRetrieveTermsOfServiceRequest$outboundSchema, } from "../components/partnermanagedcompanyretrievetermsofservicerequest.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 PostPartnerManagedCompaniesCompanyUuidRetrieveTermsOfServiceHeaderXGustoAPIVersion = { 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 PostPartnerManagedCompaniesCompanyUuidRetrieveTermsOfServiceHeaderXGustoAPIVersion = ClosedEnum< typeof PostPartnerManagedCompaniesCompanyUuidRetrieveTermsOfServiceHeaderXGustoAPIVersion >; export type PostPartnerManagedCompaniesCompanyUuidRetrieveTermsOfServiceRequest = { /** * 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?: | PostPartnerManagedCompaniesCompanyUuidRetrieveTermsOfServiceHeaderXGustoAPIVersion | undefined; partnerManagedCompanyRetrieveTermsOfServiceRequest: PartnerManagedCompanyRetrieveTermsOfServiceRequest; }; export type PostPartnerManagedCompaniesCompanyUuidRetrieveTermsOfServiceResponse = { httpMeta: HTTPMetadata; /** * Example response */ partnerManagedCompanyTermsOfServiceResponse?: | PartnerManagedCompanyTermsOfServiceResponse | undefined; }; /** @internal */ export const PostPartnerManagedCompaniesCompanyUuidRetrieveTermsOfServiceHeaderXGustoAPIVersion$outboundSchema: z.ZodNativeEnum< typeof PostPartnerManagedCompaniesCompanyUuidRetrieveTermsOfServiceHeaderXGustoAPIVersion > = z.nativeEnum( PostPartnerManagedCompaniesCompanyUuidRetrieveTermsOfServiceHeaderXGustoAPIVersion, ); /** @internal */ export type PostPartnerManagedCompaniesCompanyUuidRetrieveTermsOfServiceRequest$Outbound = { company_uuid: string; "X-Gusto-API-Version": string; "Partner-Managed-Company-Retrieve-Terms-Of-Service-Request": PartnerManagedCompanyRetrieveTermsOfServiceRequest$Outbound; }; /** @internal */ export const PostPartnerManagedCompaniesCompanyUuidRetrieveTermsOfServiceRequest$outboundSchema: z.ZodType< PostPartnerManagedCompaniesCompanyUuidRetrieveTermsOfServiceRequest$Outbound, z.ZodTypeDef, PostPartnerManagedCompaniesCompanyUuidRetrieveTermsOfServiceRequest > = z.object({ companyUuid: z.string(), xGustoAPIVersion: PostPartnerManagedCompaniesCompanyUuidRetrieveTermsOfServiceHeaderXGustoAPIVersion$outboundSchema .default("2025-06-15"), partnerManagedCompanyRetrieveTermsOfServiceRequest: PartnerManagedCompanyRetrieveTermsOfServiceRequest$outboundSchema, }).transform((v) => { return remap$(v, { companyUuid: "company_uuid", xGustoAPIVersion: "X-Gusto-API-Version", partnerManagedCompanyRetrieveTermsOfServiceRequest: "Partner-Managed-Company-Retrieve-Terms-Of-Service-Request", }); }); export function postPartnerManagedCompaniesCompanyUuidRetrieveTermsOfServiceRequestToJSON( postPartnerManagedCompaniesCompanyUuidRetrieveTermsOfServiceRequest: PostPartnerManagedCompaniesCompanyUuidRetrieveTermsOfServiceRequest, ): string { return JSON.stringify( PostPartnerManagedCompaniesCompanyUuidRetrieveTermsOfServiceRequest$outboundSchema .parse( postPartnerManagedCompaniesCompanyUuidRetrieveTermsOfServiceRequest, ), ); } /** @internal */ export const PostPartnerManagedCompaniesCompanyUuidRetrieveTermsOfServiceResponse$inboundSchema: z.ZodType< PostPartnerManagedCompaniesCompanyUuidRetrieveTermsOfServiceResponse, 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 postPartnerManagedCompaniesCompanyUuidRetrieveTermsOfServiceResponseFromJSON( jsonString: string, ): SafeParseResult< PostPartnerManagedCompaniesCompanyUuidRetrieveTermsOfServiceResponse, SDKValidationError > { return safeParse( jsonString, (x) => PostPartnerManagedCompaniesCompanyUuidRetrieveTermsOfServiceResponse$inboundSchema .parse(JSON.parse(x)), `Failed to parse 'PostPartnerManagedCompaniesCompanyUuidRetrieveTermsOfServiceResponse' from JSON`, ); }