/* * 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 GetAnalyticsMediasMediaIdEmbedLocationsServiceUnavailableErrorData = { error?: string | undefined; }; /** * Analytics service is temporarily unavailable */ export class GetAnalyticsMediasMediaIdEmbedLocationsServiceUnavailableError extends WistiaError { error?: string | undefined; /** The original data that was passed to this error instance. */ data$: GetAnalyticsMediasMediaIdEmbedLocationsServiceUnavailableErrorData; constructor( err: GetAnalyticsMediasMediaIdEmbedLocationsServiceUnavailableErrorData, 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 = "GetAnalyticsMediasMediaIdEmbedLocationsServiceUnavailableError"; } } /** * Internal server error */ export type GetAnalyticsMediasMediaIdEmbedLocationsInternalServerErrorData = { error?: string | undefined; }; /** * Internal server error */ export class GetAnalyticsMediasMediaIdEmbedLocationsInternalServerError extends WistiaError { error?: string | undefined; /** The original data that was passed to this error instance. */ data$: GetAnalyticsMediasMediaIdEmbedLocationsInternalServerErrorData; constructor( err: GetAnalyticsMediasMediaIdEmbedLocationsInternalServerErrorData, 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 = "GetAnalyticsMediasMediaIdEmbedLocationsInternalServerError"; } } /** * Forbidden, token is valid but account does not have access to feature */ export type GetAnalyticsMediasMediaIdEmbedLocationsForbiddenErrorData = { error?: string | undefined; }; /** * Forbidden, token is valid but account does not have access to feature */ export class GetAnalyticsMediasMediaIdEmbedLocationsForbiddenError extends WistiaError { error?: string | undefined; /** The original data that was passed to this error instance. */ data$: GetAnalyticsMediasMediaIdEmbedLocationsForbiddenErrorData; constructor( err: GetAnalyticsMediasMediaIdEmbedLocationsForbiddenErrorData, 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 = "GetAnalyticsMediasMediaIdEmbedLocationsForbiddenError"; } } /** * Unauthorized, invalid or missing token */ export type GetAnalyticsMediasMediaIdEmbedLocationsUnauthorizedErrorData = { error?: string | undefined; }; /** * Unauthorized, invalid or missing token */ export class GetAnalyticsMediasMediaIdEmbedLocationsUnauthorizedError extends WistiaError { error?: string | undefined; /** The original data that was passed to this error instance. */ data$: GetAnalyticsMediasMediaIdEmbedLocationsUnauthorizedErrorData; constructor( err: GetAnalyticsMediasMediaIdEmbedLocationsUnauthorizedErrorData, 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 = "GetAnalyticsMediasMediaIdEmbedLocationsUnauthorizedError"; } } /** * Bad request */ export type GetAnalyticsMediasMediaIdEmbedLocationsBadRequestErrorData = { /** * Error message detailing the reason for the bad request. */ error?: string | undefined; }; /** * Bad request */ export class GetAnalyticsMediasMediaIdEmbedLocationsBadRequestError 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$: GetAnalyticsMediasMediaIdEmbedLocationsBadRequestErrorData; constructor( err: GetAnalyticsMediasMediaIdEmbedLocationsBadRequestErrorData, 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 = "GetAnalyticsMediasMediaIdEmbedLocationsBadRequestError"; } } /** @internal */ export const GetAnalyticsMediasMediaIdEmbedLocationsServiceUnavailableError$inboundSchema: z.ZodType< GetAnalyticsMediasMediaIdEmbedLocationsServiceUnavailableError, z.ZodTypeDef, unknown > = z.object({ error: z.string().optional(), request$: z.instanceof(Request), response$: z.instanceof(Response), body$: z.string(), }) .transform((v) => { return new GetAnalyticsMediasMediaIdEmbedLocationsServiceUnavailableError( v, { request: v.request$, response: v.response$, body: v.body$ }, ); }); /** @internal */ export const GetAnalyticsMediasMediaIdEmbedLocationsInternalServerError$inboundSchema: z.ZodType< GetAnalyticsMediasMediaIdEmbedLocationsInternalServerError, z.ZodTypeDef, unknown > = z.object({ error: z.string().optional(), request$: z.instanceof(Request), response$: z.instanceof(Response), body$: z.string(), }) .transform((v) => { return new GetAnalyticsMediasMediaIdEmbedLocationsInternalServerError(v, { request: v.request$, response: v.response$, body: v.body$, }); }); /** @internal */ export const GetAnalyticsMediasMediaIdEmbedLocationsForbiddenError$inboundSchema: z.ZodType< GetAnalyticsMediasMediaIdEmbedLocationsForbiddenError, z.ZodTypeDef, unknown > = z.object({ error: z.string().optional(), request$: z.instanceof(Request), response$: z.instanceof(Response), body$: z.string(), }) .transform((v) => { return new GetAnalyticsMediasMediaIdEmbedLocationsForbiddenError(v, { request: v.request$, response: v.response$, body: v.body$, }); }); /** @internal */ export const GetAnalyticsMediasMediaIdEmbedLocationsUnauthorizedError$inboundSchema: z.ZodType< GetAnalyticsMediasMediaIdEmbedLocationsUnauthorizedError, z.ZodTypeDef, unknown > = z.object({ error: z.string().optional(), request$: z.instanceof(Request), response$: z.instanceof(Response), body$: z.string(), }) .transform((v) => { return new GetAnalyticsMediasMediaIdEmbedLocationsUnauthorizedError(v, { request: v.request$, response: v.response$, body: v.body$, }); }); /** @internal */ export const GetAnalyticsMediasMediaIdEmbedLocationsBadRequestError$inboundSchema: z.ZodType< GetAnalyticsMediasMediaIdEmbedLocationsBadRequestError, z.ZodTypeDef, unknown > = z.object({ error: z.string().optional(), request$: z.instanceof(Request), response$: z.instanceof(Response), body$: z.string(), }) .transform((v) => { return new GetAnalyticsMediasMediaIdEmbedLocationsBadRequestError(v, { request: v.request$, response: v.response$, body: v.body$, }); });