/** * Abstract class for generic Conversation related adapter */ export class Adapter { /** * @param {AdapterFactory} factory * @param {object} rawIOData - See OrchestratorFactory.create() * @param {object} config - Adapter configuration; the format depends on * the adapter. See constructors of the individual dialog adapters for * more details. * @param {Console} logger * @param {Session} session */ constructor(factory: AdapterFactory, rawIOData: object, config: object, logger: Console, session?: Session); factory: AdapterFactory; rawIOData: object; config: object; log: Console; session: Session; /** * @param {Orchestrator} orchestrator */ setOrchestrator(orchestrator: Orchestrator): void; orchestrator: any; /** * @return {Orchestrator} */ getOrchestrator(): Orchestrator; /** * Abstract method which initializes this.session * * @param {string} sessionId * @returns {Promise} */ startSession(sessionId: string): Promise; /** * @returns {Session} */ getSession(): Session; /** * @param {Session} session */ attachSession(session: Session): void; /** * @returns {AdapterFactory} */ getFactory(): AdapterFactory; /** * @param {AdapterFactory} factory */ setFactory(factory: AdapterFactory): void; /** * Abstract method * * @returns {object} Content of the ended session */ endSession(): object; }