@just-in/core
Version:
A TypeScript-first framework for building adaptive digital health interventions.
33 lines • 1.05 kB
TypeScript
/**
* Triggers an event by creating an instance in the `EVENTS_QUEUE`.
*/
export declare const publishEvent: (eventType: string, generatedTimestamp: Date, eventDetails?: Record<string, any>) => Promise<void>;
/**
* Processes events in the `EVENTS_QUEUE`.
*/
export declare const processEventQueue: () => Promise<void>;
/**
* Sets up a listener for the `EVENTS_QUEUE` collection.
*/
export declare const setupEventQueueListener: () => Promise<void>;
/**
* Stops the event queue processing.
*/
export declare const stopEventQueueProcessing: () => void;
/**
* Starts the event queue processing.
*/
export declare const startEventQueueProcessing: () => Promise<void>;
/**
* Returns true if the event queue is running.
*/
export declare function isRunning(): boolean;
/**
* Returns true if the event queue is empty.
*/
export declare function queueIsEmpty(): Promise<boolean>;
/**
* Sets the shouldProcessQueue flag.
*/
export declare const setShouldProcessQueue: (shouldProcess: boolean) => void;
//# sourceMappingURL=event-queue.d.ts.map