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