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