/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import * as components from "../components/index.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type HrisEmployeesDeleteGlobals = { /** * ID of the consumer which you want to get or push data from */ consumerId?: string | undefined; /** * The ID of your Unify application */ appId?: string | undefined; }; export type HrisEmployeesDeleteRequest = { /** * ID of the record you are acting upon. */ id: string; /** * Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. */ serviceId?: string | undefined; /** * Include raw response. Mostly used for debugging purposes */ raw?: boolean | undefined; }; export type HrisEmployeesDeleteResponse = { httpMeta: components.HTTPMetadata; /** * Employees */ deleteEmployeeResponse?: components.DeleteEmployeeResponse | undefined; /** * Unexpected error */ unexpectedErrorResponse?: components.UnexpectedErrorResponse | undefined; }; /** @internal */ export const HrisEmployeesDeleteGlobals$inboundSchema: z.ZodType< HrisEmployeesDeleteGlobals, z.ZodTypeDef, unknown > = z.object({ consumerId: z.string().optional(), appId: z.string().optional(), }); /** @internal */ export type HrisEmployeesDeleteGlobals$Outbound = { consumerId?: string | undefined; appId?: string | undefined; }; /** @internal */ export const HrisEmployeesDeleteGlobals$outboundSchema: z.ZodType< HrisEmployeesDeleteGlobals$Outbound, z.ZodTypeDef, HrisEmployeesDeleteGlobals > = z.object({ consumerId: z.string().optional(), appId: z.string().optional(), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace HrisEmployeesDeleteGlobals$ { /** @deprecated use `HrisEmployeesDeleteGlobals$inboundSchema` instead. */ export const inboundSchema = HrisEmployeesDeleteGlobals$inboundSchema; /** @deprecated use `HrisEmployeesDeleteGlobals$outboundSchema` instead. */ export const outboundSchema = HrisEmployeesDeleteGlobals$outboundSchema; /** @deprecated use `HrisEmployeesDeleteGlobals$Outbound` instead. */ export type Outbound = HrisEmployeesDeleteGlobals$Outbound; } export function hrisEmployeesDeleteGlobalsToJSON( hrisEmployeesDeleteGlobals: HrisEmployeesDeleteGlobals, ): string { return JSON.stringify( HrisEmployeesDeleteGlobals$outboundSchema.parse(hrisEmployeesDeleteGlobals), ); } export function hrisEmployeesDeleteGlobalsFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => HrisEmployeesDeleteGlobals$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'HrisEmployeesDeleteGlobals' from JSON`, ); } /** @internal */ export const HrisEmployeesDeleteRequest$inboundSchema: z.ZodType< HrisEmployeesDeleteRequest, z.ZodTypeDef, unknown > = z.object({ id: z.string(), serviceId: z.string().optional(), raw: z.boolean().default(false), }); /** @internal */ export type HrisEmployeesDeleteRequest$Outbound = { id: string; serviceId?: string | undefined; raw: boolean; }; /** @internal */ export const HrisEmployeesDeleteRequest$outboundSchema: z.ZodType< HrisEmployeesDeleteRequest$Outbound, z.ZodTypeDef, HrisEmployeesDeleteRequest > = z.object({ id: z.string(), serviceId: z.string().optional(), raw: z.boolean().default(false), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace HrisEmployeesDeleteRequest$ { /** @deprecated use `HrisEmployeesDeleteRequest$inboundSchema` instead. */ export const inboundSchema = HrisEmployeesDeleteRequest$inboundSchema; /** @deprecated use `HrisEmployeesDeleteRequest$outboundSchema` instead. */ export const outboundSchema = HrisEmployeesDeleteRequest$outboundSchema; /** @deprecated use `HrisEmployeesDeleteRequest$Outbound` instead. */ export type Outbound = HrisEmployeesDeleteRequest$Outbound; } export function hrisEmployeesDeleteRequestToJSON( hrisEmployeesDeleteRequest: HrisEmployeesDeleteRequest, ): string { return JSON.stringify( HrisEmployeesDeleteRequest$outboundSchema.parse(hrisEmployeesDeleteRequest), ); } export function hrisEmployeesDeleteRequestFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => HrisEmployeesDeleteRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'HrisEmployeesDeleteRequest' from JSON`, ); } /** @internal */ export const HrisEmployeesDeleteResponse$inboundSchema: z.ZodType< HrisEmployeesDeleteResponse, z.ZodTypeDef, unknown > = z.object({ HttpMeta: components.HTTPMetadata$inboundSchema, DeleteEmployeeResponse: components.DeleteEmployeeResponse$inboundSchema .optional(), UnexpectedErrorResponse: components.UnexpectedErrorResponse$inboundSchema .optional(), }).transform((v) => { return remap$(v, { "HttpMeta": "httpMeta", "DeleteEmployeeResponse": "deleteEmployeeResponse", "UnexpectedErrorResponse": "unexpectedErrorResponse", }); }); /** @internal */ export type HrisEmployeesDeleteResponse$Outbound = { HttpMeta: components.HTTPMetadata$Outbound; DeleteEmployeeResponse?: | components.DeleteEmployeeResponse$Outbound | undefined; UnexpectedErrorResponse?: | components.UnexpectedErrorResponse$Outbound | undefined; }; /** @internal */ export const HrisEmployeesDeleteResponse$outboundSchema: z.ZodType< HrisEmployeesDeleteResponse$Outbound, z.ZodTypeDef, HrisEmployeesDeleteResponse > = z.object({ httpMeta: components.HTTPMetadata$outboundSchema, deleteEmployeeResponse: components.DeleteEmployeeResponse$outboundSchema .optional(), unexpectedErrorResponse: components.UnexpectedErrorResponse$outboundSchema .optional(), }).transform((v) => { return remap$(v, { httpMeta: "HttpMeta", deleteEmployeeResponse: "DeleteEmployeeResponse", unexpectedErrorResponse: "UnexpectedErrorResponse", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace HrisEmployeesDeleteResponse$ { /** @deprecated use `HrisEmployeesDeleteResponse$inboundSchema` instead. */ export const inboundSchema = HrisEmployeesDeleteResponse$inboundSchema; /** @deprecated use `HrisEmployeesDeleteResponse$outboundSchema` instead. */ export const outboundSchema = HrisEmployeesDeleteResponse$outboundSchema; /** @deprecated use `HrisEmployeesDeleteResponse$Outbound` instead. */ export type Outbound = HrisEmployeesDeleteResponse$Outbound; } export function hrisEmployeesDeleteResponseToJSON( hrisEmployeesDeleteResponse: HrisEmployeesDeleteResponse, ): string { return JSON.stringify( HrisEmployeesDeleteResponse$outboundSchema.parse( hrisEmployeesDeleteResponse, ), ); } export function hrisEmployeesDeleteResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => HrisEmployeesDeleteResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'HrisEmployeesDeleteResponse' from JSON`, ); }