import Koa from 'koa'; import { API, APISource } from './api'; import { ActionStorage, IDBAdapter, IPowerApp, IStorageTypes, Model, PowerAppOptions, PowerAppVersion, PowerAppVersionInfo, ServeOptions, StorageObject } from './core'; export interface MatchContextsOptions { storage: TModel['storage']; } export interface MatchContextsResult { storage: ActionStorage; api: API; } export declare class PowerApp implements IPowerApp { private options; definitions: PowerAppVersionInfo[]; dbAdapter: IDBAdapter; constructor(options?: PowerAppOptions); getAPI(source?: APISource): API; generateAPI(storage: StorageObject): Promise; version(range: string, definition: PowerAppVersion.Definition): void; serve(options?: ServeOptions): void; koa(path: ServeOptions['path']): Koa.Middleware; express(): void; hapi(): void; getContextIterable(type: TModel['type'], { storage }: MatchContextsOptions): AsyncGenerator>; getContexts(type: TModel['type'], options: MatchContextsOptions): Promise[]>; private initialize; private buildServeAdapter; private checkVersionsQualified; private handleInstallation; private handlePermission; private handlePowerItemChange; private handlePowerNodeChange; private handlePowerGlanceChange; private handlePowerCustomCheckableItemChange; }