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