35 lines
1.9 KiB
TypeScript
35 lines
1.9 KiB
TypeScript
import { InteractionMemory, StorageOptions, InteractionDescription, InteractionEvent } from './im/InteractionMemory';
|
|
/**
|
|
* Initialized the InteractionMemory Singleton. Requires a Jibo object
|
|
* @param {jibo} jibo runtime
|
|
* @param {StorageOptions} options for interaction memory
|
|
*/
|
|
export declare function init(jibo: any, storageOptions?: StorageOptions): void;
|
|
/**
|
|
* Store the event
|
|
* @param {InteractionDescription} description
|
|
* @returns {PromiseLike<TResult>|Promise<TResult>}
|
|
*/
|
|
export declare function noteEvent(description: InteractionDescription): Promise<InteractionEvent>;
|
|
/**
|
|
*
|
|
* @param {InteractionDescription} queryDesc - an InteractionDescription to be matched
|
|
* @param compare - a function returning true when two InteractionDescriptions are considered a match, false otherwise
|
|
* @param {Date|null} startTime - optional start time of search window; i.e., when we stop searching backwards in time
|
|
* @param {Date} [refDate] - optional, a reference date to compute against. If not provided the current time (as per InteractionMemory's dateProvider) will be used.
|
|
* @returns number of milliseconds since a matching event, or Number.POSITIVE_INFINITY to indicate no match
|
|
*/
|
|
export declare function getTimeSinceLast(queryDesc: InteractionDescription, compare?: typeof InteractionMemory.compareUser, startTime?: Date, refDate?: Date): Promise<number>;
|
|
/**
|
|
* Returns a static compare method to be used in interaction memory queries
|
|
* Every person mentioned in the query should be included in the candidate
|
|
* @returns compare function
|
|
*/
|
|
export declare const compareUser: typeof InteractionMemory.compareUser;
|
|
/**
|
|
* Returns a static compare method to be used in interaction memory queries
|
|
* Every property specified in the query must match; additional properties in the candidate are okay.
|
|
* @returns compare function
|
|
*/
|
|
export declare const compareQueryFields: typeof InteractionMemory.compareQueryFields;
|