/* * 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 PutChannelEpisodesChannelEpisodeHashedIdInternalServerErrorData = { error?: string | undefined; }; /** * Internal server error */ export class PutChannelEpisodesChannelEpisodeHashedIdInternalServerError extends WistiaError { error?: string | undefined; /** The original data that was passed to this error instance. */ data$: PutChannelEpisodesChannelEpisodeHashedIdInternalServerErrorData; constructor( err: PutChannelEpisodesChannelEpisodeHashedIdInternalServerErrorData, 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 = "PutChannelEpisodesChannelEpisodeHashedIdInternalServerError"; } } /** * Forbidden, token is valid but account does not have access to feature */ export type PutChannelEpisodesChannelEpisodeHashedIdForbiddenErrorData = { error?: string | undefined; }; /** * Forbidden, token is valid but account does not have access to feature */ export class PutChannelEpisodesChannelEpisodeHashedIdForbiddenError extends WistiaError { error?: string | undefined; /** The original data that was passed to this error instance. */ data$: PutChannelEpisodesChannelEpisodeHashedIdForbiddenErrorData; constructor( err: PutChannelEpisodesChannelEpisodeHashedIdForbiddenErrorData, 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 = "PutChannelEpisodesChannelEpisodeHashedIdForbiddenError"; } } /** * Unauthorized, invalid or missing token */ export type PutChannelEpisodesChannelEpisodeHashedIdUnauthorizedErrorData = { error?: string | undefined; }; /** * Unauthorized, invalid or missing token */ export class PutChannelEpisodesChannelEpisodeHashedIdUnauthorizedError extends WistiaError { error?: string | undefined; /** The original data that was passed to this error instance. */ data$: PutChannelEpisodesChannelEpisodeHashedIdUnauthorizedErrorData; constructor( err: PutChannelEpisodesChannelEpisodeHashedIdUnauthorizedErrorData, 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 = "PutChannelEpisodesChannelEpisodeHashedIdUnauthorizedError"; } } /** @internal */ export const PutChannelEpisodesChannelEpisodeHashedIdInternalServerError$inboundSchema: z.ZodType< PutChannelEpisodesChannelEpisodeHashedIdInternalServerError, z.ZodTypeDef, unknown > = z.object({ error: z.string().optional(), request$: z.instanceof(Request), response$: z.instanceof(Response), body$: z.string(), }) .transform((v) => { return new PutChannelEpisodesChannelEpisodeHashedIdInternalServerError( v, { request: v.request$, response: v.response$, body: v.body$ }, ); }); /** @internal */ export const PutChannelEpisodesChannelEpisodeHashedIdForbiddenError$inboundSchema: z.ZodType< PutChannelEpisodesChannelEpisodeHashedIdForbiddenError, z.ZodTypeDef, unknown > = z.object({ error: z.string().optional(), request$: z.instanceof(Request), response$: z.instanceof(Response), body$: z.string(), }) .transform((v) => { return new PutChannelEpisodesChannelEpisodeHashedIdForbiddenError(v, { request: v.request$, response: v.response$, body: v.body$, }); }); /** @internal */ export const PutChannelEpisodesChannelEpisodeHashedIdUnauthorizedError$inboundSchema: z.ZodType< PutChannelEpisodesChannelEpisodeHashedIdUnauthorizedError, z.ZodTypeDef, unknown > = z.object({ error: z.string().optional(), request$: z.instanceof(Request), response$: z.instanceof(Response), body$: z.string(), }) .transform((v) => { return new PutChannelEpisodesChannelEpisodeHashedIdUnauthorizedError(v, { request: v.request$, response: v.response$, body: v.body$, }); });