@fjell/lib
Version:
Server-side Library for Fjell
20 lines (19 loc) • 1.24 kB
TypeScript
import { Item } from "@fjell/types";
import { ImplementationOperations } from "./ImplementationOperations";
import { Operations } from "./Operations";
import { Options } from "./Options";
/**
* wrapImplementationOperations
*
* Wraps implementation operations (from lib-firestore, lib-sequelize) with:
* 1. Default stub implementations for extended operations (facets, actions)
* 2. Metadata dictionaries (finders, actions, facets, allActions, allFacets)
*
* This centralizes the pattern of adding extended operations, removing the need for
* implementation libraries to provide their own stub implementations.
*
* @param implOps - The core operations implemented by the library
* @param options - Library options containing finders, actions, facets definitions
* @returns Complete Operations object with all required methods and metadata
*/
export declare function wrapImplementationOperations<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>(implOps: ImplementationOperations<V, S, L1, L2, L3, L4, L5>, options: Options<V, S, L1, L2, L3, L4, L5>): Operations<V, S, L1, L2, L3, L4, L5>;