/* * 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 GetChannelsChannelHashedIdChannelEpisodesInternalServerErrorData = { error?: string | undefined; }; /** * Internal server error */ export class GetChannelsChannelHashedIdChannelEpisodesInternalServerError extends WistiaError { error?: string | undefined; /** The original data that was passed to this error instance. */ data$: GetChannelsChannelHashedIdChannelEpisodesInternalServerErrorData; constructor( err: GetChannelsChannelHashedIdChannelEpisodesInternalServerErrorData, 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 = "GetChannelsChannelHashedIdChannelEpisodesInternalServerError"; } } /** * Unauthorized, invalid or missing token */ export type GetChannelsChannelHashedIdChannelEpisodesUnauthorizedErrorData = { error?: string | undefined; }; /** * Unauthorized, invalid or missing token */ export class GetChannelsChannelHashedIdChannelEpisodesUnauthorizedError extends WistiaError { error?: string | undefined; /** The original data that was passed to this error instance. */ data$: GetChannelsChannelHashedIdChannelEpisodesUnauthorizedErrorData; constructor( err: GetChannelsChannelHashedIdChannelEpisodesUnauthorizedErrorData, 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 = "GetChannelsChannelHashedIdChannelEpisodesUnauthorizedError"; } } /** * Bad request */ export type GetChannelsChannelHashedIdChannelEpisodesBadRequestErrorData = { /** * Error message detailing the reason for the bad request. */ error?: string | undefined; }; /** * Bad request */ export class GetChannelsChannelHashedIdChannelEpisodesBadRequestError 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$: GetChannelsChannelHashedIdChannelEpisodesBadRequestErrorData; constructor( err: GetChannelsChannelHashedIdChannelEpisodesBadRequestErrorData, 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 = "GetChannelsChannelHashedIdChannelEpisodesBadRequestError"; } } /** @internal */ export const GetChannelsChannelHashedIdChannelEpisodesInternalServerError$inboundSchema: z.ZodType< GetChannelsChannelHashedIdChannelEpisodesInternalServerError, z.ZodTypeDef, unknown > = z.object({ error: z.string().optional(), request$: z.instanceof(Request), response$: z.instanceof(Response), body$: z.string(), }) .transform((v) => { return new GetChannelsChannelHashedIdChannelEpisodesInternalServerError( v, { request: v.request$, response: v.response$, body: v.body$ }, ); }); /** @internal */ export const GetChannelsChannelHashedIdChannelEpisodesUnauthorizedError$inboundSchema: z.ZodType< GetChannelsChannelHashedIdChannelEpisodesUnauthorizedError, z.ZodTypeDef, unknown > = z.object({ error: z.string().optional(), request$: z.instanceof(Request), response$: z.instanceof(Response), body$: z.string(), }) .transform((v) => { return new GetChannelsChannelHashedIdChannelEpisodesUnauthorizedError(v, { request: v.request$, response: v.response$, body: v.body$, }); }); /** @internal */ export const GetChannelsChannelHashedIdChannelEpisodesBadRequestError$inboundSchema: z.ZodType< GetChannelsChannelHashedIdChannelEpisodesBadRequestError, z.ZodTypeDef, unknown > = z.object({ error: z.string().optional(), request$: z.instanceof(Request), response$: z.instanceof(Response), body$: z.string(), }) .transform((v) => { return new GetChannelsChannelHashedIdChannelEpisodesBadRequestError(v, { request: v.request$, response: v.response$, body: v.body$, }); });