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