@rocket.chat/apps-engine
Version:
The engine code for the Rocket.Chat Apps which manages, runs, translates, coordinates and all of that.
22 lines (21 loc) • 760 B
TypeScript
import type { ILoggerStorageEntry } from '../logging';
export interface IAppLogStorageFindOptions {
sort?: Record<string, 1 | -1>;
skip?: number;
limit?: number;
projection?: Record<string, 1 | 0>;
}
export declare abstract class AppLogStorage {
private readonly engine;
constructor(engine: string);
getEngine(): string;
abstract find(query: {
[field: string]: any;
}, options?: IAppLogStorageFindOptions): Promise<{
logs: ILoggerStorageEntry[];
total: number;
}>;
abstract storeEntries(logEntry: ILoggerStorageEntry): Promise<ILoggerStorageEntry>;
abstract getEntriesFor(appId: string): Promise<Array<ILoggerStorageEntry>>;
abstract removeEntriesFor(appId: string): Promise<void>;
}