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