/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { WistiaError } from "./wistiaerror.js"; /** * Analytics service is temporarily unavailable */ export type GetAnalyticsWebinarsWebinarIdHistogramsServiceUnavailableErrorData = { error?: string | undefined; }; /** * Analytics service is temporarily unavailable */ export class GetAnalyticsWebinarsWebinarIdHistogramsServiceUnavailableError extends WistiaError { error?: string | undefined; /** The original data that was passed to this error instance. */ data$: GetAnalyticsWebinarsWebinarIdHistogramsServiceUnavailableErrorData; constructor( err: GetAnalyticsWebinarsWebinarIdHistogramsServiceUnavailableErrorData, 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 = "GetAnalyticsWebinarsWebinarIdHistogramsServiceUnavailableError"; } } /** * Internal server error */ export type GetAnalyticsWebinarsWebinarIdHistogramsInternalServerErrorData = { error?: string | undefined; }; /** * Internal server error */ export class GetAnalyticsWebinarsWebinarIdHistogramsInternalServerError extends WistiaError { error?: string | undefined; /** The original data that was passed to this error instance. */ data$: GetAnalyticsWebinarsWebinarIdHistogramsInternalServerErrorData; constructor( err: GetAnalyticsWebinarsWebinarIdHistogramsInternalServerErrorData, 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 = "GetAnalyticsWebinarsWebinarIdHistogramsInternalServerError"; } } /** * The event has not yet reached a terminal state. Analytics are only available after the event has ended. */ export type GetAnalyticsWebinarsWebinarIdHistogramsConflictErrorData = { /** * Error message indicating the event has not ended. */ error?: string | undefined; }; /** * The event has not yet reached a terminal state. Analytics are only available after the event has ended. */ export class GetAnalyticsWebinarsWebinarIdHistogramsConflictError extends WistiaError { /** * Error message indicating the event has not ended. */ error?: string | undefined; /** The original data that was passed to this error instance. */ data$: GetAnalyticsWebinarsWebinarIdHistogramsConflictErrorData; constructor( err: GetAnalyticsWebinarsWebinarIdHistogramsConflictErrorData, 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 = "GetAnalyticsWebinarsWebinarIdHistogramsConflictError"; } } /** * Forbidden, token is valid but account does not have access to feature */ export type GetAnalyticsWebinarsWebinarIdHistogramsForbiddenErrorData = { error?: string | undefined; }; /** * Forbidden, token is valid but account does not have access to feature */ export class GetAnalyticsWebinarsWebinarIdHistogramsForbiddenError extends WistiaError { error?: string | undefined; /** The original data that was passed to this error instance. */ data$: GetAnalyticsWebinarsWebinarIdHistogramsForbiddenErrorData; constructor( err: GetAnalyticsWebinarsWebinarIdHistogramsForbiddenErrorData, 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 = "GetAnalyticsWebinarsWebinarIdHistogramsForbiddenError"; } } /** * Unauthorized, invalid or missing token */ export type GetAnalyticsWebinarsWebinarIdHistogramsUnauthorizedErrorData = { error?: string | undefined; }; /** * Unauthorized, invalid or missing token */ export class GetAnalyticsWebinarsWebinarIdHistogramsUnauthorizedError extends WistiaError { error?: string | undefined; /** The original data that was passed to this error instance. */ data$: GetAnalyticsWebinarsWebinarIdHistogramsUnauthorizedErrorData; constructor( err: GetAnalyticsWebinarsWebinarIdHistogramsUnauthorizedErrorData, 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 = "GetAnalyticsWebinarsWebinarIdHistogramsUnauthorizedError"; } } /** @internal */ export const GetAnalyticsWebinarsWebinarIdHistogramsServiceUnavailableError$inboundSchema: z.ZodType< GetAnalyticsWebinarsWebinarIdHistogramsServiceUnavailableError, z.ZodTypeDef, unknown > = z.object({ error: z.string().optional(), request$: z.instanceof(Request), response$: z.instanceof(Response), body$: z.string(), }) .transform((v) => { return new GetAnalyticsWebinarsWebinarIdHistogramsServiceUnavailableError( v, { request: v.request$, response: v.response$, body: v.body$ }, ); }); /** @internal */ export const GetAnalyticsWebinarsWebinarIdHistogramsInternalServerError$inboundSchema: z.ZodType< GetAnalyticsWebinarsWebinarIdHistogramsInternalServerError, z.ZodTypeDef, unknown > = z.object({ error: z.string().optional(), request$: z.instanceof(Request), response$: z.instanceof(Response), body$: z.string(), }) .transform((v) => { return new GetAnalyticsWebinarsWebinarIdHistogramsInternalServerError(v, { request: v.request$, response: v.response$, body: v.body$, }); }); /** @internal */ export const GetAnalyticsWebinarsWebinarIdHistogramsConflictError$inboundSchema: z.ZodType< GetAnalyticsWebinarsWebinarIdHistogramsConflictError, z.ZodTypeDef, unknown > = z.object({ error: z.string().optional(), request$: z.instanceof(Request), response$: z.instanceof(Response), body$: z.string(), }) .transform((v) => { return new GetAnalyticsWebinarsWebinarIdHistogramsConflictError(v, { request: v.request$, response: v.response$, body: v.body$, }); }); /** @internal */ export const GetAnalyticsWebinarsWebinarIdHistogramsForbiddenError$inboundSchema: z.ZodType< GetAnalyticsWebinarsWebinarIdHistogramsForbiddenError, z.ZodTypeDef, unknown > = z.object({ error: z.string().optional(), request$: z.instanceof(Request), response$: z.instanceof(Response), body$: z.string(), }) .transform((v) => { return new GetAnalyticsWebinarsWebinarIdHistogramsForbiddenError(v, { request: v.request$, response: v.response$, body: v.body$, }); }); /** @internal */ export const GetAnalyticsWebinarsWebinarIdHistogramsUnauthorizedError$inboundSchema: z.ZodType< GetAnalyticsWebinarsWebinarIdHistogramsUnauthorizedError, z.ZodTypeDef, unknown > = z.object({ error: z.string().optional(), request$: z.instanceof(Request), response$: z.instanceof(Response), body$: z.string(), }) .transform((v) => { return new GetAnalyticsWebinarsWebinarIdHistogramsUnauthorizedError(v, { request: v.request$, response: v.response$, body: v.body$, }); });