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