UNPKG

@fjell/lib

Version:

Server-side Library for Fjell

73 lines (72 loc) 4.33 kB
import { ComKey, Item, LocKeyArray, PriKey } from "@fjell/core"; import { Coordinate } from "@fjell/registry"; export declare class LibError<S extends string, L1 extends string, L2 extends string, L3 extends string, L4 extends string, L5 extends string> extends Error { private operation; private coordinate; constructor(message: string, operation: string, coordinate: Coordinate<S, L1, L2, L3, L4, L5>, options?: { cause?: Error; }); } export declare class NotFoundError<S extends string, L1 extends string = never, L2 extends string = never, L3 extends string = never, L4 extends string = never, L5 extends string = never> extends LibError<S, L1, L2, L3, L4, L5> { private key; constructor(operation: string, coordinate: Coordinate<S, L1, L2, L3, L4, L5>, key: PriKey<S> | ComKey<S, L1, L2, L3, L4, L5>, options?: { cause?: Error; }); } export declare class NotUpdatedError<S extends string, L1 extends string = never, L2 extends string = never, L3 extends string = never, L4 extends string = never, L5 extends string = never> extends LibError<S, L1, L2, L3, L4, L5> { private key; constructor(operation: string, coordinate: Coordinate<S, L1, L2, L3, L4, L5>, key: PriKey<S> | ComKey<S, L1, L2, L3, L4, L5>, options?: { cause?: Error; }); } export declare class ValidationError<S extends string, L1 extends string, L2 extends string, L3 extends string, L4 extends string, L5 extends string> extends LibError<S, L1, L2, L3, L4, L5> { constructor(message: string, operation: string, coordinate: Coordinate<S, L1, L2, L3, L4, L5>, options?: { cause?: Error; }); } export declare class CreateValidationError<S extends string, L1 extends string, L2 extends string, L3 extends string, L4 extends string, L5 extends string> extends ValidationError<S, L1, L2, L3, L4, L5> { constructor(parameters: { item: Partial<Item<S, L1, L2, L3, L4, L5>>; options?: { key?: PriKey<S> | ComKey<S, L1, L2, L3, L4, L5> | undefined; locations?: LocKeyArray<L1, L2, L3, L4, L5> | [] | undefined; }; }, coordinate: Coordinate<S, L1, L2, L3, L4, L5>, options?: { cause?: Error; }); } export declare class UpdateValidationError<S extends string, L1 extends string, L2 extends string, L3 extends string, L4 extends string, L5 extends string> extends ValidationError<S, L1, L2, L3, L4, L5> { constructor(parameters: { item: Partial<Item<S, L1, L2, L3, L4, L5>>; key: PriKey<S> | ComKey<S, L1, L2, L3, L4, L5> | undefined; }, coordinate: Coordinate<S, L1, L2, L3, L4, L5>, options?: { cause?: Error; }); } export declare class RemoveValidationError<S extends string, L1 extends string = never, L2 extends string = never, L3 extends string = never, L4 extends string = never, L5 extends string = never> extends ValidationError<S, L1, L2, L3, L4, L5> { constructor(parameters: { key: PriKey<S> | ComKey<S, L1, L2, L3, L4, L5> | undefined; }, coordinate: Coordinate<S, L1, L2, L3, L4, L5>, options?: { cause?: Error; }); } export declare class UpdateError<S extends string, L1 extends string = never, L2 extends string = never, L3 extends string = never, L4 extends string = never, L5 extends string = never> extends LibError<S, L1, L2, L3, L4, L5> { constructor(parameters: { item: Partial<Item<S, L1, L2, L3, L4, L5>>; key: PriKey<S> | ComKey<S, L1, L2, L3, L4, L5> | undefined; }, coordinate: Coordinate<S, L1, L2, L3, L4, L5>, options?: { cause?: Error; }); } export declare class RemoveError<S extends string, L1 extends string = never, L2 extends string = never, L3 extends string = never, L4 extends string = never, L5 extends string = never> extends LibError<S, L1, L2, L3, L4, L5> { constructor(parameters: { key: PriKey<S> | ComKey<S, L1, L2, L3, L4, L5> | undefined; }, coordinate: Coordinate<S, L1, L2, L3, L4, L5>, options?: { cause?: Error; }); } export declare class HookError<S extends string, L1 extends string, L2 extends string, L3 extends string, L4 extends string, L5 extends string> extends LibError<S, L1, L2, L3, L4, L5> { constructor(message: string, operation: string, coordinate: Coordinate<S, L1, L2, L3, L4, L5>, options?: { cause?: Error; }); }