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