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