import type { schemas } from "../openapi"; export type NotFoundError = schemas["NotFoundError"]; export type ValidatorError = schemas["ValidatorError"]; export type ForbiddenError = schemas["ForbiddenError"]; export type UnauthorizedError = schemas["UnauthorizedError"]; export type InternalServerError = schemas["InternalServerError"]; export type SomeError = NotFoundError | ValidatorError | ForbiddenError | UnauthorizedError | InternalServerError; export declare class APIError extends Error { error: SomeError; constructor(error: SomeError); isNotFound(): boolean; isUnauthorizedOrForbidden(): boolean; isForbidden(): boolean; isUnauthorized(): boolean; isInternalServerError(): boolean; isValidatorError(): boolean; static isAPIError: (error: unknown) => error is APIError; static fromSomeError: (someError: SomeError) => APIError; } export declare const raiseAPIError: (someError: SomeError) => never;