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