@fjell/lib
Version:
Server-side Library for Fjell
17 lines (16 loc) • 1.52 kB
TypeScript
import { AffectedKeys, Coordinate, ContainedOperations as CoreContainedOperations, Item, OperationParams } from "@fjell/types";
import { Registry } from "../Registry";
import { Options } from "./Options";
import { ActionMethod, AllActionMethod, AllFacetMethod, FacetMethod, FinderMethod } from "../Options";
/**
* Contained Operations interface - extends core ContainedOperations and adds lib-specific properties
*/
export interface Operations<V extends Item<S, L1, L2, L3, L4, L5>, S extends string, L1 extends string = never, L2 extends string = never, L3 extends string = never, L4 extends string = never, L5 extends string = never> extends CoreContainedOperations<V, S, L1, L2, L3, L4, L5> {
finders: Record<string, FinderMethod<V, S, L1, L2, L3, L4, L5>>;
actions: Record<string, ActionMethod<V, S, L1, L2, L3, L4, L5>>;
facets: Record<string, FacetMethod<V, S, L1, L2, L3, L4, L5>>;
allActions: Record<string, AllActionMethod<V, S, L1, L2, L3, L4, L5>>;
allFacets: Record<string, AllFacetMethod<L1, L2, L3, L4, L5>>;
}
export type { OperationParams, AffectedKeys };
export declare const wrapOperations: <V extends Item<S, L1, L2, L3, L4, L5>, S extends string, L1 extends string = never, L2 extends string = never, L3 extends string = never, L4 extends string = never, L5 extends string = never>(toWrap: Operations<V, S, L1, L2, L3, L4, L5>, options: Options<V, S, L1, L2, L3, L4, L5>, coordinate: Coordinate<S, L1, L2, L3, L4, L5>, registry: Registry) => Operations<V, S, L1, L2, L3, L4, L5>;