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