/* * 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 { 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 DeleteV1ExternalPayrollHeaderXGustoAPIVersion = { 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 DeleteV1ExternalPayrollHeaderXGustoAPIVersion = ClosedEnum< typeof DeleteV1ExternalPayrollHeaderXGustoAPIVersion >; export type DeleteV1ExternalPayrollRequest = { /** * 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?: DeleteV1ExternalPayrollHeaderXGustoAPIVersion | undefined; /** * The UUID of the company */ companyUuid: string; /** * The UUID of the external payroll */ externalPayrollId: string; }; export type DeleteV1ExternalPayrollResponse = { httpMeta: HTTPMetadata; }; /** @internal */ export const DeleteV1ExternalPayrollHeaderXGustoAPIVersion$outboundSchema: z.ZodNativeEnum = z .nativeEnum(DeleteV1ExternalPayrollHeaderXGustoAPIVersion); /** @internal */ export type DeleteV1ExternalPayrollRequest$Outbound = { "X-Gusto-API-Version": string; company_uuid: string; external_payroll_id: string; }; /** @internal */ export const DeleteV1ExternalPayrollRequest$outboundSchema: z.ZodType< DeleteV1ExternalPayrollRequest$Outbound, z.ZodTypeDef, DeleteV1ExternalPayrollRequest > = z.object({ xGustoAPIVersion: DeleteV1ExternalPayrollHeaderXGustoAPIVersion$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 deleteV1ExternalPayrollRequestToJSON( deleteV1ExternalPayrollRequest: DeleteV1ExternalPayrollRequest, ): string { return JSON.stringify( DeleteV1ExternalPayrollRequest$outboundSchema.parse( deleteV1ExternalPayrollRequest, ), ); } /** @internal */ export const DeleteV1ExternalPayrollResponse$inboundSchema: z.ZodType< DeleteV1ExternalPayrollResponse, z.ZodTypeDef, unknown > = z.object({ HttpMeta: HTTPMetadata$inboundSchema, }).transform((v) => { return remap$(v, { "HttpMeta": "httpMeta", }); }); export function deleteV1ExternalPayrollResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => DeleteV1ExternalPayrollResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeleteV1ExternalPayrollResponse' from JSON`, ); }