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