/* * 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 { ExternalPayrollTaxSuggestions, ExternalPayrollTaxSuggestions$inboundSchema, } from "../components/externalpayrolltaxsuggestions.js"; import { HTTPMetadata, HTTPMetadata$inboundSchema, } from "../components/httpmetadata.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 GetV1ExternalPayrollCalculateTaxesHeaderXGustoAPIVersion = { 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 GetV1ExternalPayrollCalculateTaxesHeaderXGustoAPIVersion = ClosedEnum; export type GetV1ExternalPayrollCalculateTaxesRequest = { /** * 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?: | GetV1ExternalPayrollCalculateTaxesHeaderXGustoAPIVersion | undefined; /** * The UUID of the company */ companyUuid: string; /** * The UUID of the external payroll */ externalPayrollId: string; }; export type GetV1ExternalPayrollCalculateTaxesResponse = { httpMeta: HTTPMetadata; /** * Success */ externalPayrollTaxSuggestions?: | Array | undefined; }; /** @internal */ export const GetV1ExternalPayrollCalculateTaxesHeaderXGustoAPIVersion$outboundSchema: z.ZodNativeEnum< typeof GetV1ExternalPayrollCalculateTaxesHeaderXGustoAPIVersion > = z.nativeEnum(GetV1ExternalPayrollCalculateTaxesHeaderXGustoAPIVersion); /** @internal */ export type GetV1ExternalPayrollCalculateTaxesRequest$Outbound = { "X-Gusto-API-Version": string; company_uuid: string; external_payroll_id: string; }; /** @internal */ export const GetV1ExternalPayrollCalculateTaxesRequest$outboundSchema: z.ZodType< GetV1ExternalPayrollCalculateTaxesRequest$Outbound, z.ZodTypeDef, GetV1ExternalPayrollCalculateTaxesRequest > = z.object({ xGustoAPIVersion: GetV1ExternalPayrollCalculateTaxesHeaderXGustoAPIVersion$outboundSchema .default("2025-06-15"), companyUuid: z.string(), externalPayrollId: z.string(), }).transform((v) => { return remap$(v, { xGustoAPIVersion: "X-Gusto-API-Version", companyUuid: "company_uuid", externalPayrollId: "external_payroll_id", }); }); export function getV1ExternalPayrollCalculateTaxesRequestToJSON( getV1ExternalPayrollCalculateTaxesRequest: GetV1ExternalPayrollCalculateTaxesRequest, ): string { return JSON.stringify( GetV1ExternalPayrollCalculateTaxesRequest$outboundSchema.parse( getV1ExternalPayrollCalculateTaxesRequest, ), ); } /** @internal */ export const GetV1ExternalPayrollCalculateTaxesResponse$inboundSchema: z.ZodType = z.object({ HttpMeta: HTTPMetadata$inboundSchema, "External-Payroll-Tax-Suggestions": z.array( ExternalPayrollTaxSuggestions$inboundSchema, ).optional(), }).transform((v) => { return remap$(v, { "HttpMeta": "httpMeta", "External-Payroll-Tax-Suggestions": "externalPayrollTaxSuggestions", }); }); export function getV1ExternalPayrollCalculateTaxesResponseFromJSON( jsonString: string, ): SafeParseResult< GetV1ExternalPayrollCalculateTaxesResponse, SDKValidationError > { return safeParse( jsonString, (x) => GetV1ExternalPayrollCalculateTaxesResponse$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'GetV1ExternalPayrollCalculateTaxesResponse' from JSON`, ); }