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