/// import * as events from 'events'; import * as ThingTalk from 'thingtalk'; import AppExecutor from './app_executor'; import type Engine from '../index'; /** * The collection of all running and configured ThingTalk programs. */ export default class AppDatabase extends events.EventEmitter { private _apps; private _engine; private _platform; private _db; /** * Construct the app database for this engine. * * There is only one app database instance per engine, * and it is accessible as {@link AssistantEngine.apps}. * @package */ constructor(engine: Engine); private _getAll; private _insertOne; private _deleteOne; private _doStartApp; createApp(program: ThingTalk.Ast.Program, options?: { uniqueId?: string; name?: string; description?: string; icon?: string; conversation?: string; notifications?: { backend: string; config: Record; }; }): Promise; private _loadOneApp; start(): Promise; stop(): Promise; private _removeAppInternal; private _addAppInternal; private _enableApp; saveApp(app: AppExecutor): Promise; removeApp(app: AppExecutor): Promise; getAllApps(): AppExecutor[]; getApp(id: string): AppExecutor | undefined; hasApp(id: string): boolean; isEmpty(): boolean; }