/* * 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 GetMediaExtendedAudioDescriptionsIdInternalServerErrorData = { error?: string | undefined; }; /** * Internal server error */ export class GetMediaExtendedAudioDescriptionsIdInternalServerError extends WistiaError { error?: string | undefined; /** The original data that was passed to this error instance. */ data$: GetMediaExtendedAudioDescriptionsIdInternalServerErrorData; constructor( err: GetMediaExtendedAudioDescriptionsIdInternalServerErrorData, 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 = "GetMediaExtendedAudioDescriptionsIdInternalServerError"; } } /** * Resource not found */ export type GetMediaExtendedAudioDescriptionsIdNotFoundErrorData = { error?: string | undefined; }; /** * Resource not found */ export class GetMediaExtendedAudioDescriptionsIdNotFoundError extends WistiaError { error?: string | undefined; /** The original data that was passed to this error instance. */ data$: GetMediaExtendedAudioDescriptionsIdNotFoundErrorData; constructor( err: GetMediaExtendedAudioDescriptionsIdNotFoundErrorData, 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 = "GetMediaExtendedAudioDescriptionsIdNotFoundError"; } } /** * Unauthorized, invalid or missing token */ export type GetMediaExtendedAudioDescriptionsIdUnauthorizedErrorData = { error?: string | undefined; }; /** * Unauthorized, invalid or missing token */ export class GetMediaExtendedAudioDescriptionsIdUnauthorizedError extends WistiaError { error?: string | undefined; /** The original data that was passed to this error instance. */ data$: GetMediaExtendedAudioDescriptionsIdUnauthorizedErrorData; constructor( err: GetMediaExtendedAudioDescriptionsIdUnauthorizedErrorData, 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 = "GetMediaExtendedAudioDescriptionsIdUnauthorizedError"; } } /** @internal */ export const GetMediaExtendedAudioDescriptionsIdInternalServerError$inboundSchema: z.ZodType< GetMediaExtendedAudioDescriptionsIdInternalServerError, z.ZodTypeDef, unknown > = z.object({ error: z.string().optional(), request$: z.instanceof(Request), response$: z.instanceof(Response), body$: z.string(), }) .transform((v) => { return new GetMediaExtendedAudioDescriptionsIdInternalServerError(v, { request: v.request$, response: v.response$, body: v.body$, }); }); /** @internal */ export const GetMediaExtendedAudioDescriptionsIdNotFoundError$inboundSchema: z.ZodType< GetMediaExtendedAudioDescriptionsIdNotFoundError, z.ZodTypeDef, unknown > = z.object({ error: z.string().optional(), request$: z.instanceof(Request), response$: z.instanceof(Response), body$: z.string(), }) .transform((v) => { return new GetMediaExtendedAudioDescriptionsIdNotFoundError(v, { request: v.request$, response: v.response$, body: v.body$, }); }); /** @internal */ export const GetMediaExtendedAudioDescriptionsIdUnauthorizedError$inboundSchema: z.ZodType< GetMediaExtendedAudioDescriptionsIdUnauthorizedError, z.ZodTypeDef, unknown > = z.object({ error: z.string().optional(), request$: z.instanceof(Request), response$: z.instanceof(Response), body$: z.string(), }) .transform((v) => { return new GetMediaExtendedAudioDescriptionsIdUnauthorizedError(v, { request: v.request$, response: v.response$, body: v.body$, }); });