import { Session , IMessage } from "botbuilder" ; import { Bot , BotStatus , BotMessage , BotResponse } from "../Models" ; export interface IBotResponseHandler { ( response , error ? ) : void ; } export interface IBotConnectionManager { authorizeConnection ( socket ) : Promise < void > ; establishConnection ( socket ) : Promise < string > ; disconnect ( botId ) : Promise < void > ; isConnected ( botId ) : Promise < boolean > ; sendMessage ( botId , message , responseHandler ) : Promise < void > ; rename ( botId , name ) : Promise < void > ; } export interface IBotConnection { readonly botId : string ; rename ( name ) : void ; disconnect ( ) : void ; sendMessage ( message , responseHandler ) : void ; } export interface IBotService { authorizeConnection ( socket ) : Promise < void > ; establishConnection ( socket ) : Promise < void > ; registerBotWithName ( teamId , botName ) : Promise < Bot > ; deregisterBotWithName ( teamId , botName ) : Promise < Bot > ; enableBotWithName ( teamId , botName ) : Promise < Bot > ; disableBotWithName ( teamId , botName ) : Promise < Bot > ; renameBot ( teamId , fromName , toName ) : Promise < Bot > ; getBotStatuses ( teamId ) : Promise < BotStatus [ ] > ; sendMessageToBot ( teamId , botName , message , responseHandler ) : Promise < Bot > ; copyBot ( teamId , botName ) : Promise < string > ; pasteBot ( teamId , copyId ) : Promise < Bot > ; } export interface IBotMessageFormatter { toBotFrameworkMessage ( session , response ) : IMessage [ ] ; }