/* * 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 PostWebinarsWebinarIdRegistrationsInternalServerErrorData = { error?: string | undefined; }; /** * Internal server error */ export class PostWebinarsWebinarIdRegistrationsInternalServerError extends WistiaError { error?: string | undefined; /** The original data that was passed to this error instance. */ data$: PostWebinarsWebinarIdRegistrationsInternalServerErrorData; constructor( err: PostWebinarsWebinarIdRegistrationsInternalServerErrorData, 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 = "PostWebinarsWebinarIdRegistrationsInternalServerError"; } } /** * Unprocessable entity, the request parameters were invalid. */ export type PostWebinarsWebinarIdRegistrationsUnprocessableEntityErrorData = { /** * Object containing validation errors grouped by field name. Each field contains an array of error messages. */ errors?: { [k: string]: Array } | undefined; }; /** * Unprocessable entity, the request parameters were invalid. */ export class PostWebinarsWebinarIdRegistrationsUnprocessableEntityError extends WistiaError { /** * Object containing validation errors grouped by field name. Each field contains an array of error messages. */ errors?: { [k: string]: Array } | undefined; /** The original data that was passed to this error instance. */ data$: PostWebinarsWebinarIdRegistrationsUnprocessableEntityErrorData; constructor( err: PostWebinarsWebinarIdRegistrationsUnprocessableEntityErrorData, 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 = "PostWebinarsWebinarIdRegistrationsUnprocessableEntityError"; } } /** * Resource not found */ export type PostWebinarsWebinarIdRegistrationsNotFoundErrorData = { error?: string | undefined; }; /** * Resource not found */ export class PostWebinarsWebinarIdRegistrationsNotFoundError extends WistiaError { error?: string | undefined; /** The original data that was passed to this error instance. */ data$: PostWebinarsWebinarIdRegistrationsNotFoundErrorData; constructor( err: PostWebinarsWebinarIdRegistrationsNotFoundErrorData, 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 = "PostWebinarsWebinarIdRegistrationsNotFoundError"; } } /** * Forbidden, token is valid but account does not have access to feature */ export type PostWebinarsWebinarIdRegistrationsForbiddenErrorData = { error?: string | undefined; }; /** * Forbidden, token is valid but account does not have access to feature */ export class PostWebinarsWebinarIdRegistrationsForbiddenError extends WistiaError { error?: string | undefined; /** The original data that was passed to this error instance. */ data$: PostWebinarsWebinarIdRegistrationsForbiddenErrorData; constructor( err: PostWebinarsWebinarIdRegistrationsForbiddenErrorData, 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 = "PostWebinarsWebinarIdRegistrationsForbiddenError"; } } /** * Unauthorized, invalid or missing token */ export type PostWebinarsWebinarIdRegistrationsUnauthorizedErrorData = { error?: string | undefined; }; /** * Unauthorized, invalid or missing token */ export class PostWebinarsWebinarIdRegistrationsUnauthorizedError extends WistiaError { error?: string | undefined; /** The original data that was passed to this error instance. */ data$: PostWebinarsWebinarIdRegistrationsUnauthorizedErrorData; constructor( err: PostWebinarsWebinarIdRegistrationsUnauthorizedErrorData, 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 = "PostWebinarsWebinarIdRegistrationsUnauthorizedError"; } } /** @internal */ export const PostWebinarsWebinarIdRegistrationsInternalServerError$inboundSchema: z.ZodType< PostWebinarsWebinarIdRegistrationsInternalServerError, z.ZodTypeDef, unknown > = z.object({ error: z.string().optional(), request$: z.instanceof(Request), response$: z.instanceof(Response), body$: z.string(), }) .transform((v) => { return new PostWebinarsWebinarIdRegistrationsInternalServerError(v, { request: v.request$, response: v.response$, body: v.body$, }); }); /** @internal */ export const PostWebinarsWebinarIdRegistrationsUnprocessableEntityError$inboundSchema: z.ZodType< PostWebinarsWebinarIdRegistrationsUnprocessableEntityError, z.ZodTypeDef, unknown > = z.object({ errors: z.record(z.array(z.string())).optional(), request$: z.instanceof(Request), response$: z.instanceof(Response), body$: z.string(), }) .transform((v) => { return new PostWebinarsWebinarIdRegistrationsUnprocessableEntityError(v, { request: v.request$, response: v.response$, body: v.body$, }); }); /** @internal */ export const PostWebinarsWebinarIdRegistrationsNotFoundError$inboundSchema: z.ZodType< PostWebinarsWebinarIdRegistrationsNotFoundError, z.ZodTypeDef, unknown > = z.object({ error: z.string().optional(), request$: z.instanceof(Request), response$: z.instanceof(Response), body$: z.string(), }) .transform((v) => { return new PostWebinarsWebinarIdRegistrationsNotFoundError(v, { request: v.request$, response: v.response$, body: v.body$, }); }); /** @internal */ export const PostWebinarsWebinarIdRegistrationsForbiddenError$inboundSchema: z.ZodType< PostWebinarsWebinarIdRegistrationsForbiddenError, z.ZodTypeDef, unknown > = z.object({ error: z.string().optional(), request$: z.instanceof(Request), response$: z.instanceof(Response), body$: z.string(), }) .transform((v) => { return new PostWebinarsWebinarIdRegistrationsForbiddenError(v, { request: v.request$, response: v.response$, body: v.body$, }); }); /** @internal */ export const PostWebinarsWebinarIdRegistrationsUnauthorizedError$inboundSchema: z.ZodType< PostWebinarsWebinarIdRegistrationsUnauthorizedError, z.ZodTypeDef, unknown > = z.object({ error: z.string().optional(), request$: z.instanceof(Request), response$: z.instanceof(Response), body$: z.string(), }) .transform((v) => { return new PostWebinarsWebinarIdRegistrationsUnauthorizedError(v, { request: v.request$, response: v.response$, body: v.body$, }); });