/* * 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 GetWebinarsInternalServerErrorData = { error?: string | undefined; }; /** * Internal server error */ export class GetWebinarsInternalServerError extends WistiaError { error?: string | undefined; /** The original data that was passed to this error instance. */ data$: GetWebinarsInternalServerErrorData; constructor( err: GetWebinarsInternalServerErrorData, 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 = "GetWebinarsInternalServerError"; } } /** * Webinar feature not available */ export type GetWebinarsForbiddenErrorData = { error?: string | undefined; }; /** * Webinar feature not available */ export class GetWebinarsForbiddenError extends WistiaError { error?: string | undefined; /** The original data that was passed to this error instance. */ data$: GetWebinarsForbiddenErrorData; constructor( err: GetWebinarsForbiddenErrorData, 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 = "GetWebinarsForbiddenError"; } } /** * Unauthorized, invalid or missing token */ export type GetWebinarsUnauthorizedErrorData = { error?: string | undefined; }; /** * Unauthorized, invalid or missing token */ export class GetWebinarsUnauthorizedError extends WistiaError { error?: string | undefined; /** The original data that was passed to this error instance. */ data$: GetWebinarsUnauthorizedErrorData; constructor( err: GetWebinarsUnauthorizedErrorData, 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 = "GetWebinarsUnauthorizedError"; } } /** @internal */ export const GetWebinarsInternalServerError$inboundSchema: z.ZodType< GetWebinarsInternalServerError, z.ZodTypeDef, unknown > = z.object({ error: z.string().optional(), request$: z.instanceof(Request), response$: z.instanceof(Response), body$: z.string(), }) .transform((v) => { return new GetWebinarsInternalServerError(v, { request: v.request$, response: v.response$, body: v.body$, }); }); /** @internal */ export const GetWebinarsForbiddenError$inboundSchema: z.ZodType< GetWebinarsForbiddenError, z.ZodTypeDef, unknown > = z.object({ error: z.string().optional(), request$: z.instanceof(Request), response$: z.instanceof(Response), body$: z.string(), }) .transform((v) => { return new GetWebinarsForbiddenError(v, { request: v.request$, response: v.response$, body: v.body$, }); }); /** @internal */ export const GetWebinarsUnauthorizedError$inboundSchema: z.ZodType< GetWebinarsUnauthorizedError, z.ZodTypeDef, unknown > = z.object({ error: z.string().optional(), request$: z.instanceof(Request), response$: z.instanceof(Response), body$: z.string(), }) .transform((v) => { return new GetWebinarsUnauthorizedError(v, { request: v.request$, response: v.response$, body: v.body$, }); });