/* * 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 DeleteV1EmployeeHeaderXGustoAPIVersion = { 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 DeleteV1EmployeeHeaderXGustoAPIVersion = ClosedEnum< typeof DeleteV1EmployeeHeaderXGustoAPIVersion >; export type DeleteV1EmployeeRequest = { /** * 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?: DeleteV1EmployeeHeaderXGustoAPIVersion | undefined; /** * The UUID of the employee */ employeeId: string; }; export type DeleteV1EmployeeResponse = { httpMeta: HTTPMetadata; }; /** @internal */ export const DeleteV1EmployeeHeaderXGustoAPIVersion$outboundSchema: z.ZodNativeEnum = z.nativeEnum( DeleteV1EmployeeHeaderXGustoAPIVersion, ); /** @internal */ export type DeleteV1EmployeeRequest$Outbound = { "X-Gusto-API-Version": string; employee_id: string; }; /** @internal */ export const DeleteV1EmployeeRequest$outboundSchema: z.ZodType< DeleteV1EmployeeRequest$Outbound, z.ZodTypeDef, DeleteV1EmployeeRequest > = z.object({ xGustoAPIVersion: DeleteV1EmployeeHeaderXGustoAPIVersion$outboundSchema .default("2025-06-15"), employeeId: z.string(), }).transform((v) => { return remap$(v, { xGustoAPIVersion: "X-Gusto-API-Version", employeeId: "employee_id", }); }); export function deleteV1EmployeeRequestToJSON( deleteV1EmployeeRequest: DeleteV1EmployeeRequest, ): string { return JSON.stringify( DeleteV1EmployeeRequest$outboundSchema.parse(deleteV1EmployeeRequest), ); } /** @internal */ export const DeleteV1EmployeeResponse$inboundSchema: z.ZodType< DeleteV1EmployeeResponse, z.ZodTypeDef, unknown > = z.object({ HttpMeta: HTTPMetadata$inboundSchema, }).transform((v) => { return remap$(v, { "HttpMeta": "httpMeta", }); }); export function deleteV1EmployeeResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => DeleteV1EmployeeResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeleteV1EmployeeResponse' from JSON`, ); }