UNPKG

@graperank/engine

Version:

The GrapeRank Engine module stores and retrieves generated scores, and runs the Calculator and Interpretor modules to generate new scores. It requires one storage and one or more protocol plugins as input.

20 lines (19 loc) 1.15 kB
import { userId, WorldviewOutput, GraperankSettings, GraperankListener, GraperankNotification, sessionid, context, timestamp, ScorecardsOutput, WorldviewSettings, StorageProcessor } from "@graperank/util/types"; import { Protocols } from "@graperank/interpreter/protocols"; export declare class GrapeRankEngine { readonly observer: userId; readonly storage: StorageProcessor; readonly protocols: Protocols; private generator; private listeners; constructor(observer: userId, storage: StorageProcessor, protocols: Protocols); contexts(): Promise<string[]>; worldview(context?: context, update?: boolean | WorldviewSettings): Promise<WorldviewOutput | undefined>; scorecards(context?: context, timestamp?: timestamp): Promise<ScorecardsOutput | undefined>; generate(context?: context, settings?: Partial<GraperankSettings>): Promise<WorldviewOutput | undefined>; notify(notification: GraperankNotification): void; listen(sesionid: sessionid, callback: GraperankListener | false): boolean; stopCalculating(context?: context): Promise<boolean>; private clearCalculating; private rebuild; }