/* * 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 GetMediasMediaHashedIdStatsInternalServerErrorData = { error?: string | undefined; }; /** * Internal server error */ export class GetMediasMediaHashedIdStatsInternalServerError extends WistiaError { error?: string | undefined; /** The original data that was passed to this error instance. */ data$: GetMediasMediaHashedIdStatsInternalServerErrorData; constructor( err: GetMediasMediaHashedIdStatsInternalServerErrorData, 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 = "GetMediasMediaHashedIdStatsInternalServerError"; } } /** * Resource not found */ export type GetMediasMediaHashedIdStatsNotFoundErrorData = { error?: string | undefined; }; /** * Resource not found */ export class GetMediasMediaHashedIdStatsNotFoundError extends WistiaError { error?: string | undefined; /** The original data that was passed to this error instance. */ data$: GetMediasMediaHashedIdStatsNotFoundErrorData; constructor( err: GetMediasMediaHashedIdStatsNotFoundErrorData, 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 = "GetMediasMediaHashedIdStatsNotFoundError"; } } /** * Forbidden, token is valid but account does not have access to feature */ export type GetMediasMediaHashedIdStatsForbiddenErrorData = { error?: string | undefined; }; /** * Forbidden, token is valid but account does not have access to feature */ export class GetMediasMediaHashedIdStatsForbiddenError extends WistiaError { error?: string | undefined; /** The original data that was passed to this error instance. */ data$: GetMediasMediaHashedIdStatsForbiddenErrorData; constructor( err: GetMediasMediaHashedIdStatsForbiddenErrorData, 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 = "GetMediasMediaHashedIdStatsForbiddenError"; } } /** * Unauthorized, invalid or missing token */ export type GetMediasMediaHashedIdStatsUnauthorizedErrorData = { error?: string | undefined; }; /** * Unauthorized, invalid or missing token */ export class GetMediasMediaHashedIdStatsUnauthorizedError extends WistiaError { error?: string | undefined; /** The original data that was passed to this error instance. */ data$: GetMediasMediaHashedIdStatsUnauthorizedErrorData; constructor( err: GetMediasMediaHashedIdStatsUnauthorizedErrorData, 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 = "GetMediasMediaHashedIdStatsUnauthorizedError"; } } /** * Bad request */ export type GetMediasMediaHashedIdStatsBadRequestErrorData = { /** * Error message detailing the reason for the bad request. */ error?: string | undefined; }; /** * Bad request */ export class GetMediasMediaHashedIdStatsBadRequestError extends WistiaError { /** * Error message detailing the reason for the bad request. */ error?: string | undefined; /** The original data that was passed to this error instance. */ data$: GetMediasMediaHashedIdStatsBadRequestErrorData; constructor( err: GetMediasMediaHashedIdStatsBadRequestErrorData, 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 = "GetMediasMediaHashedIdStatsBadRequestError"; } } /** @internal */ export const GetMediasMediaHashedIdStatsInternalServerError$inboundSchema: z.ZodType< GetMediasMediaHashedIdStatsInternalServerError, z.ZodTypeDef, unknown > = z.object({ error: z.string().optional(), request$: z.instanceof(Request), response$: z.instanceof(Response), body$: z.string(), }) .transform((v) => { return new GetMediasMediaHashedIdStatsInternalServerError(v, { request: v.request$, response: v.response$, body: v.body$, }); }); /** @internal */ export const GetMediasMediaHashedIdStatsNotFoundError$inboundSchema: z.ZodType< GetMediasMediaHashedIdStatsNotFoundError, z.ZodTypeDef, unknown > = z.object({ error: z.string().optional(), request$: z.instanceof(Request), response$: z.instanceof(Response), body$: z.string(), }) .transform((v) => { return new GetMediasMediaHashedIdStatsNotFoundError(v, { request: v.request$, response: v.response$, body: v.body$, }); }); /** @internal */ export const GetMediasMediaHashedIdStatsForbiddenError$inboundSchema: z.ZodType< GetMediasMediaHashedIdStatsForbiddenError, z.ZodTypeDef, unknown > = z.object({ error: z.string().optional(), request$: z.instanceof(Request), response$: z.instanceof(Response), body$: z.string(), }) .transform((v) => { return new GetMediasMediaHashedIdStatsForbiddenError(v, { request: v.request$, response: v.response$, body: v.body$, }); }); /** @internal */ export const GetMediasMediaHashedIdStatsUnauthorizedError$inboundSchema: z.ZodType< GetMediasMediaHashedIdStatsUnauthorizedError, z.ZodTypeDef, unknown > = z.object({ error: z.string().optional(), request$: z.instanceof(Request), response$: z.instanceof(Response), body$: z.string(), }) .transform((v) => { return new GetMediasMediaHashedIdStatsUnauthorizedError(v, { request: v.request$, response: v.response$, body: v.body$, }); }); /** @internal */ export const GetMediasMediaHashedIdStatsBadRequestError$inboundSchema: z.ZodType = z.object({ error: z.string().optional(), request$: z.instanceof(Request), response$: z.instanceof(Response), body$: z.string(), }) .transform((v) => { return new GetMediasMediaHashedIdStatsBadRequestError(v, { request: v.request$, response: v.response$, body: v.body$, }); });