Options
All
  • Public
  • Public/Protected
  • All
Menu

Minimal service layer for a bot and encapsulation of BOT Framework calls.

Hierarchy

  • GBMinService

Index

Constructors

constructor

  • new GBMinService(core: IGBCoreService, conversationalService: IGBConversationalService, adminService: IGBAdminService, deployer: GBDeployer): GBMinService

Properties

adminService

adminService: IGBAdminService

Conversational administration services like publishing packages.

conversationalService

conversationalService: IGBConversationalService

Reference to conversation services like receive and prompt text.

core

core: IGBCoreService

Main core service attached to this bot service.

deployer

deployer: GBDeployer

Deployent of packages and publishing related services.

Static Private uiPackage

uiPackage: string = "default.gbui"

Default General Bots User Interface package.

Methods

Private WhatsAppCallback

  • WhatsAppCallback(req: any, res: any): Promise<void>

Private buildBotAdapter

  • buildBotAdapter(instance: any, sysPackages: IGBPackage[], appPackages: IGBPackage[]): Promise<{ adapter: BotFrameworkAdapter; conversationState: ConversationState; min: GBMinInstance }>
  • Builds the BOT Framework & GB infrastructures.

    Parameters

    • instance: any
    • sysPackages: IGBPackage[]
    • appPackages: IGBPackage[]

    Returns Promise<{ adapter: BotFrameworkAdapter; conversationState: ConversationState; min: GBMinInstance }>

buildMin

  • buildMin(instances: IGBInstance[]): Promise<void>

Private createCheckHealthAddress

  • createCheckHealthAddress(server: any, min: GBMinInstance, instance: IGBInstance): void

Private getSTSToken

  • getSTSToken(instance: any): Promise<any>

Private getWebchatToken

  • getWebchatToken(instance: any): Promise<any>

Private handleGetInstanceForClient

  • handleGetInstanceForClient(req: any, res: any): Promise<void>

Private handleOAuthRequests

  • handleOAuthRequests(server: any, min: GBMinInstance): void

Private handleOAuthTokenRequests

  • handleOAuthTokenRequests(server: any, min: GBMinInstance, instance: IGBInstance): void

Private invokeLoadBot

  • invokeLoadBot(appPackages: IGBPackage[], sysPackages: IGBPackage[], min: GBMinInstance): Promise<void>

mountBot

  • mountBot(instance: IGBInstance): Promise<void>
  • Mount the instance by creating an BOT Framework bot object, serving bot endpoint in several URL like WhatsApp endpoint, .gbkb assets, installing all BASIC artifacts from .gbdialog and OAuth2.

    Parameters

    • instance: IGBInstance

    Returns Promise<void>

Private processEventActivity

  • processEventActivity(context: any, step: GBDialogStep): Promise<void>

Private processMessageActivity

  • processMessageActivity(context: any, min: GBMinInstance, step: GBDialogStep): Promise<DialogTurnResult<any>>

Private receiver

  • receiver(adapter: BotFrameworkAdapter, req: any, res: any, conversationState: ConversationState, min: GBMinInstance, instance: any, appPackages: any[]): Promise<void>
  • BOT Framework web service hook method.

    Parameters

    • adapter: BotFrameworkAdapter
    • req: any
    • res: any
    • conversationState: ConversationState
    • min: GBMinInstance
    • instance: any
    • appPackages: any[]

    Returns Promise<void>

unmountBot

  • unmountBot(botId: string): Promise<void>

Generated using TypeDoc