/* * 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 PutMediasCopyInternalServerErrorData = { error?: string | undefined; }; /** * Internal server error */ export class PutMediasCopyInternalServerError extends WistiaError { error?: string | undefined; /** The original data that was passed to this error instance. */ data$: PutMediasCopyInternalServerErrorData; constructor( err: PutMediasCopyInternalServerErrorData, 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 = "PutMediasCopyInternalServerError"; } } /** * Unprocessable entity, e.g. missing required parameters. */ export type PutMediasCopyUnprocessableEntityErrorData = { error?: string | undefined; }; /** * Unprocessable entity, e.g. missing required parameters. */ export class PutMediasCopyUnprocessableEntityError extends WistiaError { error?: string | undefined; /** The original data that was passed to this error instance. */ data$: PutMediasCopyUnprocessableEntityErrorData; constructor( err: PutMediasCopyUnprocessableEntityErrorData, 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 = "PutMediasCopyUnprocessableEntityError"; } } /** * Forbidden, token is valid but account does not have access to feature */ export type PutMediasCopyForbiddenErrorData = { error?: string | undefined; }; /** * Forbidden, token is valid but account does not have access to feature */ export class PutMediasCopyForbiddenError extends WistiaError { error?: string | undefined; /** The original data that was passed to this error instance. */ data$: PutMediasCopyForbiddenErrorData; constructor( err: PutMediasCopyForbiddenErrorData, 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 = "PutMediasCopyForbiddenError"; } } /** * Unauthorized, invalid or missing token */ export type PutMediasCopyUnauthorizedErrorData = { error?: string | undefined; }; /** * Unauthorized, invalid or missing token */ export class PutMediasCopyUnauthorizedError extends WistiaError { error?: string | undefined; /** The original data that was passed to this error instance. */ data$: PutMediasCopyUnauthorizedErrorData; constructor( err: PutMediasCopyUnauthorizedErrorData, 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 = "PutMediasCopyUnauthorizedError"; } } /** @internal */ export const PutMediasCopyInternalServerError$inboundSchema: z.ZodType< PutMediasCopyInternalServerError, z.ZodTypeDef, unknown > = z.object({ error: z.string().optional(), request$: z.instanceof(Request), response$: z.instanceof(Response), body$: z.string(), }) .transform((v) => { return new PutMediasCopyInternalServerError(v, { request: v.request$, response: v.response$, body: v.body$, }); }); /** @internal */ export const PutMediasCopyUnprocessableEntityError$inboundSchema: z.ZodType< PutMediasCopyUnprocessableEntityError, z.ZodTypeDef, unknown > = z.object({ error: z.string().optional(), request$: z.instanceof(Request), response$: z.instanceof(Response), body$: z.string(), }) .transform((v) => { return new PutMediasCopyUnprocessableEntityError(v, { request: v.request$, response: v.response$, body: v.body$, }); }); /** @internal */ export const PutMediasCopyForbiddenError$inboundSchema: z.ZodType< PutMediasCopyForbiddenError, z.ZodTypeDef, unknown > = z.object({ error: z.string().optional(), request$: z.instanceof(Request), response$: z.instanceof(Response), body$: z.string(), }) .transform((v) => { return new PutMediasCopyForbiddenError(v, { request: v.request$, response: v.response$, body: v.body$, }); }); /** @internal */ export const PutMediasCopyUnauthorizedError$inboundSchema: z.ZodType< PutMediasCopyUnauthorizedError, z.ZodTypeDef, unknown > = z.object({ error: z.string().optional(), request$: z.instanceof(Request), response$: z.instanceof(Response), body$: z.string(), }) .transform((v) => { return new PutMediasCopyUnauthorizedError(v, { request: v.request$, response: v.response$, body: v.body$, }); });