/* * 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 PostMediasMediaHashedIdLocalizationsInternalServerErrorData = { error?: string | undefined; }; /** * Internal server error */ export class PostMediasMediaHashedIdLocalizationsInternalServerError extends WistiaError { error?: string | undefined; /** The original data that was passed to this error instance. */ data$: PostMediasMediaHashedIdLocalizationsInternalServerErrorData; constructor( err: PostMediasMediaHashedIdLocalizationsInternalServerErrorData, 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 = "PostMediasMediaHashedIdLocalizationsInternalServerError"; } } /** * Unprocessible entity, parameters provided were invalid. */ export type PostMediasMediaHashedIdLocalizationsUnprocessableEntityErrorData = { /** * Error message detailing why the request failed. */ error?: string | undefined; }; /** * Unprocessible entity, parameters provided were invalid. */ export class PostMediasMediaHashedIdLocalizationsUnprocessableEntityError extends WistiaError { /** * Error message detailing why the request failed. */ error?: string | undefined; /** The original data that was passed to this error instance. */ data$: PostMediasMediaHashedIdLocalizationsUnprocessableEntityErrorData; constructor( err: PostMediasMediaHashedIdLocalizationsUnprocessableEntityErrorData, 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 = "PostMediasMediaHashedIdLocalizationsUnprocessableEntityError"; } } /** * Resource not found */ export type PostMediasMediaHashedIdLocalizationsNotFoundErrorData = { error?: string | undefined; }; /** * Resource not found */ export class PostMediasMediaHashedIdLocalizationsNotFoundError extends WistiaError { error?: string | undefined; /** The original data that was passed to this error instance. */ data$: PostMediasMediaHashedIdLocalizationsNotFoundErrorData; constructor( err: PostMediasMediaHashedIdLocalizationsNotFoundErrorData, 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 = "PostMediasMediaHashedIdLocalizationsNotFoundError"; } } /** * Forbidden, token is valid but account does not have access to feature */ export type PostMediasMediaHashedIdLocalizationsForbiddenErrorData = { error?: string | undefined; }; /** * Forbidden, token is valid but account does not have access to feature */ export class PostMediasMediaHashedIdLocalizationsForbiddenError extends WistiaError { error?: string | undefined; /** The original data that was passed to this error instance. */ data$: PostMediasMediaHashedIdLocalizationsForbiddenErrorData; constructor( err: PostMediasMediaHashedIdLocalizationsForbiddenErrorData, 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 = "PostMediasMediaHashedIdLocalizationsForbiddenError"; } } /** * Unauthorized, invalid or missing token */ export type PostMediasMediaHashedIdLocalizationsUnauthorizedErrorData = { error?: string | undefined; }; /** * Unauthorized, invalid or missing token */ export class PostMediasMediaHashedIdLocalizationsUnauthorizedError extends WistiaError { error?: string | undefined; /** The original data that was passed to this error instance. */ data$: PostMediasMediaHashedIdLocalizationsUnauthorizedErrorData; constructor( err: PostMediasMediaHashedIdLocalizationsUnauthorizedErrorData, 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 = "PostMediasMediaHashedIdLocalizationsUnauthorizedError"; } } /** * Bad request */ export type PostMediasMediaHashedIdLocalizationsBadRequestErrorData = { /** * Error message detailing the reason for the bad request. */ error?: string | undefined; }; /** * Bad request */ export class PostMediasMediaHashedIdLocalizationsBadRequestError 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$: PostMediasMediaHashedIdLocalizationsBadRequestErrorData; constructor( err: PostMediasMediaHashedIdLocalizationsBadRequestErrorData, 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 = "PostMediasMediaHashedIdLocalizationsBadRequestError"; } } /** @internal */ export const PostMediasMediaHashedIdLocalizationsInternalServerError$inboundSchema: z.ZodType< PostMediasMediaHashedIdLocalizationsInternalServerError, z.ZodTypeDef, unknown > = z.object({ error: z.string().optional(), request$: z.instanceof(Request), response$: z.instanceof(Response), body$: z.string(), }) .transform((v) => { return new PostMediasMediaHashedIdLocalizationsInternalServerError(v, { request: v.request$, response: v.response$, body: v.body$, }); }); /** @internal */ export const PostMediasMediaHashedIdLocalizationsUnprocessableEntityError$inboundSchema: z.ZodType< PostMediasMediaHashedIdLocalizationsUnprocessableEntityError, z.ZodTypeDef, unknown > = z.object({ error: z.string().optional(), request$: z.instanceof(Request), response$: z.instanceof(Response), body$: z.string(), }) .transform((v) => { return new PostMediasMediaHashedIdLocalizationsUnprocessableEntityError( v, { request: v.request$, response: v.response$, body: v.body$ }, ); }); /** @internal */ export const PostMediasMediaHashedIdLocalizationsNotFoundError$inboundSchema: z.ZodType< PostMediasMediaHashedIdLocalizationsNotFoundError, z.ZodTypeDef, unknown > = z.object({ error: z.string().optional(), request$: z.instanceof(Request), response$: z.instanceof(Response), body$: z.string(), }) .transform((v) => { return new PostMediasMediaHashedIdLocalizationsNotFoundError(v, { request: v.request$, response: v.response$, body: v.body$, }); }); /** @internal */ export const PostMediasMediaHashedIdLocalizationsForbiddenError$inboundSchema: z.ZodType< PostMediasMediaHashedIdLocalizationsForbiddenError, z.ZodTypeDef, unknown > = z.object({ error: z.string().optional(), request$: z.instanceof(Request), response$: z.instanceof(Response), body$: z.string(), }) .transform((v) => { return new PostMediasMediaHashedIdLocalizationsForbiddenError(v, { request: v.request$, response: v.response$, body: v.body$, }); }); /** @internal */ export const PostMediasMediaHashedIdLocalizationsUnauthorizedError$inboundSchema: z.ZodType< PostMediasMediaHashedIdLocalizationsUnauthorizedError, z.ZodTypeDef, unknown > = z.object({ error: z.string().optional(), request$: z.instanceof(Request), response$: z.instanceof(Response), body$: z.string(), }) .transform((v) => { return new PostMediasMediaHashedIdLocalizationsUnauthorizedError(v, { request: v.request$, response: v.response$, body: v.body$, }); }); /** @internal */ export const PostMediasMediaHashedIdLocalizationsBadRequestError$inboundSchema: z.ZodType< PostMediasMediaHashedIdLocalizationsBadRequestError, z.ZodTypeDef, unknown > = z.object({ error: z.string().optional(), request$: z.instanceof(Request), response$: z.instanceof(Response), body$: z.string(), }) .transform((v) => { return new PostMediasMediaHashedIdLocalizationsBadRequestError(v, { request: v.request$, response: v.response$, body: v.body$, }); });