/* * 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 AtsApplicantsDeleteGlobals = { /** * 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 AtsApplicantsDeleteRequest = { /** * 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 AtsApplicantsDeleteResponse = { httpMeta: components.HTTPMetadata; /** * Applicants */ deleteApplicantResponse?: components.DeleteApplicantResponse | undefined; /** * Unexpected error */ unexpectedErrorResponse?: components.UnexpectedErrorResponse | undefined; }; /** @internal */ export const AtsApplicantsDeleteGlobals$inboundSchema: z.ZodType< AtsApplicantsDeleteGlobals, z.ZodTypeDef, unknown > = z.object({ consumerId: z.string().optional(), appId: z.string().optional(), }); /** @internal */ export type AtsApplicantsDeleteGlobals$Outbound = { consumerId?: string | undefined; appId?: string | undefined; }; /** @internal */ export const AtsApplicantsDeleteGlobals$outboundSchema: z.ZodType< AtsApplicantsDeleteGlobals$Outbound, z.ZodTypeDef, AtsApplicantsDeleteGlobals > = 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 AtsApplicantsDeleteGlobals$ { /** @deprecated use `AtsApplicantsDeleteGlobals$inboundSchema` instead. */ export const inboundSchema = AtsApplicantsDeleteGlobals$inboundSchema; /** @deprecated use `AtsApplicantsDeleteGlobals$outboundSchema` instead. */ export const outboundSchema = AtsApplicantsDeleteGlobals$outboundSchema; /** @deprecated use `AtsApplicantsDeleteGlobals$Outbound` instead. */ export type Outbound = AtsApplicantsDeleteGlobals$Outbound; } export function atsApplicantsDeleteGlobalsToJSON( atsApplicantsDeleteGlobals: AtsApplicantsDeleteGlobals, ): string { return JSON.stringify( AtsApplicantsDeleteGlobals$outboundSchema.parse(atsApplicantsDeleteGlobals), ); } export function atsApplicantsDeleteGlobalsFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => AtsApplicantsDeleteGlobals$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AtsApplicantsDeleteGlobals' from JSON`, ); } /** @internal */ export const AtsApplicantsDeleteRequest$inboundSchema: z.ZodType< AtsApplicantsDeleteRequest, z.ZodTypeDef, unknown > = z.object({ id: z.string(), serviceId: z.string().optional(), raw: z.boolean().default(false), }); /** @internal */ export type AtsApplicantsDeleteRequest$Outbound = { id: string; serviceId?: string | undefined; raw: boolean; }; /** @internal */ export const AtsApplicantsDeleteRequest$outboundSchema: z.ZodType< AtsApplicantsDeleteRequest$Outbound, z.ZodTypeDef, AtsApplicantsDeleteRequest > = 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 AtsApplicantsDeleteRequest$ { /** @deprecated use `AtsApplicantsDeleteRequest$inboundSchema` instead. */ export const inboundSchema = AtsApplicantsDeleteRequest$inboundSchema; /** @deprecated use `AtsApplicantsDeleteRequest$outboundSchema` instead. */ export const outboundSchema = AtsApplicantsDeleteRequest$outboundSchema; /** @deprecated use `AtsApplicantsDeleteRequest$Outbound` instead. */ export type Outbound = AtsApplicantsDeleteRequest$Outbound; } export function atsApplicantsDeleteRequestToJSON( atsApplicantsDeleteRequest: AtsApplicantsDeleteRequest, ): string { return JSON.stringify( AtsApplicantsDeleteRequest$outboundSchema.parse(atsApplicantsDeleteRequest), ); } export function atsApplicantsDeleteRequestFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => AtsApplicantsDeleteRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AtsApplicantsDeleteRequest' from JSON`, ); } /** @internal */ export const AtsApplicantsDeleteResponse$inboundSchema: z.ZodType< AtsApplicantsDeleteResponse, z.ZodTypeDef, unknown > = z.object({ HttpMeta: components.HTTPMetadata$inboundSchema, DeleteApplicantResponse: components.DeleteApplicantResponse$inboundSchema .optional(), UnexpectedErrorResponse: components.UnexpectedErrorResponse$inboundSchema .optional(), }).transform((v) => { return remap$(v, { "HttpMeta": "httpMeta", "DeleteApplicantResponse": "deleteApplicantResponse", "UnexpectedErrorResponse": "unexpectedErrorResponse", }); }); /** @internal */ export type AtsApplicantsDeleteResponse$Outbound = { HttpMeta: components.HTTPMetadata$Outbound; DeleteApplicantResponse?: | components.DeleteApplicantResponse$Outbound | undefined; UnexpectedErrorResponse?: | components.UnexpectedErrorResponse$Outbound | undefined; }; /** @internal */ export const AtsApplicantsDeleteResponse$outboundSchema: z.ZodType< AtsApplicantsDeleteResponse$Outbound, z.ZodTypeDef, AtsApplicantsDeleteResponse > = z.object({ httpMeta: components.HTTPMetadata$outboundSchema, deleteApplicantResponse: components.DeleteApplicantResponse$outboundSchema .optional(), unexpectedErrorResponse: components.UnexpectedErrorResponse$outboundSchema .optional(), }).transform((v) => { return remap$(v, { httpMeta: "HttpMeta", deleteApplicantResponse: "DeleteApplicantResponse", 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 AtsApplicantsDeleteResponse$ { /** @deprecated use `AtsApplicantsDeleteResponse$inboundSchema` instead. */ export const inboundSchema = AtsApplicantsDeleteResponse$inboundSchema; /** @deprecated use `AtsApplicantsDeleteResponse$outboundSchema` instead. */ export const outboundSchema = AtsApplicantsDeleteResponse$outboundSchema; /** @deprecated use `AtsApplicantsDeleteResponse$Outbound` instead. */ export type Outbound = AtsApplicantsDeleteResponse$Outbound; } export function atsApplicantsDeleteResponseToJSON( atsApplicantsDeleteResponse: AtsApplicantsDeleteResponse, ): string { return JSON.stringify( AtsApplicantsDeleteResponse$outboundSchema.parse( atsApplicantsDeleteResponse, ), ); } export function atsApplicantsDeleteResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => AtsApplicantsDeleteResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AtsApplicantsDeleteResponse' from JSON`, ); }