/* * 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 PostTaggingsBulkCreateInternalServerErrorData = { error?: string | undefined; }; /** * Internal server error */ export class PostTaggingsBulkCreateInternalServerError extends WistiaError { error?: string | undefined; /** The original data that was passed to this error instance. */ data$: PostTaggingsBulkCreateInternalServerErrorData; constructor( err: PostTaggingsBulkCreateInternalServerErrorData, 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 = "PostTaggingsBulkCreateInternalServerError"; } } /** * Unprocessable entity, e.g. missing required parameters. */ export type PostTaggingsBulkCreateUnprocessableEntityErrorData = { error?: string | undefined; }; /** * Unprocessable entity, e.g. missing required parameters. */ export class PostTaggingsBulkCreateUnprocessableEntityError extends WistiaError { error?: string | undefined; /** The original data that was passed to this error instance. */ data$: PostTaggingsBulkCreateUnprocessableEntityErrorData; constructor( err: PostTaggingsBulkCreateUnprocessableEntityErrorData, 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 = "PostTaggingsBulkCreateUnprocessableEntityError"; } } /** * Forbidden, token is valid but account does not have access to feature */ export type PostTaggingsBulkCreateForbiddenErrorData = { error?: string | undefined; }; /** * Forbidden, token is valid but account does not have access to feature */ export class PostTaggingsBulkCreateForbiddenError extends WistiaError { error?: string | undefined; /** The original data that was passed to this error instance. */ data$: PostTaggingsBulkCreateForbiddenErrorData; constructor( err: PostTaggingsBulkCreateForbiddenErrorData, 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 = "PostTaggingsBulkCreateForbiddenError"; } } /** * Unauthorized, invalid or missing token */ export type PostTaggingsBulkCreateUnauthorizedErrorData = { error?: string | undefined; }; /** * Unauthorized, invalid or missing token */ export class PostTaggingsBulkCreateUnauthorizedError extends WistiaError { error?: string | undefined; /** The original data that was passed to this error instance. */ data$: PostTaggingsBulkCreateUnauthorizedErrorData; constructor( err: PostTaggingsBulkCreateUnauthorizedErrorData, 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 = "PostTaggingsBulkCreateUnauthorizedError"; } } /** @internal */ export const PostTaggingsBulkCreateInternalServerError$inboundSchema: z.ZodType< PostTaggingsBulkCreateInternalServerError, z.ZodTypeDef, unknown > = z.object({ error: z.string().optional(), request$: z.instanceof(Request), response$: z.instanceof(Response), body$: z.string(), }) .transform((v) => { return new PostTaggingsBulkCreateInternalServerError(v, { request: v.request$, response: v.response$, body: v.body$, }); }); /** @internal */ export const PostTaggingsBulkCreateUnprocessableEntityError$inboundSchema: z.ZodType< PostTaggingsBulkCreateUnprocessableEntityError, z.ZodTypeDef, unknown > = z.object({ error: z.string().optional(), request$: z.instanceof(Request), response$: z.instanceof(Response), body$: z.string(), }) .transform((v) => { return new PostTaggingsBulkCreateUnprocessableEntityError(v, { request: v.request$, response: v.response$, body: v.body$, }); }); /** @internal */ export const PostTaggingsBulkCreateForbiddenError$inboundSchema: z.ZodType< PostTaggingsBulkCreateForbiddenError, z.ZodTypeDef, unknown > = z.object({ error: z.string().optional(), request$: z.instanceof(Request), response$: z.instanceof(Response), body$: z.string(), }) .transform((v) => { return new PostTaggingsBulkCreateForbiddenError(v, { request: v.request$, response: v.response$, body: v.body$, }); }); /** @internal */ export const PostTaggingsBulkCreateUnauthorizedError$inboundSchema: z.ZodType< PostTaggingsBulkCreateUnauthorizedError, z.ZodTypeDef, unknown > = z.object({ error: z.string().optional(), request$: z.instanceof(Request), response$: z.instanceof(Response), body$: z.string(), }) .transform((v) => { return new PostTaggingsBulkCreateUnauthorizedError(v, { request: v.request$, response: v.response$, body: v.body$, }); });