UNPKG

@fjell/lib

Version:

Server-side Library for Fjell

13 lines (12 loc) 868 B
import { AffectedKeys, Coordinate, PrimaryOperations as CorePrimaryOperations, Item, OperationParams } from "@fjell/types"; import { ActionMethod, AllActionMethod, AllFacetMethod, FacetMethod, FinderMethod, Options } from "../Options"; import { Registry } from "../Registry"; export interface Operations<V extends Item<S>, S extends string> extends CorePrimaryOperations<V, S> { finders: Record<string, FinderMethod<V, S>>; actions: Record<string, ActionMethod<V, S>>; facets: Record<string, FacetMethod<V, S>>; allActions: Record<string, AllActionMethod<V, S>>; allFacets: Record<string, AllFacetMethod>; } export type { OperationParams, AffectedKeys }; export declare const wrapOperations: <V extends Item<S>, S extends string>(toWrap: Operations<V, S>, options: Options<V, S>, coordinate: Coordinate<S>, registry: Registry) => Operations<V, S>;