/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; export const ConsoleV1EventsControllerGenListSpecificEventEventsStatus = { FourHundredAndOne: 401, } as const; export type ConsoleV1EventsControllerGenListSpecificEventEventsStatus = ClosedEnum< typeof ConsoleV1EventsControllerGenListSpecificEventEventsStatus >; /** * This endpoint only accepts an active CONSOLE key, but an invalid key was sent. Key: console-xxxXXXxxxXXXxxx */ export type ConsoleV1EventsControllerGenListSpecificEventEventsResponseBodyData = { status: ConsoleV1EventsControllerGenListSpecificEventEventsStatus; message: string; }; /** * This endpoint only accepts an active CONSOLE key, but an invalid key was sent. Key: console-xxxXXXxxxXXXxxx */ export class ConsoleV1EventsControllerGenListSpecificEventEventsResponseBody extends Error { status: ConsoleV1EventsControllerGenListSpecificEventEventsStatus; /** The original data that was passed to this error instance. */ data$: ConsoleV1EventsControllerGenListSpecificEventEventsResponseBodyData; constructor(err: ConsoleV1EventsControllerGenListSpecificEventEventsResponseBodyData) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; super(message); this.data$ = err; this.status = err.status; this.name = "ConsoleV1EventsControllerGenListSpecificEventEventsResponseBody"; } } export const ConsoleV1EventsControllerGenListSpecificEventStatus = { FourHundred: 400, } as const; export type ConsoleV1EventsControllerGenListSpecificEventStatus = ClosedEnum< typeof ConsoleV1EventsControllerGenListSpecificEventStatus >; /** * Invalid request. Please check the request input and try again. */ export type ConsoleV1EventsControllerGenListSpecificEventResponseBodyData = { status: ConsoleV1EventsControllerGenListSpecificEventStatus; message: string; }; /** * Invalid request. Please check the request input and try again. */ export class ConsoleV1EventsControllerGenListSpecificEventResponseBody extends Error { status: ConsoleV1EventsControllerGenListSpecificEventStatus; /** The original data that was passed to this error instance. */ data$: ConsoleV1EventsControllerGenListSpecificEventResponseBodyData; constructor(err: ConsoleV1EventsControllerGenListSpecificEventResponseBodyData) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; super(message); this.data$ = err; this.status = err.status; this.name = "ConsoleV1EventsControllerGenListSpecificEventResponseBody"; } } /** @internal */ export const ConsoleV1EventsControllerGenListSpecificEventEventsStatus$inboundSchema: z.ZodNativeEnum< typeof ConsoleV1EventsControllerGenListSpecificEventEventsStatus > = z.nativeEnum(ConsoleV1EventsControllerGenListSpecificEventEventsStatus); /** @internal */ export const ConsoleV1EventsControllerGenListSpecificEventEventsStatus$outboundSchema: z.ZodNativeEnum< typeof ConsoleV1EventsControllerGenListSpecificEventEventsStatus > = ConsoleV1EventsControllerGenListSpecificEventEventsStatus$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ConsoleV1EventsControllerGenListSpecificEventEventsStatus$ { /** @deprecated use `ConsoleV1EventsControllerGenListSpecificEventEventsStatus$inboundSchema` instead. */ export const inboundSchema = ConsoleV1EventsControllerGenListSpecificEventEventsStatus$inboundSchema; /** @deprecated use `ConsoleV1EventsControllerGenListSpecificEventEventsStatus$outboundSchema` instead. */ export const outboundSchema = ConsoleV1EventsControllerGenListSpecificEventEventsStatus$outboundSchema; } /** @internal */ export const ConsoleV1EventsControllerGenListSpecificEventEventsResponseBody$inboundSchema: z.ZodType< ConsoleV1EventsControllerGenListSpecificEventEventsResponseBody, z.ZodTypeDef, unknown > = z .object({ status: ConsoleV1EventsControllerGenListSpecificEventEventsStatus$inboundSchema, message: z.string(), }) .transform((v) => { return new ConsoleV1EventsControllerGenListSpecificEventEventsResponseBody(v); }); /** @internal */ export type ConsoleV1EventsControllerGenListSpecificEventEventsResponseBody$Outbound = { status: number; message: string; }; /** @internal */ export const ConsoleV1EventsControllerGenListSpecificEventEventsResponseBody$outboundSchema: z.ZodType< ConsoleV1EventsControllerGenListSpecificEventEventsResponseBody$Outbound, z.ZodTypeDef, ConsoleV1EventsControllerGenListSpecificEventEventsResponseBody > = z .instanceof(ConsoleV1EventsControllerGenListSpecificEventEventsResponseBody) .transform((v) => v.data$) .pipe( z.object({ status: ConsoleV1EventsControllerGenListSpecificEventEventsStatus$outboundSchema, message: z.string(), }) ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ConsoleV1EventsControllerGenListSpecificEventEventsResponseBody$ { /** @deprecated use `ConsoleV1EventsControllerGenListSpecificEventEventsResponseBody$inboundSchema` instead. */ export const inboundSchema = ConsoleV1EventsControllerGenListSpecificEventEventsResponseBody$inboundSchema; /** @deprecated use `ConsoleV1EventsControllerGenListSpecificEventEventsResponseBody$outboundSchema` instead. */ export const outboundSchema = ConsoleV1EventsControllerGenListSpecificEventEventsResponseBody$outboundSchema; /** @deprecated use `ConsoleV1EventsControllerGenListSpecificEventEventsResponseBody$Outbound` instead. */ export type Outbound = ConsoleV1EventsControllerGenListSpecificEventEventsResponseBody$Outbound; } /** @internal */ export const ConsoleV1EventsControllerGenListSpecificEventStatus$inboundSchema: z.ZodNativeEnum< typeof ConsoleV1EventsControllerGenListSpecificEventStatus > = z.nativeEnum(ConsoleV1EventsControllerGenListSpecificEventStatus); /** @internal */ export const ConsoleV1EventsControllerGenListSpecificEventStatus$outboundSchema: z.ZodNativeEnum< typeof ConsoleV1EventsControllerGenListSpecificEventStatus > = ConsoleV1EventsControllerGenListSpecificEventStatus$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ConsoleV1EventsControllerGenListSpecificEventStatus$ { /** @deprecated use `ConsoleV1EventsControllerGenListSpecificEventStatus$inboundSchema` instead. */ export const inboundSchema = ConsoleV1EventsControllerGenListSpecificEventStatus$inboundSchema; /** @deprecated use `ConsoleV1EventsControllerGenListSpecificEventStatus$outboundSchema` instead. */ export const outboundSchema = ConsoleV1EventsControllerGenListSpecificEventStatus$outboundSchema; } /** @internal */ export const ConsoleV1EventsControllerGenListSpecificEventResponseBody$inboundSchema: z.ZodType< ConsoleV1EventsControllerGenListSpecificEventResponseBody, z.ZodTypeDef, unknown > = z .object({ status: ConsoleV1EventsControllerGenListSpecificEventStatus$inboundSchema, message: z.string(), }) .transform((v) => { return new ConsoleV1EventsControllerGenListSpecificEventResponseBody(v); }); /** @internal */ export type ConsoleV1EventsControllerGenListSpecificEventResponseBody$Outbound = { status: number; message: string; }; /** @internal */ export const ConsoleV1EventsControllerGenListSpecificEventResponseBody$outboundSchema: z.ZodType< ConsoleV1EventsControllerGenListSpecificEventResponseBody$Outbound, z.ZodTypeDef, ConsoleV1EventsControllerGenListSpecificEventResponseBody > = z .instanceof(ConsoleV1EventsControllerGenListSpecificEventResponseBody) .transform((v) => v.data$) .pipe( z.object({ status: ConsoleV1EventsControllerGenListSpecificEventStatus$outboundSchema, message: z.string(), }) ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ConsoleV1EventsControllerGenListSpecificEventResponseBody$ { /** @deprecated use `ConsoleV1EventsControllerGenListSpecificEventResponseBody$inboundSchema` instead. */ export const inboundSchema = ConsoleV1EventsControllerGenListSpecificEventResponseBody$inboundSchema; /** @deprecated use `ConsoleV1EventsControllerGenListSpecificEventResponseBody$outboundSchema` instead. */ export const outboundSchema = ConsoleV1EventsControllerGenListSpecificEventResponseBody$outboundSchema; /** @deprecated use `ConsoleV1EventsControllerGenListSpecificEventResponseBody$Outbound` instead. */ export type Outbound = ConsoleV1EventsControllerGenListSpecificEventResponseBody$Outbound; }