/* * 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 DeleteV1CompaniesCompanyIdPayrollsHeaderXGustoAPIVersion = { 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 DeleteV1CompaniesCompanyIdPayrollsHeaderXGustoAPIVersion = ClosedEnum; export type DeleteV1CompaniesCompanyIdPayrollsRequest = { /** * The UUID of the company */ companyId: string; /** * The UUID of the payroll */ payrollId: string; /** * When true, request an asynchronous delete of the payroll. */ async?: boolean | undefined; /** * 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?: | DeleteV1CompaniesCompanyIdPayrollsHeaderXGustoAPIVersion | undefined; }; export type DeleteV1CompaniesCompanyIdPayrollsResponse = { httpMeta: HTTPMetadata; }; /** @internal */ export const DeleteV1CompaniesCompanyIdPayrollsHeaderXGustoAPIVersion$outboundSchema: z.ZodNativeEnum< typeof DeleteV1CompaniesCompanyIdPayrollsHeaderXGustoAPIVersion > = z.nativeEnum(DeleteV1CompaniesCompanyIdPayrollsHeaderXGustoAPIVersion); /** @internal */ export type DeleteV1CompaniesCompanyIdPayrollsRequest$Outbound = { company_id: string; payroll_id: string; async?: boolean | undefined; "X-Gusto-API-Version": string; }; /** @internal */ export const DeleteV1CompaniesCompanyIdPayrollsRequest$outboundSchema: z.ZodType< DeleteV1CompaniesCompanyIdPayrollsRequest$Outbound, z.ZodTypeDef, DeleteV1CompaniesCompanyIdPayrollsRequest > = z.object({ companyId: z.string(), payrollId: z.string(), async: z.boolean().optional(), xGustoAPIVersion: DeleteV1CompaniesCompanyIdPayrollsHeaderXGustoAPIVersion$outboundSchema .default("2025-06-15"), }).transform((v) => { return remap$(v, { companyId: "company_id", payrollId: "payroll_id", xGustoAPIVersion: "X-Gusto-API-Version", }); }); export function deleteV1CompaniesCompanyIdPayrollsRequestToJSON( deleteV1CompaniesCompanyIdPayrollsRequest: DeleteV1CompaniesCompanyIdPayrollsRequest, ): string { return JSON.stringify( DeleteV1CompaniesCompanyIdPayrollsRequest$outboundSchema.parse( deleteV1CompaniesCompanyIdPayrollsRequest, ), ); } /** @internal */ export const DeleteV1CompaniesCompanyIdPayrollsResponse$inboundSchema: z.ZodType = z.object({ HttpMeta: HTTPMetadata$inboundSchema, }).transform((v) => { return remap$(v, { "HttpMeta": "httpMeta", }); }); export function deleteV1CompaniesCompanyIdPayrollsResponseFromJSON( jsonString: string, ): SafeParseResult< DeleteV1CompaniesCompanyIdPayrollsResponse, SDKValidationError > { return safeParse( jsonString, (x) => DeleteV1CompaniesCompanyIdPayrollsResponse$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeleteV1CompaniesCompanyIdPayrollsResponse' from JSON`, ); }