diff --git a/changelog.md b/changelog.md index f6ffc0349..f5877761e 100644 --- a/changelog.md +++ b/changelog.md @@ -4,6 +4,33 @@ [Want to contribute? Read our guide!](https://github.com/howdyai/botkit/blob/master/CONTRIBUTING.md) +# 4.8 + +In addition to fixing a bunch of bugs and adding some new features, this version brings Botkit up to date with Bot Framework's latest release - [Change log here](https://github.com/microsoft/botbuilder-js/releases). + +There are lots of interesting things happening in the Bot Framework world including a new [GUI for dialog management called Bot Framework Composer](https://github.com/microsoft/botframework-composer), a new templating system called [Language Generation](https://github.com/microsoft/BotBuilder-Samples/tree/master/experimental/language-generation), and more. Check out the [main hub repo for more information.](https://github.com/microsoft/botframework-sdk#readme) + +### NEW + +* NEW: At long last, the convo.ask callbacks can receive the full incoming message payload in addition to the text content. +This allows developers to use payload values inside quick replies, button clicks and other rich operations. Many thanks to [@naikus](https://github.com/naikus) for the effort and patience it took to get this in! [PR #1801](https://github.com/howdyai/botkit/pull/1801) +* NEW: Multi-adapter support improved. Botkit will now spawn the appropriate type of Botworker when used in a multi-adapter scenario. [See this example for a demonstration of using multiple adapters in a single bot app](./packages/testbot/multiadapter.js). [Issue #1920](https://github.com/howdyai/botkit/issues/1920) +* NEW: Add support for Slack's v2 oauth. [More details here](./packages/botbuilder-adapter-slack/CHANGELOG.md#109). Thanks to [@sfny](https://github.com/sfny) for [PR #1928](https://github.com/howdyai/botkit/pull/1928) +* NEW: Values in `channelData` will now be processed as Mustache templates inside BotkitConversations. [Thanks @me-cedric](https://github.com/me-cedric) for [pr #1925](https://github.com/howdyai/botkit/pull/1925) +* NEW: New Dialog related features for determining if a bot is already in a conversation, including [bot.hasActiveDialog()](packages/docs/reference/core.md#hasActiveDialog), +[bot.getActiveDialog()](packages/docs/reference/core.md#getActiveDialog), and +[bot.isDialogActive()](packages/docs/reference/core.md#isDialogActive) + +### FIXED + +* FIX: Facebook Adapter will not attempt to set up web routes if webserver is not configured. [#1916](https://github.com/howdyai/botkit/issues/1916) +* FIX: Exclude `activity.conversation.properties` field when generating state storage key. [#1849](https://github.com/howdyai/botkit/issues/1849) +* FIX: Allow startConversationWithUser to work with Bot Framework Emulator. [#1834](https://github.com/howdyai/botkit/issues/1834) +* FIX: Using `beginDialog` inside an `ask()` caused weird behaviors. Fixes for [#1878](https://github.com/howdyai/botkit/issues/1878) and [#1932](https://github.com/howdyai/botkit/issues/1932) +* FIX: Webex - remove empty `files` key [#1906](https://github.com/howdyai/botkit/pull/1906) +* FIX: Slack - authed_users added to message [#1911](https://github.com/howdyai/botkit/issues/1911) +* Update: all dependencies to latest, including bot framework 4.7->4.8 and mustache 3.0 -> 4.0 + # 4.6.1 Version 4.6.1 includes some security and bugfix updates along with bumping many dependencies to the latest versions. diff --git a/packages/botbuilder-adapter-facebook/package.json b/packages/botbuilder-adapter-facebook/package.json index 7af8b6226..5ce02e473 100644 --- a/packages/botbuilder-adapter-facebook/package.json +++ b/packages/botbuilder-adapter-facebook/package.json @@ -1,6 +1,6 @@ { "name": "botbuilder-adapter-facebook", - "version": "1.0.8", + "version": "1.0.9", "description": "Connect Botkit or BotBuilder to Facebook Messenger", "main": "lib/index.js", "typings": "./lib/index.d.ts", @@ -34,8 +34,8 @@ "url": "https://github.com/howdyai/botkit.git" }, "dependencies": { - "botbuilder": "^4.7.1", - "botkit": "^4.6.2", + "botbuilder": "^4.8.0", + "botkit": "^4.8.0", "debug": "^4.1.0" }, "devDependencies": { diff --git a/packages/botbuilder-adapter-facebook/src/facebook_adapter.ts b/packages/botbuilder-adapter-facebook/src/facebook_adapter.ts index 349ee41eb..b3031bfec 100644 --- a/packages/botbuilder-adapter-facebook/src/facebook_adapter.ts +++ b/packages/botbuilder-adapter-facebook/src/facebook_adapter.ts @@ -133,7 +133,7 @@ export class FacebookAdapter extends BotAdapter { this.middlewares = { spawn: [ - async (bot, next) => { + async (bot, next): Promise => { bot.api = await this.getAPI(bot.getConfig('activity')); next(); } @@ -148,15 +148,17 @@ export class FacebookAdapter extends BotAdapter { */ public async init(botkit): Promise { debug('Add GET webhook endpoint for verification at: ', botkit.getConfig('webhook_uri')); - botkit.webserver.get(botkit.getConfig('webhook_uri'), (req, res) => { - if (req.query['hub.mode'] === 'subscribe') { - if (req.query['hub.verify_token'] === this.options.verify_token) { - res.send(req.query['hub.challenge']); - } else { - res.send('OK'); + if (botkit.webserver) { + botkit.webserver.get(botkit.getConfig('webhook_uri'), (req, res) => { + if (req.query['hub.mode'] === 'subscribe') { + if (req.query['hub.verify_token'] === this.options.verify_token) { + res.send(req.query['hub.challenge']); + } else { + res.send('OK'); + } } - } - }); + }); + } } /** diff --git a/packages/botbuilder-adapter-hangouts/package.json b/packages/botbuilder-adapter-hangouts/package.json index 17af9b66b..74605a593 100644 --- a/packages/botbuilder-adapter-hangouts/package.json +++ b/packages/botbuilder-adapter-hangouts/package.json @@ -1,6 +1,6 @@ { "name": "botbuilder-adapter-hangouts", - "version": "1.0.5", + "version": "1.0.6", "description": "Connect Botkit or BotBuilder to Google Hangouts", "main": "./lib/index.js", "typings": "./lib/index.d.ts", @@ -34,9 +34,9 @@ "url": "https://github.com/howdyai/botkit.git" }, "dependencies": { - "botbuilder": "^4.7.1", + "botbuilder": "^4.8.0", "googleapis": "^34.0.0", - "botkit": "^4.6.2", + "botkit": "^4.8.0", "debug": "^4.1.0" }, "devDependencies": { diff --git a/packages/botbuilder-adapter-slack/CHANGELOG.md b/packages/botbuilder-adapter-slack/CHANGELOG.md index 0c603918a..001f8cf0e 100644 --- a/packages/botbuilder-adapter-slack/CHANGELOG.md +++ b/packages/botbuilder-adapter-slack/CHANGELOG.md @@ -1,5 +1,11 @@ # botbuilder-adapter-slack changelog +# 1.0.9 + +* Update @slack/web-api to 5.8.0 +* Add `oauthVersion` parameter to constructor. If set to `v2`, oauth features will use Slack's latest auth functions and urls. [More info](readme.md#using-slacks-v2-oauth) +* Make `authed_users` field available. [Fix for #1911](https://github.com/howdyai/botkit/issues/1911) + # 1.0.8 * Update @slack/web-api to 5.7.0 which includes access to new Oauth features (see [#1890](https://github.com/howdyai/botkit/pull/1890)) diff --git a/packages/botbuilder-adapter-slack/package.json b/packages/botbuilder-adapter-slack/package.json index 193cc6a25..00a4ab08e 100644 --- a/packages/botbuilder-adapter-slack/package.json +++ b/packages/botbuilder-adapter-slack/package.json @@ -1,6 +1,6 @@ { "name": "botbuilder-adapter-slack", - "version": "1.0.8", + "version": "1.0.9", "description": "Connect Botkit or BotBuilder to Slack", "main": "./lib/index.js", "typings": "./lib/index.d.ts", @@ -33,9 +33,9 @@ "url": "https://github.com/howdyai/botkit.git" }, "dependencies": { - "@slack/web-api": "^5.7.0", - "botbuilder": "^4.7.1", - "botkit": "^4.6.2", + "@slack/web-api": "^5.8.0", + "botbuilder": "^4.8.0", + "botkit": "^4.8.0", "debug": "^4.1.0" }, "devDependencies": { diff --git a/packages/botbuilder-adapter-slack/readme.md b/packages/botbuilder-adapter-slack/readme.md index 290e1f275..196419de0 100644 --- a/packages/botbuilder-adapter-slack/readme.md +++ b/packages/botbuilder-adapter-slack/readme.md @@ -98,8 +98,9 @@ const adapter = new SlackAdapter({ clientSigningSecret: process.env.SLACK_SECRET, clientId: process.env.CLIENTID, // oauth client id clientSecret: process.env.CLIENTSECRET, // oauth client secret - scopes: ['bot'], // oauth scopes requested + scopes: ['bot'], // oauth scopes requested, 'bot' deprecated by Slack in favor of granular permissions redirectUri: process.env.REDIRECT_URI, // url to redirect post-login + oauthVersion: 'v1', // or use v2 getTokenForTeam: async(team_id) => { // load the token for this team // as captured during oauth @@ -123,9 +124,9 @@ controller.webserver.get('/install/auth', (req, res) => { const results = await controller.adapter.validateOauthCode(req.query.code); // Store token by team in bot state. - let team = results.team_id; - let token = results.bot.bot_access_token; - let userId = results.bot.bot_user_id; + let team = results.team_id; // results.team.id in oauth v2 + let token = results.bot.bot_access_token; // results.access_token in oauth v2 + let userId = results.bot.bot_user_id; // results.bot_user_id in oauth v2 // Securely store the token and usedId so that they can be retrieved later by the team id. // ... @@ -142,6 +143,23 @@ controller.webserver.get('/install/auth', (req, res) => { }); ``` +### Using Slack's v2 OAuth + +To use Slack's [newer "granular scopes"](https://api.slack.com/authentication/oauth-v2), specify `oauthVersion: 'v2'` in your adapter configuration. +This will cause the adapter to use the v2 oauth URL and credential validation function. +However, note that the payload returned `validateOauthCode` differs between versions. + +In v1, your bot's token will be located at `results.bot.bot_access_token`, whereas in v2, it will be `results.access_token`. + +In v1, your bot's user id will be at `results.bot.bot_user_id`, whereas in v2 it will be `results.bot_user_id`. + +From Slack's official docs: + +* [V1 response payload](https://api.slack.com/methods/oauth.access#response) +* [V2 response payload](https://api.slack.com/methods/oauth.v2.access#response) + +Take care to update your auth handler function when you migrate to granular scopes. + ## Class Reference * [SlackAdapter](../docs/reference/slack.md#slackadapter) diff --git a/packages/botbuilder-adapter-slack/src/botworker.ts b/packages/botbuilder-adapter-slack/src/botworker.ts index ada270e83..00f0cd269 100644 --- a/packages/botbuilder-adapter-slack/src/botworker.ts +++ b/packages/botbuilder-adapter-slack/src/botworker.ts @@ -268,7 +268,7 @@ export class SlackBotWorker extends BotWorker { msg.conversation.thread_ts = src.incoming_message.channelData.thread_ts; } - msg = this.controller.adapter.activityToSlack(msg); + msg = this.getConfig('context').adapter.activityToSlack(msg); const requestOptions = { uri: src.incoming_message.channelData.response_url, @@ -336,7 +336,7 @@ export class SlackBotWorker extends BotWorker { * @param update An object in the form `{id: , conversation: { id: }, text: , card: }` */ public async updateMessage(update: Partial): Promise { - return this.controller.adapter.updateActivity( + return this.getConfig('context').adapter.updateActivity( this.getConfig('context'), update ); @@ -356,7 +356,7 @@ export class SlackBotWorker extends BotWorker { * @param update An object in the form of `{id: , conversation: { id: }}` */ public async deleteMessage(update: Partial): Promise { - return this.controller.adapter.deleteActivity( + return this.getConfig('context').adapter.deleteActivity( this.getConfig('context'), { activityId: update.id, diff --git a/packages/botbuilder-adapter-slack/src/slack_adapter.ts b/packages/botbuilder-adapter-slack/src/slack_adapter.ts index f995ea98d..1ebfeab4f 100644 --- a/packages/botbuilder-adapter-slack/src/slack_adapter.ts +++ b/packages/botbuilder-adapter-slack/src/slack_adapter.ts @@ -85,6 +85,7 @@ export class SlackAdapter extends BotAdapter { * clientId: process.env.CLIENT_ID, // oauth client id * clientSecret: process.env.CLIENT_SECRET, // oauth client secret * scopes: ['bot'], // oauth scopes requested + * oauthVersion: 'v1', * redirectUri: process.env.REDIRECT_URI, // url to redirect post login defaults to `https:///install/auth` * getTokenForTeam: async(team_id) => Promise, // function that returns a token based on team id * getBotUserByTeam: async(team_id) => Promise, // function that returns a bot's user id based on team id @@ -151,6 +152,11 @@ export class SlackAdapter extends BotAdapter { debug('** Slack adapter running in multi-team mode.'); } + if (!this.options.oauthVersion) { + this.options.oauthVersion = 'v1'; + } + this.options.oauthVersion = this.options.oauthVersion.toLowerCase(); + if (this.options.enable_incomplete) { const warning = [ '', @@ -242,9 +248,13 @@ export class SlackAdapter extends BotAdapter { * @returns A url pointing to the first step in Slack's oauth flow. */ public getInstallLink(): string { + let redirect = ''; if (this.options.clientId && this.options.scopes) { - let redirect = 'https://slack.com/oauth/authorize?client_id=' + this.options.clientId + '&scope=' + this.options.scopes.join(','); - + if (this.options.oauthVersion === 'v2') { + redirect = 'https://slack.com/oauth/v2/authorize?client_id=' + this.options.clientId + '&scope=' + this.options.scopes.join(','); + } else { + redirect = 'https://slack.com/oauth/authorize?client_id=' + this.options.clientId + '&scope=' + this.options.scopes.join(','); + } if (this.options.redirectUri) { redirect += '&redirect_uri=' + encodeURIComponent(this.options.redirectUri); } @@ -256,7 +266,7 @@ export class SlackAdapter extends BotAdapter { } /** - * Validates an oauth code sent by Slack during the install process. + * Validates an oauth v2 code sent by Slack during the install process. * * An example using Botkit's internal webserver to configure the /install/auth route: * @@ -265,9 +275,9 @@ export class SlackAdapter extends BotAdapter { * try { * const results = await controller.adapter.validateOauthCode(req.query.code); * // make sure to capture the token and bot user id by team id... - * const team_id = results.team_id; - * const token = results.bot.bot_access_token; - * const bot_user = results.bot.bot_user_id; + * const team_id = results.team.id; + * const token = results.access_token; + * const bot_user = results.bot_user_id; * // store these values in a way they'll be retrievable with getBotUserByTeam and getTokenForTeam * } catch (err) { * console.error('OAUTH ERROR:', err); @@ -280,12 +290,18 @@ export class SlackAdapter extends BotAdapter { */ public async validateOauthCode(code: string): Promise { const slack = new WebClient(); - const results = await slack.oauth.access({ + const details = { code: code, client_id: this.options.clientId, client_secret: this.options.clientSecret, redirect_uri: this.options.redirectUri - }); + }; + let results: any = {}; + if (this.options.oauthVersion === 'v2') { + results = await slack.oauth.v2.access(details); + } else { + results = await slack.oauth.access(details); + } if (results.ok) { return results; } else { @@ -606,6 +622,9 @@ export class SlackAdapter extends BotAdapter { } } + // Copy over the authed_users + activity.channelData.authed_users = event.authed_users; + // @ts-ignore this complains because of extra fields in conversation activity.recipient.id = await this.getBotUserByTeam(activity as Activity); @@ -723,9 +742,13 @@ export interface SlackAdapterOptions { */ clientSecret?: string; /** - * A an array of scope names that are being requested during the oauth process. Must match the scopes defined at api.slack.com + * A array of scope names that are being requested during the oauth process. Must match the scopes defined at api.slack.com */ scopes?: string[]; + /** + * Which version of Slack's oauth protocol to use, v1 or v2. Defaults to v1. + */ + oauthVersion?: string; /** * The URL users will be redirected to after an oauth flow. In most cases, should be `https:///install/auth` */ diff --git a/packages/botbuilder-adapter-twilio-sms/package.json b/packages/botbuilder-adapter-twilio-sms/package.json index e2a234207..49c08c732 100644 --- a/packages/botbuilder-adapter-twilio-sms/package.json +++ b/packages/botbuilder-adapter-twilio-sms/package.json @@ -1,6 +1,6 @@ { "name": "botbuilder-adapter-twilio-sms", - "version": "1.0.4", + "version": "1.0.5", "description": "Connect Botkit or BotBuilder to Twilio SMS", "main": "./lib/index.js", "typings": "./lib/index.d.ts", @@ -37,8 +37,8 @@ "url": "https://github.com/howdyai/botkit.git" }, "dependencies": { - "botbuilder": "^4.7.1", - "botkit": "^4.6.2", + "botbuilder": "^4.8.0", + "botkit": "^4.8.0", "debug": "^4.1.0", "twilio": "^3.29.2" }, diff --git a/packages/botbuilder-adapter-web/package.json b/packages/botbuilder-adapter-web/package.json index 317941f98..24138f016 100644 --- a/packages/botbuilder-adapter-web/package.json +++ b/packages/botbuilder-adapter-web/package.json @@ -1,6 +1,6 @@ { "name": "botbuilder-adapter-web", - "version": "1.0.6", + "version": "1.0.7", "description": "Connect Botkit or BotBuilder to the Web", "main": "./lib/index.js", "typings": "./lib/index.d.ts", @@ -35,8 +35,8 @@ "url": "https://github.com/howdyai/botkit.git" }, "dependencies": { - "botkit": "^4.6.2", - "botbuilder": "^4.7.1", + "botkit": "^4.8.0", + "botbuilder": "^4.8.0", "debug": "^4.1.0", "url": "^0.11.0", "ws": "^7.1.1" diff --git a/packages/botbuilder-adapter-webex/CHANGELOG.md b/packages/botbuilder-adapter-webex/CHANGELOG.md index 0797ba6fe..e8be9989a 100644 --- a/packages/botbuilder-adapter-webex/CHANGELOG.md +++ b/packages/botbuilder-adapter-webex/CHANGELOG.md @@ -1,5 +1,11 @@ # botbuilder-adapter-webex changelog +# 1.0.6 + +* Fix issue where empty files field would cause issues. Thanks to [@viveksyngh](https://github.com/viveksyngh) - [PR #1906](https://github.com/howdyai/botkit/pull/1906) +* Update to latest Webex API client library. + + # 1.0.5 * Update to latest Webex API client library. diff --git a/packages/botbuilder-adapter-webex/package.json b/packages/botbuilder-adapter-webex/package.json index 73e7493f8..9eb31d0c7 100644 --- a/packages/botbuilder-adapter-webex/package.json +++ b/packages/botbuilder-adapter-webex/package.json @@ -1,6 +1,6 @@ { "name": "botbuilder-adapter-webex", - "version": "1.0.5", + "version": "1.0.7", "description": "Connect Botkit or BotBuilder to Webex Teams", "main": "./lib/index.js", "typings": "./lib/index.d.ts", @@ -33,11 +33,11 @@ "url": "https://github.com/howdyai/botkit.git" }, "dependencies": { - "botbuilder": "^4.7.1", - "botkit": "^4.6.2", + "botbuilder": "^4.8.0", + "botkit": "^4.8.0", "debug": "^4.1.0", "url": "^0.11.0", - "webex": "^1.80.36" + "webex": "^1.80.148" }, "devDependencies": { "eslint": "^6.8.0", diff --git a/packages/botbuilder-adapter-webex/src/webex_adapter.ts b/packages/botbuilder-adapter-webex/src/webex_adapter.ts index b69d81fe7..a1074ab01 100644 --- a/packages/botbuilder-adapter-webex/src/webex_adapter.ts +++ b/packages/botbuilder-adapter-webex/src/webex_adapter.ts @@ -176,7 +176,7 @@ export class WebexAdapter extends BotAdapter { // Botkit Plugin additions this.middlewares = { spawn: [ - async (bot, next) => { + async (bot, next): Promise => { // make webex api directly available on a botkit instance. bot.api = this._api; @@ -366,13 +366,14 @@ export class WebexAdapter extends BotAdapter { for (let a = 0; a < activities.length; a++) { const activity = activities[a]; if (activity.type === ActivityTypes.Message) { - // debug('OUTGOING ACTIVITY', activity); + debug('OUTGOING ACTIVITY', activity); // transform activity into the webex message format // https://developer.webex.com/docs/api/v1/messages/create-a-message - const message: any = { - files: activity.channelData ? activity.channelData.files : '' - }; + const message: any = {}; + if (activity.channelData && activity.channelData.files) { + message.files = activity.channelData.files; + } if (activity.text) { message.text = activity.text; } diff --git a/packages/botkit-plugin-cms/package.json b/packages/botkit-plugin-cms/package.json index 60fa4cbab..a6b741553 100644 --- a/packages/botkit-plugin-cms/package.json +++ b/packages/botkit-plugin-cms/package.json @@ -28,7 +28,7 @@ "url": "https://github.com/howdyai/botkit.git" }, "dependencies": { - "botkit": "^4.6.2", + "botkit": "^4.8.0", "debug": "^4.1.0" }, "devDependencies": { diff --git a/packages/botkit/package.json b/packages/botkit/package.json index c9356eaf4..efe86d607 100644 --- a/packages/botkit/package.json +++ b/packages/botkit/package.json @@ -1,6 +1,6 @@ { "name": "botkit", - "version": "4.6.2", + "version": "4.8.0", "description": "Building Blocks for Building Bots", "main": "lib/index.js", "typings": "./lib/index.d.ts", @@ -31,18 +31,18 @@ "url": "https://github.com/howdyai/botkit.git" }, "dependencies": { - "body-parser": "^1.18.3", - "botbuilder": "^4.7.1", - "botbuilder-dialogs": "^4.7.1", - "botframework-connector": "^4.7.1", + "body-parser": "^1.19.0", + "botbuilder": "^4.8.0", + "botbuilder-dialogs": "^4.8.0", + "botframework-connector": "^4.8.0", "debug": "^4.1.0", - "express": "^4.16.4", - "mustache": "^3.0.1", + "express": "^4.17.1", + "mustache": "^4.0.1", "path": "^0.12.7", "request": "^2.88.0", "ware": "^1.3.0" }, - "devDependencies": { + "devDependencies": { "@types/debug": "^4.1.5", "@types/express": "^4.17.2", "@types/node": "^10.17.5", diff --git a/packages/botkit/src/botworker.ts b/packages/botkit/src/botworker.ts index 4f0eb4f36..62c2b8cc0 100644 --- a/packages/botkit/src/botworker.ts +++ b/packages/botkit/src/botworker.ts @@ -7,7 +7,7 @@ */ import { Botkit, BotkitMessage } from './core'; import { Activity, ConversationAccount, ConversationReference, ConversationParameters, TurnContext } from 'botbuilder'; -import { DialogTurnResult } from 'botbuilder-dialogs'; +import { DialogTurnResult, Dialog } from 'botbuilder-dialogs'; /** * A base class for a `bot` instance, an object that contains the information and functionality for taking action in response to an incoming message. @@ -175,6 +175,34 @@ export class BotWorker { } } + /** + * Get a reference to the active dialog + * @returns a reference to the active dialog or undefined if no dialog is active + */ + public getActiveDialog(): Dialog | undefined { + return this.getConfig('dialogContext').activeDialog; + } + + /** + * Check if any dialog is active or not + * @returns true if there is an active dialog, otherwise false + */ + public hasActiveDialog(): boolean { + return !!this.getActiveDialog(); + } + + /** + * Check to see if a given dialog is currently active in the stack + * @param id The id of a dialog to look for in the dialog stack + * @returns true if dialog with id is located anywhere in the dialog stack + */ + public isDialogActive(id: string): boolean { + if (this.getConfig('dialogContext').stack.length) { + return (this.getConfig('dialogContext').stack.filter((d) => d.id === id).length > 0); + } + return false; + } + /** * Replace any active dialogs with a new a pre-defined dialog by specifying its id. The dialog will be started in the same context (same user, same channel) in which the original incoming message was received. * [See "Using Dialogs" in the core documentation.](../index.md#using-dialogs) @@ -231,7 +259,7 @@ export class BotWorker { ); // create a turn context - const turnContext = new TurnContext(this._controller.adapter, activity as Activity); + const turnContext = new TurnContext(this.getConfig('context').adapter, activity as Activity); // create a new dialogContext so beginDialog works. const dialogContext = await this._controller.dialogSet.createContext(turnContext); @@ -250,7 +278,7 @@ export class BotWorker { // Create conversation const parameters: ConversationParameters = { bot: reference.bot, members: [reference.user], isGroup: false, activity: null, channelData: null }; - const client = this.controller.adapter.createConnectorClient(reference.serviceUrl); + const client = this.getConfig('context').adapter.createConnectorClient(reference.serviceUrl); // Mix in the tenant ID if specified. This is required for MS Teams. if (reference.conversation && reference.conversation.tenantId) { @@ -271,7 +299,9 @@ export class BotWorker { ); const conversation: ConversationAccount = { - id: response.id, + // fallback to existing conversation id because Emulator will respond without a response.id AND needs to stay in same channel. + // This should be fixed by Emulator. https://github.com/microsoft/BotFramework-Emulator/issues/2097 + id: response.id || reference.conversation.id, isGroup: false, conversationType: null, tenantId: null, @@ -282,7 +312,7 @@ export class BotWorker { if (response.serviceUrl) { request.serviceUrl = response.serviceUrl; } // Create context and run middleware - const turnContext: TurnContext = this.controller.adapter.createContext(request); + const turnContext: TurnContext = this.getConfig('context').adapter.createContext(request); // create a new dialogContext so beginDialog works. const dialogContext = await this._controller.dialogSet.createContext(turnContext); diff --git a/packages/botkit/src/conversation.ts b/packages/botkit/src/conversation.ts index b5d5e5ce7..f6af3b9b5 100644 --- a/packages/botkit/src/conversation.ts +++ b/packages/botkit/src/conversation.ts @@ -5,11 +5,11 @@ * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. */ -import { Botkit } from './core'; +import { Botkit, BotkitMessage } from './core'; import { BotWorker } from './botworker'; import { BotkitDialogWrapper } from './dialogWrapper'; -import { ActivityTypes, TurnContext, MessageFactory, ActionTypes } from 'botbuilder'; -import { Dialog, DialogContext, DialogReason, TextPrompt, DialogTurnStatus } from 'botbuilder-dialogs'; +import { Activity, ActivityTypes, TurnContext, MessageFactory, ActionTypes } from 'botbuilder'; +import { Dialog, DialogContext, DialogReason, PromptValidatorContext, ActivityPrompt, DialogTurnStatus } from 'botbuilder-dialogs'; import * as mustache from 'mustache'; import * as Debug from 'debug'; @@ -19,7 +19,7 @@ const debug = Debug('botkit:conversation'); * Definition of the handler functions used to handle .ask and .addQuestion conditions */ interface BotkitConvoHandler { - (answer: string, convo: BotkitDialogWrapper, bot: BotWorker): Promise; + (answer: string, convo: BotkitDialogWrapper, bot: BotWorker, message: BotkitMessage): Promise; } /** @@ -142,7 +142,10 @@ export class BotkitConversation extends Dialog { // Make sure there is a prompt we can use. // TODO: maybe this ends up being managed by Botkit this._prompt = this.id + '_default_prompt'; - this._controller.dialogSet.add(new TextPrompt(this._prompt)); + this._controller.dialogSet.add(new ActivityPrompt( + this._prompt, + (prompt: PromptValidatorContext) => Promise.resolve(prompt.recognized.succeeded === true) + )); return this; } @@ -303,7 +306,7 @@ export class BotkitConversation extends Dialog { * [Learn more about building conversations →](../conversations.md#build-a-conversation) * ```javascript * // ask a question, handle the response with a function - * convo.ask('What is your name?', async(response, convo, bot) => { + * convo.ask('What is your name?', async(response, convo, bot, full_message) => { * await bot.say('Oh your name is ' + response); * }, {key: 'name'}); * @@ -312,20 +315,20 @@ export class BotkitConversation extends Dialog { * { * pattern: 'yes', * type: 'string', - * handler: async(response, convo, bot) => { + * handler: async(response_text, convo, bot, full_message) => { * return await convo.gotoThread('yes_taco'); * } * }, * { * pattern: 'no', * type: 'string', - * handler: async(response, convo, bot) => { + * handler: async(response_text, convo, bot, full_message) => { * return await convo.gotoThread('no_taco'); * } - * },s + * }, * { * default: true, - * handler: async(response, convo, bot) => { + * handler: async(response_text, convo, bot, full_message) => { * await bot.say('I do not understand your response!'); * // start over! * return await convo.repeat(); @@ -391,6 +394,9 @@ export class BotkitConversation extends Dialog { this.script[thread_name].push(message); + // add a null message where the handlers for the previous message will fire. + this.script[thread_name].push({ action: 'next' }); + return this; } @@ -477,7 +483,6 @@ export class BotkitConversation extends Dialog { const bot = await this._controller.spawn(context); for (let h = 0; h < this._afterHooks.length; h++) { const handler = this._afterHooks[h]; - await handler.call(this, results, bot); } } @@ -525,7 +530,6 @@ export class BotkitConversation extends Dialog { for (let h = 0; h < this._changeHooks[variable].length; h++) { const handler = this._changeHooks[variable][h]; - // await handler.call(this, value, convo); await handler.call(this, value, convo, bot); } } @@ -559,7 +563,7 @@ export class BotkitConversation extends Dialog { } // Run next step with the message text as the result. - return await this.resumeDialog(dc, DialogReason.continueCalled, dc.context.activity.text); + return await this.resumeDialog(dc, DialogReason.continueCalled, dc.context.activity); } /** @@ -652,7 +656,6 @@ export class BotkitConversation extends Dialog { } const res = await this.handleAction(path, dc, step); - if (res !== false) { return res; } @@ -679,8 +682,8 @@ export class BotkitConversation extends Dialog { await dc.context.sendActivity(`Failed to start prompt ${ this._prompt }`); return await step.next(); } - // If there's nothing but text, send it! - // This could be extended to include cards and other activity attributes. + // If there's nothing but text, send it! + // This could be extended to include cards and other activity attributes. } else { // if there is text, attachments, or any channel data fields at all... if (line.type || line.text || line.attachments || line.attachment || line.blocks || (line.channelData && Object.keys(line.channelData).length)) { @@ -690,6 +693,7 @@ export class BotkitConversation extends Dialog { } if (line.action) { + const res = await this.handleAction(line, dc, step); if (res !== false) { return res; @@ -717,7 +721,6 @@ export class BotkitConversation extends Dialog { const state = dc.activeDialog.state; state.stepIndex = index; state.thread = thread_name; - // Create step context const nextCalled = false; const step = { @@ -727,13 +730,13 @@ export class BotkitConversation extends Dialog { state: state, options: state.options, reason: reason, - result: result, + result: result && result.text ? result.text : result, + resultObject: result, values: state.values, next: async (stepResult): Promise => { if (nextCalled) { throw new Error(`ScriptedStepContext.next(): method already called for dialog and step '${ this.id }[${ index }]'.`); } - return await this.resumeDialog(dc, DialogReason.nextCalled, stepResult); } }; @@ -808,7 +811,7 @@ export class BotkitConversation extends Dialog { outgoing.channelData = outgoing.channelData ? outgoing.channelData : {}; if (line.attachmentLayout) { - outgoing.attachmentLayout = line.attachmentLayout; + outgoing.attachmentLayout = line.attachmentLayout; } /*******************************************************************************************************************/ // allow dynamic generation of quick replies and/or attachments @@ -855,7 +858,7 @@ export class BotkitConversation extends Dialog { // copy all the values in channelData fields for (const key in line.channelData) { - outgoing.channelData[key] = JSON.parse(JSON.stringify(line.channelData[key])); + outgoing.channelData = this.parseTemplatesRecursive(JSON.parse(JSON.stringify(line.channelData)), vars) } /*******************************************************************************************************************/ @@ -958,6 +961,8 @@ export class BotkitConversation extends Dialog { if (path.handler) { const index = step.index; const thread_name = step.thread; + const result = step.result; + const response = result.text || (typeof (result) === 'string' ? result : null); // spawn a bot instance so devs can use API or other stuff as necessary const bot = await this._controller.spawn(dc); @@ -965,11 +970,19 @@ export class BotkitConversation extends Dialog { // create a convo controller object const convo = new BotkitDialogWrapper(dc, step); - await path.handler.call(this, step.result, convo, bot); + const activedialog = dc.activeDialog.id; + + await path.handler.call(this, response, convo, bot, dc.context.turnState.get('botkitMessage') || dc.context.activity); if (!dc.activeDialog) { return false; } + + // did we change dialogs? if so, return an endofturn because the new dialog has taken over. + if (activedialog !== dc.activeDialog.id) { + return Dialog.EndOfTurn; + } + // did we just change threads? if so, restart this turn if (index !== step.index || thread_name !== step.thread) { return await this.runStep(dc, step.index, step.thread, DialogReason.nextCalled, null); diff --git a/packages/botkit/src/conversationState.ts b/packages/botkit/src/conversationState.ts index 9a7901ef7..dcfa5ba9f 100644 --- a/packages/botkit/src/conversationState.ts +++ b/packages/botkit/src/conversationState.ts @@ -24,7 +24,7 @@ export class BotkitConversationState extends ConversationState { // create a combo key by sorting all the fields in the conversation address and combining them all // mix in user id as well, because conversations are between the bot and a single user - const conversationId: string = Object.keys(activity.conversation).sort().map((key) => activity.conversation[key]).filter((val) => val !== '' && val !== null && typeof val !== 'undefined').join('-') + '-' + activity.from.id; + const conversationId: string = Object.keys(activity.conversation).filter((key) => { return key !== 'properties'; }).sort().map((key) => activity.conversation[key]).filter((val) => val !== '' && val !== null && typeof val !== 'undefined').join('-') + '-' + activity.from.id; if (!channelId) { throw new Error('missing activity.channelId'); diff --git a/packages/botkit/src/core.ts b/packages/botkit/src/core.ts index 21d8b8cb6..a9245406d 100644 --- a/packages/botkit/src/core.ts +++ b/packages/botkit/src/core.ts @@ -5,7 +5,7 @@ * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. */ -import { Activity, MemoryStorage, Storage, ConversationReference, TurnContext } from 'botbuilder'; +import { Activity, MemoryStorage, Storage, ConversationReference, TurnContext, BotAdapter } from 'botbuilder'; import { Dialog, DialogContext, DialogSet, DialogTurnStatus, WaterfallDialog } from 'botbuilder-dialogs'; import { BotkitBotFrameworkAdapter } from './adapter'; import { BotWorker } from './botworker'; @@ -698,14 +698,9 @@ export class Botkit { public async handleTurn(turnContext: TurnContext): Promise { debug('INCOMING ACTIVITY:', turnContext.activity); - // Create a dialog context - const dialogContext = await this.dialogSet.createContext(turnContext); - - // Spawn a bot worker with the dialogContext - const bot = await this.spawn(dialogContext); - // Turn this turnContext into a Botkit message. const message: BotkitMessage = { + // ...turnContext.activity, ...turnContext.activity.channelData, // start with all the fields that were in the original incoming payload. NOTE: this is a shallow copy, is that a problem? // if Botkit has further classified this message, use that sub-type rather than the Activity type @@ -729,6 +724,15 @@ export class Botkit { incoming_message: turnContext.activity }; + // Stash the Botkit message in + turnContext.turnState.set('botkitMessage', message); + + // Create a dialog context + const dialogContext = await this.dialogSet.createContext(turnContext); + + // Spawn a bot worker with the dialogContext + const bot = await this.spawn(dialogContext); + return new Promise((resolve, reject) => { this.middleware.ingest.run(bot, message, async (err, bot, message) => { if (err) { @@ -1053,8 +1057,9 @@ export class Botkit { * The spawned `bot` contains all information required to process outbound messages and handle dialog state, and may also contain extensions * for handling platform-specific events or activities. * @param config {any} Preferably receives a DialogContext, though can also receive a TurnContext. If excluded, must call `bot.changeContext(reference)` before calling any other method. + * @param adapter {BotAdapter} An optional reference to a specific adapter from which the bot will be spawned. If not specified, will use the adapter from which the configuration object originates. Required for spawning proactive bots in a multi-adapter scenario. */ - public async spawn(config?: any): Promise { + public async spawn(config?: any, custom_adapter?: BotAdapter): Promise { if (config instanceof TurnContext) { config = { dialogContext: await this.dialogSet.createContext(config as TurnContext), @@ -1072,8 +1077,9 @@ export class Botkit { } let worker: BotWorker = null; - if (this.adapter.botkit_worker) { - const CustomBotWorker = this.adapter.botkit_worker; + const adapter = custom_adapter || config.context.adapter || this.adapter; + if (adapter.botkit_worker) { + const CustomBotWorker = adapter.botkit_worker; worker = new CustomBotWorker(this, config); } else { worker = new BotWorker(this, config); @@ -1166,7 +1172,6 @@ export class Botkit { const bot = await this.spawn(step.context); await this.trigger(dialog.id + ':after', bot, step.result); - return step.endDialog(step.result); } ])); diff --git a/packages/botkit/src/testClient.ts b/packages/botkit/src/testClient.ts index c270942cc..41bc10b29 100644 --- a/packages/botkit/src/testClient.ts +++ b/packages/botkit/src/testClient.ts @@ -109,7 +109,6 @@ export class BotkitTestClient { return async (turnContext: TurnContext): Promise => { const dialogSet = new DialogSet(dialogState); targetDialogs.forEach(targetDialog => dialogSet.add(targetDialog)); - const dialogContext = await dialogSet.createContext(turnContext); this.dialogTurnResult = await dialogContext.continueDialog(); if (this.dialogTurnResult.status === DialogTurnStatus.empty) { diff --git a/packages/botkit/tests/Dialog.tests.js b/packages/botkit/tests/Dialog.tests.js index 16851b1b5..5c68d9741 100644 --- a/packages/botkit/tests/Dialog.tests.js +++ b/packages/botkit/tests/Dialog.tests.js @@ -1,4 +1,5 @@ const assert = require('assert'); +const { ActivityTypes } = require('botbuilder'); const { Botkit, BotkitTestClient, BotkitConversation } = require('../'); let bot; @@ -25,7 +26,7 @@ describe('Botkit dialog', function() { text: 'say repeat' }, [{ pattern: 'repeat', - handler: async (val, convo, bot) => { + handler: async (val, convo, bot, message) => { await convo.repeat(); } }, { @@ -78,7 +79,7 @@ describe('Botkit dialog', function() { // botConvo.say('ok'); botConvo.ask({ - text: ['what is your last name'] + text: ['what is your last name{{vars.count}}'] } , [ { @@ -92,6 +93,13 @@ describe('Botkit dialog', function() { handler: async (answer, convo, bot) => { await bot.say('name not recognized, say another name'); + let count = convo.vars.count; + if (!count) { + count = 1; + } else { + count++; + } + convo.setVar('count', count)/ await convo.repeat(); } } @@ -119,13 +127,13 @@ describe('Botkit dialog', function() { assert(reply4.text === 'name not recognized, say another name', 'did not get invalid error 1'); const reply5 = await client.getNextReply(); - assert(reply5.text === 'what is your last name', 'did not get reprompt'); + assert(reply5.text === 'what is your last name1', 'did not get reprompt'); const reply6 = await client.sendActivity('brown'); assert(reply6.text === 'name not recognized, say another name', 'did not get invalid error 2'); const reply8 = await client.getNextReply(); - assert(reply8.text === 'what is your last name', 'did not get reprompt'); + assert(reply8.text === 'what is your last name2', 'did not get reprompt'); const reply9 = await client.sendActivity('smith'); assert(reply9.text === 'I like the name smith', 'did not get final confirm'); @@ -191,7 +199,7 @@ describe('Botkit dialog', function() { assert(reply.text == 'ok', 'wrong reply'); const reply2 = await client.getNextReply(); - assert(reply2.text == 'got it.', 'wrong reply 2'); + assert(reply2.text == 'got it.', 'wrong reply 2 in addChildDialog test'); }); it('should work with call to addGotoDialog', async function() { @@ -222,9 +230,41 @@ describe('Botkit dialog', function() { assert(reply.text == 'ok', 'wrong reply'); const reply2 = await client.getNextReply(); - assert(reply2 == null, 'wrong reply 2'); + assert(reply2 == null, 'wrong reply 2 in addGotoDialog test'); }); + it('should work with call to beginDialog in handler', async function() { + const botConvo = new BotkitConversation('testConvo', bot); + botConvo.ask('What is your name?', async (response, convo, bot) => { + await bot.beginDialog('testConvo2'); + }, 'name'); + botConvo.say('got it.'); + bot.addDialog(botConvo); + + const botConvo2 = new BotkitConversation('testConvo2', bot); + botConvo2.ask('What is your favorite color?', async (response, convo, bot) => { + // noop + }, 'color'); + botConvo2.say('ok you said {{vars.color}}'); + bot.addDialog(botConvo2); + + // set up a test client + const client = new BotkitTestClient('test', bot, ['testConvo', 'testConvo2']); + + const prompt = await client.sendActivity('..'); + assert(prompt.text === 'What is your name?', 'wrong prompt 1'); + + const prompt2 = await client.sendActivity('ben'); + assert(prompt2.text === 'What is your favorite color?', 'wrong prompt 2'); + + const reply = await client.sendActivity('black'); + assert(reply.text === 'ok you said black', 'wrong reply'); + + const reply2 = await client.getNextReply(); + assert(reply2.text === 'got it.', 'wrong reply 2 in beginDialog test'); + }); + + it('should navigate threads', async function() { // test all the ways threads are triggered // convo.gotoThread inside an ask @@ -543,7 +583,98 @@ describe('Botkit dialog', function() { assert(after_fired === true, 'after fired after stop'); }); + + it('should call handlers for addQuestion and ask with entire message payload', async () => { + const conversation = new BotkitConversation('nameConvo', bot); + + let correct1 = false; + let correct2 = false; + let correct3 = false; + let correct4 = false; + let correct5 = false; + + conversation.ask( + 'First name?', + async (response, convo, bot, message) => { + correct1 = message.type === ActivityTypes.Message && message.text === 'Tony' && response === message.text; + convo.gotoThread('last_name'); + }, + 'firstName' + ); + conversation.addQuestion( + 'Last name?', + async (response, convo, bot, message) => { + correct2 = message.type === ActivityTypes.Message && message.text === 'Stark' && response === message.text; + convo.gotoThread('address'); + }, + 'lastName', + 'last_name' + ); + + conversation.addQuestion( + 'Address?', + async (response, convo, bot, message) => { + correct3 = message.type === ActivityTypes.Message && + message.text === '10880 Malibu Point, 90265, Malibu, California' && + response === message.text; + convo.gotoThread('color'); + }, + 'address', + 'address' + ); + conversation.addQuestion( + 'Favourite Color?', + [ + { + default: true, + handler: async (response, convo, bot, message) => { + correct4 = message.type === ActivityTypes.Message && response === message.text; + await convo.repeat(); + } + }, + { + pattern: 'Red', + handler: async (response, convo, bot, message) => { + correct5 = message.type === ActivityTypes.Message && + message.text === 'Red' && response === message.text; + await convo.stop(); + } + } + ], + 'color', + 'color' + ); + + bot.addDialog(conversation); + + // set up a test client + const client = new BotkitTestClient('test', bot, ['nameConvo']); + + let msg = await client.sendActivity('..'); + assert(msg.text === 'First name?', 'first prompt wrong'); + + msg = await client.sendActivity('Tony'); + assert(msg.text === 'Last name?', 'second prompt wrong'); + + msg = await client.sendActivity('Stark'); + assert(msg.text === 'Address?', 'third prompt wrong'); + + msg = await client.sendActivity('10880 Malibu Point, 90265, Malibu, California'); + assert(msg.text === 'Favourite Color?', 'fourth prompt wrong'); + + msg = await client.sendActivity('Black'); + assert(msg.text === 'Favourite Color?', 'repeat prompt wrong'); + + msg = await client.sendActivity('Red'); + + assert(correct1, 'message text not correct for prompt1'); + assert(correct2, 'message text not correct for prompt2'); + assert(correct3, 'message text not correct for prompt3'); + assert(correct4, 'message text not correct for prompt4'); + assert(correct5, 'message text not correct for prompt5'); + }); + afterEach(async () => { await bot.shutdown(); }); -}); +}); \ No newline at end of file diff --git a/packages/botkit/tests/State.tests.js b/packages/botkit/tests/State.tests.js new file mode 100644 index 000000000..081e3c0f6 --- /dev/null +++ b/packages/botkit/tests/State.tests.js @@ -0,0 +1,56 @@ +const assert = require('assert'); +const { BotkitConversationState } = require('../lib/conversationState'); +const { MemoryStorage } = require('botbuilder'); + +const storage = new MemoryStorage(); +const state = new BotkitConversationState(storage); + +describe('BotkitConversationState', function() { + it('should generate appropriate state key', function() { + const key = state.getStorageKey({ + activity: { + channelId: 'test', + from: { + id: 'foo' + }, + conversation: { + id: 'bar' + } + } + }); + assert(key === 'test/conversations/bar-foo/', 'failed key gen'); + }); + it('should generate appropriate state key excluding properties field', function() { + const key = state.getStorageKey({ + activity: { + channelId: 'test', + from: { + id: 'foo' + }, + conversation: { + properties: { + baz: true + }, + id: 'bar' + } + } + }); + assert(key === 'test/conversations/bar-foo/', 'failed key gen'); + }); + it('should generate appropriate state key including platform field', function() { + const key = state.getStorageKey({ + activity: { + channelId: 'test', + from: { + id: 'foo' + }, + conversation: { + threadId: '5', + channel: '9', + id: 'bar' + } + } + }); + assert(key === 'test/conversations/9-bar-5-foo/', 'failed key gen'); + }); +}); diff --git a/packages/docs/index.json b/packages/docs/index.json index aed60f0f6..2a6d40e9a 100644 --- a/packages/docs/index.json +++ b/packages/docs/index.json @@ -6,7 +6,7 @@ "path": "reference/core.md", "classes": [ { - "id": 119, + "id": 126, "name": "Botkit", "kind": 128, "kindString": "Class", @@ -19,7 +19,7 @@ }, "children": [ { - "id": 133, + "id": 140, "name": "constructor", "kind": 512, "kindString": "Constructor", @@ -34,7 +34,7 @@ }, "signatures": [ { - "id": 134, + "id": 141, "name": "new Botkit", "kind": 16384, "kindString": "Constructor signature", @@ -47,7 +47,7 @@ }, "parameters": [ { - "id": 135, + "id": 142, "name": "config", "kind": 32768, "kindString": "Parameter", @@ -59,14 +59,14 @@ }, "type": { "type": "reference", - "id": 73, + "id": 80, "name": "BotkitConfiguration" } } ], "type": { "type": "reference", - "id": 119, + "id": 126, "name": "Botkit" } } @@ -80,7 +80,7 @@ ] }, { - "id": 132, + "id": 139, "name": "PATH", "kind": 1024, "kindString": "Property", @@ -105,7 +105,7 @@ } }, { - "id": 130, + "id": 137, "name": "adapter", "kind": 1024, "kindString": "Property", @@ -130,7 +130,7 @@ } }, { - "id": 131, + "id": 138, "name": "dialogSet", "kind": 1024, "kindString": "Property", @@ -155,7 +155,7 @@ } }, { - "id": 129, + "id": 136, "name": "http", "kind": 1024, "kindString": "Property", @@ -180,7 +180,7 @@ } }, { - "id": 127, + "id": 134, "name": "storage", "kind": 1024, "kindString": "Property", @@ -205,7 +205,7 @@ } }, { - "id": 120, + "id": 127, "name": "version", "kind": 1024, "kindString": "Property", @@ -231,7 +231,7 @@ "defaultValue": "require('../package.json').version" }, { - "id": 128, + "id": 135, "name": "webserver", "kind": 1024, "kindString": "Property", @@ -256,7 +256,7 @@ } }, { - "id": 151, + "id": 158, "name": "plugins", "kind": 262144, "kindString": "Accessor", @@ -270,7 +270,7 @@ }, "getSignature": [ { - "id": 152, + "id": 159, "name": "__get", "kind": 524288, "kindString": "Get signature", @@ -283,7 +283,7 @@ "type": { "type": "reflection", "declaration": { - "id": 153, + "id": 160, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -292,7 +292,7 @@ }, "indexSignature": [ { - "id": 154, + "id": 161, "name": "__index", "kind": 8192, "kindString": "Index signature", @@ -301,7 +301,7 @@ }, "parameters": [ { - "id": 155, + "id": 162, "name": "key", "kind": 32768, "kindString": "Parameter", @@ -340,7 +340,7 @@ ] }, { - "id": 163, + "id": 170, "name": "addDep", "kind": 2048, "kindString": "Method", @@ -351,7 +351,7 @@ }, "signatures": [ { - "id": 164, + "id": 171, "name": "addDep", "kind": 4096, "kindString": "Call signature", @@ -364,7 +364,7 @@ }, "parameters": [ { - "id": 165, + "id": 172, "name": "name", "kind": 32768, "kindString": "Parameter", @@ -395,7 +395,7 @@ ] }, { - "id": 221, + "id": 229, "name": "addDialog", "kind": 2048, "kindString": "Method", @@ -406,7 +406,7 @@ }, "signatures": [ { - "id": 222, + "id": 230, "name": "addDialog", "kind": 4096, "kindString": "Call signature", @@ -419,7 +419,7 @@ }, "parameters": [ { - "id": 223, + "id": 231, "name": "dialog", "kind": 32768, "kindString": "Parameter", @@ -444,13 +444,13 @@ "sources": [ { "fileName": "core.ts", - "line": 1155, + "line": 1161, "character": 20 } ] }, { - "id": 147, + "id": 154, "name": "addPluginExtension", "kind": 2048, "kindString": "Method", @@ -461,7 +461,7 @@ }, "signatures": [ { - "id": 148, + "id": 155, "name": "addPluginExtension", "kind": 4096, "kindString": "Call signature", @@ -474,7 +474,7 @@ }, "parameters": [ { - "id": 149, + "id": 156, "name": "name", "kind": 32768, "kindString": "Parameter", @@ -490,7 +490,7 @@ } }, { - "id": 150, + "id": 157, "name": "extension", "kind": 32768, "kindString": "Parameter", @@ -521,7 +521,7 @@ ] }, { - "id": 224, + "id": 232, "name": "afterDialog", "kind": 2048, "kindString": "Method", @@ -532,7 +532,7 @@ }, "signatures": [ { - "id": 225, + "id": 233, "name": "afterDialog", "kind": 4096, "kindString": "Call signature", @@ -545,7 +545,7 @@ }, "parameters": [ { - "id": 226, + "id": 234, "name": "dialog", "kind": 32768, "kindString": "Parameter", @@ -570,7 +570,7 @@ } }, { - "id": 227, + "id": 235, "name": "handler", "kind": 32768, "kindString": "Parameter", @@ -582,7 +582,7 @@ }, "type": { "type": "reference", - "id": 96, + "id": 103, "name": "BotkitHandler" } } @@ -596,13 +596,13 @@ "sources": [ { "fileName": "core.ts", - "line": 1183, + "line": 1188, "character": 22 } ] }, { - "id": 166, + "id": 173, "name": "completeDep", "kind": 2048, "kindString": "Method", @@ -613,7 +613,7 @@ }, "signatures": [ { - "id": 167, + "id": 174, "name": "completeDep", "kind": 4096, "kindString": "Call signature", @@ -625,7 +625,7 @@ }, "parameters": [ { - "id": 168, + "id": 175, "name": "name", "kind": 32768, "kindString": "Parameter", @@ -656,7 +656,7 @@ ] }, { - "id": 138, + "id": 145, "name": "getConfig", "kind": 2048, "kindString": "Method", @@ -667,7 +667,7 @@ }, "signatures": [ { - "id": 139, + "id": 146, "name": "getConfig", "kind": 4096, "kindString": "Call signature", @@ -681,7 +681,7 @@ }, "parameters": [ { - "id": 140, + "id": 147, "name": "key", "kind": 32768, "kindString": "Parameter", @@ -713,7 +713,7 @@ ] }, { - "id": 160, + "id": 167, "name": "getLocalView", "kind": 2048, "kindString": "Method", @@ -724,7 +724,7 @@ }, "signatures": [ { - "id": 161, + "id": 168, "name": "getLocalView", "kind": 4096, "kindString": "Call signature", @@ -736,7 +736,7 @@ }, "parameters": [ { - "id": 162, + "id": 169, "name": "path_to_view", "kind": 32768, "kindString": "Parameter", @@ -767,7 +767,7 @@ ] }, { - "id": 174, + "id": 181, "name": "handleTurn", "kind": 2048, "kindString": "Method", @@ -778,7 +778,7 @@ }, "signatures": [ { - "id": 175, + "id": 182, "name": "handleTurn", "kind": 4096, "kindString": "Call signature", @@ -790,7 +790,7 @@ }, "parameters": [ { - "id": 176, + "id": 183, "name": "turnContext", "kind": 32768, "kindString": "Parameter", @@ -827,7 +827,7 @@ ] }, { - "id": 180, + "id": 187, "name": "hears", "kind": 2048, "kindString": "Method", @@ -838,7 +838,7 @@ }, "signatures": [ { - "id": 181, + "id": 188, "name": "hears", "kind": 4096, "kindString": "Call signature", @@ -851,7 +851,7 @@ }, "parameters": [ { - "id": 182, + "id": 189, "name": "patterns", "kind": 32768, "kindString": "Parameter", @@ -880,7 +880,7 @@ { "type": "reflection", "declaration": { - "id": 183, + "id": 190, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -889,7 +889,7 @@ }, "signatures": [ { - "id": 184, + "id": 191, "name": "__call", "kind": 4096, "kindString": "Call signature", @@ -898,7 +898,7 @@ }, "parameters": [ { - "id": 185, + "id": 192, "name": "message", "kind": 32768, "kindString": "Parameter", @@ -907,7 +907,7 @@ }, "type": { "type": "reference", - "id": 86, + "id": 93, "name": "BotkitMessage" } } @@ -940,7 +940,7 @@ { "type": "reflection", "declaration": { - "id": 186, + "id": 193, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -949,7 +949,7 @@ }, "signatures": [ { - "id": 187, + "id": 194, "name": "__call", "kind": 4096, "kindString": "Call signature", @@ -958,7 +958,7 @@ }, "parameters": [ { - "id": 188, + "id": 195, "name": "message", "kind": 32768, "kindString": "Parameter", @@ -967,7 +967,7 @@ }, "type": { "type": "reference", - "id": 86, + "id": 93, "name": "BotkitMessage" } } @@ -987,7 +987,7 @@ "sources": [ { "fileName": "core.ts", - "line": 895, + "line": 899, "character": 115 } ] @@ -997,7 +997,7 @@ } }, { - "id": 189, + "id": 196, "name": "events", "kind": 32768, "kindString": "Parameter", @@ -1025,7 +1025,7 @@ } }, { - "id": 190, + "id": 197, "name": "handler", "kind": 32768, "kindString": "Parameter", @@ -1037,7 +1037,7 @@ }, "type": { "type": "reference", - "id": 96, + "id": 103, "name": "BotkitHandler" } } @@ -1051,13 +1051,13 @@ "sources": [ { "fileName": "core.ts", - "line": 895, + "line": 899, "character": 16 } ] }, { - "id": 191, + "id": 198, "name": "interrupts", "kind": 2048, "kindString": "Method", @@ -1068,7 +1068,7 @@ }, "signatures": [ { - "id": 192, + "id": 199, "name": "interrupts", "kind": 4096, "kindString": "Call signature", @@ -1081,7 +1081,7 @@ }, "parameters": [ { - "id": 193, + "id": 200, "name": "patterns", "kind": 32768, "kindString": "Parameter", @@ -1110,7 +1110,7 @@ { "type": "reflection", "declaration": { - "id": 194, + "id": 201, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -1119,7 +1119,7 @@ }, "signatures": [ { - "id": 195, + "id": 202, "name": "__call", "kind": 4096, "kindString": "Call signature", @@ -1128,7 +1128,7 @@ }, "parameters": [ { - "id": 196, + "id": 203, "name": "message", "kind": 32768, "kindString": "Parameter", @@ -1137,7 +1137,7 @@ }, "type": { "type": "reference", - "id": 86, + "id": 93, "name": "BotkitMessage" } } @@ -1177,7 +1177,7 @@ { "type": "reflection", "declaration": { - "id": 197, + "id": 204, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -1186,7 +1186,7 @@ }, "signatures": [ { - "id": 198, + "id": 205, "name": "__call", "kind": 4096, "kindString": "Call signature", @@ -1195,7 +1195,7 @@ }, "parameters": [ { - "id": 199, + "id": 206, "name": "message", "kind": 32768, "kindString": "Parameter", @@ -1204,7 +1204,7 @@ }, "type": { "type": "reference", - "id": 86, + "id": 93, "name": "BotkitMessage" } } @@ -1224,7 +1224,7 @@ "sources": [ { "fileName": "core.ts", - "line": 950, + "line": 954, "character": 131 } ] @@ -1234,7 +1234,7 @@ } }, { - "id": 200, + "id": 207, "name": "events", "kind": 32768, "kindString": "Parameter", @@ -1262,7 +1262,7 @@ } }, { - "id": 201, + "id": 208, "name": "handler", "kind": 32768, "kindString": "Parameter", @@ -1274,7 +1274,7 @@ }, "type": { "type": "reference", - "id": 96, + "id": 103, "name": "BotkitHandler" } } @@ -1288,13 +1288,13 @@ "sources": [ { "fileName": "core.ts", - "line": 950, + "line": 954, "character": 21 } ] }, { - "id": 214, + "id": 222, "name": "loadModule", "kind": 2048, "kindString": "Method", @@ -1305,7 +1305,7 @@ }, "signatures": [ { - "id": 215, + "id": 223, "name": "loadModule", "kind": 4096, "kindString": "Call signature", @@ -1317,7 +1317,7 @@ }, "parameters": [ { - "id": 216, + "id": 224, "name": "p", "kind": 32768, "kindString": "Parameter", @@ -1342,13 +1342,13 @@ "sources": [ { "fileName": "core.ts", - "line": 1098, + "line": 1104, "character": 21 } ] }, { - "id": 217, + "id": 225, "name": "loadModules", "kind": 2048, "kindString": "Method", @@ -1359,7 +1359,7 @@ }, "signatures": [ { - "id": 218, + "id": 226, "name": "loadModules", "kind": 4096, "kindString": "Call signature", @@ -1372,7 +1372,7 @@ }, "parameters": [ { - "id": 219, + "id": 227, "name": "p", "kind": 32768, "kindString": "Parameter", @@ -1388,7 +1388,7 @@ } }, { - "id": 220, + "id": 228, "name": "exts", "kind": 32768, "kindString": "Parameter", @@ -1417,13 +1417,13 @@ "sources": [ { "fileName": "core.ts", - "line": 1127, + "line": 1133, "character": 22 } ] }, { - "id": 202, + "id": 209, "name": "on", "kind": 2048, "kindString": "Method", @@ -1434,7 +1434,7 @@ }, "signatures": [ { - "id": 203, + "id": 210, "name": "on", "kind": 4096, "kindString": "Call signature", @@ -1447,7 +1447,7 @@ }, "parameters": [ { - "id": 204, + "id": 211, "name": "events", "kind": 32768, "kindString": "Parameter", @@ -1475,7 +1475,7 @@ } }, { - "id": 205, + "id": 212, "name": "handler", "kind": 32768, "kindString": "Parameter", @@ -1487,7 +1487,7 @@ }, "type": { "type": "reference", - "id": 96, + "id": 103, "name": "BotkitHandler" } } @@ -1501,13 +1501,13 @@ "sources": [ { "fileName": "core.ts", - "line": 1002, + "line": 1006, "character": 13 } ] }, { - "id": 156, + "id": 163, "name": "publicFolder", "kind": 2048, "kindString": "Method", @@ -1518,7 +1518,7 @@ }, "signatures": [ { - "id": 157, + "id": 164, "name": "publicFolder", "kind": 4096, "kindString": "Call signature", @@ -1531,7 +1531,7 @@ }, "parameters": [ { - "id": 158, + "id": 165, "name": "alias", "kind": 32768, "kindString": "Parameter", @@ -1547,7 +1547,7 @@ } }, { - "id": 159, + "id": 166, "name": "path", "kind": 32768, "kindString": "Parameter", @@ -1578,7 +1578,7 @@ ] }, { - "id": 169, + "id": 176, "name": "ready", "kind": 2048, "kindString": "Method", @@ -1589,7 +1589,7 @@ }, "signatures": [ { - "id": 170, + "id": 177, "name": "ready", "kind": 4096, "kindString": "Call signature", @@ -1602,7 +1602,7 @@ }, "parameters": [ { - "id": 171, + "id": 178, "name": "handler", "kind": 32768, "kindString": "Parameter", @@ -1615,7 +1615,7 @@ "type": { "type": "reflection", "declaration": { - "id": 172, + "id": 179, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -1624,7 +1624,7 @@ }, "signatures": [ { - "id": 173, + "id": 180, "name": "__call", "kind": 4096, "kindString": "Call signature", @@ -1663,7 +1663,7 @@ ] }, { - "id": 177, + "id": 184, "name": "saveState", "kind": 2048, "kindString": "Method", @@ -1674,7 +1674,7 @@ }, "signatures": [ { - "id": 178, + "id": 185, "name": "saveState", "kind": 4096, "kindString": "Call signature", @@ -1686,7 +1686,7 @@ }, "parameters": [ { - "id": 179, + "id": 186, "name": "bot", "kind": 32768, "kindString": "Parameter", @@ -1718,13 +1718,13 @@ "sources": [ { "fileName": "core.ts", - "line": 766, + "line": 770, "character": 26 } ] }, { - "id": 136, + "id": 143, "name": "shutdown", "kind": 2048, "kindString": "Method", @@ -1735,7 +1735,7 @@ }, "signatures": [ { - "id": 137, + "id": 144, "name": "shutdown", "kind": 4096, "kindString": "Call signature", @@ -1767,7 +1767,7 @@ ] }, { - "id": 211, + "id": 218, "name": "spawn", "kind": 2048, "kindString": "Method", @@ -1778,7 +1778,7 @@ }, "signatures": [ { - "id": 212, + "id": 219, "name": "spawn", "kind": 4096, "kindString": "Call signature", @@ -1790,7 +1790,7 @@ }, "parameters": [ { - "id": 213, + "id": 220, "name": "config", "kind": 32768, "kindString": "Parameter", @@ -1799,12 +1799,26 @@ "isOptional": true }, "comment": { - "text": "Preferably receives a DialogContext, though can also receive a TurnContext. If excluded, must call `bot.changeContext(reference)` before calling any other method.\n" + "text": "Preferably receives a DialogContext, though can also receive a TurnContext. If excluded, must call `bot.changeContext(reference)` before calling any other method." }, "type": { "type": "intrinsic", "name": "any" } + }, + { + "id": 221, + "name": "custom_adapter", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "isExported": true, + "isOptional": true + }, + "type": { + "type": "reference", + "name": "BotAdapter" + } } ], "type": { @@ -1823,13 +1837,13 @@ "sources": [ { "fileName": "core.ts", - "line": 1057, + "line": 1062, "character": 22 } ] }, { - "id": 206, + "id": 213, "name": "trigger", "kind": 2048, "kindString": "Method", @@ -1840,7 +1854,7 @@ }, "signatures": [ { - "id": 207, + "id": 214, "name": "trigger", "kind": 4096, "kindString": "Call signature", @@ -1853,7 +1867,7 @@ }, "parameters": [ { - "id": 208, + "id": 215, "name": "event", "kind": 32768, "kindString": "Parameter", @@ -1869,7 +1883,7 @@ } }, { - "id": 209, + "id": 216, "name": "bot", "kind": 32768, "kindString": "Parameter", @@ -1887,7 +1901,7 @@ } }, { - "id": 210, + "id": 217, "name": "message", "kind": 32768, "kindString": "Parameter", @@ -1900,7 +1914,7 @@ }, "type": { "type": "reference", - "id": 86, + "id": 93, "name": "BotkitMessage" } } @@ -1920,13 +1934,13 @@ "sources": [ { "fileName": "core.ts", - "line": 1034, + "line": 1038, "character": 24 } ] }, { - "id": 141, + "id": 148, "name": "usePlugin", "kind": 2048, "kindString": "Method", @@ -1937,7 +1951,7 @@ }, "signatures": [ { - "id": 142, + "id": 149, "name": "usePlugin", "kind": 4096, "kindString": "Call signature", @@ -1949,7 +1963,7 @@ }, "parameters": [ { - "id": 143, + "id": 150, "name": "plugin_or_function", "kind": 32768, "kindString": "Parameter", @@ -1965,7 +1979,7 @@ { "type": "reflection", "declaration": { - "id": 144, + "id": 151, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -1974,7 +1988,7 @@ }, "signatures": [ { - "id": 145, + "id": 152, "name": "__call", "kind": 4096, "kindString": "Call signature", @@ -1983,7 +1997,7 @@ }, "parameters": [ { - "id": 146, + "id": 153, "name": "botkit", "kind": 32768, "kindString": "Parameter", @@ -1992,14 +2006,14 @@ }, "type": { "type": "reference", - "id": 119, + "id": 126, "name": "Botkit" } } ], "type": { "type": "reference", - "id": 107, + "id": 114, "name": "BotkitPlugin" } } @@ -2015,7 +2029,7 @@ }, { "type": "reference", - "id": 107, + "id": 114, "name": "BotkitPlugin" } ] @@ -2037,7 +2051,7 @@ ] }, { - "id": 121, + "id": 128, "name": "middleware", "kind": 2097152, "kindString": "Object literal", @@ -2052,7 +2066,7 @@ }, "children": [ { - "id": 123, + "id": 130, "name": "ingest", "kind": 32, "kindString": "Variable", @@ -2074,7 +2088,7 @@ "defaultValue": "new Ware()" }, { - "id": 126, + "id": 133, "name": "interpret", "kind": 32, "kindString": "Variable", @@ -2096,7 +2110,7 @@ "defaultValue": "new Ware()" }, { - "id": 125, + "id": 132, "name": "receive", "kind": 32, "kindString": "Variable", @@ -2118,7 +2132,7 @@ "defaultValue": "new Ware()" }, { - "id": 124, + "id": 131, "name": "send", "kind": 32, "kindString": "Variable", @@ -2140,7 +2154,7 @@ "defaultValue": "new Ware()" }, { - "id": 122, + "id": 129, "name": "spawn", "kind": 32, "kindString": "Variable", @@ -2167,11 +2181,11 @@ "title": "Variables", "kind": 32, "children": [ - 123, - 126, - 125, - 124, - 122 + 130, + 133, + 132, + 131, + 129 ] } ], @@ -2193,60 +2207,60 @@ "title": "Constructors", "kind": 512, "children": [ - 133 + 140 ] }, { "title": "Properties", "kind": 1024, "children": [ - 132, - 130, - 131, - 129, + 139, + 137, + 138, + 136, + 134, 127, - 120, - 128 + 135 ] }, { "title": "Accessors", "kind": 262144, "children": [ - 151 + 158 ] }, { "title": "Methods", "kind": 2048, "children": [ + 170, + 229, + 154, + 232, + 173, + 145, + 167, + 181, + 187, + 198, + 222, + 225, + 209, 163, - 221, - 147, - 224, - 166, - 138, - 160, - 174, - 180, - 191, - 214, - 217, - 202, - 156, - 169, - 177, - 136, - 211, - 206, - 141 + 176, + 184, + 143, + 218, + 213, + 148 ] }, { "title": "Object literals", "kind": 2097152, "children": [ - 121 + 128 ] } ], @@ -2259,7 +2273,7 @@ ], "props": [ { - "id": 132, + "id": 139, "name": "PATH", "kind": 1024, "kindString": "Property", @@ -2284,7 +2298,7 @@ } }, { - "id": 130, + "id": 137, "name": "adapter", "kind": 1024, "kindString": "Property", @@ -2309,7 +2323,7 @@ } }, { - "id": 131, + "id": 138, "name": "dialogSet", "kind": 1024, "kindString": "Property", @@ -2334,7 +2348,7 @@ } }, { - "id": 129, + "id": 136, "name": "http", "kind": 1024, "kindString": "Property", @@ -2359,7 +2373,7 @@ } }, { - "id": 127, + "id": 134, "name": "storage", "kind": 1024, "kindString": "Property", @@ -2384,7 +2398,7 @@ } }, { - "id": 120, + "id": 127, "name": "version", "kind": 1024, "kindString": "Property", @@ -2410,7 +2424,7 @@ "defaultValue": "require('../package.json').version" }, { - "id": 128, + "id": 135, "name": "webserver", "kind": 1024, "kindString": "Property", @@ -2435,7 +2449,7 @@ } }, { - "id": 151, + "id": 158, "name": "plugins", "kind": 262144, "kindString": "Accessor", @@ -2449,7 +2463,7 @@ }, "getSignature": [ { - "id": 152, + "id": 159, "name": "__get", "kind": 524288, "kindString": "Get signature", @@ -2462,7 +2476,7 @@ "type": { "type": "reflection", "declaration": { - "id": 153, + "id": 160, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -2471,7 +2485,7 @@ }, "indexSignature": [ { - "id": 154, + "id": 161, "name": "__index", "kind": 8192, "kindString": "Index signature", @@ -2480,7 +2494,7 @@ }, "parameters": [ { - "id": 155, + "id": 162, "name": "key", "kind": 32768, "kindString": "Parameter", @@ -2521,7 +2535,7 @@ ], "methods": [ { - "id": 163, + "id": 170, "name": "addDep", "kind": 2048, "kindString": "Method", @@ -2532,7 +2546,7 @@ }, "signatures": [ { - "id": 164, + "id": 171, "name": "addDep", "kind": 4096, "kindString": "Call signature", @@ -2545,7 +2559,7 @@ }, "parameters": [ { - "id": 165, + "id": 172, "name": "name", "kind": 32768, "kindString": "Parameter", @@ -2576,7 +2590,7 @@ ] }, { - "id": 221, + "id": 229, "name": "addDialog", "kind": 2048, "kindString": "Method", @@ -2587,7 +2601,7 @@ }, "signatures": [ { - "id": 222, + "id": 230, "name": "addDialog", "kind": 4096, "kindString": "Call signature", @@ -2600,7 +2614,7 @@ }, "parameters": [ { - "id": 223, + "id": 231, "name": "dialog", "kind": 32768, "kindString": "Parameter", @@ -2625,13 +2639,13 @@ "sources": [ { "fileName": "core.ts", - "line": 1155, + "line": 1161, "character": 20 } ] }, { - "id": 147, + "id": 154, "name": "addPluginExtension", "kind": 2048, "kindString": "Method", @@ -2642,7 +2656,7 @@ }, "signatures": [ { - "id": 148, + "id": 155, "name": "addPluginExtension", "kind": 4096, "kindString": "Call signature", @@ -2655,7 +2669,7 @@ }, "parameters": [ { - "id": 149, + "id": 156, "name": "name", "kind": 32768, "kindString": "Parameter", @@ -2671,7 +2685,7 @@ } }, { - "id": 150, + "id": 157, "name": "extension", "kind": 32768, "kindString": "Parameter", @@ -2702,7 +2716,7 @@ ] }, { - "id": 224, + "id": 232, "name": "afterDialog", "kind": 2048, "kindString": "Method", @@ -2713,7 +2727,7 @@ }, "signatures": [ { - "id": 225, + "id": 233, "name": "afterDialog", "kind": 4096, "kindString": "Call signature", @@ -2726,7 +2740,7 @@ }, "parameters": [ { - "id": 226, + "id": 234, "name": "dialog", "kind": 32768, "kindString": "Parameter", @@ -2751,7 +2765,7 @@ } }, { - "id": 227, + "id": 235, "name": "handler", "kind": 32768, "kindString": "Parameter", @@ -2763,7 +2777,7 @@ }, "type": { "type": "reference", - "id": 96, + "id": 103, "name": "BotkitHandler" } } @@ -2777,13 +2791,13 @@ "sources": [ { "fileName": "core.ts", - "line": 1183, + "line": 1188, "character": 22 } ] }, { - "id": 166, + "id": 173, "name": "completeDep", "kind": 2048, "kindString": "Method", @@ -2794,7 +2808,7 @@ }, "signatures": [ { - "id": 167, + "id": 174, "name": "completeDep", "kind": 4096, "kindString": "Call signature", @@ -2806,7 +2820,7 @@ }, "parameters": [ { - "id": 168, + "id": 175, "name": "name", "kind": 32768, "kindString": "Parameter", @@ -2837,7 +2851,7 @@ ] }, { - "id": 138, + "id": 145, "name": "getConfig", "kind": 2048, "kindString": "Method", @@ -2848,7 +2862,7 @@ }, "signatures": [ { - "id": 139, + "id": 146, "name": "getConfig", "kind": 4096, "kindString": "Call signature", @@ -2862,7 +2876,7 @@ }, "parameters": [ { - "id": 140, + "id": 147, "name": "key", "kind": 32768, "kindString": "Parameter", @@ -2894,7 +2908,7 @@ ] }, { - "id": 160, + "id": 167, "name": "getLocalView", "kind": 2048, "kindString": "Method", @@ -2905,7 +2919,7 @@ }, "signatures": [ { - "id": 161, + "id": 168, "name": "getLocalView", "kind": 4096, "kindString": "Call signature", @@ -2917,7 +2931,7 @@ }, "parameters": [ { - "id": 162, + "id": 169, "name": "path_to_view", "kind": 32768, "kindString": "Parameter", @@ -2948,7 +2962,7 @@ ] }, { - "id": 174, + "id": 181, "name": "handleTurn", "kind": 2048, "kindString": "Method", @@ -2959,7 +2973,7 @@ }, "signatures": [ { - "id": 175, + "id": 182, "name": "handleTurn", "kind": 4096, "kindString": "Call signature", @@ -2971,7 +2985,7 @@ }, "parameters": [ { - "id": 176, + "id": 183, "name": "turnContext", "kind": 32768, "kindString": "Parameter", @@ -3008,7 +3022,7 @@ ] }, { - "id": 180, + "id": 187, "name": "hears", "kind": 2048, "kindString": "Method", @@ -3019,7 +3033,7 @@ }, "signatures": [ { - "id": 181, + "id": 188, "name": "hears", "kind": 4096, "kindString": "Call signature", @@ -3032,7 +3046,7 @@ }, "parameters": [ { - "id": 182, + "id": 189, "name": "patterns", "kind": 32768, "kindString": "Parameter", @@ -3061,7 +3075,7 @@ { "type": "reflection", "declaration": { - "id": 183, + "id": 190, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -3070,7 +3084,7 @@ }, "signatures": [ { - "id": 184, + "id": 191, "name": "__call", "kind": 4096, "kindString": "Call signature", @@ -3079,7 +3093,7 @@ }, "parameters": [ { - "id": 185, + "id": 192, "name": "message", "kind": 32768, "kindString": "Parameter", @@ -3088,7 +3102,7 @@ }, "type": { "type": "reference", - "id": 86, + "id": 93, "name": "BotkitMessage" } } @@ -3121,7 +3135,7 @@ { "type": "reflection", "declaration": { - "id": 186, + "id": 193, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -3130,7 +3144,7 @@ }, "signatures": [ { - "id": 187, + "id": 194, "name": "__call", "kind": 4096, "kindString": "Call signature", @@ -3139,7 +3153,7 @@ }, "parameters": [ { - "id": 188, + "id": 195, "name": "message", "kind": 32768, "kindString": "Parameter", @@ -3148,7 +3162,7 @@ }, "type": { "type": "reference", - "id": 86, + "id": 93, "name": "BotkitMessage" } } @@ -3168,7 +3182,7 @@ "sources": [ { "fileName": "core.ts", - "line": 895, + "line": 899, "character": 115 } ] @@ -3178,7 +3192,7 @@ } }, { - "id": 189, + "id": 196, "name": "events", "kind": 32768, "kindString": "Parameter", @@ -3206,7 +3220,7 @@ } }, { - "id": 190, + "id": 197, "name": "handler", "kind": 32768, "kindString": "Parameter", @@ -3218,7 +3232,7 @@ }, "type": { "type": "reference", - "id": 96, + "id": 103, "name": "BotkitHandler" } } @@ -3232,13 +3246,13 @@ "sources": [ { "fileName": "core.ts", - "line": 895, + "line": 899, "character": 16 } ] }, { - "id": 191, + "id": 198, "name": "interrupts", "kind": 2048, "kindString": "Method", @@ -3249,7 +3263,7 @@ }, "signatures": [ { - "id": 192, + "id": 199, "name": "interrupts", "kind": 4096, "kindString": "Call signature", @@ -3262,7 +3276,7 @@ }, "parameters": [ { - "id": 193, + "id": 200, "name": "patterns", "kind": 32768, "kindString": "Parameter", @@ -3291,7 +3305,7 @@ { "type": "reflection", "declaration": { - "id": 194, + "id": 201, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -3300,7 +3314,7 @@ }, "signatures": [ { - "id": 195, + "id": 202, "name": "__call", "kind": 4096, "kindString": "Call signature", @@ -3309,7 +3323,7 @@ }, "parameters": [ { - "id": 196, + "id": 203, "name": "message", "kind": 32768, "kindString": "Parameter", @@ -3318,7 +3332,7 @@ }, "type": { "type": "reference", - "id": 86, + "id": 93, "name": "BotkitMessage" } } @@ -3358,7 +3372,7 @@ { "type": "reflection", "declaration": { - "id": 197, + "id": 204, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -3367,7 +3381,7 @@ }, "signatures": [ { - "id": 198, + "id": 205, "name": "__call", "kind": 4096, "kindString": "Call signature", @@ -3376,7 +3390,7 @@ }, "parameters": [ { - "id": 199, + "id": 206, "name": "message", "kind": 32768, "kindString": "Parameter", @@ -3385,7 +3399,7 @@ }, "type": { "type": "reference", - "id": 86, + "id": 93, "name": "BotkitMessage" } } @@ -3405,7 +3419,7 @@ "sources": [ { "fileName": "core.ts", - "line": 950, + "line": 954, "character": 131 } ] @@ -3415,7 +3429,7 @@ } }, { - "id": 200, + "id": 207, "name": "events", "kind": 32768, "kindString": "Parameter", @@ -3443,7 +3457,7 @@ } }, { - "id": 201, + "id": 208, "name": "handler", "kind": 32768, "kindString": "Parameter", @@ -3455,7 +3469,7 @@ }, "type": { "type": "reference", - "id": 96, + "id": 103, "name": "BotkitHandler" } } @@ -3469,13 +3483,13 @@ "sources": [ { "fileName": "core.ts", - "line": 950, + "line": 954, "character": 21 } ] }, { - "id": 214, + "id": 222, "name": "loadModule", "kind": 2048, "kindString": "Method", @@ -3486,7 +3500,7 @@ }, "signatures": [ { - "id": 215, + "id": 223, "name": "loadModule", "kind": 4096, "kindString": "Call signature", @@ -3498,7 +3512,7 @@ }, "parameters": [ { - "id": 216, + "id": 224, "name": "p", "kind": 32768, "kindString": "Parameter", @@ -3523,13 +3537,13 @@ "sources": [ { "fileName": "core.ts", - "line": 1098, + "line": 1104, "character": 21 } ] }, { - "id": 217, + "id": 225, "name": "loadModules", "kind": 2048, "kindString": "Method", @@ -3540,7 +3554,7 @@ }, "signatures": [ { - "id": 218, + "id": 226, "name": "loadModules", "kind": 4096, "kindString": "Call signature", @@ -3553,7 +3567,7 @@ }, "parameters": [ { - "id": 219, + "id": 227, "name": "p", "kind": 32768, "kindString": "Parameter", @@ -3569,7 +3583,7 @@ } }, { - "id": 220, + "id": 228, "name": "exts", "kind": 32768, "kindString": "Parameter", @@ -3598,13 +3612,13 @@ "sources": [ { "fileName": "core.ts", - "line": 1127, + "line": 1133, "character": 22 } ] }, { - "id": 202, + "id": 209, "name": "on", "kind": 2048, "kindString": "Method", @@ -3615,7 +3629,7 @@ }, "signatures": [ { - "id": 203, + "id": 210, "name": "on", "kind": 4096, "kindString": "Call signature", @@ -3628,7 +3642,7 @@ }, "parameters": [ { - "id": 204, + "id": 211, "name": "events", "kind": 32768, "kindString": "Parameter", @@ -3656,7 +3670,7 @@ } }, { - "id": 205, + "id": 212, "name": "handler", "kind": 32768, "kindString": "Parameter", @@ -3668,7 +3682,7 @@ }, "type": { "type": "reference", - "id": 96, + "id": 103, "name": "BotkitHandler" } } @@ -3682,13 +3696,13 @@ "sources": [ { "fileName": "core.ts", - "line": 1002, + "line": 1006, "character": 13 } ] }, { - "id": 156, + "id": 163, "name": "publicFolder", "kind": 2048, "kindString": "Method", @@ -3699,7 +3713,7 @@ }, "signatures": [ { - "id": 157, + "id": 164, "name": "publicFolder", "kind": 4096, "kindString": "Call signature", @@ -3712,7 +3726,7 @@ }, "parameters": [ { - "id": 158, + "id": 165, "name": "alias", "kind": 32768, "kindString": "Parameter", @@ -3728,7 +3742,7 @@ } }, { - "id": 159, + "id": 166, "name": "path", "kind": 32768, "kindString": "Parameter", @@ -3759,7 +3773,7 @@ ] }, { - "id": 169, + "id": 176, "name": "ready", "kind": 2048, "kindString": "Method", @@ -3770,7 +3784,7 @@ }, "signatures": [ { - "id": 170, + "id": 177, "name": "ready", "kind": 4096, "kindString": "Call signature", @@ -3783,7 +3797,7 @@ }, "parameters": [ { - "id": 171, + "id": 178, "name": "handler", "kind": 32768, "kindString": "Parameter", @@ -3796,7 +3810,7 @@ "type": { "type": "reflection", "declaration": { - "id": 172, + "id": 179, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -3805,7 +3819,7 @@ }, "signatures": [ { - "id": 173, + "id": 180, "name": "__call", "kind": 4096, "kindString": "Call signature", @@ -3844,7 +3858,7 @@ ] }, { - "id": 177, + "id": 184, "name": "saveState", "kind": 2048, "kindString": "Method", @@ -3855,7 +3869,7 @@ }, "signatures": [ { - "id": 178, + "id": 185, "name": "saveState", "kind": 4096, "kindString": "Call signature", @@ -3867,7 +3881,7 @@ }, "parameters": [ { - "id": 179, + "id": 186, "name": "bot", "kind": 32768, "kindString": "Parameter", @@ -3899,13 +3913,13 @@ "sources": [ { "fileName": "core.ts", - "line": 766, + "line": 770, "character": 26 } ] }, { - "id": 136, + "id": 143, "name": "shutdown", "kind": 2048, "kindString": "Method", @@ -3916,7 +3930,7 @@ }, "signatures": [ { - "id": 137, + "id": 144, "name": "shutdown", "kind": 4096, "kindString": "Call signature", @@ -3948,7 +3962,7 @@ ] }, { - "id": 211, + "id": 218, "name": "spawn", "kind": 2048, "kindString": "Method", @@ -3959,7 +3973,7 @@ }, "signatures": [ { - "id": 212, + "id": 219, "name": "spawn", "kind": 4096, "kindString": "Call signature", @@ -3971,7 +3985,7 @@ }, "parameters": [ { - "id": 213, + "id": 220, "name": "config", "kind": 32768, "kindString": "Parameter", @@ -3980,12 +3994,26 @@ "isOptional": true }, "comment": { - "text": "Preferably receives a DialogContext, though can also receive a TurnContext. If excluded, must call `bot.changeContext(reference)` before calling any other method.\n" + "text": "Preferably receives a DialogContext, though can also receive a TurnContext. If excluded, must call `bot.changeContext(reference)` before calling any other method." }, "type": { "type": "intrinsic", "name": "any" } + }, + { + "id": 221, + "name": "custom_adapter", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "isExported": true, + "isOptional": true + }, + "type": { + "type": "reference", + "name": "BotAdapter" + } } ], "type": { @@ -4004,13 +4032,13 @@ "sources": [ { "fileName": "core.ts", - "line": 1057, + "line": 1062, "character": 22 } ] }, { - "id": 206, + "id": 213, "name": "trigger", "kind": 2048, "kindString": "Method", @@ -4021,7 +4049,7 @@ }, "signatures": [ { - "id": 207, + "id": 214, "name": "trigger", "kind": 4096, "kindString": "Call signature", @@ -4034,7 +4062,7 @@ }, "parameters": [ { - "id": 208, + "id": 215, "name": "event", "kind": 32768, "kindString": "Parameter", @@ -4050,7 +4078,7 @@ } }, { - "id": 209, + "id": 216, "name": "bot", "kind": 32768, "kindString": "Parameter", @@ -4068,7 +4096,7 @@ } }, { - "id": 210, + "id": 217, "name": "message", "kind": 32768, "kindString": "Parameter", @@ -4081,7 +4109,7 @@ }, "type": { "type": "reference", - "id": 86, + "id": 93, "name": "BotkitMessage" } } @@ -4101,13 +4129,13 @@ "sources": [ { "fileName": "core.ts", - "line": 1034, + "line": 1038, "character": 24 } ] }, { - "id": 141, + "id": 148, "name": "usePlugin", "kind": 2048, "kindString": "Method", @@ -4118,7 +4146,7 @@ }, "signatures": [ { - "id": 142, + "id": 149, "name": "usePlugin", "kind": 4096, "kindString": "Call signature", @@ -4130,7 +4158,7 @@ }, "parameters": [ { - "id": 143, + "id": 150, "name": "plugin_or_function", "kind": 32768, "kindString": "Parameter", @@ -4146,7 +4174,7 @@ { "type": "reflection", "declaration": { - "id": 144, + "id": 151, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -4155,7 +4183,7 @@ }, "signatures": [ { - "id": 145, + "id": 152, "name": "__call", "kind": 4096, "kindString": "Call signature", @@ -4164,7 +4192,7 @@ }, "parameters": [ { - "id": 146, + "id": 153, "name": "botkit", "kind": 32768, "kindString": "Parameter", @@ -4173,14 +4201,14 @@ }, "type": { "type": "reference", - "id": 119, + "id": 126, "name": "Botkit" } } ], "type": { "type": "reference", - "id": 107, + "id": 114, "name": "BotkitPlugin" } } @@ -4196,7 +4224,7 @@ }, { "type": "reference", - "id": 107, + "id": 114, "name": "BotkitPlugin" } ] @@ -4220,7 +4248,7 @@ ], "constructors": [ { - "id": 133, + "id": 140, "name": "constructor", "kind": 512, "kindString": "Constructor", @@ -4235,7 +4263,7 @@ }, "signatures": [ { - "id": 134, + "id": 141, "name": "new Botkit", "kind": 16384, "kindString": "Constructor signature", @@ -4248,7 +4276,7 @@ }, "parameters": [ { - "id": 135, + "id": 142, "name": "config", "kind": 32768, "kindString": "Parameter", @@ -4260,14 +4288,14 @@ }, "type": { "type": "reference", - "id": 73, + "id": 80, "name": "BotkitConfiguration" } } ], "type": { "type": "reference", - "id": 119, + "id": 126, "name": "Botkit" } } @@ -4747,7 +4775,7 @@ }, "type": { "type": "reference", - "id": 119, + "id": 126, "name": "Botkit" } }, @@ -4810,7 +4838,7 @@ }, "type": { "type": "reference", - "id": 119, + "id": 126, "name": "Botkit" } } @@ -4944,7 +4972,7 @@ ] }, { - "id": 52, + "id": 59, "name": "changeContext", "kind": 2048, "kindString": "Method", @@ -4955,7 +4983,7 @@ }, "signatures": [ { - "id": 53, + "id": 60, "name": "changeContext", "kind": 4096, "kindString": "Call signature", @@ -4968,7 +4996,7 @@ }, "parameters": [ { - "id": 54, + "id": 61, "name": "reference", "kind": 32768, "kindString": "Parameter", @@ -5006,13 +5034,13 @@ "sources": [ { "fileName": "botworker.ts", - "line": 222, + "line": 250, "character": 30 } ] }, { - "id": 58, + "id": 65, "name": "ensureMessageFormat", "kind": 2048, "kindString": "Method", @@ -5023,7 +5051,7 @@ }, "signatures": [ { - "id": 59, + "id": 66, "name": "ensureMessageFormat", "kind": 4096, "kindString": "Call signature", @@ -5042,7 +5070,7 @@ }, "parameters": [ { - "id": 60, + "id": 67, "name": "message", "kind": 32768, "kindString": "Parameter", @@ -5057,7 +5085,7 @@ "typeArguments": [ { "type": "reference", - "id": 86, + "id": 93, "name": "BotkitMessage" } ], @@ -5086,11 +5114,57 @@ "sources": [ { "fileName": "botworker.ts", - "line": 302, + "line": 332, "character": 30 } ] }, + { + "id": 48, + "name": "getActiveDialog", + "kind": 2048, + "kindString": "Method", + "flags": { + "isPublic": true, + "isExported": true, + "isExternal": true + }, + "signatures": [ + { + "id": 49, + "name": "getActiveDialog", + "kind": 4096, + "kindString": "Call signature", + "flags": { + "isExported": true + }, + "comment": { + "shortText": "Get a reference to the active dialog", + "returns": "a reference to the active dialog or undefined if no dialog is active\n" + }, + "type": { + "type": "union", + "types": [ + { + "type": "reference", + "name": "Dialog" + }, + { + "type": "intrinsic", + "name": "undefined" + } + ] + } + } + ], + "sources": [ + { + "fileName": "botworker.ts", + "line": 182, + "character": 26 + } + ] + }, { "id": 32, "name": "getConfig", @@ -5149,7 +5223,44 @@ ] }, { - "id": 64, + "id": 50, + "name": "hasActiveDialog", + "kind": 2048, + "kindString": "Method", + "flags": { + "isPublic": true, + "isExported": true, + "isExternal": true + }, + "signatures": [ + { + "id": 51, + "name": "hasActiveDialog", + "kind": 4096, + "kindString": "Call signature", + "flags": { + "isExported": true + }, + "comment": { + "shortText": "Check if any dialog is active or not", + "returns": "true if there is an active dialog, otherwise false\n" + }, + "type": { + "type": "intrinsic", + "name": "boolean" + } + } + ], + "sources": [ + { + "fileName": "botworker.ts", + "line": 190, + "character": 26 + } + ] + }, + { + "id": 71, "name": "httpBody", "kind": 2048, "kindString": "Method", @@ -5160,7 +5271,7 @@ }, "signatures": [ { - "id": 65, + "id": 72, "name": "httpBody", "kind": 4096, "kindString": "Call signature", @@ -5173,7 +5284,7 @@ }, "parameters": [ { - "id": 66, + "id": 73, "name": "body", "kind": 32768, "kindString": "Parameter", @@ -5198,13 +5309,13 @@ "sources": [ { "fileName": "botworker.ts", - "line": 402, + "line": 432, "character": 19 } ] }, { - "id": 61, + "id": 68, "name": "httpStatus", "kind": 2048, "kindString": "Method", @@ -5215,7 +5326,7 @@ }, "signatures": [ { - "id": 62, + "id": 69, "name": "httpStatus", "kind": 4096, "kindString": "Call signature", @@ -5228,7 +5339,7 @@ }, "parameters": [ { - "id": 63, + "id": 70, "name": "status", "kind": 32768, "kindString": "Parameter", @@ -5253,13 +5364,68 @@ "sources": [ { "fileName": "botworker.ts", - "line": 385, + "line": 415, "character": 21 } ] }, { - "id": 48, + "id": 52, + "name": "isDialogActive", + "kind": 2048, + "kindString": "Method", + "flags": { + "isPublic": true, + "isExported": true, + "isExternal": true + }, + "signatures": [ + { + "id": 53, + "name": "isDialogActive", + "kind": 4096, + "kindString": "Call signature", + "flags": { + "isExported": true + }, + "comment": { + "shortText": "Check to see if a given dialog is currently active in the stack", + "returns": "true if dialog with id is located anywhere in the dialog stack\n" + }, + "parameters": [ + { + "id": 54, + "name": "id", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "isExported": true + }, + "comment": { + "text": "The id of a dialog to look for in the dialog stack" + }, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "type": { + "type": "intrinsic", + "name": "boolean" + } + } + ], + "sources": [ + { + "fileName": "botworker.ts", + "line": 199, + "character": 25 + } + ] + }, + { + "id": 55, "name": "replaceDialog", "kind": 2048, "kindString": "Method", @@ -5270,7 +5436,7 @@ }, "signatures": [ { - "id": 49, + "id": 56, "name": "replaceDialog", "kind": 4096, "kindString": "Call signature", @@ -5283,7 +5449,7 @@ }, "parameters": [ { - "id": 50, + "id": 57, "name": "id", "kind": 32768, "kindString": "Parameter", @@ -5299,7 +5465,7 @@ } }, { - "id": 51, + "id": 58, "name": "options", "kind": 32768, "kindString": "Parameter", @@ -5331,7 +5497,7 @@ "sources": [ { "fileName": "botworker.ts", - "line": 190, + "line": 218, "character": 30 } ] @@ -5377,7 +5543,7 @@ "typeArguments": [ { "type": "reference", - "id": 86, + "id": 93, "name": "BotkitMessage" } ], @@ -5403,7 +5569,7 @@ "typeArguments": [ { "type": "reference", - "id": 86, + "id": 93, "name": "BotkitMessage" } ], @@ -5481,7 +5647,7 @@ "typeArguments": [ { "type": "reference", - "id": 86, + "id": 93, "name": "BotkitMessage" } ], @@ -5516,7 +5682,7 @@ ] }, { - "id": 55, + "id": 62, "name": "startConversationWithUser", "kind": 2048, "kindString": "Method", @@ -5527,7 +5693,7 @@ }, "signatures": [ { - "id": 56, + "id": 63, "name": "startConversationWithUser", "kind": 4096, "kindString": "Call signature", @@ -5536,7 +5702,7 @@ }, "parameters": [ { - "id": 57, + "id": 64, "name": "reference", "kind": 32768, "kindString": "Parameter", @@ -5564,7 +5730,7 @@ "sources": [ { "fileName": "botworker.ts", - "line": 246, + "line": 274, "character": 42 } ] @@ -5591,15 +5757,18 @@ "children": [ 42, 46, - 52, - 58, - 32, - 64, - 61, + 59, + 65, 48, + 32, + 50, + 71, + 68, + 52, + 55, 38, 35, - 55 + 62 ] } ], @@ -5638,7 +5807,7 @@ }, "type": { "type": "reference", - "id": 119, + "id": 126, "name": "Botkit" } } @@ -5774,7 +5943,7 @@ ] }, { - "id": 52, + "id": 59, "name": "changeContext", "kind": 2048, "kindString": "Method", @@ -5785,7 +5954,7 @@ }, "signatures": [ { - "id": 53, + "id": 60, "name": "changeContext", "kind": 4096, "kindString": "Call signature", @@ -5798,7 +5967,7 @@ }, "parameters": [ { - "id": 54, + "id": 61, "name": "reference", "kind": 32768, "kindString": "Parameter", @@ -5836,13 +6005,13 @@ "sources": [ { "fileName": "botworker.ts", - "line": 222, + "line": 250, "character": 30 } ] }, { - "id": 58, + "id": 65, "name": "ensureMessageFormat", "kind": 2048, "kindString": "Method", @@ -5853,7 +6022,7 @@ }, "signatures": [ { - "id": 59, + "id": 66, "name": "ensureMessageFormat", "kind": 4096, "kindString": "Call signature", @@ -5872,7 +6041,7 @@ }, "parameters": [ { - "id": 60, + "id": 67, "name": "message", "kind": 32768, "kindString": "Parameter", @@ -5887,7 +6056,7 @@ "typeArguments": [ { "type": "reference", - "id": 86, + "id": 93, "name": "BotkitMessage" } ], @@ -5916,11 +6085,57 @@ "sources": [ { "fileName": "botworker.ts", - "line": 302, + "line": 332, "character": 30 } ] }, + { + "id": 48, + "name": "getActiveDialog", + "kind": 2048, + "kindString": "Method", + "flags": { + "isPublic": true, + "isExported": true, + "isExternal": true + }, + "signatures": [ + { + "id": 49, + "name": "getActiveDialog", + "kind": 4096, + "kindString": "Call signature", + "flags": { + "isExported": true + }, + "comment": { + "shortText": "Get a reference to the active dialog", + "returns": "a reference to the active dialog or undefined if no dialog is active\n" + }, + "type": { + "type": "union", + "types": [ + { + "type": "reference", + "name": "Dialog" + }, + { + "type": "intrinsic", + "name": "undefined" + } + ] + } + } + ], + "sources": [ + { + "fileName": "botworker.ts", + "line": 182, + "character": 26 + } + ] + }, { "id": 32, "name": "getConfig", @@ -5979,7 +6194,44 @@ ] }, { - "id": 64, + "id": 50, + "name": "hasActiveDialog", + "kind": 2048, + "kindString": "Method", + "flags": { + "isPublic": true, + "isExported": true, + "isExternal": true + }, + "signatures": [ + { + "id": 51, + "name": "hasActiveDialog", + "kind": 4096, + "kindString": "Call signature", + "flags": { + "isExported": true + }, + "comment": { + "shortText": "Check if any dialog is active or not", + "returns": "true if there is an active dialog, otherwise false\n" + }, + "type": { + "type": "intrinsic", + "name": "boolean" + } + } + ], + "sources": [ + { + "fileName": "botworker.ts", + "line": 190, + "character": 26 + } + ] + }, + { + "id": 71, "name": "httpBody", "kind": 2048, "kindString": "Method", @@ -5990,7 +6242,7 @@ }, "signatures": [ { - "id": 65, + "id": 72, "name": "httpBody", "kind": 4096, "kindString": "Call signature", @@ -6003,7 +6255,7 @@ }, "parameters": [ { - "id": 66, + "id": 73, "name": "body", "kind": 32768, "kindString": "Parameter", @@ -6028,13 +6280,13 @@ "sources": [ { "fileName": "botworker.ts", - "line": 402, + "line": 432, "character": 19 } ] }, { - "id": 61, + "id": 68, "name": "httpStatus", "kind": 2048, "kindString": "Method", @@ -6045,7 +6297,7 @@ }, "signatures": [ { - "id": 62, + "id": 69, "name": "httpStatus", "kind": 4096, "kindString": "Call signature", @@ -6058,7 +6310,7 @@ }, "parameters": [ { - "id": 63, + "id": 70, "name": "status", "kind": 32768, "kindString": "Parameter", @@ -6083,13 +6335,68 @@ "sources": [ { "fileName": "botworker.ts", - "line": 385, + "line": 415, "character": 21 } ] }, { - "id": 48, + "id": 52, + "name": "isDialogActive", + "kind": 2048, + "kindString": "Method", + "flags": { + "isPublic": true, + "isExported": true, + "isExternal": true + }, + "signatures": [ + { + "id": 53, + "name": "isDialogActive", + "kind": 4096, + "kindString": "Call signature", + "flags": { + "isExported": true + }, + "comment": { + "shortText": "Check to see if a given dialog is currently active in the stack", + "returns": "true if dialog with id is located anywhere in the dialog stack\n" + }, + "parameters": [ + { + "id": 54, + "name": "id", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "isExported": true + }, + "comment": { + "text": "The id of a dialog to look for in the dialog stack" + }, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "type": { + "type": "intrinsic", + "name": "boolean" + } + } + ], + "sources": [ + { + "fileName": "botworker.ts", + "line": 199, + "character": 25 + } + ] + }, + { + "id": 55, "name": "replaceDialog", "kind": 2048, "kindString": "Method", @@ -6100,7 +6407,7 @@ }, "signatures": [ { - "id": 49, + "id": 56, "name": "replaceDialog", "kind": 4096, "kindString": "Call signature", @@ -6113,7 +6420,7 @@ }, "parameters": [ { - "id": 50, + "id": 57, "name": "id", "kind": 32768, "kindString": "Parameter", @@ -6129,7 +6436,7 @@ } }, { - "id": 51, + "id": 58, "name": "options", "kind": 32768, "kindString": "Parameter", @@ -6161,7 +6468,7 @@ "sources": [ { "fileName": "botworker.ts", - "line": 190, + "line": 218, "character": 30 } ] @@ -6207,7 +6514,7 @@ "typeArguments": [ { "type": "reference", - "id": 86, + "id": 93, "name": "BotkitMessage" } ], @@ -6233,7 +6540,7 @@ "typeArguments": [ { "type": "reference", - "id": 86, + "id": 93, "name": "BotkitMessage" } ], @@ -6311,7 +6618,7 @@ "typeArguments": [ { "type": "reference", - "id": 86, + "id": 93, "name": "BotkitMessage" } ], @@ -6346,7 +6653,7 @@ ] }, { - "id": 55, + "id": 62, "name": "startConversationWithUser", "kind": 2048, "kindString": "Method", @@ -6357,7 +6664,7 @@ }, "signatures": [ { - "id": 56, + "id": 63, "name": "startConversationWithUser", "kind": 4096, "kindString": "Call signature", @@ -6366,7 +6673,7 @@ }, "parameters": [ { - "id": 57, + "id": 64, "name": "reference", "kind": 32768, "kindString": "Parameter", @@ -6394,7 +6701,7 @@ "sources": [ { "fileName": "botworker.ts", - "line": 246, + "line": 274, "character": 42 } ] @@ -6440,7 +6747,7 @@ }, "type": { "type": "reference", - "id": 119, + "id": 126, "name": "Botkit" } }, @@ -6479,7 +6786,7 @@ ] }, { - "id": 311, + "id": 320, "name": "BotkitConversation", "kind": 128, "kindString": "Class", @@ -6493,7 +6800,7 @@ }, "typeParameter": [ { - "id": 312, + "id": 321, "name": "O", "kind": 131072, "kindString": "Type parameter", @@ -6508,7 +6815,7 @@ ], "children": [ { - "id": 314, + "id": 323, "name": "constructor", "kind": 512, "kindString": "Constructor", @@ -6522,7 +6829,7 @@ }, "signatures": [ { - "id": 315, + "id": 324, "name": "new BotkitConversation", "kind": 16384, "kindString": "Constructor signature", @@ -6534,7 +6841,7 @@ }, "parameters": [ { - "id": 316, + "id": 325, "name": "dialogId", "kind": 32768, "kindString": "Parameter", @@ -6550,7 +6857,7 @@ } }, { - "id": 317, + "id": 326, "name": "controller", "kind": 32768, "kindString": "Parameter", @@ -6562,14 +6869,14 @@ }, "type": { "type": "reference", - "id": 119, + "id": 126, "name": "Botkit" } } ], "type": { "type": "reference", - "id": 311, + "id": 320, "name": "BotkitConversation" } } @@ -6583,7 +6890,7 @@ ] }, { - "id": 313, + "id": 322, "name": "script", "kind": 1024, "kindString": "Property", @@ -6608,7 +6915,7 @@ } }, { - "id": 321, + "id": 330, "name": "addAction", "kind": 2048, "kindString": "Method", @@ -6619,7 +6926,7 @@ }, "signatures": [ { - "id": 322, + "id": 331, "name": "addAction", "kind": 4096, "kindString": "Call signature", @@ -6632,7 +6939,7 @@ }, "parameters": [ { - "id": 323, + "id": 332, "name": "action", "kind": 32768, "kindString": "Parameter", @@ -6648,7 +6955,7 @@ } }, { - "id": 324, + "id": 333, "name": "thread_name", "kind": 32768, "kindString": "Parameter", @@ -6667,7 +6974,7 @@ ], "type": { "type": "reference", - "id": 311, + "id": 320, "name": "BotkitConversation" } } @@ -6675,13 +6982,13 @@ "sources": [ { "fileName": "conversation.ts", - "line": 194, + "line": 197, "character": 20 } ] }, { - "id": 325, + "id": 334, "name": "addChildDialog", "kind": 2048, "kindString": "Method", @@ -6692,7 +6999,7 @@ }, "signatures": [ { - "id": 326, + "id": 335, "name": "addChildDialog", "kind": 4096, "kindString": "Call signature", @@ -6705,7 +7012,7 @@ }, "parameters": [ { - "id": 327, + "id": 336, "name": "dialog_id", "kind": 32768, "kindString": "Parameter", @@ -6721,7 +7028,7 @@ } }, { - "id": 328, + "id": 337, "name": "key_name", "kind": 32768, "kindString": "Parameter", @@ -6738,7 +7045,7 @@ } }, { - "id": 329, + "id": 338, "name": "thread_name", "kind": 32768, "kindString": "Parameter", @@ -6757,7 +7064,7 @@ ], "type": { "type": "reference", - "id": 311, + "id": 320, "name": "BotkitConversation" } } @@ -6765,13 +7072,13 @@ "sources": [ { "fileName": "conversation.ts", - "line": 223, + "line": 226, "character": 25 } ] }, { - "id": 330, + "id": 339, "name": "addGotoDialog", "kind": 2048, "kindString": "Method", @@ -6782,7 +7089,7 @@ }, "signatures": [ { - "id": 331, + "id": 340, "name": "addGotoDialog", "kind": 4096, "kindString": "Call signature", @@ -6795,7 +7102,7 @@ }, "parameters": [ { - "id": 332, + "id": 341, "name": "dialog_id", "kind": 32768, "kindString": "Parameter", @@ -6811,7 +7118,7 @@ } }, { - "id": 333, + "id": 342, "name": "thread_name", "kind": 32768, "kindString": "Parameter", @@ -6830,7 +7137,7 @@ ], "type": { "type": "reference", - "id": 311, + "id": 320, "name": "BotkitConversation" } } @@ -6838,13 +7145,13 @@ "sources": [ { "fileName": "conversation.ts", - "line": 250, + "line": 253, "character": 24 } ] }, { - "id": 334, + "id": 343, "name": "addMessage", "kind": 2048, "kindString": "Method", @@ -6855,7 +7162,7 @@ }, "signatures": [ { - "id": 335, + "id": 344, "name": "addMessage", "kind": 4096, "kindString": "Call signature", @@ -6868,7 +7175,7 @@ }, "parameters": [ { - "id": 336, + "id": 345, "name": "message", "kind": 32768, "kindString": "Parameter", @@ -6886,7 +7193,7 @@ "typeArguments": [ { "type": "reference", - "id": 261, + "id": 270, "name": "BotkitMessageTemplate" } ], @@ -6900,7 +7207,7 @@ } }, { - "id": 337, + "id": 346, "name": "thread_name", "kind": 32768, "kindString": "Parameter", @@ -6918,7 +7225,7 @@ ], "type": { "type": "reference", - "id": 311, + "id": 320, "name": "BotkitConversation" } } @@ -6926,13 +7233,13 @@ "sources": [ { "fileName": "conversation.ts", - "line": 279, + "line": 282, "character": 21 } ] }, { - "id": 345, + "id": 354, "name": "addQuestion", "kind": 2048, "kindString": "Method", @@ -6943,7 +7250,7 @@ }, "signatures": [ { - "id": 346, + "id": 355, "name": "addQuestion", "kind": 4096, "kindString": "Call signature", @@ -6956,7 +7263,7 @@ }, "parameters": [ { - "id": 347, + "id": 356, "name": "message", "kind": 32768, "kindString": "Parameter", @@ -6974,7 +7281,7 @@ "typeArguments": [ { "type": "reference", - "id": 261, + "id": 270, "name": "BotkitMessageTemplate" } ], @@ -6988,7 +7295,7 @@ } }, { - "id": 348, + "id": 357, "name": "handlers", "kind": 32768, "kindString": "Parameter", @@ -7003,14 +7310,14 @@ "types": [ { "type": "reference", - "id": 251, + "id": 259, "name": "BotkitConvoHandler" }, { "type": "array", "elementType": { "type": "reference", - "id": 256, + "id": 265, "name": "BotkitConvoTrigger" } } @@ -7018,7 +7325,7 @@ } }, { - "id": 349, + "id": 358, "name": "key", "kind": 32768, "kindString": "Parameter", @@ -7034,7 +7341,7 @@ { "type": "reflection", "declaration": { - "id": 350, + "id": 359, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -7043,7 +7350,7 @@ }, "children": [ { - "id": 351, + "id": 360, "name": "key", "kind": 32, "kindString": "Variable", @@ -7054,7 +7361,7 @@ "sources": [ { "fileName": "conversation.ts", - "line": 355, + "line": 358, "character": 135 } ], @@ -7069,14 +7376,14 @@ "title": "Variables", "kind": 32, "children": [ - 351 + 360 ] } ], "sources": [ { "fileName": "conversation.ts", - "line": 355, + "line": 358, "character": 130 } ] @@ -7094,7 +7401,7 @@ } }, { - "id": 352, + "id": 361, "name": "thread_name", "kind": 32768, "kindString": "Parameter", @@ -7112,7 +7419,7 @@ ], "type": { "type": "reference", - "id": 311, + "id": 320, "name": "BotkitConversation" } } @@ -7120,13 +7427,13 @@ "sources": [ { "fileName": "conversation.ts", - "line": 355, + "line": 358, "character": 22 } ] }, { - "id": 361, + "id": 370, "name": "after", "kind": 2048, "kindString": "Method", @@ -7137,7 +7444,7 @@ }, "signatures": [ { - "id": 362, + "id": 371, "name": "after", "kind": 4096, "kindString": "Call signature", @@ -7150,7 +7457,7 @@ }, "parameters": [ { - "id": 363, + "id": 372, "name": "handler", "kind": 32768, "kindString": "Parameter", @@ -7163,7 +7470,7 @@ "type": { "type": "reflection", "declaration": { - "id": 364, + "id": 373, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -7172,7 +7479,7 @@ }, "signatures": [ { - "id": 365, + "id": 374, "name": "__call", "kind": 4096, "kindString": "Call signature", @@ -7181,7 +7488,7 @@ }, "parameters": [ { - "id": 366, + "id": 375, "name": "results", "kind": 32768, "kindString": "Parameter", @@ -7194,7 +7501,7 @@ } }, { - "id": 367, + "id": 376, "name": "bot", "kind": 32768, "kindString": "Parameter", @@ -7217,7 +7524,7 @@ "sources": [ { "fileName": "conversation.ts", - "line": 465, + "line": 471, "character": 25 } ] @@ -7234,13 +7541,13 @@ "sources": [ { "fileName": "conversation.ts", - "line": 465, + "line": 471, "character": 16 } ] }, { - "id": 338, + "id": 347, "name": "ask", "kind": 2048, "kindString": "Method", @@ -7251,7 +7558,7 @@ }, "signatures": [ { - "id": 339, + "id": 348, "name": "ask", "kind": 4096, "kindString": "Call signature", @@ -7260,11 +7567,11 @@ }, "comment": { "shortText": "Add a question to the default thread.\nIn addition to a message template, receives either a single handler function to call when an answer is provided,\nor an array of handlers paired with trigger patterns. When providing multiple conditions to test, developers may also provide a\nhandler marked as the default choice.", - "text": "[Learn more about building conversations →](../conversations.md#build-a-conversation)\n```javascript\n// ask a question, handle the response with a function\nconvo.ask('What is your name?', async(response, convo, bot) => {\n await bot.say('Oh your name is ' + response);\n}, {key: 'name'});\n\n// ask a question, evaluate answer, take conditional action based on response\nconvo.ask('Do you want to eat a taco?', [\n {\n pattern: 'yes',\n type: 'string',\n handler: async(response, convo, bot) => {\n return await convo.gotoThread('yes_taco');\n }\n },\n {\n pattern: 'no',\n type: 'string',\n handler: async(response, convo, bot) => {\n return await convo.gotoThread('no_taco');\n }\n },s\n {\n default: true,\n handler: async(response, convo, bot) => {\n await bot.say('I do not understand your response!');\n // start over!\n return await convo.repeat();\n }\n }\n], {key: 'tacos'});\n```\n" + "text": "[Learn more about building conversations →](../conversations.md#build-a-conversation)\n```javascript\n// ask a question, handle the response with a function\nconvo.ask('What is your name?', async(response, convo, bot, full_message) => {\n await bot.say('Oh your name is ' + response);\n}, {key: 'name'});\n\n// ask a question, evaluate answer, take conditional action based on response\nconvo.ask('Do you want to eat a taco?', [\n {\n pattern: 'yes',\n type: 'string',\n handler: async(response_text, convo, bot, full_message) => {\n return await convo.gotoThread('yes_taco');\n }\n },\n {\n pattern: 'no',\n type: 'string',\n handler: async(response_text, convo, bot, full_message) => {\n return await convo.gotoThread('no_taco');\n }\n },\n {\n default: true,\n handler: async(response_text, convo, bot, full_message) => {\n await bot.say('I do not understand your response!');\n // start over!\n return await convo.repeat();\n }\n }\n], {key: 'tacos'});\n```\n" }, "parameters": [ { - "id": 340, + "id": 349, "name": "message", "kind": 32768, "kindString": "Parameter", @@ -7282,7 +7589,7 @@ "typeArguments": [ { "type": "reference", - "id": 261, + "id": 270, "name": "BotkitMessageTemplate" } ], @@ -7296,7 +7603,7 @@ } }, { - "id": 341, + "id": 350, "name": "handlers", "kind": 32768, "kindString": "Parameter", @@ -7311,14 +7618,14 @@ "types": [ { "type": "reference", - "id": 251, + "id": 259, "name": "BotkitConvoHandler" }, { "type": "array", "elementType": { "type": "reference", - "id": 256, + "id": 265, "name": "BotkitConvoTrigger" } } @@ -7326,7 +7633,7 @@ } }, { - "id": 342, + "id": 351, "name": "key", "kind": 32768, "kindString": "Parameter", @@ -7342,7 +7649,7 @@ { "type": "reflection", "declaration": { - "id": 343, + "id": 352, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -7351,7 +7658,7 @@ }, "children": [ { - "id": 344, + "id": 353, "name": "key", "kind": 32, "kindString": "Variable", @@ -7362,7 +7669,7 @@ "sources": [ { "fileName": "conversation.ts", - "line": 341, + "line": 344, "character": 127 } ], @@ -7377,14 +7684,14 @@ "title": "Variables", "kind": 32, "children": [ - 344 + 353 ] } ], "sources": [ { "fileName": "conversation.ts", - "line": 341, + "line": 344, "character": 122 } ] @@ -7404,7 +7711,7 @@ ], "type": { "type": "reference", - "id": 311, + "id": 320, "name": "BotkitConversation" } } @@ -7412,13 +7719,13 @@ "sources": [ { "fileName": "conversation.ts", - "line": 341, + "line": 344, "character": 14 } ] }, { - "id": 353, + "id": 362, "name": "before", "kind": 2048, "kindString": "Method", @@ -7429,7 +7736,7 @@ }, "signatures": [ { - "id": 354, + "id": 363, "name": "before", "kind": 4096, "kindString": "Call signature", @@ -7442,7 +7749,7 @@ }, "parameters": [ { - "id": 355, + "id": 364, "name": "thread_name", "kind": 32768, "kindString": "Parameter", @@ -7458,7 +7765,7 @@ } }, { - "id": 356, + "id": 365, "name": "handler", "kind": 32768, "kindString": "Parameter", @@ -7471,7 +7778,7 @@ "type": { "type": "reflection", "declaration": { - "id": 357, + "id": 366, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -7480,7 +7787,7 @@ }, "signatures": [ { - "id": 358, + "id": 367, "name": "__call", "kind": 4096, "kindString": "Call signature", @@ -7489,7 +7796,7 @@ }, "parameters": [ { - "id": 359, + "id": 368, "name": "convo", "kind": 32768, "kindString": "Parameter", @@ -7498,12 +7805,12 @@ }, "type": { "type": "reference", - "id": 230, + "id": 238, "name": "BotkitDialogWrapper" } }, { - "id": 360, + "id": 369, "name": "bot", "kind": 32768, "kindString": "Parameter", @@ -7532,7 +7839,7 @@ "sources": [ { "fileName": "conversation.ts", - "line": 413, + "line": 419, "character": 47 } ] @@ -7549,13 +7856,13 @@ "sources": [ { "fileName": "conversation.ts", - "line": 413, + "line": 419, "character": 17 } ] }, { - "id": 368, + "id": 377, "name": "onChange", "kind": 2048, "kindString": "Method", @@ -7566,7 +7873,7 @@ }, "signatures": [ { - "id": 369, + "id": 378, "name": "onChange", "kind": 4096, "kindString": "Call signature", @@ -7579,7 +7886,7 @@ }, "parameters": [ { - "id": 370, + "id": 379, "name": "variable", "kind": 32768, "kindString": "Parameter", @@ -7595,7 +7902,7 @@ } }, { - "id": 371, + "id": 380, "name": "handler", "kind": 32768, "kindString": "Parameter", @@ -7608,7 +7915,7 @@ "type": { "type": "reflection", "declaration": { - "id": 372, + "id": 381, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -7617,7 +7924,7 @@ }, "signatures": [ { - "id": 373, + "id": 382, "name": "__call", "kind": 4096, "kindString": "Call signature", @@ -7626,7 +7933,7 @@ }, "parameters": [ { - "id": 374, + "id": 383, "name": "response", "kind": 32768, "kindString": "Parameter", @@ -7639,7 +7946,7 @@ } }, { - "id": 375, + "id": 384, "name": "convo", "kind": 32768, "kindString": "Parameter", @@ -7652,7 +7959,7 @@ } }, { - "id": 376, + "id": 385, "name": "bot", "kind": 32768, "kindString": "Parameter", @@ -7680,7 +7987,7 @@ "sources": [ { "fileName": "conversation.ts", - "line": 501, + "line": 506, "character": 46 } ] @@ -7697,13 +8004,13 @@ "sources": [ { "fileName": "conversation.ts", - "line": 501, + "line": 506, "character": 19 } ] }, { - "id": 318, + "id": 327, "name": "say", "kind": 2048, "kindString": "Method", @@ -7714,7 +8021,7 @@ }, "signatures": [ { - "id": 319, + "id": 328, "name": "say", "kind": 4096, "kindString": "Call signature", @@ -7727,7 +8034,7 @@ }, "parameters": [ { - "id": 320, + "id": 329, "name": "message", "kind": 32768, "kindString": "Parameter", @@ -7745,7 +8052,7 @@ "typeArguments": [ { "type": "reference", - "id": 261, + "id": 270, "name": "BotkitMessageTemplate" } ], @@ -7761,7 +8068,7 @@ ], "type": { "type": "reference", - "id": 311, + "id": 320, "name": "BotkitConversation" } } @@ -7769,7 +8076,7 @@ "sources": [ { "fileName": "conversation.ts", - "line": 164, + "line": 167, "character": 14 } ] @@ -7780,30 +8087,30 @@ "title": "Constructors", "kind": 512, "children": [ - 314 + 323 ] }, { "title": "Properties", "kind": 1024, "children": [ - 313 + 322 ] }, { "title": "Methods", "kind": 2048, "children": [ - 321, - 325, 330, 334, - 345, - 361, - 338, - 353, - 368, - 318 + 339, + 343, + 354, + 370, + 347, + 362, + 377, + 327 ] } ], @@ -7822,7 +8129,7 @@ ], "props": [ { - "id": 313, + "id": 322, "name": "script", "kind": 1024, "kindString": "Property", @@ -7849,7 +8156,7 @@ ], "methods": [ { - "id": 321, + "id": 330, "name": "addAction", "kind": 2048, "kindString": "Method", @@ -7860,7 +8167,7 @@ }, "signatures": [ { - "id": 322, + "id": 331, "name": "addAction", "kind": 4096, "kindString": "Call signature", @@ -7873,7 +8180,7 @@ }, "parameters": [ { - "id": 323, + "id": 332, "name": "action", "kind": 32768, "kindString": "Parameter", @@ -7889,7 +8196,7 @@ } }, { - "id": 324, + "id": 333, "name": "thread_name", "kind": 32768, "kindString": "Parameter", @@ -7908,7 +8215,7 @@ ], "type": { "type": "reference", - "id": 311, + "id": 320, "name": "BotkitConversation" } } @@ -7916,13 +8223,13 @@ "sources": [ { "fileName": "conversation.ts", - "line": 194, + "line": 197, "character": 20 } ] }, { - "id": 325, + "id": 334, "name": "addChildDialog", "kind": 2048, "kindString": "Method", @@ -7933,7 +8240,7 @@ }, "signatures": [ { - "id": 326, + "id": 335, "name": "addChildDialog", "kind": 4096, "kindString": "Call signature", @@ -7946,7 +8253,7 @@ }, "parameters": [ { - "id": 327, + "id": 336, "name": "dialog_id", "kind": 32768, "kindString": "Parameter", @@ -7962,7 +8269,7 @@ } }, { - "id": 328, + "id": 337, "name": "key_name", "kind": 32768, "kindString": "Parameter", @@ -7979,7 +8286,7 @@ } }, { - "id": 329, + "id": 338, "name": "thread_name", "kind": 32768, "kindString": "Parameter", @@ -7998,7 +8305,7 @@ ], "type": { "type": "reference", - "id": 311, + "id": 320, "name": "BotkitConversation" } } @@ -8006,13 +8313,13 @@ "sources": [ { "fileName": "conversation.ts", - "line": 223, + "line": 226, "character": 25 } ] }, { - "id": 330, + "id": 339, "name": "addGotoDialog", "kind": 2048, "kindString": "Method", @@ -8023,7 +8330,7 @@ }, "signatures": [ { - "id": 331, + "id": 340, "name": "addGotoDialog", "kind": 4096, "kindString": "Call signature", @@ -8036,7 +8343,7 @@ }, "parameters": [ { - "id": 332, + "id": 341, "name": "dialog_id", "kind": 32768, "kindString": "Parameter", @@ -8052,7 +8359,7 @@ } }, { - "id": 333, + "id": 342, "name": "thread_name", "kind": 32768, "kindString": "Parameter", @@ -8071,7 +8378,7 @@ ], "type": { "type": "reference", - "id": 311, + "id": 320, "name": "BotkitConversation" } } @@ -8079,13 +8386,13 @@ "sources": [ { "fileName": "conversation.ts", - "line": 250, + "line": 253, "character": 24 } ] }, { - "id": 334, + "id": 343, "name": "addMessage", "kind": 2048, "kindString": "Method", @@ -8096,7 +8403,7 @@ }, "signatures": [ { - "id": 335, + "id": 344, "name": "addMessage", "kind": 4096, "kindString": "Call signature", @@ -8109,7 +8416,7 @@ }, "parameters": [ { - "id": 336, + "id": 345, "name": "message", "kind": 32768, "kindString": "Parameter", @@ -8127,7 +8434,7 @@ "typeArguments": [ { "type": "reference", - "id": 261, + "id": 270, "name": "BotkitMessageTemplate" } ], @@ -8141,7 +8448,7 @@ } }, { - "id": 337, + "id": 346, "name": "thread_name", "kind": 32768, "kindString": "Parameter", @@ -8159,7 +8466,7 @@ ], "type": { "type": "reference", - "id": 311, + "id": 320, "name": "BotkitConversation" } } @@ -8167,13 +8474,13 @@ "sources": [ { "fileName": "conversation.ts", - "line": 279, + "line": 282, "character": 21 } ] }, { - "id": 345, + "id": 354, "name": "addQuestion", "kind": 2048, "kindString": "Method", @@ -8184,7 +8491,7 @@ }, "signatures": [ { - "id": 346, + "id": 355, "name": "addQuestion", "kind": 4096, "kindString": "Call signature", @@ -8197,7 +8504,7 @@ }, "parameters": [ { - "id": 347, + "id": 356, "name": "message", "kind": 32768, "kindString": "Parameter", @@ -8215,7 +8522,7 @@ "typeArguments": [ { "type": "reference", - "id": 261, + "id": 270, "name": "BotkitMessageTemplate" } ], @@ -8229,7 +8536,7 @@ } }, { - "id": 348, + "id": 357, "name": "handlers", "kind": 32768, "kindString": "Parameter", @@ -8244,14 +8551,14 @@ "types": [ { "type": "reference", - "id": 251, + "id": 259, "name": "BotkitConvoHandler" }, { "type": "array", "elementType": { "type": "reference", - "id": 256, + "id": 265, "name": "BotkitConvoTrigger" } } @@ -8259,7 +8566,7 @@ } }, { - "id": 349, + "id": 358, "name": "key", "kind": 32768, "kindString": "Parameter", @@ -8275,7 +8582,7 @@ { "type": "reflection", "declaration": { - "id": 350, + "id": 359, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -8284,7 +8591,7 @@ }, "children": [ { - "id": 351, + "id": 360, "name": "key", "kind": 32, "kindString": "Variable", @@ -8295,7 +8602,7 @@ "sources": [ { "fileName": "conversation.ts", - "line": 355, + "line": 358, "character": 135 } ], @@ -8310,14 +8617,14 @@ "title": "Variables", "kind": 32, "children": [ - 351 + 360 ] } ], "sources": [ { "fileName": "conversation.ts", - "line": 355, + "line": 358, "character": 130 } ] @@ -8335,7 +8642,7 @@ } }, { - "id": 352, + "id": 361, "name": "thread_name", "kind": 32768, "kindString": "Parameter", @@ -8353,7 +8660,7 @@ ], "type": { "type": "reference", - "id": 311, + "id": 320, "name": "BotkitConversation" } } @@ -8361,13 +8668,13 @@ "sources": [ { "fileName": "conversation.ts", - "line": 355, + "line": 358, "character": 22 } ] }, { - "id": 361, + "id": 370, "name": "after", "kind": 2048, "kindString": "Method", @@ -8378,7 +8685,7 @@ }, "signatures": [ { - "id": 362, + "id": 371, "name": "after", "kind": 4096, "kindString": "Call signature", @@ -8391,7 +8698,7 @@ }, "parameters": [ { - "id": 363, + "id": 372, "name": "handler", "kind": 32768, "kindString": "Parameter", @@ -8404,7 +8711,7 @@ "type": { "type": "reflection", "declaration": { - "id": 364, + "id": 373, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -8413,7 +8720,7 @@ }, "signatures": [ { - "id": 365, + "id": 374, "name": "__call", "kind": 4096, "kindString": "Call signature", @@ -8422,7 +8729,7 @@ }, "parameters": [ { - "id": 366, + "id": 375, "name": "results", "kind": 32768, "kindString": "Parameter", @@ -8435,7 +8742,7 @@ } }, { - "id": 367, + "id": 376, "name": "bot", "kind": 32768, "kindString": "Parameter", @@ -8458,7 +8765,7 @@ "sources": [ { "fileName": "conversation.ts", - "line": 465, + "line": 471, "character": 25 } ] @@ -8475,13 +8782,13 @@ "sources": [ { "fileName": "conversation.ts", - "line": 465, + "line": 471, "character": 16 } ] }, { - "id": 338, + "id": 347, "name": "ask", "kind": 2048, "kindString": "Method", @@ -8492,7 +8799,7 @@ }, "signatures": [ { - "id": 339, + "id": 348, "name": "ask", "kind": 4096, "kindString": "Call signature", @@ -8501,11 +8808,11 @@ }, "comment": { "shortText": "Add a question to the default thread.\nIn addition to a message template, receives either a single handler function to call when an answer is provided,\nor an array of handlers paired with trigger patterns. When providing multiple conditions to test, developers may also provide a\nhandler marked as the default choice.", - "text": "[Learn more about building conversations →](../conversations.md#build-a-conversation)\n```javascript\n// ask a question, handle the response with a function\nconvo.ask('What is your name?', async(response, convo, bot) => {\n await bot.say('Oh your name is ' + response);\n}, {key: 'name'});\n\n// ask a question, evaluate answer, take conditional action based on response\nconvo.ask('Do you want to eat a taco?', [\n {\n pattern: 'yes',\n type: 'string',\n handler: async(response, convo, bot) => {\n return await convo.gotoThread('yes_taco');\n }\n },\n {\n pattern: 'no',\n type: 'string',\n handler: async(response, convo, bot) => {\n return await convo.gotoThread('no_taco');\n }\n },s\n {\n default: true,\n handler: async(response, convo, bot) => {\n await bot.say('I do not understand your response!');\n // start over!\n return await convo.repeat();\n }\n }\n], {key: 'tacos'});\n```\n" + "text": "[Learn more about building conversations →](../conversations.md#build-a-conversation)\n```javascript\n// ask a question, handle the response with a function\nconvo.ask('What is your name?', async(response, convo, bot, full_message) => {\n await bot.say('Oh your name is ' + response);\n}, {key: 'name'});\n\n// ask a question, evaluate answer, take conditional action based on response\nconvo.ask('Do you want to eat a taco?', [\n {\n pattern: 'yes',\n type: 'string',\n handler: async(response_text, convo, bot, full_message) => {\n return await convo.gotoThread('yes_taco');\n }\n },\n {\n pattern: 'no',\n type: 'string',\n handler: async(response_text, convo, bot, full_message) => {\n return await convo.gotoThread('no_taco');\n }\n },\n {\n default: true,\n handler: async(response_text, convo, bot, full_message) => {\n await bot.say('I do not understand your response!');\n // start over!\n return await convo.repeat();\n }\n }\n], {key: 'tacos'});\n```\n" }, "parameters": [ { - "id": 340, + "id": 349, "name": "message", "kind": 32768, "kindString": "Parameter", @@ -8523,7 +8830,7 @@ "typeArguments": [ { "type": "reference", - "id": 261, + "id": 270, "name": "BotkitMessageTemplate" } ], @@ -8537,7 +8844,7 @@ } }, { - "id": 341, + "id": 350, "name": "handlers", "kind": 32768, "kindString": "Parameter", @@ -8552,14 +8859,14 @@ "types": [ { "type": "reference", - "id": 251, + "id": 259, "name": "BotkitConvoHandler" }, { "type": "array", "elementType": { "type": "reference", - "id": 256, + "id": 265, "name": "BotkitConvoTrigger" } } @@ -8567,7 +8874,7 @@ } }, { - "id": 342, + "id": 351, "name": "key", "kind": 32768, "kindString": "Parameter", @@ -8583,7 +8890,7 @@ { "type": "reflection", "declaration": { - "id": 343, + "id": 352, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -8592,7 +8899,7 @@ }, "children": [ { - "id": 344, + "id": 353, "name": "key", "kind": 32, "kindString": "Variable", @@ -8603,7 +8910,7 @@ "sources": [ { "fileName": "conversation.ts", - "line": 341, + "line": 344, "character": 127 } ], @@ -8618,14 +8925,14 @@ "title": "Variables", "kind": 32, "children": [ - 344 + 353 ] } ], "sources": [ { "fileName": "conversation.ts", - "line": 341, + "line": 344, "character": 122 } ] @@ -8645,7 +8952,7 @@ ], "type": { "type": "reference", - "id": 311, + "id": 320, "name": "BotkitConversation" } } @@ -8653,13 +8960,13 @@ "sources": [ { "fileName": "conversation.ts", - "line": 341, + "line": 344, "character": 14 } ] }, { - "id": 353, + "id": 362, "name": "before", "kind": 2048, "kindString": "Method", @@ -8670,7 +8977,7 @@ }, "signatures": [ { - "id": 354, + "id": 363, "name": "before", "kind": 4096, "kindString": "Call signature", @@ -8683,7 +8990,7 @@ }, "parameters": [ { - "id": 355, + "id": 364, "name": "thread_name", "kind": 32768, "kindString": "Parameter", @@ -8699,7 +9006,7 @@ } }, { - "id": 356, + "id": 365, "name": "handler", "kind": 32768, "kindString": "Parameter", @@ -8712,7 +9019,7 @@ "type": { "type": "reflection", "declaration": { - "id": 357, + "id": 366, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -8721,7 +9028,7 @@ }, "signatures": [ { - "id": 358, + "id": 367, "name": "__call", "kind": 4096, "kindString": "Call signature", @@ -8730,7 +9037,7 @@ }, "parameters": [ { - "id": 359, + "id": 368, "name": "convo", "kind": 32768, "kindString": "Parameter", @@ -8739,12 +9046,12 @@ }, "type": { "type": "reference", - "id": 230, + "id": 238, "name": "BotkitDialogWrapper" } }, { - "id": 360, + "id": 369, "name": "bot", "kind": 32768, "kindString": "Parameter", @@ -8773,7 +9080,7 @@ "sources": [ { "fileName": "conversation.ts", - "line": 413, + "line": 419, "character": 47 } ] @@ -8790,13 +9097,13 @@ "sources": [ { "fileName": "conversation.ts", - "line": 413, + "line": 419, "character": 17 } ] }, { - "id": 368, + "id": 377, "name": "onChange", "kind": 2048, "kindString": "Method", @@ -8807,7 +9114,7 @@ }, "signatures": [ { - "id": 369, + "id": 378, "name": "onChange", "kind": 4096, "kindString": "Call signature", @@ -8820,7 +9127,7 @@ }, "parameters": [ { - "id": 370, + "id": 379, "name": "variable", "kind": 32768, "kindString": "Parameter", @@ -8836,7 +9143,7 @@ } }, { - "id": 371, + "id": 380, "name": "handler", "kind": 32768, "kindString": "Parameter", @@ -8849,7 +9156,7 @@ "type": { "type": "reflection", "declaration": { - "id": 372, + "id": 381, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -8858,7 +9165,7 @@ }, "signatures": [ { - "id": 373, + "id": 382, "name": "__call", "kind": 4096, "kindString": "Call signature", @@ -8867,7 +9174,7 @@ }, "parameters": [ { - "id": 374, + "id": 383, "name": "response", "kind": 32768, "kindString": "Parameter", @@ -8880,7 +9187,7 @@ } }, { - "id": 375, + "id": 384, "name": "convo", "kind": 32768, "kindString": "Parameter", @@ -8893,7 +9200,7 @@ } }, { - "id": 376, + "id": 385, "name": "bot", "kind": 32768, "kindString": "Parameter", @@ -8921,7 +9228,7 @@ "sources": [ { "fileName": "conversation.ts", - "line": 501, + "line": 506, "character": 46 } ] @@ -8938,13 +9245,13 @@ "sources": [ { "fileName": "conversation.ts", - "line": 501, + "line": 506, "character": 19 } ] }, { - "id": 318, + "id": 327, "name": "say", "kind": 2048, "kindString": "Method", @@ -8955,7 +9262,7 @@ }, "signatures": [ { - "id": 319, + "id": 328, "name": "say", "kind": 4096, "kindString": "Call signature", @@ -8968,7 +9275,7 @@ }, "parameters": [ { - "id": 320, + "id": 329, "name": "message", "kind": 32768, "kindString": "Parameter", @@ -8986,7 +9293,7 @@ "typeArguments": [ { "type": "reference", - "id": 261, + "id": 270, "name": "BotkitMessageTemplate" } ], @@ -9002,7 +9309,7 @@ ], "type": { "type": "reference", - "id": 311, + "id": 320, "name": "BotkitConversation" } } @@ -9010,7 +9317,7 @@ "sources": [ { "fileName": "conversation.ts", - "line": 164, + "line": 167, "character": 14 } ] @@ -9018,7 +9325,7 @@ ], "constructors": [ { - "id": 314, + "id": 323, "name": "constructor", "kind": 512, "kindString": "Constructor", @@ -9032,7 +9339,7 @@ }, "signatures": [ { - "id": 315, + "id": 324, "name": "new BotkitConversation", "kind": 16384, "kindString": "Constructor signature", @@ -9044,7 +9351,7 @@ }, "parameters": [ { - "id": 316, + "id": 325, "name": "dialogId", "kind": 32768, "kindString": "Parameter", @@ -9060,7 +9367,7 @@ } }, { - "id": 317, + "id": 326, "name": "controller", "kind": 32768, "kindString": "Parameter", @@ -9072,14 +9379,14 @@ }, "type": { "type": "reference", - "id": 119, + "id": 126, "name": "Botkit" } } ], "type": { "type": "reference", - "id": 311, + "id": 320, "name": "BotkitConversation" } } @@ -9095,7 +9402,7 @@ ] }, { - "id": 230, + "id": 238, "name": "BotkitDialogWrapper", "kind": 128, "kindString": "Class", @@ -9108,7 +9415,7 @@ }, "children": [ { - "id": 235, + "id": 243, "name": "constructor", "kind": 512, "kindString": "Constructor", @@ -9119,7 +9426,7 @@ }, "signatures": [ { - "id": 236, + "id": 244, "name": "new BotkitDialogWrapper", "kind": 16384, "kindString": "Constructor signature", @@ -9128,7 +9435,7 @@ }, "parameters": [ { - "id": 237, + "id": 245, "name": "dc", "kind": 32768, "kindString": "Parameter", @@ -9141,7 +9448,7 @@ } }, { - "id": 238, + "id": 246, "name": "step", "kind": 32768, "kindString": "Parameter", @@ -9150,14 +9457,14 @@ }, "type": { "type": "reference", - "id": 298, + "id": 307, "name": "BotkitConversationStep" } } ], "type": { "type": "reference", - "id": 230, + "id": 238, "name": "BotkitDialogWrapper" } } @@ -9171,7 +9478,7 @@ ] }, { - "id": 231, + "id": 239, "name": "vars", "kind": 1024, "kindString": "Property", @@ -9193,7 +9500,7 @@ "type": { "type": "reflection", "declaration": { - "id": 232, + "id": 240, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -9202,7 +9509,7 @@ }, "indexSignature": [ { - "id": 233, + "id": 241, "name": "__index", "kind": 8192, "kindString": "Index signature", @@ -9211,7 +9518,7 @@ }, "parameters": [ { - "id": 234, + "id": 242, "name": "key", "kind": 32768, "kindString": "Parameter", @@ -9241,7 +9548,7 @@ } }, { - "id": 239, + "id": 247, "name": "gotoThread", "kind": 2048, "kindString": "Method", @@ -9252,7 +9559,7 @@ }, "signatures": [ { - "id": 240, + "id": 248, "name": "gotoThread", "kind": 4096, "kindString": "Call signature", @@ -9264,7 +9571,7 @@ }, "parameters": [ { - "id": 241, + "id": 249, "name": "thread", "kind": 32768, "kindString": "Parameter", @@ -9301,7 +9608,7 @@ ] }, { - "id": 242, + "id": 250, "name": "repeat", "kind": 2048, "kindString": "Method", @@ -9312,7 +9619,7 @@ }, "signatures": [ { - "id": 243, + "id": 251, "name": "repeat", "kind": 4096, "kindString": "Call signature", @@ -9343,7 +9650,7 @@ ] }, { - "id": 246, + "id": 254, "name": "setVar", "kind": 2048, "kindString": "Method", @@ -9354,7 +9661,7 @@ }, "signatures": [ { - "id": 247, + "id": 255, "name": "setVar", "kind": 4096, "kindString": "Call signature", @@ -9366,7 +9673,7 @@ }, "parameters": [ { - "id": 248, + "id": 256, "name": "key", "kind": 32768, "kindString": "Parameter", @@ -9382,7 +9689,7 @@ } }, { - "id": 249, + "id": 257, "name": "val", "kind": 32768, "kindString": "Parameter", @@ -9413,7 +9720,7 @@ ] }, { - "id": 244, + "id": 252, "name": "stop", "kind": 2048, "kindString": "Method", @@ -9424,7 +9731,7 @@ }, "signatures": [ { - "id": 245, + "id": 253, "name": "stop", "kind": 4096, "kindString": "Call signature", @@ -9460,24 +9767,24 @@ "title": "Constructors", "kind": 512, "children": [ - 235 + 243 ] }, { "title": "Properties", "kind": 1024, "children": [ - 231 + 239 ] }, { "title": "Methods", "kind": 2048, "children": [ - 239, - 242, - 246, - 244 + 247, + 250, + 254, + 252 ] } ], @@ -9490,7 +9797,7 @@ ], "props": [ { - "id": 231, + "id": 239, "name": "vars", "kind": 1024, "kindString": "Property", @@ -9512,7 +9819,7 @@ "type": { "type": "reflection", "declaration": { - "id": 232, + "id": 240, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -9521,7 +9828,7 @@ }, "indexSignature": [ { - "id": 233, + "id": 241, "name": "__index", "kind": 8192, "kindString": "Index signature", @@ -9530,7 +9837,7 @@ }, "parameters": [ { - "id": 234, + "id": 242, "name": "key", "kind": 32768, "kindString": "Parameter", @@ -9562,7 +9869,7 @@ ], "methods": [ { - "id": 239, + "id": 247, "name": "gotoThread", "kind": 2048, "kindString": "Method", @@ -9573,7 +9880,7 @@ }, "signatures": [ { - "id": 240, + "id": 248, "name": "gotoThread", "kind": 4096, "kindString": "Call signature", @@ -9585,7 +9892,7 @@ }, "parameters": [ { - "id": 241, + "id": 249, "name": "thread", "kind": 32768, "kindString": "Parameter", @@ -9622,7 +9929,7 @@ ] }, { - "id": 242, + "id": 250, "name": "repeat", "kind": 2048, "kindString": "Method", @@ -9633,7 +9940,7 @@ }, "signatures": [ { - "id": 243, + "id": 251, "name": "repeat", "kind": 4096, "kindString": "Call signature", @@ -9664,7 +9971,7 @@ ] }, { - "id": 246, + "id": 254, "name": "setVar", "kind": 2048, "kindString": "Method", @@ -9675,7 +9982,7 @@ }, "signatures": [ { - "id": 247, + "id": 255, "name": "setVar", "kind": 4096, "kindString": "Call signature", @@ -9687,7 +9994,7 @@ }, "parameters": [ { - "id": 248, + "id": 256, "name": "key", "kind": 32768, "kindString": "Parameter", @@ -9703,7 +10010,7 @@ } }, { - "id": 249, + "id": 257, "name": "val", "kind": 32768, "kindString": "Parameter", @@ -9734,7 +10041,7 @@ ] }, { - "id": 244, + "id": 252, "name": "stop", "kind": 2048, "kindString": "Method", @@ -9745,7 +10052,7 @@ }, "signatures": [ { - "id": 245, + "id": 253, "name": "stop", "kind": 4096, "kindString": "Call signature", @@ -9778,7 +10085,7 @@ ], "constructors": [ { - "id": 235, + "id": 243, "name": "constructor", "kind": 512, "kindString": "Constructor", @@ -9789,7 +10096,7 @@ }, "signatures": [ { - "id": 236, + "id": 244, "name": "new BotkitDialogWrapper", "kind": 16384, "kindString": "Constructor signature", @@ -9798,7 +10105,7 @@ }, "parameters": [ { - "id": 237, + "id": 245, "name": "dc", "kind": 32768, "kindString": "Parameter", @@ -9811,7 +10118,7 @@ } }, { - "id": 238, + "id": 246, "name": "step", "kind": 32768, "kindString": "Parameter", @@ -9820,14 +10127,14 @@ }, "type": { "type": "reference", - "id": 298, + "id": 307, "name": "BotkitConversationStep" } } ], "type": { "type": "reference", - "id": 230, + "id": 238, "name": "BotkitDialogWrapper" } } @@ -9843,7 +10150,7 @@ ] }, { - "id": 394, + "id": 403, "name": "BotkitTestClient", "kind": 128, "kindString": "Class", @@ -9856,7 +10163,7 @@ }, "children": [ { - "id": 397, + "id": 406, "name": "constructor", "kind": 512, "kindString": "Constructor", @@ -9871,7 +10178,7 @@ }, "signatures": [ { - "id": 398, + "id": 407, "name": "new BotkitTestClient", "kind": 16384, "kindString": "Constructor signature", @@ -9884,7 +10191,7 @@ }, "parameters": [ { - "id": 399, + "id": 408, "name": "channelId", "kind": 32768, "kindString": "Parameter", @@ -9900,7 +10207,7 @@ } }, { - "id": 400, + "id": 409, "name": "bot", "kind": 32768, "kindString": "Parameter", @@ -9912,12 +10219,12 @@ }, "type": { "type": "reference", - "id": 119, + "id": 126, "name": "Botkit" } }, { - "id": 401, + "id": 410, "name": "dialogToTest", "kind": 32768, "kindString": "Parameter", @@ -9945,7 +10252,7 @@ } }, { - "id": 402, + "id": 411, "name": "initialDialogOptions", "kind": 32768, "kindString": "Parameter", @@ -9962,7 +10269,7 @@ } }, { - "id": 403, + "id": 412, "name": "middlewares", "kind": 32768, "kindString": "Parameter", @@ -9982,7 +10289,7 @@ } }, { - "id": 404, + "id": 413, "name": "conversationState", "kind": 32768, "kindString": "Parameter", @@ -10001,12 +10308,12 @@ ], "type": { "type": "reference", - "id": 394, + "id": 403, "name": "BotkitTestClient" } }, { - "id": 405, + "id": 414, "name": "new BotkitTestClient", "kind": 16384, "kindString": "Constructor signature", @@ -10019,7 +10326,7 @@ }, "parameters": [ { - "id": 406, + "id": 415, "name": "testAdapter", "kind": 32768, "kindString": "Parameter", @@ -10032,7 +10339,7 @@ } }, { - "id": 407, + "id": 416, "name": "bot", "kind": 32768, "kindString": "Parameter", @@ -10044,12 +10351,12 @@ }, "type": { "type": "reference", - "id": 119, + "id": 126, "name": "Botkit" } }, { - "id": 408, + "id": 417, "name": "dialogToTest", "kind": 32768, "kindString": "Parameter", @@ -10077,7 +10384,7 @@ } }, { - "id": 409, + "id": 418, "name": "initialDialogOptions", "kind": 32768, "kindString": "Parameter", @@ -10094,7 +10401,7 @@ } }, { - "id": 410, + "id": 419, "name": "middlewares", "kind": 32768, "kindString": "Parameter", @@ -10114,7 +10421,7 @@ } }, { - "id": 411, + "id": 420, "name": "conversationState", "kind": 32768, "kindString": "Parameter", @@ -10133,7 +10440,7 @@ ], "type": { "type": "reference", - "id": 394, + "id": 403, "name": "BotkitTestClient" } } @@ -10157,7 +10464,7 @@ ] }, { - "id": 396, + "id": 405, "name": "conversationState", "kind": 1024, "kindString": "Property", @@ -10179,7 +10486,7 @@ } }, { - "id": 395, + "id": 404, "name": "dialogTurnResult", "kind": 1024, "kindString": "Property", @@ -10201,7 +10508,7 @@ } }, { - "id": 415, + "id": 424, "name": "getNextReply", "kind": 2048, "kindString": "Method", @@ -10212,7 +10519,7 @@ }, "signatures": [ { - "id": 416, + "id": 425, "name": "getNextReply", "kind": 4096, "kindString": "Call signature", @@ -10243,7 +10550,7 @@ ] }, { - "id": 412, + "id": 421, "name": "sendActivity", "kind": 2048, "kindString": "Method", @@ -10254,7 +10561,7 @@ }, "signatures": [ { - "id": 413, + "id": 422, "name": "sendActivity", "kind": 4096, "kindString": "Call signature", @@ -10267,7 +10574,7 @@ }, "parameters": [ { - "id": 414, + "id": 423, "name": "activity", "kind": 32768, "kindString": "Parameter", @@ -10324,23 +10631,23 @@ "title": "Constructors", "kind": 512, "children": [ - 397 + 406 ] }, { "title": "Properties", "kind": 1024, "children": [ - 396, - 395 + 405, + 404 ] }, { "title": "Methods", "kind": 2048, "children": [ - 415, - 412 + 424, + 421 ] } ], @@ -10353,7 +10660,7 @@ ], "props": [ { - "id": 396, + "id": 405, "name": "conversationState", "kind": 1024, "kindString": "Property", @@ -10375,7 +10682,7 @@ } }, { - "id": 395, + "id": 404, "name": "dialogTurnResult", "kind": 1024, "kindString": "Property", @@ -10399,7 +10706,7 @@ ], "methods": [ { - "id": 415, + "id": 424, "name": "getNextReply", "kind": 2048, "kindString": "Method", @@ -10410,7 +10717,7 @@ }, "signatures": [ { - "id": 416, + "id": 425, "name": "getNextReply", "kind": 4096, "kindString": "Call signature", @@ -10441,7 +10748,7 @@ ] }, { - "id": 412, + "id": 421, "name": "sendActivity", "kind": 2048, "kindString": "Method", @@ -10452,7 +10759,7 @@ }, "signatures": [ { - "id": 413, + "id": 422, "name": "sendActivity", "kind": 4096, "kindString": "Call signature", @@ -10465,7 +10772,7 @@ }, "parameters": [ { - "id": 414, + "id": 423, "name": "activity", "kind": 32768, "kindString": "Parameter", @@ -10519,7 +10826,7 @@ ], "constructors": [ { - "id": 397, + "id": 406, "name": "constructor", "kind": 512, "kindString": "Constructor", @@ -10534,7 +10841,7 @@ }, "signatures": [ { - "id": 398, + "id": 407, "name": "new BotkitTestClient", "kind": 16384, "kindString": "Constructor signature", @@ -10547,7 +10854,7 @@ }, "parameters": [ { - "id": 399, + "id": 408, "name": "channelId", "kind": 32768, "kindString": "Parameter", @@ -10563,7 +10870,7 @@ } }, { - "id": 400, + "id": 409, "name": "bot", "kind": 32768, "kindString": "Parameter", @@ -10575,12 +10882,12 @@ }, "type": { "type": "reference", - "id": 119, + "id": 126, "name": "Botkit" } }, { - "id": 401, + "id": 410, "name": "dialogToTest", "kind": 32768, "kindString": "Parameter", @@ -10608,7 +10915,7 @@ } }, { - "id": 402, + "id": 411, "name": "initialDialogOptions", "kind": 32768, "kindString": "Parameter", @@ -10625,7 +10932,7 @@ } }, { - "id": 403, + "id": 412, "name": "middlewares", "kind": 32768, "kindString": "Parameter", @@ -10645,7 +10952,7 @@ } }, { - "id": 404, + "id": 413, "name": "conversationState", "kind": 32768, "kindString": "Parameter", @@ -10664,12 +10971,12 @@ ], "type": { "type": "reference", - "id": 394, + "id": 403, "name": "BotkitTestClient" } }, { - "id": 405, + "id": 414, "name": "new BotkitTestClient", "kind": 16384, "kindString": "Constructor signature", @@ -10682,7 +10989,7 @@ }, "parameters": [ { - "id": 406, + "id": 415, "name": "testAdapter", "kind": 32768, "kindString": "Parameter", @@ -10695,7 +11002,7 @@ } }, { - "id": 407, + "id": 416, "name": "bot", "kind": 32768, "kindString": "Parameter", @@ -10707,12 +11014,12 @@ }, "type": { "type": "reference", - "id": 119, + "id": 126, "name": "Botkit" } }, { - "id": 408, + "id": 417, "name": "dialogToTest", "kind": 32768, "kindString": "Parameter", @@ -10740,7 +11047,7 @@ } }, { - "id": 409, + "id": 418, "name": "initialDialogOptions", "kind": 32768, "kindString": "Parameter", @@ -10757,7 +11064,7 @@ } }, { - "id": 410, + "id": 419, "name": "middlewares", "kind": 32768, "kindString": "Parameter", @@ -10777,7 +11084,7 @@ } }, { - "id": 411, + "id": 420, "name": "conversationState", "kind": 32768, "kindString": "Parameter", @@ -10796,7 +11103,7 @@ ], "type": { "type": "reference", - "id": 394, + "id": 403, "name": "BotkitTestClient" } } @@ -10824,7 +11131,7 @@ ], "interfaces": [ { - "id": 73, + "id": 80, "name": "BotkitConfiguration", "kind": 256, "kindString": "Interface", @@ -10837,7 +11144,7 @@ }, "children": [ { - "id": 76, + "id": 83, "name": "adapter", "kind": 1024, "kindString": "Property", @@ -10862,7 +11169,7 @@ } }, { - "id": 77, + "id": 84, "name": "adapterConfig", "kind": 1024, "kindString": "Property", @@ -10884,7 +11191,7 @@ "type": { "type": "reflection", "declaration": { - "id": 78, + "id": 85, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -10893,7 +11200,7 @@ }, "indexSignature": [ { - "id": 79, + "id": 86, "name": "__index", "kind": 8192, "kindString": "Index signature", @@ -10902,7 +11209,7 @@ }, "parameters": [ { - "id": 80, + "id": 87, "name": "key", "kind": 32768, "kindString": "Parameter", @@ -10932,7 +11239,7 @@ } }, { - "id": 75, + "id": 82, "name": "dialogStateProperty", "kind": 1024, "kindString": "Property", @@ -10957,7 +11264,7 @@ } }, { - "id": 85, + "id": 92, "name": "disable_console", "kind": 1024, "kindString": "Property", @@ -10982,7 +11289,7 @@ } }, { - "id": 84, + "id": 91, "name": "disable_webserver", "kind": 1024, "kindString": "Property", @@ -11007,7 +11314,7 @@ } }, { - "id": 83, + "id": 90, "name": "storage", "kind": 1024, "kindString": "Property", @@ -11032,7 +11339,7 @@ } }, { - "id": 74, + "id": 81, "name": "webhook_uri", "kind": 1024, "kindString": "Property", @@ -11057,7 +11364,7 @@ } }, { - "id": 81, + "id": 88, "name": "webserver", "kind": 1024, "kindString": "Property", @@ -11082,7 +11389,7 @@ } }, { - "id": 82, + "id": 89, "name": "webserver_middlewares", "kind": 1024, "kindString": "Property", @@ -11115,15 +11422,15 @@ "title": "Properties", "kind": 1024, "children": [ - 76, - 77, - 75, - 85, - 84, 83, - 74, + 84, + 82, + 92, + 91, + 90, 81, - 82 + 88, + 89 ] } ], @@ -11136,7 +11443,7 @@ ], "props": [ { - "id": 76, + "id": 83, "name": "adapter", "kind": 1024, "kindString": "Property", @@ -11161,7 +11468,7 @@ } }, { - "id": 77, + "id": 84, "name": "adapterConfig", "kind": 1024, "kindString": "Property", @@ -11183,7 +11490,7 @@ "type": { "type": "reflection", "declaration": { - "id": 78, + "id": 85, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -11192,7 +11499,7 @@ }, "indexSignature": [ { - "id": 79, + "id": 86, "name": "__index", "kind": 8192, "kindString": "Index signature", @@ -11201,7 +11508,7 @@ }, "parameters": [ { - "id": 80, + "id": 87, "name": "key", "kind": 32768, "kindString": "Parameter", @@ -11231,7 +11538,7 @@ } }, { - "id": 75, + "id": 82, "name": "dialogStateProperty", "kind": 1024, "kindString": "Property", @@ -11256,7 +11563,7 @@ } }, { - "id": 85, + "id": 92, "name": "disable_console", "kind": 1024, "kindString": "Property", @@ -11281,7 +11588,7 @@ } }, { - "id": 84, + "id": 91, "name": "disable_webserver", "kind": 1024, "kindString": "Property", @@ -11306,7 +11613,7 @@ } }, { - "id": 83, + "id": 90, "name": "storage", "kind": 1024, "kindString": "Property", @@ -11331,7 +11638,7 @@ } }, { - "id": 74, + "id": 81, "name": "webhook_uri", "kind": 1024, "kindString": "Property", @@ -11356,7 +11663,7 @@ } }, { - "id": 81, + "id": 88, "name": "webserver", "kind": 1024, "kindString": "Property", @@ -11381,7 +11688,7 @@ } }, { - "id": 82, + "id": 89, "name": "webserver_middlewares", "kind": 1024, "kindString": "Property", @@ -11411,7 +11718,7 @@ ] }, { - "id": 298, + "id": 307, "name": "BotkitConversationStep", "kind": 256, "kindString": "Interface", @@ -11421,7 +11728,7 @@ }, "children": [ { - "id": 299, + "id": 308, "name": "index", "kind": 1024, "kindString": "Property", @@ -11445,7 +11752,7 @@ } }, { - "id": 307, + "id": 316, "name": "next", "kind": 1024, "kindString": "Property", @@ -11466,7 +11773,7 @@ "type": { "type": "reflection", "declaration": { - "id": 308, + "id": 317, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -11475,7 +11782,7 @@ }, "signatures": [ { - "id": 309, + "id": 318, "name": "__call", "kind": 4096, "kindString": "Call signature", @@ -11484,7 +11791,7 @@ }, "parameters": [ { - "id": 310, + "id": 319, "name": "stepResult", "kind": 32768, "kindString": "Parameter", @@ -11520,7 +11827,7 @@ } }, { - "id": 303, + "id": 312, "name": "options", "kind": 1024, "kindString": "Property", @@ -11544,7 +11851,7 @@ } }, { - "id": 304, + "id": 313, "name": "reason", "kind": 1024, "kindString": "Property", @@ -11568,7 +11875,7 @@ } }, { - "id": 305, + "id": 314, "name": "result", "kind": 1024, "kindString": "Property", @@ -11592,7 +11899,7 @@ } }, { - "id": 302, + "id": 311, "name": "state", "kind": 1024, "kindString": "Property", @@ -11616,7 +11923,7 @@ } }, { - "id": 300, + "id": 309, "name": "thread", "kind": 1024, "kindString": "Property", @@ -11640,7 +11947,7 @@ } }, { - "id": 301, + "id": 310, "name": "threadLength", "kind": 1024, "kindString": "Property", @@ -11664,7 +11971,7 @@ } }, { - "id": 306, + "id": 315, "name": "values", "kind": 1024, "kindString": "Property", @@ -11693,15 +12000,15 @@ "title": "Properties", "kind": 1024, "children": [ - 299, - 307, - 303, - 304, - 305, - 302, - 300, - 301, - 306 + 308, + 316, + 312, + 313, + 314, + 311, + 309, + 310, + 315 ] } ], @@ -11714,7 +12021,7 @@ ], "props": [ { - "id": 299, + "id": 308, "name": "index", "kind": 1024, "kindString": "Property", @@ -11738,7 +12045,7 @@ } }, { - "id": 307, + "id": 316, "name": "next", "kind": 1024, "kindString": "Property", @@ -11759,7 +12066,7 @@ "type": { "type": "reflection", "declaration": { - "id": 308, + "id": 317, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -11768,7 +12075,7 @@ }, "signatures": [ { - "id": 309, + "id": 318, "name": "__call", "kind": 4096, "kindString": "Call signature", @@ -11777,7 +12084,7 @@ }, "parameters": [ { - "id": 310, + "id": 319, "name": "stepResult", "kind": 32768, "kindString": "Parameter", @@ -11813,7 +12120,7 @@ } }, { - "id": 303, + "id": 312, "name": "options", "kind": 1024, "kindString": "Property", @@ -11837,7 +12144,7 @@ } }, { - "id": 304, + "id": 313, "name": "reason", "kind": 1024, "kindString": "Property", @@ -11861,7 +12168,7 @@ } }, { - "id": 305, + "id": 314, "name": "result", "kind": 1024, "kindString": "Property", @@ -11885,7 +12192,7 @@ } }, { - "id": 302, + "id": 311, "name": "state", "kind": 1024, "kindString": "Property", @@ -11909,7 +12216,7 @@ } }, { - "id": 300, + "id": 309, "name": "thread", "kind": 1024, "kindString": "Property", @@ -11933,7 +12240,7 @@ } }, { - "id": 301, + "id": 310, "name": "threadLength", "kind": 1024, "kindString": "Property", @@ -11957,7 +12264,7 @@ } }, { - "id": 306, + "id": 315, "name": "values", "kind": 1024, "kindString": "Property", @@ -11983,7 +12290,7 @@ ] }, { - "id": 251, + "id": 259, "name": "BotkitConvoHandler", "kind": 256, "kindString": "Interface", @@ -11995,7 +12302,7 @@ }, "signatures": [ { - "id": 252, + "id": 260, "name": "__call", "kind": 4096, "kindString": "Call signature", @@ -12005,7 +12312,7 @@ }, "parameters": [ { - "id": 253, + "id": 261, "name": "answer", "kind": 32768, "kindString": "Parameter", @@ -12016,19 +12323,19 @@ } }, { - "id": 254, + "id": 262, "name": "convo", "kind": 32768, "kindString": "Parameter", "flags": {}, "type": { "type": "reference", - "id": 230, + "id": 238, "name": "BotkitDialogWrapper" } }, { - "id": 255, + "id": 263, "name": "bot", "kind": 32768, "kindString": "Parameter", @@ -12038,6 +12345,18 @@ "id": 25, "name": "BotWorker" } + }, + { + "id": 264, + "name": "message", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "id": 93, + "name": "BotkitMessage" + } } ], "type": { @@ -12061,7 +12380,7 @@ ] }, { - "id": 256, + "id": 265, "name": "BotkitConvoTrigger", "kind": 256, "kindString": "Interface", @@ -12073,7 +12392,7 @@ }, "children": [ { - "id": 260, + "id": 269, "name": "default", "kind": 1024, "kindString": "Property", @@ -12094,7 +12413,7 @@ } }, { - "id": 259, + "id": 268, "name": "handler", "kind": 1024, "kindString": "Property", @@ -12110,12 +12429,12 @@ ], "type": { "type": "reference", - "id": 251, + "id": 259, "name": "BotkitConvoHandler" } }, { - "id": 258, + "id": 267, "name": "pattern", "kind": 1024, "kindString": "Property", @@ -12145,7 +12464,7 @@ } }, { - "id": 257, + "id": 266, "name": "type", "kind": 1024, "kindString": "Property", @@ -12171,10 +12490,10 @@ "title": "Properties", "kind": 1024, "children": [ - 260, - 259, - 258, - 257 + 269, + 268, + 267, + 266 ] } ], @@ -12187,7 +12506,7 @@ ], "props": [ { - "id": 260, + "id": 269, "name": "default", "kind": 1024, "kindString": "Property", @@ -12208,7 +12527,7 @@ } }, { - "id": 259, + "id": 268, "name": "handler", "kind": 1024, "kindString": "Property", @@ -12224,12 +12543,12 @@ ], "type": { "type": "reference", - "id": 251, + "id": 259, "name": "BotkitConvoHandler" } }, { - "id": 258, + "id": 267, "name": "pattern", "kind": 1024, "kindString": "Property", @@ -12259,7 +12578,7 @@ } }, { - "id": 257, + "id": 266, "name": "type", "kind": 1024, "kindString": "Property", @@ -12282,7 +12601,7 @@ ] }, { - "id": 96, + "id": 103, "name": "BotkitHandler", "kind": 256, "kindString": "Interface", @@ -12296,7 +12615,7 @@ }, "signatures": [ { - "id": 97, + "id": 104, "name": "__call", "kind": 4096, "kindString": "Call signature", @@ -12309,7 +12628,7 @@ }, "parameters": [ { - "id": 98, + "id": 105, "name": "bot", "kind": 32768, "kindString": "Parameter", @@ -12323,7 +12642,7 @@ } }, { - "id": 99, + "id": 106, "name": "message", "kind": 32768, "kindString": "Parameter", @@ -12332,7 +12651,7 @@ }, "type": { "type": "reference", - "id": 86, + "id": 93, "name": "BotkitMessage" } } @@ -12358,7 +12677,7 @@ ] }, { - "id": 86, + "id": 93, "name": "BotkitMessage", "kind": 256, "kindString": "Interface", @@ -12371,7 +12690,7 @@ }, "indexSignature": [ { - "id": 94, + "id": 101, "name": "__index", "kind": 8192, "kindString": "Index signature", @@ -12383,7 +12702,7 @@ }, "parameters": [ { - "id": 95, + "id": 102, "name": "key", "kind": 32768, "kindString": "Parameter", @@ -12404,7 +12723,7 @@ ], "children": [ { - "id": 91, + "id": 98, "name": "channel", "kind": 1024, "kindString": "Property", @@ -12428,7 +12747,7 @@ } }, { - "id": 93, + "id": 100, "name": "incoming_message", "kind": 1024, "kindString": "Property", @@ -12452,7 +12771,7 @@ } }, { - "id": 92, + "id": 99, "name": "reference", "kind": 1024, "kindString": "Property", @@ -12476,7 +12795,7 @@ } }, { - "id": 88, + "id": 95, "name": "text", "kind": 1024, "kindString": "Property", @@ -12501,7 +12820,7 @@ } }, { - "id": 87, + "id": 94, "name": "type", "kind": 1024, "kindString": "Property", @@ -12525,7 +12844,7 @@ } }, { - "id": 90, + "id": 97, "name": "user", "kind": 1024, "kindString": "Property", @@ -12549,7 +12868,7 @@ } }, { - "id": 89, + "id": 96, "name": "value", "kind": 1024, "kindString": "Property", @@ -12579,13 +12898,13 @@ "title": "Properties", "kind": 1024, "children": [ - 91, - 93, - 92, - 88, - 87, - 90, - 89 + 98, + 100, + 99, + 95, + 94, + 97, + 96 ] } ], @@ -12598,7 +12917,7 @@ ], "props": [ { - "id": 91, + "id": 98, "name": "channel", "kind": 1024, "kindString": "Property", @@ -12622,7 +12941,7 @@ } }, { - "id": 93, + "id": 100, "name": "incoming_message", "kind": 1024, "kindString": "Property", @@ -12646,7 +12965,7 @@ } }, { - "id": 92, + "id": 99, "name": "reference", "kind": 1024, "kindString": "Property", @@ -12670,7 +12989,7 @@ } }, { - "id": 88, + "id": 95, "name": "text", "kind": 1024, "kindString": "Property", @@ -12695,7 +13014,7 @@ } }, { - "id": 87, + "id": 94, "name": "type", "kind": 1024, "kindString": "Property", @@ -12719,7 +13038,7 @@ } }, { - "id": 90, + "id": 97, "name": "user", "kind": 1024, "kindString": "Property", @@ -12743,7 +13062,7 @@ } }, { - "id": 89, + "id": 96, "name": "value", "kind": 1024, "kindString": "Property", @@ -12770,7 +13089,7 @@ ] }, { - "id": 261, + "id": 270, "name": "BotkitMessageTemplate", "kind": 256, "kindString": "Interface", @@ -12782,7 +13101,7 @@ }, "children": [ { - "id": 267, + "id": 276, "name": "action", "kind": 1024, "kindString": "Property", @@ -12803,7 +13122,7 @@ } }, { - "id": 287, + "id": 296, "name": "attachment", "kind": 1024, "kindString": "Property", @@ -12824,21 +13143,21 @@ { "type": "reflection", "declaration": { - "id": 288, + "id": 297, "name": "__type", "kind": 65536, "kindString": "Type literal", "flags": {}, "signatures": [ { - "id": 289, + "id": 298, "name": "__call", "kind": 4096, "kindString": "Call signature", "flags": {}, "parameters": [ { - "id": 290, + "id": 299, "name": "template", "kind": 32768, "kindString": "Parameter", @@ -12849,7 +13168,7 @@ } }, { - "id": 291, + "id": 300, "name": "vars", "kind": 32768, "kindString": "Parameter", @@ -12883,7 +13202,7 @@ } }, { - "id": 292, + "id": 301, "name": "attachmentLayout", "kind": 1024, "kindString": "Property", @@ -12904,7 +13223,7 @@ } }, { - "id": 277, + "id": 286, "name": "attachments", "kind": 1024, "kindString": "Property", @@ -12925,21 +13244,21 @@ { "type": "reflection", "declaration": { - "id": 278, + "id": 287, "name": "__type", "kind": 65536, "kindString": "Type literal", "flags": {}, "signatures": [ { - "id": 279, + "id": 288, "name": "__call", "kind": 4096, "kindString": "Call signature", "flags": {}, "parameters": [ { - "id": 280, + "id": 289, "name": "template", "kind": 32768, "kindString": "Parameter", @@ -12950,7 +13269,7 @@ } }, { - "id": 281, + "id": 290, "name": "vars", "kind": 32768, "kindString": "Parameter", @@ -12990,7 +13309,7 @@ } }, { - "id": 282, + "id": 291, "name": "blocks", "kind": 1024, "kindString": "Property", @@ -13011,21 +13330,21 @@ { "type": "reflection", "declaration": { - "id": 283, + "id": 292, "name": "__type", "kind": 65536, "kindString": "Type literal", "flags": {}, "signatures": [ { - "id": 284, + "id": 293, "name": "__call", "kind": 4096, "kindString": "Call signature", "flags": {}, "parameters": [ { - "id": 285, + "id": 294, "name": "template", "kind": 32768, "kindString": "Parameter", @@ -13036,7 +13355,7 @@ } }, { - "id": 286, + "id": 295, "name": "vars", "kind": 32768, "kindString": "Parameter", @@ -13076,7 +13395,7 @@ } }, { - "id": 293, + "id": 302, "name": "channelData", "kind": 1024, "kindString": "Property", @@ -13097,7 +13416,7 @@ } }, { - "id": 294, + "id": 303, "name": "collect", "kind": 1024, "kindString": "Property", @@ -13114,14 +13433,14 @@ "type": { "type": "reflection", "declaration": { - "id": 295, + "id": 304, "name": "__type", "kind": 65536, "kindString": "Type literal", "flags": {}, "children": [ { - "id": 296, + "id": 305, "name": "key", "kind": 32, "kindString": "Variable", @@ -13142,7 +13461,7 @@ } }, { - "id": 297, + "id": 306, "name": "options", "kind": 32, "kindString": "Variable", @@ -13161,7 +13480,7 @@ "type": "array", "elementType": { "type": "reference", - "id": 256, + "id": 265, "name": "BotkitConvoTrigger" } } @@ -13172,8 +13491,8 @@ "title": "Variables", "kind": 32, "children": [ - 296, - 297 + 305, + 306 ] } ], @@ -13188,7 +13507,7 @@ } }, { - "id": 268, + "id": 277, "name": "execute", "kind": 1024, "kindString": "Property", @@ -13206,14 +13525,14 @@ "type": { "type": "reflection", "declaration": { - "id": 269, + "id": 278, "name": "__type", "kind": 65536, "kindString": "Type literal", "flags": {}, "children": [ { - "id": 270, + "id": 279, "name": "script", "kind": 32, "kindString": "Variable", @@ -13233,7 +13552,7 @@ } }, { - "id": 271, + "id": 280, "name": "thread", "kind": 32, "kindString": "Variable", @@ -13259,8 +13578,8 @@ "title": "Variables", "kind": 32, "children": [ - 270, - 271 + 279, + 280 ] } ], @@ -13275,7 +13594,7 @@ } }, { - "id": 272, + "id": 281, "name": "quick_replies", "kind": 1024, "kindString": "Property", @@ -13296,21 +13615,21 @@ { "type": "reflection", "declaration": { - "id": 273, + "id": 282, "name": "__type", "kind": 65536, "kindString": "Type literal", "flags": {}, "signatures": [ { - "id": 274, + "id": 283, "name": "__call", "kind": 4096, "kindString": "Call signature", "flags": {}, "parameters": [ { - "id": 275, + "id": 284, "name": "template", "kind": 32768, "kindString": "Parameter", @@ -13321,7 +13640,7 @@ } }, { - "id": 276, + "id": 285, "name": "vars", "kind": 32768, "kindString": "Parameter", @@ -13361,7 +13680,7 @@ } }, { - "id": 262, + "id": 271, "name": "text", "kind": 1024, "kindString": "Property", @@ -13381,21 +13700,21 @@ { "type": "reflection", "declaration": { - "id": 263, + "id": 272, "name": "__type", "kind": 65536, "kindString": "Type literal", "flags": {}, "signatures": [ { - "id": 264, + "id": 273, "name": "__call", "kind": 4096, "kindString": "Call signature", "flags": {}, "parameters": [ { - "id": 265, + "id": 274, "name": "template", "kind": 32768, "kindString": "Parameter", @@ -13406,7 +13725,7 @@ } }, { - "id": 266, + "id": 275, "name": "vars", "kind": 32768, "kindString": "Parameter", @@ -13451,16 +13770,16 @@ "title": "Properties", "kind": 1024, "children": [ - 267, - 287, - 292, + 276, + 296, + 301, + 286, + 291, + 302, + 303, 277, - 282, - 293, - 294, - 268, - 272, - 262 + 281, + 271 ] } ], @@ -13473,7 +13792,7 @@ ], "props": [ { - "id": 267, + "id": 276, "name": "action", "kind": 1024, "kindString": "Property", @@ -13494,7 +13813,7 @@ } }, { - "id": 287, + "id": 296, "name": "attachment", "kind": 1024, "kindString": "Property", @@ -13515,21 +13834,21 @@ { "type": "reflection", "declaration": { - "id": 288, + "id": 297, "name": "__type", "kind": 65536, "kindString": "Type literal", "flags": {}, "signatures": [ { - "id": 289, + "id": 298, "name": "__call", "kind": 4096, "kindString": "Call signature", "flags": {}, "parameters": [ { - "id": 290, + "id": 299, "name": "template", "kind": 32768, "kindString": "Parameter", @@ -13540,7 +13859,7 @@ } }, { - "id": 291, + "id": 300, "name": "vars", "kind": 32768, "kindString": "Parameter", @@ -13574,7 +13893,7 @@ } }, { - "id": 292, + "id": 301, "name": "attachmentLayout", "kind": 1024, "kindString": "Property", @@ -13595,7 +13914,7 @@ } }, { - "id": 277, + "id": 286, "name": "attachments", "kind": 1024, "kindString": "Property", @@ -13616,21 +13935,21 @@ { "type": "reflection", "declaration": { - "id": 278, + "id": 287, "name": "__type", "kind": 65536, "kindString": "Type literal", "flags": {}, "signatures": [ { - "id": 279, + "id": 288, "name": "__call", "kind": 4096, "kindString": "Call signature", "flags": {}, "parameters": [ { - "id": 280, + "id": 289, "name": "template", "kind": 32768, "kindString": "Parameter", @@ -13641,7 +13960,7 @@ } }, { - "id": 281, + "id": 290, "name": "vars", "kind": 32768, "kindString": "Parameter", @@ -13681,7 +14000,7 @@ } }, { - "id": 282, + "id": 291, "name": "blocks", "kind": 1024, "kindString": "Property", @@ -13702,21 +14021,21 @@ { "type": "reflection", "declaration": { - "id": 283, + "id": 292, "name": "__type", "kind": 65536, "kindString": "Type literal", "flags": {}, "signatures": [ { - "id": 284, + "id": 293, "name": "__call", "kind": 4096, "kindString": "Call signature", "flags": {}, "parameters": [ { - "id": 285, + "id": 294, "name": "template", "kind": 32768, "kindString": "Parameter", @@ -13727,7 +14046,7 @@ } }, { - "id": 286, + "id": 295, "name": "vars", "kind": 32768, "kindString": "Parameter", @@ -13767,7 +14086,7 @@ } }, { - "id": 293, + "id": 302, "name": "channelData", "kind": 1024, "kindString": "Property", @@ -13788,7 +14107,7 @@ } }, { - "id": 294, + "id": 303, "name": "collect", "kind": 1024, "kindString": "Property", @@ -13805,14 +14124,14 @@ "type": { "type": "reflection", "declaration": { - "id": 295, + "id": 304, "name": "__type", "kind": 65536, "kindString": "Type literal", "flags": {}, "children": [ { - "id": 296, + "id": 305, "name": "key", "kind": 32, "kindString": "Variable", @@ -13833,7 +14152,7 @@ } }, { - "id": 297, + "id": 306, "name": "options", "kind": 32, "kindString": "Variable", @@ -13852,7 +14171,7 @@ "type": "array", "elementType": { "type": "reference", - "id": 256, + "id": 265, "name": "BotkitConvoTrigger" } } @@ -13863,8 +14182,8 @@ "title": "Variables", "kind": 32, "children": [ - 296, - 297 + 305, + 306 ] } ], @@ -13879,7 +14198,7 @@ } }, { - "id": 268, + "id": 277, "name": "execute", "kind": 1024, "kindString": "Property", @@ -13897,14 +14216,14 @@ "type": { "type": "reflection", "declaration": { - "id": 269, + "id": 278, "name": "__type", "kind": 65536, "kindString": "Type literal", "flags": {}, "children": [ { - "id": 270, + "id": 279, "name": "script", "kind": 32, "kindString": "Variable", @@ -13924,7 +14243,7 @@ } }, { - "id": 271, + "id": 280, "name": "thread", "kind": 32, "kindString": "Variable", @@ -13950,8 +14269,8 @@ "title": "Variables", "kind": 32, "children": [ - 270, - 271 + 279, + 280 ] } ], @@ -13966,7 +14285,7 @@ } }, { - "id": 272, + "id": 281, "name": "quick_replies", "kind": 1024, "kindString": "Property", @@ -13987,21 +14306,21 @@ { "type": "reflection", "declaration": { - "id": 273, + "id": 282, "name": "__type", "kind": 65536, "kindString": "Type literal", "flags": {}, "signatures": [ { - "id": 274, + "id": 283, "name": "__call", "kind": 4096, "kindString": "Call signature", "flags": {}, "parameters": [ { - "id": 275, + "id": 284, "name": "template", "kind": 32768, "kindString": "Parameter", @@ -14012,7 +14331,7 @@ } }, { - "id": 276, + "id": 285, "name": "vars", "kind": 32768, "kindString": "Parameter", @@ -14052,7 +14371,7 @@ } }, { - "id": 262, + "id": 271, "name": "text", "kind": 1024, "kindString": "Property", @@ -14072,21 +14391,21 @@ { "type": "reflection", "declaration": { - "id": 263, + "id": 272, "name": "__type", "kind": 65536, "kindString": "Type literal", "flags": {}, "signatures": [ { - "id": 264, + "id": 273, "name": "__call", "kind": 4096, "kindString": "Call signature", "flags": {}, "parameters": [ { - "id": 265, + "id": 274, "name": "template", "kind": 32768, "kindString": "Parameter", @@ -14097,7 +14416,7 @@ } }, { - "id": 266, + "id": 275, "name": "vars", "kind": 32768, "kindString": "Parameter", @@ -14139,7 +14458,7 @@ ] }, { - "id": 107, + "id": 114, "name": "BotkitPlugin", "kind": 256, "kindString": "Interface", @@ -14152,7 +14471,7 @@ }, "indexSignature": [ { - "id": 117, + "id": 124, "name": "__index", "kind": 8192, "kindString": "Index signature", @@ -14164,7 +14483,7 @@ }, "parameters": [ { - "id": 118, + "id": 125, "name": "key", "kind": 32768, "kindString": "Parameter", @@ -14185,7 +14504,7 @@ ], "children": [ { - "id": 113, + "id": 120, "name": "init", "kind": 1024, "kindString": "Property", @@ -14204,7 +14523,7 @@ "type": { "type": "reflection", "declaration": { - "id": 114, + "id": 121, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -14213,7 +14532,7 @@ }, "signatures": [ { - "id": 115, + "id": 122, "name": "__call", "kind": 4096, "kindString": "Call signature", @@ -14222,7 +14541,7 @@ }, "parameters": [ { - "id": 116, + "id": 123, "name": "botkit", "kind": 32768, "kindString": "Parameter", @@ -14231,7 +14550,7 @@ }, "type": { "type": "reference", - "id": 119, + "id": 126, "name": "Botkit" } } @@ -14253,7 +14572,7 @@ } }, { - "id": 109, + "id": 116, "name": "middlewares", "kind": 1024, "kindString": "Property", @@ -14272,7 +14591,7 @@ "type": { "type": "reflection", "declaration": { - "id": 110, + "id": 117, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -14281,7 +14600,7 @@ }, "indexSignature": [ { - "id": 111, + "id": 118, "name": "__index", "kind": 8192, "kindString": "Index signature", @@ -14290,7 +14609,7 @@ }, "parameters": [ { - "id": 112, + "id": 119, "name": "key", "kind": 32768, "kindString": "Parameter", @@ -14323,7 +14642,7 @@ } }, { - "id": 108, + "id": 115, "name": "name", "kind": 1024, "kindString": "Property", @@ -14349,9 +14668,9 @@ "title": "Properties", "kind": 1024, "children": [ - 113, - 109, - 108 + 120, + 116, + 115 ] } ], @@ -14364,7 +14683,7 @@ ], "props": [ { - "id": 113, + "id": 120, "name": "init", "kind": 1024, "kindString": "Property", @@ -14383,7 +14702,7 @@ "type": { "type": "reflection", "declaration": { - "id": 114, + "id": 121, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -14392,7 +14711,7 @@ }, "signatures": [ { - "id": 115, + "id": 122, "name": "__call", "kind": 4096, "kindString": "Call signature", @@ -14401,7 +14720,7 @@ }, "parameters": [ { - "id": 116, + "id": 123, "name": "botkit", "kind": 32768, "kindString": "Parameter", @@ -14410,7 +14729,7 @@ }, "type": { "type": "reference", - "id": 119, + "id": 126, "name": "Botkit" } } @@ -14432,7 +14751,7 @@ } }, { - "id": 109, + "id": 116, "name": "middlewares", "kind": 1024, "kindString": "Property", @@ -14451,7 +14770,7 @@ "type": { "type": "reflection", "declaration": { - "id": 110, + "id": 117, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -14460,7 +14779,7 @@ }, "indexSignature": [ { - "id": 111, + "id": 118, "name": "__index", "kind": 8192, "kindString": "Index signature", @@ -14469,7 +14788,7 @@ }, "parameters": [ { - "id": 112, + "id": 119, "name": "key", "kind": 32768, "kindString": "Parameter", @@ -14502,7 +14821,7 @@ } }, { - "id": 108, + "id": 115, "name": "name", "kind": 1024, "kindString": "Property", @@ -14525,7 +14844,7 @@ ] }, { - "id": 100, + "id": 107, "name": "BotkitTrigger", "kind": 256, "kindString": "Interface", @@ -14537,7 +14856,7 @@ }, "children": [ { - "id": 106, + "id": 113, "name": "handler", "kind": 1024, "kindString": "Property", @@ -14553,12 +14872,12 @@ ], "type": { "type": "reference", - "id": 96, + "id": 103, "name": "BotkitHandler" } }, { - "id": 102, + "id": 109, "name": "pattern", "kind": 1024, "kindString": "Property", @@ -14586,28 +14905,28 @@ { "type": "reflection", "declaration": { - "id": 103, + "id": 110, "name": "__type", "kind": 65536, "kindString": "Type literal", "flags": {}, "signatures": [ { - "id": 104, + "id": 111, "name": "__call", "kind": 4096, "kindString": "Call signature", "flags": {}, "parameters": [ { - "id": 105, + "id": 112, "name": "message", "kind": 32768, "kindString": "Parameter", "flags": {}, "type": { "type": "reference", - "id": 86, + "id": 93, "name": "BotkitMessage" } } @@ -14637,7 +14956,7 @@ } }, { - "id": 101, + "id": 108, "name": "type", "kind": 1024, "kindString": "Property", @@ -14665,9 +14984,9 @@ "title": "Properties", "kind": 1024, "children": [ - 106, - 102, - 101 + 113, + 109, + 108 ] } ], @@ -14680,7 +14999,7 @@ ], "props": [ { - "id": 106, + "id": 113, "name": "handler", "kind": 1024, "kindString": "Property", @@ -14696,12 +15015,12 @@ ], "type": { "type": "reference", - "id": 96, + "id": 103, "name": "BotkitHandler" } }, { - "id": 102, + "id": 109, "name": "pattern", "kind": 1024, "kindString": "Property", @@ -14729,28 +15048,28 @@ { "type": "reflection", "declaration": { - "id": 103, + "id": 110, "name": "__type", "kind": 65536, "kindString": "Type literal", "flags": {}, "signatures": [ { - "id": 104, + "id": 111, "name": "__call", "kind": 4096, "kindString": "Call signature", "flags": {}, "parameters": [ { - "id": 105, + "id": 112, "name": "message", "kind": 32768, "kindString": "Parameter", "flags": {}, "type": { "type": "reference", - "id": 86, + "id": 93, "name": "BotkitMessage" } } @@ -14780,7 +15099,7 @@ } }, { - "id": 101, + "id": 108, "name": "type", "kind": 1024, "kindString": "Property", @@ -16587,7 +16906,7 @@ "sources": [ { "fileName": "webex_adapter.ts", - "line": 441, + "line": 442, "character": 87 } ] @@ -16610,7 +16929,7 @@ "sources": [ { "fileName": "webex_adapter.ts", - "line": 441, + "line": 442, "character": 37 } ] @@ -16692,7 +17011,7 @@ "sources": [ { "fileName": "webex_adapter.ts", - "line": 423, + "line": 424, "character": 31 } ] @@ -16905,7 +17224,7 @@ "sources": [ { "fileName": "webex_adapter.ts", - "line": 458, + "line": 459, "character": 49 } ] @@ -16928,7 +17247,7 @@ "sources": [ { "fileName": "webex_adapter.ts", - "line": 458, + "line": 459, "character": 32 } ] @@ -17363,7 +17682,7 @@ "sources": [ { "fileName": "webex_adapter.ts", - "line": 441, + "line": 442, "character": 87 } ] @@ -17386,7 +17705,7 @@ "sources": [ { "fileName": "webex_adapter.ts", - "line": 441, + "line": 442, "character": 37 } ] @@ -17468,7 +17787,7 @@ "sources": [ { "fileName": "webex_adapter.ts", - "line": 423, + "line": 424, "character": 31 } ] @@ -17681,7 +18000,7 @@ "sources": [ { "fileName": "webex_adapter.ts", - "line": 458, + "line": 459, "character": 49 } ] @@ -17704,7 +18023,7 @@ "sources": [ { "fileName": "webex_adapter.ts", - "line": 458, + "line": 459, "character": 32 } ] @@ -18833,7 +19152,7 @@ }, "comment": { "shortText": "Create a Slack adapter.", - "text": "The SlackAdapter can be used in 2 modes:\n * As an \"[internal integration](https://api.slack.com/internal-integrations) connected to a single Slack workspace\n * As a \"[Slack app](https://api.slack.com/slack-apps) that uses oauth to connect to multiple workspaces and can be submitted to the Slack app.\n\n[Read here for more information about all the ways to configure the SlackAdapter →](../../botbuilder-adapter-slack/readme.md).\n\nUse with Botkit:\n```javascript\nconst adapter = new SlackAdapter({\n clientSigningSecret: process.env.CLIENT_SIGNING_SECRET,\n botToken: process.env.BOT_TOKEN\n});\nconst controller = new Botkit({\n adapter: adapter,\n // ... other configuration options\n});\n```\n\nUse with BotBuilder:\n```javascript\nconst adapter = new SlackAdapter({\n clientSigningSecret: process.env.CLIENT_SIGNING_SECRET,\n botToken: process.env.BOT_TOKEN\n});\n// set up restify...\nconst server = restify.createServer();\nserver.use(restify.plugins.bodyParser());\nserver.post('/api/messages', (req, res) => {\n adapter.processActivity(req, res, async(context) => {\n // do your bot logic here!\n });\n});\n```\n\nUse in \"Slack app\" multi-team mode:\n```javascript\nconst adapter = new SlackAdapter({\n clientSigningSecret: process.env.CLIENT_SIGNING_SECRET,\n clientId: process.env.CLIENT_ID, // oauth client id\n clientSecret: process.env.CLIENT_SECRET, // oauth client secret\n scopes: ['bot'], // oauth scopes requested\n redirectUri: process.env.REDIRECT_URI, // url to redirect post login defaults to `https:///install/auth`\n getTokenForTeam: async(team_id) => Promise, // function that returns a token based on team id\n getBotUserByTeam: async(team_id) => Promise, // function that returns a bot's user id based on team id\n});\n```\n" + "text": "The SlackAdapter can be used in 2 modes:\n * As an \"[internal integration](https://api.slack.com/internal-integrations) connected to a single Slack workspace\n * As a \"[Slack app](https://api.slack.com/slack-apps) that uses oauth to connect to multiple workspaces and can be submitted to the Slack app.\n\n[Read here for more information about all the ways to configure the SlackAdapter →](../../botbuilder-adapter-slack/readme.md).\n\nUse with Botkit:\n```javascript\nconst adapter = new SlackAdapter({\n clientSigningSecret: process.env.CLIENT_SIGNING_SECRET,\n botToken: process.env.BOT_TOKEN\n});\nconst controller = new Botkit({\n adapter: adapter,\n // ... other configuration options\n});\n```\n\nUse with BotBuilder:\n```javascript\nconst adapter = new SlackAdapter({\n clientSigningSecret: process.env.CLIENT_SIGNING_SECRET,\n botToken: process.env.BOT_TOKEN\n});\n// set up restify...\nconst server = restify.createServer();\nserver.use(restify.plugins.bodyParser());\nserver.post('/api/messages', (req, res) => {\n adapter.processActivity(req, res, async(context) => {\n // do your bot logic here!\n });\n});\n```\n\nUse in \"Slack app\" multi-team mode:\n```javascript\nconst adapter = new SlackAdapter({\n clientSigningSecret: process.env.CLIENT_SIGNING_SECRET,\n clientId: process.env.CLIENT_ID, // oauth client id\n clientSecret: process.env.CLIENT_SECRET, // oauth client secret\n scopes: ['bot'], // oauth scopes requested\n oauthVersion: 'v1',\n redirectUri: process.env.REDIRECT_URI, // url to redirect post login defaults to `https:///install/auth`\n getTokenForTeam: async(team_id) => Promise, // function that returns a token based on team id\n getBotUserByTeam: async(team_id) => Promise, // function that returns a bot's user id based on team id\n});\n```\n" }, "signatures": [ { @@ -18846,7 +19165,7 @@ }, "comment": { "shortText": "Create a Slack adapter.", - "text": "The SlackAdapter can be used in 2 modes:\n * As an \"[internal integration](https://api.slack.com/internal-integrations) connected to a single Slack workspace\n * As a \"[Slack app](https://api.slack.com/slack-apps) that uses oauth to connect to multiple workspaces and can be submitted to the Slack app.\n\n[Read here for more information about all the ways to configure the SlackAdapter →](../../botbuilder-adapter-slack/readme.md).\n\nUse with Botkit:\n```javascript\nconst adapter = new SlackAdapter({\n clientSigningSecret: process.env.CLIENT_SIGNING_SECRET,\n botToken: process.env.BOT_TOKEN\n});\nconst controller = new Botkit({\n adapter: adapter,\n // ... other configuration options\n});\n```\n\nUse with BotBuilder:\n```javascript\nconst adapter = new SlackAdapter({\n clientSigningSecret: process.env.CLIENT_SIGNING_SECRET,\n botToken: process.env.BOT_TOKEN\n});\n// set up restify...\nconst server = restify.createServer();\nserver.use(restify.plugins.bodyParser());\nserver.post('/api/messages', (req, res) => {\n adapter.processActivity(req, res, async(context) => {\n // do your bot logic here!\n });\n});\n```\n\nUse in \"Slack app\" multi-team mode:\n```javascript\nconst adapter = new SlackAdapter({\n clientSigningSecret: process.env.CLIENT_SIGNING_SECRET,\n clientId: process.env.CLIENT_ID, // oauth client id\n clientSecret: process.env.CLIENT_SECRET, // oauth client secret\n scopes: ['bot'], // oauth scopes requested\n redirectUri: process.env.REDIRECT_URI, // url to redirect post login defaults to `https:///install/auth`\n getTokenForTeam: async(team_id) => Promise, // function that returns a token based on team id\n getBotUserByTeam: async(team_id) => Promise, // function that returns a bot's user id based on team id\n});\n```\n" + "text": "The SlackAdapter can be used in 2 modes:\n * As an \"[internal integration](https://api.slack.com/internal-integrations) connected to a single Slack workspace\n * As a \"[Slack app](https://api.slack.com/slack-apps) that uses oauth to connect to multiple workspaces and can be submitted to the Slack app.\n\n[Read here for more information about all the ways to configure the SlackAdapter →](../../botbuilder-adapter-slack/readme.md).\n\nUse with Botkit:\n```javascript\nconst adapter = new SlackAdapter({\n clientSigningSecret: process.env.CLIENT_SIGNING_SECRET,\n botToken: process.env.BOT_TOKEN\n});\nconst controller = new Botkit({\n adapter: adapter,\n // ... other configuration options\n});\n```\n\nUse with BotBuilder:\n```javascript\nconst adapter = new SlackAdapter({\n clientSigningSecret: process.env.CLIENT_SIGNING_SECRET,\n botToken: process.env.BOT_TOKEN\n});\n// set up restify...\nconst server = restify.createServer();\nserver.use(restify.plugins.bodyParser());\nserver.post('/api/messages', (req, res) => {\n adapter.processActivity(req, res, async(context) => {\n // do your bot logic here!\n });\n});\n```\n\nUse in \"Slack app\" multi-team mode:\n```javascript\nconst adapter = new SlackAdapter({\n clientSigningSecret: process.env.CLIENT_SIGNING_SECRET,\n clientId: process.env.CLIENT_ID, // oauth client id\n clientSecret: process.env.CLIENT_SECRET, // oauth client secret\n scopes: ['bot'], // oauth scopes requested\n oauthVersion: 'v1',\n redirectUri: process.env.REDIRECT_URI, // url to redirect post login defaults to `https:///install/auth`\n getTokenForTeam: async(team_id) => Promise, // function that returns a token based on team id\n getBotUserByTeam: async(team_id) => Promise, // function that returns a bot's user id based on team id\n});\n```\n" }, "parameters": [ { @@ -18938,7 +19257,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 301, + "line": 317, "character": 26 } ] @@ -19048,7 +19367,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 431, + "line": 447, "character": 87 } ] @@ -19071,7 +19390,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 431, + "line": 447, "character": 37 } ] @@ -19153,7 +19472,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 408, + "line": 424, "character": 31 } ] @@ -19219,7 +19538,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 187, + "line": 193, "character": 23 } ] @@ -19285,7 +19604,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 213, + "line": 219, "character": 33 } ] @@ -19323,7 +19642,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 244, + "line": 250, "character": 25 } ] @@ -19443,7 +19762,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 492, + "line": 508, "character": 49 } ] @@ -19466,7 +19785,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 492, + "line": 508, "character": 32 } ] @@ -19554,7 +19873,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 340, + "line": 356, "character": 31 } ] @@ -19636,7 +19955,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 385, + "line": 401, "character": 31 } ] @@ -19661,8 +19980,8 @@ "isExported": true }, "comment": { - "shortText": "Validates an oauth code sent by Slack during the install process.", - "text": "An example using Botkit's internal webserver to configure the /install/auth route:\n\n```javascript\ncontroller.webserver.get('/install/auth', async (req, res) => {\n try {\n const results = await controller.adapter.validateOauthCode(req.query.code);\n // make sure to capture the token and bot user id by team id...\n const team_id = results.team_id;\n const token = results.bot.bot_access_token;\n const bot_user = results.bot.bot_user_id;\n // store these values in a way they'll be retrievable with getBotUserByTeam and getTokenForTeam\n } catch (err) {\n console.error('OAUTH ERROR:', err);\n res.status(401);\n res.send(err.message);\n }\n});\n```" + "shortText": "Validates an oauth v2 code sent by Slack during the install process.", + "text": "An example using Botkit's internal webserver to configure the /install/auth route:\n\n```javascript\ncontroller.webserver.get('/install/auth', async (req, res) => {\n try {\n const results = await controller.adapter.validateOauthCode(req.query.code);\n // make sure to capture the token and bot user id by team id...\n const team_id = results.team.id;\n const token = results.access_token;\n const bot_user = results.bot_user_id;\n // store these values in a way they'll be retrievable with getBotUserByTeam and getTokenForTeam\n } catch (err) {\n console.error('OAUTH ERROR:', err);\n res.status(401);\n res.send(err.message);\n }\n});\n```" }, "parameters": [ { @@ -19697,7 +20016,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 281, + "line": 291, "character": 34 } ] @@ -19799,7 +20118,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 301, + "line": 317, "character": 26 } ] @@ -19909,7 +20228,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 431, + "line": 447, "character": 87 } ] @@ -19932,7 +20251,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 431, + "line": 447, "character": 37 } ] @@ -20014,7 +20333,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 408, + "line": 424, "character": 31 } ] @@ -20080,7 +20399,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 187, + "line": 193, "character": 23 } ] @@ -20146,7 +20465,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 213, + "line": 219, "character": 33 } ] @@ -20184,7 +20503,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 244, + "line": 250, "character": 25 } ] @@ -20304,7 +20623,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 492, + "line": 508, "character": 49 } ] @@ -20327,7 +20646,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 492, + "line": 508, "character": 32 } ] @@ -20415,7 +20734,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 340, + "line": 356, "character": 31 } ] @@ -20497,7 +20816,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 385, + "line": 401, "character": 31 } ] @@ -20522,8 +20841,8 @@ "isExported": true }, "comment": { - "shortText": "Validates an oauth code sent by Slack during the install process.", - "text": "An example using Botkit's internal webserver to configure the /install/auth route:\n\n```javascript\ncontroller.webserver.get('/install/auth', async (req, res) => {\n try {\n const results = await controller.adapter.validateOauthCode(req.query.code);\n // make sure to capture the token and bot user id by team id...\n const team_id = results.team_id;\n const token = results.bot.bot_access_token;\n const bot_user = results.bot.bot_user_id;\n // store these values in a way they'll be retrievable with getBotUserByTeam and getTokenForTeam\n } catch (err) {\n console.error('OAUTH ERROR:', err);\n res.status(401);\n res.send(err.message);\n }\n});\n```" + "shortText": "Validates an oauth v2 code sent by Slack during the install process.", + "text": "An example using Botkit's internal webserver to configure the /install/auth route:\n\n```javascript\ncontroller.webserver.get('/install/auth', async (req, res) => {\n try {\n const results = await controller.adapter.validateOauthCode(req.query.code);\n // make sure to capture the token and bot user id by team id...\n const team_id = results.team.id;\n const token = results.access_token;\n const bot_user = results.bot_user_id;\n // store these values in a way they'll be retrievable with getBotUserByTeam and getTokenForTeam\n } catch (err) {\n console.error('OAUTH ERROR:', err);\n res.status(401);\n res.send(err.message);\n }\n});\n```" }, "parameters": [ { @@ -20558,7 +20877,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 281, + "line": 291, "character": 34 } ] @@ -20577,7 +20896,7 @@ }, "comment": { "shortText": "Create a Slack adapter.", - "text": "The SlackAdapter can be used in 2 modes:\n * As an \"[internal integration](https://api.slack.com/internal-integrations) connected to a single Slack workspace\n * As a \"[Slack app](https://api.slack.com/slack-apps) that uses oauth to connect to multiple workspaces and can be submitted to the Slack app.\n\n[Read here for more information about all the ways to configure the SlackAdapter →](../../botbuilder-adapter-slack/readme.md).\n\nUse with Botkit:\n```javascript\nconst adapter = new SlackAdapter({\n clientSigningSecret: process.env.CLIENT_SIGNING_SECRET,\n botToken: process.env.BOT_TOKEN\n});\nconst controller = new Botkit({\n adapter: adapter,\n // ... other configuration options\n});\n```\n\nUse with BotBuilder:\n```javascript\nconst adapter = new SlackAdapter({\n clientSigningSecret: process.env.CLIENT_SIGNING_SECRET,\n botToken: process.env.BOT_TOKEN\n});\n// set up restify...\nconst server = restify.createServer();\nserver.use(restify.plugins.bodyParser());\nserver.post('/api/messages', (req, res) => {\n adapter.processActivity(req, res, async(context) => {\n // do your bot logic here!\n });\n});\n```\n\nUse in \"Slack app\" multi-team mode:\n```javascript\nconst adapter = new SlackAdapter({\n clientSigningSecret: process.env.CLIENT_SIGNING_SECRET,\n clientId: process.env.CLIENT_ID, // oauth client id\n clientSecret: process.env.CLIENT_SECRET, // oauth client secret\n scopes: ['bot'], // oauth scopes requested\n redirectUri: process.env.REDIRECT_URI, // url to redirect post login defaults to `https:///install/auth`\n getTokenForTeam: async(team_id) => Promise, // function that returns a token based on team id\n getBotUserByTeam: async(team_id) => Promise, // function that returns a bot's user id based on team id\n});\n```\n" + "text": "The SlackAdapter can be used in 2 modes:\n * As an \"[internal integration](https://api.slack.com/internal-integrations) connected to a single Slack workspace\n * As a \"[Slack app](https://api.slack.com/slack-apps) that uses oauth to connect to multiple workspaces and can be submitted to the Slack app.\n\n[Read here for more information about all the ways to configure the SlackAdapter →](../../botbuilder-adapter-slack/readme.md).\n\nUse with Botkit:\n```javascript\nconst adapter = new SlackAdapter({\n clientSigningSecret: process.env.CLIENT_SIGNING_SECRET,\n botToken: process.env.BOT_TOKEN\n});\nconst controller = new Botkit({\n adapter: adapter,\n // ... other configuration options\n});\n```\n\nUse with BotBuilder:\n```javascript\nconst adapter = new SlackAdapter({\n clientSigningSecret: process.env.CLIENT_SIGNING_SECRET,\n botToken: process.env.BOT_TOKEN\n});\n// set up restify...\nconst server = restify.createServer();\nserver.use(restify.plugins.bodyParser());\nserver.post('/api/messages', (req, res) => {\n adapter.processActivity(req, res, async(context) => {\n // do your bot logic here!\n });\n});\n```\n\nUse in \"Slack app\" multi-team mode:\n```javascript\nconst adapter = new SlackAdapter({\n clientSigningSecret: process.env.CLIENT_SIGNING_SECRET,\n clientId: process.env.CLIENT_ID, // oauth client id\n clientSecret: process.env.CLIENT_SECRET, // oauth client secret\n scopes: ['bot'], // oauth scopes requested\n oauthVersion: 'v1',\n redirectUri: process.env.REDIRECT_URI, // url to redirect post login defaults to `https:///install/auth`\n getTokenForTeam: async(team_id) => Promise, // function that returns a token based on team id\n getBotUserByTeam: async(team_id) => Promise, // function that returns a bot's user id based on team id\n});\n```\n" }, "signatures": [ { @@ -20590,7 +20909,7 @@ }, "comment": { "shortText": "Create a Slack adapter.", - "text": "The SlackAdapter can be used in 2 modes:\n * As an \"[internal integration](https://api.slack.com/internal-integrations) connected to a single Slack workspace\n * As a \"[Slack app](https://api.slack.com/slack-apps) that uses oauth to connect to multiple workspaces and can be submitted to the Slack app.\n\n[Read here for more information about all the ways to configure the SlackAdapter →](../../botbuilder-adapter-slack/readme.md).\n\nUse with Botkit:\n```javascript\nconst adapter = new SlackAdapter({\n clientSigningSecret: process.env.CLIENT_SIGNING_SECRET,\n botToken: process.env.BOT_TOKEN\n});\nconst controller = new Botkit({\n adapter: adapter,\n // ... other configuration options\n});\n```\n\nUse with BotBuilder:\n```javascript\nconst adapter = new SlackAdapter({\n clientSigningSecret: process.env.CLIENT_SIGNING_SECRET,\n botToken: process.env.BOT_TOKEN\n});\n// set up restify...\nconst server = restify.createServer();\nserver.use(restify.plugins.bodyParser());\nserver.post('/api/messages', (req, res) => {\n adapter.processActivity(req, res, async(context) => {\n // do your bot logic here!\n });\n});\n```\n\nUse in \"Slack app\" multi-team mode:\n```javascript\nconst adapter = new SlackAdapter({\n clientSigningSecret: process.env.CLIENT_SIGNING_SECRET,\n clientId: process.env.CLIENT_ID, // oauth client id\n clientSecret: process.env.CLIENT_SECRET, // oauth client secret\n scopes: ['bot'], // oauth scopes requested\n redirectUri: process.env.REDIRECT_URI, // url to redirect post login defaults to `https:///install/auth`\n getTokenForTeam: async(team_id) => Promise, // function that returns a token based on team id\n getBotUserByTeam: async(team_id) => Promise, // function that returns a bot's user id based on team id\n});\n```\n" + "text": "The SlackAdapter can be used in 2 modes:\n * As an \"[internal integration](https://api.slack.com/internal-integrations) connected to a single Slack workspace\n * As a \"[Slack app](https://api.slack.com/slack-apps) that uses oauth to connect to multiple workspaces and can be submitted to the Slack app.\n\n[Read here for more information about all the ways to configure the SlackAdapter →](../../botbuilder-adapter-slack/readme.md).\n\nUse with Botkit:\n```javascript\nconst adapter = new SlackAdapter({\n clientSigningSecret: process.env.CLIENT_SIGNING_SECRET,\n botToken: process.env.BOT_TOKEN\n});\nconst controller = new Botkit({\n adapter: adapter,\n // ... other configuration options\n});\n```\n\nUse with BotBuilder:\n```javascript\nconst adapter = new SlackAdapter({\n clientSigningSecret: process.env.CLIENT_SIGNING_SECRET,\n botToken: process.env.BOT_TOKEN\n});\n// set up restify...\nconst server = restify.createServer();\nserver.use(restify.plugins.bodyParser());\nserver.post('/api/messages', (req, res) => {\n adapter.processActivity(req, res, async(context) => {\n // do your bot logic here!\n });\n});\n```\n\nUse in \"Slack app\" multi-team mode:\n```javascript\nconst adapter = new SlackAdapter({\n clientSigningSecret: process.env.CLIENT_SIGNING_SECRET,\n clientId: process.env.CLIENT_ID, // oauth client id\n clientSecret: process.env.CLIENT_SECRET, // oauth client secret\n scopes: ['bot'], // oauth scopes requested\n oauthVersion: 'v1',\n redirectUri: process.env.REDIRECT_URI, // url to redirect post login defaults to `https:///install/auth`\n getTokenForTeam: async(team_id) => Promise, // function that returns a token based on team id\n getBotUserByTeam: async(team_id) => Promise, // function that returns a bot's user id based on team id\n});\n```\n" }, "parameters": [ { @@ -22950,7 +23269,7 @@ ] }, { - "id": 139, + "id": 140, "name": "SlackDialog", "kind": 128, "kindString": "Class", @@ -22964,7 +23283,7 @@ }, "children": [ { - "id": 140, + "id": 141, "name": "constructor", "kind": 512, "kindString": "Constructor", @@ -22978,7 +23297,7 @@ }, "signatures": [ { - "id": 141, + "id": 142, "name": "new SlackDialog", "kind": 16384, "kindString": "Constructor signature", @@ -22990,7 +23309,7 @@ }, "parameters": [ { - "id": 142, + "id": 143, "name": "title", "kind": 32768, "kindString": "Parameter", @@ -23007,7 +23326,7 @@ } }, { - "id": 143, + "id": 144, "name": "callback_id", "kind": 32768, "kindString": "Parameter", @@ -23024,7 +23343,7 @@ } }, { - "id": 144, + "id": 145, "name": "submit_label", "kind": 32768, "kindString": "Parameter", @@ -23041,7 +23360,7 @@ } }, { - "id": 145, + "id": 146, "name": "elements", "kind": 32768, "kindString": "Parameter", @@ -23060,7 +23379,7 @@ ], "type": { "type": "reference", - "id": 139, + "id": 140, "name": "SlackDialog" } } @@ -23074,7 +23393,7 @@ ] }, { - "id": 168, + "id": 169, "name": "addEmail", "kind": 2048, "kindString": "Method", @@ -23085,7 +23404,7 @@ }, "signatures": [ { - "id": 169, + "id": 170, "name": "addEmail", "kind": 4096, "kindString": "Call signature", @@ -23097,7 +23416,7 @@ }, "parameters": [ { - "id": 170, + "id": 171, "name": "label", "kind": 32768, "kindString": "Parameter", @@ -23111,7 +23430,7 @@ } }, { - "id": 171, + "id": 172, "name": "name", "kind": 32768, "kindString": "Parameter", @@ -23125,7 +23444,7 @@ } }, { - "id": 172, + "id": 173, "name": "value", "kind": 32768, "kindString": "Parameter", @@ -23139,7 +23458,7 @@ } }, { - "id": 173, + "id": 174, "name": "options", "kind": 32768, "kindString": "Parameter", @@ -23158,7 +23477,7 @@ ], "type": { "type": "reference", - "id": 139, + "id": 140, "name": "SlackDialog" } } @@ -23172,7 +23491,7 @@ ] }, { - "id": 174, + "id": 175, "name": "addNumber", "kind": 2048, "kindString": "Method", @@ -23183,7 +23502,7 @@ }, "signatures": [ { - "id": 175, + "id": 176, "name": "addNumber", "kind": 4096, "kindString": "Call signature", @@ -23195,7 +23514,7 @@ }, "parameters": [ { - "id": 176, + "id": 177, "name": "label", "kind": 32768, "kindString": "Parameter", @@ -23209,7 +23528,7 @@ } }, { - "id": 177, + "id": 178, "name": "name", "kind": 32768, "kindString": "Parameter", @@ -23223,7 +23542,7 @@ } }, { - "id": 178, + "id": 179, "name": "value", "kind": 32768, "kindString": "Parameter", @@ -23237,7 +23556,7 @@ } }, { - "id": 179, + "id": 180, "name": "options", "kind": 32768, "kindString": "Parameter", @@ -23256,7 +23575,7 @@ ], "type": { "type": "reference", - "id": 139, + "id": 140, "name": "SlackDialog" } } @@ -23270,7 +23589,7 @@ ] }, { - "id": 199, + "id": 200, "name": "addSelect", "kind": 2048, "kindString": "Method", @@ -23281,7 +23600,7 @@ }, "signatures": [ { - "id": 200, + "id": 201, "name": "addSelect", "kind": 4096, "kindString": "Call signature", @@ -23293,7 +23612,7 @@ }, "parameters": [ { - "id": 201, + "id": 202, "name": "label", "kind": 32768, "kindString": "Parameter", @@ -23307,7 +23626,7 @@ } }, { - "id": 202, + "id": 203, "name": "name", "kind": 32768, "kindString": "Parameter", @@ -23321,7 +23640,7 @@ } }, { - "id": 203, + "id": 204, "name": "value", "kind": 32768, "kindString": "Parameter", @@ -23362,7 +23681,7 @@ } }, { - "id": 204, + "id": 205, "name": "option_list", "kind": 32768, "kindString": "Parameter", @@ -23375,7 +23694,7 @@ "elementType": { "type": "reflection", "declaration": { - "id": 205, + "id": 206, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -23384,7 +23703,7 @@ }, "children": [ { - "id": 206, + "id": 207, "name": "label", "kind": 32, "kindString": "Variable", @@ -23405,7 +23724,7 @@ } }, { - "id": 207, + "id": 208, "name": "value", "kind": 32, "kindString": "Variable", @@ -23458,8 +23777,8 @@ "title": "Variables", "kind": 32, "children": [ - 206, - 207 + 207, + 208 ] } ], @@ -23475,7 +23794,7 @@ } }, { - "id": 208, + "id": 209, "name": "options", "kind": 32768, "kindString": "Parameter", @@ -23494,7 +23813,7 @@ ], "type": { "type": "reference", - "id": 139, + "id": 140, "name": "SlackDialog" } } @@ -23508,7 +23827,7 @@ ] }, { - "id": 180, + "id": 181, "name": "addTel", "kind": 2048, "kindString": "Method", @@ -23519,7 +23838,7 @@ }, "signatures": [ { - "id": 181, + "id": 182, "name": "addTel", "kind": 4096, "kindString": "Call signature", @@ -23531,7 +23850,7 @@ }, "parameters": [ { - "id": 182, + "id": 183, "name": "label", "kind": 32768, "kindString": "Parameter", @@ -23545,7 +23864,7 @@ } }, { - "id": 183, + "id": 184, "name": "name", "kind": 32768, "kindString": "Parameter", @@ -23559,7 +23878,7 @@ } }, { - "id": 184, + "id": 185, "name": "value", "kind": 32768, "kindString": "Parameter", @@ -23573,7 +23892,7 @@ } }, { - "id": 185, + "id": 186, "name": "options", "kind": 32768, "kindString": "Parameter", @@ -23592,7 +23911,7 @@ ], "type": { "type": "reference", - "id": 139, + "id": 140, "name": "SlackDialog" } } @@ -23606,7 +23925,7 @@ ] }, { - "id": 161, + "id": 162, "name": "addText", "kind": 2048, "kindString": "Method", @@ -23617,7 +23936,7 @@ }, "signatures": [ { - "id": 162, + "id": 163, "name": "addText", "kind": 4096, "kindString": "Call signature", @@ -23629,7 +23948,7 @@ }, "parameters": [ { - "id": 163, + "id": 164, "name": "label", "kind": 32768, "kindString": "Parameter", @@ -23652,7 +23971,7 @@ } }, { - "id": 164, + "id": 165, "name": "name", "kind": 32768, "kindString": "Parameter", @@ -23666,7 +23985,7 @@ } }, { - "id": 165, + "id": 166, "name": "value", "kind": 32768, "kindString": "Parameter", @@ -23680,7 +23999,7 @@ } }, { - "id": 166, + "id": 167, "name": "options", "kind": 32768, "kindString": "Parameter", @@ -23703,7 +24022,7 @@ } }, { - "id": 167, + "id": 168, "name": "subtype", "kind": 32768, "kindString": "Parameter", @@ -23722,7 +24041,7 @@ ], "type": { "type": "reference", - "id": 139, + "id": 140, "name": "SlackDialog" } } @@ -23736,7 +24055,7 @@ ] }, { - "id": 192, + "id": 193, "name": "addTextarea", "kind": 2048, "kindString": "Method", @@ -23747,7 +24066,7 @@ }, "signatures": [ { - "id": 193, + "id": 194, "name": "addTextarea", "kind": 4096, "kindString": "Call signature", @@ -23759,7 +24078,7 @@ }, "parameters": [ { - "id": 194, + "id": 195, "name": "label", "kind": 32768, "kindString": "Parameter", @@ -23773,7 +24092,7 @@ } }, { - "id": 195, + "id": 196, "name": "name", "kind": 32768, "kindString": "Parameter", @@ -23787,7 +24106,7 @@ } }, { - "id": 196, + "id": 197, "name": "value", "kind": 32768, "kindString": "Parameter", @@ -23801,7 +24120,7 @@ } }, { - "id": 197, + "id": 198, "name": "options", "kind": 32768, "kindString": "Parameter", @@ -23815,7 +24134,7 @@ } }, { - "id": 198, + "id": 199, "name": "subtype", "kind": 32768, "kindString": "Parameter", @@ -23833,7 +24152,7 @@ ], "type": { "type": "reference", - "id": 139, + "id": 140, "name": "SlackDialog" } } @@ -23847,7 +24166,7 @@ ] }, { - "id": 186, + "id": 187, "name": "addUrl", "kind": 2048, "kindString": "Method", @@ -23858,7 +24177,7 @@ }, "signatures": [ { - "id": 187, + "id": 188, "name": "addUrl", "kind": 4096, "kindString": "Call signature", @@ -23870,7 +24189,7 @@ }, "parameters": [ { - "id": 188, + "id": 189, "name": "label", "kind": 32768, "kindString": "Parameter", @@ -23884,7 +24203,7 @@ } }, { - "id": 189, + "id": 190, "name": "name", "kind": 32768, "kindString": "Parameter", @@ -23898,7 +24217,7 @@ } }, { - "id": 190, + "id": 191, "name": "value", "kind": 32768, "kindString": "Parameter", @@ -23912,7 +24231,7 @@ } }, { - "id": 191, + "id": 192, "name": "options", "kind": 32768, "kindString": "Parameter", @@ -23931,7 +24250,7 @@ ], "type": { "type": "reference", - "id": 139, + "id": 140, "name": "SlackDialog" } } @@ -23945,7 +24264,7 @@ ] }, { - "id": 211, + "id": 212, "name": "asObject", "kind": 2048, "kindString": "Method", @@ -23956,7 +24275,7 @@ }, "signatures": [ { - "id": 212, + "id": 213, "name": "asObject", "kind": 4096, "kindString": "Call signature", @@ -23981,7 +24300,7 @@ ] }, { - "id": 209, + "id": 210, "name": "asString", "kind": 2048, "kindString": "Method", @@ -23992,7 +24311,7 @@ }, "signatures": [ { - "id": 210, + "id": 211, "name": "asString", "kind": 4096, "kindString": "Call signature", @@ -24017,7 +24336,7 @@ ] }, { - "id": 155, + "id": 156, "name": "callback_id", "kind": 2048, "kindString": "Method", @@ -24028,7 +24347,7 @@ }, "signatures": [ { - "id": 156, + "id": 157, "name": "callback_id", "kind": 4096, "kindString": "Call signature", @@ -24040,7 +24359,7 @@ }, "parameters": [ { - "id": 157, + "id": 158, "name": "v", "kind": 32768, "kindString": "Parameter", @@ -24058,7 +24377,7 @@ ], "type": { "type": "reference", - "id": 139, + "id": 140, "name": "SlackDialog" } } @@ -24072,7 +24391,7 @@ ] }, { - "id": 149, + "id": 150, "name": "notifyOnCancel", "kind": 2048, "kindString": "Method", @@ -24083,7 +24402,7 @@ }, "signatures": [ { - "id": 150, + "id": 151, "name": "notifyOnCancel", "kind": 4096, "kindString": "Call signature", @@ -24095,7 +24414,7 @@ }, "parameters": [ { - "id": 151, + "id": 152, "name": "set", "kind": 32768, "kindString": "Parameter", @@ -24113,7 +24432,7 @@ ], "type": { "type": "reference", - "id": 139, + "id": 140, "name": "SlackDialog" } } @@ -24127,7 +24446,7 @@ ] }, { - "id": 146, + "id": 147, "name": "state", "kind": 2048, "kindString": "Method", @@ -24138,7 +24457,7 @@ }, "signatures": [ { - "id": 147, + "id": 148, "name": "state", "kind": 4096, "kindString": "Call signature", @@ -24150,7 +24469,7 @@ }, "parameters": [ { - "id": 148, + "id": 149, "name": "v", "kind": 32768, "kindString": "Parameter", @@ -24168,7 +24487,7 @@ ], "type": { "type": "reference", - "id": 139, + "id": 140, "name": "SlackDialog" } } @@ -24182,7 +24501,7 @@ ] }, { - "id": 158, + "id": 159, "name": "submit_label", "kind": 2048, "kindString": "Method", @@ -24193,7 +24512,7 @@ }, "signatures": [ { - "id": 159, + "id": 160, "name": "submit_label", "kind": 4096, "kindString": "Call signature", @@ -24205,7 +24524,7 @@ }, "parameters": [ { - "id": 160, + "id": 161, "name": "v", "kind": 32768, "kindString": "Parameter", @@ -24223,7 +24542,7 @@ ], "type": { "type": "reference", - "id": 139, + "id": 140, "name": "SlackDialog" } } @@ -24237,7 +24556,7 @@ ] }, { - "id": 152, + "id": 153, "name": "title", "kind": 2048, "kindString": "Method", @@ -24248,7 +24567,7 @@ }, "signatures": [ { - "id": 153, + "id": 154, "name": "title", "kind": 4096, "kindString": "Call signature", @@ -24260,7 +24579,7 @@ }, "parameters": [ { - "id": 154, + "id": 155, "name": "v", "kind": 32768, "kindString": "Parameter", @@ -24278,7 +24597,7 @@ ], "type": { "type": "reference", - "id": 139, + "id": 140, "name": "SlackDialog" } } @@ -24297,27 +24616,27 @@ "title": "Constructors", "kind": 512, "children": [ - 140 + 141 ] }, { "title": "Methods", "kind": 2048, "children": [ - 168, - 174, - 199, - 180, - 161, - 192, - 186, - 211, - 209, - 155, - 149, - 146, - 158, - 152 + 169, + 175, + 200, + 181, + 162, + 193, + 187, + 212, + 210, + 156, + 150, + 147, + 159, + 153 ] } ], @@ -24331,7 +24650,7 @@ "props": [], "methods": [ { - "id": 168, + "id": 169, "name": "addEmail", "kind": 2048, "kindString": "Method", @@ -24342,7 +24661,7 @@ }, "signatures": [ { - "id": 169, + "id": 170, "name": "addEmail", "kind": 4096, "kindString": "Call signature", @@ -24354,7 +24673,7 @@ }, "parameters": [ { - "id": 170, + "id": 171, "name": "label", "kind": 32768, "kindString": "Parameter", @@ -24368,7 +24687,7 @@ } }, { - "id": 171, + "id": 172, "name": "name", "kind": 32768, "kindString": "Parameter", @@ -24382,7 +24701,7 @@ } }, { - "id": 172, + "id": 173, "name": "value", "kind": 32768, "kindString": "Parameter", @@ -24396,7 +24715,7 @@ } }, { - "id": 173, + "id": 174, "name": "options", "kind": 32768, "kindString": "Parameter", @@ -24415,7 +24734,7 @@ ], "type": { "type": "reference", - "id": 139, + "id": 140, "name": "SlackDialog" } } @@ -24429,7 +24748,7 @@ ] }, { - "id": 174, + "id": 175, "name": "addNumber", "kind": 2048, "kindString": "Method", @@ -24440,7 +24759,7 @@ }, "signatures": [ { - "id": 175, + "id": 176, "name": "addNumber", "kind": 4096, "kindString": "Call signature", @@ -24452,7 +24771,7 @@ }, "parameters": [ { - "id": 176, + "id": 177, "name": "label", "kind": 32768, "kindString": "Parameter", @@ -24466,7 +24785,7 @@ } }, { - "id": 177, + "id": 178, "name": "name", "kind": 32768, "kindString": "Parameter", @@ -24480,7 +24799,7 @@ } }, { - "id": 178, + "id": 179, "name": "value", "kind": 32768, "kindString": "Parameter", @@ -24494,7 +24813,7 @@ } }, { - "id": 179, + "id": 180, "name": "options", "kind": 32768, "kindString": "Parameter", @@ -24513,7 +24832,7 @@ ], "type": { "type": "reference", - "id": 139, + "id": 140, "name": "SlackDialog" } } @@ -24527,7 +24846,7 @@ ] }, { - "id": 199, + "id": 200, "name": "addSelect", "kind": 2048, "kindString": "Method", @@ -24538,7 +24857,7 @@ }, "signatures": [ { - "id": 200, + "id": 201, "name": "addSelect", "kind": 4096, "kindString": "Call signature", @@ -24550,7 +24869,7 @@ }, "parameters": [ { - "id": 201, + "id": 202, "name": "label", "kind": 32768, "kindString": "Parameter", @@ -24564,7 +24883,7 @@ } }, { - "id": 202, + "id": 203, "name": "name", "kind": 32768, "kindString": "Parameter", @@ -24578,7 +24897,7 @@ } }, { - "id": 203, + "id": 204, "name": "value", "kind": 32768, "kindString": "Parameter", @@ -24619,7 +24938,7 @@ } }, { - "id": 204, + "id": 205, "name": "option_list", "kind": 32768, "kindString": "Parameter", @@ -24632,7 +24951,7 @@ "elementType": { "type": "reflection", "declaration": { - "id": 205, + "id": 206, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -24641,7 +24960,7 @@ }, "children": [ { - "id": 206, + "id": 207, "name": "label", "kind": 32, "kindString": "Variable", @@ -24662,7 +24981,7 @@ } }, { - "id": 207, + "id": 208, "name": "value", "kind": 32, "kindString": "Variable", @@ -24715,8 +25034,8 @@ "title": "Variables", "kind": 32, "children": [ - 206, - 207 + 207, + 208 ] } ], @@ -24732,7 +25051,7 @@ } }, { - "id": 208, + "id": 209, "name": "options", "kind": 32768, "kindString": "Parameter", @@ -24751,7 +25070,7 @@ ], "type": { "type": "reference", - "id": 139, + "id": 140, "name": "SlackDialog" } } @@ -24765,7 +25084,7 @@ ] }, { - "id": 180, + "id": 181, "name": "addTel", "kind": 2048, "kindString": "Method", @@ -24776,7 +25095,7 @@ }, "signatures": [ { - "id": 181, + "id": 182, "name": "addTel", "kind": 4096, "kindString": "Call signature", @@ -24788,7 +25107,7 @@ }, "parameters": [ { - "id": 182, + "id": 183, "name": "label", "kind": 32768, "kindString": "Parameter", @@ -24802,7 +25121,7 @@ } }, { - "id": 183, + "id": 184, "name": "name", "kind": 32768, "kindString": "Parameter", @@ -24816,7 +25135,7 @@ } }, { - "id": 184, + "id": 185, "name": "value", "kind": 32768, "kindString": "Parameter", @@ -24830,7 +25149,7 @@ } }, { - "id": 185, + "id": 186, "name": "options", "kind": 32768, "kindString": "Parameter", @@ -24849,7 +25168,7 @@ ], "type": { "type": "reference", - "id": 139, + "id": 140, "name": "SlackDialog" } } @@ -24863,7 +25182,7 @@ ] }, { - "id": 161, + "id": 162, "name": "addText", "kind": 2048, "kindString": "Method", @@ -24874,7 +25193,7 @@ }, "signatures": [ { - "id": 162, + "id": 163, "name": "addText", "kind": 4096, "kindString": "Call signature", @@ -24886,7 +25205,7 @@ }, "parameters": [ { - "id": 163, + "id": 164, "name": "label", "kind": 32768, "kindString": "Parameter", @@ -24909,7 +25228,7 @@ } }, { - "id": 164, + "id": 165, "name": "name", "kind": 32768, "kindString": "Parameter", @@ -24923,7 +25242,7 @@ } }, { - "id": 165, + "id": 166, "name": "value", "kind": 32768, "kindString": "Parameter", @@ -24937,7 +25256,7 @@ } }, { - "id": 166, + "id": 167, "name": "options", "kind": 32768, "kindString": "Parameter", @@ -24960,7 +25279,7 @@ } }, { - "id": 167, + "id": 168, "name": "subtype", "kind": 32768, "kindString": "Parameter", @@ -24979,7 +25298,7 @@ ], "type": { "type": "reference", - "id": 139, + "id": 140, "name": "SlackDialog" } } @@ -24993,7 +25312,7 @@ ] }, { - "id": 192, + "id": 193, "name": "addTextarea", "kind": 2048, "kindString": "Method", @@ -25004,7 +25323,7 @@ }, "signatures": [ { - "id": 193, + "id": 194, "name": "addTextarea", "kind": 4096, "kindString": "Call signature", @@ -25016,7 +25335,7 @@ }, "parameters": [ { - "id": 194, + "id": 195, "name": "label", "kind": 32768, "kindString": "Parameter", @@ -25030,7 +25349,7 @@ } }, { - "id": 195, + "id": 196, "name": "name", "kind": 32768, "kindString": "Parameter", @@ -25044,7 +25363,7 @@ } }, { - "id": 196, + "id": 197, "name": "value", "kind": 32768, "kindString": "Parameter", @@ -25058,7 +25377,7 @@ } }, { - "id": 197, + "id": 198, "name": "options", "kind": 32768, "kindString": "Parameter", @@ -25072,7 +25391,7 @@ } }, { - "id": 198, + "id": 199, "name": "subtype", "kind": 32768, "kindString": "Parameter", @@ -25090,7 +25409,7 @@ ], "type": { "type": "reference", - "id": 139, + "id": 140, "name": "SlackDialog" } } @@ -25104,7 +25423,7 @@ ] }, { - "id": 186, + "id": 187, "name": "addUrl", "kind": 2048, "kindString": "Method", @@ -25115,7 +25434,7 @@ }, "signatures": [ { - "id": 187, + "id": 188, "name": "addUrl", "kind": 4096, "kindString": "Call signature", @@ -25127,7 +25446,7 @@ }, "parameters": [ { - "id": 188, + "id": 189, "name": "label", "kind": 32768, "kindString": "Parameter", @@ -25141,7 +25460,7 @@ } }, { - "id": 189, + "id": 190, "name": "name", "kind": 32768, "kindString": "Parameter", @@ -25155,7 +25474,7 @@ } }, { - "id": 190, + "id": 191, "name": "value", "kind": 32768, "kindString": "Parameter", @@ -25169,7 +25488,7 @@ } }, { - "id": 191, + "id": 192, "name": "options", "kind": 32768, "kindString": "Parameter", @@ -25188,7 +25507,7 @@ ], "type": { "type": "reference", - "id": 139, + "id": 140, "name": "SlackDialog" } } @@ -25202,7 +25521,7 @@ ] }, { - "id": 211, + "id": 212, "name": "asObject", "kind": 2048, "kindString": "Method", @@ -25213,7 +25532,7 @@ }, "signatures": [ { - "id": 212, + "id": 213, "name": "asObject", "kind": 4096, "kindString": "Call signature", @@ -25238,7 +25557,7 @@ ] }, { - "id": 209, + "id": 210, "name": "asString", "kind": 2048, "kindString": "Method", @@ -25249,7 +25568,7 @@ }, "signatures": [ { - "id": 210, + "id": 211, "name": "asString", "kind": 4096, "kindString": "Call signature", @@ -25274,7 +25593,7 @@ ] }, { - "id": 155, + "id": 156, "name": "callback_id", "kind": 2048, "kindString": "Method", @@ -25285,7 +25604,7 @@ }, "signatures": [ { - "id": 156, + "id": 157, "name": "callback_id", "kind": 4096, "kindString": "Call signature", @@ -25297,7 +25616,7 @@ }, "parameters": [ { - "id": 157, + "id": 158, "name": "v", "kind": 32768, "kindString": "Parameter", @@ -25315,7 +25634,7 @@ ], "type": { "type": "reference", - "id": 139, + "id": 140, "name": "SlackDialog" } } @@ -25329,7 +25648,7 @@ ] }, { - "id": 149, + "id": 150, "name": "notifyOnCancel", "kind": 2048, "kindString": "Method", @@ -25340,7 +25659,7 @@ }, "signatures": [ { - "id": 150, + "id": 151, "name": "notifyOnCancel", "kind": 4096, "kindString": "Call signature", @@ -25352,7 +25671,7 @@ }, "parameters": [ { - "id": 151, + "id": 152, "name": "set", "kind": 32768, "kindString": "Parameter", @@ -25370,7 +25689,7 @@ ], "type": { "type": "reference", - "id": 139, + "id": 140, "name": "SlackDialog" } } @@ -25384,7 +25703,7 @@ ] }, { - "id": 146, + "id": 147, "name": "state", "kind": 2048, "kindString": "Method", @@ -25395,7 +25714,7 @@ }, "signatures": [ { - "id": 147, + "id": 148, "name": "state", "kind": 4096, "kindString": "Call signature", @@ -25407,7 +25726,7 @@ }, "parameters": [ { - "id": 148, + "id": 149, "name": "v", "kind": 32768, "kindString": "Parameter", @@ -25425,7 +25744,7 @@ ], "type": { "type": "reference", - "id": 139, + "id": 140, "name": "SlackDialog" } } @@ -25439,7 +25758,7 @@ ] }, { - "id": 158, + "id": 159, "name": "submit_label", "kind": 2048, "kindString": "Method", @@ -25450,7 +25769,7 @@ }, "signatures": [ { - "id": 159, + "id": 160, "name": "submit_label", "kind": 4096, "kindString": "Call signature", @@ -25462,7 +25781,7 @@ }, "parameters": [ { - "id": 160, + "id": 161, "name": "v", "kind": 32768, "kindString": "Parameter", @@ -25480,7 +25799,7 @@ ], "type": { "type": "reference", - "id": 139, + "id": 140, "name": "SlackDialog" } } @@ -25494,7 +25813,7 @@ ] }, { - "id": 152, + "id": 153, "name": "title", "kind": 2048, "kindString": "Method", @@ -25505,7 +25824,7 @@ }, "signatures": [ { - "id": 153, + "id": 154, "name": "title", "kind": 4096, "kindString": "Call signature", @@ -25517,7 +25836,7 @@ }, "parameters": [ { - "id": 154, + "id": 155, "name": "v", "kind": 32768, "kindString": "Parameter", @@ -25535,7 +25854,7 @@ ], "type": { "type": "reference", - "id": 139, + "id": 140, "name": "SlackDialog" } } @@ -25551,7 +25870,7 @@ ], "constructors": [ { - "id": 140, + "id": 141, "name": "constructor", "kind": 512, "kindString": "Constructor", @@ -25565,7 +25884,7 @@ }, "signatures": [ { - "id": 141, + "id": 142, "name": "new SlackDialog", "kind": 16384, "kindString": "Constructor signature", @@ -25577,7 +25896,7 @@ }, "parameters": [ { - "id": 142, + "id": 143, "name": "title", "kind": 32768, "kindString": "Parameter", @@ -25594,7 +25913,7 @@ } }, { - "id": 143, + "id": 144, "name": "callback_id", "kind": 32768, "kindString": "Parameter", @@ -25611,7 +25930,7 @@ } }, { - "id": 144, + "id": 145, "name": "submit_label", "kind": 32768, "kindString": "Parameter", @@ -25628,7 +25947,7 @@ } }, { - "id": 145, + "id": 146, "name": "elements", "kind": 32768, "kindString": "Parameter", @@ -25647,7 +25966,7 @@ ], "type": { "type": "reference", - "id": 139, + "id": 140, "name": "SlackDialog" } } @@ -25663,7 +25982,7 @@ ] }, { - "id": 222, + "id": 223, "name": "SlackEventMiddleware", "kind": 128, "kindString": "Class", @@ -25677,7 +25996,7 @@ }, "children": [ { - "id": 223, + "id": 224, "name": "onTurn", "kind": 2048, "kindString": "Method", @@ -25688,7 +26007,7 @@ }, "signatures": [ { - "id": 224, + "id": 225, "name": "onTurn", "kind": 4096, "kindString": "Call signature", @@ -25700,7 +26019,7 @@ }, "parameters": [ { - "id": 225, + "id": 226, "name": "context", "kind": 32768, "kindString": "Parameter", @@ -25714,7 +26033,7 @@ } }, { - "id": 226, + "id": 227, "name": "next", "kind": 32768, "kindString": "Parameter", @@ -25727,7 +26046,7 @@ "type": { "type": "reflection", "declaration": { - "id": 227, + "id": 228, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -25736,7 +26055,7 @@ }, "signatures": [ { - "id": 228, + "id": 229, "name": "__call", "kind": 4096, "kindString": "Call signature", @@ -25792,7 +26111,7 @@ "title": "Methods", "kind": 2048, "children": [ - 223 + 224 ] } ], @@ -25812,7 +26131,7 @@ "props": [], "methods": [ { - "id": 223, + "id": 224, "name": "onTurn", "kind": 2048, "kindString": "Method", @@ -25823,7 +26142,7 @@ }, "signatures": [ { - "id": 224, + "id": 225, "name": "onTurn", "kind": 4096, "kindString": "Call signature", @@ -25835,7 +26154,7 @@ }, "parameters": [ { - "id": 225, + "id": 226, "name": "context", "kind": 32768, "kindString": "Parameter", @@ -25849,7 +26168,7 @@ } }, { - "id": 226, + "id": 227, "name": "next", "kind": 32768, "kindString": "Parameter", @@ -25862,7 +26181,7 @@ "type": { "type": "reflection", "declaration": { - "id": 227, + "id": 228, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -25871,7 +26190,7 @@ }, "signatures": [ { - "id": 228, + "id": 229, "name": "__call", "kind": 4096, "kindString": "Call signature", @@ -25925,7 +26244,7 @@ "constructors": [] }, { - "id": 214, + "id": 215, "name": "SlackMessageTypeMiddleware", "kind": 128, "kindString": "Class", @@ -25939,7 +26258,7 @@ }, "children": [ { - "id": 215, + "id": 216, "name": "onTurn", "kind": 2048, "kindString": "Method", @@ -25950,7 +26269,7 @@ }, "signatures": [ { - "id": 216, + "id": 217, "name": "onTurn", "kind": 4096, "kindString": "Call signature", @@ -25962,7 +26281,7 @@ }, "parameters": [ { - "id": 217, + "id": 218, "name": "context", "kind": 32768, "kindString": "Parameter", @@ -25976,7 +26295,7 @@ } }, { - "id": 218, + "id": 219, "name": "next", "kind": 32768, "kindString": "Parameter", @@ -25989,7 +26308,7 @@ "type": { "type": "reflection", "declaration": { - "id": 219, + "id": 220, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -25998,7 +26317,7 @@ }, "signatures": [ { - "id": 220, + "id": 221, "name": "__call", "kind": 4096, "kindString": "Call signature", @@ -26054,7 +26373,7 @@ "title": "Methods", "kind": 2048, "children": [ - 215 + 216 ] } ], @@ -26074,7 +26393,7 @@ "props": [], "methods": [ { - "id": 215, + "id": 216, "name": "onTurn", "kind": 2048, "kindString": "Method", @@ -26085,7 +26404,7 @@ }, "signatures": [ { - "id": 216, + "id": 217, "name": "onTurn", "kind": 4096, "kindString": "Call signature", @@ -26097,7 +26416,7 @@ }, "parameters": [ { - "id": 217, + "id": 218, "name": "context", "kind": 32768, "kindString": "Parameter", @@ -26111,7 +26430,7 @@ } }, { - "id": 218, + "id": 219, "name": "next", "kind": 32768, "kindString": "Parameter", @@ -26124,7 +26443,7 @@ "type": { "type": "reflection", "declaration": { - "id": 219, + "id": 220, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -26133,7 +26452,7 @@ }, "signatures": [ { - "id": 220, + "id": 221, "name": "__call", "kind": 4096, "kindString": "Call signature", @@ -26189,7 +26508,7 @@ ], "interfaces": [ { - "id": 131, + "id": 132, "name": "AuthTestResult", "kind": 256, "kindString": "Interface", @@ -26198,7 +26517,7 @@ }, "children": [ { - "id": 136, + "id": 137, "name": "ok", "kind": 1024, "kindString": "Property", @@ -26208,7 +26527,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 769, + "line": 792, "character": 6 } ], @@ -26218,7 +26537,7 @@ } }, { - "id": 133, + "id": 134, "name": "team", "kind": 1024, "kindString": "Property", @@ -26228,7 +26547,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 766, + "line": 789, "character": 8 } ], @@ -26238,7 +26557,7 @@ } }, { - "id": 134, + "id": 135, "name": "team_id", "kind": 1024, "kindString": "Property", @@ -26248,7 +26567,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 767, + "line": 790, "character": 11 } ], @@ -26258,7 +26577,7 @@ } }, { - "id": 132, + "id": 133, "name": "user", "kind": 1024, "kindString": "Property", @@ -26268,7 +26587,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 765, + "line": 788, "character": 8 } ], @@ -26278,7 +26597,7 @@ } }, { - "id": 135, + "id": 136, "name": "user_id", "kind": 1024, "kindString": "Property", @@ -26288,7 +26607,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 768, + "line": 791, "character": 11 } ], @@ -26303,18 +26622,18 @@ "title": "Properties", "kind": 1024, "children": [ - 136, - 133, + 137, 134, - 132, - 135 + 135, + 133, + 136 ] } ], "sources": [ { "fileName": "slack_adapter.ts", - "line": 764, + "line": 787, "character": 24 } ], @@ -26326,7 +26645,7 @@ ], "props": [ { - "id": 136, + "id": 137, "name": "ok", "kind": 1024, "kindString": "Property", @@ -26336,7 +26655,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 769, + "line": 792, "character": 6 } ], @@ -26346,7 +26665,7 @@ } }, { - "id": 133, + "id": 134, "name": "team", "kind": 1024, "kindString": "Property", @@ -26356,7 +26675,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 766, + "line": 789, "character": 8 } ], @@ -26366,7 +26685,7 @@ } }, { - "id": 134, + "id": 135, "name": "team_id", "kind": 1024, "kindString": "Property", @@ -26376,7 +26695,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 767, + "line": 790, "character": 11 } ], @@ -26386,7 +26705,7 @@ } }, { - "id": 132, + "id": 133, "name": "user", "kind": 1024, "kindString": "Property", @@ -26396,7 +26715,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 765, + "line": 788, "character": 8 } ], @@ -26406,7 +26725,7 @@ } }, { - "id": 135, + "id": 136, "name": "user_id", "kind": 1024, "kindString": "Property", @@ -26416,7 +26735,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 768, + "line": 791, "character": 11 } ], @@ -26428,7 +26747,7 @@ ] }, { - "id": 125, + "id": 126, "name": "ChatPostMessageResult", "kind": 256, "kindString": "Interface", @@ -26437,7 +26756,7 @@ }, "children": [ { - "id": 126, + "id": 127, "name": "channel", "kind": 1024, "kindString": "Property", @@ -26447,7 +26766,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 755, + "line": 778, "character": 11 } ], @@ -26457,7 +26776,7 @@ } }, { - "id": 128, + "id": 129, "name": "message", "kind": 1024, "kindString": "Property", @@ -26467,21 +26786,21 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 757, + "line": 780, "character": 11 } ], "type": { "type": "reflection", "declaration": { - "id": 129, + "id": 130, "name": "__type", "kind": 65536, "kindString": "Type literal", "flags": {}, "children": [ { - "id": 130, + "id": 131, "name": "text", "kind": 32, "kindString": "Variable", @@ -26491,7 +26810,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 758, + "line": 781, "character": 12 } ], @@ -26506,14 +26825,14 @@ "title": "Variables", "kind": 32, "children": [ - 130 + 131 ] } ], "sources": [ { "fileName": "slack_adapter.ts", - "line": 757, + "line": 780, "character": 12 } ] @@ -26521,7 +26840,7 @@ } }, { - "id": 127, + "id": 128, "name": "ts", "kind": 1024, "kindString": "Property", @@ -26531,7 +26850,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 756, + "line": 779, "character": 6 } ], @@ -26546,16 +26865,16 @@ "title": "Properties", "kind": 1024, "children": [ - 126, - 128, - 127 + 127, + 129, + 128 ] } ], "sources": [ { "fileName": "slack_adapter.ts", - "line": 754, + "line": 777, "character": 31 } ], @@ -26567,7 +26886,7 @@ ], "props": [ { - "id": 126, + "id": 127, "name": "channel", "kind": 1024, "kindString": "Property", @@ -26577,7 +26896,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 755, + "line": 778, "character": 11 } ], @@ -26587,7 +26906,7 @@ } }, { - "id": 128, + "id": 129, "name": "message", "kind": 1024, "kindString": "Property", @@ -26597,21 +26916,21 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 757, + "line": 780, "character": 11 } ], "type": { "type": "reflection", "declaration": { - "id": 129, + "id": 130, "name": "__type", "kind": 65536, "kindString": "Type literal", "flags": {}, "children": [ { - "id": 130, + "id": 131, "name": "text", "kind": 32, "kindString": "Variable", @@ -26621,7 +26940,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 758, + "line": 781, "character": 12 } ], @@ -26636,14 +26955,14 @@ "title": "Variables", "kind": 32, "children": [ - 130 + 131 ] } ], "sources": [ { "fileName": "slack_adapter.ts", - "line": 757, + "line": 780, "character": 12 } ] @@ -26651,7 +26970,7 @@ } }, { - "id": 127, + "id": 128, "name": "ts", "kind": 1024, "kindString": "Property", @@ -26661,7 +26980,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 756, + "line": 779, "character": 6 } ], @@ -26701,7 +27020,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 715, + "line": 734, "character": 12 } ], @@ -26726,7 +27045,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 720, + "line": 739, "character": 12 } ], @@ -26751,7 +27070,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 724, + "line": 743, "character": 16 } ], @@ -26776,7 +27095,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 711, + "line": 730, "character": 23 } ], @@ -26786,7 +27105,7 @@ } }, { - "id": 124, + "id": 125, "name": "enable_incomplete", "kind": 1024, "kindString": "Property", @@ -26801,7 +27120,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 749, + "line": 772, "character": 21 } ], @@ -26811,7 +27130,7 @@ } }, { - "id": 120, + "id": 121, "name": "getBotUserByTeam", "kind": 1024, "kindString": "Property", @@ -26826,14 +27145,14 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 742, + "line": 765, "character": 20 } ], "type": { "type": "reflection", "declaration": { - "id": 121, + "id": 122, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -26842,7 +27161,7 @@ }, "signatures": [ { - "id": 122, + "id": 123, "name": "__call", "kind": 4096, "kindString": "Call signature", @@ -26851,7 +27170,7 @@ }, "parameters": [ { - "id": 123, + "id": 124, "name": "teamId", "kind": 32768, "kindString": "Parameter", @@ -26879,7 +27198,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 742, + "line": 765, "character": 22 } ] @@ -26887,7 +27206,7 @@ } }, { - "id": 116, + "id": 117, "name": "getTokenForTeam", "kind": 1024, "kindString": "Property", @@ -26902,14 +27221,14 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 737, + "line": 760, "character": 19 } ], "type": { "type": "reflection", "declaration": { - "id": 117, + "id": 118, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -26918,7 +27237,7 @@ }, "signatures": [ { - "id": 118, + "id": 119, "name": "__call", "kind": 4096, "kindString": "Call signature", @@ -26927,7 +27246,7 @@ }, "parameters": [ { - "id": 119, + "id": 120, "name": "teamId", "kind": 32768, "kindString": "Parameter", @@ -26955,7 +27274,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 737, + "line": 760, "character": 21 } ] @@ -26964,6 +27283,31 @@ }, { "id": 115, + "name": "oauthVersion", + "kind": 1024, + "kindString": "Property", + "flags": { + "isExported": true, + "isExternal": true, + "isOptional": true + }, + "comment": { + "shortText": "Which version of Slack's oauth protocol to use, v1 or v2. Defaults to v1." + }, + "sources": [ + { + "fileName": "slack_adapter.ts", + "line": 751, + "character": 16 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 116, "name": "redirectUri", "kind": 1024, "kindString": "Property", @@ -26978,7 +27322,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 732, + "line": 755, "character": 15 } ], @@ -26998,12 +27342,12 @@ "isOptional": true }, "comment": { - "shortText": "A an array of scope names that are being requested during the oauth process. Must match the scopes defined at api.slack.com" + "shortText": "A array of scope names that are being requested during the oauth process. Must match the scopes defined at api.slack.com" }, "sources": [ { "fileName": "slack_adapter.ts", - "line": 728, + "line": 747, "character": 10 } ], @@ -27031,7 +27375,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 707, + "line": 726, "character": 21 } ], @@ -27050,10 +27394,11 @@ 112, 113, 110, - 124, - 120, - 116, + 125, + 121, + 117, 115, + 116, 114, 109 ] @@ -27062,7 +27407,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 703, + "line": 722, "character": 36 } ], @@ -27083,7 +27428,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 715, + "line": 734, "character": 12 } ], @@ -27108,7 +27453,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 720, + "line": 739, "character": 12 } ], @@ -27133,7 +27478,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 724, + "line": 743, "character": 16 } ], @@ -27158,7 +27503,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 711, + "line": 730, "character": 23 } ], @@ -27168,7 +27513,7 @@ } }, { - "id": 124, + "id": 125, "name": "enable_incomplete", "kind": 1024, "kindString": "Property", @@ -27183,7 +27528,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 749, + "line": 772, "character": 21 } ], @@ -27193,7 +27538,7 @@ } }, { - "id": 120, + "id": 121, "name": "getBotUserByTeam", "kind": 1024, "kindString": "Property", @@ -27208,14 +27553,14 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 742, + "line": 765, "character": 20 } ], "type": { "type": "reflection", "declaration": { - "id": 121, + "id": 122, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -27224,7 +27569,7 @@ }, "signatures": [ { - "id": 122, + "id": 123, "name": "__call", "kind": 4096, "kindString": "Call signature", @@ -27233,7 +27578,7 @@ }, "parameters": [ { - "id": 123, + "id": 124, "name": "teamId", "kind": 32768, "kindString": "Parameter", @@ -27261,7 +27606,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 742, + "line": 765, "character": 22 } ] @@ -27269,7 +27614,7 @@ } }, { - "id": 116, + "id": 117, "name": "getTokenForTeam", "kind": 1024, "kindString": "Property", @@ -27284,14 +27629,14 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 737, + "line": 760, "character": 19 } ], "type": { "type": "reflection", "declaration": { - "id": 117, + "id": 118, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -27300,7 +27645,7 @@ }, "signatures": [ { - "id": 118, + "id": 119, "name": "__call", "kind": 4096, "kindString": "Call signature", @@ -27309,7 +27654,7 @@ }, "parameters": [ { - "id": 119, + "id": 120, "name": "teamId", "kind": 32768, "kindString": "Parameter", @@ -27337,7 +27682,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 737, + "line": 760, "character": 21 } ] @@ -27346,6 +27691,31 @@ }, { "id": 115, + "name": "oauthVersion", + "kind": 1024, + "kindString": "Property", + "flags": { + "isExported": true, + "isExternal": true, + "isOptional": true + }, + "comment": { + "shortText": "Which version of Slack's oauth protocol to use, v1 or v2. Defaults to v1." + }, + "sources": [ + { + "fileName": "slack_adapter.ts", + "line": 751, + "character": 16 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 116, "name": "redirectUri", "kind": 1024, "kindString": "Property", @@ -27360,7 +27730,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 732, + "line": 755, "character": 15 } ], @@ -27380,12 +27750,12 @@ "isOptional": true }, "comment": { - "shortText": "A an array of scope names that are being requested during the oauth process. Must match the scopes defined at api.slack.com" + "shortText": "A array of scope names that are being requested during the oauth process. Must match the scopes defined at api.slack.com" }, "sources": [ { "fileName": "slack_adapter.ts", - "line": 728, + "line": 747, "character": 10 } ], @@ -27413,7 +27783,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 707, + "line": 726, "character": 21 } ], @@ -31632,7 +32002,7 @@ "sources": [ { "fileName": "facebook_adapter.ts", - "line": 321, + "line": 323, "character": 87 } ] @@ -31655,7 +32025,7 @@ "sources": [ { "fileName": "facebook_adapter.ts", - "line": 321, + "line": 323, "character": 37 } ] @@ -31723,7 +32093,7 @@ "sources": [ { "fileName": "facebook_adapter.ts", - "line": 172, + "line": 174, "character": 23 } ] @@ -31903,7 +32273,7 @@ "sources": [ { "fileName": "facebook_adapter.ts", - "line": 338, + "line": 340, "character": 49 } ] @@ -31926,7 +32296,7 @@ "sources": [ { "fileName": "facebook_adapter.ts", - "line": 338, + "line": 340, "character": 32 } ] @@ -32014,7 +32384,7 @@ "sources": [ { "fileName": "facebook_adapter.ts", - "line": 272, + "line": 274, "character": 31 } ] @@ -32160,7 +32530,7 @@ "sources": [ { "fileName": "facebook_adapter.ts", - "line": 321, + "line": 323, "character": 87 } ] @@ -32183,7 +32553,7 @@ "sources": [ { "fileName": "facebook_adapter.ts", - "line": 321, + "line": 323, "character": 37 } ] @@ -32251,7 +32621,7 @@ "sources": [ { "fileName": "facebook_adapter.ts", - "line": 172, + "line": 174, "character": 23 } ] @@ -32431,7 +32801,7 @@ "sources": [ { "fileName": "facebook_adapter.ts", - "line": 338, + "line": 340, "character": 49 } ] @@ -32454,7 +32824,7 @@ "sources": [ { "fileName": "facebook_adapter.ts", - "line": 338, + "line": 340, "character": 32 } ] @@ -32542,7 +32912,7 @@ "sources": [ { "fileName": "facebook_adapter.ts", - "line": 272, + "line": 274, "character": 31 } ] @@ -33501,7 +33871,7 @@ "sources": [ { "fileName": "facebook_adapter.ts", - "line": 474, + "line": 476, "character": 16 } ], @@ -33526,7 +33896,7 @@ "sources": [ { "fileName": "facebook_adapter.ts", - "line": 455, + "line": 457, "character": 12 } ], @@ -33551,7 +33921,7 @@ "sources": [ { "fileName": "facebook_adapter.ts", - "line": 459, + "line": 461, "character": 15 } ], @@ -33575,7 +33945,7 @@ "sources": [ { "fileName": "facebook_adapter.ts", - "line": 469, + "line": 471, "character": 14 } ], @@ -33600,7 +33970,7 @@ "sources": [ { "fileName": "facebook_adapter.ts", - "line": 486, + "line": 488, "character": 21 } ], @@ -33625,7 +33995,7 @@ "sources": [ { "fileName": "facebook_adapter.ts", - "line": 479, + "line": 481, "character": 25 } ], @@ -33678,7 +34048,7 @@ "sources": [ { "fileName": "facebook_adapter.ts", - "line": 479, + "line": 481, "character": 27 } ] @@ -33700,7 +34070,7 @@ "sources": [ { "fileName": "facebook_adapter.ts", - "line": 464, + "line": 466, "character": 16 } ], @@ -33728,7 +34098,7 @@ "sources": [ { "fileName": "facebook_adapter.ts", - "line": 451, + "line": 453, "character": 39 } ], @@ -33749,7 +34119,7 @@ "sources": [ { "fileName": "facebook_adapter.ts", - "line": 474, + "line": 476, "character": 16 } ], @@ -33774,7 +34144,7 @@ "sources": [ { "fileName": "facebook_adapter.ts", - "line": 455, + "line": 457, "character": 12 } ], @@ -33799,7 +34169,7 @@ "sources": [ { "fileName": "facebook_adapter.ts", - "line": 459, + "line": 461, "character": 15 } ], @@ -33823,7 +34193,7 @@ "sources": [ { "fileName": "facebook_adapter.ts", - "line": 469, + "line": 471, "character": 14 } ], @@ -33848,7 +34218,7 @@ "sources": [ { "fileName": "facebook_adapter.ts", - "line": 486, + "line": 488, "character": 21 } ], @@ -33873,7 +34243,7 @@ "sources": [ { "fileName": "facebook_adapter.ts", - "line": 479, + "line": 481, "character": 25 } ], @@ -33926,7 +34296,7 @@ "sources": [ { "fileName": "facebook_adapter.ts", - "line": 479, + "line": 481, "character": 27 } ] @@ -33948,7 +34318,7 @@ "sources": [ { "fileName": "facebook_adapter.ts", - "line": 464, + "line": 466, "character": 16 } ], diff --git a/packages/docs/platforms/slack.md b/packages/docs/platforms/slack.md index d05e52304..9f9b2c743 100644 --- a/packages/docs/platforms/slack.md +++ b/packages/docs/platforms/slack.md @@ -100,8 +100,9 @@ const adapter = new SlackAdapter({ clientSigningSecret: process.env.SLACK_SECRET, clientId: process.env.CLIENTID, // oauth client id clientSecret: process.env.CLIENTSECRET, // oauth client secret - scopes: ['bot'], // oauth scopes requested + scopes: ['bot'], // oauth scopes requested, 'bot' deprecated by Slack in favor of granular permissions redirectUri: process.env.REDIRECT_URI, // url to redirect post-login + oauthVersion: 'v1', // or use v2 getTokenForTeam: async(team_id) => { // load the token for this team // as captured during oauth @@ -125,9 +126,9 @@ controller.webserver.get('/install/auth', (req, res) => { const results = await controller.adapter.validateOauthCode(req.query.code); // Store token by team in bot state. - let team = results.team_id; - let token = results.bot.bot_access_token; - let userId = results.bot.bot_user_id; + let team = results.team_id; // results.team.id in oauth v2 + let token = results.bot.bot_access_token; // results.access_token in oauth v2 + let userId = results.bot.bot_user_id; // results.bot_user_id in oauth v2 // Securely store the token and usedId so that they can be retrieved later by the team id. // ... @@ -144,6 +145,23 @@ controller.webserver.get('/install/auth', (req, res) => { }); ``` +### Using Slack's v2 OAuth + +To use Slack's [newer "granular scopes"](https://api.slack.com/authentication/oauth-v2), specify `oauthVersion: 'v2'` in your adapter configuration. +This will cause the adapter to use the v2 oauth URL and credential validation function. +However, note that the payload returned `validateOauthCode` differs between versions. + +In v1, your bot's token will be located at `results.bot.bot_access_token`, whereas in v2, it will be `results.access_token`. + +In v1, your bot's user id will be at `results.bot.bot_user_id`, whereas in v2 it will be `results.bot_user_id`. + +From Slack's official docs: + +* [V1 response payload](https://api.slack.com/methods/oauth.access#response) +* [V2 response payload](https://api.slack.com/methods/oauth.v2.access#response) + +Take care to update your auth handler function when you migrate to granular scopes. + ## Class Reference * [SlackAdapter](../reference/slack.md#slackadapter) diff --git a/packages/docs/reference/core.md b/packages/docs/reference/core.md index e51347b3f..287010e0d 100644 --- a/packages/docs/reference/core.md +++ b/packages/docs/reference/core.md @@ -458,7 +458,8 @@ for handling platform-specific events or activities. | Argument | Type | description |--- |--- |--- -| config (optional)| any | Preferably receives a DialogContext, though can also receive a TurnContext. If excluded, must call `bot.changeContext(reference)` before calling any other method.
+| config (optional)| any | Preferably receives a DialogContext, though can also receive a TurnContext. If excluded, must call `bot.changeContext(reference)` before calling any other method. +| custom_adapter (optional)| BotAdapter | @@ -575,9 +576,12 @@ This class includes the following methods: * [cancelAllDialogs()](#cancelAllDialogs) * [changeContext()](#changeContext) * [ensureMessageFormat()](#ensureMessageFormat) +* [getActiveDialog()](#getActiveDialog) * [getConfig()](#getConfig) +* [hasActiveDialog()](#hasActiveDialog) * [httpBody()](#httpBody) * [httpStatus()](#httpStatus) +* [isDialogActive()](#isDialogActive) * [replaceDialog()](#replaceDialog) * [reply()](#reply) * [say()](#say) @@ -672,6 +676,17 @@ a properly formed Activity object + +### getActiveDialog() +Get a reference to the active dialog + +**Returns** + +a reference to the active dialog or undefined if no dialog is active + + + + ### getConfig() Get a value from the BotWorker's configuration. @@ -696,6 +711,17 @@ await original_context.sendActivity('send directly using the adapter instead of ``` + +### hasActiveDialog() +Check if any dialog is active or not + +**Returns** + +true if there is an active dialog, otherwise false + + + + ### httpBody() Set the http response body for this turn. @@ -737,6 +763,24 @@ controller.on('event', async(bot, message) => { ``` + +### isDialogActive() +Check to see if a given dialog is currently active in the stack + +**Parameters** + +| Argument | Type | description +|--- |--- |--- +| id| string | The id of a dialog to look for in the dialog stack + + +**Returns** + +true if dialog with id is located anywhere in the dialog stack + + + + ### replaceDialog() Replace any active dialogs with a new a pre-defined dialog by specifying its id. The dialog will be started in the same context (same user, same channel) in which the original incoming message was received. @@ -1099,7 +1143,7 @@ handler marked as the default choice. [Learn more about building conversations →](../conversations.md#build-a-conversation) ```javascript // ask a question, handle the response with a function -convo.ask('What is your name?', async(response, convo, bot) => { +convo.ask('What is your name?', async(response, convo, bot, full_message) => { await bot.say('Oh your name is ' + response); }, {key: 'name'}); @@ -1108,20 +1152,20 @@ convo.ask('Do you want to eat a taco?', [ { pattern: 'yes', type: 'string', - handler: async(response, convo, bot) => { + handler: async(response_text, convo, bot, full_message) => { return await convo.gotoThread('yes_taco'); } }, { pattern: 'no', type: 'string', - handler: async(response, convo, bot) => { + handler: async(response_text, convo, bot, full_message) => { return await convo.gotoThread('no_taco'); } - },s + }, { default: true, - handler: async(response, convo, bot) => { + handler: async(response_text, convo, bot, full_message) => { await bot.say('I do not understand your response!'); // start over! return await convo.repeat(); diff --git a/packages/docs/reference/slack.md b/packages/docs/reference/slack.md index 2844deeba..8fa6c886b 100644 --- a/packages/docs/reference/slack.md +++ b/packages/docs/reference/slack.md @@ -97,6 +97,7 @@ const adapter = new SlackAdapter({ clientId: process.env.CLIENT_ID, // oauth client id clientSecret: process.env.CLIENT_SECRET, // oauth client secret scopes: ['bot'], // oauth scopes requested + oauthVersion: 'v1', redirectUri: process.env.REDIRECT_URI, // url to redirect post login defaults to `https:///install/auth` getTokenForTeam: async(team_id) => Promise, // function that returns a token based on team id getBotUserByTeam: async(team_id) => Promise, // function that returns a bot's user id based on team id @@ -244,7 +245,7 @@ Standard BotBuilder adapter method to update a previous message with new content ### validateOauthCode() -Validates an oauth code sent by Slack during the install process. +Validates an oauth v2 code sent by Slack during the install process. **Parameters** @@ -261,9 +262,9 @@ controller.webserver.get('/install/auth', async (req, res) => { try { const results = await controller.adapter.validateOauthCode(req.query.code); // make sure to capture the token and bot user id by team id... - const team_id = results.team_id; - const token = results.bot.bot_access_token; - const bot_user = results.bot.bot_user_id; + const team_id = results.team.id; + const token = results.access_token; + const bot_user = results.bot_user_id; // store these values in a way they'll be retrievable with getBotUserByTeam and getTokenForTeam } catch (err) { console.error('OAUTH ERROR:', err); @@ -939,6 +940,7 @@ This interface defines the options that can be passed into the SlackAdapter cons | enable_incomplete | boolean | Allow the adapter to startup without a complete configuration.
This is risky as it may result in a non-functioning or insecure adapter.
This should only be used when getting started.
| getBotUserByTeam | | A method that receives a Slack team id and returns the bot user id associated with that team. Required for multi-team apps.
| getTokenForTeam | | A method that receives a Slack team id and returns the bot token associated with that team. Required for multi-team apps.
+| oauthVersion | string | Which version of Slack's oauth protocol to use, v1 or v2. Defaults to v1.
| redirectUri | string | The URL users will be redirected to after an oauth flow. In most cases, should be `https:///install/auth`
-| scopes | | A an array of scope names that are being requested during the oauth process. Must match the scopes defined at api.slack.com
+| scopes | | A array of scope names that are being requested during the oauth process. Must match the scopes defined at api.slack.com
| verificationToken | string | Legacy method for validating the origin of incoming webhooks. Prefer `clientSigningSecret` instead.
diff --git a/packages/docs/reference/web.md b/packages/docs/reference/web.md index 61b1c23b4..8b1da78b4 100644 --- a/packages/docs/reference/web.md +++ b/packages/docs/reference/web.md @@ -17,9 +17,7 @@ This is a class reference for all the methods exposed by the [botbuilder-adapter Connect [Botkit](https://www.npmjs.com/package/botkit) or [BotBuilder](https://www.npmjs.com/package/botbuilder) to the Web. It offers both websocket and webhook capabilities. To use this adapter, you will need a compatible chat client - generate one using the [Botkit yeoman generator](https://npmjs.com/package/generator-botkit), -or use one of the following examples: -* [official](https://github.com/howdyai/botkit/tree/master/packages/botbuilder-adapter-web/client) -* [community](https://github.com/mabuonomo/botkit-socket-client) +or use [the one included in the project repo here.](https://github.com/howdyai/botkit/tree/master/packages/botbuilder-adapter-web/client) To use this class in your application, first install the package: ```bash diff --git a/packages/generator-botkit/package.json b/packages/generator-botkit/package.json index ad15c022f..35eeb498f 100644 --- a/packages/generator-botkit/package.json +++ b/packages/generator-botkit/package.json @@ -1,6 +1,6 @@ { "name": "generator-botkit", - "version": "4.6.3", + "version": "4.8.0", "description": "Automatically generate a Botkit application template for any supported platform", "scripts": {}, "files": [ diff --git a/packages/testbot/bot.js b/packages/testbot/bot.js index 7c83bbc18..1e47152e3 100644 --- a/packages/testbot/bot.js +++ b/packages/testbot/bot.js @@ -154,13 +154,13 @@ const controller = new Botkit({ storage }); -const cms = new BotkitCMSHelper({ - cms_uri: process.env.cms_uri, - token: process.env.cms_token, -}); +// const cms = new BotkitCMSHelper({ +// cms_uri: process.env.cms_uri, +// token: process.env.cms_token, +// }); -// add cms tools -controller.usePlugin(cms); +// // add cms tools +// controller.usePlugin(cms); // Once the bot has booted up its internal services, you can use them to do stuff. controller.ready(() => { diff --git a/packages/testbot/features/botframework_features.js b/packages/testbot/features/botframework_features.js index bd1e32d1c..241301a52 100644 --- a/packages/testbot/features/botframework_features.js +++ b/packages/testbot/features/botframework_features.js @@ -2,98 +2,101 @@ const request = require('request'); module.exports = function(controller) { - controller.hears('dm me', 'message', async(bot, message) => { - // this does not work with Bot Framework Emulator. - // to achieve the same thing, use bot.changeContext(message.reference); - await bot.startConversationWithUser(message.reference); - await bot.say('Hello! (in private'); - }); - - controller.hears('update me', 'message', async(bot, message) => { - - let reply = await bot.reply(message,'reply'); - await controller.adapter.updateActivity(bot.getConfig('context'), { - text: 'UPDATED!', - ...message.incoming_message, - ...reply + if (!controller.adapter.name) { + + controller.hears('dm me', 'message', async(bot, message) => { + // this does not work with Bot Framework Emulator. + // to achieve the same thing, use bot.changeContext(message.reference); + await bot.startConversationWithUser(message.reference); + await bot.say('Hello! (in private)'); }); - }) + controller.hears('update me', 'message', async(bot, message) => { + + let reply = await bot.reply(message,'reply'); + await controller.adapter.updateActivity(bot.getConfig('context'), { + text: 'UPDATED!', + ...message.incoming_message, + ...reply + }); + + }) + + controller.hears('delete me', 'message', async(bot, message) => { - controller.hears('delete me', 'message', async(bot, message) => { + let reply = await bot.reply(message,'delete this!'); - let reply = await bot.reply(message,'delete this!'); + await controller.adapter.deleteActivity(bot.getConfig('context'), { + ...message.incoming_message, + activityId: reply.id + }); - await controller.adapter.deleteActivity(bot.getConfig('context'), { - ...message.incoming_message, - activityId: reply.id }); - }); - - controller.hears('members', 'message', async(bot, message) => { - - let members = await controller.adapter.getConversationMembers(bot.getConfig('context')); - await bot.reply(message,JSON.stringify(members)); - - }); - - controller.hears('conversations', 'message', async(bot, message) => { - - let channels = await controller.adapter.getChannels(bot.getConfig('context')); - await bot.reply(message, JSON.stringify(channels)); - - }); - - controller.hears('card', 'message', async(bot, message) => { - - await bot.reply(message,{ - attachments: [{ - "contentType": "application/vnd.microsoft.card.hero", - "content": { - "buttons": [ - { - "type": "imBack", - "title": "say hey", - "value": "hey" - }, - { - "type": "imBack", - "title": "say what up", - "value": "what up" - }, - { - "type": "invoke", - "title": "invoke", - "value": {command: 'alpha'} - } - ], - "subtitle": "subtitle is this", - "text": "text of cards", - "title": "this is the card" - } - }] + controller.hears('members', 'message', async(bot, message) => { + + let members = await controller.adapter.getConversationMembers(bot.getConfig('context')); + await bot.reply(message,JSON.stringify(members)); + }); - }); + controller.hears('conversations', 'message', async(bot, message) => { - controller.on('invoke', async(bot, message) => { + let channels = await controller.adapter.getChannels(bot.getConfig('context')); + await bot.reply(message, JSON.stringify(channels)); - // make sure to send back a special invoke response. - // depends on the type of invoke! - await bot.reply(message,{ - type: 'invokeResponse', - value: { - status: 200, - body: {}, - } }); - console.log('***************************************************************************'); - console.log(JSON.stringify(message, null, 2)); - console.log('***************************************************************************'); - await bot.reply(message, 'Got it: ' + JSON.stringify(message.value)); - }); + controller.hears('card', 'message', async(bot, message) => { + + await bot.reply(message,{ + attachments: [{ + "contentType": "application/vnd.microsoft.card.hero", + "content": { + "buttons": [ + { + "type": "imBack", + "title": "say hey", + "value": "hey" + }, + { + "type": "imBack", + "title": "say what up", + "value": "what up" + }, + { + "type": "invoke", + "title": "invoke", + "value": {command: 'alpha'} + } + ], + "subtitle": "subtitle is this", + "text": "text of cards", + "title": "this is the card" + } + }] + }); + + }); + + controller.on('invoke', async(bot, message) => { + + // make sure to send back a special invoke response. + // depends on the type of invoke! + await bot.reply(message,{ + type: 'invokeResponse', + value: { + status: 200, + body: {}, + } + }); + + console.log('***************************************************************************'); + console.log(JSON.stringify(message, null, 2)); + console.log('***************************************************************************'); + await bot.reply(message, 'Got it: ' + JSON.stringify(message.value)); + }); + } } \ No newline at end of file diff --git a/packages/testbot/features/middlewares.js b/packages/testbot/features/middlewares.js index 5573597f3..48d670d4a 100644 --- a/packages/testbot/features/middlewares.js +++ b/packages/testbot/features/middlewares.js @@ -10,4 +10,9 @@ module.exports = function(controller) { next(); }); + controller.middleware.ingest.use(async (bot, message, next) => { + message.touchedbyMiddleware = true; + next(); + }); + } \ No newline at end of file diff --git a/packages/testbot/features/websocket_features.js b/packages/testbot/features/websocket_features.js index cf69227d5..a3575fe9a 100644 --- a/packages/testbot/features/websocket_features.js +++ b/packages/testbot/features/websocket_features.js @@ -97,6 +97,24 @@ module.exports = function(controller) { ] }, [], 'reply'); replies.say('You clicked {{vars.reply}}'); + replies.ask({ + text: 'Click one of these suggestions!', + quick_replies: [ + { + title: 'Norm', + payload: 'norm', + }, + { + title: 'Flarm', + payload: 'flarm', + } + ] + }, async(response, convo, bot, message) => { + console.log('GOT REPLY', response); + console.log('FULL PAyLOAD',message); + }, 'reply'); + replies.say('You clicked {{vars.reply}}'); + controller.addDialog(replies); controller.hears('qqq', 'message', async(bot, message) => { diff --git a/packages/testbot/multiadapter.js b/packages/testbot/multiadapter.js index 4ee32dbf8..ed1ee38c1 100644 --- a/packages/testbot/multiadapter.js +++ b/packages/testbot/multiadapter.js @@ -58,7 +58,8 @@ controller.ready(() => { }); controller.on('message', async (bot, message) => { - await bot.reply(message,'I heard ya'); + const adapter_type = bot.getConfig('context').adapter.name; + await bot.reply(message,`I heard ya on my ${ adapter_type } adapter`); }); }); \ No newline at end of file diff --git a/packages/testbot/package.json b/packages/testbot/package.json index 287f4473d..9144593ec 100644 --- a/packages/testbot/package.json +++ b/packages/testbot/package.json @@ -9,9 +9,9 @@ "author": "benbrown@gmail.com", "license": "MIT", "dependencies": { - "botbuilder": "^4.7.1", - "botbuilder-ai": "^4.7.1", - "botbuilder-dialogs": "^4.7.1", + "botbuilder": "^4.8.0", + "botbuilder-ai": "^4.8.0", + "botbuilder-dialogs": "^4.8.0", "botbuilder-adapter-facebook": "^1.0.0", "botbuilder-adapter-hangouts": "^1.0.0", "botbuilder-adapter-slack": "^1.0.0", @@ -20,7 +20,7 @@ "botbuilder-adapter-webex": "^1.0.0", "botbuilder-dialogs-botkit-cms": "0.0.1", "botbuilder-storage-mongodb": "^0.9.5", - "botkit": "^4.6.2", + "botkit": "^4.8.0", "botkit-plugin-cms": "^1.0.3", "dotenv": "^6.2.0", "express-basic-auth": "^1.1.6",