/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { WistiaError } from "./wistiaerror.js"; /** * Internal server error */ export type GetChannelEpisodesInternalServerErrorData = { error?: string | undefined; }; /** * Internal server error */ export class GetChannelEpisodesInternalServerError extends WistiaError { error?: string | undefined; /** The original data that was passed to this error instance. */ data$: GetChannelEpisodesInternalServerErrorData; constructor( err: GetChannelEpisodesInternalServerErrorData, httpMeta: { response: Response; request: Request; body: string }, ) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; super(message, httpMeta); this.data$ = err; if (err.error != null) this.error = err.error; this.name = "GetChannelEpisodesInternalServerError"; } } /** * Unauthorized, invalid or missing token */ export type GetChannelEpisodesUnauthorizedErrorData = { error?: string | undefined; }; /** * Unauthorized, invalid or missing token */ export class GetChannelEpisodesUnauthorizedError extends WistiaError { error?: string | undefined; /** The original data that was passed to this error instance. */ data$: GetChannelEpisodesUnauthorizedErrorData; constructor( err: GetChannelEpisodesUnauthorizedErrorData, httpMeta: { response: Response; request: Request; body: string }, ) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; super(message, httpMeta); this.data$ = err; if (err.error != null) this.error = err.error; this.name = "GetChannelEpisodesUnauthorizedError"; } } /** * Bad request */ export type GetChannelEpisodesBadRequestErrorData = { /** * Error message detailing the reason for the bad request. */ error?: string | undefined; }; /** * Bad request */ export class GetChannelEpisodesBadRequestError extends WistiaError { /** * Error message detailing the reason for the bad request. */ error?: string | undefined; /** The original data that was passed to this error instance. */ data$: GetChannelEpisodesBadRequestErrorData; constructor( err: GetChannelEpisodesBadRequestErrorData, httpMeta: { response: Response; request: Request; body: string }, ) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; super(message, httpMeta); this.data$ = err; if (err.error != null) this.error = err.error; this.name = "GetChannelEpisodesBadRequestError"; } } /** @internal */ export const GetChannelEpisodesInternalServerError$inboundSchema: z.ZodType< GetChannelEpisodesInternalServerError, z.ZodTypeDef, unknown > = z.object({ error: z.string().optional(), request$: z.instanceof(Request), response$: z.instanceof(Response), body$: z.string(), }) .transform((v) => { return new GetChannelEpisodesInternalServerError(v, { request: v.request$, response: v.response$, body: v.body$, }); }); /** @internal */ export const GetChannelEpisodesUnauthorizedError$inboundSchema: z.ZodType< GetChannelEpisodesUnauthorizedError, z.ZodTypeDef, unknown > = z.object({ error: z.string().optional(), request$: z.instanceof(Request), response$: z.instanceof(Response), body$: z.string(), }) .transform((v) => { return new GetChannelEpisodesUnauthorizedError(v, { request: v.request$, response: v.response$, body: v.body$, }); }); /** @internal */ export const GetChannelEpisodesBadRequestError$inboundSchema: z.ZodType< GetChannelEpisodesBadRequestError, z.ZodTypeDef, unknown > = z.object({ error: z.string().optional(), request$: z.instanceof(Request), response$: z.instanceof(Response), body$: z.string(), }) .transform((v) => { return new GetChannelEpisodesBadRequestError(v, { request: v.request$, response: v.response$, body: v.body$, }); });