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