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