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