/* * 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 PutWebinarsIdInternalServerErrorData = { error?: string | undefined; }; /** * Internal server error */ export class PutWebinarsIdInternalServerError extends WistiaError { error?: string | undefined; /** The original data that was passed to this error instance. */ data$: PutWebinarsIdInternalServerErrorData; constructor( err: PutWebinarsIdInternalServerErrorData, 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 = "PutWebinarsIdInternalServerError"; } } /** * Validation errors */ export type PutWebinarsIdUnprocessableEntityErrorData = { errors?: Array | undefined; }; /** * Validation errors */ export class PutWebinarsIdUnprocessableEntityError extends WistiaError { errors?: Array | undefined; /** The original data that was passed to this error instance. */ data$: PutWebinarsIdUnprocessableEntityErrorData; constructor( err: PutWebinarsIdUnprocessableEntityErrorData, 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.errors != null) this.errors = err.errors; this.name = "PutWebinarsIdUnprocessableEntityError"; } } /** * Webinar feature not available */ export type PutWebinarsIdForbiddenErrorData = { error?: string | undefined; }; /** * Webinar feature not available */ export class PutWebinarsIdForbiddenError extends WistiaError { error?: string | undefined; /** The original data that was passed to this error instance. */ data$: PutWebinarsIdForbiddenErrorData; constructor( err: PutWebinarsIdForbiddenErrorData, 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 = "PutWebinarsIdForbiddenError"; } } /** * Unauthorized, invalid or missing token */ export type PutWebinarsIdUnauthorizedErrorData = { error?: string | undefined; }; /** * Unauthorized, invalid or missing token */ export class PutWebinarsIdUnauthorizedError extends WistiaError { error?: string | undefined; /** The original data that was passed to this error instance. */ data$: PutWebinarsIdUnauthorizedErrorData; constructor( err: PutWebinarsIdUnauthorizedErrorData, 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 = "PutWebinarsIdUnauthorizedError"; } } /** @internal */ export const PutWebinarsIdInternalServerError$inboundSchema: z.ZodType< PutWebinarsIdInternalServerError, z.ZodTypeDef, unknown > = z.object({ error: z.string().optional(), request$: z.instanceof(Request), response$: z.instanceof(Response), body$: z.string(), }) .transform((v) => { return new PutWebinarsIdInternalServerError(v, { request: v.request$, response: v.response$, body: v.body$, }); }); /** @internal */ export const PutWebinarsIdUnprocessableEntityError$inboundSchema: z.ZodType< PutWebinarsIdUnprocessableEntityError, z.ZodTypeDef, unknown > = z.object({ errors: z.array(z.string()).optional(), request$: z.instanceof(Request), response$: z.instanceof(Response), body$: z.string(), }) .transform((v) => { return new PutWebinarsIdUnprocessableEntityError(v, { request: v.request$, response: v.response$, body: v.body$, }); }); /** @internal */ export const PutWebinarsIdForbiddenError$inboundSchema: z.ZodType< PutWebinarsIdForbiddenError, z.ZodTypeDef, unknown > = z.object({ error: z.string().optional(), request$: z.instanceof(Request), response$: z.instanceof(Response), body$: z.string(), }) .transform((v) => { return new PutWebinarsIdForbiddenError(v, { request: v.request$, response: v.response$, body: v.body$, }); }); /** @internal */ export const PutWebinarsIdUnauthorizedError$inboundSchema: z.ZodType< PutWebinarsIdUnauthorizedError, z.ZodTypeDef, unknown > = z.object({ error: z.string().optional(), request$: z.instanceof(Request), response$: z.instanceof(Response), body$: z.string(), }) .transform((v) => { return new PutWebinarsIdUnauthorizedError(v, { request: v.request$, response: v.response$, body: v.body$, }); });