import { default as Session } from './Session'; import { BotClientConfig } from './Config'; import { IApplication, IPrompt, ISession, SessionQueryParams } from '@gaiot/apis'; import { default as EventBus } from './EventBus'; export type ClientEventName = 'ready' | 'application:loaded'; export default class BotClient { private _token; private lazyload; protected event: EventBus; private cvforceApi; private _applicationId; private _application; private _sessions; private _activeSession?; private _ready?; private _questionContextMaxLength?; private _promptVariables?; constructor(_token: string, //AIoT resource token configs: BotClientConfig, lazyload?: boolean); private checkReady; get ready(): boolean | undefined; private set ready(value); get questionContextMaxLength(): number | undefined; get promptVariables(): IPrompt[] | undefined; get knowledges(): any; get sessions(): Session[]; set sessions(v: Session[]); private loadApplication; private getService; get token(): string; set token(v: string); get applicationId(): string; get application(): IApplication | null; get activeSession(): string; set activeSession(sessionId: string); private createSession; getSessions(queryParams?: SessionQueryParams): Promise; loadSession(sessionId?: string, sessionParams?: Partial): Promise; reload(): Promise; reloadSession(sessionId?: string): Promise; setTop(sessionId: string, top: boolean, order?: string): Promise; addEventListener(eventName: ClientEventName, callback: any, once?: boolean): void; removeEventListener(eventName: ClientEventName, callback: any): void; removeSession(session: string | Session, deleteFromRemote?: boolean): Promise; clean(): void; }