/* * 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 PutMediasArchiveInternalServerErrorData = { error?: string | undefined; }; /** * Internal server error */ export class PutMediasArchiveInternalServerError extends WistiaError { error?: string | undefined; /** The original data that was passed to this error instance. */ data$: PutMediasArchiveInternalServerErrorData; constructor( err: PutMediasArchiveInternalServerErrorData, 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 = "PutMediasArchiveInternalServerError"; } } /** * Unprocessable entity, e.g. too many media requested. */ export type PutMediasArchiveUnprocessableEntityErrorData = { error?: string | undefined; }; /** * Unprocessable entity, e.g. too many media requested. */ export class PutMediasArchiveUnprocessableEntityError extends WistiaError { error?: string | undefined; /** The original data that was passed to this error instance. */ data$: PutMediasArchiveUnprocessableEntityErrorData; constructor( err: PutMediasArchiveUnprocessableEntityErrorData, 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 = "PutMediasArchiveUnprocessableEntityError"; } } /** * Forbidden, e.g. account does not have access to archiving. */ export type PutMediasArchiveForbiddenErrorData = { error?: string | undefined; }; /** * Forbidden, e.g. account does not have access to archiving. */ export class PutMediasArchiveForbiddenError extends WistiaError { error?: string | undefined; /** The original data that was passed to this error instance. */ data$: PutMediasArchiveForbiddenErrorData; constructor( err: PutMediasArchiveForbiddenErrorData, 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 = "PutMediasArchiveForbiddenError"; } } /** * Unauthorized, invalid or missing token */ export type PutMediasArchiveUnauthorizedErrorData = { error?: string | undefined; }; /** * Unauthorized, invalid or missing token */ export class PutMediasArchiveUnauthorizedError extends WistiaError { error?: string | undefined; /** The original data that was passed to this error instance. */ data$: PutMediasArchiveUnauthorizedErrorData; constructor( err: PutMediasArchiveUnauthorizedErrorData, 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 = "PutMediasArchiveUnauthorizedError"; } } /** @internal */ export const PutMediasArchiveInternalServerError$inboundSchema: z.ZodType< PutMediasArchiveInternalServerError, z.ZodTypeDef, unknown > = z.object({ error: z.string().optional(), request$: z.instanceof(Request), response$: z.instanceof(Response), body$: z.string(), }) .transform((v) => { return new PutMediasArchiveInternalServerError(v, { request: v.request$, response: v.response$, body: v.body$, }); }); /** @internal */ export const PutMediasArchiveUnprocessableEntityError$inboundSchema: z.ZodType< PutMediasArchiveUnprocessableEntityError, z.ZodTypeDef, unknown > = z.object({ error: z.string().optional(), request$: z.instanceof(Request), response$: z.instanceof(Response), body$: z.string(), }) .transform((v) => { return new PutMediasArchiveUnprocessableEntityError(v, { request: v.request$, response: v.response$, body: v.body$, }); }); /** @internal */ export const PutMediasArchiveForbiddenError$inboundSchema: z.ZodType< PutMediasArchiveForbiddenError, z.ZodTypeDef, unknown > = z.object({ error: z.string().optional(), request$: z.instanceof(Request), response$: z.instanceof(Response), body$: z.string(), }) .transform((v) => { return new PutMediasArchiveForbiddenError(v, { request: v.request$, response: v.response$, body: v.body$, }); }); /** @internal */ export const PutMediasArchiveUnauthorizedError$inboundSchema: z.ZodType< PutMediasArchiveUnauthorizedError, z.ZodTypeDef, unknown > = z.object({ error: z.string().optional(), request$: z.instanceof(Request), response$: z.instanceof(Response), body$: z.string(), }) .transform((v) => { return new PutMediasArchiveUnauthorizedError(v, { request: v.request$, response: v.response$, body: v.body$, }); });