/* * 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 VaultConsumersDeleteGlobals = { /** * The ID of your Unify application */ appId?: string | undefined; }; export type VaultConsumersDeleteRequest = { /** * ID of the consumer to return */ consumerId: string; }; export type VaultConsumersDeleteResponse = { httpMeta: components.HTTPMetadata; /** * Consumer deleted */ deleteConsumerResponse?: components.DeleteConsumerResponse | undefined; /** * Unexpected error */ unexpectedErrorResponse?: components.UnexpectedErrorResponse | undefined; }; /** @internal */ export const VaultConsumersDeleteGlobals$inboundSchema: z.ZodType< VaultConsumersDeleteGlobals, z.ZodTypeDef, unknown > = z.object({ appId: z.string().optional(), }); /** @internal */ export type VaultConsumersDeleteGlobals$Outbound = { appId?: string | undefined; }; /** @internal */ export const VaultConsumersDeleteGlobals$outboundSchema: z.ZodType< VaultConsumersDeleteGlobals$Outbound, z.ZodTypeDef, VaultConsumersDeleteGlobals > = z.object({ 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 VaultConsumersDeleteGlobals$ { /** @deprecated use `VaultConsumersDeleteGlobals$inboundSchema` instead. */ export const inboundSchema = VaultConsumersDeleteGlobals$inboundSchema; /** @deprecated use `VaultConsumersDeleteGlobals$outboundSchema` instead. */ export const outboundSchema = VaultConsumersDeleteGlobals$outboundSchema; /** @deprecated use `VaultConsumersDeleteGlobals$Outbound` instead. */ export type Outbound = VaultConsumersDeleteGlobals$Outbound; } export function vaultConsumersDeleteGlobalsToJSON( vaultConsumersDeleteGlobals: VaultConsumersDeleteGlobals, ): string { return JSON.stringify( VaultConsumersDeleteGlobals$outboundSchema.parse( vaultConsumersDeleteGlobals, ), ); } export function vaultConsumersDeleteGlobalsFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => VaultConsumersDeleteGlobals$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'VaultConsumersDeleteGlobals' from JSON`, ); } /** @internal */ export const VaultConsumersDeleteRequest$inboundSchema: z.ZodType< VaultConsumersDeleteRequest, z.ZodTypeDef, unknown > = z.object({ consumer_id: z.string(), }).transform((v) => { return remap$(v, { "consumer_id": "consumerId", }); }); /** @internal */ export type VaultConsumersDeleteRequest$Outbound = { consumer_id: string; }; /** @internal */ export const VaultConsumersDeleteRequest$outboundSchema: z.ZodType< VaultConsumersDeleteRequest$Outbound, z.ZodTypeDef, VaultConsumersDeleteRequest > = z.object({ consumerId: z.string(), }).transform((v) => { return remap$(v, { consumerId: "consumer_id", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace VaultConsumersDeleteRequest$ { /** @deprecated use `VaultConsumersDeleteRequest$inboundSchema` instead. */ export const inboundSchema = VaultConsumersDeleteRequest$inboundSchema; /** @deprecated use `VaultConsumersDeleteRequest$outboundSchema` instead. */ export const outboundSchema = VaultConsumersDeleteRequest$outboundSchema; /** @deprecated use `VaultConsumersDeleteRequest$Outbound` instead. */ export type Outbound = VaultConsumersDeleteRequest$Outbound; } export function vaultConsumersDeleteRequestToJSON( vaultConsumersDeleteRequest: VaultConsumersDeleteRequest, ): string { return JSON.stringify( VaultConsumersDeleteRequest$outboundSchema.parse( vaultConsumersDeleteRequest, ), ); } export function vaultConsumersDeleteRequestFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => VaultConsumersDeleteRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'VaultConsumersDeleteRequest' from JSON`, ); } /** @internal */ export const VaultConsumersDeleteResponse$inboundSchema: z.ZodType< VaultConsumersDeleteResponse, z.ZodTypeDef, unknown > = z.object({ HttpMeta: components.HTTPMetadata$inboundSchema, DeleteConsumerResponse: components.DeleteConsumerResponse$inboundSchema .optional(), UnexpectedErrorResponse: components.UnexpectedErrorResponse$inboundSchema .optional(), }).transform((v) => { return remap$(v, { "HttpMeta": "httpMeta", "DeleteConsumerResponse": "deleteConsumerResponse", "UnexpectedErrorResponse": "unexpectedErrorResponse", }); }); /** @internal */ export type VaultConsumersDeleteResponse$Outbound = { HttpMeta: components.HTTPMetadata$Outbound; DeleteConsumerResponse?: | components.DeleteConsumerResponse$Outbound | undefined; UnexpectedErrorResponse?: | components.UnexpectedErrorResponse$Outbound | undefined; }; /** @internal */ export const VaultConsumersDeleteResponse$outboundSchema: z.ZodType< VaultConsumersDeleteResponse$Outbound, z.ZodTypeDef, VaultConsumersDeleteResponse > = z.object({ httpMeta: components.HTTPMetadata$outboundSchema, deleteConsumerResponse: components.DeleteConsumerResponse$outboundSchema .optional(), unexpectedErrorResponse: components.UnexpectedErrorResponse$outboundSchema .optional(), }).transform((v) => { return remap$(v, { httpMeta: "HttpMeta", deleteConsumerResponse: "DeleteConsumerResponse", 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 VaultConsumersDeleteResponse$ { /** @deprecated use `VaultConsumersDeleteResponse$inboundSchema` instead. */ export const inboundSchema = VaultConsumersDeleteResponse$inboundSchema; /** @deprecated use `VaultConsumersDeleteResponse$outboundSchema` instead. */ export const outboundSchema = VaultConsumersDeleteResponse$outboundSchema; /** @deprecated use `VaultConsumersDeleteResponse$Outbound` instead. */ export type Outbound = VaultConsumersDeleteResponse$Outbound; } export function vaultConsumersDeleteResponseToJSON( vaultConsumersDeleteResponse: VaultConsumersDeleteResponse, ): string { return JSON.stringify( VaultConsumersDeleteResponse$outboundSchema.parse( vaultConsumersDeleteResponse, ), ); } export function vaultConsumersDeleteResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => VaultConsumersDeleteResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'VaultConsumersDeleteResponse' from JSON`, ); }