/* * 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 PostChannelsChannelHashedIdChannelEpisodesInternalServerErrorData = { error?: string | undefined; }; /** * Internal server error */ export class PostChannelsChannelHashedIdChannelEpisodesInternalServerError extends WistiaError { error?: string | undefined; /** The original data that was passed to this error instance. */ data$: PostChannelsChannelHashedIdChannelEpisodesInternalServerErrorData; constructor( err: PostChannelsChannelHashedIdChannelEpisodesInternalServerErrorData, 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 = "PostChannelsChannelHashedIdChannelEpisodesInternalServerError"; } } /** * Forbidden, token is valid but account does not have access to feature */ export type PostChannelsChannelHashedIdChannelEpisodesForbiddenErrorData = { error?: string | undefined; }; /** * Forbidden, token is valid but account does not have access to feature */ export class PostChannelsChannelHashedIdChannelEpisodesForbiddenError extends WistiaError { error?: string | undefined; /** The original data that was passed to this error instance. */ data$: PostChannelsChannelHashedIdChannelEpisodesForbiddenErrorData; constructor( err: PostChannelsChannelHashedIdChannelEpisodesForbiddenErrorData, 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 = "PostChannelsChannelHashedIdChannelEpisodesForbiddenError"; } } /** * Unauthorized, invalid or missing token */ export type PostChannelsChannelHashedIdChannelEpisodesUnauthorizedErrorData = { error?: string | undefined; }; /** * Unauthorized, invalid or missing token */ export class PostChannelsChannelHashedIdChannelEpisodesUnauthorizedError extends WistiaError { error?: string | undefined; /** The original data that was passed to this error instance. */ data$: PostChannelsChannelHashedIdChannelEpisodesUnauthorizedErrorData; constructor( err: PostChannelsChannelHashedIdChannelEpisodesUnauthorizedErrorData, 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 = "PostChannelsChannelHashedIdChannelEpisodesUnauthorizedError"; } } /** * Bad request */ export type PostChannelsChannelHashedIdChannelEpisodesBadRequestErrorData = { /** * Error message detailing the reason for the bad request. */ error?: string | undefined; }; /** * Bad request */ export class PostChannelsChannelHashedIdChannelEpisodesBadRequestError 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$: PostChannelsChannelHashedIdChannelEpisodesBadRequestErrorData; constructor( err: PostChannelsChannelHashedIdChannelEpisodesBadRequestErrorData, 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 = "PostChannelsChannelHashedIdChannelEpisodesBadRequestError"; } } /** @internal */ export const PostChannelsChannelHashedIdChannelEpisodesInternalServerError$inboundSchema: z.ZodType< PostChannelsChannelHashedIdChannelEpisodesInternalServerError, z.ZodTypeDef, unknown > = z.object({ error: z.string().optional(), request$: z.instanceof(Request), response$: z.instanceof(Response), body$: z.string(), }) .transform((v) => { return new PostChannelsChannelHashedIdChannelEpisodesInternalServerError( v, { request: v.request$, response: v.response$, body: v.body$ }, ); }); /** @internal */ export const PostChannelsChannelHashedIdChannelEpisodesForbiddenError$inboundSchema: z.ZodType< PostChannelsChannelHashedIdChannelEpisodesForbiddenError, z.ZodTypeDef, unknown > = z.object({ error: z.string().optional(), request$: z.instanceof(Request), response$: z.instanceof(Response), body$: z.string(), }) .transform((v) => { return new PostChannelsChannelHashedIdChannelEpisodesForbiddenError(v, { request: v.request$, response: v.response$, body: v.body$, }); }); /** @internal */ export const PostChannelsChannelHashedIdChannelEpisodesUnauthorizedError$inboundSchema: z.ZodType< PostChannelsChannelHashedIdChannelEpisodesUnauthorizedError, z.ZodTypeDef, unknown > = z.object({ error: z.string().optional(), request$: z.instanceof(Request), response$: z.instanceof(Response), body$: z.string(), }) .transform((v) => { return new PostChannelsChannelHashedIdChannelEpisodesUnauthorizedError( v, { request: v.request$, response: v.response$, body: v.body$ }, ); }); /** @internal */ export const PostChannelsChannelHashedIdChannelEpisodesBadRequestError$inboundSchema: z.ZodType< PostChannelsChannelHashedIdChannelEpisodesBadRequestError, z.ZodTypeDef, unknown > = z.object({ error: z.string().optional(), request$: z.instanceof(Request), response$: z.instanceof(Response), body$: z.string(), }) .transform((v) => { return new PostChannelsChannelHashedIdChannelEpisodesBadRequestError(v, { request: v.request$, response: v.response$, body: v.body$, }); });