/* * 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 { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type LocationServicesLocationManagementDeleteListOrPointGlobals = { source?: string | undefined; }; export type DeleteListOrPointRequest = { /** * The key you want to use to authenticate with the service (you can request we create one for you or create one in your [account section](https://account.loqate.com/account#/)). */ key?: string | undefined; /** * The unique GUID for a given list. */ listId?: string | undefined; /** * The unique GUID for a given location. */ locationID?: string | undefined; }; /** * Success */ export type LocationServicesLocationManagementDeleteListOrPointExternalEndpointResponse = { /** * A message detailing how the operation performed. */ message?: string | undefined; /** * The GUID of the list or location deleted. */ id?: string | undefined; }; /** @internal */ export type DeleteListOrPointRequest$Outbound = { Key: string; listId?: string | undefined; locationID?: string | undefined; }; /** @internal */ export const DeleteListOrPointRequest$outboundSchema: z.ZodType< DeleteListOrPointRequest$Outbound, z.ZodTypeDef, DeleteListOrPointRequest > = z.object({ key: z.string().default("AA11-AA11-AA11-AA11"), listId: z.string().optional(), locationID: z.string().optional(), }).transform((v) => { return remap$(v, { key: "Key", }); }); export function deleteListOrPointRequestToJSON( deleteListOrPointRequest: DeleteListOrPointRequest, ): string { return JSON.stringify( DeleteListOrPointRequest$outboundSchema.parse(deleteListOrPointRequest), ); } /** @internal */ export const LocationServicesLocationManagementDeleteListOrPointExternalEndpointResponse$inboundSchema: z.ZodType< LocationServicesLocationManagementDeleteListOrPointExternalEndpointResponse, z.ZodTypeDef, unknown > = z.object({ Message: z.string().optional(), Id: z.string().optional(), }).transform((v) => { return remap$(v, { "Message": "message", "Id": "id", }); }); export function locationServicesLocationManagementDeleteListOrPointExternalEndpointResponseFromJSON( jsonString: string, ): SafeParseResult< LocationServicesLocationManagementDeleteListOrPointExternalEndpointResponse, SDKValidationError > { return safeParse( jsonString, (x) => LocationServicesLocationManagementDeleteListOrPointExternalEndpointResponse$inboundSchema .parse(JSON.parse(x)), `Failed to parse 'LocationServicesLocationManagementDeleteListOrPointExternalEndpointResponse' from JSON`, ); }