/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; export const ConsoleV1ExperimentsControllerGenListStatus = { FourHundredAndOne: 401, } as const; export type ConsoleV1ExperimentsControllerGenListStatus = ClosedEnum< typeof ConsoleV1ExperimentsControllerGenListStatus >; /** * This endpoint only accepts an active CONSOLE key, but an invalid key was sent. Key: console-xxxXXXxxxXXXxxx */ export type ConsoleV1ExperimentsControllerGenListResponseBodyData = { status: ConsoleV1ExperimentsControllerGenListStatus; message: string; }; /** * This endpoint only accepts an active CONSOLE key, but an invalid key was sent. Key: console-xxxXXXxxxXXXxxx */ export class ConsoleV1ExperimentsControllerGenListResponseBody extends Error { status: ConsoleV1ExperimentsControllerGenListStatus; /** The original data that was passed to this error instance. */ data$: ConsoleV1ExperimentsControllerGenListResponseBodyData; constructor(err: ConsoleV1ExperimentsControllerGenListResponseBodyData) { 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 = "ConsoleV1ExperimentsControllerGenListResponseBody"; } } /** @internal */ export const ConsoleV1ExperimentsControllerGenListStatus$inboundSchema: z.ZodNativeEnum< typeof ConsoleV1ExperimentsControllerGenListStatus > = z.nativeEnum(ConsoleV1ExperimentsControllerGenListStatus); /** @internal */ export const ConsoleV1ExperimentsControllerGenListStatus$outboundSchema: z.ZodNativeEnum< typeof ConsoleV1ExperimentsControllerGenListStatus > = ConsoleV1ExperimentsControllerGenListStatus$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ConsoleV1ExperimentsControllerGenListStatus$ { /** @deprecated use `ConsoleV1ExperimentsControllerGenListStatus$inboundSchema` instead. */ export const inboundSchema = ConsoleV1ExperimentsControllerGenListStatus$inboundSchema; /** @deprecated use `ConsoleV1ExperimentsControllerGenListStatus$outboundSchema` instead. */ export const outboundSchema = ConsoleV1ExperimentsControllerGenListStatus$outboundSchema; } /** @internal */ export const ConsoleV1ExperimentsControllerGenListResponseBody$inboundSchema: z.ZodType< ConsoleV1ExperimentsControllerGenListResponseBody, z.ZodTypeDef, unknown > = z .object({ status: ConsoleV1ExperimentsControllerGenListStatus$inboundSchema, message: z.string(), }) .transform((v) => { return new ConsoleV1ExperimentsControllerGenListResponseBody(v); }); /** @internal */ export type ConsoleV1ExperimentsControllerGenListResponseBody$Outbound = { status: number; message: string; }; /** @internal */ export const ConsoleV1ExperimentsControllerGenListResponseBody$outboundSchema: z.ZodType< ConsoleV1ExperimentsControllerGenListResponseBody$Outbound, z.ZodTypeDef, ConsoleV1ExperimentsControllerGenListResponseBody > = z .instanceof(ConsoleV1ExperimentsControllerGenListResponseBody) .transform((v) => v.data$) .pipe( z.object({ status: ConsoleV1ExperimentsControllerGenListStatus$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 ConsoleV1ExperimentsControllerGenListResponseBody$ { /** @deprecated use `ConsoleV1ExperimentsControllerGenListResponseBody$inboundSchema` instead. */ export const inboundSchema = ConsoleV1ExperimentsControllerGenListResponseBody$inboundSchema; /** @deprecated use `ConsoleV1ExperimentsControllerGenListResponseBody$outboundSchema` instead. */ export const outboundSchema = ConsoleV1ExperimentsControllerGenListResponseBody$outboundSchema; /** @deprecated use `ConsoleV1ExperimentsControllerGenListResponseBody$Outbound` instead. */ export type Outbound = ConsoleV1ExperimentsControllerGenListResponseBody$Outbound; }