/* * 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 PostMediaExtendedAudioDescriptionsOrderInternalServerErrorData = { error?: string | undefined; }; /** * Internal server error */ export class PostMediaExtendedAudioDescriptionsOrderInternalServerError extends WistiaError { error?: string | undefined; /** The original data that was passed to this error instance. */ data$: PostMediaExtendedAudioDescriptionsOrderInternalServerErrorData; constructor( err: PostMediaExtendedAudioDescriptionsOrderInternalServerErrorData, 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 = "PostMediaExtendedAudioDescriptionsOrderInternalServerError"; } } /** * Resource not found */ export type PostMediaExtendedAudioDescriptionsOrderNotFoundErrorData = { error?: string | undefined; }; /** * Resource not found */ export class PostMediaExtendedAudioDescriptionsOrderNotFoundError extends WistiaError { error?: string | undefined; /** The original data that was passed to this error instance. */ data$: PostMediaExtendedAudioDescriptionsOrderNotFoundErrorData; constructor( err: PostMediaExtendedAudioDescriptionsOrderNotFoundErrorData, 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 = "PostMediaExtendedAudioDescriptionsOrderNotFoundError"; } } /** * Forbidden, token is valid but account does not have access to feature */ export type PostMediaExtendedAudioDescriptionsOrderForbiddenErrorData = { error?: string | undefined; }; /** * Forbidden, token is valid but account does not have access to feature */ export class PostMediaExtendedAudioDescriptionsOrderForbiddenError extends WistiaError { error?: string | undefined; /** The original data that was passed to this error instance. */ data$: PostMediaExtendedAudioDescriptionsOrderForbiddenErrorData; constructor( err: PostMediaExtendedAudioDescriptionsOrderForbiddenErrorData, 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 = "PostMediaExtendedAudioDescriptionsOrderForbiddenError"; } } /** * Unauthorized, invalid or missing token */ export type PostMediaExtendedAudioDescriptionsOrderUnauthorizedErrorData = { error?: string | undefined; }; /** * Unauthorized, invalid or missing token */ export class PostMediaExtendedAudioDescriptionsOrderUnauthorizedError extends WistiaError { error?: string | undefined; /** The original data that was passed to this error instance. */ data$: PostMediaExtendedAudioDescriptionsOrderUnauthorizedErrorData; constructor( err: PostMediaExtendedAudioDescriptionsOrderUnauthorizedErrorData, 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 = "PostMediaExtendedAudioDescriptionsOrderUnauthorizedError"; } } /** * Bad request */ export type PostMediaExtendedAudioDescriptionsOrderBadRequestErrorData = { /** * Error message detailing the reason for the bad request. */ error?: string | undefined; }; /** * Bad request */ export class PostMediaExtendedAudioDescriptionsOrderBadRequestError extends WistiaError { /** * Error message detailing the reason for the bad request. */ error?: string | undefined; /** The original data that was passed to this error instance. */ data$: PostMediaExtendedAudioDescriptionsOrderBadRequestErrorData; constructor( err: PostMediaExtendedAudioDescriptionsOrderBadRequestErrorData, 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 = "PostMediaExtendedAudioDescriptionsOrderBadRequestError"; } } /** @internal */ export const PostMediaExtendedAudioDescriptionsOrderInternalServerError$inboundSchema: z.ZodType< PostMediaExtendedAudioDescriptionsOrderInternalServerError, z.ZodTypeDef, unknown > = z.object({ error: z.string().optional(), request$: z.instanceof(Request), response$: z.instanceof(Response), body$: z.string(), }) .transform((v) => { return new PostMediaExtendedAudioDescriptionsOrderInternalServerError(v, { request: v.request$, response: v.response$, body: v.body$, }); }); /** @internal */ export const PostMediaExtendedAudioDescriptionsOrderNotFoundError$inboundSchema: z.ZodType< PostMediaExtendedAudioDescriptionsOrderNotFoundError, z.ZodTypeDef, unknown > = z.object({ error: z.string().optional(), request$: z.instanceof(Request), response$: z.instanceof(Response), body$: z.string(), }) .transform((v) => { return new PostMediaExtendedAudioDescriptionsOrderNotFoundError(v, { request: v.request$, response: v.response$, body: v.body$, }); }); /** @internal */ export const PostMediaExtendedAudioDescriptionsOrderForbiddenError$inboundSchema: z.ZodType< PostMediaExtendedAudioDescriptionsOrderForbiddenError, z.ZodTypeDef, unknown > = z.object({ error: z.string().optional(), request$: z.instanceof(Request), response$: z.instanceof(Response), body$: z.string(), }) .transform((v) => { return new PostMediaExtendedAudioDescriptionsOrderForbiddenError(v, { request: v.request$, response: v.response$, body: v.body$, }); }); /** @internal */ export const PostMediaExtendedAudioDescriptionsOrderUnauthorizedError$inboundSchema: z.ZodType< PostMediaExtendedAudioDescriptionsOrderUnauthorizedError, z.ZodTypeDef, unknown > = z.object({ error: z.string().optional(), request$: z.instanceof(Request), response$: z.instanceof(Response), body$: z.string(), }) .transform((v) => { return new PostMediaExtendedAudioDescriptionsOrderUnauthorizedError(v, { request: v.request$, response: v.response$, body: v.body$, }); }); /** @internal */ export const PostMediaExtendedAudioDescriptionsOrderBadRequestError$inboundSchema: z.ZodType< PostMediaExtendedAudioDescriptionsOrderBadRequestError, z.ZodTypeDef, unknown > = z.object({ error: z.string().optional(), request$: z.instanceof(Request), response$: z.instanceof(Response), body$: z.string(), }) .transform((v) => { return new PostMediaExtendedAudioDescriptionsOrderBadRequestError(v, { request: v.request$, response: v.response$, body: v.body$, }); });