From eff8233aad9a720d5353d3fd49c9980aa77344c1 Mon Sep 17 00:00:00 2001 From: Vivek Singh Date: Sat, 1 Feb 2020 22:26:47 +0530 Subject: [PATCH 01/32] Remove `files` key with empty string value This commit removes sending `files` key with empty string value when there are no files while sending a message. `files` key with empty string is causing API to fail with below `BadRequest: "Unable to retrieve content."`. I have validated that by sending request to webex api from webex developer console. Signed-off-by: Vivek Singh --- .../src/webex_adapter.ts | 27 ++++++++++--------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/packages/botbuilder-adapter-webex/src/webex_adapter.ts b/packages/botbuilder-adapter-webex/src/webex_adapter.ts index b69d81fe7..3a05b3e38 100644 --- a/packages/botbuilder-adapter-webex/src/webex_adapter.ts +++ b/packages/botbuilder-adapter-webex/src/webex_adapter.ts @@ -277,9 +277,9 @@ export class WebexAdapter extends BotAdapter { event: 'all', secret: this.options.secret, name: webhook_name - }).then(function() { + }).then(function () { debug('Webex: SUCCESSFULLY UPDATED WEBEX WEBHOOKS'); - }).catch(function(err) { + }).catch(function (err) { console.error('FAILED TO REGISTER WEBHOOK', err); throw new Error(err); }); @@ -290,14 +290,14 @@ export class WebexAdapter extends BotAdapter { event: 'all', secret: this.options.secret, name: webhook_name - }).then(function() { + }).then(function () { debug('Webex: SUCCESSFULLY REGISTERED WEBEX WEBHOOKS'); - }).catch(function(err) { + }).catch(function (err) { console.error('FAILED TO REGISTER WEBHOOK', err); throw new Error(err); }); } - }).catch(function(err) { + }).catch(function (err) { throw new Error(err); }); } @@ -330,9 +330,9 @@ export class WebexAdapter extends BotAdapter { event: 'all', secret: this.options.secret, name: webhook_name - }).then(function() { + }).then(function () { debug('Webex: SUCCESSFULLY UPDATED WEBEX WEBHOOKS'); - }).catch(function(err) { + }).catch(function (err) { console.error('FAILED TO REGISTER WEBHOOK', err); throw new Error(err); }); @@ -343,14 +343,14 @@ export class WebexAdapter extends BotAdapter { event: 'all', secret: this.options.secret, name: webhook_name - }).then(function() { + }).then(function () { debug('Webex: SUCCESSFULLY REGISTERED WEBEX WEBHOOKS'); - }).catch(function(err) { + }).catch(function (err) { console.error('FAILED TO REGISTER WEBHOOK', err); throw new Error(err); }); } - }).catch(function(err) { + }).catch(function (err) { throw new Error(err); }); } @@ -370,9 +370,10 @@ export class WebexAdapter extends BotAdapter { // 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; } From 79380e242b7c033a238fc115f9cb7f1e983b4cfe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Meyer?= Date: Tue, 10 Mar 2020 11:33:06 +0100 Subject: [PATCH 02/32] parse channelData with mustache in conversations --- packages/botkit/src/conversation.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/botkit/src/conversation.ts b/packages/botkit/src/conversation.ts index b5d5e5ce7..e5d43a779 100644 --- a/packages/botkit/src/conversation.ts +++ b/packages/botkit/src/conversation.ts @@ -855,7 +855,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) } /*******************************************************************************************************************/ From 4dcae4afd1e9b5c126098db683c074a5949e615d Mon Sep 17 00:00:00 2001 From: Ben Brown Date: Tue, 10 Mar 2020 12:35:13 -0500 Subject: [PATCH 03/32] pass in the raw activity to the callback as well as the text --- packages/botkit/src/conversation.ts | 23 +++-- packages/botkit/tests/Dialog.tests.js | 96 ++++++++++++++++++- packages/testbot/bot.js | 12 +-- .../testbot/features/websocket_features.js | 5 +- 4 files changed, 118 insertions(+), 18 deletions(-) diff --git a/packages/botkit/src/conversation.ts b/packages/botkit/src/conversation.ts index b5d5e5ce7..ebe0b73cf 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, TextPrompt, 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,8 +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; } @@ -559,7 +561,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); } /** @@ -727,7 +729,8 @@ 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) { @@ -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,7 +970,7 @@ 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); + await path.handler.call(this, response, convo, bot, step.resultObject); if (!dc.activeDialog) { return false; diff --git a/packages/botkit/tests/Dialog.tests.js b/packages/botkit/tests/Dialog.tests.js index 16851b1b5..aeea1c7f0 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(); } }, { @@ -543,7 +544,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/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/websocket_features.js b/packages/testbot/features/websocket_features.js index cf69227d5..4b9b745f1 100644 --- a/packages/testbot/features/websocket_features.js +++ b/packages/testbot/features/websocket_features.js @@ -95,7 +95,10 @@ module.exports = function(controller) { payload: 'bar', } ] - }, [], 'reply'); + }, 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); From 703e072ead2a611ddd93fa3ee27b3f77e2b33692 Mon Sep 17 00:00:00 2001 From: Ben Brown Date: Tue, 10 Mar 2020 12:41:22 -0500 Subject: [PATCH 04/32] add an ingest middleware --- packages/testbot/features/middlewares.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/testbot/features/middlewares.js b/packages/testbot/features/middlewares.js index 5573597f3..d9562da82 100644 --- a/packages/testbot/features/middlewares.js +++ b/packages/testbot/features/middlewares.js @@ -10,4 +10,10 @@ module.exports = function(controller) { next(); }); + controller.middleware.ingest.use(async (bot, message, next) => { + message.touchedbyMiddleware = true; + console.log('MODIFYING MESSAGE IN INGEST!!', message); + next(); + }); + } \ No newline at end of file From f30475c18a7bb80de106ea58172713d4afbf8022 Mon Sep 17 00:00:00 2001 From: Ben Brown Date: Tue, 10 Mar 2020 15:17:39 -0500 Subject: [PATCH 05/32] include incoming botkit message as paramter to the ask callbacks --- packages/botkit/src/conversation.ts | 14 ++++++-------- packages/botkit/src/core.ts | 16 ++++++++++------ packages/botkit/src/testClient.ts | 2 +- packages/testbot/features/middlewares.js | 1 - packages/testbot/features/websocket_features.js | 15 +++++++++++++++ 5 files changed, 32 insertions(+), 16 deletions(-) diff --git a/packages/botkit/src/conversation.ts b/packages/botkit/src/conversation.ts index ebe0b73cf..bb2806a0c 100644 --- a/packages/botkit/src/conversation.ts +++ b/packages/botkit/src/conversation.ts @@ -9,7 +9,7 @@ import { Botkit, BotkitMessage } from './core'; import { BotWorker } from './botworker'; import { BotkitDialogWrapper } from './dialogWrapper'; import { Activity, ActivityTypes, TurnContext, MessageFactory, ActionTypes } from 'botbuilder'; -import { Dialog, DialogContext, DialogReason, TextPrompt, PromptValidatorContext, ActivityPrompt, DialogTurnStatus } from 'botbuilder-dialogs'; +import { Dialog, DialogContext, DialogReason, PromptValidatorContext, ActivityPrompt, DialogTurnStatus } from 'botbuilder-dialogs'; import * as mustache from 'mustache'; import * as Debug from 'debug'; @@ -146,6 +146,7 @@ export class BotkitConversation extends Dialog { this._prompt, (prompt: PromptValidatorContext) => Promise.resolve(prompt.recognized.succeeded === true) )); + return this; } @@ -479,7 +480,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); } } @@ -527,7 +527,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); } } @@ -681,8 +680,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)) { @@ -719,7 +718,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 = { @@ -811,7 +809,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 @@ -970,7 +968,7 @@ export class BotkitConversation extends Dialog { // create a convo controller object const convo = new BotkitDialogWrapper(dc, step); - await path.handler.call(this, response, convo, bot, step.resultObject); + await path.handler.call(this, response, convo, bot, dc.context.turnState.get('botkitMessage') || dc.context.activity); if (!dc.activeDialog) { return false; diff --git a/packages/botkit/src/core.ts b/packages/botkit/src/core.ts index 21d8b8cb6..d0e740c18 100644 --- a/packages/botkit/src/core.ts +++ b/packages/botkit/src/core.ts @@ -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) { diff --git a/packages/botkit/src/testClient.ts b/packages/botkit/src/testClient.ts index c270942cc..42fde54d4 100644 --- a/packages/botkit/src/testClient.ts +++ b/packages/botkit/src/testClient.ts @@ -109,7 +109,7 @@ 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/testbot/features/middlewares.js b/packages/testbot/features/middlewares.js index d9562da82..48d670d4a 100644 --- a/packages/testbot/features/middlewares.js +++ b/packages/testbot/features/middlewares.js @@ -12,7 +12,6 @@ module.exports = function(controller) { controller.middleware.ingest.use(async (bot, message, next) => { message.touchedbyMiddleware = true; - console.log('MODIFYING MESSAGE IN INGEST!!', message); next(); }); diff --git a/packages/testbot/features/websocket_features.js b/packages/testbot/features/websocket_features.js index 4b9b745f1..a3575fe9a 100644 --- a/packages/testbot/features/websocket_features.js +++ b/packages/testbot/features/websocket_features.js @@ -95,11 +95,26 @@ module.exports = function(controller) { payload: 'bar', } ] + }, [], '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) => { From 1fbe0ccbf30562379554affcbef459241a7ca28c Mon Sep 17 00:00:00 2001 From: Ben Brown Date: Tue, 10 Mar 2020 15:30:54 -0500 Subject: [PATCH 06/32] update docs --- changelog.md | 7 +++++++ packages/botkit/src/conversation.ts | 8 ++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/changelog.md b/changelog.md index f6ffc0349..ac3f0310d 100644 --- a/changelog.md +++ b/changelog.md @@ -4,6 +4,13 @@ [Want to contribute? Read our guide!](https://github.com/howdyai/botkit/blob/master/CONTRIBUTING.md) +# 4.7 + +* 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) + + + # 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/botkit/src/conversation.ts b/packages/botkit/src/conversation.ts index bb2806a0c..3ce4ebd44 100644 --- a/packages/botkit/src/conversation.ts +++ b/packages/botkit/src/conversation.ts @@ -306,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'}); * @@ -315,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(); From 08de46986fbdd6dfe16be7995cf7bb3ab3ac9988 Mon Sep 17 00:00:00 2001 From: Jacob Date: Tue, 10 Mar 2020 15:13:21 -0700 Subject: [PATCH 07/32] adds oauth v2 support Changes to this file are based on an additional Slack adapter option of "oauthVersion". This would allow for oauth v2 support with minimal changes to the adapter. Updates to this file include 2 conditional statements to use new oauth v2 if options.oauthVersion == 'v2', and updates to example oauth response in the comments. --- .../src/slack_adapter.ts | 28 +++++++++++++------ 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/packages/botbuilder-adapter-slack/src/slack_adapter.ts b/packages/botbuilder-adapter-slack/src/slack_adapter.ts index f995ea98d..03ad4c65d 100644 --- a/packages/botbuilder-adapter-slack/src/slack_adapter.ts +++ b/packages/botbuilder-adapter-slack/src/slack_adapter.ts @@ -242,9 +242,14 @@ 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'|'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 +261,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 +270,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 +285,19 @@ 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 = {}; + if (this.options.oauthVersion == 'v2'|'V2'){ + results = await slack.oauth.v2.access(details) + } + else { + results = await slack.oauth.access(details) + } if (results.ok) { return results; } else { From 1351aaccee00532dcc83fc7b566bcc5d0c314254 Mon Sep 17 00:00:00 2001 From: Jacob Date: Tue, 10 Mar 2020 15:29:47 -0700 Subject: [PATCH 08/32] add example response for oauth v2 New slack apps will use oauth v2 by default, we can explain the discrepancy to help devs get up and running faster. --- packages/botbuilder-adapter-slack/readme.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/botbuilder-adapter-slack/readme.md b/packages/botbuilder-adapter-slack/readme.md index 290e1f275..98ac9a903 100644 --- a/packages/botbuilder-adapter-slack/readme.md +++ b/packages/botbuilder-adapter-slack/readme.md @@ -98,7 +98,7 @@ 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' depricated by Slack in favor of granular permissions redirectUri: process.env.REDIRECT_URI, // url to redirect post-login getTokenForTeam: async(team_id) => { // load the token for this team @@ -123,9 +123,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. // ... From a1637af62c99cad63db9ad6acc95efb264178e25 Mon Sep 17 00:00:00 2001 From: Ben Brown Date: Wed, 11 Mar 2020 10:01:13 -0500 Subject: [PATCH 09/32] update docs --- packages/docs/index.json | 858 ++++++++++++++++---------------- packages/docs/reference/core.md | 8 +- 2 files changed, 439 insertions(+), 427 deletions(-) diff --git a/packages/docs/index.json b/packages/docs/index.json index aed60f0f6..c6b3bbd56 100644 --- a/packages/docs/index.json +++ b/packages/docs/index.json @@ -444,7 +444,7 @@ "sources": [ { "fileName": "core.ts", - "line": 1155, + "line": 1159, "character": 20 } ] @@ -596,7 +596,7 @@ "sources": [ { "fileName": "core.ts", - "line": 1183, + "line": 1187, "character": 22 } ] @@ -987,7 +987,7 @@ "sources": [ { "fileName": "core.ts", - "line": 895, + "line": 899, "character": 115 } ] @@ -1051,7 +1051,7 @@ "sources": [ { "fileName": "core.ts", - "line": 895, + "line": 899, "character": 16 } ] @@ -1224,7 +1224,7 @@ "sources": [ { "fileName": "core.ts", - "line": 950, + "line": 954, "character": 131 } ] @@ -1288,7 +1288,7 @@ "sources": [ { "fileName": "core.ts", - "line": 950, + "line": 954, "character": 21 } ] @@ -1342,7 +1342,7 @@ "sources": [ { "fileName": "core.ts", - "line": 1098, + "line": 1102, "character": 21 } ] @@ -1417,7 +1417,7 @@ "sources": [ { "fileName": "core.ts", - "line": 1127, + "line": 1131, "character": 22 } ] @@ -1501,7 +1501,7 @@ "sources": [ { "fileName": "core.ts", - "line": 1002, + "line": 1006, "character": 13 } ] @@ -1718,7 +1718,7 @@ "sources": [ { "fileName": "core.ts", - "line": 766, + "line": 770, "character": 26 } ] @@ -1823,7 +1823,7 @@ "sources": [ { "fileName": "core.ts", - "line": 1057, + "line": 1061, "character": 22 } ] @@ -1920,7 +1920,7 @@ "sources": [ { "fileName": "core.ts", - "line": 1034, + "line": 1038, "character": 24 } ] @@ -2625,7 +2625,7 @@ "sources": [ { "fileName": "core.ts", - "line": 1155, + "line": 1159, "character": 20 } ] @@ -2777,7 +2777,7 @@ "sources": [ { "fileName": "core.ts", - "line": 1183, + "line": 1187, "character": 22 } ] @@ -3168,7 +3168,7 @@ "sources": [ { "fileName": "core.ts", - "line": 895, + "line": 899, "character": 115 } ] @@ -3232,7 +3232,7 @@ "sources": [ { "fileName": "core.ts", - "line": 895, + "line": 899, "character": 16 } ] @@ -3405,7 +3405,7 @@ "sources": [ { "fileName": "core.ts", - "line": 950, + "line": 954, "character": 131 } ] @@ -3469,7 +3469,7 @@ "sources": [ { "fileName": "core.ts", - "line": 950, + "line": 954, "character": 21 } ] @@ -3523,7 +3523,7 @@ "sources": [ { "fileName": "core.ts", - "line": 1098, + "line": 1102, "character": 21 } ] @@ -3598,7 +3598,7 @@ "sources": [ { "fileName": "core.ts", - "line": 1127, + "line": 1131, "character": 22 } ] @@ -3682,7 +3682,7 @@ "sources": [ { "fileName": "core.ts", - "line": 1002, + "line": 1006, "character": 13 } ] @@ -3899,7 +3899,7 @@ "sources": [ { "fileName": "core.ts", - "line": 766, + "line": 770, "character": 26 } ] @@ -4004,7 +4004,7 @@ "sources": [ { "fileName": "core.ts", - "line": 1057, + "line": 1061, "character": 22 } ] @@ -4101,7 +4101,7 @@ "sources": [ { "fileName": "core.ts", - "line": 1034, + "line": 1038, "character": 24 } ] @@ -6479,7 +6479,7 @@ ] }, { - "id": 311, + "id": 312, "name": "BotkitConversation", "kind": 128, "kindString": "Class", @@ -6493,7 +6493,7 @@ }, "typeParameter": [ { - "id": 312, + "id": 313, "name": "O", "kind": 131072, "kindString": "Type parameter", @@ -6508,7 +6508,7 @@ ], "children": [ { - "id": 314, + "id": 315, "name": "constructor", "kind": 512, "kindString": "Constructor", @@ -6522,7 +6522,7 @@ }, "signatures": [ { - "id": 315, + "id": 316, "name": "new BotkitConversation", "kind": 16384, "kindString": "Constructor signature", @@ -6534,7 +6534,7 @@ }, "parameters": [ { - "id": 316, + "id": 317, "name": "dialogId", "kind": 32768, "kindString": "Parameter", @@ -6550,7 +6550,7 @@ } }, { - "id": 317, + "id": 318, "name": "controller", "kind": 32768, "kindString": "Parameter", @@ -6569,7 +6569,7 @@ ], "type": { "type": "reference", - "id": 311, + "id": 312, "name": "BotkitConversation" } } @@ -6583,7 +6583,7 @@ ] }, { - "id": 313, + "id": 314, "name": "script", "kind": 1024, "kindString": "Property", @@ -6608,7 +6608,7 @@ } }, { - "id": 321, + "id": 322, "name": "addAction", "kind": 2048, "kindString": "Method", @@ -6619,7 +6619,7 @@ }, "signatures": [ { - "id": 322, + "id": 323, "name": "addAction", "kind": 4096, "kindString": "Call signature", @@ -6632,7 +6632,7 @@ }, "parameters": [ { - "id": 323, + "id": 324, "name": "action", "kind": 32768, "kindString": "Parameter", @@ -6648,7 +6648,7 @@ } }, { - "id": 324, + "id": 325, "name": "thread_name", "kind": 32768, "kindString": "Parameter", @@ -6667,7 +6667,7 @@ ], "type": { "type": "reference", - "id": 311, + "id": 312, "name": "BotkitConversation" } } @@ -6675,13 +6675,13 @@ "sources": [ { "fileName": "conversation.ts", - "line": 194, + "line": 197, "character": 20 } ] }, { - "id": 325, + "id": 326, "name": "addChildDialog", "kind": 2048, "kindString": "Method", @@ -6692,7 +6692,7 @@ }, "signatures": [ { - "id": 326, + "id": 327, "name": "addChildDialog", "kind": 4096, "kindString": "Call signature", @@ -6705,7 +6705,7 @@ }, "parameters": [ { - "id": 327, + "id": 328, "name": "dialog_id", "kind": 32768, "kindString": "Parameter", @@ -6721,7 +6721,7 @@ } }, { - "id": 328, + "id": 329, "name": "key_name", "kind": 32768, "kindString": "Parameter", @@ -6738,7 +6738,7 @@ } }, { - "id": 329, + "id": 330, "name": "thread_name", "kind": 32768, "kindString": "Parameter", @@ -6757,7 +6757,7 @@ ], "type": { "type": "reference", - "id": 311, + "id": 312, "name": "BotkitConversation" } } @@ -6765,13 +6765,13 @@ "sources": [ { "fileName": "conversation.ts", - "line": 223, + "line": 226, "character": 25 } ] }, { - "id": 330, + "id": 331, "name": "addGotoDialog", "kind": 2048, "kindString": "Method", @@ -6782,7 +6782,7 @@ }, "signatures": [ { - "id": 331, + "id": 332, "name": "addGotoDialog", "kind": 4096, "kindString": "Call signature", @@ -6795,7 +6795,7 @@ }, "parameters": [ { - "id": 332, + "id": 333, "name": "dialog_id", "kind": 32768, "kindString": "Parameter", @@ -6811,7 +6811,7 @@ } }, { - "id": 333, + "id": 334, "name": "thread_name", "kind": 32768, "kindString": "Parameter", @@ -6830,7 +6830,7 @@ ], "type": { "type": "reference", - "id": 311, + "id": 312, "name": "BotkitConversation" } } @@ -6838,13 +6838,13 @@ "sources": [ { "fileName": "conversation.ts", - "line": 250, + "line": 253, "character": 24 } ] }, { - "id": 334, + "id": 335, "name": "addMessage", "kind": 2048, "kindString": "Method", @@ -6855,7 +6855,7 @@ }, "signatures": [ { - "id": 335, + "id": 336, "name": "addMessage", "kind": 4096, "kindString": "Call signature", @@ -6868,7 +6868,7 @@ }, "parameters": [ { - "id": 336, + "id": 337, "name": "message", "kind": 32768, "kindString": "Parameter", @@ -6886,7 +6886,7 @@ "typeArguments": [ { "type": "reference", - "id": 261, + "id": 262, "name": "BotkitMessageTemplate" } ], @@ -6900,7 +6900,7 @@ } }, { - "id": 337, + "id": 338, "name": "thread_name", "kind": 32768, "kindString": "Parameter", @@ -6918,7 +6918,7 @@ ], "type": { "type": "reference", - "id": 311, + "id": 312, "name": "BotkitConversation" } } @@ -6926,13 +6926,13 @@ "sources": [ { "fileName": "conversation.ts", - "line": 279, + "line": 282, "character": 21 } ] }, { - "id": 345, + "id": 346, "name": "addQuestion", "kind": 2048, "kindString": "Method", @@ -6943,7 +6943,7 @@ }, "signatures": [ { - "id": 346, + "id": 347, "name": "addQuestion", "kind": 4096, "kindString": "Call signature", @@ -6956,7 +6956,7 @@ }, "parameters": [ { - "id": 347, + "id": 348, "name": "message", "kind": 32768, "kindString": "Parameter", @@ -6974,7 +6974,7 @@ "typeArguments": [ { "type": "reference", - "id": 261, + "id": 262, "name": "BotkitMessageTemplate" } ], @@ -6988,7 +6988,7 @@ } }, { - "id": 348, + "id": 349, "name": "handlers", "kind": 32768, "kindString": "Parameter", @@ -7010,7 +7010,7 @@ "type": "array", "elementType": { "type": "reference", - "id": 256, + "id": 257, "name": "BotkitConvoTrigger" } } @@ -7018,7 +7018,7 @@ } }, { - "id": 349, + "id": 350, "name": "key", "kind": 32768, "kindString": "Parameter", @@ -7034,7 +7034,7 @@ { "type": "reflection", "declaration": { - "id": 350, + "id": 351, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -7043,7 +7043,7 @@ }, "children": [ { - "id": 351, + "id": 352, "name": "key", "kind": 32, "kindString": "Variable", @@ -7054,7 +7054,7 @@ "sources": [ { "fileName": "conversation.ts", - "line": 355, + "line": 358, "character": 135 } ], @@ -7069,14 +7069,14 @@ "title": "Variables", "kind": 32, "children": [ - 351 + 352 ] } ], "sources": [ { "fileName": "conversation.ts", - "line": 355, + "line": 358, "character": 130 } ] @@ -7094,7 +7094,7 @@ } }, { - "id": 352, + "id": 353, "name": "thread_name", "kind": 32768, "kindString": "Parameter", @@ -7112,7 +7112,7 @@ ], "type": { "type": "reference", - "id": 311, + "id": 312, "name": "BotkitConversation" } } @@ -7120,13 +7120,13 @@ "sources": [ { "fileName": "conversation.ts", - "line": 355, + "line": 358, "character": 22 } ] }, { - "id": 361, + "id": 362, "name": "after", "kind": 2048, "kindString": "Method", @@ -7137,7 +7137,7 @@ }, "signatures": [ { - "id": 362, + "id": 363, "name": "after", "kind": 4096, "kindString": "Call signature", @@ -7150,7 +7150,7 @@ }, "parameters": [ { - "id": 363, + "id": 364, "name": "handler", "kind": 32768, "kindString": "Parameter", @@ -7163,7 +7163,7 @@ "type": { "type": "reflection", "declaration": { - "id": 364, + "id": 365, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -7172,7 +7172,7 @@ }, "signatures": [ { - "id": 365, + "id": 366, "name": "__call", "kind": 4096, "kindString": "Call signature", @@ -7181,7 +7181,7 @@ }, "parameters": [ { - "id": 366, + "id": 367, "name": "results", "kind": 32768, "kindString": "Parameter", @@ -7194,7 +7194,7 @@ } }, { - "id": 367, + "id": 368, "name": "bot", "kind": 32768, "kindString": "Parameter", @@ -7217,7 +7217,7 @@ "sources": [ { "fileName": "conversation.ts", - "line": 465, + "line": 468, "character": 25 } ] @@ -7234,13 +7234,13 @@ "sources": [ { "fileName": "conversation.ts", - "line": 465, + "line": 468, "character": 16 } ] }, { - "id": 338, + "id": 339, "name": "ask", "kind": 2048, "kindString": "Method", @@ -7251,7 +7251,7 @@ }, "signatures": [ { - "id": 339, + "id": 340, "name": "ask", "kind": 4096, "kindString": "Call signature", @@ -7260,11 +7260,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 },s\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": 341, "name": "message", "kind": 32768, "kindString": "Parameter", @@ -7282,7 +7282,7 @@ "typeArguments": [ { "type": "reference", - "id": 261, + "id": 262, "name": "BotkitMessageTemplate" } ], @@ -7296,7 +7296,7 @@ } }, { - "id": 341, + "id": 342, "name": "handlers", "kind": 32768, "kindString": "Parameter", @@ -7318,7 +7318,7 @@ "type": "array", "elementType": { "type": "reference", - "id": 256, + "id": 257, "name": "BotkitConvoTrigger" } } @@ -7326,7 +7326,7 @@ } }, { - "id": 342, + "id": 343, "name": "key", "kind": 32768, "kindString": "Parameter", @@ -7342,7 +7342,7 @@ { "type": "reflection", "declaration": { - "id": 343, + "id": 344, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -7351,7 +7351,7 @@ }, "children": [ { - "id": 344, + "id": 345, "name": "key", "kind": 32, "kindString": "Variable", @@ -7362,7 +7362,7 @@ "sources": [ { "fileName": "conversation.ts", - "line": 341, + "line": 344, "character": 127 } ], @@ -7377,14 +7377,14 @@ "title": "Variables", "kind": 32, "children": [ - 344 + 345 ] } ], "sources": [ { "fileName": "conversation.ts", - "line": 341, + "line": 344, "character": 122 } ] @@ -7404,7 +7404,7 @@ ], "type": { "type": "reference", - "id": 311, + "id": 312, "name": "BotkitConversation" } } @@ -7412,13 +7412,13 @@ "sources": [ { "fileName": "conversation.ts", - "line": 341, + "line": 344, "character": 14 } ] }, { - "id": 353, + "id": 354, "name": "before", "kind": 2048, "kindString": "Method", @@ -7429,7 +7429,7 @@ }, "signatures": [ { - "id": 354, + "id": 355, "name": "before", "kind": 4096, "kindString": "Call signature", @@ -7442,7 +7442,7 @@ }, "parameters": [ { - "id": 355, + "id": 356, "name": "thread_name", "kind": 32768, "kindString": "Parameter", @@ -7458,7 +7458,7 @@ } }, { - "id": 356, + "id": 357, "name": "handler", "kind": 32768, "kindString": "Parameter", @@ -7471,7 +7471,7 @@ "type": { "type": "reflection", "declaration": { - "id": 357, + "id": 358, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -7480,7 +7480,7 @@ }, "signatures": [ { - "id": 358, + "id": 359, "name": "__call", "kind": 4096, "kindString": "Call signature", @@ -7489,7 +7489,7 @@ }, "parameters": [ { - "id": 359, + "id": 360, "name": "convo", "kind": 32768, "kindString": "Parameter", @@ -7503,7 +7503,7 @@ } }, { - "id": 360, + "id": 361, "name": "bot", "kind": 32768, "kindString": "Parameter", @@ -7532,7 +7532,7 @@ "sources": [ { "fileName": "conversation.ts", - "line": 413, + "line": 416, "character": 47 } ] @@ -7549,13 +7549,13 @@ "sources": [ { "fileName": "conversation.ts", - "line": 413, + "line": 416, "character": 17 } ] }, { - "id": 368, + "id": 369, "name": "onChange", "kind": 2048, "kindString": "Method", @@ -7566,7 +7566,7 @@ }, "signatures": [ { - "id": 369, + "id": 370, "name": "onChange", "kind": 4096, "kindString": "Call signature", @@ -7579,7 +7579,7 @@ }, "parameters": [ { - "id": 370, + "id": 371, "name": "variable", "kind": 32768, "kindString": "Parameter", @@ -7595,7 +7595,7 @@ } }, { - "id": 371, + "id": 372, "name": "handler", "kind": 32768, "kindString": "Parameter", @@ -7608,7 +7608,7 @@ "type": { "type": "reflection", "declaration": { - "id": 372, + "id": 373, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -7617,7 +7617,7 @@ }, "signatures": [ { - "id": 373, + "id": 374, "name": "__call", "kind": 4096, "kindString": "Call signature", @@ -7626,7 +7626,7 @@ }, "parameters": [ { - "id": 374, + "id": 375, "name": "response", "kind": 32768, "kindString": "Parameter", @@ -7639,7 +7639,7 @@ } }, { - "id": 375, + "id": 376, "name": "convo", "kind": 32768, "kindString": "Parameter", @@ -7652,7 +7652,7 @@ } }, { - "id": 376, + "id": 377, "name": "bot", "kind": 32768, "kindString": "Parameter", @@ -7680,7 +7680,7 @@ "sources": [ { "fileName": "conversation.ts", - "line": 501, + "line": 503, "character": 46 } ] @@ -7697,13 +7697,13 @@ "sources": [ { "fileName": "conversation.ts", - "line": 501, + "line": 503, "character": 19 } ] }, { - "id": 318, + "id": 319, "name": "say", "kind": 2048, "kindString": "Method", @@ -7714,7 +7714,7 @@ }, "signatures": [ { - "id": 319, + "id": 320, "name": "say", "kind": 4096, "kindString": "Call signature", @@ -7727,7 +7727,7 @@ }, "parameters": [ { - "id": 320, + "id": 321, "name": "message", "kind": 32768, "kindString": "Parameter", @@ -7745,7 +7745,7 @@ "typeArguments": [ { "type": "reference", - "id": 261, + "id": 262, "name": "BotkitMessageTemplate" } ], @@ -7761,7 +7761,7 @@ ], "type": { "type": "reference", - "id": 311, + "id": 312, "name": "BotkitConversation" } } @@ -7769,7 +7769,7 @@ "sources": [ { "fileName": "conversation.ts", - "line": 164, + "line": 167, "character": 14 } ] @@ -7780,30 +7780,30 @@ "title": "Constructors", "kind": 512, "children": [ - 314 + 315 ] }, { "title": "Properties", "kind": 1024, "children": [ - 313 + 314 ] }, { "title": "Methods", "kind": 2048, "children": [ - 321, - 325, - 330, - 334, - 345, - 361, - 338, - 353, - 368, - 318 + 322, + 326, + 331, + 335, + 346, + 362, + 339, + 354, + 369, + 319 ] } ], @@ -7822,7 +7822,7 @@ ], "props": [ { - "id": 313, + "id": 314, "name": "script", "kind": 1024, "kindString": "Property", @@ -7849,7 +7849,7 @@ ], "methods": [ { - "id": 321, + "id": 322, "name": "addAction", "kind": 2048, "kindString": "Method", @@ -7860,7 +7860,7 @@ }, "signatures": [ { - "id": 322, + "id": 323, "name": "addAction", "kind": 4096, "kindString": "Call signature", @@ -7873,7 +7873,7 @@ }, "parameters": [ { - "id": 323, + "id": 324, "name": "action", "kind": 32768, "kindString": "Parameter", @@ -7889,7 +7889,7 @@ } }, { - "id": 324, + "id": 325, "name": "thread_name", "kind": 32768, "kindString": "Parameter", @@ -7908,7 +7908,7 @@ ], "type": { "type": "reference", - "id": 311, + "id": 312, "name": "BotkitConversation" } } @@ -7916,13 +7916,13 @@ "sources": [ { "fileName": "conversation.ts", - "line": 194, + "line": 197, "character": 20 } ] }, { - "id": 325, + "id": 326, "name": "addChildDialog", "kind": 2048, "kindString": "Method", @@ -7933,7 +7933,7 @@ }, "signatures": [ { - "id": 326, + "id": 327, "name": "addChildDialog", "kind": 4096, "kindString": "Call signature", @@ -7946,7 +7946,7 @@ }, "parameters": [ { - "id": 327, + "id": 328, "name": "dialog_id", "kind": 32768, "kindString": "Parameter", @@ -7962,7 +7962,7 @@ } }, { - "id": 328, + "id": 329, "name": "key_name", "kind": 32768, "kindString": "Parameter", @@ -7979,7 +7979,7 @@ } }, { - "id": 329, + "id": 330, "name": "thread_name", "kind": 32768, "kindString": "Parameter", @@ -7998,7 +7998,7 @@ ], "type": { "type": "reference", - "id": 311, + "id": 312, "name": "BotkitConversation" } } @@ -8006,13 +8006,13 @@ "sources": [ { "fileName": "conversation.ts", - "line": 223, + "line": 226, "character": 25 } ] }, { - "id": 330, + "id": 331, "name": "addGotoDialog", "kind": 2048, "kindString": "Method", @@ -8023,7 +8023,7 @@ }, "signatures": [ { - "id": 331, + "id": 332, "name": "addGotoDialog", "kind": 4096, "kindString": "Call signature", @@ -8036,7 +8036,7 @@ }, "parameters": [ { - "id": 332, + "id": 333, "name": "dialog_id", "kind": 32768, "kindString": "Parameter", @@ -8052,7 +8052,7 @@ } }, { - "id": 333, + "id": 334, "name": "thread_name", "kind": 32768, "kindString": "Parameter", @@ -8071,7 +8071,7 @@ ], "type": { "type": "reference", - "id": 311, + "id": 312, "name": "BotkitConversation" } } @@ -8079,13 +8079,13 @@ "sources": [ { "fileName": "conversation.ts", - "line": 250, + "line": 253, "character": 24 } ] }, { - "id": 334, + "id": 335, "name": "addMessage", "kind": 2048, "kindString": "Method", @@ -8096,7 +8096,7 @@ }, "signatures": [ { - "id": 335, + "id": 336, "name": "addMessage", "kind": 4096, "kindString": "Call signature", @@ -8109,7 +8109,7 @@ }, "parameters": [ { - "id": 336, + "id": 337, "name": "message", "kind": 32768, "kindString": "Parameter", @@ -8127,7 +8127,7 @@ "typeArguments": [ { "type": "reference", - "id": 261, + "id": 262, "name": "BotkitMessageTemplate" } ], @@ -8141,7 +8141,7 @@ } }, { - "id": 337, + "id": 338, "name": "thread_name", "kind": 32768, "kindString": "Parameter", @@ -8159,7 +8159,7 @@ ], "type": { "type": "reference", - "id": 311, + "id": 312, "name": "BotkitConversation" } } @@ -8167,13 +8167,13 @@ "sources": [ { "fileName": "conversation.ts", - "line": 279, + "line": 282, "character": 21 } ] }, { - "id": 345, + "id": 346, "name": "addQuestion", "kind": 2048, "kindString": "Method", @@ -8184,7 +8184,7 @@ }, "signatures": [ { - "id": 346, + "id": 347, "name": "addQuestion", "kind": 4096, "kindString": "Call signature", @@ -8197,7 +8197,7 @@ }, "parameters": [ { - "id": 347, + "id": 348, "name": "message", "kind": 32768, "kindString": "Parameter", @@ -8215,7 +8215,7 @@ "typeArguments": [ { "type": "reference", - "id": 261, + "id": 262, "name": "BotkitMessageTemplate" } ], @@ -8229,7 +8229,7 @@ } }, { - "id": 348, + "id": 349, "name": "handlers", "kind": 32768, "kindString": "Parameter", @@ -8251,7 +8251,7 @@ "type": "array", "elementType": { "type": "reference", - "id": 256, + "id": 257, "name": "BotkitConvoTrigger" } } @@ -8259,7 +8259,7 @@ } }, { - "id": 349, + "id": 350, "name": "key", "kind": 32768, "kindString": "Parameter", @@ -8275,7 +8275,7 @@ { "type": "reflection", "declaration": { - "id": 350, + "id": 351, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -8284,7 +8284,7 @@ }, "children": [ { - "id": 351, + "id": 352, "name": "key", "kind": 32, "kindString": "Variable", @@ -8295,7 +8295,7 @@ "sources": [ { "fileName": "conversation.ts", - "line": 355, + "line": 358, "character": 135 } ], @@ -8310,14 +8310,14 @@ "title": "Variables", "kind": 32, "children": [ - 351 + 352 ] } ], "sources": [ { "fileName": "conversation.ts", - "line": 355, + "line": 358, "character": 130 } ] @@ -8335,7 +8335,7 @@ } }, { - "id": 352, + "id": 353, "name": "thread_name", "kind": 32768, "kindString": "Parameter", @@ -8353,7 +8353,7 @@ ], "type": { "type": "reference", - "id": 311, + "id": 312, "name": "BotkitConversation" } } @@ -8361,13 +8361,13 @@ "sources": [ { "fileName": "conversation.ts", - "line": 355, + "line": 358, "character": 22 } ] }, { - "id": 361, + "id": 362, "name": "after", "kind": 2048, "kindString": "Method", @@ -8378,7 +8378,7 @@ }, "signatures": [ { - "id": 362, + "id": 363, "name": "after", "kind": 4096, "kindString": "Call signature", @@ -8391,7 +8391,7 @@ }, "parameters": [ { - "id": 363, + "id": 364, "name": "handler", "kind": 32768, "kindString": "Parameter", @@ -8404,7 +8404,7 @@ "type": { "type": "reflection", "declaration": { - "id": 364, + "id": 365, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -8413,7 +8413,7 @@ }, "signatures": [ { - "id": 365, + "id": 366, "name": "__call", "kind": 4096, "kindString": "Call signature", @@ -8422,7 +8422,7 @@ }, "parameters": [ { - "id": 366, + "id": 367, "name": "results", "kind": 32768, "kindString": "Parameter", @@ -8435,7 +8435,7 @@ } }, { - "id": 367, + "id": 368, "name": "bot", "kind": 32768, "kindString": "Parameter", @@ -8458,7 +8458,7 @@ "sources": [ { "fileName": "conversation.ts", - "line": 465, + "line": 468, "character": 25 } ] @@ -8475,13 +8475,13 @@ "sources": [ { "fileName": "conversation.ts", - "line": 465, + "line": 468, "character": 16 } ] }, { - "id": 338, + "id": 339, "name": "ask", "kind": 2048, "kindString": "Method", @@ -8492,7 +8492,7 @@ }, "signatures": [ { - "id": 339, + "id": 340, "name": "ask", "kind": 4096, "kindString": "Call signature", @@ -8501,11 +8501,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 },s\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": 341, "name": "message", "kind": 32768, "kindString": "Parameter", @@ -8523,7 +8523,7 @@ "typeArguments": [ { "type": "reference", - "id": 261, + "id": 262, "name": "BotkitMessageTemplate" } ], @@ -8537,7 +8537,7 @@ } }, { - "id": 341, + "id": 342, "name": "handlers", "kind": 32768, "kindString": "Parameter", @@ -8559,7 +8559,7 @@ "type": "array", "elementType": { "type": "reference", - "id": 256, + "id": 257, "name": "BotkitConvoTrigger" } } @@ -8567,7 +8567,7 @@ } }, { - "id": 342, + "id": 343, "name": "key", "kind": 32768, "kindString": "Parameter", @@ -8583,7 +8583,7 @@ { "type": "reflection", "declaration": { - "id": 343, + "id": 344, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -8592,7 +8592,7 @@ }, "children": [ { - "id": 344, + "id": 345, "name": "key", "kind": 32, "kindString": "Variable", @@ -8603,7 +8603,7 @@ "sources": [ { "fileName": "conversation.ts", - "line": 341, + "line": 344, "character": 127 } ], @@ -8618,14 +8618,14 @@ "title": "Variables", "kind": 32, "children": [ - 344 + 345 ] } ], "sources": [ { "fileName": "conversation.ts", - "line": 341, + "line": 344, "character": 122 } ] @@ -8645,7 +8645,7 @@ ], "type": { "type": "reference", - "id": 311, + "id": 312, "name": "BotkitConversation" } } @@ -8653,13 +8653,13 @@ "sources": [ { "fileName": "conversation.ts", - "line": 341, + "line": 344, "character": 14 } ] }, { - "id": 353, + "id": 354, "name": "before", "kind": 2048, "kindString": "Method", @@ -8670,7 +8670,7 @@ }, "signatures": [ { - "id": 354, + "id": 355, "name": "before", "kind": 4096, "kindString": "Call signature", @@ -8683,7 +8683,7 @@ }, "parameters": [ { - "id": 355, + "id": 356, "name": "thread_name", "kind": 32768, "kindString": "Parameter", @@ -8699,7 +8699,7 @@ } }, { - "id": 356, + "id": 357, "name": "handler", "kind": 32768, "kindString": "Parameter", @@ -8712,7 +8712,7 @@ "type": { "type": "reflection", "declaration": { - "id": 357, + "id": 358, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -8721,7 +8721,7 @@ }, "signatures": [ { - "id": 358, + "id": 359, "name": "__call", "kind": 4096, "kindString": "Call signature", @@ -8730,7 +8730,7 @@ }, "parameters": [ { - "id": 359, + "id": 360, "name": "convo", "kind": 32768, "kindString": "Parameter", @@ -8744,7 +8744,7 @@ } }, { - "id": 360, + "id": 361, "name": "bot", "kind": 32768, "kindString": "Parameter", @@ -8773,7 +8773,7 @@ "sources": [ { "fileName": "conversation.ts", - "line": 413, + "line": 416, "character": 47 } ] @@ -8790,13 +8790,13 @@ "sources": [ { "fileName": "conversation.ts", - "line": 413, + "line": 416, "character": 17 } ] }, { - "id": 368, + "id": 369, "name": "onChange", "kind": 2048, "kindString": "Method", @@ -8807,7 +8807,7 @@ }, "signatures": [ { - "id": 369, + "id": 370, "name": "onChange", "kind": 4096, "kindString": "Call signature", @@ -8820,7 +8820,7 @@ }, "parameters": [ { - "id": 370, + "id": 371, "name": "variable", "kind": 32768, "kindString": "Parameter", @@ -8836,7 +8836,7 @@ } }, { - "id": 371, + "id": 372, "name": "handler", "kind": 32768, "kindString": "Parameter", @@ -8849,7 +8849,7 @@ "type": { "type": "reflection", "declaration": { - "id": 372, + "id": 373, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -8858,7 +8858,7 @@ }, "signatures": [ { - "id": 373, + "id": 374, "name": "__call", "kind": 4096, "kindString": "Call signature", @@ -8867,7 +8867,7 @@ }, "parameters": [ { - "id": 374, + "id": 375, "name": "response", "kind": 32768, "kindString": "Parameter", @@ -8880,7 +8880,7 @@ } }, { - "id": 375, + "id": 376, "name": "convo", "kind": 32768, "kindString": "Parameter", @@ -8893,7 +8893,7 @@ } }, { - "id": 376, + "id": 377, "name": "bot", "kind": 32768, "kindString": "Parameter", @@ -8921,7 +8921,7 @@ "sources": [ { "fileName": "conversation.ts", - "line": 501, + "line": 503, "character": 46 } ] @@ -8938,13 +8938,13 @@ "sources": [ { "fileName": "conversation.ts", - "line": 501, + "line": 503, "character": 19 } ] }, { - "id": 318, + "id": 319, "name": "say", "kind": 2048, "kindString": "Method", @@ -8955,7 +8955,7 @@ }, "signatures": [ { - "id": 319, + "id": 320, "name": "say", "kind": 4096, "kindString": "Call signature", @@ -8968,7 +8968,7 @@ }, "parameters": [ { - "id": 320, + "id": 321, "name": "message", "kind": 32768, "kindString": "Parameter", @@ -8986,7 +8986,7 @@ "typeArguments": [ { "type": "reference", - "id": 261, + "id": 262, "name": "BotkitMessageTemplate" } ], @@ -9002,7 +9002,7 @@ ], "type": { "type": "reference", - "id": 311, + "id": 312, "name": "BotkitConversation" } } @@ -9010,7 +9010,7 @@ "sources": [ { "fileName": "conversation.ts", - "line": 164, + "line": 167, "character": 14 } ] @@ -9018,7 +9018,7 @@ ], "constructors": [ { - "id": 314, + "id": 315, "name": "constructor", "kind": 512, "kindString": "Constructor", @@ -9032,7 +9032,7 @@ }, "signatures": [ { - "id": 315, + "id": 316, "name": "new BotkitConversation", "kind": 16384, "kindString": "Constructor signature", @@ -9044,7 +9044,7 @@ }, "parameters": [ { - "id": 316, + "id": 317, "name": "dialogId", "kind": 32768, "kindString": "Parameter", @@ -9060,7 +9060,7 @@ } }, { - "id": 317, + "id": 318, "name": "controller", "kind": 32768, "kindString": "Parameter", @@ -9079,7 +9079,7 @@ ], "type": { "type": "reference", - "id": 311, + "id": 312, "name": "BotkitConversation" } } @@ -9150,7 +9150,7 @@ }, "type": { "type": "reference", - "id": 298, + "id": 299, "name": "BotkitConversationStep" } } @@ -9820,7 +9820,7 @@ }, "type": { "type": "reference", - "id": 298, + "id": 299, "name": "BotkitConversationStep" } } @@ -9843,7 +9843,7 @@ ] }, { - "id": 394, + "id": 395, "name": "BotkitTestClient", "kind": 128, "kindString": "Class", @@ -9856,7 +9856,7 @@ }, "children": [ { - "id": 397, + "id": 398, "name": "constructor", "kind": 512, "kindString": "Constructor", @@ -9871,7 +9871,7 @@ }, "signatures": [ { - "id": 398, + "id": 399, "name": "new BotkitTestClient", "kind": 16384, "kindString": "Constructor signature", @@ -9884,7 +9884,7 @@ }, "parameters": [ { - "id": 399, + "id": 400, "name": "channelId", "kind": 32768, "kindString": "Parameter", @@ -9900,7 +9900,7 @@ } }, { - "id": 400, + "id": 401, "name": "bot", "kind": 32768, "kindString": "Parameter", @@ -9917,7 +9917,7 @@ } }, { - "id": 401, + "id": 402, "name": "dialogToTest", "kind": 32768, "kindString": "Parameter", @@ -9945,7 +9945,7 @@ } }, { - "id": 402, + "id": 403, "name": "initialDialogOptions", "kind": 32768, "kindString": "Parameter", @@ -9962,7 +9962,7 @@ } }, { - "id": 403, + "id": 404, "name": "middlewares", "kind": 32768, "kindString": "Parameter", @@ -9982,7 +9982,7 @@ } }, { - "id": 404, + "id": 405, "name": "conversationState", "kind": 32768, "kindString": "Parameter", @@ -10001,12 +10001,12 @@ ], "type": { "type": "reference", - "id": 394, + "id": 395, "name": "BotkitTestClient" } }, { - "id": 405, + "id": 406, "name": "new BotkitTestClient", "kind": 16384, "kindString": "Constructor signature", @@ -10019,7 +10019,7 @@ }, "parameters": [ { - "id": 406, + "id": 407, "name": "testAdapter", "kind": 32768, "kindString": "Parameter", @@ -10032,7 +10032,7 @@ } }, { - "id": 407, + "id": 408, "name": "bot", "kind": 32768, "kindString": "Parameter", @@ -10049,7 +10049,7 @@ } }, { - "id": 408, + "id": 409, "name": "dialogToTest", "kind": 32768, "kindString": "Parameter", @@ -10077,7 +10077,7 @@ } }, { - "id": 409, + "id": 410, "name": "initialDialogOptions", "kind": 32768, "kindString": "Parameter", @@ -10094,7 +10094,7 @@ } }, { - "id": 410, + "id": 411, "name": "middlewares", "kind": 32768, "kindString": "Parameter", @@ -10114,7 +10114,7 @@ } }, { - "id": 411, + "id": 412, "name": "conversationState", "kind": 32768, "kindString": "Parameter", @@ -10133,7 +10133,7 @@ ], "type": { "type": "reference", - "id": 394, + "id": 395, "name": "BotkitTestClient" } } @@ -10157,7 +10157,7 @@ ] }, { - "id": 396, + "id": 397, "name": "conversationState", "kind": 1024, "kindString": "Property", @@ -10179,7 +10179,7 @@ } }, { - "id": 395, + "id": 396, "name": "dialogTurnResult", "kind": 1024, "kindString": "Property", @@ -10201,7 +10201,7 @@ } }, { - "id": 415, + "id": 416, "name": "getNextReply", "kind": 2048, "kindString": "Method", @@ -10212,7 +10212,7 @@ }, "signatures": [ { - "id": 416, + "id": 417, "name": "getNextReply", "kind": 4096, "kindString": "Call signature", @@ -10243,7 +10243,7 @@ ] }, { - "id": 412, + "id": 413, "name": "sendActivity", "kind": 2048, "kindString": "Method", @@ -10254,7 +10254,7 @@ }, "signatures": [ { - "id": 413, + "id": 414, "name": "sendActivity", "kind": 4096, "kindString": "Call signature", @@ -10267,7 +10267,7 @@ }, "parameters": [ { - "id": 414, + "id": 415, "name": "activity", "kind": 32768, "kindString": "Parameter", @@ -10324,23 +10324,23 @@ "title": "Constructors", "kind": 512, "children": [ - 397 + 398 ] }, { "title": "Properties", "kind": 1024, "children": [ - 396, - 395 + 397, + 396 ] }, { "title": "Methods", "kind": 2048, "children": [ - 415, - 412 + 416, + 413 ] } ], @@ -10353,7 +10353,7 @@ ], "props": [ { - "id": 396, + "id": 397, "name": "conversationState", "kind": 1024, "kindString": "Property", @@ -10375,7 +10375,7 @@ } }, { - "id": 395, + "id": 396, "name": "dialogTurnResult", "kind": 1024, "kindString": "Property", @@ -10399,7 +10399,7 @@ ], "methods": [ { - "id": 415, + "id": 416, "name": "getNextReply", "kind": 2048, "kindString": "Method", @@ -10410,7 +10410,7 @@ }, "signatures": [ { - "id": 416, + "id": 417, "name": "getNextReply", "kind": 4096, "kindString": "Call signature", @@ -10441,7 +10441,7 @@ ] }, { - "id": 412, + "id": 413, "name": "sendActivity", "kind": 2048, "kindString": "Method", @@ -10452,7 +10452,7 @@ }, "signatures": [ { - "id": 413, + "id": 414, "name": "sendActivity", "kind": 4096, "kindString": "Call signature", @@ -10465,7 +10465,7 @@ }, "parameters": [ { - "id": 414, + "id": 415, "name": "activity", "kind": 32768, "kindString": "Parameter", @@ -10519,7 +10519,7 @@ ], "constructors": [ { - "id": 397, + "id": 398, "name": "constructor", "kind": 512, "kindString": "Constructor", @@ -10534,7 +10534,7 @@ }, "signatures": [ { - "id": 398, + "id": 399, "name": "new BotkitTestClient", "kind": 16384, "kindString": "Constructor signature", @@ -10547,7 +10547,7 @@ }, "parameters": [ { - "id": 399, + "id": 400, "name": "channelId", "kind": 32768, "kindString": "Parameter", @@ -10563,7 +10563,7 @@ } }, { - "id": 400, + "id": 401, "name": "bot", "kind": 32768, "kindString": "Parameter", @@ -10580,7 +10580,7 @@ } }, { - "id": 401, + "id": 402, "name": "dialogToTest", "kind": 32768, "kindString": "Parameter", @@ -10608,7 +10608,7 @@ } }, { - "id": 402, + "id": 403, "name": "initialDialogOptions", "kind": 32768, "kindString": "Parameter", @@ -10625,7 +10625,7 @@ } }, { - "id": 403, + "id": 404, "name": "middlewares", "kind": 32768, "kindString": "Parameter", @@ -10645,7 +10645,7 @@ } }, { - "id": 404, + "id": 405, "name": "conversationState", "kind": 32768, "kindString": "Parameter", @@ -10664,12 +10664,12 @@ ], "type": { "type": "reference", - "id": 394, + "id": 395, "name": "BotkitTestClient" } }, { - "id": 405, + "id": 406, "name": "new BotkitTestClient", "kind": 16384, "kindString": "Constructor signature", @@ -10682,7 +10682,7 @@ }, "parameters": [ { - "id": 406, + "id": 407, "name": "testAdapter", "kind": 32768, "kindString": "Parameter", @@ -10695,7 +10695,7 @@ } }, { - "id": 407, + "id": 408, "name": "bot", "kind": 32768, "kindString": "Parameter", @@ -10712,7 +10712,7 @@ } }, { - "id": 408, + "id": 409, "name": "dialogToTest", "kind": 32768, "kindString": "Parameter", @@ -10740,7 +10740,7 @@ } }, { - "id": 409, + "id": 410, "name": "initialDialogOptions", "kind": 32768, "kindString": "Parameter", @@ -10757,7 +10757,7 @@ } }, { - "id": 410, + "id": 411, "name": "middlewares", "kind": 32768, "kindString": "Parameter", @@ -10777,7 +10777,7 @@ } }, { - "id": 411, + "id": 412, "name": "conversationState", "kind": 32768, "kindString": "Parameter", @@ -10796,7 +10796,7 @@ ], "type": { "type": "reference", - "id": 394, + "id": 395, "name": "BotkitTestClient" } } @@ -11411,7 +11411,7 @@ ] }, { - "id": 298, + "id": 299, "name": "BotkitConversationStep", "kind": 256, "kindString": "Interface", @@ -11421,7 +11421,7 @@ }, "children": [ { - "id": 299, + "id": 300, "name": "index", "kind": 1024, "kindString": "Property", @@ -11445,7 +11445,7 @@ } }, { - "id": 307, + "id": 308, "name": "next", "kind": 1024, "kindString": "Property", @@ -11466,7 +11466,7 @@ "type": { "type": "reflection", "declaration": { - "id": 308, + "id": 309, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -11475,7 +11475,7 @@ }, "signatures": [ { - "id": 309, + "id": 310, "name": "__call", "kind": 4096, "kindString": "Call signature", @@ -11484,7 +11484,7 @@ }, "parameters": [ { - "id": 310, + "id": 311, "name": "stepResult", "kind": 32768, "kindString": "Parameter", @@ -11520,7 +11520,7 @@ } }, { - "id": 303, + "id": 304, "name": "options", "kind": 1024, "kindString": "Property", @@ -11544,7 +11544,7 @@ } }, { - "id": 304, + "id": 305, "name": "reason", "kind": 1024, "kindString": "Property", @@ -11568,7 +11568,7 @@ } }, { - "id": 305, + "id": 306, "name": "result", "kind": 1024, "kindString": "Property", @@ -11592,7 +11592,7 @@ } }, { - "id": 302, + "id": 303, "name": "state", "kind": 1024, "kindString": "Property", @@ -11616,7 +11616,7 @@ } }, { - "id": 300, + "id": 301, "name": "thread", "kind": 1024, "kindString": "Property", @@ -11640,7 +11640,7 @@ } }, { - "id": 301, + "id": 302, "name": "threadLength", "kind": 1024, "kindString": "Property", @@ -11664,7 +11664,7 @@ } }, { - "id": 306, + "id": 307, "name": "values", "kind": 1024, "kindString": "Property", @@ -11693,15 +11693,15 @@ "title": "Properties", "kind": 1024, "children": [ - 299, - 307, - 303, + 300, + 308, 304, 305, - 302, - 300, + 306, + 303, 301, - 306 + 302, + 307 ] } ], @@ -11714,7 +11714,7 @@ ], "props": [ { - "id": 299, + "id": 300, "name": "index", "kind": 1024, "kindString": "Property", @@ -11738,7 +11738,7 @@ } }, { - "id": 307, + "id": 308, "name": "next", "kind": 1024, "kindString": "Property", @@ -11759,7 +11759,7 @@ "type": { "type": "reflection", "declaration": { - "id": 308, + "id": 309, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -11768,7 +11768,7 @@ }, "signatures": [ { - "id": 309, + "id": 310, "name": "__call", "kind": 4096, "kindString": "Call signature", @@ -11777,7 +11777,7 @@ }, "parameters": [ { - "id": 310, + "id": 311, "name": "stepResult", "kind": 32768, "kindString": "Parameter", @@ -11813,7 +11813,7 @@ } }, { - "id": 303, + "id": 304, "name": "options", "kind": 1024, "kindString": "Property", @@ -11837,7 +11837,7 @@ } }, { - "id": 304, + "id": 305, "name": "reason", "kind": 1024, "kindString": "Property", @@ -11861,7 +11861,7 @@ } }, { - "id": 305, + "id": 306, "name": "result", "kind": 1024, "kindString": "Property", @@ -11885,7 +11885,7 @@ } }, { - "id": 302, + "id": 303, "name": "state", "kind": 1024, "kindString": "Property", @@ -11909,7 +11909,7 @@ } }, { - "id": 300, + "id": 301, "name": "thread", "kind": 1024, "kindString": "Property", @@ -11933,7 +11933,7 @@ } }, { - "id": 301, + "id": 302, "name": "threadLength", "kind": 1024, "kindString": "Property", @@ -11957,7 +11957,7 @@ } }, { - "id": 306, + "id": 307, "name": "values", "kind": 1024, "kindString": "Property", @@ -12038,6 +12038,18 @@ "id": 25, "name": "BotWorker" } + }, + { + "id": 256, + "name": "message", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "id": 86, + "name": "BotkitMessage" + } } ], "type": { @@ -12061,7 +12073,7 @@ ] }, { - "id": 256, + "id": 257, "name": "BotkitConvoTrigger", "kind": 256, "kindString": "Interface", @@ -12073,7 +12085,7 @@ }, "children": [ { - "id": 260, + "id": 261, "name": "default", "kind": 1024, "kindString": "Property", @@ -12094,7 +12106,7 @@ } }, { - "id": 259, + "id": 260, "name": "handler", "kind": 1024, "kindString": "Property", @@ -12115,7 +12127,7 @@ } }, { - "id": 258, + "id": 259, "name": "pattern", "kind": 1024, "kindString": "Property", @@ -12145,7 +12157,7 @@ } }, { - "id": 257, + "id": 258, "name": "type", "kind": 1024, "kindString": "Property", @@ -12171,10 +12183,10 @@ "title": "Properties", "kind": 1024, "children": [ + 261, 260, 259, - 258, - 257 + 258 ] } ], @@ -12187,7 +12199,7 @@ ], "props": [ { - "id": 260, + "id": 261, "name": "default", "kind": 1024, "kindString": "Property", @@ -12208,7 +12220,7 @@ } }, { - "id": 259, + "id": 260, "name": "handler", "kind": 1024, "kindString": "Property", @@ -12229,7 +12241,7 @@ } }, { - "id": 258, + "id": 259, "name": "pattern", "kind": 1024, "kindString": "Property", @@ -12259,7 +12271,7 @@ } }, { - "id": 257, + "id": 258, "name": "type", "kind": 1024, "kindString": "Property", @@ -12770,7 +12782,7 @@ ] }, { - "id": 261, + "id": 262, "name": "BotkitMessageTemplate", "kind": 256, "kindString": "Interface", @@ -12782,7 +12794,7 @@ }, "children": [ { - "id": 267, + "id": 268, "name": "action", "kind": 1024, "kindString": "Property", @@ -12803,7 +12815,7 @@ } }, { - "id": 287, + "id": 288, "name": "attachment", "kind": 1024, "kindString": "Property", @@ -12824,21 +12836,21 @@ { "type": "reflection", "declaration": { - "id": 288, + "id": 289, "name": "__type", "kind": 65536, "kindString": "Type literal", "flags": {}, "signatures": [ { - "id": 289, + "id": 290, "name": "__call", "kind": 4096, "kindString": "Call signature", "flags": {}, "parameters": [ { - "id": 290, + "id": 291, "name": "template", "kind": 32768, "kindString": "Parameter", @@ -12849,7 +12861,7 @@ } }, { - "id": 291, + "id": 292, "name": "vars", "kind": 32768, "kindString": "Parameter", @@ -12883,7 +12895,7 @@ } }, { - "id": 292, + "id": 293, "name": "attachmentLayout", "kind": 1024, "kindString": "Property", @@ -12904,7 +12916,7 @@ } }, { - "id": 277, + "id": 278, "name": "attachments", "kind": 1024, "kindString": "Property", @@ -12925,21 +12937,21 @@ { "type": "reflection", "declaration": { - "id": 278, + "id": 279, "name": "__type", "kind": 65536, "kindString": "Type literal", "flags": {}, "signatures": [ { - "id": 279, + "id": 280, "name": "__call", "kind": 4096, "kindString": "Call signature", "flags": {}, "parameters": [ { - "id": 280, + "id": 281, "name": "template", "kind": 32768, "kindString": "Parameter", @@ -12950,7 +12962,7 @@ } }, { - "id": 281, + "id": 282, "name": "vars", "kind": 32768, "kindString": "Parameter", @@ -12990,7 +13002,7 @@ } }, { - "id": 282, + "id": 283, "name": "blocks", "kind": 1024, "kindString": "Property", @@ -13011,21 +13023,21 @@ { "type": "reflection", "declaration": { - "id": 283, + "id": 284, "name": "__type", "kind": 65536, "kindString": "Type literal", "flags": {}, "signatures": [ { - "id": 284, + "id": 285, "name": "__call", "kind": 4096, "kindString": "Call signature", "flags": {}, "parameters": [ { - "id": 285, + "id": 286, "name": "template", "kind": 32768, "kindString": "Parameter", @@ -13036,7 +13048,7 @@ } }, { - "id": 286, + "id": 287, "name": "vars", "kind": 32768, "kindString": "Parameter", @@ -13076,7 +13088,7 @@ } }, { - "id": 293, + "id": 294, "name": "channelData", "kind": 1024, "kindString": "Property", @@ -13097,7 +13109,7 @@ } }, { - "id": 294, + "id": 295, "name": "collect", "kind": 1024, "kindString": "Property", @@ -13114,14 +13126,14 @@ "type": { "type": "reflection", "declaration": { - "id": 295, + "id": 296, "name": "__type", "kind": 65536, "kindString": "Type literal", "flags": {}, "children": [ { - "id": 296, + "id": 297, "name": "key", "kind": 32, "kindString": "Variable", @@ -13142,7 +13154,7 @@ } }, { - "id": 297, + "id": 298, "name": "options", "kind": 32, "kindString": "Variable", @@ -13161,7 +13173,7 @@ "type": "array", "elementType": { "type": "reference", - "id": 256, + "id": 257, "name": "BotkitConvoTrigger" } } @@ -13172,8 +13184,8 @@ "title": "Variables", "kind": 32, "children": [ - 296, - 297 + 297, + 298 ] } ], @@ -13188,7 +13200,7 @@ } }, { - "id": 268, + "id": 269, "name": "execute", "kind": 1024, "kindString": "Property", @@ -13206,14 +13218,14 @@ "type": { "type": "reflection", "declaration": { - "id": 269, + "id": 270, "name": "__type", "kind": 65536, "kindString": "Type literal", "flags": {}, "children": [ { - "id": 270, + "id": 271, "name": "script", "kind": 32, "kindString": "Variable", @@ -13233,7 +13245,7 @@ } }, { - "id": 271, + "id": 272, "name": "thread", "kind": 32, "kindString": "Variable", @@ -13259,8 +13271,8 @@ "title": "Variables", "kind": 32, "children": [ - 270, - 271 + 271, + 272 ] } ], @@ -13275,7 +13287,7 @@ } }, { - "id": 272, + "id": 273, "name": "quick_replies", "kind": 1024, "kindString": "Property", @@ -13296,21 +13308,21 @@ { "type": "reflection", "declaration": { - "id": 273, + "id": 274, "name": "__type", "kind": 65536, "kindString": "Type literal", "flags": {}, "signatures": [ { - "id": 274, + "id": 275, "name": "__call", "kind": 4096, "kindString": "Call signature", "flags": {}, "parameters": [ { - "id": 275, + "id": 276, "name": "template", "kind": 32768, "kindString": "Parameter", @@ -13321,7 +13333,7 @@ } }, { - "id": 276, + "id": 277, "name": "vars", "kind": 32768, "kindString": "Parameter", @@ -13361,7 +13373,7 @@ } }, { - "id": 262, + "id": 263, "name": "text", "kind": 1024, "kindString": "Property", @@ -13381,21 +13393,21 @@ { "type": "reflection", "declaration": { - "id": 263, + "id": 264, "name": "__type", "kind": 65536, "kindString": "Type literal", "flags": {}, "signatures": [ { - "id": 264, + "id": 265, "name": "__call", "kind": 4096, "kindString": "Call signature", "flags": {}, "parameters": [ { - "id": 265, + "id": 266, "name": "template", "kind": 32768, "kindString": "Parameter", @@ -13406,7 +13418,7 @@ } }, { - "id": 266, + "id": 267, "name": "vars", "kind": 32768, "kindString": "Parameter", @@ -13451,16 +13463,16 @@ "title": "Properties", "kind": 1024, "children": [ - 267, - 287, - 292, - 277, - 282, + 268, + 288, 293, + 278, + 283, 294, - 268, - 272, - 262 + 295, + 269, + 273, + 263 ] } ], @@ -13473,7 +13485,7 @@ ], "props": [ { - "id": 267, + "id": 268, "name": "action", "kind": 1024, "kindString": "Property", @@ -13494,7 +13506,7 @@ } }, { - "id": 287, + "id": 288, "name": "attachment", "kind": 1024, "kindString": "Property", @@ -13515,21 +13527,21 @@ { "type": "reflection", "declaration": { - "id": 288, + "id": 289, "name": "__type", "kind": 65536, "kindString": "Type literal", "flags": {}, "signatures": [ { - "id": 289, + "id": 290, "name": "__call", "kind": 4096, "kindString": "Call signature", "flags": {}, "parameters": [ { - "id": 290, + "id": 291, "name": "template", "kind": 32768, "kindString": "Parameter", @@ -13540,7 +13552,7 @@ } }, { - "id": 291, + "id": 292, "name": "vars", "kind": 32768, "kindString": "Parameter", @@ -13574,7 +13586,7 @@ } }, { - "id": 292, + "id": 293, "name": "attachmentLayout", "kind": 1024, "kindString": "Property", @@ -13595,7 +13607,7 @@ } }, { - "id": 277, + "id": 278, "name": "attachments", "kind": 1024, "kindString": "Property", @@ -13616,21 +13628,21 @@ { "type": "reflection", "declaration": { - "id": 278, + "id": 279, "name": "__type", "kind": 65536, "kindString": "Type literal", "flags": {}, "signatures": [ { - "id": 279, + "id": 280, "name": "__call", "kind": 4096, "kindString": "Call signature", "flags": {}, "parameters": [ { - "id": 280, + "id": 281, "name": "template", "kind": 32768, "kindString": "Parameter", @@ -13641,7 +13653,7 @@ } }, { - "id": 281, + "id": 282, "name": "vars", "kind": 32768, "kindString": "Parameter", @@ -13681,7 +13693,7 @@ } }, { - "id": 282, + "id": 283, "name": "blocks", "kind": 1024, "kindString": "Property", @@ -13702,21 +13714,21 @@ { "type": "reflection", "declaration": { - "id": 283, + "id": 284, "name": "__type", "kind": 65536, "kindString": "Type literal", "flags": {}, "signatures": [ { - "id": 284, + "id": 285, "name": "__call", "kind": 4096, "kindString": "Call signature", "flags": {}, "parameters": [ { - "id": 285, + "id": 286, "name": "template", "kind": 32768, "kindString": "Parameter", @@ -13727,7 +13739,7 @@ } }, { - "id": 286, + "id": 287, "name": "vars", "kind": 32768, "kindString": "Parameter", @@ -13767,7 +13779,7 @@ } }, { - "id": 293, + "id": 294, "name": "channelData", "kind": 1024, "kindString": "Property", @@ -13788,7 +13800,7 @@ } }, { - "id": 294, + "id": 295, "name": "collect", "kind": 1024, "kindString": "Property", @@ -13805,14 +13817,14 @@ "type": { "type": "reflection", "declaration": { - "id": 295, + "id": 296, "name": "__type", "kind": 65536, "kindString": "Type literal", "flags": {}, "children": [ { - "id": 296, + "id": 297, "name": "key", "kind": 32, "kindString": "Variable", @@ -13833,7 +13845,7 @@ } }, { - "id": 297, + "id": 298, "name": "options", "kind": 32, "kindString": "Variable", @@ -13852,7 +13864,7 @@ "type": "array", "elementType": { "type": "reference", - "id": 256, + "id": 257, "name": "BotkitConvoTrigger" } } @@ -13863,8 +13875,8 @@ "title": "Variables", "kind": 32, "children": [ - 296, - 297 + 297, + 298 ] } ], @@ -13879,7 +13891,7 @@ } }, { - "id": 268, + "id": 269, "name": "execute", "kind": 1024, "kindString": "Property", @@ -13897,14 +13909,14 @@ "type": { "type": "reflection", "declaration": { - "id": 269, + "id": 270, "name": "__type", "kind": 65536, "kindString": "Type literal", "flags": {}, "children": [ { - "id": 270, + "id": 271, "name": "script", "kind": 32, "kindString": "Variable", @@ -13924,7 +13936,7 @@ } }, { - "id": 271, + "id": 272, "name": "thread", "kind": 32, "kindString": "Variable", @@ -13950,8 +13962,8 @@ "title": "Variables", "kind": 32, "children": [ - 270, - 271 + 271, + 272 ] } ], @@ -13966,7 +13978,7 @@ } }, { - "id": 272, + "id": 273, "name": "quick_replies", "kind": 1024, "kindString": "Property", @@ -13987,21 +13999,21 @@ { "type": "reflection", "declaration": { - "id": 273, + "id": 274, "name": "__type", "kind": 65536, "kindString": "Type literal", "flags": {}, "signatures": [ { - "id": 274, + "id": 275, "name": "__call", "kind": 4096, "kindString": "Call signature", "flags": {}, "parameters": [ { - "id": 275, + "id": 276, "name": "template", "kind": 32768, "kindString": "Parameter", @@ -14012,7 +14024,7 @@ } }, { - "id": 276, + "id": 277, "name": "vars", "kind": 32768, "kindString": "Parameter", @@ -14052,7 +14064,7 @@ } }, { - "id": 262, + "id": 263, "name": "text", "kind": 1024, "kindString": "Property", @@ -14072,21 +14084,21 @@ { "type": "reflection", "declaration": { - "id": 263, + "id": 264, "name": "__type", "kind": 65536, "kindString": "Type literal", "flags": {}, "signatures": [ { - "id": 264, + "id": 265, "name": "__call", "kind": 4096, "kindString": "Call signature", "flags": {}, "parameters": [ { - "id": 265, + "id": 266, "name": "template", "kind": 32768, "kindString": "Parameter", @@ -14097,7 +14109,7 @@ } }, { - "id": 266, + "id": 267, "name": "vars", "kind": 32768, "kindString": "Parameter", diff --git a/packages/docs/reference/core.md b/packages/docs/reference/core.md index e51347b3f..c7a27aa78 100644 --- a/packages/docs/reference/core.md +++ b/packages/docs/reference/core.md @@ -1099,7 +1099,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 +1108,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(); From 6631a6186ea493dd8aaa150ba017c70965ba08cc Mon Sep 17 00:00:00 2001 From: Ben Brown Date: Wed, 11 Mar 2020 10:54:13 -0500 Subject: [PATCH 10/32] Fixes #1920 - Use contextual adapter when spawning bots, --- changelog.md | 2 +- .../botbuilder-adapter-slack/src/botworker.ts | 6 +- packages/botkit/src/botworker.ts | 6 +- packages/botkit/src/core.ts | 10 +- packages/docs/index.json | 966 +++++++++--------- packages/docs/reference/core.md | 3 +- .../testbot/features/botframework_features.js | 161 +-- packages/testbot/multiadapter.js | 3 +- 8 files changed, 596 insertions(+), 561 deletions(-) diff --git a/changelog.md b/changelog.md index ac3f0310d..57db8c8a2 100644 --- a/changelog.md +++ b/changelog.md @@ -9,7 +9,7 @@ * 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) - +* 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) # 4.6.1 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/botkit/src/botworker.ts b/packages/botkit/src/botworker.ts index 4f0eb4f36..382fe385e 100644 --- a/packages/botkit/src/botworker.ts +++ b/packages/botkit/src/botworker.ts @@ -231,7 +231,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 +250,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) { @@ -282,7 +282,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/core.ts b/packages/botkit/src/core.ts index d0e740c18..02266bcba 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'; @@ -1057,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), @@ -1076,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); diff --git a/packages/docs/index.json b/packages/docs/index.json index c6b3bbd56..2233a8e18 100644 --- a/packages/docs/index.json +++ b/packages/docs/index.json @@ -395,7 +395,7 @@ ] }, { - "id": 221, + "id": 222, "name": "addDialog", "kind": 2048, "kindString": "Method", @@ -406,7 +406,7 @@ }, "signatures": [ { - "id": 222, + "id": 223, "name": "addDialog", "kind": 4096, "kindString": "Call signature", @@ -419,7 +419,7 @@ }, "parameters": [ { - "id": 223, + "id": 224, "name": "dialog", "kind": 32768, "kindString": "Parameter", @@ -444,7 +444,7 @@ "sources": [ { "fileName": "core.ts", - "line": 1159, + "line": 1161, "character": 20 } ] @@ -521,7 +521,7 @@ ] }, { - "id": 224, + "id": 225, "name": "afterDialog", "kind": 2048, "kindString": "Method", @@ -532,7 +532,7 @@ }, "signatures": [ { - "id": 225, + "id": 226, "name": "afterDialog", "kind": 4096, "kindString": "Call signature", @@ -545,7 +545,7 @@ }, "parameters": [ { - "id": 226, + "id": 227, "name": "dialog", "kind": 32768, "kindString": "Parameter", @@ -570,7 +570,7 @@ } }, { - "id": 227, + "id": 228, "name": "handler", "kind": 32768, "kindString": "Parameter", @@ -596,7 +596,7 @@ "sources": [ { "fileName": "core.ts", - "line": 1187, + "line": 1189, "character": 22 } ] @@ -1294,7 +1294,7 @@ ] }, { - "id": 214, + "id": 215, "name": "loadModule", "kind": 2048, "kindString": "Method", @@ -1305,7 +1305,7 @@ }, "signatures": [ { - "id": 215, + "id": 216, "name": "loadModule", "kind": 4096, "kindString": "Call signature", @@ -1317,7 +1317,7 @@ }, "parameters": [ { - "id": 216, + "id": 217, "name": "p", "kind": 32768, "kindString": "Parameter", @@ -1342,13 +1342,13 @@ "sources": [ { "fileName": "core.ts", - "line": 1102, + "line": 1104, "character": 21 } ] }, { - "id": 217, + "id": 218, "name": "loadModules", "kind": 2048, "kindString": "Method", @@ -1359,7 +1359,7 @@ }, "signatures": [ { - "id": 218, + "id": 219, "name": "loadModules", "kind": 4096, "kindString": "Call signature", @@ -1372,7 +1372,7 @@ }, "parameters": [ { - "id": 219, + "id": 220, "name": "p", "kind": 32768, "kindString": "Parameter", @@ -1388,7 +1388,7 @@ } }, { - "id": 220, + "id": 221, "name": "exts", "kind": 32768, "kindString": "Parameter", @@ -1417,7 +1417,7 @@ "sources": [ { "fileName": "core.ts", - "line": 1131, + "line": 1133, "character": 22 } ] @@ -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": 214, + "name": "custom_adapter", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "isExported": true, + "isOptional": true + }, + "type": { + "type": "reference", + "name": "BotAdapter" + } } ], "type": { @@ -1823,7 +1837,7 @@ "sources": [ { "fileName": "core.ts", - "line": 1061, + "line": 1062, "character": 22 } ] @@ -2221,17 +2235,17 @@ "kind": 2048, "children": [ 163, - 221, + 222, 147, - 224, + 225, 166, 138, 160, 174, 180, 191, - 214, - 217, + 215, + 218, 202, 156, 169, @@ -2576,7 +2590,7 @@ ] }, { - "id": 221, + "id": 222, "name": "addDialog", "kind": 2048, "kindString": "Method", @@ -2587,7 +2601,7 @@ }, "signatures": [ { - "id": 222, + "id": 223, "name": "addDialog", "kind": 4096, "kindString": "Call signature", @@ -2600,7 +2614,7 @@ }, "parameters": [ { - "id": 223, + "id": 224, "name": "dialog", "kind": 32768, "kindString": "Parameter", @@ -2625,7 +2639,7 @@ "sources": [ { "fileName": "core.ts", - "line": 1159, + "line": 1161, "character": 20 } ] @@ -2702,7 +2716,7 @@ ] }, { - "id": 224, + "id": 225, "name": "afterDialog", "kind": 2048, "kindString": "Method", @@ -2713,7 +2727,7 @@ }, "signatures": [ { - "id": 225, + "id": 226, "name": "afterDialog", "kind": 4096, "kindString": "Call signature", @@ -2726,7 +2740,7 @@ }, "parameters": [ { - "id": 226, + "id": 227, "name": "dialog", "kind": 32768, "kindString": "Parameter", @@ -2751,7 +2765,7 @@ } }, { - "id": 227, + "id": 228, "name": "handler", "kind": 32768, "kindString": "Parameter", @@ -2777,7 +2791,7 @@ "sources": [ { "fileName": "core.ts", - "line": 1187, + "line": 1189, "character": 22 } ] @@ -3475,7 +3489,7 @@ ] }, { - "id": 214, + "id": 215, "name": "loadModule", "kind": 2048, "kindString": "Method", @@ -3486,7 +3500,7 @@ }, "signatures": [ { - "id": 215, + "id": 216, "name": "loadModule", "kind": 4096, "kindString": "Call signature", @@ -3498,7 +3512,7 @@ }, "parameters": [ { - "id": 216, + "id": 217, "name": "p", "kind": 32768, "kindString": "Parameter", @@ -3523,13 +3537,13 @@ "sources": [ { "fileName": "core.ts", - "line": 1102, + "line": 1104, "character": 21 } ] }, { - "id": 217, + "id": 218, "name": "loadModules", "kind": 2048, "kindString": "Method", @@ -3540,7 +3554,7 @@ }, "signatures": [ { - "id": 218, + "id": 219, "name": "loadModules", "kind": 4096, "kindString": "Call signature", @@ -3553,7 +3567,7 @@ }, "parameters": [ { - "id": 219, + "id": 220, "name": "p", "kind": 32768, "kindString": "Parameter", @@ -3569,7 +3583,7 @@ } }, { - "id": 220, + "id": 221, "name": "exts", "kind": 32768, "kindString": "Parameter", @@ -3598,7 +3612,7 @@ "sources": [ { "fileName": "core.ts", - "line": 1131, + "line": 1133, "character": 22 } ] @@ -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": 214, + "name": "custom_adapter", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "isExported": true, + "isOptional": true + }, + "type": { + "type": "reference", + "name": "BotAdapter" + } } ], "type": { @@ -4004,7 +4032,7 @@ "sources": [ { "fileName": "core.ts", - "line": 1061, + "line": 1062, "character": 22 } ] @@ -6479,7 +6507,7 @@ ] }, { - "id": 312, + "id": 313, "name": "BotkitConversation", "kind": 128, "kindString": "Class", @@ -6493,7 +6521,7 @@ }, "typeParameter": [ { - "id": 313, + "id": 314, "name": "O", "kind": 131072, "kindString": "Type parameter", @@ -6508,7 +6536,7 @@ ], "children": [ { - "id": 315, + "id": 316, "name": "constructor", "kind": 512, "kindString": "Constructor", @@ -6522,7 +6550,7 @@ }, "signatures": [ { - "id": 316, + "id": 317, "name": "new BotkitConversation", "kind": 16384, "kindString": "Constructor signature", @@ -6534,7 +6562,7 @@ }, "parameters": [ { - "id": 317, + "id": 318, "name": "dialogId", "kind": 32768, "kindString": "Parameter", @@ -6550,7 +6578,7 @@ } }, { - "id": 318, + "id": 319, "name": "controller", "kind": 32768, "kindString": "Parameter", @@ -6569,7 +6597,7 @@ ], "type": { "type": "reference", - "id": 312, + "id": 313, "name": "BotkitConversation" } } @@ -6583,7 +6611,7 @@ ] }, { - "id": 314, + "id": 315, "name": "script", "kind": 1024, "kindString": "Property", @@ -6608,7 +6636,7 @@ } }, { - "id": 322, + "id": 323, "name": "addAction", "kind": 2048, "kindString": "Method", @@ -6619,7 +6647,7 @@ }, "signatures": [ { - "id": 323, + "id": 324, "name": "addAction", "kind": 4096, "kindString": "Call signature", @@ -6632,7 +6660,7 @@ }, "parameters": [ { - "id": 324, + "id": 325, "name": "action", "kind": 32768, "kindString": "Parameter", @@ -6648,7 +6676,7 @@ } }, { - "id": 325, + "id": 326, "name": "thread_name", "kind": 32768, "kindString": "Parameter", @@ -6667,7 +6695,7 @@ ], "type": { "type": "reference", - "id": 312, + "id": 313, "name": "BotkitConversation" } } @@ -6681,7 +6709,7 @@ ] }, { - "id": 326, + "id": 327, "name": "addChildDialog", "kind": 2048, "kindString": "Method", @@ -6692,7 +6720,7 @@ }, "signatures": [ { - "id": 327, + "id": 328, "name": "addChildDialog", "kind": 4096, "kindString": "Call signature", @@ -6705,7 +6733,7 @@ }, "parameters": [ { - "id": 328, + "id": 329, "name": "dialog_id", "kind": 32768, "kindString": "Parameter", @@ -6721,7 +6749,7 @@ } }, { - "id": 329, + "id": 330, "name": "key_name", "kind": 32768, "kindString": "Parameter", @@ -6738,7 +6766,7 @@ } }, { - "id": 330, + "id": 331, "name": "thread_name", "kind": 32768, "kindString": "Parameter", @@ -6757,7 +6785,7 @@ ], "type": { "type": "reference", - "id": 312, + "id": 313, "name": "BotkitConversation" } } @@ -6771,7 +6799,7 @@ ] }, { - "id": 331, + "id": 332, "name": "addGotoDialog", "kind": 2048, "kindString": "Method", @@ -6782,7 +6810,7 @@ }, "signatures": [ { - "id": 332, + "id": 333, "name": "addGotoDialog", "kind": 4096, "kindString": "Call signature", @@ -6795,7 +6823,7 @@ }, "parameters": [ { - "id": 333, + "id": 334, "name": "dialog_id", "kind": 32768, "kindString": "Parameter", @@ -6811,7 +6839,7 @@ } }, { - "id": 334, + "id": 335, "name": "thread_name", "kind": 32768, "kindString": "Parameter", @@ -6830,7 +6858,7 @@ ], "type": { "type": "reference", - "id": 312, + "id": 313, "name": "BotkitConversation" } } @@ -6844,7 +6872,7 @@ ] }, { - "id": 335, + "id": 336, "name": "addMessage", "kind": 2048, "kindString": "Method", @@ -6855,7 +6883,7 @@ }, "signatures": [ { - "id": 336, + "id": 337, "name": "addMessage", "kind": 4096, "kindString": "Call signature", @@ -6868,7 +6896,7 @@ }, "parameters": [ { - "id": 337, + "id": 338, "name": "message", "kind": 32768, "kindString": "Parameter", @@ -6886,7 +6914,7 @@ "typeArguments": [ { "type": "reference", - "id": 262, + "id": 263, "name": "BotkitMessageTemplate" } ], @@ -6900,7 +6928,7 @@ } }, { - "id": 338, + "id": 339, "name": "thread_name", "kind": 32768, "kindString": "Parameter", @@ -6918,7 +6946,7 @@ ], "type": { "type": "reference", - "id": 312, + "id": 313, "name": "BotkitConversation" } } @@ -6932,7 +6960,7 @@ ] }, { - "id": 346, + "id": 347, "name": "addQuestion", "kind": 2048, "kindString": "Method", @@ -6943,7 +6971,7 @@ }, "signatures": [ { - "id": 347, + "id": 348, "name": "addQuestion", "kind": 4096, "kindString": "Call signature", @@ -6956,7 +6984,7 @@ }, "parameters": [ { - "id": 348, + "id": 349, "name": "message", "kind": 32768, "kindString": "Parameter", @@ -6974,7 +7002,7 @@ "typeArguments": [ { "type": "reference", - "id": 262, + "id": 263, "name": "BotkitMessageTemplate" } ], @@ -6988,7 +7016,7 @@ } }, { - "id": 349, + "id": 350, "name": "handlers", "kind": 32768, "kindString": "Parameter", @@ -7003,14 +7031,14 @@ "types": [ { "type": "reference", - "id": 251, + "id": 252, "name": "BotkitConvoHandler" }, { "type": "array", "elementType": { "type": "reference", - "id": 257, + "id": 258, "name": "BotkitConvoTrigger" } } @@ -7018,7 +7046,7 @@ } }, { - "id": 350, + "id": 351, "name": "key", "kind": 32768, "kindString": "Parameter", @@ -7034,7 +7062,7 @@ { "type": "reflection", "declaration": { - "id": 351, + "id": 352, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -7043,7 +7071,7 @@ }, "children": [ { - "id": 352, + "id": 353, "name": "key", "kind": 32, "kindString": "Variable", @@ -7069,7 +7097,7 @@ "title": "Variables", "kind": 32, "children": [ - 352 + 353 ] } ], @@ -7094,7 +7122,7 @@ } }, { - "id": 353, + "id": 354, "name": "thread_name", "kind": 32768, "kindString": "Parameter", @@ -7112,7 +7140,7 @@ ], "type": { "type": "reference", - "id": 312, + "id": 313, "name": "BotkitConversation" } } @@ -7126,7 +7154,7 @@ ] }, { - "id": 362, + "id": 363, "name": "after", "kind": 2048, "kindString": "Method", @@ -7137,7 +7165,7 @@ }, "signatures": [ { - "id": 363, + "id": 364, "name": "after", "kind": 4096, "kindString": "Call signature", @@ -7150,7 +7178,7 @@ }, "parameters": [ { - "id": 364, + "id": 365, "name": "handler", "kind": 32768, "kindString": "Parameter", @@ -7163,7 +7191,7 @@ "type": { "type": "reflection", "declaration": { - "id": 365, + "id": 366, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -7172,7 +7200,7 @@ }, "signatures": [ { - "id": 366, + "id": 367, "name": "__call", "kind": 4096, "kindString": "Call signature", @@ -7181,7 +7209,7 @@ }, "parameters": [ { - "id": 367, + "id": 368, "name": "results", "kind": 32768, "kindString": "Parameter", @@ -7194,7 +7222,7 @@ } }, { - "id": 368, + "id": 369, "name": "bot", "kind": 32768, "kindString": "Parameter", @@ -7240,7 +7268,7 @@ ] }, { - "id": 339, + "id": 340, "name": "ask", "kind": 2048, "kindString": "Method", @@ -7251,7 +7279,7 @@ }, "signatures": [ { - "id": 340, + "id": 341, "name": "ask", "kind": 4096, "kindString": "Call signature", @@ -7264,7 +7292,7 @@ }, "parameters": [ { - "id": 341, + "id": 342, "name": "message", "kind": 32768, "kindString": "Parameter", @@ -7282,7 +7310,7 @@ "typeArguments": [ { "type": "reference", - "id": 262, + "id": 263, "name": "BotkitMessageTemplate" } ], @@ -7296,7 +7324,7 @@ } }, { - "id": 342, + "id": 343, "name": "handlers", "kind": 32768, "kindString": "Parameter", @@ -7311,14 +7339,14 @@ "types": [ { "type": "reference", - "id": 251, + "id": 252, "name": "BotkitConvoHandler" }, { "type": "array", "elementType": { "type": "reference", - "id": 257, + "id": 258, "name": "BotkitConvoTrigger" } } @@ -7326,7 +7354,7 @@ } }, { - "id": 343, + "id": 344, "name": "key", "kind": 32768, "kindString": "Parameter", @@ -7342,7 +7370,7 @@ { "type": "reflection", "declaration": { - "id": 344, + "id": 345, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -7351,7 +7379,7 @@ }, "children": [ { - "id": 345, + "id": 346, "name": "key", "kind": 32, "kindString": "Variable", @@ -7377,7 +7405,7 @@ "title": "Variables", "kind": 32, "children": [ - 345 + 346 ] } ], @@ -7404,7 +7432,7 @@ ], "type": { "type": "reference", - "id": 312, + "id": 313, "name": "BotkitConversation" } } @@ -7418,7 +7446,7 @@ ] }, { - "id": 354, + "id": 355, "name": "before", "kind": 2048, "kindString": "Method", @@ -7429,7 +7457,7 @@ }, "signatures": [ { - "id": 355, + "id": 356, "name": "before", "kind": 4096, "kindString": "Call signature", @@ -7442,7 +7470,7 @@ }, "parameters": [ { - "id": 356, + "id": 357, "name": "thread_name", "kind": 32768, "kindString": "Parameter", @@ -7458,7 +7486,7 @@ } }, { - "id": 357, + "id": 358, "name": "handler", "kind": 32768, "kindString": "Parameter", @@ -7471,7 +7499,7 @@ "type": { "type": "reflection", "declaration": { - "id": 358, + "id": 359, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -7480,7 +7508,7 @@ }, "signatures": [ { - "id": 359, + "id": 360, "name": "__call", "kind": 4096, "kindString": "Call signature", @@ -7489,7 +7517,7 @@ }, "parameters": [ { - "id": 360, + "id": 361, "name": "convo", "kind": 32768, "kindString": "Parameter", @@ -7498,12 +7526,12 @@ }, "type": { "type": "reference", - "id": 230, + "id": 231, "name": "BotkitDialogWrapper" } }, { - "id": 361, + "id": 362, "name": "bot", "kind": 32768, "kindString": "Parameter", @@ -7555,7 +7583,7 @@ ] }, { - "id": 369, + "id": 370, "name": "onChange", "kind": 2048, "kindString": "Method", @@ -7566,7 +7594,7 @@ }, "signatures": [ { - "id": 370, + "id": 371, "name": "onChange", "kind": 4096, "kindString": "Call signature", @@ -7579,7 +7607,7 @@ }, "parameters": [ { - "id": 371, + "id": 372, "name": "variable", "kind": 32768, "kindString": "Parameter", @@ -7595,7 +7623,7 @@ } }, { - "id": 372, + "id": 373, "name": "handler", "kind": 32768, "kindString": "Parameter", @@ -7608,7 +7636,7 @@ "type": { "type": "reflection", "declaration": { - "id": 373, + "id": 374, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -7617,7 +7645,7 @@ }, "signatures": [ { - "id": 374, + "id": 375, "name": "__call", "kind": 4096, "kindString": "Call signature", @@ -7626,7 +7654,7 @@ }, "parameters": [ { - "id": 375, + "id": 376, "name": "response", "kind": 32768, "kindString": "Parameter", @@ -7639,7 +7667,7 @@ } }, { - "id": 376, + "id": 377, "name": "convo", "kind": 32768, "kindString": "Parameter", @@ -7652,7 +7680,7 @@ } }, { - "id": 377, + "id": 378, "name": "bot", "kind": 32768, "kindString": "Parameter", @@ -7703,7 +7731,7 @@ ] }, { - "id": 319, + "id": 320, "name": "say", "kind": 2048, "kindString": "Method", @@ -7714,7 +7742,7 @@ }, "signatures": [ { - "id": 320, + "id": 321, "name": "say", "kind": 4096, "kindString": "Call signature", @@ -7727,7 +7755,7 @@ }, "parameters": [ { - "id": 321, + "id": 322, "name": "message", "kind": 32768, "kindString": "Parameter", @@ -7745,7 +7773,7 @@ "typeArguments": [ { "type": "reference", - "id": 262, + "id": 263, "name": "BotkitMessageTemplate" } ], @@ -7761,7 +7789,7 @@ ], "type": { "type": "reference", - "id": 312, + "id": 313, "name": "BotkitConversation" } } @@ -7780,30 +7808,30 @@ "title": "Constructors", "kind": 512, "children": [ - 315 + 316 ] }, { "title": "Properties", "kind": 1024, "children": [ - 314 + 315 ] }, { "title": "Methods", "kind": 2048, "children": [ - 322, - 326, - 331, - 335, - 346, - 362, - 339, - 354, - 369, - 319 + 323, + 327, + 332, + 336, + 347, + 363, + 340, + 355, + 370, + 320 ] } ], @@ -7822,7 +7850,7 @@ ], "props": [ { - "id": 314, + "id": 315, "name": "script", "kind": 1024, "kindString": "Property", @@ -7849,7 +7877,7 @@ ], "methods": [ { - "id": 322, + "id": 323, "name": "addAction", "kind": 2048, "kindString": "Method", @@ -7860,7 +7888,7 @@ }, "signatures": [ { - "id": 323, + "id": 324, "name": "addAction", "kind": 4096, "kindString": "Call signature", @@ -7873,7 +7901,7 @@ }, "parameters": [ { - "id": 324, + "id": 325, "name": "action", "kind": 32768, "kindString": "Parameter", @@ -7889,7 +7917,7 @@ } }, { - "id": 325, + "id": 326, "name": "thread_name", "kind": 32768, "kindString": "Parameter", @@ -7908,7 +7936,7 @@ ], "type": { "type": "reference", - "id": 312, + "id": 313, "name": "BotkitConversation" } } @@ -7922,7 +7950,7 @@ ] }, { - "id": 326, + "id": 327, "name": "addChildDialog", "kind": 2048, "kindString": "Method", @@ -7933,7 +7961,7 @@ }, "signatures": [ { - "id": 327, + "id": 328, "name": "addChildDialog", "kind": 4096, "kindString": "Call signature", @@ -7946,7 +7974,7 @@ }, "parameters": [ { - "id": 328, + "id": 329, "name": "dialog_id", "kind": 32768, "kindString": "Parameter", @@ -7962,7 +7990,7 @@ } }, { - "id": 329, + "id": 330, "name": "key_name", "kind": 32768, "kindString": "Parameter", @@ -7979,7 +8007,7 @@ } }, { - "id": 330, + "id": 331, "name": "thread_name", "kind": 32768, "kindString": "Parameter", @@ -7998,7 +8026,7 @@ ], "type": { "type": "reference", - "id": 312, + "id": 313, "name": "BotkitConversation" } } @@ -8012,7 +8040,7 @@ ] }, { - "id": 331, + "id": 332, "name": "addGotoDialog", "kind": 2048, "kindString": "Method", @@ -8023,7 +8051,7 @@ }, "signatures": [ { - "id": 332, + "id": 333, "name": "addGotoDialog", "kind": 4096, "kindString": "Call signature", @@ -8036,7 +8064,7 @@ }, "parameters": [ { - "id": 333, + "id": 334, "name": "dialog_id", "kind": 32768, "kindString": "Parameter", @@ -8052,7 +8080,7 @@ } }, { - "id": 334, + "id": 335, "name": "thread_name", "kind": 32768, "kindString": "Parameter", @@ -8071,7 +8099,7 @@ ], "type": { "type": "reference", - "id": 312, + "id": 313, "name": "BotkitConversation" } } @@ -8085,7 +8113,7 @@ ] }, { - "id": 335, + "id": 336, "name": "addMessage", "kind": 2048, "kindString": "Method", @@ -8096,7 +8124,7 @@ }, "signatures": [ { - "id": 336, + "id": 337, "name": "addMessage", "kind": 4096, "kindString": "Call signature", @@ -8109,7 +8137,7 @@ }, "parameters": [ { - "id": 337, + "id": 338, "name": "message", "kind": 32768, "kindString": "Parameter", @@ -8127,7 +8155,7 @@ "typeArguments": [ { "type": "reference", - "id": 262, + "id": 263, "name": "BotkitMessageTemplate" } ], @@ -8141,7 +8169,7 @@ } }, { - "id": 338, + "id": 339, "name": "thread_name", "kind": 32768, "kindString": "Parameter", @@ -8159,7 +8187,7 @@ ], "type": { "type": "reference", - "id": 312, + "id": 313, "name": "BotkitConversation" } } @@ -8173,7 +8201,7 @@ ] }, { - "id": 346, + "id": 347, "name": "addQuestion", "kind": 2048, "kindString": "Method", @@ -8184,7 +8212,7 @@ }, "signatures": [ { - "id": 347, + "id": 348, "name": "addQuestion", "kind": 4096, "kindString": "Call signature", @@ -8197,7 +8225,7 @@ }, "parameters": [ { - "id": 348, + "id": 349, "name": "message", "kind": 32768, "kindString": "Parameter", @@ -8215,7 +8243,7 @@ "typeArguments": [ { "type": "reference", - "id": 262, + "id": 263, "name": "BotkitMessageTemplate" } ], @@ -8229,7 +8257,7 @@ } }, { - "id": 349, + "id": 350, "name": "handlers", "kind": 32768, "kindString": "Parameter", @@ -8244,14 +8272,14 @@ "types": [ { "type": "reference", - "id": 251, + "id": 252, "name": "BotkitConvoHandler" }, { "type": "array", "elementType": { "type": "reference", - "id": 257, + "id": 258, "name": "BotkitConvoTrigger" } } @@ -8259,7 +8287,7 @@ } }, { - "id": 350, + "id": 351, "name": "key", "kind": 32768, "kindString": "Parameter", @@ -8275,7 +8303,7 @@ { "type": "reflection", "declaration": { - "id": 351, + "id": 352, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -8284,7 +8312,7 @@ }, "children": [ { - "id": 352, + "id": 353, "name": "key", "kind": 32, "kindString": "Variable", @@ -8310,7 +8338,7 @@ "title": "Variables", "kind": 32, "children": [ - 352 + 353 ] } ], @@ -8335,7 +8363,7 @@ } }, { - "id": 353, + "id": 354, "name": "thread_name", "kind": 32768, "kindString": "Parameter", @@ -8353,7 +8381,7 @@ ], "type": { "type": "reference", - "id": 312, + "id": 313, "name": "BotkitConversation" } } @@ -8367,7 +8395,7 @@ ] }, { - "id": 362, + "id": 363, "name": "after", "kind": 2048, "kindString": "Method", @@ -8378,7 +8406,7 @@ }, "signatures": [ { - "id": 363, + "id": 364, "name": "after", "kind": 4096, "kindString": "Call signature", @@ -8391,7 +8419,7 @@ }, "parameters": [ { - "id": 364, + "id": 365, "name": "handler", "kind": 32768, "kindString": "Parameter", @@ -8404,7 +8432,7 @@ "type": { "type": "reflection", "declaration": { - "id": 365, + "id": 366, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -8413,7 +8441,7 @@ }, "signatures": [ { - "id": 366, + "id": 367, "name": "__call", "kind": 4096, "kindString": "Call signature", @@ -8422,7 +8450,7 @@ }, "parameters": [ { - "id": 367, + "id": 368, "name": "results", "kind": 32768, "kindString": "Parameter", @@ -8435,7 +8463,7 @@ } }, { - "id": 368, + "id": 369, "name": "bot", "kind": 32768, "kindString": "Parameter", @@ -8481,7 +8509,7 @@ ] }, { - "id": 339, + "id": 340, "name": "ask", "kind": 2048, "kindString": "Method", @@ -8492,7 +8520,7 @@ }, "signatures": [ { - "id": 340, + "id": 341, "name": "ask", "kind": 4096, "kindString": "Call signature", @@ -8505,7 +8533,7 @@ }, "parameters": [ { - "id": 341, + "id": 342, "name": "message", "kind": 32768, "kindString": "Parameter", @@ -8523,7 +8551,7 @@ "typeArguments": [ { "type": "reference", - "id": 262, + "id": 263, "name": "BotkitMessageTemplate" } ], @@ -8537,7 +8565,7 @@ } }, { - "id": 342, + "id": 343, "name": "handlers", "kind": 32768, "kindString": "Parameter", @@ -8552,14 +8580,14 @@ "types": [ { "type": "reference", - "id": 251, + "id": 252, "name": "BotkitConvoHandler" }, { "type": "array", "elementType": { "type": "reference", - "id": 257, + "id": 258, "name": "BotkitConvoTrigger" } } @@ -8567,7 +8595,7 @@ } }, { - "id": 343, + "id": 344, "name": "key", "kind": 32768, "kindString": "Parameter", @@ -8583,7 +8611,7 @@ { "type": "reflection", "declaration": { - "id": 344, + "id": 345, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -8592,7 +8620,7 @@ }, "children": [ { - "id": 345, + "id": 346, "name": "key", "kind": 32, "kindString": "Variable", @@ -8618,7 +8646,7 @@ "title": "Variables", "kind": 32, "children": [ - 345 + 346 ] } ], @@ -8645,7 +8673,7 @@ ], "type": { "type": "reference", - "id": 312, + "id": 313, "name": "BotkitConversation" } } @@ -8659,7 +8687,7 @@ ] }, { - "id": 354, + "id": 355, "name": "before", "kind": 2048, "kindString": "Method", @@ -8670,7 +8698,7 @@ }, "signatures": [ { - "id": 355, + "id": 356, "name": "before", "kind": 4096, "kindString": "Call signature", @@ -8683,7 +8711,7 @@ }, "parameters": [ { - "id": 356, + "id": 357, "name": "thread_name", "kind": 32768, "kindString": "Parameter", @@ -8699,7 +8727,7 @@ } }, { - "id": 357, + "id": 358, "name": "handler", "kind": 32768, "kindString": "Parameter", @@ -8712,7 +8740,7 @@ "type": { "type": "reflection", "declaration": { - "id": 358, + "id": 359, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -8721,7 +8749,7 @@ }, "signatures": [ { - "id": 359, + "id": 360, "name": "__call", "kind": 4096, "kindString": "Call signature", @@ -8730,7 +8758,7 @@ }, "parameters": [ { - "id": 360, + "id": 361, "name": "convo", "kind": 32768, "kindString": "Parameter", @@ -8739,12 +8767,12 @@ }, "type": { "type": "reference", - "id": 230, + "id": 231, "name": "BotkitDialogWrapper" } }, { - "id": 361, + "id": 362, "name": "bot", "kind": 32768, "kindString": "Parameter", @@ -8796,7 +8824,7 @@ ] }, { - "id": 369, + "id": 370, "name": "onChange", "kind": 2048, "kindString": "Method", @@ -8807,7 +8835,7 @@ }, "signatures": [ { - "id": 370, + "id": 371, "name": "onChange", "kind": 4096, "kindString": "Call signature", @@ -8820,7 +8848,7 @@ }, "parameters": [ { - "id": 371, + "id": 372, "name": "variable", "kind": 32768, "kindString": "Parameter", @@ -8836,7 +8864,7 @@ } }, { - "id": 372, + "id": 373, "name": "handler", "kind": 32768, "kindString": "Parameter", @@ -8849,7 +8877,7 @@ "type": { "type": "reflection", "declaration": { - "id": 373, + "id": 374, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -8858,7 +8886,7 @@ }, "signatures": [ { - "id": 374, + "id": 375, "name": "__call", "kind": 4096, "kindString": "Call signature", @@ -8867,7 +8895,7 @@ }, "parameters": [ { - "id": 375, + "id": 376, "name": "response", "kind": 32768, "kindString": "Parameter", @@ -8880,7 +8908,7 @@ } }, { - "id": 376, + "id": 377, "name": "convo", "kind": 32768, "kindString": "Parameter", @@ -8893,7 +8921,7 @@ } }, { - "id": 377, + "id": 378, "name": "bot", "kind": 32768, "kindString": "Parameter", @@ -8944,7 +8972,7 @@ ] }, { - "id": 319, + "id": 320, "name": "say", "kind": 2048, "kindString": "Method", @@ -8955,7 +8983,7 @@ }, "signatures": [ { - "id": 320, + "id": 321, "name": "say", "kind": 4096, "kindString": "Call signature", @@ -8968,7 +8996,7 @@ }, "parameters": [ { - "id": 321, + "id": 322, "name": "message", "kind": 32768, "kindString": "Parameter", @@ -8986,7 +9014,7 @@ "typeArguments": [ { "type": "reference", - "id": 262, + "id": 263, "name": "BotkitMessageTemplate" } ], @@ -9002,7 +9030,7 @@ ], "type": { "type": "reference", - "id": 312, + "id": 313, "name": "BotkitConversation" } } @@ -9018,7 +9046,7 @@ ], "constructors": [ { - "id": 315, + "id": 316, "name": "constructor", "kind": 512, "kindString": "Constructor", @@ -9032,7 +9060,7 @@ }, "signatures": [ { - "id": 316, + "id": 317, "name": "new BotkitConversation", "kind": 16384, "kindString": "Constructor signature", @@ -9044,7 +9072,7 @@ }, "parameters": [ { - "id": 317, + "id": 318, "name": "dialogId", "kind": 32768, "kindString": "Parameter", @@ -9060,7 +9088,7 @@ } }, { - "id": 318, + "id": 319, "name": "controller", "kind": 32768, "kindString": "Parameter", @@ -9079,7 +9107,7 @@ ], "type": { "type": "reference", - "id": 312, + "id": 313, "name": "BotkitConversation" } } @@ -9095,7 +9123,7 @@ ] }, { - "id": 230, + "id": 231, "name": "BotkitDialogWrapper", "kind": 128, "kindString": "Class", @@ -9108,7 +9136,7 @@ }, "children": [ { - "id": 235, + "id": 236, "name": "constructor", "kind": 512, "kindString": "Constructor", @@ -9119,7 +9147,7 @@ }, "signatures": [ { - "id": 236, + "id": 237, "name": "new BotkitDialogWrapper", "kind": 16384, "kindString": "Constructor signature", @@ -9128,7 +9156,7 @@ }, "parameters": [ { - "id": 237, + "id": 238, "name": "dc", "kind": 32768, "kindString": "Parameter", @@ -9141,7 +9169,7 @@ } }, { - "id": 238, + "id": 239, "name": "step", "kind": 32768, "kindString": "Parameter", @@ -9150,14 +9178,14 @@ }, "type": { "type": "reference", - "id": 299, + "id": 300, "name": "BotkitConversationStep" } } ], "type": { "type": "reference", - "id": 230, + "id": 231, "name": "BotkitDialogWrapper" } } @@ -9171,7 +9199,7 @@ ] }, { - "id": 231, + "id": 232, "name": "vars", "kind": 1024, "kindString": "Property", @@ -9193,7 +9221,7 @@ "type": { "type": "reflection", "declaration": { - "id": 232, + "id": 233, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -9202,7 +9230,7 @@ }, "indexSignature": [ { - "id": 233, + "id": 234, "name": "__index", "kind": 8192, "kindString": "Index signature", @@ -9211,7 +9239,7 @@ }, "parameters": [ { - "id": 234, + "id": 235, "name": "key", "kind": 32768, "kindString": "Parameter", @@ -9241,7 +9269,7 @@ } }, { - "id": 239, + "id": 240, "name": "gotoThread", "kind": 2048, "kindString": "Method", @@ -9252,7 +9280,7 @@ }, "signatures": [ { - "id": 240, + "id": 241, "name": "gotoThread", "kind": 4096, "kindString": "Call signature", @@ -9264,7 +9292,7 @@ }, "parameters": [ { - "id": 241, + "id": 242, "name": "thread", "kind": 32768, "kindString": "Parameter", @@ -9301,7 +9329,7 @@ ] }, { - "id": 242, + "id": 243, "name": "repeat", "kind": 2048, "kindString": "Method", @@ -9312,7 +9340,7 @@ }, "signatures": [ { - "id": 243, + "id": 244, "name": "repeat", "kind": 4096, "kindString": "Call signature", @@ -9343,7 +9371,7 @@ ] }, { - "id": 246, + "id": 247, "name": "setVar", "kind": 2048, "kindString": "Method", @@ -9354,7 +9382,7 @@ }, "signatures": [ { - "id": 247, + "id": 248, "name": "setVar", "kind": 4096, "kindString": "Call signature", @@ -9366,7 +9394,7 @@ }, "parameters": [ { - "id": 248, + "id": 249, "name": "key", "kind": 32768, "kindString": "Parameter", @@ -9382,7 +9410,7 @@ } }, { - "id": 249, + "id": 250, "name": "val", "kind": 32768, "kindString": "Parameter", @@ -9413,7 +9441,7 @@ ] }, { - "id": 244, + "id": 245, "name": "stop", "kind": 2048, "kindString": "Method", @@ -9424,7 +9452,7 @@ }, "signatures": [ { - "id": 245, + "id": 246, "name": "stop", "kind": 4096, "kindString": "Call signature", @@ -9460,24 +9488,24 @@ "title": "Constructors", "kind": 512, "children": [ - 235 + 236 ] }, { "title": "Properties", "kind": 1024, "children": [ - 231 + 232 ] }, { "title": "Methods", "kind": 2048, "children": [ - 239, - 242, - 246, - 244 + 240, + 243, + 247, + 245 ] } ], @@ -9490,7 +9518,7 @@ ], "props": [ { - "id": 231, + "id": 232, "name": "vars", "kind": 1024, "kindString": "Property", @@ -9512,7 +9540,7 @@ "type": { "type": "reflection", "declaration": { - "id": 232, + "id": 233, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -9521,7 +9549,7 @@ }, "indexSignature": [ { - "id": 233, + "id": 234, "name": "__index", "kind": 8192, "kindString": "Index signature", @@ -9530,7 +9558,7 @@ }, "parameters": [ { - "id": 234, + "id": 235, "name": "key", "kind": 32768, "kindString": "Parameter", @@ -9562,7 +9590,7 @@ ], "methods": [ { - "id": 239, + "id": 240, "name": "gotoThread", "kind": 2048, "kindString": "Method", @@ -9573,7 +9601,7 @@ }, "signatures": [ { - "id": 240, + "id": 241, "name": "gotoThread", "kind": 4096, "kindString": "Call signature", @@ -9585,7 +9613,7 @@ }, "parameters": [ { - "id": 241, + "id": 242, "name": "thread", "kind": 32768, "kindString": "Parameter", @@ -9622,7 +9650,7 @@ ] }, { - "id": 242, + "id": 243, "name": "repeat", "kind": 2048, "kindString": "Method", @@ -9633,7 +9661,7 @@ }, "signatures": [ { - "id": 243, + "id": 244, "name": "repeat", "kind": 4096, "kindString": "Call signature", @@ -9664,7 +9692,7 @@ ] }, { - "id": 246, + "id": 247, "name": "setVar", "kind": 2048, "kindString": "Method", @@ -9675,7 +9703,7 @@ }, "signatures": [ { - "id": 247, + "id": 248, "name": "setVar", "kind": 4096, "kindString": "Call signature", @@ -9687,7 +9715,7 @@ }, "parameters": [ { - "id": 248, + "id": 249, "name": "key", "kind": 32768, "kindString": "Parameter", @@ -9703,7 +9731,7 @@ } }, { - "id": 249, + "id": 250, "name": "val", "kind": 32768, "kindString": "Parameter", @@ -9734,7 +9762,7 @@ ] }, { - "id": 244, + "id": 245, "name": "stop", "kind": 2048, "kindString": "Method", @@ -9745,7 +9773,7 @@ }, "signatures": [ { - "id": 245, + "id": 246, "name": "stop", "kind": 4096, "kindString": "Call signature", @@ -9778,7 +9806,7 @@ ], "constructors": [ { - "id": 235, + "id": 236, "name": "constructor", "kind": 512, "kindString": "Constructor", @@ -9789,7 +9817,7 @@ }, "signatures": [ { - "id": 236, + "id": 237, "name": "new BotkitDialogWrapper", "kind": 16384, "kindString": "Constructor signature", @@ -9798,7 +9826,7 @@ }, "parameters": [ { - "id": 237, + "id": 238, "name": "dc", "kind": 32768, "kindString": "Parameter", @@ -9811,7 +9839,7 @@ } }, { - "id": 238, + "id": 239, "name": "step", "kind": 32768, "kindString": "Parameter", @@ -9820,14 +9848,14 @@ }, "type": { "type": "reference", - "id": 299, + "id": 300, "name": "BotkitConversationStep" } } ], "type": { "type": "reference", - "id": 230, + "id": 231, "name": "BotkitDialogWrapper" } } @@ -9843,7 +9871,7 @@ ] }, { - "id": 395, + "id": 396, "name": "BotkitTestClient", "kind": 128, "kindString": "Class", @@ -9856,7 +9884,7 @@ }, "children": [ { - "id": 398, + "id": 399, "name": "constructor", "kind": 512, "kindString": "Constructor", @@ -9871,7 +9899,7 @@ }, "signatures": [ { - "id": 399, + "id": 400, "name": "new BotkitTestClient", "kind": 16384, "kindString": "Constructor signature", @@ -9884,7 +9912,7 @@ }, "parameters": [ { - "id": 400, + "id": 401, "name": "channelId", "kind": 32768, "kindString": "Parameter", @@ -9900,7 +9928,7 @@ } }, { - "id": 401, + "id": 402, "name": "bot", "kind": 32768, "kindString": "Parameter", @@ -9917,7 +9945,7 @@ } }, { - "id": 402, + "id": 403, "name": "dialogToTest", "kind": 32768, "kindString": "Parameter", @@ -9945,7 +9973,7 @@ } }, { - "id": 403, + "id": 404, "name": "initialDialogOptions", "kind": 32768, "kindString": "Parameter", @@ -9962,7 +9990,7 @@ } }, { - "id": 404, + "id": 405, "name": "middlewares", "kind": 32768, "kindString": "Parameter", @@ -9982,7 +10010,7 @@ } }, { - "id": 405, + "id": 406, "name": "conversationState", "kind": 32768, "kindString": "Parameter", @@ -10001,12 +10029,12 @@ ], "type": { "type": "reference", - "id": 395, + "id": 396, "name": "BotkitTestClient" } }, { - "id": 406, + "id": 407, "name": "new BotkitTestClient", "kind": 16384, "kindString": "Constructor signature", @@ -10019,7 +10047,7 @@ }, "parameters": [ { - "id": 407, + "id": 408, "name": "testAdapter", "kind": 32768, "kindString": "Parameter", @@ -10032,7 +10060,7 @@ } }, { - "id": 408, + "id": 409, "name": "bot", "kind": 32768, "kindString": "Parameter", @@ -10049,7 +10077,7 @@ } }, { - "id": 409, + "id": 410, "name": "dialogToTest", "kind": 32768, "kindString": "Parameter", @@ -10077,7 +10105,7 @@ } }, { - "id": 410, + "id": 411, "name": "initialDialogOptions", "kind": 32768, "kindString": "Parameter", @@ -10094,7 +10122,7 @@ } }, { - "id": 411, + "id": 412, "name": "middlewares", "kind": 32768, "kindString": "Parameter", @@ -10114,7 +10142,7 @@ } }, { - "id": 412, + "id": 413, "name": "conversationState", "kind": 32768, "kindString": "Parameter", @@ -10133,7 +10161,7 @@ ], "type": { "type": "reference", - "id": 395, + "id": 396, "name": "BotkitTestClient" } } @@ -10157,7 +10185,7 @@ ] }, { - "id": 397, + "id": 398, "name": "conversationState", "kind": 1024, "kindString": "Property", @@ -10179,7 +10207,7 @@ } }, { - "id": 396, + "id": 397, "name": "dialogTurnResult", "kind": 1024, "kindString": "Property", @@ -10201,7 +10229,7 @@ } }, { - "id": 416, + "id": 417, "name": "getNextReply", "kind": 2048, "kindString": "Method", @@ -10212,7 +10240,7 @@ }, "signatures": [ { - "id": 417, + "id": 418, "name": "getNextReply", "kind": 4096, "kindString": "Call signature", @@ -10243,7 +10271,7 @@ ] }, { - "id": 413, + "id": 414, "name": "sendActivity", "kind": 2048, "kindString": "Method", @@ -10254,7 +10282,7 @@ }, "signatures": [ { - "id": 414, + "id": 415, "name": "sendActivity", "kind": 4096, "kindString": "Call signature", @@ -10267,7 +10295,7 @@ }, "parameters": [ { - "id": 415, + "id": 416, "name": "activity", "kind": 32768, "kindString": "Parameter", @@ -10324,23 +10352,23 @@ "title": "Constructors", "kind": 512, "children": [ - 398 + 399 ] }, { "title": "Properties", "kind": 1024, "children": [ - 397, - 396 + 398, + 397 ] }, { "title": "Methods", "kind": 2048, "children": [ - 416, - 413 + 417, + 414 ] } ], @@ -10353,7 +10381,7 @@ ], "props": [ { - "id": 397, + "id": 398, "name": "conversationState", "kind": 1024, "kindString": "Property", @@ -10375,7 +10403,7 @@ } }, { - "id": 396, + "id": 397, "name": "dialogTurnResult", "kind": 1024, "kindString": "Property", @@ -10399,7 +10427,7 @@ ], "methods": [ { - "id": 416, + "id": 417, "name": "getNextReply", "kind": 2048, "kindString": "Method", @@ -10410,7 +10438,7 @@ }, "signatures": [ { - "id": 417, + "id": 418, "name": "getNextReply", "kind": 4096, "kindString": "Call signature", @@ -10441,7 +10469,7 @@ ] }, { - "id": 413, + "id": 414, "name": "sendActivity", "kind": 2048, "kindString": "Method", @@ -10452,7 +10480,7 @@ }, "signatures": [ { - "id": 414, + "id": 415, "name": "sendActivity", "kind": 4096, "kindString": "Call signature", @@ -10465,7 +10493,7 @@ }, "parameters": [ { - "id": 415, + "id": 416, "name": "activity", "kind": 32768, "kindString": "Parameter", @@ -10519,7 +10547,7 @@ ], "constructors": [ { - "id": 398, + "id": 399, "name": "constructor", "kind": 512, "kindString": "Constructor", @@ -10534,7 +10562,7 @@ }, "signatures": [ { - "id": 399, + "id": 400, "name": "new BotkitTestClient", "kind": 16384, "kindString": "Constructor signature", @@ -10547,7 +10575,7 @@ }, "parameters": [ { - "id": 400, + "id": 401, "name": "channelId", "kind": 32768, "kindString": "Parameter", @@ -10563,7 +10591,7 @@ } }, { - "id": 401, + "id": 402, "name": "bot", "kind": 32768, "kindString": "Parameter", @@ -10580,7 +10608,7 @@ } }, { - "id": 402, + "id": 403, "name": "dialogToTest", "kind": 32768, "kindString": "Parameter", @@ -10608,7 +10636,7 @@ } }, { - "id": 403, + "id": 404, "name": "initialDialogOptions", "kind": 32768, "kindString": "Parameter", @@ -10625,7 +10653,7 @@ } }, { - "id": 404, + "id": 405, "name": "middlewares", "kind": 32768, "kindString": "Parameter", @@ -10645,7 +10673,7 @@ } }, { - "id": 405, + "id": 406, "name": "conversationState", "kind": 32768, "kindString": "Parameter", @@ -10664,12 +10692,12 @@ ], "type": { "type": "reference", - "id": 395, + "id": 396, "name": "BotkitTestClient" } }, { - "id": 406, + "id": 407, "name": "new BotkitTestClient", "kind": 16384, "kindString": "Constructor signature", @@ -10682,7 +10710,7 @@ }, "parameters": [ { - "id": 407, + "id": 408, "name": "testAdapter", "kind": 32768, "kindString": "Parameter", @@ -10695,7 +10723,7 @@ } }, { - "id": 408, + "id": 409, "name": "bot", "kind": 32768, "kindString": "Parameter", @@ -10712,7 +10740,7 @@ } }, { - "id": 409, + "id": 410, "name": "dialogToTest", "kind": 32768, "kindString": "Parameter", @@ -10740,7 +10768,7 @@ } }, { - "id": 410, + "id": 411, "name": "initialDialogOptions", "kind": 32768, "kindString": "Parameter", @@ -10757,7 +10785,7 @@ } }, { - "id": 411, + "id": 412, "name": "middlewares", "kind": 32768, "kindString": "Parameter", @@ -10777,7 +10805,7 @@ } }, { - "id": 412, + "id": 413, "name": "conversationState", "kind": 32768, "kindString": "Parameter", @@ -10796,7 +10824,7 @@ ], "type": { "type": "reference", - "id": 395, + "id": 396, "name": "BotkitTestClient" } } @@ -11411,7 +11439,7 @@ ] }, { - "id": 299, + "id": 300, "name": "BotkitConversationStep", "kind": 256, "kindString": "Interface", @@ -11421,7 +11449,7 @@ }, "children": [ { - "id": 300, + "id": 301, "name": "index", "kind": 1024, "kindString": "Property", @@ -11445,7 +11473,7 @@ } }, { - "id": 308, + "id": 309, "name": "next", "kind": 1024, "kindString": "Property", @@ -11466,7 +11494,7 @@ "type": { "type": "reflection", "declaration": { - "id": 309, + "id": 310, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -11475,7 +11503,7 @@ }, "signatures": [ { - "id": 310, + "id": 311, "name": "__call", "kind": 4096, "kindString": "Call signature", @@ -11484,7 +11512,7 @@ }, "parameters": [ { - "id": 311, + "id": 312, "name": "stepResult", "kind": 32768, "kindString": "Parameter", @@ -11520,7 +11548,7 @@ } }, { - "id": 304, + "id": 305, "name": "options", "kind": 1024, "kindString": "Property", @@ -11544,7 +11572,7 @@ } }, { - "id": 305, + "id": 306, "name": "reason", "kind": 1024, "kindString": "Property", @@ -11568,7 +11596,7 @@ } }, { - "id": 306, + "id": 307, "name": "result", "kind": 1024, "kindString": "Property", @@ -11592,7 +11620,7 @@ } }, { - "id": 303, + "id": 304, "name": "state", "kind": 1024, "kindString": "Property", @@ -11616,7 +11644,7 @@ } }, { - "id": 301, + "id": 302, "name": "thread", "kind": 1024, "kindString": "Property", @@ -11640,7 +11668,7 @@ } }, { - "id": 302, + "id": 303, "name": "threadLength", "kind": 1024, "kindString": "Property", @@ -11664,7 +11692,7 @@ } }, { - "id": 307, + "id": 308, "name": "values", "kind": 1024, "kindString": "Property", @@ -11693,15 +11721,15 @@ "title": "Properties", "kind": 1024, "children": [ - 300, - 308, - 304, + 301, + 309, 305, 306, - 303, - 301, + 307, + 304, 302, - 307 + 303, + 308 ] } ], @@ -11714,7 +11742,7 @@ ], "props": [ { - "id": 300, + "id": 301, "name": "index", "kind": 1024, "kindString": "Property", @@ -11738,7 +11766,7 @@ } }, { - "id": 308, + "id": 309, "name": "next", "kind": 1024, "kindString": "Property", @@ -11759,7 +11787,7 @@ "type": { "type": "reflection", "declaration": { - "id": 309, + "id": 310, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -11768,7 +11796,7 @@ }, "signatures": [ { - "id": 310, + "id": 311, "name": "__call", "kind": 4096, "kindString": "Call signature", @@ -11777,7 +11805,7 @@ }, "parameters": [ { - "id": 311, + "id": 312, "name": "stepResult", "kind": 32768, "kindString": "Parameter", @@ -11813,7 +11841,7 @@ } }, { - "id": 304, + "id": 305, "name": "options", "kind": 1024, "kindString": "Property", @@ -11837,7 +11865,7 @@ } }, { - "id": 305, + "id": 306, "name": "reason", "kind": 1024, "kindString": "Property", @@ -11861,7 +11889,7 @@ } }, { - "id": 306, + "id": 307, "name": "result", "kind": 1024, "kindString": "Property", @@ -11885,7 +11913,7 @@ } }, { - "id": 303, + "id": 304, "name": "state", "kind": 1024, "kindString": "Property", @@ -11909,7 +11937,7 @@ } }, { - "id": 301, + "id": 302, "name": "thread", "kind": 1024, "kindString": "Property", @@ -11933,7 +11961,7 @@ } }, { - "id": 302, + "id": 303, "name": "threadLength", "kind": 1024, "kindString": "Property", @@ -11957,7 +11985,7 @@ } }, { - "id": 307, + "id": 308, "name": "values", "kind": 1024, "kindString": "Property", @@ -11983,7 +12011,7 @@ ] }, { - "id": 251, + "id": 252, "name": "BotkitConvoHandler", "kind": 256, "kindString": "Interface", @@ -11995,7 +12023,7 @@ }, "signatures": [ { - "id": 252, + "id": 253, "name": "__call", "kind": 4096, "kindString": "Call signature", @@ -12005,7 +12033,7 @@ }, "parameters": [ { - "id": 253, + "id": 254, "name": "answer", "kind": 32768, "kindString": "Parameter", @@ -12016,19 +12044,19 @@ } }, { - "id": 254, + "id": 255, "name": "convo", "kind": 32768, "kindString": "Parameter", "flags": {}, "type": { "type": "reference", - "id": 230, + "id": 231, "name": "BotkitDialogWrapper" } }, { - "id": 255, + "id": 256, "name": "bot", "kind": 32768, "kindString": "Parameter", @@ -12040,7 +12068,7 @@ } }, { - "id": 256, + "id": 257, "name": "message", "kind": 32768, "kindString": "Parameter", @@ -12073,7 +12101,7 @@ ] }, { - "id": 257, + "id": 258, "name": "BotkitConvoTrigger", "kind": 256, "kindString": "Interface", @@ -12085,7 +12113,7 @@ }, "children": [ { - "id": 261, + "id": 262, "name": "default", "kind": 1024, "kindString": "Property", @@ -12106,7 +12134,7 @@ } }, { - "id": 260, + "id": 261, "name": "handler", "kind": 1024, "kindString": "Property", @@ -12122,12 +12150,12 @@ ], "type": { "type": "reference", - "id": 251, + "id": 252, "name": "BotkitConvoHandler" } }, { - "id": 259, + "id": 260, "name": "pattern", "kind": 1024, "kindString": "Property", @@ -12157,7 +12185,7 @@ } }, { - "id": 258, + "id": 259, "name": "type", "kind": 1024, "kindString": "Property", @@ -12183,10 +12211,10 @@ "title": "Properties", "kind": 1024, "children": [ + 262, 261, 260, - 259, - 258 + 259 ] } ], @@ -12199,7 +12227,7 @@ ], "props": [ { - "id": 261, + "id": 262, "name": "default", "kind": 1024, "kindString": "Property", @@ -12220,7 +12248,7 @@ } }, { - "id": 260, + "id": 261, "name": "handler", "kind": 1024, "kindString": "Property", @@ -12236,12 +12264,12 @@ ], "type": { "type": "reference", - "id": 251, + "id": 252, "name": "BotkitConvoHandler" } }, { - "id": 259, + "id": 260, "name": "pattern", "kind": 1024, "kindString": "Property", @@ -12271,7 +12299,7 @@ } }, { - "id": 258, + "id": 259, "name": "type", "kind": 1024, "kindString": "Property", @@ -12782,7 +12810,7 @@ ] }, { - "id": 262, + "id": 263, "name": "BotkitMessageTemplate", "kind": 256, "kindString": "Interface", @@ -12794,7 +12822,7 @@ }, "children": [ { - "id": 268, + "id": 269, "name": "action", "kind": 1024, "kindString": "Property", @@ -12815,7 +12843,7 @@ } }, { - "id": 288, + "id": 289, "name": "attachment", "kind": 1024, "kindString": "Property", @@ -12836,21 +12864,21 @@ { "type": "reflection", "declaration": { - "id": 289, + "id": 290, "name": "__type", "kind": 65536, "kindString": "Type literal", "flags": {}, "signatures": [ { - "id": 290, + "id": 291, "name": "__call", "kind": 4096, "kindString": "Call signature", "flags": {}, "parameters": [ { - "id": 291, + "id": 292, "name": "template", "kind": 32768, "kindString": "Parameter", @@ -12861,7 +12889,7 @@ } }, { - "id": 292, + "id": 293, "name": "vars", "kind": 32768, "kindString": "Parameter", @@ -12895,7 +12923,7 @@ } }, { - "id": 293, + "id": 294, "name": "attachmentLayout", "kind": 1024, "kindString": "Property", @@ -12916,7 +12944,7 @@ } }, { - "id": 278, + "id": 279, "name": "attachments", "kind": 1024, "kindString": "Property", @@ -12937,21 +12965,21 @@ { "type": "reflection", "declaration": { - "id": 279, + "id": 280, "name": "__type", "kind": 65536, "kindString": "Type literal", "flags": {}, "signatures": [ { - "id": 280, + "id": 281, "name": "__call", "kind": 4096, "kindString": "Call signature", "flags": {}, "parameters": [ { - "id": 281, + "id": 282, "name": "template", "kind": 32768, "kindString": "Parameter", @@ -12962,7 +12990,7 @@ } }, { - "id": 282, + "id": 283, "name": "vars", "kind": 32768, "kindString": "Parameter", @@ -13002,7 +13030,7 @@ } }, { - "id": 283, + "id": 284, "name": "blocks", "kind": 1024, "kindString": "Property", @@ -13023,21 +13051,21 @@ { "type": "reflection", "declaration": { - "id": 284, + "id": 285, "name": "__type", "kind": 65536, "kindString": "Type literal", "flags": {}, "signatures": [ { - "id": 285, + "id": 286, "name": "__call", "kind": 4096, "kindString": "Call signature", "flags": {}, "parameters": [ { - "id": 286, + "id": 287, "name": "template", "kind": 32768, "kindString": "Parameter", @@ -13048,7 +13076,7 @@ } }, { - "id": 287, + "id": 288, "name": "vars", "kind": 32768, "kindString": "Parameter", @@ -13088,7 +13116,7 @@ } }, { - "id": 294, + "id": 295, "name": "channelData", "kind": 1024, "kindString": "Property", @@ -13109,7 +13137,7 @@ } }, { - "id": 295, + "id": 296, "name": "collect", "kind": 1024, "kindString": "Property", @@ -13126,14 +13154,14 @@ "type": { "type": "reflection", "declaration": { - "id": 296, + "id": 297, "name": "__type", "kind": 65536, "kindString": "Type literal", "flags": {}, "children": [ { - "id": 297, + "id": 298, "name": "key", "kind": 32, "kindString": "Variable", @@ -13154,7 +13182,7 @@ } }, { - "id": 298, + "id": 299, "name": "options", "kind": 32, "kindString": "Variable", @@ -13173,7 +13201,7 @@ "type": "array", "elementType": { "type": "reference", - "id": 257, + "id": 258, "name": "BotkitConvoTrigger" } } @@ -13184,8 +13212,8 @@ "title": "Variables", "kind": 32, "children": [ - 297, - 298 + 298, + 299 ] } ], @@ -13200,7 +13228,7 @@ } }, { - "id": 269, + "id": 270, "name": "execute", "kind": 1024, "kindString": "Property", @@ -13218,14 +13246,14 @@ "type": { "type": "reflection", "declaration": { - "id": 270, + "id": 271, "name": "__type", "kind": 65536, "kindString": "Type literal", "flags": {}, "children": [ { - "id": 271, + "id": 272, "name": "script", "kind": 32, "kindString": "Variable", @@ -13245,7 +13273,7 @@ } }, { - "id": 272, + "id": 273, "name": "thread", "kind": 32, "kindString": "Variable", @@ -13271,8 +13299,8 @@ "title": "Variables", "kind": 32, "children": [ - 271, - 272 + 272, + 273 ] } ], @@ -13287,7 +13315,7 @@ } }, { - "id": 273, + "id": 274, "name": "quick_replies", "kind": 1024, "kindString": "Property", @@ -13308,21 +13336,21 @@ { "type": "reflection", "declaration": { - "id": 274, + "id": 275, "name": "__type", "kind": 65536, "kindString": "Type literal", "flags": {}, "signatures": [ { - "id": 275, + "id": 276, "name": "__call", "kind": 4096, "kindString": "Call signature", "flags": {}, "parameters": [ { - "id": 276, + "id": 277, "name": "template", "kind": 32768, "kindString": "Parameter", @@ -13333,7 +13361,7 @@ } }, { - "id": 277, + "id": 278, "name": "vars", "kind": 32768, "kindString": "Parameter", @@ -13373,7 +13401,7 @@ } }, { - "id": 263, + "id": 264, "name": "text", "kind": 1024, "kindString": "Property", @@ -13393,21 +13421,21 @@ { "type": "reflection", "declaration": { - "id": 264, + "id": 265, "name": "__type", "kind": 65536, "kindString": "Type literal", "flags": {}, "signatures": [ { - "id": 265, + "id": 266, "name": "__call", "kind": 4096, "kindString": "Call signature", "flags": {}, "parameters": [ { - "id": 266, + "id": 267, "name": "template", "kind": 32768, "kindString": "Parameter", @@ -13418,7 +13446,7 @@ } }, { - "id": 267, + "id": 268, "name": "vars", "kind": 32768, "kindString": "Parameter", @@ -13463,16 +13491,16 @@ "title": "Properties", "kind": 1024, "children": [ - 268, - 288, - 293, - 278, - 283, + 269, + 289, 294, + 279, + 284, 295, - 269, - 273, - 263 + 296, + 270, + 274, + 264 ] } ], @@ -13485,7 +13513,7 @@ ], "props": [ { - "id": 268, + "id": 269, "name": "action", "kind": 1024, "kindString": "Property", @@ -13506,7 +13534,7 @@ } }, { - "id": 288, + "id": 289, "name": "attachment", "kind": 1024, "kindString": "Property", @@ -13527,21 +13555,21 @@ { "type": "reflection", "declaration": { - "id": 289, + "id": 290, "name": "__type", "kind": 65536, "kindString": "Type literal", "flags": {}, "signatures": [ { - "id": 290, + "id": 291, "name": "__call", "kind": 4096, "kindString": "Call signature", "flags": {}, "parameters": [ { - "id": 291, + "id": 292, "name": "template", "kind": 32768, "kindString": "Parameter", @@ -13552,7 +13580,7 @@ } }, { - "id": 292, + "id": 293, "name": "vars", "kind": 32768, "kindString": "Parameter", @@ -13586,7 +13614,7 @@ } }, { - "id": 293, + "id": 294, "name": "attachmentLayout", "kind": 1024, "kindString": "Property", @@ -13607,7 +13635,7 @@ } }, { - "id": 278, + "id": 279, "name": "attachments", "kind": 1024, "kindString": "Property", @@ -13628,21 +13656,21 @@ { "type": "reflection", "declaration": { - "id": 279, + "id": 280, "name": "__type", "kind": 65536, "kindString": "Type literal", "flags": {}, "signatures": [ { - "id": 280, + "id": 281, "name": "__call", "kind": 4096, "kindString": "Call signature", "flags": {}, "parameters": [ { - "id": 281, + "id": 282, "name": "template", "kind": 32768, "kindString": "Parameter", @@ -13653,7 +13681,7 @@ } }, { - "id": 282, + "id": 283, "name": "vars", "kind": 32768, "kindString": "Parameter", @@ -13693,7 +13721,7 @@ } }, { - "id": 283, + "id": 284, "name": "blocks", "kind": 1024, "kindString": "Property", @@ -13714,21 +13742,21 @@ { "type": "reflection", "declaration": { - "id": 284, + "id": 285, "name": "__type", "kind": 65536, "kindString": "Type literal", "flags": {}, "signatures": [ { - "id": 285, + "id": 286, "name": "__call", "kind": 4096, "kindString": "Call signature", "flags": {}, "parameters": [ { - "id": 286, + "id": 287, "name": "template", "kind": 32768, "kindString": "Parameter", @@ -13739,7 +13767,7 @@ } }, { - "id": 287, + "id": 288, "name": "vars", "kind": 32768, "kindString": "Parameter", @@ -13779,7 +13807,7 @@ } }, { - "id": 294, + "id": 295, "name": "channelData", "kind": 1024, "kindString": "Property", @@ -13800,7 +13828,7 @@ } }, { - "id": 295, + "id": 296, "name": "collect", "kind": 1024, "kindString": "Property", @@ -13817,14 +13845,14 @@ "type": { "type": "reflection", "declaration": { - "id": 296, + "id": 297, "name": "__type", "kind": 65536, "kindString": "Type literal", "flags": {}, "children": [ { - "id": 297, + "id": 298, "name": "key", "kind": 32, "kindString": "Variable", @@ -13845,7 +13873,7 @@ } }, { - "id": 298, + "id": 299, "name": "options", "kind": 32, "kindString": "Variable", @@ -13864,7 +13892,7 @@ "type": "array", "elementType": { "type": "reference", - "id": 257, + "id": 258, "name": "BotkitConvoTrigger" } } @@ -13875,8 +13903,8 @@ "title": "Variables", "kind": 32, "children": [ - 297, - 298 + 298, + 299 ] } ], @@ -13891,7 +13919,7 @@ } }, { - "id": 269, + "id": 270, "name": "execute", "kind": 1024, "kindString": "Property", @@ -13909,14 +13937,14 @@ "type": { "type": "reflection", "declaration": { - "id": 270, + "id": 271, "name": "__type", "kind": 65536, "kindString": "Type literal", "flags": {}, "children": [ { - "id": 271, + "id": 272, "name": "script", "kind": 32, "kindString": "Variable", @@ -13936,7 +13964,7 @@ } }, { - "id": 272, + "id": 273, "name": "thread", "kind": 32, "kindString": "Variable", @@ -13962,8 +13990,8 @@ "title": "Variables", "kind": 32, "children": [ - 271, - 272 + 272, + 273 ] } ], @@ -13978,7 +14006,7 @@ } }, { - "id": 273, + "id": 274, "name": "quick_replies", "kind": 1024, "kindString": "Property", @@ -13999,21 +14027,21 @@ { "type": "reflection", "declaration": { - "id": 274, + "id": 275, "name": "__type", "kind": 65536, "kindString": "Type literal", "flags": {}, "signatures": [ { - "id": 275, + "id": 276, "name": "__call", "kind": 4096, "kindString": "Call signature", "flags": {}, "parameters": [ { - "id": 276, + "id": 277, "name": "template", "kind": 32768, "kindString": "Parameter", @@ -14024,7 +14052,7 @@ } }, { - "id": 277, + "id": 278, "name": "vars", "kind": 32768, "kindString": "Parameter", @@ -14064,7 +14092,7 @@ } }, { - "id": 263, + "id": 264, "name": "text", "kind": 1024, "kindString": "Property", @@ -14084,21 +14112,21 @@ { "type": "reflection", "declaration": { - "id": 264, + "id": 265, "name": "__type", "kind": 65536, "kindString": "Type literal", "flags": {}, "signatures": [ { - "id": 265, + "id": 266, "name": "__call", "kind": 4096, "kindString": "Call signature", "flags": {}, "parameters": [ { - "id": 266, + "id": 267, "name": "template", "kind": 32768, "kindString": "Parameter", @@ -14109,7 +14137,7 @@ } }, { - "id": 267, + "id": 268, "name": "vars", "kind": 32768, "kindString": "Parameter", diff --git a/packages/docs/reference/core.md b/packages/docs/reference/core.md index c7a27aa78..5796735f9 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 | diff --git a/packages/testbot/features/botframework_features.js b/packages/testbot/features/botframework_features.js index bd1e32d1c..f806f0bd9 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/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 From e820414311ac18c7aed1bd2e2485233630dd6197 Mon Sep 17 00:00:00 2001 From: Ben Brown Date: Wed, 11 Mar 2020 11:20:51 -0500 Subject: [PATCH 11/32] Fixes #1892 - add support for slack oauth v2 --- .../src/facebook_adapter.ts | 2 +- .../botbuilder-adapter-slack/CHANGELOG.md | 5 +++ .../botbuilder-adapter-slack/package.json | 4 +-- .../src/slack_adapter.ts | 32 ++++++++++++------- .../src/webex_adapter.ts | 2 +- packages/botkit/src/testClient.ts | 1 - 6 files changed, 29 insertions(+), 17 deletions(-) diff --git a/packages/botbuilder-adapter-facebook/src/facebook_adapter.ts b/packages/botbuilder-adapter-facebook/src/facebook_adapter.ts index 349ee41eb..7ac64fb90 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(); } diff --git a/packages/botbuilder-adapter-slack/CHANGELOG.md b/packages/botbuilder-adapter-slack/CHANGELOG.md index 0c603918a..c68fc1740 100644 --- a/packages/botbuilder-adapter-slack/CHANGELOG.md +++ b/packages/botbuilder-adapter-slack/CHANGELOG.md @@ -1,5 +1,10 @@ # 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. + # 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..93f7f2422 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,7 +33,7 @@ "url": "https://github.com/howdyai/botkit.git" }, "dependencies": { - "@slack/web-api": "^5.7.0", + "@slack/web-api": "^5.8.0", "botbuilder": "^4.7.1", "botkit": "^4.6.2", "debug": "^4.1.0" diff --git a/packages/botbuilder-adapter-slack/src/slack_adapter.ts b/packages/botbuilder-adapter-slack/src/slack_adapter.ts index 03ad4c65d..156199992 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,12 +248,11 @@ export class SlackAdapter extends BotAdapter { * @returns A url pointing to the first step in Slack's oauth flow. */ public getInstallLink(): string { - let redirect = '' + let redirect = ''; if (this.options.clientId && this.options.scopes) { - if (this.options.oauthVersion == 'v2'|'V2'){ + if (this.options.oauthVersion === 'v2') { redirect = 'https://slack.com/oauth/v2/authorize?client_id=' + this.options.clientId + '&scope=' + this.options.scopes.join(','); - } - else { + } else { redirect = 'https://slack.com/oauth/authorize?client_id=' + this.options.clientId + '&scope=' + this.options.scopes.join(','); } if (this.options.redirectUri) { @@ -290,13 +295,12 @@ export class SlackAdapter extends BotAdapter { client_id: this.options.clientId, client_secret: this.options.clientSecret, redirect_uri: this.options.redirectUri - } - let results = {}; - if (this.options.oauthVersion == 'v2'|'V2'){ - results = await slack.oauth.v2.access(details) - } - else { - results = await slack.oauth.access(details) + }; + 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; @@ -735,9 +739,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-webex/src/webex_adapter.ts b/packages/botbuilder-adapter-webex/src/webex_adapter.ts index b69d81fe7..d735d2eaf 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; diff --git a/packages/botkit/src/testClient.ts b/packages/botkit/src/testClient.ts index 42fde54d4..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) { From 14f9a036e9b83d4ac41639a4f66eeab89d6e13b2 Mon Sep 17 00:00:00 2001 From: Ben Brown Date: Wed, 11 Mar 2020 11:23:07 -0500 Subject: [PATCH 12/32] changelog --- changelog.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog.md b/changelog.md index 57db8c8a2..2e2f2ab9b 100644 --- a/changelog.md +++ b/changelog.md @@ -8,8 +8,8 @@ * 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) - * 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) +* 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) # 4.6.1 From 76b34373f14795f70a5ea64e234419d241ed2223 Mon Sep 17 00:00:00 2001 From: Ben Brown Date: Wed, 11 Mar 2020 11:26:05 -0500 Subject: [PATCH 13/32] update docs --- packages/docs/platforms/slack.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/docs/platforms/slack.md b/packages/docs/platforms/slack.md index d05e52304..74b1f0547 100644 --- a/packages/docs/platforms/slack.md +++ b/packages/docs/platforms/slack.md @@ -100,7 +100,7 @@ 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' depricated by Slack in favor of granular permissions redirectUri: process.env.REDIRECT_URI, // url to redirect post-login getTokenForTeam: async(team_id) => { // load the token for this team @@ -125,9 +125,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. // ... From 33024d5e384bd39211268655a31196cde20a4510 Mon Sep 17 00:00:00 2001 From: Ben Brown Date: Wed, 11 Mar 2020 11:31:42 -0500 Subject: [PATCH 14/32] add docs for slack v2 oauth --- packages/botbuilder-adapter-slack/readme.md | 21 ++++++++++++++++++++- packages/docs/platforms/slack.md | 21 ++++++++++++++++++++- 2 files changed, 40 insertions(+), 2 deletions(-) diff --git a/packages/botbuilder-adapter-slack/readme.md b/packages/botbuilder-adapter-slack/readme.md index 98ac9a903..efbf45515 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, 'bot' depricated by Slack in favor of granular permissions + 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 @@ -142,6 +143,24 @@ controller.webserver.get('/install/auth', (req, res) => { }); ``` +### Using Slacks 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. + +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) + +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`. + +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/docs/platforms/slack.md b/packages/docs/platforms/slack.md index 74b1f0547..0b8004030 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, 'bot' depricated by Slack in favor of granular permissions + 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 @@ -144,6 +145,24 @@ controller.webserver.get('/install/auth', (req, res) => { }); ``` +### Using Slacks 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. + +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) + +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`. + +Take care to update your auth handler function when you migrate to granular scopes. + + ## Class Reference * [SlackAdapter](../reference/slack.md#slackadapter) From 2d9d8f61546c70b8eaeb4883843f3b6bd7530728 Mon Sep 17 00:00:00 2001 From: Ben Brown Date: Wed, 11 Mar 2020 11:32:43 -0500 Subject: [PATCH 15/32] add docs for slack v2 oauth --- packages/botbuilder-adapter-slack/CHANGELOG.md | 2 +- packages/botbuilder-adapter-slack/readme.md | 2 +- packages/docs/platforms/slack.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/botbuilder-adapter-slack/CHANGELOG.md b/packages/botbuilder-adapter-slack/CHANGELOG.md index c68fc1740..dfd1bacf0 100644 --- a/packages/botbuilder-adapter-slack/CHANGELOG.md +++ b/packages/botbuilder-adapter-slack/CHANGELOG.md @@ -3,7 +3,7 @@ # 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. +* 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) # 1.0.8 diff --git a/packages/botbuilder-adapter-slack/readme.md b/packages/botbuilder-adapter-slack/readme.md index efbf45515..5d9dc8f95 100644 --- a/packages/botbuilder-adapter-slack/readme.md +++ b/packages/botbuilder-adapter-slack/readme.md @@ -143,7 +143,7 @@ controller.webserver.get('/install/auth', (req, res) => { }); ``` -### Using Slacks v2 OAuth +### 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. diff --git a/packages/docs/platforms/slack.md b/packages/docs/platforms/slack.md index 0b8004030..f0190d1a5 100644 --- a/packages/docs/platforms/slack.md +++ b/packages/docs/platforms/slack.md @@ -145,7 +145,7 @@ controller.webserver.get('/install/auth', (req, res) => { }); ``` -### Using Slacks v2 OAuth +### 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. From c4f20a216add2fd6359b468c3563ec4d7ce5d9f0 Mon Sep 17 00:00:00 2001 From: Ben Brown Date: Wed, 11 Mar 2020 11:34:04 -0500 Subject: [PATCH 16/32] add docs for slack v2 oauth --- packages/botbuilder-adapter-slack/readme.md | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/packages/botbuilder-adapter-slack/readme.md b/packages/botbuilder-adapter-slack/readme.md index 5d9dc8f95..196419de0 100644 --- a/packages/botbuilder-adapter-slack/readme.md +++ b/packages/botbuilder-adapter-slack/readme.md @@ -149,17 +149,16 @@ To use Slack's [newer "granular scopes"](https://api.slack.com/authentication/oa 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. -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) - 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`. -Take care to update your auth handler function when you migrate to granular scopes. +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 From d332408a2cff16533ec0b2f87d3ad46e64f4c873 Mon Sep 17 00:00:00 2001 From: Ben Brown Date: Wed, 11 Mar 2020 11:43:46 -0500 Subject: [PATCH 17/32] fix issue with webex adapter sending empty files parameter --- .../botbuilder-adapter-webex/CHANGELOG.md | 6 +++++ .../botbuilder-adapter-webex/package.json | 4 ++-- .../src/webex_adapter.ts | 22 +++++++++---------- 3 files changed, 19 insertions(+), 13 deletions(-) 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..86acaacbd 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.6", "description": "Connect Botkit or BotBuilder to Webex Teams", "main": "./lib/index.js", "typings": "./lib/index.d.ts", @@ -37,7 +37,7 @@ "botkit": "^4.6.2", "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 c997f3746..a1074ab01 100644 --- a/packages/botbuilder-adapter-webex/src/webex_adapter.ts +++ b/packages/botbuilder-adapter-webex/src/webex_adapter.ts @@ -277,9 +277,9 @@ export class WebexAdapter extends BotAdapter { event: 'all', secret: this.options.secret, name: webhook_name - }).then(function () { + }).then(function() { debug('Webex: SUCCESSFULLY UPDATED WEBEX WEBHOOKS'); - }).catch(function (err) { + }).catch(function(err) { console.error('FAILED TO REGISTER WEBHOOK', err); throw new Error(err); }); @@ -290,14 +290,14 @@ export class WebexAdapter extends BotAdapter { event: 'all', secret: this.options.secret, name: webhook_name - }).then(function () { + }).then(function() { debug('Webex: SUCCESSFULLY REGISTERED WEBEX WEBHOOKS'); - }).catch(function (err) { + }).catch(function(err) { console.error('FAILED TO REGISTER WEBHOOK', err); throw new Error(err); }); } - }).catch(function (err) { + }).catch(function(err) { throw new Error(err); }); } @@ -330,9 +330,9 @@ export class WebexAdapter extends BotAdapter { event: 'all', secret: this.options.secret, name: webhook_name - }).then(function () { + }).then(function() { debug('Webex: SUCCESSFULLY UPDATED WEBEX WEBHOOKS'); - }).catch(function (err) { + }).catch(function(err) { console.error('FAILED TO REGISTER WEBHOOK', err); throw new Error(err); }); @@ -343,14 +343,14 @@ export class WebexAdapter extends BotAdapter { event: 'all', secret: this.options.secret, name: webhook_name - }).then(function () { + }).then(function() { debug('Webex: SUCCESSFULLY REGISTERED WEBEX WEBHOOKS'); - }).catch(function (err) { + }).catch(function(err) { console.error('FAILED TO REGISTER WEBHOOK', err); throw new Error(err); }); } - }).catch(function (err) { + }).catch(function(err) { throw new Error(err); }); } @@ -366,7 +366,7 @@ 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 From f045e1bdaaf1f6fb09626a44e1c3cfb1263d1bca Mon Sep 17 00:00:00 2001 From: Ben Brown Date: Wed, 11 Mar 2020 11:53:24 -0500 Subject: [PATCH 18/32] changelog --- changelog.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/changelog.md b/changelog.md index 2e2f2ab9b..41cb3e2c0 100644 --- a/changelog.md +++ b/changelog.md @@ -8,8 +8,10 @@ * 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) -* 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) -* 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: 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) + # 4.6.1 From b65866031bb5fb7c7c9fb4ad8203706e01abed14 Mon Sep 17 00:00:00 2001 From: Ben Brown Date: Wed, 11 Mar 2020 12:06:08 -0500 Subject: [PATCH 19/32] Fixes #1916 - check for webserver before attempting to add a route --- .../src/facebook_adapter.ts | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/packages/botbuilder-adapter-facebook/src/facebook_adapter.ts b/packages/botbuilder-adapter-facebook/src/facebook_adapter.ts index 7ac64fb90..b3031bfec 100644 --- a/packages/botbuilder-adapter-facebook/src/facebook_adapter.ts +++ b/packages/botbuilder-adapter-facebook/src/facebook_adapter.ts @@ -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'); + } } - } - }); + }); + } } /** From f57e059a3ba33bc1f09fa2946b97de84097af4a7 Mon Sep 17 00:00:00 2001 From: Ben Brown Date: Wed, 11 Mar 2020 12:07:43 -0500 Subject: [PATCH 20/32] changelog --- changelog.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/changelog.md b/changelog.md index 41cb3e2c0..4508944ab 100644 --- a/changelog.md +++ b/changelog.md @@ -12,6 +12,8 @@ This allows developers to use payload values inside quick replies, button clicks * 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) +* FIX: Facebook Adapter will not attempt to set up web routes if webserver is not configured. [#1916](https://github.com/howdyai/botkit/issues/1916) + # 4.6.1 From 46f91203f0fc8c1bec3b8bbfdd545f02283370a7 Mon Sep 17 00:00:00 2001 From: Ben Brown Date: Wed, 11 Mar 2020 12:21:40 -0500 Subject: [PATCH 21/32] Fix #1911 - copy authed_user into message object --- packages/botbuilder-adapter-slack/CHANGELOG.md | 1 + packages/botbuilder-adapter-slack/src/slack_adapter.ts | 3 +++ 2 files changed, 4 insertions(+) diff --git a/packages/botbuilder-adapter-slack/CHANGELOG.md b/packages/botbuilder-adapter-slack/CHANGELOG.md index dfd1bacf0..001f8cf0e 100644 --- a/packages/botbuilder-adapter-slack/CHANGELOG.md +++ b/packages/botbuilder-adapter-slack/CHANGELOG.md @@ -4,6 +4,7 @@ * 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 diff --git a/packages/botbuilder-adapter-slack/src/slack_adapter.ts b/packages/botbuilder-adapter-slack/src/slack_adapter.ts index 156199992..1ebfeab4f 100644 --- a/packages/botbuilder-adapter-slack/src/slack_adapter.ts +++ b/packages/botbuilder-adapter-slack/src/slack_adapter.ts @@ -622,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); From f776ed5a418ce3ea2643d06d7736d96d1ccc00a8 Mon Sep 17 00:00:00 2001 From: Ben Brown Date: Wed, 11 Mar 2020 12:39:47 -0500 Subject: [PATCH 22/32] Fixes #1849 - exclude conversation.properties field from key generation --- packages/botkit/src/conversationState.ts | 2 +- packages/botkit/tests/State.tests.js | 56 ++++++++++++++++++++++++ 2 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 packages/botkit/tests/State.tests.js 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/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'); + }); +}); From 3d2488ee6aa8b96f0dd95b87f579534483e11eef Mon Sep 17 00:00:00 2001 From: Ben Brown Date: Wed, 11 Mar 2020 14:47:44 -0500 Subject: [PATCH 23/32] Fixes #1834 Allow startConversationWithUser to work with Bot Framework Emulator --- changelog.md | 3 ++- packages/botkit/src/botworker.ts | 4 +++- packages/testbot/features/botframework_features.js | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/changelog.md b/changelog.md index 4508944ab..4d0948def 100644 --- a/changelog.md +++ b/changelog.md @@ -13,7 +13,8 @@ This allows developers to use payload values inside quick replies, button clicks * 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) * 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) # 4.6.1 diff --git a/packages/botkit/src/botworker.ts b/packages/botkit/src/botworker.ts index 382fe385e..fb33c30e1 100644 --- a/packages/botkit/src/botworker.ts +++ b/packages/botkit/src/botworker.ts @@ -271,7 +271,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, diff --git a/packages/testbot/features/botframework_features.js b/packages/testbot/features/botframework_features.js index f806f0bd9..241301a52 100644 --- a/packages/testbot/features/botframework_features.js +++ b/packages/testbot/features/botframework_features.js @@ -8,7 +8,7 @@ module.exports = function(controller) { // 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'); + await bot.say('Hello! (in private)'); }); controller.hears('update me', 'message', async(bot, message) => { From e46ba7a6393eccc64afd755d9ce15923ef4aa57d Mon Sep 17 00:00:00 2001 From: Ben Brown Date: Thu, 12 Mar 2020 12:18:16 -0500 Subject: [PATCH 24/32] Fixes #1878 - fixes behavior when beginDialog is called from inside an ask handler --- packages/botkit/src/conversation.ts | 11 +++++++++-- packages/botkit/src/core.ts | 1 - 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/packages/botkit/src/conversation.ts b/packages/botkit/src/conversation.ts index 9a7b86c7b..a2af229d3 100644 --- a/packages/botkit/src/conversation.ts +++ b/packages/botkit/src/conversation.ts @@ -653,7 +653,6 @@ export class BotkitConversation extends Dialog { } const res = await this.handleAction(path, dc, step); - if (res !== false) { return res; } @@ -691,6 +690,7 @@ export class BotkitConversation extends Dialog { } if (line.action) { + const res = await this.handleAction(line, dc, step); if (res !== false) { return res; @@ -734,7 +734,6 @@ export class BotkitConversation extends Dialog { 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); } }; @@ -968,11 +967,19 @@ export class BotkitConversation extends Dialog { // create a convo controller object const convo = new BotkitDialogWrapper(dc, step); + 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/core.ts b/packages/botkit/src/core.ts index 02266bcba..a9245406d 100644 --- a/packages/botkit/src/core.ts +++ b/packages/botkit/src/core.ts @@ -1172,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); } ])); From b1d4c775468c7c53c9b0f9cf797c71a63c5ef62e Mon Sep 17 00:00:00 2001 From: Ben Brown Date: Thu, 12 Mar 2020 12:25:43 -0500 Subject: [PATCH 25/32] update tests to test for beginDialog inside an ask --- packages/botkit/tests/Dialog.tests.js | 32 +++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/packages/botkit/tests/Dialog.tests.js b/packages/botkit/tests/Dialog.tests.js index aeea1c7f0..fc0b52ea5 100644 --- a/packages/botkit/tests/Dialog.tests.js +++ b/packages/botkit/tests/Dialog.tests.js @@ -226,6 +226,38 @@ describe('Botkit dialog', function() { assert(reply2 == null, 'wrong reply 2'); }); + 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 === 'got it.', 'wrong reply 2'); + }); + + it('should navigate threads', async function() { // test all the ways threads are triggered // convo.gotoThread inside an ask From 59760d201e2a04bee696034439f42a5f8df9baaa Mon Sep 17 00:00:00 2001 From: Ben Brown Date: Fri, 13 Mar 2020 11:09:59 -0500 Subject: [PATCH 26/32] Fixes #1932 - inserts a blank message after each prompt which allows the handlers to fire without interferring with the following message in the dialog --- packages/botkit/src/conversation.ts | 5 ++++- packages/botkit/tests/Dialog.tests.js | 19 +++++++++++++------ 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/packages/botkit/src/conversation.ts b/packages/botkit/src/conversation.ts index a2af229d3..f6af3b9b5 100644 --- a/packages/botkit/src/conversation.ts +++ b/packages/botkit/src/conversation.ts @@ -325,7 +325,7 @@ export class BotkitConversation extends Dialog { * handler: async(response_text, convo, bot, full_message) => { * return await convo.gotoThread('no_taco'); * } - * },s + * }, * { * default: true, * handler: async(response_text, convo, bot, full_message) => { @@ -394,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; } diff --git a/packages/botkit/tests/Dialog.tests.js b/packages/botkit/tests/Dialog.tests.js index fc0b52ea5..5c68d9741 100644 --- a/packages/botkit/tests/Dialog.tests.js +++ b/packages/botkit/tests/Dialog.tests.js @@ -79,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}}'] } , [ { @@ -93,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(); } } @@ -120,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'); @@ -192,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() { @@ -223,7 +230,7 @@ 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() { @@ -254,7 +261,7 @@ describe('Botkit dialog', function() { assert(reply.text === 'ok you said black', 'wrong reply'); const reply2 = await client.getNextReply(); - assert(reply2 === 'got it.', 'wrong reply 2'); + assert(reply2.text === 'got it.', 'wrong reply 2 in beginDialog test'); }); From 87c0fec0df21edf91fdc4d997fe98639ed2ab3ee Mon Sep 17 00:00:00 2001 From: Ben Brown Date: Fri, 13 Mar 2020 15:03:07 -0500 Subject: [PATCH 27/32] add getActiveDialog() hasActiveDialog() and isDialogActive() --- packages/botkit/src/botworker.ts | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/packages/botkit/src/botworker.ts b/packages/botkit/src/botworker.ts index fb33c30e1..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) From bbe592e1dce2e4280d31eef5c1bae3603fc838c3 Mon Sep 17 00:00:00 2001 From: Ben Brown Date: Mon, 16 Mar 2020 11:40:16 -0500 Subject: [PATCH 28/32] update package version numbers --- packages/botbuilder-adapter-facebook/package.json | 4 ++-- packages/botbuilder-adapter-hangouts/package.json | 4 ++-- packages/botbuilder-adapter-slack/package.json | 2 +- packages/botbuilder-adapter-twilio-sms/package.json | 4 ++-- packages/botbuilder-adapter-web/package.json | 4 ++-- packages/botbuilder-adapter-webex/package.json | 4 ++-- packages/botkit-plugin-cms/package.json | 2 +- packages/botkit/package.json | 2 +- packages/generator-botkit/package.json | 2 +- 9 files changed, 14 insertions(+), 14 deletions(-) diff --git a/packages/botbuilder-adapter-facebook/package.json b/packages/botbuilder-adapter-facebook/package.json index 7af8b6226..5d146eb3b 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", @@ -35,7 +35,7 @@ }, "dependencies": { "botbuilder": "^4.7.1", - "botkit": "^4.6.2", + "botkit": "^4.8.0", "debug": "^4.1.0" }, "devDependencies": { diff --git a/packages/botbuilder-adapter-hangouts/package.json b/packages/botbuilder-adapter-hangouts/package.json index 17af9b66b..35655349d 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", @@ -36,7 +36,7 @@ "dependencies": { "botbuilder": "^4.7.1", "googleapis": "^34.0.0", - "botkit": "^4.6.2", + "botkit": "^4.8.0", "debug": "^4.1.0" }, "devDependencies": { diff --git a/packages/botbuilder-adapter-slack/package.json b/packages/botbuilder-adapter-slack/package.json index 93f7f2422..0cc0a9fbb 100644 --- a/packages/botbuilder-adapter-slack/package.json +++ b/packages/botbuilder-adapter-slack/package.json @@ -35,7 +35,7 @@ "dependencies": { "@slack/web-api": "^5.8.0", "botbuilder": "^4.7.1", - "botkit": "^4.6.2", + "botkit": "^4.8.0", "debug": "^4.1.0" }, "devDependencies": { diff --git a/packages/botbuilder-adapter-twilio-sms/package.json b/packages/botbuilder-adapter-twilio-sms/package.json index e2a234207..e05050606 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", @@ -38,7 +38,7 @@ }, "dependencies": { "botbuilder": "^4.7.1", - "botkit": "^4.6.2", + "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..ca427fc39 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,7 +35,7 @@ "url": "https://github.com/howdyai/botkit.git" }, "dependencies": { - "botkit": "^4.6.2", + "botkit": "^4.8.0", "botbuilder": "^4.7.1", "debug": "^4.1.0", "url": "^0.11.0", diff --git a/packages/botbuilder-adapter-webex/package.json b/packages/botbuilder-adapter-webex/package.json index 86acaacbd..849b91810 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.6", + "version": "1.0.7", "description": "Connect Botkit or BotBuilder to Webex Teams", "main": "./lib/index.js", "typings": "./lib/index.d.ts", @@ -34,7 +34,7 @@ }, "dependencies": { "botbuilder": "^4.7.1", - "botkit": "^4.6.2", + "botkit": "^4.8.0", "debug": "^4.1.0", "url": "^0.11.0", "webex": "^1.80.148" 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..aea61efb0 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", 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": [ From 5b5f3db6dd32d116a31ddb3cc18ce5a9ab7eeb24 Mon Sep 17 00:00:00 2001 From: Ben Brown Date: Tue, 17 Mar 2020 15:41:25 -0500 Subject: [PATCH 29/32] Update package versions for publishing --- changelog.md | 5 +++++ packages/botbuilder-adapter-facebook/package.json | 2 +- packages/botbuilder-adapter-hangouts/package.json | 2 +- packages/botbuilder-adapter-slack/package.json | 2 +- .../botbuilder-adapter-twilio-sms/package.json | 2 +- packages/botbuilder-adapter-web/package.json | 2 +- packages/botbuilder-adapter-webex/package.json | 2 +- packages/botkit/package.json | 14 +++++++------- packages/docs/platforms/slack.md | 11 +++++------ packages/docs/reference/web.md | 4 +--- 10 files changed, 24 insertions(+), 22 deletions(-) diff --git a/changelog.md b/changelog.md index 4d0948def..570f2ca7f 100644 --- a/changelog.md +++ b/changelog.md @@ -11,10 +11,15 @@ This allows developers to use payload values inside quick replies, button clicks * 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. * 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 diff --git a/packages/botbuilder-adapter-facebook/package.json b/packages/botbuilder-adapter-facebook/package.json index 5d146eb3b..5ce02e473 100644 --- a/packages/botbuilder-adapter-facebook/package.json +++ b/packages/botbuilder-adapter-facebook/package.json @@ -34,7 +34,7 @@ "url": "https://github.com/howdyai/botkit.git" }, "dependencies": { - "botbuilder": "^4.7.1", + "botbuilder": "^4.8.0", "botkit": "^4.8.0", "debug": "^4.1.0" }, diff --git a/packages/botbuilder-adapter-hangouts/package.json b/packages/botbuilder-adapter-hangouts/package.json index 35655349d..74605a593 100644 --- a/packages/botbuilder-adapter-hangouts/package.json +++ b/packages/botbuilder-adapter-hangouts/package.json @@ -34,7 +34,7 @@ "url": "https://github.com/howdyai/botkit.git" }, "dependencies": { - "botbuilder": "^4.7.1", + "botbuilder": "^4.8.0", "googleapis": "^34.0.0", "botkit": "^4.8.0", "debug": "^4.1.0" diff --git a/packages/botbuilder-adapter-slack/package.json b/packages/botbuilder-adapter-slack/package.json index 0cc0a9fbb..00a4ab08e 100644 --- a/packages/botbuilder-adapter-slack/package.json +++ b/packages/botbuilder-adapter-slack/package.json @@ -34,7 +34,7 @@ }, "dependencies": { "@slack/web-api": "^5.8.0", - "botbuilder": "^4.7.1", + "botbuilder": "^4.8.0", "botkit": "^4.8.0", "debug": "^4.1.0" }, diff --git a/packages/botbuilder-adapter-twilio-sms/package.json b/packages/botbuilder-adapter-twilio-sms/package.json index e05050606..49c08c732 100644 --- a/packages/botbuilder-adapter-twilio-sms/package.json +++ b/packages/botbuilder-adapter-twilio-sms/package.json @@ -37,7 +37,7 @@ "url": "https://github.com/howdyai/botkit.git" }, "dependencies": { - "botbuilder": "^4.7.1", + "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 ca427fc39..24138f016 100644 --- a/packages/botbuilder-adapter-web/package.json +++ b/packages/botbuilder-adapter-web/package.json @@ -36,7 +36,7 @@ }, "dependencies": { "botkit": "^4.8.0", - "botbuilder": "^4.7.1", + "botbuilder": "^4.8.0", "debug": "^4.1.0", "url": "^0.11.0", "ws": "^7.1.1" diff --git a/packages/botbuilder-adapter-webex/package.json b/packages/botbuilder-adapter-webex/package.json index 849b91810..9eb31d0c7 100644 --- a/packages/botbuilder-adapter-webex/package.json +++ b/packages/botbuilder-adapter-webex/package.json @@ -33,7 +33,7 @@ "url": "https://github.com/howdyai/botkit.git" }, "dependencies": { - "botbuilder": "^4.7.1", + "botbuilder": "^4.8.0", "botkit": "^4.8.0", "debug": "^4.1.0", "url": "^0.11.0", diff --git a/packages/botkit/package.json b/packages/botkit/package.json index aea61efb0..efe86d607 100644 --- a/packages/botkit/package.json +++ b/packages/botkit/package.json @@ -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/docs/platforms/slack.md b/packages/docs/platforms/slack.md index f0190d1a5..9f9b2c743 100644 --- a/packages/docs/platforms/slack.md +++ b/packages/docs/platforms/slack.md @@ -151,17 +151,16 @@ To use Slack's [newer "granular scopes"](https://api.slack.com/authentication/oa 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. -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) - 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`. -Take care to update your auth handler function when you migrate to granular scopes. +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 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 From 64390f45fe8082eec537f50bfd7577f003606ae0 Mon Sep 17 00:00:00 2001 From: Ben Brown Date: Tue, 17 Mar 2020 16:11:03 -0500 Subject: [PATCH 30/32] update docs --- packages/docs/index.json | 3592 ++++++++++++++++-------------- packages/docs/reference/core.md | 45 +- packages/docs/reference/slack.md | 12 +- 3 files changed, 2012 insertions(+), 1637 deletions(-) diff --git a/packages/docs/index.json b/packages/docs/index.json index 2233a8e18..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": 222, + "id": 229, "name": "addDialog", "kind": 2048, "kindString": "Method", @@ -406,7 +406,7 @@ }, "signatures": [ { - "id": 223, + "id": 230, "name": "addDialog", "kind": 4096, "kindString": "Call signature", @@ -419,7 +419,7 @@ }, "parameters": [ { - "id": 224, + "id": 231, "name": "dialog", "kind": 32768, "kindString": "Parameter", @@ -450,7 +450,7 @@ ] }, { - "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": 225, + "id": 232, "name": "afterDialog", "kind": 2048, "kindString": "Method", @@ -532,7 +532,7 @@ }, "signatures": [ { - "id": 226, + "id": 233, "name": "afterDialog", "kind": 4096, "kindString": "Call signature", @@ -545,7 +545,7 @@ }, "parameters": [ { - "id": 227, + "id": 234, "name": "dialog", "kind": 32768, "kindString": "Parameter", @@ -570,7 +570,7 @@ } }, { - "id": 228, + "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": 1189, + "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", @@ -850,238 +850,8 @@ "text": "For example:\n```javascript\n// listen for a simple keyword\ncontroller.hears('hello','message', async(bot, message) => {\n await bot.reply(message,'I heard you say hello.');\n});\n\n// listen for a regular expression\ncontroller.hears(new RegExp(/^[A-Z\\s]+$/), 'message', async(bot, message) => {\n await bot.reply(message,'I heard a message IN ALL CAPS.');\n});\n\n// listen using a function\ncontroller.hears(async (message) => { return (message.intent === 'hello') }, 'message', async(bot, message) => {\n await bot.reply(message,'This message matches the hello intent.');\n});\n```" }, "parameters": [ - { - "id": 182, - "name": "patterns", - "kind": 32768, - "kindString": "Parameter", - "flags": { - "isExported": true - }, - "comment": { - "text": "One or more string, regular expression, or test function" - }, - "type": { - "type": "union", - "types": [ - { - "type": "array", - "elementType": { - "type": "union", - "types": [ - { - "type": "intrinsic", - "name": "string" - }, - { - "type": "reference", - "name": "RegExp" - }, - { - "type": "reflection", - "declaration": { - "id": 183, - "name": "__type", - "kind": 65536, - "kindString": "Type literal", - "flags": { - "isExported": true - }, - "signatures": [ - { - "id": 184, - "name": "__call", - "kind": 4096, - "kindString": "Call signature", - "flags": { - "isExported": true - }, - "parameters": [ - { - "id": 185, - "name": "message", - "kind": 32768, - "kindString": "Parameter", - "flags": { - "isExported": true - }, - "type": { - "type": "reference", - "id": 86, - "name": "BotkitMessage" - } - } - ], - "type": { - "type": "reference", - "typeArguments": [ - { - "type": "intrinsic", - "name": "boolean" - } - ], - "name": "Promise" - } - } - ] - } - } - ] - } - }, - { - "type": "reference", - "name": "RegExp" - }, - { - "type": "intrinsic", - "name": "string" - }, - { - "type": "reflection", - "declaration": { - "id": 186, - "name": "__type", - "kind": 65536, - "kindString": "Type literal", - "flags": { - "isExported": true - }, - "signatures": [ - { - "id": 187, - "name": "__call", - "kind": 4096, - "kindString": "Call signature", - "flags": { - "isExported": true - }, - "parameters": [ - { - "id": 188, - "name": "message", - "kind": 32768, - "kindString": "Parameter", - "flags": { - "isExported": true - }, - "type": { - "type": "reference", - "id": 86, - "name": "BotkitMessage" - } - } - ], - "type": { - "type": "reference", - "typeArguments": [ - { - "type": "intrinsic", - "name": "boolean" - } - ], - "name": "Promise" - } - } - ], - "sources": [ - { - "fileName": "core.ts", - "line": 899, - "character": 115 - } - ] - } - } - ] - } - }, { "id": 189, - "name": "events", - "kind": 32768, - "kindString": "Parameter", - "flags": { - "isExported": true - }, - "comment": { - "text": "A list of event types that should be evaluated for the given patterns" - }, - "type": { - "type": "union", - "types": [ - { - "type": "intrinsic", - "name": "string" - }, - { - "type": "array", - "elementType": { - "type": "intrinsic", - "name": "string" - } - } - ] - } - }, - { - "id": 190, - "name": "handler", - "kind": 32768, - "kindString": "Parameter", - "flags": { - "isExported": true - }, - "comment": { - "text": "a function that will be called should the pattern be matched\n" - }, - "type": { - "type": "reference", - "id": 96, - "name": "BotkitHandler" - } - } - ], - "type": { - "type": "intrinsic", - "name": "void" - } - } - ], - "sources": [ - { - "fileName": "core.ts", - "line": 899, - "character": 16 - } - ] - }, - { - "id": 191, - "name": "interrupts", - "kind": 2048, - "kindString": "Method", - "flags": { - "isPublic": true, - "isExported": true, - "isExternal": true - }, - "signatures": [ - { - "id": 192, - "name": "interrupts", - "kind": 4096, - "kindString": "Call signature", - "flags": { - "isExported": true - }, - "comment": { - "shortText": "Instruct your bot to listen for a pattern, and do something when that pattern is heard.\nInterruptions work just like \"hears\" triggers, but fire _before_ the dialog system is engaged,\nand thus handlers will interrupt the normal flow of messages through the processing pipeline.", - "text": "```javascript\ncontroller.interrupts('help','message', async(bot, message) => {\n\n await bot.reply(message,'Before anything else, you need some help!')\n\n});\n```" - }, - "parameters": [ - { - "id": 193, "name": "patterns", "kind": 32768, "kindString": "Parameter", @@ -1110,7 +880,7 @@ { "type": "reflection", "declaration": { - "id": 194, + "id": 190, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -1119,7 +889,7 @@ }, "signatures": [ { - "id": 195, + "id": 191, "name": "__call", "kind": 4096, "kindString": "Call signature", @@ -1128,7 +898,7 @@ }, "parameters": [ { - "id": 196, + "id": 192, "name": "message", "kind": 32768, "kindString": "Parameter", @@ -1137,7 +907,7 @@ }, "type": { "type": "reference", - "id": 86, + "id": 93, "name": "BotkitMessage" } } @@ -1163,13 +933,6 @@ "type": "reference", "name": "RegExp" }, - { - "type": "array", - "elementType": { - "type": "reference", - "name": "RegExp" - } - }, { "type": "intrinsic", "name": "string" @@ -1177,7 +940,7 @@ { "type": "reflection", "declaration": { - "id": 197, + "id": 193, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -1186,7 +949,7 @@ }, "signatures": [ { - "id": 198, + "id": 194, "name": "__call", "kind": 4096, "kindString": "Call signature", @@ -1195,7 +958,7 @@ }, "parameters": [ { - "id": 199, + "id": 195, "name": "message", "kind": 32768, "kindString": "Parameter", @@ -1204,7 +967,244 @@ }, "type": { "type": "reference", - "id": 86, + "id": 93, + "name": "BotkitMessage" + } + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "intrinsic", + "name": "boolean" + } + ], + "name": "Promise" + } + } + ], + "sources": [ + { + "fileName": "core.ts", + "line": 899, + "character": 115 + } + ] + } + } + ] + } + }, + { + "id": 196, + "name": "events", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "isExported": true + }, + "comment": { + "text": "A list of event types that should be evaluated for the given patterns" + }, + "type": { + "type": "union", + "types": [ + { + "type": "intrinsic", + "name": "string" + }, + { + "type": "array", + "elementType": { + "type": "intrinsic", + "name": "string" + } + } + ] + } + }, + { + "id": 197, + "name": "handler", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "isExported": true + }, + "comment": { + "text": "a function that will be called should the pattern be matched\n" + }, + "type": { + "type": "reference", + "id": 103, + "name": "BotkitHandler" + } + } + ], + "type": { + "type": "intrinsic", + "name": "void" + } + } + ], + "sources": [ + { + "fileName": "core.ts", + "line": 899, + "character": 16 + } + ] + }, + { + "id": 198, + "name": "interrupts", + "kind": 2048, + "kindString": "Method", + "flags": { + "isPublic": true, + "isExported": true, + "isExternal": true + }, + "signatures": [ + { + "id": 199, + "name": "interrupts", + "kind": 4096, + "kindString": "Call signature", + "flags": { + "isExported": true + }, + "comment": { + "shortText": "Instruct your bot to listen for a pattern, and do something when that pattern is heard.\nInterruptions work just like \"hears\" triggers, but fire _before_ the dialog system is engaged,\nand thus handlers will interrupt the normal flow of messages through the processing pipeline.", + "text": "```javascript\ncontroller.interrupts('help','message', async(bot, message) => {\n\n await bot.reply(message,'Before anything else, you need some help!')\n\n});\n```" + }, + "parameters": [ + { + "id": 200, + "name": "patterns", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "isExported": true + }, + "comment": { + "text": "One or more string, regular expression, or test function" + }, + "type": { + "type": "union", + "types": [ + { + "type": "array", + "elementType": { + "type": "union", + "types": [ + { + "type": "intrinsic", + "name": "string" + }, + { + "type": "reference", + "name": "RegExp" + }, + { + "type": "reflection", + "declaration": { + "id": 201, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": { + "isExported": true + }, + "signatures": [ + { + "id": 202, + "name": "__call", + "kind": 4096, + "kindString": "Call signature", + "flags": { + "isExported": true + }, + "parameters": [ + { + "id": 203, + "name": "message", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "isExported": true + }, + "type": { + "type": "reference", + "id": 93, + "name": "BotkitMessage" + } + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "intrinsic", + "name": "boolean" + } + ], + "name": "Promise" + } + } + ] + } + } + ] + } + }, + { + "type": "reference", + "name": "RegExp" + }, + { + "type": "array", + "elementType": { + "type": "reference", + "name": "RegExp" + } + }, + { + "type": "intrinsic", + "name": "string" + }, + { + "type": "reflection", + "declaration": { + "id": 204, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": { + "isExported": true + }, + "signatures": [ + { + "id": 205, + "name": "__call", + "kind": 4096, + "kindString": "Call signature", + "flags": { + "isExported": true + }, + "parameters": [ + { + "id": 206, + "name": "message", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "isExported": true + }, + "type": { + "type": "reference", + "id": 93, "name": "BotkitMessage" } } @@ -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" } } @@ -1294,7 +1294,7 @@ ] }, { - "id": 215, + "id": 222, "name": "loadModule", "kind": 2048, "kindString": "Method", @@ -1305,7 +1305,7 @@ }, "signatures": [ { - "id": 216, + "id": 223, "name": "loadModule", "kind": 4096, "kindString": "Call signature", @@ -1317,7 +1317,7 @@ }, "parameters": [ { - "id": 217, + "id": 224, "name": "p", "kind": 32768, "kindString": "Parameter", @@ -1348,7 +1348,7 @@ ] }, { - "id": 218, + "id": 225, "name": "loadModules", "kind": 2048, "kindString": "Method", @@ -1359,7 +1359,7 @@ }, "signatures": [ { - "id": 219, + "id": 226, "name": "loadModules", "kind": 4096, "kindString": "Call signature", @@ -1372,7 +1372,7 @@ }, "parameters": [ { - "id": 220, + "id": 227, "name": "p", "kind": 32768, "kindString": "Parameter", @@ -1388,7 +1388,7 @@ } }, { - "id": 221, + "id": 228, "name": "exts", "kind": 32768, "kindString": "Parameter", @@ -1423,7 +1423,7 @@ ] }, { - "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" } } @@ -1507,7 +1507,7 @@ ] }, { - "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", @@ -1724,7 +1724,7 @@ ] }, { - "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", @@ -1807,7 +1807,7 @@ } }, { - "id": 214, + "id": 221, "name": "custom_adapter", "kind": 32768, "kindString": "Parameter", @@ -1843,7 +1843,7 @@ ] }, { - "id": 206, + "id": 213, "name": "trigger", "kind": 2048, "kindString": "Method", @@ -1854,7 +1854,7 @@ }, "signatures": [ { - "id": 207, + "id": 214, "name": "trigger", "kind": 4096, "kindString": "Call signature", @@ -1867,7 +1867,7 @@ }, "parameters": [ { - "id": 208, + "id": 215, "name": "event", "kind": 32768, "kindString": "Parameter", @@ -1883,7 +1883,7 @@ } }, { - "id": 209, + "id": 216, "name": "bot", "kind": 32768, "kindString": "Parameter", @@ -1901,7 +1901,7 @@ } }, { - "id": 210, + "id": 217, "name": "message", "kind": 32768, "kindString": "Parameter", @@ -1914,7 +1914,7 @@ }, "type": { "type": "reference", - "id": 86, + "id": 93, "name": "BotkitMessage" } } @@ -1940,7 +1940,7 @@ ] }, { - "id": 141, + "id": 148, "name": "usePlugin", "kind": 2048, "kindString": "Method", @@ -1951,7 +1951,7 @@ }, "signatures": [ { - "id": 142, + "id": 149, "name": "usePlugin", "kind": 4096, "kindString": "Call signature", @@ -1963,7 +1963,7 @@ }, "parameters": [ { - "id": 143, + "id": 150, "name": "plugin_or_function", "kind": 32768, "kindString": "Parameter", @@ -1979,7 +1979,7 @@ { "type": "reflection", "declaration": { - "id": 144, + "id": 151, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -1988,7 +1988,7 @@ }, "signatures": [ { - "id": 145, + "id": 152, "name": "__call", "kind": 4096, "kindString": "Call signature", @@ -1997,7 +1997,7 @@ }, "parameters": [ { - "id": 146, + "id": 153, "name": "botkit", "kind": 32768, "kindString": "Parameter", @@ -2006,14 +2006,14 @@ }, "type": { "type": "reference", - "id": 119, + "id": 126, "name": "Botkit" } } ], "type": { "type": "reference", - "id": 107, + "id": 114, "name": "BotkitPlugin" } } @@ -2029,7 +2029,7 @@ }, { "type": "reference", - "id": 107, + "id": 114, "name": "BotkitPlugin" } ] @@ -2051,7 +2051,7 @@ ] }, { - "id": 121, + "id": 128, "name": "middleware", "kind": 2097152, "kindString": "Object literal", @@ -2066,7 +2066,7 @@ }, "children": [ { - "id": 123, + "id": 130, "name": "ingest", "kind": 32, "kindString": "Variable", @@ -2088,7 +2088,7 @@ "defaultValue": "new Ware()" }, { - "id": 126, + "id": 133, "name": "interpret", "kind": 32, "kindString": "Variable", @@ -2110,7 +2110,7 @@ "defaultValue": "new Ware()" }, { - "id": 125, + "id": 132, "name": "receive", "kind": 32, "kindString": "Variable", @@ -2132,7 +2132,7 @@ "defaultValue": "new Ware()" }, { - "id": 124, + "id": 131, "name": "send", "kind": 32, "kindString": "Variable", @@ -2154,7 +2154,7 @@ "defaultValue": "new Ware()" }, { - "id": 122, + "id": 129, "name": "spawn", "kind": 32, "kindString": "Variable", @@ -2181,11 +2181,11 @@ "title": "Variables", "kind": 32, "children": [ - 123, - 126, - 125, - 124, - 122 + 130, + 133, + 132, + 131, + 129 ] } ], @@ -2207,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": [ - 163, + 170, + 229, + 154, + 232, + 173, + 145, + 167, + 181, + 187, + 198, 222, - 147, 225, - 166, - 138, - 160, - 174, - 180, - 191, - 215, + 209, + 163, + 176, + 184, + 143, 218, - 202, - 156, - 169, - 177, - 136, - 211, - 206, - 141 + 213, + 148 ] }, { "title": "Object literals", "kind": 2097152, "children": [ - 121 + 128 ] } ], @@ -2273,7 +2273,7 @@ ], "props": [ { - "id": 132, + "id": 139, "name": "PATH", "kind": 1024, "kindString": "Property", @@ -2298,7 +2298,7 @@ } }, { - "id": 130, + "id": 137, "name": "adapter", "kind": 1024, "kindString": "Property", @@ -2323,7 +2323,7 @@ } }, { - "id": 131, + "id": 138, "name": "dialogSet", "kind": 1024, "kindString": "Property", @@ -2348,7 +2348,7 @@ } }, { - "id": 129, + "id": 136, "name": "http", "kind": 1024, "kindString": "Property", @@ -2373,7 +2373,7 @@ } }, { - "id": 127, + "id": 134, "name": "storage", "kind": 1024, "kindString": "Property", @@ -2398,7 +2398,7 @@ } }, { - "id": 120, + "id": 127, "name": "version", "kind": 1024, "kindString": "Property", @@ -2424,7 +2424,7 @@ "defaultValue": "require('../package.json').version" }, { - "id": 128, + "id": 135, "name": "webserver", "kind": 1024, "kindString": "Property", @@ -2449,7 +2449,7 @@ } }, { - "id": 151, + "id": 158, "name": "plugins", "kind": 262144, "kindString": "Accessor", @@ -2463,7 +2463,7 @@ }, "getSignature": [ { - "id": 152, + "id": 159, "name": "__get", "kind": 524288, "kindString": "Get signature", @@ -2476,7 +2476,7 @@ "type": { "type": "reflection", "declaration": { - "id": 153, + "id": 160, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -2485,7 +2485,7 @@ }, "indexSignature": [ { - "id": 154, + "id": 161, "name": "__index", "kind": 8192, "kindString": "Index signature", @@ -2494,7 +2494,7 @@ }, "parameters": [ { - "id": 155, + "id": 162, "name": "key", "kind": 32768, "kindString": "Parameter", @@ -2535,7 +2535,7 @@ ], "methods": [ { - "id": 163, + "id": 170, "name": "addDep", "kind": 2048, "kindString": "Method", @@ -2546,7 +2546,7 @@ }, "signatures": [ { - "id": 164, + "id": 171, "name": "addDep", "kind": 4096, "kindString": "Call signature", @@ -2559,7 +2559,7 @@ }, "parameters": [ { - "id": 165, + "id": 172, "name": "name", "kind": 32768, "kindString": "Parameter", @@ -2590,7 +2590,7 @@ ] }, { - "id": 222, + "id": 229, "name": "addDialog", "kind": 2048, "kindString": "Method", @@ -2601,7 +2601,7 @@ }, "signatures": [ { - "id": 223, + "id": 230, "name": "addDialog", "kind": 4096, "kindString": "Call signature", @@ -2614,7 +2614,7 @@ }, "parameters": [ { - "id": 224, + "id": 231, "name": "dialog", "kind": 32768, "kindString": "Parameter", @@ -2645,7 +2645,7 @@ ] }, { - "id": 147, + "id": 154, "name": "addPluginExtension", "kind": 2048, "kindString": "Method", @@ -2656,7 +2656,7 @@ }, "signatures": [ { - "id": 148, + "id": 155, "name": "addPluginExtension", "kind": 4096, "kindString": "Call signature", @@ -2669,7 +2669,7 @@ }, "parameters": [ { - "id": 149, + "id": 156, "name": "name", "kind": 32768, "kindString": "Parameter", @@ -2685,7 +2685,7 @@ } }, { - "id": 150, + "id": 157, "name": "extension", "kind": 32768, "kindString": "Parameter", @@ -2716,7 +2716,7 @@ ] }, { - "id": 225, + "id": 232, "name": "afterDialog", "kind": 2048, "kindString": "Method", @@ -2727,7 +2727,7 @@ }, "signatures": [ { - "id": 226, + "id": 233, "name": "afterDialog", "kind": 4096, "kindString": "Call signature", @@ -2740,7 +2740,7 @@ }, "parameters": [ { - "id": 227, + "id": 234, "name": "dialog", "kind": 32768, "kindString": "Parameter", @@ -2765,7 +2765,7 @@ } }, { - "id": 228, + "id": 235, "name": "handler", "kind": 32768, "kindString": "Parameter", @@ -2777,7 +2777,7 @@ }, "type": { "type": "reference", - "id": 96, + "id": 103, "name": "BotkitHandler" } } @@ -2791,13 +2791,13 @@ "sources": [ { "fileName": "core.ts", - "line": 1189, + "line": 1188, "character": 22 } ] }, { - "id": 166, + "id": 173, "name": "completeDep", "kind": 2048, "kindString": "Method", @@ -2808,7 +2808,7 @@ }, "signatures": [ { - "id": 167, + "id": 174, "name": "completeDep", "kind": 4096, "kindString": "Call signature", @@ -2820,7 +2820,7 @@ }, "parameters": [ { - "id": 168, + "id": 175, "name": "name", "kind": 32768, "kindString": "Parameter", @@ -2851,7 +2851,7 @@ ] }, { - "id": 138, + "id": 145, "name": "getConfig", "kind": 2048, "kindString": "Method", @@ -2862,7 +2862,7 @@ }, "signatures": [ { - "id": 139, + "id": 146, "name": "getConfig", "kind": 4096, "kindString": "Call signature", @@ -2876,7 +2876,7 @@ }, "parameters": [ { - "id": 140, + "id": 147, "name": "key", "kind": 32768, "kindString": "Parameter", @@ -2908,7 +2908,7 @@ ] }, { - "id": 160, + "id": 167, "name": "getLocalView", "kind": 2048, "kindString": "Method", @@ -2919,7 +2919,7 @@ }, "signatures": [ { - "id": 161, + "id": 168, "name": "getLocalView", "kind": 4096, "kindString": "Call signature", @@ -2931,7 +2931,7 @@ }, "parameters": [ { - "id": 162, + "id": 169, "name": "path_to_view", "kind": 32768, "kindString": "Parameter", @@ -2962,7 +2962,7 @@ ] }, { - "id": 174, + "id": 181, "name": "handleTurn", "kind": 2048, "kindString": "Method", @@ -2973,7 +2973,7 @@ }, "signatures": [ { - "id": 175, + "id": 182, "name": "handleTurn", "kind": 4096, "kindString": "Call signature", @@ -2985,7 +2985,7 @@ }, "parameters": [ { - "id": 176, + "id": 183, "name": "turnContext", "kind": 32768, "kindString": "Parameter", @@ -3022,7 +3022,7 @@ ] }, { - "id": 180, + "id": 187, "name": "hears", "kind": 2048, "kindString": "Method", @@ -3033,7 +3033,7 @@ }, "signatures": [ { - "id": 181, + "id": 188, "name": "hears", "kind": 4096, "kindString": "Call signature", @@ -3046,7 +3046,7 @@ }, "parameters": [ { - "id": 182, + "id": 189, "name": "patterns", "kind": 32768, "kindString": "Parameter", @@ -3075,7 +3075,7 @@ { "type": "reflection", "declaration": { - "id": 183, + "id": 190, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -3084,7 +3084,7 @@ }, "signatures": [ { - "id": 184, + "id": 191, "name": "__call", "kind": 4096, "kindString": "Call signature", @@ -3093,7 +3093,7 @@ }, "parameters": [ { - "id": 185, + "id": 192, "name": "message", "kind": 32768, "kindString": "Parameter", @@ -3102,7 +3102,7 @@ }, "type": { "type": "reference", - "id": 86, + "id": 93, "name": "BotkitMessage" } } @@ -3135,7 +3135,7 @@ { "type": "reflection", "declaration": { - "id": 186, + "id": 193, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -3144,7 +3144,7 @@ }, "signatures": [ { - "id": 187, + "id": 194, "name": "__call", "kind": 4096, "kindString": "Call signature", @@ -3153,7 +3153,7 @@ }, "parameters": [ { - "id": 188, + "id": 195, "name": "message", "kind": 32768, "kindString": "Parameter", @@ -3162,7 +3162,7 @@ }, "type": { "type": "reference", - "id": 86, + "id": 93, "name": "BotkitMessage" } } @@ -3192,7 +3192,7 @@ } }, { - "id": 189, + "id": 196, "name": "events", "kind": 32768, "kindString": "Parameter", @@ -3220,7 +3220,7 @@ } }, { - "id": 190, + "id": 197, "name": "handler", "kind": 32768, "kindString": "Parameter", @@ -3232,7 +3232,7 @@ }, "type": { "type": "reference", - "id": 96, + "id": 103, "name": "BotkitHandler" } } @@ -3252,7 +3252,7 @@ ] }, { - "id": 191, + "id": 198, "name": "interrupts", "kind": 2048, "kindString": "Method", @@ -3263,7 +3263,7 @@ }, "signatures": [ { - "id": 192, + "id": 199, "name": "interrupts", "kind": 4096, "kindString": "Call signature", @@ -3276,7 +3276,7 @@ }, "parameters": [ { - "id": 193, + "id": 200, "name": "patterns", "kind": 32768, "kindString": "Parameter", @@ -3305,7 +3305,7 @@ { "type": "reflection", "declaration": { - "id": 194, + "id": 201, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -3314,7 +3314,7 @@ }, "signatures": [ { - "id": 195, + "id": 202, "name": "__call", "kind": 4096, "kindString": "Call signature", @@ -3323,7 +3323,7 @@ }, "parameters": [ { - "id": 196, + "id": 203, "name": "message", "kind": 32768, "kindString": "Parameter", @@ -3332,7 +3332,7 @@ }, "type": { "type": "reference", - "id": 86, + "id": 93, "name": "BotkitMessage" } } @@ -3372,7 +3372,7 @@ { "type": "reflection", "declaration": { - "id": 197, + "id": 204, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -3381,7 +3381,7 @@ }, "signatures": [ { - "id": 198, + "id": 205, "name": "__call", "kind": 4096, "kindString": "Call signature", @@ -3390,7 +3390,7 @@ }, "parameters": [ { - "id": 199, + "id": 206, "name": "message", "kind": 32768, "kindString": "Parameter", @@ -3399,7 +3399,7 @@ }, "type": { "type": "reference", - "id": 86, + "id": 93, "name": "BotkitMessage" } } @@ -3429,7 +3429,7 @@ } }, { - "id": 200, + "id": 207, "name": "events", "kind": 32768, "kindString": "Parameter", @@ -3457,7 +3457,7 @@ } }, { - "id": 201, + "id": 208, "name": "handler", "kind": 32768, "kindString": "Parameter", @@ -3469,7 +3469,7 @@ }, "type": { "type": "reference", - "id": 96, + "id": 103, "name": "BotkitHandler" } } @@ -3489,7 +3489,7 @@ ] }, { - "id": 215, + "id": 222, "name": "loadModule", "kind": 2048, "kindString": "Method", @@ -3500,7 +3500,7 @@ }, "signatures": [ { - "id": 216, + "id": 223, "name": "loadModule", "kind": 4096, "kindString": "Call signature", @@ -3512,7 +3512,7 @@ }, "parameters": [ { - "id": 217, + "id": 224, "name": "p", "kind": 32768, "kindString": "Parameter", @@ -3543,7 +3543,7 @@ ] }, { - "id": 218, + "id": 225, "name": "loadModules", "kind": 2048, "kindString": "Method", @@ -3554,7 +3554,7 @@ }, "signatures": [ { - "id": 219, + "id": 226, "name": "loadModules", "kind": 4096, "kindString": "Call signature", @@ -3567,7 +3567,7 @@ }, "parameters": [ { - "id": 220, + "id": 227, "name": "p", "kind": 32768, "kindString": "Parameter", @@ -3583,7 +3583,7 @@ } }, { - "id": 221, + "id": 228, "name": "exts", "kind": 32768, "kindString": "Parameter", @@ -3618,7 +3618,7 @@ ] }, { - "id": 202, + "id": 209, "name": "on", "kind": 2048, "kindString": "Method", @@ -3629,7 +3629,7 @@ }, "signatures": [ { - "id": 203, + "id": 210, "name": "on", "kind": 4096, "kindString": "Call signature", @@ -3642,7 +3642,7 @@ }, "parameters": [ { - "id": 204, + "id": 211, "name": "events", "kind": 32768, "kindString": "Parameter", @@ -3670,7 +3670,7 @@ } }, { - "id": 205, + "id": 212, "name": "handler", "kind": 32768, "kindString": "Parameter", @@ -3682,7 +3682,7 @@ }, "type": { "type": "reference", - "id": 96, + "id": 103, "name": "BotkitHandler" } } @@ -3702,7 +3702,7 @@ ] }, { - "id": 156, + "id": 163, "name": "publicFolder", "kind": 2048, "kindString": "Method", @@ -3713,7 +3713,7 @@ }, "signatures": [ { - "id": 157, + "id": 164, "name": "publicFolder", "kind": 4096, "kindString": "Call signature", @@ -3726,7 +3726,7 @@ }, "parameters": [ { - "id": 158, + "id": 165, "name": "alias", "kind": 32768, "kindString": "Parameter", @@ -3742,7 +3742,7 @@ } }, { - "id": 159, + "id": 166, "name": "path", "kind": 32768, "kindString": "Parameter", @@ -3773,7 +3773,7 @@ ] }, { - "id": 169, + "id": 176, "name": "ready", "kind": 2048, "kindString": "Method", @@ -3784,7 +3784,7 @@ }, "signatures": [ { - "id": 170, + "id": 177, "name": "ready", "kind": 4096, "kindString": "Call signature", @@ -3797,7 +3797,7 @@ }, "parameters": [ { - "id": 171, + "id": 178, "name": "handler", "kind": 32768, "kindString": "Parameter", @@ -3810,7 +3810,7 @@ "type": { "type": "reflection", "declaration": { - "id": 172, + "id": 179, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -3819,7 +3819,7 @@ }, "signatures": [ { - "id": 173, + "id": 180, "name": "__call", "kind": 4096, "kindString": "Call signature", @@ -3858,7 +3858,7 @@ ] }, { - "id": 177, + "id": 184, "name": "saveState", "kind": 2048, "kindString": "Method", @@ -3869,7 +3869,7 @@ }, "signatures": [ { - "id": 178, + "id": 185, "name": "saveState", "kind": 4096, "kindString": "Call signature", @@ -3881,7 +3881,7 @@ }, "parameters": [ { - "id": 179, + "id": 186, "name": "bot", "kind": 32768, "kindString": "Parameter", @@ -3919,7 +3919,7 @@ ] }, { - "id": 136, + "id": 143, "name": "shutdown", "kind": 2048, "kindString": "Method", @@ -3930,7 +3930,7 @@ }, "signatures": [ { - "id": 137, + "id": 144, "name": "shutdown", "kind": 4096, "kindString": "Call signature", @@ -3962,7 +3962,7 @@ ] }, { - "id": 211, + "id": 218, "name": "spawn", "kind": 2048, "kindString": "Method", @@ -3973,7 +3973,7 @@ }, "signatures": [ { - "id": 212, + "id": 219, "name": "spawn", "kind": 4096, "kindString": "Call signature", @@ -3985,7 +3985,7 @@ }, "parameters": [ { - "id": 213, + "id": 220, "name": "config", "kind": 32768, "kindString": "Parameter", @@ -4002,7 +4002,7 @@ } }, { - "id": 214, + "id": 221, "name": "custom_adapter", "kind": 32768, "kindString": "Parameter", @@ -4038,7 +4038,7 @@ ] }, { - "id": 206, + "id": 213, "name": "trigger", "kind": 2048, "kindString": "Method", @@ -4049,7 +4049,7 @@ }, "signatures": [ { - "id": 207, + "id": 214, "name": "trigger", "kind": 4096, "kindString": "Call signature", @@ -4062,7 +4062,7 @@ }, "parameters": [ { - "id": 208, + "id": 215, "name": "event", "kind": 32768, "kindString": "Parameter", @@ -4078,7 +4078,7 @@ } }, { - "id": 209, + "id": 216, "name": "bot", "kind": 32768, "kindString": "Parameter", @@ -4096,7 +4096,7 @@ } }, { - "id": 210, + "id": 217, "name": "message", "kind": 32768, "kindString": "Parameter", @@ -4109,7 +4109,7 @@ }, "type": { "type": "reference", - "id": 86, + "id": 93, "name": "BotkitMessage" } } @@ -4135,7 +4135,7 @@ ] }, { - "id": 141, + "id": 148, "name": "usePlugin", "kind": 2048, "kindString": "Method", @@ -4146,7 +4146,7 @@ }, "signatures": [ { - "id": 142, + "id": 149, "name": "usePlugin", "kind": 4096, "kindString": "Call signature", @@ -4158,7 +4158,7 @@ }, "parameters": [ { - "id": 143, + "id": 150, "name": "plugin_or_function", "kind": 32768, "kindString": "Parameter", @@ -4174,7 +4174,7 @@ { "type": "reflection", "declaration": { - "id": 144, + "id": 151, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -4183,7 +4183,7 @@ }, "signatures": [ { - "id": 145, + "id": 152, "name": "__call", "kind": 4096, "kindString": "Call signature", @@ -4192,7 +4192,7 @@ }, "parameters": [ { - "id": 146, + "id": 153, "name": "botkit", "kind": 32768, "kindString": "Parameter", @@ -4201,14 +4201,14 @@ }, "type": { "type": "reference", - "id": 119, + "id": 126, "name": "Botkit" } } ], "type": { "type": "reference", - "id": 107, + "id": 114, "name": "BotkitPlugin" } } @@ -4224,7 +4224,7 @@ }, { "type": "reference", - "id": 107, + "id": 114, "name": "BotkitPlugin" } ] @@ -4248,7 +4248,7 @@ ], "constructors": [ { - "id": 133, + "id": 140, "name": "constructor", "kind": 512, "kindString": "Constructor", @@ -4263,7 +4263,7 @@ }, "signatures": [ { - "id": 134, + "id": 141, "name": "new Botkit", "kind": 16384, "kindString": "Constructor signature", @@ -4276,7 +4276,7 @@ }, "parameters": [ { - "id": 135, + "id": 142, "name": "config", "kind": 32768, "kindString": "Parameter", @@ -4288,14 +4288,14 @@ }, "type": { "type": "reference", - "id": 73, + "id": 80, "name": "BotkitConfiguration" } } ], "type": { "type": "reference", - "id": 119, + "id": 126, "name": "Botkit" } } @@ -4775,7 +4775,7 @@ }, "type": { "type": "reference", - "id": 119, + "id": 126, "name": "Botkit" } }, @@ -4838,7 +4838,7 @@ }, "type": { "type": "reference", - "id": 119, + "id": 126, "name": "Botkit" } } @@ -4972,7 +4972,7 @@ ] }, { - "id": 52, + "id": 59, "name": "changeContext", "kind": 2048, "kindString": "Method", @@ -4983,7 +4983,7 @@ }, "signatures": [ { - "id": 53, + "id": 60, "name": "changeContext", "kind": 4096, "kindString": "Call signature", @@ -4996,7 +4996,7 @@ }, "parameters": [ { - "id": 54, + "id": 61, "name": "reference", "kind": 32768, "kindString": "Parameter", @@ -5034,13 +5034,13 @@ "sources": [ { "fileName": "botworker.ts", - "line": 222, + "line": 250, "character": 30 } ] }, { - "id": 58, + "id": 65, "name": "ensureMessageFormat", "kind": 2048, "kindString": "Method", @@ -5051,7 +5051,7 @@ }, "signatures": [ { - "id": 59, + "id": 66, "name": "ensureMessageFormat", "kind": 4096, "kindString": "Call signature", @@ -5070,7 +5070,7 @@ }, "parameters": [ { - "id": 60, + "id": 67, "name": "message", "kind": 32768, "kindString": "Parameter", @@ -5085,7 +5085,7 @@ "typeArguments": [ { "type": "reference", - "id": 86, + "id": 93, "name": "BotkitMessage" } ], @@ -5114,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", @@ -5177,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", @@ -5188,7 +5271,7 @@ }, "signatures": [ { - "id": 65, + "id": 72, "name": "httpBody", "kind": 4096, "kindString": "Call signature", @@ -5201,7 +5284,7 @@ }, "parameters": [ { - "id": 66, + "id": 73, "name": "body", "kind": 32768, "kindString": "Parameter", @@ -5226,13 +5309,13 @@ "sources": [ { "fileName": "botworker.ts", - "line": 402, + "line": 432, "character": 19 } ] }, { - "id": 61, + "id": 68, "name": "httpStatus", "kind": 2048, "kindString": "Method", @@ -5243,7 +5326,7 @@ }, "signatures": [ { - "id": 62, + "id": 69, "name": "httpStatus", "kind": 4096, "kindString": "Call signature", @@ -5256,7 +5339,7 @@ }, "parameters": [ { - "id": 63, + "id": 70, "name": "status", "kind": 32768, "kindString": "Parameter", @@ -5281,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", @@ -5298,7 +5436,7 @@ }, "signatures": [ { - "id": 49, + "id": 56, "name": "replaceDialog", "kind": 4096, "kindString": "Call signature", @@ -5311,7 +5449,7 @@ }, "parameters": [ { - "id": 50, + "id": 57, "name": "id", "kind": 32768, "kindString": "Parameter", @@ -5327,7 +5465,7 @@ } }, { - "id": 51, + "id": 58, "name": "options", "kind": 32768, "kindString": "Parameter", @@ -5359,7 +5497,7 @@ "sources": [ { "fileName": "botworker.ts", - "line": 190, + "line": 218, "character": 30 } ] @@ -5405,7 +5543,7 @@ "typeArguments": [ { "type": "reference", - "id": 86, + "id": 93, "name": "BotkitMessage" } ], @@ -5431,7 +5569,7 @@ "typeArguments": [ { "type": "reference", - "id": 86, + "id": 93, "name": "BotkitMessage" } ], @@ -5509,7 +5647,7 @@ "typeArguments": [ { "type": "reference", - "id": 86, + "id": 93, "name": "BotkitMessage" } ], @@ -5544,7 +5682,7 @@ ] }, { - "id": 55, + "id": 62, "name": "startConversationWithUser", "kind": 2048, "kindString": "Method", @@ -5555,7 +5693,7 @@ }, "signatures": [ { - "id": 56, + "id": 63, "name": "startConversationWithUser", "kind": 4096, "kindString": "Call signature", @@ -5564,7 +5702,7 @@ }, "parameters": [ { - "id": 57, + "id": 64, "name": "reference", "kind": 32768, "kindString": "Parameter", @@ -5592,7 +5730,7 @@ "sources": [ { "fileName": "botworker.ts", - "line": 246, + "line": 274, "character": 42 } ] @@ -5619,15 +5757,18 @@ "children": [ 42, 46, - 52, - 58, - 32, - 64, - 61, + 59, + 65, 48, + 32, + 50, + 71, + 68, + 52, + 55, 38, 35, - 55 + 62 ] } ], @@ -5666,7 +5807,7 @@ }, "type": { "type": "reference", - "id": 119, + "id": 126, "name": "Botkit" } } @@ -5802,7 +5943,7 @@ ] }, { - "id": 52, + "id": 59, "name": "changeContext", "kind": 2048, "kindString": "Method", @@ -5813,7 +5954,7 @@ }, "signatures": [ { - "id": 53, + "id": 60, "name": "changeContext", "kind": 4096, "kindString": "Call signature", @@ -5826,7 +5967,7 @@ }, "parameters": [ { - "id": 54, + "id": 61, "name": "reference", "kind": 32768, "kindString": "Parameter", @@ -5864,13 +6005,13 @@ "sources": [ { "fileName": "botworker.ts", - "line": 222, + "line": 250, "character": 30 } ] }, { - "id": 58, + "id": 65, "name": "ensureMessageFormat", "kind": 2048, "kindString": "Method", @@ -5881,7 +6022,7 @@ }, "signatures": [ { - "id": 59, + "id": 66, "name": "ensureMessageFormat", "kind": 4096, "kindString": "Call signature", @@ -5900,7 +6041,7 @@ }, "parameters": [ { - "id": 60, + "id": 67, "name": "message", "kind": 32768, "kindString": "Parameter", @@ -5915,7 +6056,7 @@ "typeArguments": [ { "type": "reference", - "id": 86, + "id": 93, "name": "BotkitMessage" } ], @@ -5944,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", @@ -6007,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", @@ -6018,7 +6242,7 @@ }, "signatures": [ { - "id": 65, + "id": 72, "name": "httpBody", "kind": 4096, "kindString": "Call signature", @@ -6031,7 +6255,7 @@ }, "parameters": [ { - "id": 66, + "id": 73, "name": "body", "kind": 32768, "kindString": "Parameter", @@ -6056,13 +6280,13 @@ "sources": [ { "fileName": "botworker.ts", - "line": 402, + "line": 432, "character": 19 } ] }, { - "id": 61, + "id": 68, "name": "httpStatus", "kind": 2048, "kindString": "Method", @@ -6073,7 +6297,7 @@ }, "signatures": [ { - "id": 62, + "id": 69, "name": "httpStatus", "kind": 4096, "kindString": "Call signature", @@ -6086,7 +6310,7 @@ }, "parameters": [ { - "id": 63, + "id": 70, "name": "status", "kind": 32768, "kindString": "Parameter", @@ -6111,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", @@ -6128,7 +6407,7 @@ }, "signatures": [ { - "id": 49, + "id": 56, "name": "replaceDialog", "kind": 4096, "kindString": "Call signature", @@ -6141,7 +6420,7 @@ }, "parameters": [ { - "id": 50, + "id": 57, "name": "id", "kind": 32768, "kindString": "Parameter", @@ -6157,7 +6436,7 @@ } }, { - "id": 51, + "id": 58, "name": "options", "kind": 32768, "kindString": "Parameter", @@ -6189,7 +6468,7 @@ "sources": [ { "fileName": "botworker.ts", - "line": 190, + "line": 218, "character": 30 } ] @@ -6235,7 +6514,7 @@ "typeArguments": [ { "type": "reference", - "id": 86, + "id": 93, "name": "BotkitMessage" } ], @@ -6261,7 +6540,7 @@ "typeArguments": [ { "type": "reference", - "id": 86, + "id": 93, "name": "BotkitMessage" } ], @@ -6339,7 +6618,7 @@ "typeArguments": [ { "type": "reference", - "id": 86, + "id": 93, "name": "BotkitMessage" } ], @@ -6374,7 +6653,7 @@ ] }, { - "id": 55, + "id": 62, "name": "startConversationWithUser", "kind": 2048, "kindString": "Method", @@ -6385,7 +6664,7 @@ }, "signatures": [ { - "id": 56, + "id": 63, "name": "startConversationWithUser", "kind": 4096, "kindString": "Call signature", @@ -6394,7 +6673,7 @@ }, "parameters": [ { - "id": 57, + "id": 64, "name": "reference", "kind": 32768, "kindString": "Parameter", @@ -6422,7 +6701,7 @@ "sources": [ { "fileName": "botworker.ts", - "line": 246, + "line": 274, "character": 42 } ] @@ -6468,7 +6747,7 @@ }, "type": { "type": "reference", - "id": 119, + "id": 126, "name": "Botkit" } }, @@ -6507,7 +6786,7 @@ ] }, { - "id": 313, + "id": 320, "name": "BotkitConversation", "kind": 128, "kindString": "Class", @@ -6521,7 +6800,7 @@ }, "typeParameter": [ { - "id": 314, + "id": 321, "name": "O", "kind": 131072, "kindString": "Type parameter", @@ -6536,7 +6815,7 @@ ], "children": [ { - "id": 316, + "id": 323, "name": "constructor", "kind": 512, "kindString": "Constructor", @@ -6550,7 +6829,7 @@ }, "signatures": [ { - "id": 317, + "id": 324, "name": "new BotkitConversation", "kind": 16384, "kindString": "Constructor signature", @@ -6562,7 +6841,7 @@ }, "parameters": [ { - "id": 318, + "id": 325, "name": "dialogId", "kind": 32768, "kindString": "Parameter", @@ -6578,7 +6857,7 @@ } }, { - "id": 319, + "id": 326, "name": "controller", "kind": 32768, "kindString": "Parameter", @@ -6590,14 +6869,14 @@ }, "type": { "type": "reference", - "id": 119, + "id": 126, "name": "Botkit" } } ], "type": { "type": "reference", - "id": 313, + "id": 320, "name": "BotkitConversation" } } @@ -6611,7 +6890,7 @@ ] }, { - "id": 315, + "id": 322, "name": "script", "kind": 1024, "kindString": "Property", @@ -6636,7 +6915,7 @@ } }, { - "id": 323, + "id": 330, "name": "addAction", "kind": 2048, "kindString": "Method", @@ -6647,7 +6926,7 @@ }, "signatures": [ { - "id": 324, + "id": 331, "name": "addAction", "kind": 4096, "kindString": "Call signature", @@ -6660,7 +6939,7 @@ }, "parameters": [ { - "id": 325, + "id": 332, "name": "action", "kind": 32768, "kindString": "Parameter", @@ -6676,7 +6955,7 @@ } }, { - "id": 326, + "id": 333, "name": "thread_name", "kind": 32768, "kindString": "Parameter", @@ -6695,7 +6974,7 @@ ], "type": { "type": "reference", - "id": 313, + "id": 320, "name": "BotkitConversation" } } @@ -6709,7 +6988,7 @@ ] }, { - "id": 327, + "id": 334, "name": "addChildDialog", "kind": 2048, "kindString": "Method", @@ -6720,7 +6999,7 @@ }, "signatures": [ { - "id": 328, + "id": 335, "name": "addChildDialog", "kind": 4096, "kindString": "Call signature", @@ -6733,7 +7012,7 @@ }, "parameters": [ { - "id": 329, + "id": 336, "name": "dialog_id", "kind": 32768, "kindString": "Parameter", @@ -6749,7 +7028,7 @@ } }, { - "id": 330, + "id": 337, "name": "key_name", "kind": 32768, "kindString": "Parameter", @@ -6766,7 +7045,7 @@ } }, { - "id": 331, + "id": 338, "name": "thread_name", "kind": 32768, "kindString": "Parameter", @@ -6785,7 +7064,7 @@ ], "type": { "type": "reference", - "id": 313, + "id": 320, "name": "BotkitConversation" } } @@ -6799,7 +7078,7 @@ ] }, { - "id": 332, + "id": 339, "name": "addGotoDialog", "kind": 2048, "kindString": "Method", @@ -6810,7 +7089,7 @@ }, "signatures": [ { - "id": 333, + "id": 340, "name": "addGotoDialog", "kind": 4096, "kindString": "Call signature", @@ -6823,7 +7102,7 @@ }, "parameters": [ { - "id": 334, + "id": 341, "name": "dialog_id", "kind": 32768, "kindString": "Parameter", @@ -6839,7 +7118,7 @@ } }, { - "id": 335, + "id": 342, "name": "thread_name", "kind": 32768, "kindString": "Parameter", @@ -6858,7 +7137,7 @@ ], "type": { "type": "reference", - "id": 313, + "id": 320, "name": "BotkitConversation" } } @@ -6872,7 +7151,7 @@ ] }, { - "id": 336, + "id": 343, "name": "addMessage", "kind": 2048, "kindString": "Method", @@ -6883,7 +7162,7 @@ }, "signatures": [ { - "id": 337, + "id": 344, "name": "addMessage", "kind": 4096, "kindString": "Call signature", @@ -6896,7 +7175,7 @@ }, "parameters": [ { - "id": 338, + "id": 345, "name": "message", "kind": 32768, "kindString": "Parameter", @@ -6914,7 +7193,7 @@ "typeArguments": [ { "type": "reference", - "id": 263, + "id": 270, "name": "BotkitMessageTemplate" } ], @@ -6928,7 +7207,7 @@ } }, { - "id": 339, + "id": 346, "name": "thread_name", "kind": 32768, "kindString": "Parameter", @@ -6946,7 +7225,7 @@ ], "type": { "type": "reference", - "id": 313, + "id": 320, "name": "BotkitConversation" } } @@ -6960,7 +7239,7 @@ ] }, { - "id": 347, + "id": 354, "name": "addQuestion", "kind": 2048, "kindString": "Method", @@ -6971,7 +7250,7 @@ }, "signatures": [ { - "id": 348, + "id": 355, "name": "addQuestion", "kind": 4096, "kindString": "Call signature", @@ -6984,7 +7263,7 @@ }, "parameters": [ { - "id": 349, + "id": 356, "name": "message", "kind": 32768, "kindString": "Parameter", @@ -7002,7 +7281,7 @@ "typeArguments": [ { "type": "reference", - "id": 263, + "id": 270, "name": "BotkitMessageTemplate" } ], @@ -7016,7 +7295,7 @@ } }, { - "id": 350, + "id": 357, "name": "handlers", "kind": 32768, "kindString": "Parameter", @@ -7031,14 +7310,14 @@ "types": [ { "type": "reference", - "id": 252, + "id": 259, "name": "BotkitConvoHandler" }, { "type": "array", "elementType": { "type": "reference", - "id": 258, + "id": 265, "name": "BotkitConvoTrigger" } } @@ -7046,7 +7325,7 @@ } }, { - "id": 351, + "id": 358, "name": "key", "kind": 32768, "kindString": "Parameter", @@ -7062,7 +7341,7 @@ { "type": "reflection", "declaration": { - "id": 352, + "id": 359, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -7071,7 +7350,7 @@ }, "children": [ { - "id": 353, + "id": 360, "name": "key", "kind": 32, "kindString": "Variable", @@ -7097,7 +7376,7 @@ "title": "Variables", "kind": 32, "children": [ - 353 + 360 ] } ], @@ -7122,7 +7401,7 @@ } }, { - "id": 354, + "id": 361, "name": "thread_name", "kind": 32768, "kindString": "Parameter", @@ -7140,7 +7419,7 @@ ], "type": { "type": "reference", - "id": 313, + "id": 320, "name": "BotkitConversation" } } @@ -7154,7 +7433,7 @@ ] }, { - "id": 363, + "id": 370, "name": "after", "kind": 2048, "kindString": "Method", @@ -7165,7 +7444,7 @@ }, "signatures": [ { - "id": 364, + "id": 371, "name": "after", "kind": 4096, "kindString": "Call signature", @@ -7178,7 +7457,7 @@ }, "parameters": [ { - "id": 365, + "id": 372, "name": "handler", "kind": 32768, "kindString": "Parameter", @@ -7191,7 +7470,7 @@ "type": { "type": "reflection", "declaration": { - "id": 366, + "id": 373, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -7200,7 +7479,7 @@ }, "signatures": [ { - "id": 367, + "id": 374, "name": "__call", "kind": 4096, "kindString": "Call signature", @@ -7209,7 +7488,7 @@ }, "parameters": [ { - "id": 368, + "id": 375, "name": "results", "kind": 32768, "kindString": "Parameter", @@ -7222,7 +7501,7 @@ } }, { - "id": 369, + "id": 376, "name": "bot", "kind": 32768, "kindString": "Parameter", @@ -7245,7 +7524,7 @@ "sources": [ { "fileName": "conversation.ts", - "line": 468, + "line": 471, "character": 25 } ] @@ -7262,13 +7541,13 @@ "sources": [ { "fileName": "conversation.ts", - "line": 468, + "line": 471, "character": 16 } ] }, { - "id": 340, + "id": 347, "name": "ask", "kind": 2048, "kindString": "Method", @@ -7279,7 +7558,7 @@ }, "signatures": [ { - "id": 341, + "id": 348, "name": "ask", "kind": 4096, "kindString": "Call signature", @@ -7288,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, 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 },s\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" + "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": 342, + "id": 349, "name": "message", "kind": 32768, "kindString": "Parameter", @@ -7310,7 +7589,7 @@ "typeArguments": [ { "type": "reference", - "id": 263, + "id": 270, "name": "BotkitMessageTemplate" } ], @@ -7324,7 +7603,7 @@ } }, { - "id": 343, + "id": 350, "name": "handlers", "kind": 32768, "kindString": "Parameter", @@ -7339,14 +7618,14 @@ "types": [ { "type": "reference", - "id": 252, + "id": 259, "name": "BotkitConvoHandler" }, { "type": "array", "elementType": { "type": "reference", - "id": 258, + "id": 265, "name": "BotkitConvoTrigger" } } @@ -7354,7 +7633,7 @@ } }, { - "id": 344, + "id": 351, "name": "key", "kind": 32768, "kindString": "Parameter", @@ -7370,7 +7649,7 @@ { "type": "reflection", "declaration": { - "id": 345, + "id": 352, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -7379,7 +7658,7 @@ }, "children": [ { - "id": 346, + "id": 353, "name": "key", "kind": 32, "kindString": "Variable", @@ -7405,7 +7684,7 @@ "title": "Variables", "kind": 32, "children": [ - 346 + 353 ] } ], @@ -7432,7 +7711,7 @@ ], "type": { "type": "reference", - "id": 313, + "id": 320, "name": "BotkitConversation" } } @@ -7446,7 +7725,7 @@ ] }, { - "id": 355, + "id": 362, "name": "before", "kind": 2048, "kindString": "Method", @@ -7457,7 +7736,7 @@ }, "signatures": [ { - "id": 356, + "id": 363, "name": "before", "kind": 4096, "kindString": "Call signature", @@ -7470,7 +7749,7 @@ }, "parameters": [ { - "id": 357, + "id": 364, "name": "thread_name", "kind": 32768, "kindString": "Parameter", @@ -7486,7 +7765,7 @@ } }, { - "id": 358, + "id": 365, "name": "handler", "kind": 32768, "kindString": "Parameter", @@ -7499,7 +7778,7 @@ "type": { "type": "reflection", "declaration": { - "id": 359, + "id": 366, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -7508,7 +7787,7 @@ }, "signatures": [ { - "id": 360, + "id": 367, "name": "__call", "kind": 4096, "kindString": "Call signature", @@ -7517,7 +7796,7 @@ }, "parameters": [ { - "id": 361, + "id": 368, "name": "convo", "kind": 32768, "kindString": "Parameter", @@ -7526,12 +7805,12 @@ }, "type": { "type": "reference", - "id": 231, + "id": 238, "name": "BotkitDialogWrapper" } }, { - "id": 362, + "id": 369, "name": "bot", "kind": 32768, "kindString": "Parameter", @@ -7560,7 +7839,7 @@ "sources": [ { "fileName": "conversation.ts", - "line": 416, + "line": 419, "character": 47 } ] @@ -7577,13 +7856,13 @@ "sources": [ { "fileName": "conversation.ts", - "line": 416, + "line": 419, "character": 17 } ] }, { - "id": 370, + "id": 377, "name": "onChange", "kind": 2048, "kindString": "Method", @@ -7594,7 +7873,7 @@ }, "signatures": [ { - "id": 371, + "id": 378, "name": "onChange", "kind": 4096, "kindString": "Call signature", @@ -7607,7 +7886,7 @@ }, "parameters": [ { - "id": 372, + "id": 379, "name": "variable", "kind": 32768, "kindString": "Parameter", @@ -7623,7 +7902,7 @@ } }, { - "id": 373, + "id": 380, "name": "handler", "kind": 32768, "kindString": "Parameter", @@ -7636,7 +7915,7 @@ "type": { "type": "reflection", "declaration": { - "id": 374, + "id": 381, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -7645,7 +7924,7 @@ }, "signatures": [ { - "id": 375, + "id": 382, "name": "__call", "kind": 4096, "kindString": "Call signature", @@ -7654,7 +7933,7 @@ }, "parameters": [ { - "id": 376, + "id": 383, "name": "response", "kind": 32768, "kindString": "Parameter", @@ -7667,7 +7946,7 @@ } }, { - "id": 377, + "id": 384, "name": "convo", "kind": 32768, "kindString": "Parameter", @@ -7680,7 +7959,7 @@ } }, { - "id": 378, + "id": 385, "name": "bot", "kind": 32768, "kindString": "Parameter", @@ -7708,7 +7987,7 @@ "sources": [ { "fileName": "conversation.ts", - "line": 503, + "line": 506, "character": 46 } ] @@ -7725,13 +8004,13 @@ "sources": [ { "fileName": "conversation.ts", - "line": 503, + "line": 506, "character": 19 } ] }, { - "id": 320, + "id": 327, "name": "say", "kind": 2048, "kindString": "Method", @@ -7742,7 +8021,7 @@ }, "signatures": [ { - "id": 321, + "id": 328, "name": "say", "kind": 4096, "kindString": "Call signature", @@ -7755,7 +8034,7 @@ }, "parameters": [ { - "id": 322, + "id": 329, "name": "message", "kind": 32768, "kindString": "Parameter", @@ -7773,7 +8052,7 @@ "typeArguments": [ { "type": "reference", - "id": 263, + "id": 270, "name": "BotkitMessageTemplate" } ], @@ -7789,7 +8068,7 @@ ], "type": { "type": "reference", - "id": 313, + "id": 320, "name": "BotkitConversation" } } @@ -7808,30 +8087,30 @@ "title": "Constructors", "kind": 512, "children": [ - 316 + 323 ] }, { "title": "Properties", "kind": 1024, "children": [ - 315 + 322 ] }, { "title": "Methods", "kind": 2048, "children": [ - 323, - 327, - 332, - 336, - 347, - 363, - 340, - 355, + 330, + 334, + 339, + 343, + 354, 370, - 320 + 347, + 362, + 377, + 327 ] } ], @@ -7850,7 +8129,7 @@ ], "props": [ { - "id": 315, + "id": 322, "name": "script", "kind": 1024, "kindString": "Property", @@ -7877,7 +8156,7 @@ ], "methods": [ { - "id": 323, + "id": 330, "name": "addAction", "kind": 2048, "kindString": "Method", @@ -7888,7 +8167,7 @@ }, "signatures": [ { - "id": 324, + "id": 331, "name": "addAction", "kind": 4096, "kindString": "Call signature", @@ -7901,7 +8180,7 @@ }, "parameters": [ { - "id": 325, + "id": 332, "name": "action", "kind": 32768, "kindString": "Parameter", @@ -7917,7 +8196,7 @@ } }, { - "id": 326, + "id": 333, "name": "thread_name", "kind": 32768, "kindString": "Parameter", @@ -7936,7 +8215,7 @@ ], "type": { "type": "reference", - "id": 313, + "id": 320, "name": "BotkitConversation" } } @@ -7950,7 +8229,7 @@ ] }, { - "id": 327, + "id": 334, "name": "addChildDialog", "kind": 2048, "kindString": "Method", @@ -7961,7 +8240,7 @@ }, "signatures": [ { - "id": 328, + "id": 335, "name": "addChildDialog", "kind": 4096, "kindString": "Call signature", @@ -7974,7 +8253,7 @@ }, "parameters": [ { - "id": 329, + "id": 336, "name": "dialog_id", "kind": 32768, "kindString": "Parameter", @@ -7990,7 +8269,7 @@ } }, { - "id": 330, + "id": 337, "name": "key_name", "kind": 32768, "kindString": "Parameter", @@ -8007,7 +8286,7 @@ } }, { - "id": 331, + "id": 338, "name": "thread_name", "kind": 32768, "kindString": "Parameter", @@ -8026,7 +8305,7 @@ ], "type": { "type": "reference", - "id": 313, + "id": 320, "name": "BotkitConversation" } } @@ -8040,7 +8319,7 @@ ] }, { - "id": 332, + "id": 339, "name": "addGotoDialog", "kind": 2048, "kindString": "Method", @@ -8051,7 +8330,7 @@ }, "signatures": [ { - "id": 333, + "id": 340, "name": "addGotoDialog", "kind": 4096, "kindString": "Call signature", @@ -8064,7 +8343,7 @@ }, "parameters": [ { - "id": 334, + "id": 341, "name": "dialog_id", "kind": 32768, "kindString": "Parameter", @@ -8080,7 +8359,7 @@ } }, { - "id": 335, + "id": 342, "name": "thread_name", "kind": 32768, "kindString": "Parameter", @@ -8099,7 +8378,7 @@ ], "type": { "type": "reference", - "id": 313, + "id": 320, "name": "BotkitConversation" } } @@ -8113,7 +8392,7 @@ ] }, { - "id": 336, + "id": 343, "name": "addMessage", "kind": 2048, "kindString": "Method", @@ -8124,7 +8403,7 @@ }, "signatures": [ { - "id": 337, + "id": 344, "name": "addMessage", "kind": 4096, "kindString": "Call signature", @@ -8137,7 +8416,7 @@ }, "parameters": [ { - "id": 338, + "id": 345, "name": "message", "kind": 32768, "kindString": "Parameter", @@ -8155,7 +8434,7 @@ "typeArguments": [ { "type": "reference", - "id": 263, + "id": 270, "name": "BotkitMessageTemplate" } ], @@ -8169,7 +8448,7 @@ } }, { - "id": 339, + "id": 346, "name": "thread_name", "kind": 32768, "kindString": "Parameter", @@ -8187,7 +8466,7 @@ ], "type": { "type": "reference", - "id": 313, + "id": 320, "name": "BotkitConversation" } } @@ -8201,7 +8480,7 @@ ] }, { - "id": 347, + "id": 354, "name": "addQuestion", "kind": 2048, "kindString": "Method", @@ -8212,7 +8491,7 @@ }, "signatures": [ { - "id": 348, + "id": 355, "name": "addQuestion", "kind": 4096, "kindString": "Call signature", @@ -8225,7 +8504,7 @@ }, "parameters": [ { - "id": 349, + "id": 356, "name": "message", "kind": 32768, "kindString": "Parameter", @@ -8243,7 +8522,7 @@ "typeArguments": [ { "type": "reference", - "id": 263, + "id": 270, "name": "BotkitMessageTemplate" } ], @@ -8257,7 +8536,7 @@ } }, { - "id": 350, + "id": 357, "name": "handlers", "kind": 32768, "kindString": "Parameter", @@ -8272,14 +8551,14 @@ "types": [ { "type": "reference", - "id": 252, + "id": 259, "name": "BotkitConvoHandler" }, { "type": "array", "elementType": { "type": "reference", - "id": 258, + "id": 265, "name": "BotkitConvoTrigger" } } @@ -8287,7 +8566,7 @@ } }, { - "id": 351, + "id": 358, "name": "key", "kind": 32768, "kindString": "Parameter", @@ -8303,7 +8582,7 @@ { "type": "reflection", "declaration": { - "id": 352, + "id": 359, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -8312,7 +8591,7 @@ }, "children": [ { - "id": 353, + "id": 360, "name": "key", "kind": 32, "kindString": "Variable", @@ -8338,7 +8617,7 @@ "title": "Variables", "kind": 32, "children": [ - 353 + 360 ] } ], @@ -8363,7 +8642,7 @@ } }, { - "id": 354, + "id": 361, "name": "thread_name", "kind": 32768, "kindString": "Parameter", @@ -8381,7 +8660,7 @@ ], "type": { "type": "reference", - "id": 313, + "id": 320, "name": "BotkitConversation" } } @@ -8395,7 +8674,7 @@ ] }, { - "id": 363, + "id": 370, "name": "after", "kind": 2048, "kindString": "Method", @@ -8406,7 +8685,7 @@ }, "signatures": [ { - "id": 364, + "id": 371, "name": "after", "kind": 4096, "kindString": "Call signature", @@ -8419,7 +8698,7 @@ }, "parameters": [ { - "id": 365, + "id": 372, "name": "handler", "kind": 32768, "kindString": "Parameter", @@ -8432,7 +8711,7 @@ "type": { "type": "reflection", "declaration": { - "id": 366, + "id": 373, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -8441,7 +8720,7 @@ }, "signatures": [ { - "id": 367, + "id": 374, "name": "__call", "kind": 4096, "kindString": "Call signature", @@ -8450,7 +8729,7 @@ }, "parameters": [ { - "id": 368, + "id": 375, "name": "results", "kind": 32768, "kindString": "Parameter", @@ -8463,7 +8742,7 @@ } }, { - "id": 369, + "id": 376, "name": "bot", "kind": 32768, "kindString": "Parameter", @@ -8486,7 +8765,7 @@ "sources": [ { "fileName": "conversation.ts", - "line": 468, + "line": 471, "character": 25 } ] @@ -8503,13 +8782,13 @@ "sources": [ { "fileName": "conversation.ts", - "line": 468, + "line": 471, "character": 16 } ] }, { - "id": 340, + "id": 347, "name": "ask", "kind": 2048, "kindString": "Method", @@ -8520,7 +8799,7 @@ }, "signatures": [ { - "id": 341, + "id": 348, "name": "ask", "kind": 4096, "kindString": "Call signature", @@ -8529,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, 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 },s\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" + "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": 342, + "id": 349, "name": "message", "kind": 32768, "kindString": "Parameter", @@ -8551,7 +8830,7 @@ "typeArguments": [ { "type": "reference", - "id": 263, + "id": 270, "name": "BotkitMessageTemplate" } ], @@ -8565,7 +8844,7 @@ } }, { - "id": 343, + "id": 350, "name": "handlers", "kind": 32768, "kindString": "Parameter", @@ -8580,14 +8859,14 @@ "types": [ { "type": "reference", - "id": 252, + "id": 259, "name": "BotkitConvoHandler" }, { "type": "array", "elementType": { "type": "reference", - "id": 258, + "id": 265, "name": "BotkitConvoTrigger" } } @@ -8595,7 +8874,7 @@ } }, { - "id": 344, + "id": 351, "name": "key", "kind": 32768, "kindString": "Parameter", @@ -8611,7 +8890,7 @@ { "type": "reflection", "declaration": { - "id": 345, + "id": 352, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -8620,7 +8899,7 @@ }, "children": [ { - "id": 346, + "id": 353, "name": "key", "kind": 32, "kindString": "Variable", @@ -8646,7 +8925,7 @@ "title": "Variables", "kind": 32, "children": [ - 346 + 353 ] } ], @@ -8673,7 +8952,7 @@ ], "type": { "type": "reference", - "id": 313, + "id": 320, "name": "BotkitConversation" } } @@ -8687,7 +8966,7 @@ ] }, { - "id": 355, + "id": 362, "name": "before", "kind": 2048, "kindString": "Method", @@ -8698,7 +8977,7 @@ }, "signatures": [ { - "id": 356, + "id": 363, "name": "before", "kind": 4096, "kindString": "Call signature", @@ -8711,7 +8990,7 @@ }, "parameters": [ { - "id": 357, + "id": 364, "name": "thread_name", "kind": 32768, "kindString": "Parameter", @@ -8727,7 +9006,7 @@ } }, { - "id": 358, + "id": 365, "name": "handler", "kind": 32768, "kindString": "Parameter", @@ -8740,7 +9019,7 @@ "type": { "type": "reflection", "declaration": { - "id": 359, + "id": 366, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -8749,7 +9028,7 @@ }, "signatures": [ { - "id": 360, + "id": 367, "name": "__call", "kind": 4096, "kindString": "Call signature", @@ -8758,7 +9037,7 @@ }, "parameters": [ { - "id": 361, + "id": 368, "name": "convo", "kind": 32768, "kindString": "Parameter", @@ -8767,12 +9046,12 @@ }, "type": { "type": "reference", - "id": 231, + "id": 238, "name": "BotkitDialogWrapper" } }, { - "id": 362, + "id": 369, "name": "bot", "kind": 32768, "kindString": "Parameter", @@ -8801,7 +9080,7 @@ "sources": [ { "fileName": "conversation.ts", - "line": 416, + "line": 419, "character": 47 } ] @@ -8818,13 +9097,13 @@ "sources": [ { "fileName": "conversation.ts", - "line": 416, + "line": 419, "character": 17 } ] }, { - "id": 370, + "id": 377, "name": "onChange", "kind": 2048, "kindString": "Method", @@ -8835,7 +9114,7 @@ }, "signatures": [ { - "id": 371, + "id": 378, "name": "onChange", "kind": 4096, "kindString": "Call signature", @@ -8848,7 +9127,7 @@ }, "parameters": [ { - "id": 372, + "id": 379, "name": "variable", "kind": 32768, "kindString": "Parameter", @@ -8864,7 +9143,7 @@ } }, { - "id": 373, + "id": 380, "name": "handler", "kind": 32768, "kindString": "Parameter", @@ -8877,7 +9156,7 @@ "type": { "type": "reflection", "declaration": { - "id": 374, + "id": 381, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -8886,7 +9165,7 @@ }, "signatures": [ { - "id": 375, + "id": 382, "name": "__call", "kind": 4096, "kindString": "Call signature", @@ -8895,7 +9174,7 @@ }, "parameters": [ { - "id": 376, + "id": 383, "name": "response", "kind": 32768, "kindString": "Parameter", @@ -8908,7 +9187,7 @@ } }, { - "id": 377, + "id": 384, "name": "convo", "kind": 32768, "kindString": "Parameter", @@ -8921,7 +9200,7 @@ } }, { - "id": 378, + "id": 385, "name": "bot", "kind": 32768, "kindString": "Parameter", @@ -8949,7 +9228,7 @@ "sources": [ { "fileName": "conversation.ts", - "line": 503, + "line": 506, "character": 46 } ] @@ -8966,13 +9245,13 @@ "sources": [ { "fileName": "conversation.ts", - "line": 503, + "line": 506, "character": 19 } ] }, { - "id": 320, + "id": 327, "name": "say", "kind": 2048, "kindString": "Method", @@ -8983,7 +9262,7 @@ }, "signatures": [ { - "id": 321, + "id": 328, "name": "say", "kind": 4096, "kindString": "Call signature", @@ -8996,7 +9275,7 @@ }, "parameters": [ { - "id": 322, + "id": 329, "name": "message", "kind": 32768, "kindString": "Parameter", @@ -9014,7 +9293,7 @@ "typeArguments": [ { "type": "reference", - "id": 263, + "id": 270, "name": "BotkitMessageTemplate" } ], @@ -9030,7 +9309,7 @@ ], "type": { "type": "reference", - "id": 313, + "id": 320, "name": "BotkitConversation" } } @@ -9046,7 +9325,7 @@ ], "constructors": [ { - "id": 316, + "id": 323, "name": "constructor", "kind": 512, "kindString": "Constructor", @@ -9060,7 +9339,7 @@ }, "signatures": [ { - "id": 317, + "id": 324, "name": "new BotkitConversation", "kind": 16384, "kindString": "Constructor signature", @@ -9072,7 +9351,7 @@ }, "parameters": [ { - "id": 318, + "id": 325, "name": "dialogId", "kind": 32768, "kindString": "Parameter", @@ -9088,7 +9367,7 @@ } }, { - "id": 319, + "id": 326, "name": "controller", "kind": 32768, "kindString": "Parameter", @@ -9100,14 +9379,14 @@ }, "type": { "type": "reference", - "id": 119, + "id": 126, "name": "Botkit" } } ], "type": { "type": "reference", - "id": 313, + "id": 320, "name": "BotkitConversation" } } @@ -9123,7 +9402,7 @@ ] }, { - "id": 231, + "id": 238, "name": "BotkitDialogWrapper", "kind": 128, "kindString": "Class", @@ -9136,7 +9415,7 @@ }, "children": [ { - "id": 236, + "id": 243, "name": "constructor", "kind": 512, "kindString": "Constructor", @@ -9147,7 +9426,7 @@ }, "signatures": [ { - "id": 237, + "id": 244, "name": "new BotkitDialogWrapper", "kind": 16384, "kindString": "Constructor signature", @@ -9156,7 +9435,7 @@ }, "parameters": [ { - "id": 238, + "id": 245, "name": "dc", "kind": 32768, "kindString": "Parameter", @@ -9169,7 +9448,7 @@ } }, { - "id": 239, + "id": 246, "name": "step", "kind": 32768, "kindString": "Parameter", @@ -9178,14 +9457,14 @@ }, "type": { "type": "reference", - "id": 300, + "id": 307, "name": "BotkitConversationStep" } } ], "type": { "type": "reference", - "id": 231, + "id": 238, "name": "BotkitDialogWrapper" } } @@ -9199,7 +9478,7 @@ ] }, { - "id": 232, + "id": 239, "name": "vars", "kind": 1024, "kindString": "Property", @@ -9221,7 +9500,7 @@ "type": { "type": "reflection", "declaration": { - "id": 233, + "id": 240, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -9230,7 +9509,7 @@ }, "indexSignature": [ { - "id": 234, + "id": 241, "name": "__index", "kind": 8192, "kindString": "Index signature", @@ -9239,7 +9518,7 @@ }, "parameters": [ { - "id": 235, + "id": 242, "name": "key", "kind": 32768, "kindString": "Parameter", @@ -9269,7 +9548,7 @@ } }, { - "id": 240, + "id": 247, "name": "gotoThread", "kind": 2048, "kindString": "Method", @@ -9280,7 +9559,7 @@ }, "signatures": [ { - "id": 241, + "id": 248, "name": "gotoThread", "kind": 4096, "kindString": "Call signature", @@ -9292,7 +9571,7 @@ }, "parameters": [ { - "id": 242, + "id": 249, "name": "thread", "kind": 32768, "kindString": "Parameter", @@ -9329,7 +9608,7 @@ ] }, { - "id": 243, + "id": 250, "name": "repeat", "kind": 2048, "kindString": "Method", @@ -9340,7 +9619,7 @@ }, "signatures": [ { - "id": 244, + "id": 251, "name": "repeat", "kind": 4096, "kindString": "Call signature", @@ -9371,7 +9650,7 @@ ] }, { - "id": 247, + "id": 254, "name": "setVar", "kind": 2048, "kindString": "Method", @@ -9382,7 +9661,7 @@ }, "signatures": [ { - "id": 248, + "id": 255, "name": "setVar", "kind": 4096, "kindString": "Call signature", @@ -9394,7 +9673,7 @@ }, "parameters": [ { - "id": 249, + "id": 256, "name": "key", "kind": 32768, "kindString": "Parameter", @@ -9410,7 +9689,7 @@ } }, { - "id": 250, + "id": 257, "name": "val", "kind": 32768, "kindString": "Parameter", @@ -9441,7 +9720,7 @@ ] }, { - "id": 245, + "id": 252, "name": "stop", "kind": 2048, "kindString": "Method", @@ -9452,7 +9731,7 @@ }, "signatures": [ { - "id": 246, + "id": 253, "name": "stop", "kind": 4096, "kindString": "Call signature", @@ -9488,24 +9767,24 @@ "title": "Constructors", "kind": 512, "children": [ - 236 + 243 ] }, { "title": "Properties", "kind": 1024, "children": [ - 232 + 239 ] }, { "title": "Methods", "kind": 2048, "children": [ - 240, - 243, 247, - 245 + 250, + 254, + 252 ] } ], @@ -9518,7 +9797,7 @@ ], "props": [ { - "id": 232, + "id": 239, "name": "vars", "kind": 1024, "kindString": "Property", @@ -9540,7 +9819,7 @@ "type": { "type": "reflection", "declaration": { - "id": 233, + "id": 240, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -9549,7 +9828,7 @@ }, "indexSignature": [ { - "id": 234, + "id": 241, "name": "__index", "kind": 8192, "kindString": "Index signature", @@ -9558,7 +9837,7 @@ }, "parameters": [ { - "id": 235, + "id": 242, "name": "key", "kind": 32768, "kindString": "Parameter", @@ -9590,7 +9869,7 @@ ], "methods": [ { - "id": 240, + "id": 247, "name": "gotoThread", "kind": 2048, "kindString": "Method", @@ -9601,7 +9880,7 @@ }, "signatures": [ { - "id": 241, + "id": 248, "name": "gotoThread", "kind": 4096, "kindString": "Call signature", @@ -9613,7 +9892,7 @@ }, "parameters": [ { - "id": 242, + "id": 249, "name": "thread", "kind": 32768, "kindString": "Parameter", @@ -9650,7 +9929,7 @@ ] }, { - "id": 243, + "id": 250, "name": "repeat", "kind": 2048, "kindString": "Method", @@ -9661,7 +9940,7 @@ }, "signatures": [ { - "id": 244, + "id": 251, "name": "repeat", "kind": 4096, "kindString": "Call signature", @@ -9692,7 +9971,7 @@ ] }, { - "id": 247, + "id": 254, "name": "setVar", "kind": 2048, "kindString": "Method", @@ -9703,7 +9982,7 @@ }, "signatures": [ { - "id": 248, + "id": 255, "name": "setVar", "kind": 4096, "kindString": "Call signature", @@ -9715,7 +9994,7 @@ }, "parameters": [ { - "id": 249, + "id": 256, "name": "key", "kind": 32768, "kindString": "Parameter", @@ -9731,7 +10010,7 @@ } }, { - "id": 250, + "id": 257, "name": "val", "kind": 32768, "kindString": "Parameter", @@ -9762,7 +10041,7 @@ ] }, { - "id": 245, + "id": 252, "name": "stop", "kind": 2048, "kindString": "Method", @@ -9773,7 +10052,7 @@ }, "signatures": [ { - "id": 246, + "id": 253, "name": "stop", "kind": 4096, "kindString": "Call signature", @@ -9806,7 +10085,7 @@ ], "constructors": [ { - "id": 236, + "id": 243, "name": "constructor", "kind": 512, "kindString": "Constructor", @@ -9817,7 +10096,7 @@ }, "signatures": [ { - "id": 237, + "id": 244, "name": "new BotkitDialogWrapper", "kind": 16384, "kindString": "Constructor signature", @@ -9826,7 +10105,7 @@ }, "parameters": [ { - "id": 238, + "id": 245, "name": "dc", "kind": 32768, "kindString": "Parameter", @@ -9839,7 +10118,7 @@ } }, { - "id": 239, + "id": 246, "name": "step", "kind": 32768, "kindString": "Parameter", @@ -9848,14 +10127,14 @@ }, "type": { "type": "reference", - "id": 300, + "id": 307, "name": "BotkitConversationStep" } } ], "type": { "type": "reference", - "id": 231, + "id": 238, "name": "BotkitDialogWrapper" } } @@ -9871,7 +10150,7 @@ ] }, { - "id": 396, + "id": 403, "name": "BotkitTestClient", "kind": 128, "kindString": "Class", @@ -9884,7 +10163,7 @@ }, "children": [ { - "id": 399, + "id": 406, "name": "constructor", "kind": 512, "kindString": "Constructor", @@ -9899,7 +10178,7 @@ }, "signatures": [ { - "id": 400, + "id": 407, "name": "new BotkitTestClient", "kind": 16384, "kindString": "Constructor signature", @@ -9912,7 +10191,7 @@ }, "parameters": [ { - "id": 401, + "id": 408, "name": "channelId", "kind": 32768, "kindString": "Parameter", @@ -9928,7 +10207,7 @@ } }, { - "id": 402, + "id": 409, "name": "bot", "kind": 32768, "kindString": "Parameter", @@ -9940,12 +10219,12 @@ }, "type": { "type": "reference", - "id": 119, + "id": 126, "name": "Botkit" } }, { - "id": 403, + "id": 410, "name": "dialogToTest", "kind": 32768, "kindString": "Parameter", @@ -9973,7 +10252,7 @@ } }, { - "id": 404, + "id": 411, "name": "initialDialogOptions", "kind": 32768, "kindString": "Parameter", @@ -9990,7 +10269,7 @@ } }, { - "id": 405, + "id": 412, "name": "middlewares", "kind": 32768, "kindString": "Parameter", @@ -10010,7 +10289,7 @@ } }, { - "id": 406, + "id": 413, "name": "conversationState", "kind": 32768, "kindString": "Parameter", @@ -10029,12 +10308,12 @@ ], "type": { "type": "reference", - "id": 396, + "id": 403, "name": "BotkitTestClient" } }, { - "id": 407, + "id": 414, "name": "new BotkitTestClient", "kind": 16384, "kindString": "Constructor signature", @@ -10047,7 +10326,7 @@ }, "parameters": [ { - "id": 408, + "id": 415, "name": "testAdapter", "kind": 32768, "kindString": "Parameter", @@ -10060,7 +10339,7 @@ } }, { - "id": 409, + "id": 416, "name": "bot", "kind": 32768, "kindString": "Parameter", @@ -10072,12 +10351,12 @@ }, "type": { "type": "reference", - "id": 119, + "id": 126, "name": "Botkit" } }, { - "id": 410, + "id": 417, "name": "dialogToTest", "kind": 32768, "kindString": "Parameter", @@ -10105,7 +10384,7 @@ } }, { - "id": 411, + "id": 418, "name": "initialDialogOptions", "kind": 32768, "kindString": "Parameter", @@ -10122,7 +10401,7 @@ } }, { - "id": 412, + "id": 419, "name": "middlewares", "kind": 32768, "kindString": "Parameter", @@ -10142,7 +10421,7 @@ } }, { - "id": 413, + "id": 420, "name": "conversationState", "kind": 32768, "kindString": "Parameter", @@ -10161,7 +10440,7 @@ ], "type": { "type": "reference", - "id": 396, + "id": 403, "name": "BotkitTestClient" } } @@ -10185,7 +10464,7 @@ ] }, { - "id": 398, + "id": 405, "name": "conversationState", "kind": 1024, "kindString": "Property", @@ -10207,7 +10486,7 @@ } }, { - "id": 397, + "id": 404, "name": "dialogTurnResult", "kind": 1024, "kindString": "Property", @@ -10229,7 +10508,7 @@ } }, { - "id": 417, + "id": 424, "name": "getNextReply", "kind": 2048, "kindString": "Method", @@ -10240,7 +10519,7 @@ }, "signatures": [ { - "id": 418, + "id": 425, "name": "getNextReply", "kind": 4096, "kindString": "Call signature", @@ -10271,7 +10550,7 @@ ] }, { - "id": 414, + "id": 421, "name": "sendActivity", "kind": 2048, "kindString": "Method", @@ -10282,7 +10561,7 @@ }, "signatures": [ { - "id": 415, + "id": 422, "name": "sendActivity", "kind": 4096, "kindString": "Call signature", @@ -10295,7 +10574,7 @@ }, "parameters": [ { - "id": 416, + "id": 423, "name": "activity", "kind": 32768, "kindString": "Parameter", @@ -10352,23 +10631,23 @@ "title": "Constructors", "kind": 512, "children": [ - 399 + 406 ] }, { "title": "Properties", "kind": 1024, "children": [ - 398, - 397 + 405, + 404 ] }, { "title": "Methods", "kind": 2048, "children": [ - 417, - 414 + 424, + 421 ] } ], @@ -10381,7 +10660,7 @@ ], "props": [ { - "id": 398, + "id": 405, "name": "conversationState", "kind": 1024, "kindString": "Property", @@ -10403,7 +10682,7 @@ } }, { - "id": 397, + "id": 404, "name": "dialogTurnResult", "kind": 1024, "kindString": "Property", @@ -10427,7 +10706,7 @@ ], "methods": [ { - "id": 417, + "id": 424, "name": "getNextReply", "kind": 2048, "kindString": "Method", @@ -10438,7 +10717,7 @@ }, "signatures": [ { - "id": 418, + "id": 425, "name": "getNextReply", "kind": 4096, "kindString": "Call signature", @@ -10469,7 +10748,7 @@ ] }, { - "id": 414, + "id": 421, "name": "sendActivity", "kind": 2048, "kindString": "Method", @@ -10480,7 +10759,7 @@ }, "signatures": [ { - "id": 415, + "id": 422, "name": "sendActivity", "kind": 4096, "kindString": "Call signature", @@ -10493,7 +10772,7 @@ }, "parameters": [ { - "id": 416, + "id": 423, "name": "activity", "kind": 32768, "kindString": "Parameter", @@ -10547,7 +10826,7 @@ ], "constructors": [ { - "id": 399, + "id": 406, "name": "constructor", "kind": 512, "kindString": "Constructor", @@ -10562,7 +10841,7 @@ }, "signatures": [ { - "id": 400, + "id": 407, "name": "new BotkitTestClient", "kind": 16384, "kindString": "Constructor signature", @@ -10575,7 +10854,7 @@ }, "parameters": [ { - "id": 401, + "id": 408, "name": "channelId", "kind": 32768, "kindString": "Parameter", @@ -10591,7 +10870,7 @@ } }, { - "id": 402, + "id": 409, "name": "bot", "kind": 32768, "kindString": "Parameter", @@ -10603,12 +10882,12 @@ }, "type": { "type": "reference", - "id": 119, + "id": 126, "name": "Botkit" } }, { - "id": 403, + "id": 410, "name": "dialogToTest", "kind": 32768, "kindString": "Parameter", @@ -10636,7 +10915,7 @@ } }, { - "id": 404, + "id": 411, "name": "initialDialogOptions", "kind": 32768, "kindString": "Parameter", @@ -10653,7 +10932,7 @@ } }, { - "id": 405, + "id": 412, "name": "middlewares", "kind": 32768, "kindString": "Parameter", @@ -10673,7 +10952,7 @@ } }, { - "id": 406, + "id": 413, "name": "conversationState", "kind": 32768, "kindString": "Parameter", @@ -10692,12 +10971,12 @@ ], "type": { "type": "reference", - "id": 396, + "id": 403, "name": "BotkitTestClient" } }, { - "id": 407, + "id": 414, "name": "new BotkitTestClient", "kind": 16384, "kindString": "Constructor signature", @@ -10710,7 +10989,7 @@ }, "parameters": [ { - "id": 408, + "id": 415, "name": "testAdapter", "kind": 32768, "kindString": "Parameter", @@ -10723,7 +11002,7 @@ } }, { - "id": 409, + "id": 416, "name": "bot", "kind": 32768, "kindString": "Parameter", @@ -10735,12 +11014,12 @@ }, "type": { "type": "reference", - "id": 119, + "id": 126, "name": "Botkit" } }, { - "id": 410, + "id": 417, "name": "dialogToTest", "kind": 32768, "kindString": "Parameter", @@ -10768,7 +11047,7 @@ } }, { - "id": 411, + "id": 418, "name": "initialDialogOptions", "kind": 32768, "kindString": "Parameter", @@ -10785,7 +11064,7 @@ } }, { - "id": 412, + "id": 419, "name": "middlewares", "kind": 32768, "kindString": "Parameter", @@ -10805,7 +11084,7 @@ } }, { - "id": 413, + "id": 420, "name": "conversationState", "kind": 32768, "kindString": "Parameter", @@ -10824,7 +11103,7 @@ ], "type": { "type": "reference", - "id": 396, + "id": 403, "name": "BotkitTestClient" } } @@ -10852,7 +11131,7 @@ ], "interfaces": [ { - "id": 73, + "id": 80, "name": "BotkitConfiguration", "kind": 256, "kindString": "Interface", @@ -10865,7 +11144,7 @@ }, "children": [ { - "id": 76, + "id": 83, "name": "adapter", "kind": 1024, "kindString": "Property", @@ -10890,7 +11169,7 @@ } }, { - "id": 77, + "id": 84, "name": "adapterConfig", "kind": 1024, "kindString": "Property", @@ -10912,7 +11191,7 @@ "type": { "type": "reflection", "declaration": { - "id": 78, + "id": 85, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -10921,7 +11200,7 @@ }, "indexSignature": [ { - "id": 79, + "id": 86, "name": "__index", "kind": 8192, "kindString": "Index signature", @@ -10930,7 +11209,7 @@ }, "parameters": [ { - "id": 80, + "id": 87, "name": "key", "kind": 32768, "kindString": "Parameter", @@ -10960,7 +11239,7 @@ } }, { - "id": 75, + "id": 82, "name": "dialogStateProperty", "kind": 1024, "kindString": "Property", @@ -10985,7 +11264,7 @@ } }, { - "id": 85, + "id": 92, "name": "disable_console", "kind": 1024, "kindString": "Property", @@ -11010,7 +11289,7 @@ } }, { - "id": 84, + "id": 91, "name": "disable_webserver", "kind": 1024, "kindString": "Property", @@ -11035,7 +11314,7 @@ } }, { - "id": 83, + "id": 90, "name": "storage", "kind": 1024, "kindString": "Property", @@ -11060,7 +11339,7 @@ } }, { - "id": 74, + "id": 81, "name": "webhook_uri", "kind": 1024, "kindString": "Property", @@ -11085,7 +11364,7 @@ } }, { - "id": 81, + "id": 88, "name": "webserver", "kind": 1024, "kindString": "Property", @@ -11110,7 +11389,7 @@ } }, { - "id": 82, + "id": 89, "name": "webserver_middlewares", "kind": 1024, "kindString": "Property", @@ -11143,15 +11422,15 @@ "title": "Properties", "kind": 1024, "children": [ - 76, - 77, - 75, - 85, - 84, 83, - 74, + 84, + 82, + 92, + 91, + 90, 81, - 82 + 88, + 89 ] } ], @@ -11164,7 +11443,7 @@ ], "props": [ { - "id": 76, + "id": 83, "name": "adapter", "kind": 1024, "kindString": "Property", @@ -11189,7 +11468,7 @@ } }, { - "id": 77, + "id": 84, "name": "adapterConfig", "kind": 1024, "kindString": "Property", @@ -11211,7 +11490,7 @@ "type": { "type": "reflection", "declaration": { - "id": 78, + "id": 85, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -11220,7 +11499,7 @@ }, "indexSignature": [ { - "id": 79, + "id": 86, "name": "__index", "kind": 8192, "kindString": "Index signature", @@ -11229,7 +11508,7 @@ }, "parameters": [ { - "id": 80, + "id": 87, "name": "key", "kind": 32768, "kindString": "Parameter", @@ -11259,7 +11538,7 @@ } }, { - "id": 75, + "id": 82, "name": "dialogStateProperty", "kind": 1024, "kindString": "Property", @@ -11284,7 +11563,7 @@ } }, { - "id": 85, + "id": 92, "name": "disable_console", "kind": 1024, "kindString": "Property", @@ -11309,7 +11588,7 @@ } }, { - "id": 84, + "id": 91, "name": "disable_webserver", "kind": 1024, "kindString": "Property", @@ -11334,7 +11613,7 @@ } }, { - "id": 83, + "id": 90, "name": "storage", "kind": 1024, "kindString": "Property", @@ -11359,7 +11638,7 @@ } }, { - "id": 74, + "id": 81, "name": "webhook_uri", "kind": 1024, "kindString": "Property", @@ -11384,7 +11663,7 @@ } }, { - "id": 81, + "id": 88, "name": "webserver", "kind": 1024, "kindString": "Property", @@ -11409,7 +11688,7 @@ } }, { - "id": 82, + "id": 89, "name": "webserver_middlewares", "kind": 1024, "kindString": "Property", @@ -11439,7 +11718,7 @@ ] }, { - "id": 300, + "id": 307, "name": "BotkitConversationStep", "kind": 256, "kindString": "Interface", @@ -11449,7 +11728,7 @@ }, "children": [ { - "id": 301, + "id": 308, "name": "index", "kind": 1024, "kindString": "Property", @@ -11473,7 +11752,7 @@ } }, { - "id": 309, + "id": 316, "name": "next", "kind": 1024, "kindString": "Property", @@ -11494,7 +11773,7 @@ "type": { "type": "reflection", "declaration": { - "id": 310, + "id": 317, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -11503,7 +11782,7 @@ }, "signatures": [ { - "id": 311, + "id": 318, "name": "__call", "kind": 4096, "kindString": "Call signature", @@ -11512,7 +11791,7 @@ }, "parameters": [ { - "id": 312, + "id": 319, "name": "stepResult", "kind": 32768, "kindString": "Parameter", @@ -11548,7 +11827,7 @@ } }, { - "id": 305, + "id": 312, "name": "options", "kind": 1024, "kindString": "Property", @@ -11572,7 +11851,7 @@ } }, { - "id": 306, + "id": 313, "name": "reason", "kind": 1024, "kindString": "Property", @@ -11596,7 +11875,7 @@ } }, { - "id": 307, + "id": 314, "name": "result", "kind": 1024, "kindString": "Property", @@ -11620,7 +11899,7 @@ } }, { - "id": 304, + "id": 311, "name": "state", "kind": 1024, "kindString": "Property", @@ -11644,7 +11923,7 @@ } }, { - "id": 302, + "id": 309, "name": "thread", "kind": 1024, "kindString": "Property", @@ -11668,7 +11947,7 @@ } }, { - "id": 303, + "id": 310, "name": "threadLength", "kind": 1024, "kindString": "Property", @@ -11692,7 +11971,7 @@ } }, { - "id": 308, + "id": 315, "name": "values", "kind": 1024, "kindString": "Property", @@ -11721,15 +12000,15 @@ "title": "Properties", "kind": 1024, "children": [ - 301, + 308, + 316, + 312, + 313, + 314, + 311, 309, - 305, - 306, - 307, - 304, - 302, - 303, - 308 + 310, + 315 ] } ], @@ -11742,7 +12021,7 @@ ], "props": [ { - "id": 301, + "id": 308, "name": "index", "kind": 1024, "kindString": "Property", @@ -11766,7 +12045,7 @@ } }, { - "id": 309, + "id": 316, "name": "next", "kind": 1024, "kindString": "Property", @@ -11787,7 +12066,7 @@ "type": { "type": "reflection", "declaration": { - "id": 310, + "id": 317, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -11796,7 +12075,7 @@ }, "signatures": [ { - "id": 311, + "id": 318, "name": "__call", "kind": 4096, "kindString": "Call signature", @@ -11805,7 +12084,7 @@ }, "parameters": [ { - "id": 312, + "id": 319, "name": "stepResult", "kind": 32768, "kindString": "Parameter", @@ -11841,7 +12120,7 @@ } }, { - "id": 305, + "id": 312, "name": "options", "kind": 1024, "kindString": "Property", @@ -11865,7 +12144,7 @@ } }, { - "id": 306, + "id": 313, "name": "reason", "kind": 1024, "kindString": "Property", @@ -11889,7 +12168,7 @@ } }, { - "id": 307, + "id": 314, "name": "result", "kind": 1024, "kindString": "Property", @@ -11913,7 +12192,7 @@ } }, { - "id": 304, + "id": 311, "name": "state", "kind": 1024, "kindString": "Property", @@ -11937,7 +12216,7 @@ } }, { - "id": 302, + "id": 309, "name": "thread", "kind": 1024, "kindString": "Property", @@ -11961,7 +12240,7 @@ } }, { - "id": 303, + "id": 310, "name": "threadLength", "kind": 1024, "kindString": "Property", @@ -11985,7 +12264,7 @@ } }, { - "id": 308, + "id": 315, "name": "values", "kind": 1024, "kindString": "Property", @@ -12011,7 +12290,7 @@ ] }, { - "id": 252, + "id": 259, "name": "BotkitConvoHandler", "kind": 256, "kindString": "Interface", @@ -12023,7 +12302,7 @@ }, "signatures": [ { - "id": 253, + "id": 260, "name": "__call", "kind": 4096, "kindString": "Call signature", @@ -12033,7 +12312,7 @@ }, "parameters": [ { - "id": 254, + "id": 261, "name": "answer", "kind": 32768, "kindString": "Parameter", @@ -12044,19 +12323,19 @@ } }, { - "id": 255, + "id": 262, "name": "convo", "kind": 32768, "kindString": "Parameter", "flags": {}, "type": { "type": "reference", - "id": 231, + "id": 238, "name": "BotkitDialogWrapper" } }, { - "id": 256, + "id": 263, "name": "bot", "kind": 32768, "kindString": "Parameter", @@ -12068,14 +12347,14 @@ } }, { - "id": 257, + "id": 264, "name": "message", "kind": 32768, "kindString": "Parameter", "flags": {}, "type": { "type": "reference", - "id": 86, + "id": 93, "name": "BotkitMessage" } } @@ -12101,7 +12380,7 @@ ] }, { - "id": 258, + "id": 265, "name": "BotkitConvoTrigger", "kind": 256, "kindString": "Interface", @@ -12113,7 +12392,7 @@ }, "children": [ { - "id": 262, + "id": 269, "name": "default", "kind": 1024, "kindString": "Property", @@ -12134,7 +12413,7 @@ } }, { - "id": 261, + "id": 268, "name": "handler", "kind": 1024, "kindString": "Property", @@ -12150,12 +12429,12 @@ ], "type": { "type": "reference", - "id": 252, + "id": 259, "name": "BotkitConvoHandler" } }, { - "id": 260, + "id": 267, "name": "pattern", "kind": 1024, "kindString": "Property", @@ -12185,7 +12464,7 @@ } }, { - "id": 259, + "id": 266, "name": "type", "kind": 1024, "kindString": "Property", @@ -12211,10 +12490,10 @@ "title": "Properties", "kind": 1024, "children": [ - 262, - 261, - 260, - 259 + 269, + 268, + 267, + 266 ] } ], @@ -12227,7 +12506,7 @@ ], "props": [ { - "id": 262, + "id": 269, "name": "default", "kind": 1024, "kindString": "Property", @@ -12248,7 +12527,7 @@ } }, { - "id": 261, + "id": 268, "name": "handler", "kind": 1024, "kindString": "Property", @@ -12264,12 +12543,12 @@ ], "type": { "type": "reference", - "id": 252, + "id": 259, "name": "BotkitConvoHandler" } }, { - "id": 260, + "id": 267, "name": "pattern", "kind": 1024, "kindString": "Property", @@ -12299,7 +12578,7 @@ } }, { - "id": 259, + "id": 266, "name": "type", "kind": 1024, "kindString": "Property", @@ -12322,7 +12601,7 @@ ] }, { - "id": 96, + "id": 103, "name": "BotkitHandler", "kind": 256, "kindString": "Interface", @@ -12336,7 +12615,7 @@ }, "signatures": [ { - "id": 97, + "id": 104, "name": "__call", "kind": 4096, "kindString": "Call signature", @@ -12349,7 +12628,7 @@ }, "parameters": [ { - "id": 98, + "id": 105, "name": "bot", "kind": 32768, "kindString": "Parameter", @@ -12363,7 +12642,7 @@ } }, { - "id": 99, + "id": 106, "name": "message", "kind": 32768, "kindString": "Parameter", @@ -12372,7 +12651,7 @@ }, "type": { "type": "reference", - "id": 86, + "id": 93, "name": "BotkitMessage" } } @@ -12398,7 +12677,7 @@ ] }, { - "id": 86, + "id": 93, "name": "BotkitMessage", "kind": 256, "kindString": "Interface", @@ -12411,7 +12690,7 @@ }, "indexSignature": [ { - "id": 94, + "id": 101, "name": "__index", "kind": 8192, "kindString": "Index signature", @@ -12423,7 +12702,7 @@ }, "parameters": [ { - "id": 95, + "id": 102, "name": "key", "kind": 32768, "kindString": "Parameter", @@ -12444,7 +12723,7 @@ ], "children": [ { - "id": 91, + "id": 98, "name": "channel", "kind": 1024, "kindString": "Property", @@ -12468,7 +12747,7 @@ } }, { - "id": 93, + "id": 100, "name": "incoming_message", "kind": 1024, "kindString": "Property", @@ -12492,7 +12771,7 @@ } }, { - "id": 92, + "id": 99, "name": "reference", "kind": 1024, "kindString": "Property", @@ -12516,7 +12795,7 @@ } }, { - "id": 88, + "id": 95, "name": "text", "kind": 1024, "kindString": "Property", @@ -12541,7 +12820,7 @@ } }, { - "id": 87, + "id": 94, "name": "type", "kind": 1024, "kindString": "Property", @@ -12565,7 +12844,7 @@ } }, { - "id": 90, + "id": 97, "name": "user", "kind": 1024, "kindString": "Property", @@ -12589,7 +12868,7 @@ } }, { - "id": 89, + "id": 96, "name": "value", "kind": 1024, "kindString": "Property", @@ -12619,13 +12898,13 @@ "title": "Properties", "kind": 1024, "children": [ - 91, - 93, - 92, - 88, - 87, - 90, - 89 + 98, + 100, + 99, + 95, + 94, + 97, + 96 ] } ], @@ -12638,7 +12917,7 @@ ], "props": [ { - "id": 91, + "id": 98, "name": "channel", "kind": 1024, "kindString": "Property", @@ -12662,7 +12941,7 @@ } }, { - "id": 93, + "id": 100, "name": "incoming_message", "kind": 1024, "kindString": "Property", @@ -12686,7 +12965,7 @@ } }, { - "id": 92, + "id": 99, "name": "reference", "kind": 1024, "kindString": "Property", @@ -12710,7 +12989,7 @@ } }, { - "id": 88, + "id": 95, "name": "text", "kind": 1024, "kindString": "Property", @@ -12735,7 +13014,7 @@ } }, { - "id": 87, + "id": 94, "name": "type", "kind": 1024, "kindString": "Property", @@ -12759,7 +13038,7 @@ } }, { - "id": 90, + "id": 97, "name": "user", "kind": 1024, "kindString": "Property", @@ -12783,7 +13062,7 @@ } }, { - "id": 89, + "id": 96, "name": "value", "kind": 1024, "kindString": "Property", @@ -12810,7 +13089,7 @@ ] }, { - "id": 263, + "id": 270, "name": "BotkitMessageTemplate", "kind": 256, "kindString": "Interface", @@ -12822,7 +13101,7 @@ }, "children": [ { - "id": 269, + "id": 276, "name": "action", "kind": 1024, "kindString": "Property", @@ -12843,7 +13122,7 @@ } }, { - "id": 289, + "id": 296, "name": "attachment", "kind": 1024, "kindString": "Property", @@ -12864,21 +13143,21 @@ { "type": "reflection", "declaration": { - "id": 290, + "id": 297, "name": "__type", "kind": 65536, "kindString": "Type literal", "flags": {}, "signatures": [ { - "id": 291, + "id": 298, "name": "__call", "kind": 4096, "kindString": "Call signature", "flags": {}, "parameters": [ { - "id": 292, + "id": 299, "name": "template", "kind": 32768, "kindString": "Parameter", @@ -12889,7 +13168,7 @@ } }, { - "id": 293, + "id": 300, "name": "vars", "kind": 32768, "kindString": "Parameter", @@ -12923,7 +13202,7 @@ } }, { - "id": 294, + "id": 301, "name": "attachmentLayout", "kind": 1024, "kindString": "Property", @@ -12944,7 +13223,7 @@ } }, { - "id": 279, + "id": 286, "name": "attachments", "kind": 1024, "kindString": "Property", @@ -12965,21 +13244,21 @@ { "type": "reflection", "declaration": { - "id": 280, + "id": 287, "name": "__type", "kind": 65536, "kindString": "Type literal", "flags": {}, "signatures": [ { - "id": 281, + "id": 288, "name": "__call", "kind": 4096, "kindString": "Call signature", "flags": {}, "parameters": [ { - "id": 282, + "id": 289, "name": "template", "kind": 32768, "kindString": "Parameter", @@ -12990,7 +13269,7 @@ } }, { - "id": 283, + "id": 290, "name": "vars", "kind": 32768, "kindString": "Parameter", @@ -13030,7 +13309,7 @@ } }, { - "id": 284, + "id": 291, "name": "blocks", "kind": 1024, "kindString": "Property", @@ -13051,21 +13330,21 @@ { "type": "reflection", "declaration": { - "id": 285, + "id": 292, "name": "__type", "kind": 65536, "kindString": "Type literal", "flags": {}, "signatures": [ { - "id": 286, + "id": 293, "name": "__call", "kind": 4096, "kindString": "Call signature", "flags": {}, "parameters": [ { - "id": 287, + "id": 294, "name": "template", "kind": 32768, "kindString": "Parameter", @@ -13076,7 +13355,7 @@ } }, { - "id": 288, + "id": 295, "name": "vars", "kind": 32768, "kindString": "Parameter", @@ -13116,7 +13395,7 @@ } }, { - "id": 295, + "id": 302, "name": "channelData", "kind": 1024, "kindString": "Property", @@ -13137,7 +13416,7 @@ } }, { - "id": 296, + "id": 303, "name": "collect", "kind": 1024, "kindString": "Property", @@ -13154,14 +13433,14 @@ "type": { "type": "reflection", "declaration": { - "id": 297, + "id": 304, "name": "__type", "kind": 65536, "kindString": "Type literal", "flags": {}, "children": [ { - "id": 298, + "id": 305, "name": "key", "kind": 32, "kindString": "Variable", @@ -13182,7 +13461,7 @@ } }, { - "id": 299, + "id": 306, "name": "options", "kind": 32, "kindString": "Variable", @@ -13201,7 +13480,7 @@ "type": "array", "elementType": { "type": "reference", - "id": 258, + "id": 265, "name": "BotkitConvoTrigger" } } @@ -13212,8 +13491,8 @@ "title": "Variables", "kind": 32, "children": [ - 298, - 299 + 305, + 306 ] } ], @@ -13228,7 +13507,7 @@ } }, { - "id": 270, + "id": 277, "name": "execute", "kind": 1024, "kindString": "Property", @@ -13246,14 +13525,14 @@ "type": { "type": "reflection", "declaration": { - "id": 271, + "id": 278, "name": "__type", "kind": 65536, "kindString": "Type literal", "flags": {}, "children": [ { - "id": 272, + "id": 279, "name": "script", "kind": 32, "kindString": "Variable", @@ -13273,7 +13552,7 @@ } }, { - "id": 273, + "id": 280, "name": "thread", "kind": 32, "kindString": "Variable", @@ -13299,8 +13578,8 @@ "title": "Variables", "kind": 32, "children": [ - 272, - 273 + 279, + 280 ] } ], @@ -13315,7 +13594,7 @@ } }, { - "id": 274, + "id": 281, "name": "quick_replies", "kind": 1024, "kindString": "Property", @@ -13336,21 +13615,21 @@ { "type": "reflection", "declaration": { - "id": 275, + "id": 282, "name": "__type", "kind": 65536, "kindString": "Type literal", "flags": {}, "signatures": [ { - "id": 276, + "id": 283, "name": "__call", "kind": 4096, "kindString": "Call signature", "flags": {}, "parameters": [ { - "id": 277, + "id": 284, "name": "template", "kind": 32768, "kindString": "Parameter", @@ -13361,7 +13640,7 @@ } }, { - "id": 278, + "id": 285, "name": "vars", "kind": 32768, "kindString": "Parameter", @@ -13401,7 +13680,7 @@ } }, { - "id": 264, + "id": 271, "name": "text", "kind": 1024, "kindString": "Property", @@ -13421,21 +13700,21 @@ { "type": "reflection", "declaration": { - "id": 265, + "id": 272, "name": "__type", "kind": 65536, "kindString": "Type literal", "flags": {}, "signatures": [ { - "id": 266, + "id": 273, "name": "__call", "kind": 4096, "kindString": "Call signature", "flags": {}, "parameters": [ { - "id": 267, + "id": 274, "name": "template", "kind": 32768, "kindString": "Parameter", @@ -13446,7 +13725,7 @@ } }, { - "id": 268, + "id": 275, "name": "vars", "kind": 32768, "kindString": "Parameter", @@ -13491,16 +13770,16 @@ "title": "Properties", "kind": 1024, "children": [ - 269, - 289, - 294, - 279, - 284, - 295, + 276, 296, - 270, - 274, - 264 + 301, + 286, + 291, + 302, + 303, + 277, + 281, + 271 ] } ], @@ -13513,7 +13792,7 @@ ], "props": [ { - "id": 269, + "id": 276, "name": "action", "kind": 1024, "kindString": "Property", @@ -13534,7 +13813,7 @@ } }, { - "id": 289, + "id": 296, "name": "attachment", "kind": 1024, "kindString": "Property", @@ -13555,21 +13834,21 @@ { "type": "reflection", "declaration": { - "id": 290, + "id": 297, "name": "__type", "kind": 65536, "kindString": "Type literal", "flags": {}, "signatures": [ { - "id": 291, + "id": 298, "name": "__call", "kind": 4096, "kindString": "Call signature", "flags": {}, "parameters": [ { - "id": 292, + "id": 299, "name": "template", "kind": 32768, "kindString": "Parameter", @@ -13580,7 +13859,7 @@ } }, { - "id": 293, + "id": 300, "name": "vars", "kind": 32768, "kindString": "Parameter", @@ -13614,7 +13893,7 @@ } }, { - "id": 294, + "id": 301, "name": "attachmentLayout", "kind": 1024, "kindString": "Property", @@ -13635,7 +13914,7 @@ } }, { - "id": 279, + "id": 286, "name": "attachments", "kind": 1024, "kindString": "Property", @@ -13656,21 +13935,21 @@ { "type": "reflection", "declaration": { - "id": 280, + "id": 287, "name": "__type", "kind": 65536, "kindString": "Type literal", "flags": {}, "signatures": [ { - "id": 281, + "id": 288, "name": "__call", "kind": 4096, "kindString": "Call signature", "flags": {}, "parameters": [ { - "id": 282, + "id": 289, "name": "template", "kind": 32768, "kindString": "Parameter", @@ -13681,7 +13960,7 @@ } }, { - "id": 283, + "id": 290, "name": "vars", "kind": 32768, "kindString": "Parameter", @@ -13721,7 +14000,7 @@ } }, { - "id": 284, + "id": 291, "name": "blocks", "kind": 1024, "kindString": "Property", @@ -13742,21 +14021,21 @@ { "type": "reflection", "declaration": { - "id": 285, + "id": 292, "name": "__type", "kind": 65536, "kindString": "Type literal", "flags": {}, "signatures": [ { - "id": 286, + "id": 293, "name": "__call", "kind": 4096, "kindString": "Call signature", "flags": {}, "parameters": [ { - "id": 287, + "id": 294, "name": "template", "kind": 32768, "kindString": "Parameter", @@ -13767,7 +14046,7 @@ } }, { - "id": 288, + "id": 295, "name": "vars", "kind": 32768, "kindString": "Parameter", @@ -13807,7 +14086,7 @@ } }, { - "id": 295, + "id": 302, "name": "channelData", "kind": 1024, "kindString": "Property", @@ -13828,7 +14107,7 @@ } }, { - "id": 296, + "id": 303, "name": "collect", "kind": 1024, "kindString": "Property", @@ -13845,14 +14124,14 @@ "type": { "type": "reflection", "declaration": { - "id": 297, + "id": 304, "name": "__type", "kind": 65536, "kindString": "Type literal", "flags": {}, "children": [ { - "id": 298, + "id": 305, "name": "key", "kind": 32, "kindString": "Variable", @@ -13873,7 +14152,7 @@ } }, { - "id": 299, + "id": 306, "name": "options", "kind": 32, "kindString": "Variable", @@ -13892,7 +14171,7 @@ "type": "array", "elementType": { "type": "reference", - "id": 258, + "id": 265, "name": "BotkitConvoTrigger" } } @@ -13903,8 +14182,8 @@ "title": "Variables", "kind": 32, "children": [ - 298, - 299 + 305, + 306 ] } ], @@ -13919,7 +14198,7 @@ } }, { - "id": 270, + "id": 277, "name": "execute", "kind": 1024, "kindString": "Property", @@ -13937,14 +14216,14 @@ "type": { "type": "reflection", "declaration": { - "id": 271, + "id": 278, "name": "__type", "kind": 65536, "kindString": "Type literal", "flags": {}, "children": [ { - "id": 272, + "id": 279, "name": "script", "kind": 32, "kindString": "Variable", @@ -13964,7 +14243,7 @@ } }, { - "id": 273, + "id": 280, "name": "thread", "kind": 32, "kindString": "Variable", @@ -13990,8 +14269,8 @@ "title": "Variables", "kind": 32, "children": [ - 272, - 273 + 279, + 280 ] } ], @@ -14006,7 +14285,7 @@ } }, { - "id": 274, + "id": 281, "name": "quick_replies", "kind": 1024, "kindString": "Property", @@ -14027,21 +14306,21 @@ { "type": "reflection", "declaration": { - "id": 275, + "id": 282, "name": "__type", "kind": 65536, "kindString": "Type literal", "flags": {}, "signatures": [ { - "id": 276, + "id": 283, "name": "__call", "kind": 4096, "kindString": "Call signature", "flags": {}, "parameters": [ { - "id": 277, + "id": 284, "name": "template", "kind": 32768, "kindString": "Parameter", @@ -14052,7 +14331,7 @@ } }, { - "id": 278, + "id": 285, "name": "vars", "kind": 32768, "kindString": "Parameter", @@ -14092,7 +14371,7 @@ } }, { - "id": 264, + "id": 271, "name": "text", "kind": 1024, "kindString": "Property", @@ -14112,21 +14391,21 @@ { "type": "reflection", "declaration": { - "id": 265, + "id": 272, "name": "__type", "kind": 65536, "kindString": "Type literal", "flags": {}, "signatures": [ { - "id": 266, + "id": 273, "name": "__call", "kind": 4096, "kindString": "Call signature", "flags": {}, "parameters": [ { - "id": 267, + "id": 274, "name": "template", "kind": 32768, "kindString": "Parameter", @@ -14137,7 +14416,7 @@ } }, { - "id": 268, + "id": 275, "name": "vars", "kind": 32768, "kindString": "Parameter", @@ -14179,7 +14458,7 @@ ] }, { - "id": 107, + "id": 114, "name": "BotkitPlugin", "kind": 256, "kindString": "Interface", @@ -14192,7 +14471,7 @@ }, "indexSignature": [ { - "id": 117, + "id": 124, "name": "__index", "kind": 8192, "kindString": "Index signature", @@ -14204,7 +14483,7 @@ }, "parameters": [ { - "id": 118, + "id": 125, "name": "key", "kind": 32768, "kindString": "Parameter", @@ -14225,7 +14504,7 @@ ], "children": [ { - "id": 113, + "id": 120, "name": "init", "kind": 1024, "kindString": "Property", @@ -14244,7 +14523,7 @@ "type": { "type": "reflection", "declaration": { - "id": 114, + "id": 121, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -14253,7 +14532,7 @@ }, "signatures": [ { - "id": 115, + "id": 122, "name": "__call", "kind": 4096, "kindString": "Call signature", @@ -14262,7 +14541,7 @@ }, "parameters": [ { - "id": 116, + "id": 123, "name": "botkit", "kind": 32768, "kindString": "Parameter", @@ -14271,7 +14550,7 @@ }, "type": { "type": "reference", - "id": 119, + "id": 126, "name": "Botkit" } } @@ -14293,7 +14572,7 @@ } }, { - "id": 109, + "id": 116, "name": "middlewares", "kind": 1024, "kindString": "Property", @@ -14312,7 +14591,7 @@ "type": { "type": "reflection", "declaration": { - "id": 110, + "id": 117, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -14321,7 +14600,7 @@ }, "indexSignature": [ { - "id": 111, + "id": 118, "name": "__index", "kind": 8192, "kindString": "Index signature", @@ -14330,7 +14609,7 @@ }, "parameters": [ { - "id": 112, + "id": 119, "name": "key", "kind": 32768, "kindString": "Parameter", @@ -14363,7 +14642,7 @@ } }, { - "id": 108, + "id": 115, "name": "name", "kind": 1024, "kindString": "Property", @@ -14389,9 +14668,9 @@ "title": "Properties", "kind": 1024, "children": [ - 113, - 109, - 108 + 120, + 116, + 115 ] } ], @@ -14404,7 +14683,7 @@ ], "props": [ { - "id": 113, + "id": 120, "name": "init", "kind": 1024, "kindString": "Property", @@ -14423,7 +14702,7 @@ "type": { "type": "reflection", "declaration": { - "id": 114, + "id": 121, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -14432,7 +14711,7 @@ }, "signatures": [ { - "id": 115, + "id": 122, "name": "__call", "kind": 4096, "kindString": "Call signature", @@ -14441,7 +14720,7 @@ }, "parameters": [ { - "id": 116, + "id": 123, "name": "botkit", "kind": 32768, "kindString": "Parameter", @@ -14450,7 +14729,7 @@ }, "type": { "type": "reference", - "id": 119, + "id": 126, "name": "Botkit" } } @@ -14472,7 +14751,7 @@ } }, { - "id": 109, + "id": 116, "name": "middlewares", "kind": 1024, "kindString": "Property", @@ -14491,7 +14770,7 @@ "type": { "type": "reflection", "declaration": { - "id": 110, + "id": 117, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -14500,7 +14779,7 @@ }, "indexSignature": [ { - "id": 111, + "id": 118, "name": "__index", "kind": 8192, "kindString": "Index signature", @@ -14509,7 +14788,7 @@ }, "parameters": [ { - "id": 112, + "id": 119, "name": "key", "kind": 32768, "kindString": "Parameter", @@ -14542,7 +14821,7 @@ } }, { - "id": 108, + "id": 115, "name": "name", "kind": 1024, "kindString": "Property", @@ -14565,7 +14844,7 @@ ] }, { - "id": 100, + "id": 107, "name": "BotkitTrigger", "kind": 256, "kindString": "Interface", @@ -14577,7 +14856,7 @@ }, "children": [ { - "id": 106, + "id": 113, "name": "handler", "kind": 1024, "kindString": "Property", @@ -14593,12 +14872,12 @@ ], "type": { "type": "reference", - "id": 96, + "id": 103, "name": "BotkitHandler" } }, { - "id": 102, + "id": 109, "name": "pattern", "kind": 1024, "kindString": "Property", @@ -14626,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" } } @@ -14677,7 +14956,7 @@ } }, { - "id": 101, + "id": 108, "name": "type", "kind": 1024, "kindString": "Property", @@ -14705,9 +14984,9 @@ "title": "Properties", "kind": 1024, "children": [ - 106, - 102, - 101 + 113, + 109, + 108 ] } ], @@ -14720,7 +14999,7 @@ ], "props": [ { - "id": 106, + "id": 113, "name": "handler", "kind": 1024, "kindString": "Property", @@ -14736,12 +15015,12 @@ ], "type": { "type": "reference", - "id": 96, + "id": 103, "name": "BotkitHandler" } }, { - "id": 102, + "id": 109, "name": "pattern", "kind": 1024, "kindString": "Property", @@ -14769,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" } } @@ -14820,7 +15099,7 @@ } }, { - "id": 101, + "id": 108, "name": "type", "kind": 1024, "kindString": "Property", @@ -16627,7 +16906,7 @@ "sources": [ { "fileName": "webex_adapter.ts", - "line": 441, + "line": 442, "character": 87 } ] @@ -16650,7 +16929,7 @@ "sources": [ { "fileName": "webex_adapter.ts", - "line": 441, + "line": 442, "character": 37 } ] @@ -16732,7 +17011,7 @@ "sources": [ { "fileName": "webex_adapter.ts", - "line": 423, + "line": 424, "character": 31 } ] @@ -16945,7 +17224,7 @@ "sources": [ { "fileName": "webex_adapter.ts", - "line": 458, + "line": 459, "character": 49 } ] @@ -16968,7 +17247,7 @@ "sources": [ { "fileName": "webex_adapter.ts", - "line": 458, + "line": 459, "character": 32 } ] @@ -17403,7 +17682,7 @@ "sources": [ { "fileName": "webex_adapter.ts", - "line": 441, + "line": 442, "character": 87 } ] @@ -17426,7 +17705,7 @@ "sources": [ { "fileName": "webex_adapter.ts", - "line": 441, + "line": 442, "character": 37 } ] @@ -17508,7 +17787,7 @@ "sources": [ { "fileName": "webex_adapter.ts", - "line": 423, + "line": 424, "character": 31 } ] @@ -17721,7 +18000,7 @@ "sources": [ { "fileName": "webex_adapter.ts", - "line": 458, + "line": 459, "character": 49 } ] @@ -17744,7 +18023,7 @@ "sources": [ { "fileName": "webex_adapter.ts", - "line": 458, + "line": 459, "character": 32 } ] @@ -18873,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": [ { @@ -18886,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": [ { @@ -18978,7 +19257,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 301, + "line": 317, "character": 26 } ] @@ -19088,7 +19367,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 431, + "line": 447, "character": 87 } ] @@ -19111,7 +19390,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 431, + "line": 447, "character": 37 } ] @@ -19193,7 +19472,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 408, + "line": 424, "character": 31 } ] @@ -19259,7 +19538,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 187, + "line": 193, "character": 23 } ] @@ -19325,7 +19604,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 213, + "line": 219, "character": 33 } ] @@ -19363,7 +19642,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 244, + "line": 250, "character": 25 } ] @@ -19483,7 +19762,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 492, + "line": 508, "character": 49 } ] @@ -19506,7 +19785,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 492, + "line": 508, "character": 32 } ] @@ -19594,7 +19873,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 340, + "line": 356, "character": 31 } ] @@ -19676,7 +19955,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 385, + "line": 401, "character": 31 } ] @@ -19701,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": [ { @@ -19737,7 +20016,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 281, + "line": 291, "character": 34 } ] @@ -19839,7 +20118,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 301, + "line": 317, "character": 26 } ] @@ -19949,7 +20228,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 431, + "line": 447, "character": 87 } ] @@ -19972,7 +20251,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 431, + "line": 447, "character": 37 } ] @@ -20054,7 +20333,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 408, + "line": 424, "character": 31 } ] @@ -20120,7 +20399,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 187, + "line": 193, "character": 23 } ] @@ -20186,7 +20465,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 213, + "line": 219, "character": 33 } ] @@ -20224,7 +20503,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 244, + "line": 250, "character": 25 } ] @@ -20344,7 +20623,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 492, + "line": 508, "character": 49 } ] @@ -20367,7 +20646,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 492, + "line": 508, "character": 32 } ] @@ -20455,7 +20734,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 340, + "line": 356, "character": 31 } ] @@ -20537,7 +20816,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 385, + "line": 401, "character": 31 } ] @@ -20562,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": [ { @@ -20598,7 +20877,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 281, + "line": 291, "character": 34 } ] @@ -20617,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": [ { @@ -20630,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": [ { @@ -22990,7 +23269,7 @@ ] }, { - "id": 139, + "id": 140, "name": "SlackDialog", "kind": 128, "kindString": "Class", @@ -23004,7 +23283,7 @@ }, "children": [ { - "id": 140, + "id": 141, "name": "constructor", "kind": 512, "kindString": "Constructor", @@ -23018,7 +23297,7 @@ }, "signatures": [ { - "id": 141, + "id": 142, "name": "new SlackDialog", "kind": 16384, "kindString": "Constructor signature", @@ -23030,7 +23309,7 @@ }, "parameters": [ { - "id": 142, + "id": 143, "name": "title", "kind": 32768, "kindString": "Parameter", @@ -23047,7 +23326,7 @@ } }, { - "id": 143, + "id": 144, "name": "callback_id", "kind": 32768, "kindString": "Parameter", @@ -23064,7 +23343,7 @@ } }, { - "id": 144, + "id": 145, "name": "submit_label", "kind": 32768, "kindString": "Parameter", @@ -23081,7 +23360,7 @@ } }, { - "id": 145, + "id": 146, "name": "elements", "kind": 32768, "kindString": "Parameter", @@ -23100,7 +23379,7 @@ ], "type": { "type": "reference", - "id": 139, + "id": 140, "name": "SlackDialog" } } @@ -23114,7 +23393,7 @@ ] }, { - "id": 168, + "id": 169, "name": "addEmail", "kind": 2048, "kindString": "Method", @@ -23125,7 +23404,7 @@ }, "signatures": [ { - "id": 169, + "id": 170, "name": "addEmail", "kind": 4096, "kindString": "Call signature", @@ -23137,7 +23416,7 @@ }, "parameters": [ { - "id": 170, + "id": 171, "name": "label", "kind": 32768, "kindString": "Parameter", @@ -23151,7 +23430,7 @@ } }, { - "id": 171, + "id": 172, "name": "name", "kind": 32768, "kindString": "Parameter", @@ -23165,7 +23444,7 @@ } }, { - "id": 172, + "id": 173, "name": "value", "kind": 32768, "kindString": "Parameter", @@ -23179,7 +23458,7 @@ } }, { - "id": 173, + "id": 174, "name": "options", "kind": 32768, "kindString": "Parameter", @@ -23198,7 +23477,7 @@ ], "type": { "type": "reference", - "id": 139, + "id": 140, "name": "SlackDialog" } } @@ -23212,7 +23491,7 @@ ] }, { - "id": 174, + "id": 175, "name": "addNumber", "kind": 2048, "kindString": "Method", @@ -23223,7 +23502,7 @@ }, "signatures": [ { - "id": 175, + "id": 176, "name": "addNumber", "kind": 4096, "kindString": "Call signature", @@ -23235,7 +23514,7 @@ }, "parameters": [ { - "id": 176, + "id": 177, "name": "label", "kind": 32768, "kindString": "Parameter", @@ -23249,7 +23528,7 @@ } }, { - "id": 177, + "id": 178, "name": "name", "kind": 32768, "kindString": "Parameter", @@ -23263,7 +23542,7 @@ } }, { - "id": 178, + "id": 179, "name": "value", "kind": 32768, "kindString": "Parameter", @@ -23277,7 +23556,7 @@ } }, { - "id": 179, + "id": 180, "name": "options", "kind": 32768, "kindString": "Parameter", @@ -23296,7 +23575,7 @@ ], "type": { "type": "reference", - "id": 139, + "id": 140, "name": "SlackDialog" } } @@ -23310,7 +23589,7 @@ ] }, { - "id": 199, + "id": 200, "name": "addSelect", "kind": 2048, "kindString": "Method", @@ -23321,7 +23600,7 @@ }, "signatures": [ { - "id": 200, + "id": 201, "name": "addSelect", "kind": 4096, "kindString": "Call signature", @@ -23333,7 +23612,7 @@ }, "parameters": [ { - "id": 201, + "id": 202, "name": "label", "kind": 32768, "kindString": "Parameter", @@ -23347,7 +23626,7 @@ } }, { - "id": 202, + "id": 203, "name": "name", "kind": 32768, "kindString": "Parameter", @@ -23361,7 +23640,7 @@ } }, { - "id": 203, + "id": 204, "name": "value", "kind": 32768, "kindString": "Parameter", @@ -23402,7 +23681,7 @@ } }, { - "id": 204, + "id": 205, "name": "option_list", "kind": 32768, "kindString": "Parameter", @@ -23415,7 +23694,7 @@ "elementType": { "type": "reflection", "declaration": { - "id": 205, + "id": 206, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -23424,7 +23703,7 @@ }, "children": [ { - "id": 206, + "id": 207, "name": "label", "kind": 32, "kindString": "Variable", @@ -23445,7 +23724,7 @@ } }, { - "id": 207, + "id": 208, "name": "value", "kind": 32, "kindString": "Variable", @@ -23498,8 +23777,8 @@ "title": "Variables", "kind": 32, "children": [ - 206, - 207 + 207, + 208 ] } ], @@ -23515,7 +23794,7 @@ } }, { - "id": 208, + "id": 209, "name": "options", "kind": 32768, "kindString": "Parameter", @@ -23534,7 +23813,7 @@ ], "type": { "type": "reference", - "id": 139, + "id": 140, "name": "SlackDialog" } } @@ -23548,7 +23827,7 @@ ] }, { - "id": 180, + "id": 181, "name": "addTel", "kind": 2048, "kindString": "Method", @@ -23559,7 +23838,7 @@ }, "signatures": [ { - "id": 181, + "id": 182, "name": "addTel", "kind": 4096, "kindString": "Call signature", @@ -23571,7 +23850,7 @@ }, "parameters": [ { - "id": 182, + "id": 183, "name": "label", "kind": 32768, "kindString": "Parameter", @@ -23585,7 +23864,7 @@ } }, { - "id": 183, + "id": 184, "name": "name", "kind": 32768, "kindString": "Parameter", @@ -23599,7 +23878,7 @@ } }, { - "id": 184, + "id": 185, "name": "value", "kind": 32768, "kindString": "Parameter", @@ -23613,7 +23892,7 @@ } }, { - "id": 185, + "id": 186, "name": "options", "kind": 32768, "kindString": "Parameter", @@ -23632,7 +23911,7 @@ ], "type": { "type": "reference", - "id": 139, + "id": 140, "name": "SlackDialog" } } @@ -23646,7 +23925,7 @@ ] }, { - "id": 161, + "id": 162, "name": "addText", "kind": 2048, "kindString": "Method", @@ -23657,7 +23936,7 @@ }, "signatures": [ { - "id": 162, + "id": 163, "name": "addText", "kind": 4096, "kindString": "Call signature", @@ -23669,7 +23948,7 @@ }, "parameters": [ { - "id": 163, + "id": 164, "name": "label", "kind": 32768, "kindString": "Parameter", @@ -23692,7 +23971,7 @@ } }, { - "id": 164, + "id": 165, "name": "name", "kind": 32768, "kindString": "Parameter", @@ -23706,7 +23985,7 @@ } }, { - "id": 165, + "id": 166, "name": "value", "kind": 32768, "kindString": "Parameter", @@ -23720,7 +23999,7 @@ } }, { - "id": 166, + "id": 167, "name": "options", "kind": 32768, "kindString": "Parameter", @@ -23743,7 +24022,7 @@ } }, { - "id": 167, + "id": 168, "name": "subtype", "kind": 32768, "kindString": "Parameter", @@ -23762,7 +24041,7 @@ ], "type": { "type": "reference", - "id": 139, + "id": 140, "name": "SlackDialog" } } @@ -23776,7 +24055,7 @@ ] }, { - "id": 192, + "id": 193, "name": "addTextarea", "kind": 2048, "kindString": "Method", @@ -23787,7 +24066,7 @@ }, "signatures": [ { - "id": 193, + "id": 194, "name": "addTextarea", "kind": 4096, "kindString": "Call signature", @@ -23799,7 +24078,7 @@ }, "parameters": [ { - "id": 194, + "id": 195, "name": "label", "kind": 32768, "kindString": "Parameter", @@ -23813,7 +24092,7 @@ } }, { - "id": 195, + "id": 196, "name": "name", "kind": 32768, "kindString": "Parameter", @@ -23827,7 +24106,7 @@ } }, { - "id": 196, + "id": 197, "name": "value", "kind": 32768, "kindString": "Parameter", @@ -23841,7 +24120,7 @@ } }, { - "id": 197, + "id": 198, "name": "options", "kind": 32768, "kindString": "Parameter", @@ -23855,7 +24134,7 @@ } }, { - "id": 198, + "id": 199, "name": "subtype", "kind": 32768, "kindString": "Parameter", @@ -23873,7 +24152,7 @@ ], "type": { "type": "reference", - "id": 139, + "id": 140, "name": "SlackDialog" } } @@ -23887,7 +24166,7 @@ ] }, { - "id": 186, + "id": 187, "name": "addUrl", "kind": 2048, "kindString": "Method", @@ -23898,7 +24177,7 @@ }, "signatures": [ { - "id": 187, + "id": 188, "name": "addUrl", "kind": 4096, "kindString": "Call signature", @@ -23910,7 +24189,7 @@ }, "parameters": [ { - "id": 188, + "id": 189, "name": "label", "kind": 32768, "kindString": "Parameter", @@ -23924,7 +24203,7 @@ } }, { - "id": 189, + "id": 190, "name": "name", "kind": 32768, "kindString": "Parameter", @@ -23938,7 +24217,7 @@ } }, { - "id": 190, + "id": 191, "name": "value", "kind": 32768, "kindString": "Parameter", @@ -23952,7 +24231,7 @@ } }, { - "id": 191, + "id": 192, "name": "options", "kind": 32768, "kindString": "Parameter", @@ -23971,7 +24250,7 @@ ], "type": { "type": "reference", - "id": 139, + "id": 140, "name": "SlackDialog" } } @@ -23985,7 +24264,7 @@ ] }, { - "id": 211, + "id": 212, "name": "asObject", "kind": 2048, "kindString": "Method", @@ -23996,7 +24275,7 @@ }, "signatures": [ { - "id": 212, + "id": 213, "name": "asObject", "kind": 4096, "kindString": "Call signature", @@ -24021,7 +24300,7 @@ ] }, { - "id": 209, + "id": 210, "name": "asString", "kind": 2048, "kindString": "Method", @@ -24032,7 +24311,7 @@ }, "signatures": [ { - "id": 210, + "id": 211, "name": "asString", "kind": 4096, "kindString": "Call signature", @@ -24057,7 +24336,7 @@ ] }, { - "id": 155, + "id": 156, "name": "callback_id", "kind": 2048, "kindString": "Method", @@ -24068,7 +24347,7 @@ }, "signatures": [ { - "id": 156, + "id": 157, "name": "callback_id", "kind": 4096, "kindString": "Call signature", @@ -24080,7 +24359,7 @@ }, "parameters": [ { - "id": 157, + "id": 158, "name": "v", "kind": 32768, "kindString": "Parameter", @@ -24098,7 +24377,7 @@ ], "type": { "type": "reference", - "id": 139, + "id": 140, "name": "SlackDialog" } } @@ -24112,7 +24391,7 @@ ] }, { - "id": 149, + "id": 150, "name": "notifyOnCancel", "kind": 2048, "kindString": "Method", @@ -24123,7 +24402,7 @@ }, "signatures": [ { - "id": 150, + "id": 151, "name": "notifyOnCancel", "kind": 4096, "kindString": "Call signature", @@ -24135,7 +24414,7 @@ }, "parameters": [ { - "id": 151, + "id": 152, "name": "set", "kind": 32768, "kindString": "Parameter", @@ -24153,7 +24432,7 @@ ], "type": { "type": "reference", - "id": 139, + "id": 140, "name": "SlackDialog" } } @@ -24167,7 +24446,7 @@ ] }, { - "id": 146, + "id": 147, "name": "state", "kind": 2048, "kindString": "Method", @@ -24178,7 +24457,7 @@ }, "signatures": [ { - "id": 147, + "id": 148, "name": "state", "kind": 4096, "kindString": "Call signature", @@ -24190,7 +24469,7 @@ }, "parameters": [ { - "id": 148, + "id": 149, "name": "v", "kind": 32768, "kindString": "Parameter", @@ -24208,7 +24487,7 @@ ], "type": { "type": "reference", - "id": 139, + "id": 140, "name": "SlackDialog" } } @@ -24222,7 +24501,7 @@ ] }, { - "id": 158, + "id": 159, "name": "submit_label", "kind": 2048, "kindString": "Method", @@ -24233,7 +24512,7 @@ }, "signatures": [ { - "id": 159, + "id": 160, "name": "submit_label", "kind": 4096, "kindString": "Call signature", @@ -24245,7 +24524,7 @@ }, "parameters": [ { - "id": 160, + "id": 161, "name": "v", "kind": 32768, "kindString": "Parameter", @@ -24263,7 +24542,7 @@ ], "type": { "type": "reference", - "id": 139, + "id": 140, "name": "SlackDialog" } } @@ -24277,7 +24556,7 @@ ] }, { - "id": 152, + "id": 153, "name": "title", "kind": 2048, "kindString": "Method", @@ -24288,7 +24567,7 @@ }, "signatures": [ { - "id": 153, + "id": 154, "name": "title", "kind": 4096, "kindString": "Call signature", @@ -24300,7 +24579,7 @@ }, "parameters": [ { - "id": 154, + "id": 155, "name": "v", "kind": 32768, "kindString": "Parameter", @@ -24318,7 +24597,7 @@ ], "type": { "type": "reference", - "id": 139, + "id": 140, "name": "SlackDialog" } } @@ -24337,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 ] } ], @@ -24371,7 +24650,7 @@ "props": [], "methods": [ { - "id": 168, + "id": 169, "name": "addEmail", "kind": 2048, "kindString": "Method", @@ -24382,7 +24661,7 @@ }, "signatures": [ { - "id": 169, + "id": 170, "name": "addEmail", "kind": 4096, "kindString": "Call signature", @@ -24394,7 +24673,7 @@ }, "parameters": [ { - "id": 170, + "id": 171, "name": "label", "kind": 32768, "kindString": "Parameter", @@ -24408,7 +24687,7 @@ } }, { - "id": 171, + "id": 172, "name": "name", "kind": 32768, "kindString": "Parameter", @@ -24422,7 +24701,7 @@ } }, { - "id": 172, + "id": 173, "name": "value", "kind": 32768, "kindString": "Parameter", @@ -24436,7 +24715,7 @@ } }, { - "id": 173, + "id": 174, "name": "options", "kind": 32768, "kindString": "Parameter", @@ -24455,7 +24734,7 @@ ], "type": { "type": "reference", - "id": 139, + "id": 140, "name": "SlackDialog" } } @@ -24469,7 +24748,7 @@ ] }, { - "id": 174, + "id": 175, "name": "addNumber", "kind": 2048, "kindString": "Method", @@ -24480,7 +24759,7 @@ }, "signatures": [ { - "id": 175, + "id": 176, "name": "addNumber", "kind": 4096, "kindString": "Call signature", @@ -24492,7 +24771,7 @@ }, "parameters": [ { - "id": 176, + "id": 177, "name": "label", "kind": 32768, "kindString": "Parameter", @@ -24506,7 +24785,7 @@ } }, { - "id": 177, + "id": 178, "name": "name", "kind": 32768, "kindString": "Parameter", @@ -24520,7 +24799,7 @@ } }, { - "id": 178, + "id": 179, "name": "value", "kind": 32768, "kindString": "Parameter", @@ -24534,7 +24813,7 @@ } }, { - "id": 179, + "id": 180, "name": "options", "kind": 32768, "kindString": "Parameter", @@ -24553,7 +24832,7 @@ ], "type": { "type": "reference", - "id": 139, + "id": 140, "name": "SlackDialog" } } @@ -24567,7 +24846,7 @@ ] }, { - "id": 199, + "id": 200, "name": "addSelect", "kind": 2048, "kindString": "Method", @@ -24578,7 +24857,7 @@ }, "signatures": [ { - "id": 200, + "id": 201, "name": "addSelect", "kind": 4096, "kindString": "Call signature", @@ -24590,7 +24869,7 @@ }, "parameters": [ { - "id": 201, + "id": 202, "name": "label", "kind": 32768, "kindString": "Parameter", @@ -24604,7 +24883,7 @@ } }, { - "id": 202, + "id": 203, "name": "name", "kind": 32768, "kindString": "Parameter", @@ -24618,7 +24897,7 @@ } }, { - "id": 203, + "id": 204, "name": "value", "kind": 32768, "kindString": "Parameter", @@ -24659,7 +24938,7 @@ } }, { - "id": 204, + "id": 205, "name": "option_list", "kind": 32768, "kindString": "Parameter", @@ -24672,7 +24951,7 @@ "elementType": { "type": "reflection", "declaration": { - "id": 205, + "id": 206, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -24681,7 +24960,7 @@ }, "children": [ { - "id": 206, + "id": 207, "name": "label", "kind": 32, "kindString": "Variable", @@ -24702,7 +24981,7 @@ } }, { - "id": 207, + "id": 208, "name": "value", "kind": 32, "kindString": "Variable", @@ -24755,8 +25034,8 @@ "title": "Variables", "kind": 32, "children": [ - 206, - 207 + 207, + 208 ] } ], @@ -24772,7 +25051,7 @@ } }, { - "id": 208, + "id": 209, "name": "options", "kind": 32768, "kindString": "Parameter", @@ -24791,7 +25070,7 @@ ], "type": { "type": "reference", - "id": 139, + "id": 140, "name": "SlackDialog" } } @@ -24805,7 +25084,7 @@ ] }, { - "id": 180, + "id": 181, "name": "addTel", "kind": 2048, "kindString": "Method", @@ -24816,7 +25095,7 @@ }, "signatures": [ { - "id": 181, + "id": 182, "name": "addTel", "kind": 4096, "kindString": "Call signature", @@ -24828,7 +25107,7 @@ }, "parameters": [ { - "id": 182, + "id": 183, "name": "label", "kind": 32768, "kindString": "Parameter", @@ -24842,7 +25121,7 @@ } }, { - "id": 183, + "id": 184, "name": "name", "kind": 32768, "kindString": "Parameter", @@ -24856,7 +25135,7 @@ } }, { - "id": 184, + "id": 185, "name": "value", "kind": 32768, "kindString": "Parameter", @@ -24870,7 +25149,7 @@ } }, { - "id": 185, + "id": 186, "name": "options", "kind": 32768, "kindString": "Parameter", @@ -24889,7 +25168,7 @@ ], "type": { "type": "reference", - "id": 139, + "id": 140, "name": "SlackDialog" } } @@ -24903,7 +25182,7 @@ ] }, { - "id": 161, + "id": 162, "name": "addText", "kind": 2048, "kindString": "Method", @@ -24914,7 +25193,7 @@ }, "signatures": [ { - "id": 162, + "id": 163, "name": "addText", "kind": 4096, "kindString": "Call signature", @@ -24926,7 +25205,7 @@ }, "parameters": [ { - "id": 163, + "id": 164, "name": "label", "kind": 32768, "kindString": "Parameter", @@ -24949,7 +25228,7 @@ } }, { - "id": 164, + "id": 165, "name": "name", "kind": 32768, "kindString": "Parameter", @@ -24963,7 +25242,7 @@ } }, { - "id": 165, + "id": 166, "name": "value", "kind": 32768, "kindString": "Parameter", @@ -24977,7 +25256,7 @@ } }, { - "id": 166, + "id": 167, "name": "options", "kind": 32768, "kindString": "Parameter", @@ -25000,7 +25279,7 @@ } }, { - "id": 167, + "id": 168, "name": "subtype", "kind": 32768, "kindString": "Parameter", @@ -25019,7 +25298,7 @@ ], "type": { "type": "reference", - "id": 139, + "id": 140, "name": "SlackDialog" } } @@ -25033,7 +25312,7 @@ ] }, { - "id": 192, + "id": 193, "name": "addTextarea", "kind": 2048, "kindString": "Method", @@ -25044,7 +25323,7 @@ }, "signatures": [ { - "id": 193, + "id": 194, "name": "addTextarea", "kind": 4096, "kindString": "Call signature", @@ -25056,7 +25335,7 @@ }, "parameters": [ { - "id": 194, + "id": 195, "name": "label", "kind": 32768, "kindString": "Parameter", @@ -25070,7 +25349,7 @@ } }, { - "id": 195, + "id": 196, "name": "name", "kind": 32768, "kindString": "Parameter", @@ -25084,7 +25363,7 @@ } }, { - "id": 196, + "id": 197, "name": "value", "kind": 32768, "kindString": "Parameter", @@ -25098,7 +25377,7 @@ } }, { - "id": 197, + "id": 198, "name": "options", "kind": 32768, "kindString": "Parameter", @@ -25112,7 +25391,7 @@ } }, { - "id": 198, + "id": 199, "name": "subtype", "kind": 32768, "kindString": "Parameter", @@ -25130,7 +25409,7 @@ ], "type": { "type": "reference", - "id": 139, + "id": 140, "name": "SlackDialog" } } @@ -25144,7 +25423,7 @@ ] }, { - "id": 186, + "id": 187, "name": "addUrl", "kind": 2048, "kindString": "Method", @@ -25155,7 +25434,7 @@ }, "signatures": [ { - "id": 187, + "id": 188, "name": "addUrl", "kind": 4096, "kindString": "Call signature", @@ -25167,7 +25446,7 @@ }, "parameters": [ { - "id": 188, + "id": 189, "name": "label", "kind": 32768, "kindString": "Parameter", @@ -25181,7 +25460,7 @@ } }, { - "id": 189, + "id": 190, "name": "name", "kind": 32768, "kindString": "Parameter", @@ -25195,7 +25474,7 @@ } }, { - "id": 190, + "id": 191, "name": "value", "kind": 32768, "kindString": "Parameter", @@ -25209,7 +25488,7 @@ } }, { - "id": 191, + "id": 192, "name": "options", "kind": 32768, "kindString": "Parameter", @@ -25228,7 +25507,7 @@ ], "type": { "type": "reference", - "id": 139, + "id": 140, "name": "SlackDialog" } } @@ -25242,7 +25521,7 @@ ] }, { - "id": 211, + "id": 212, "name": "asObject", "kind": 2048, "kindString": "Method", @@ -25253,7 +25532,7 @@ }, "signatures": [ { - "id": 212, + "id": 213, "name": "asObject", "kind": 4096, "kindString": "Call signature", @@ -25278,7 +25557,7 @@ ] }, { - "id": 209, + "id": 210, "name": "asString", "kind": 2048, "kindString": "Method", @@ -25289,7 +25568,7 @@ }, "signatures": [ { - "id": 210, + "id": 211, "name": "asString", "kind": 4096, "kindString": "Call signature", @@ -25314,7 +25593,7 @@ ] }, { - "id": 155, + "id": 156, "name": "callback_id", "kind": 2048, "kindString": "Method", @@ -25325,7 +25604,7 @@ }, "signatures": [ { - "id": 156, + "id": 157, "name": "callback_id", "kind": 4096, "kindString": "Call signature", @@ -25337,7 +25616,7 @@ }, "parameters": [ { - "id": 157, + "id": 158, "name": "v", "kind": 32768, "kindString": "Parameter", @@ -25355,7 +25634,7 @@ ], "type": { "type": "reference", - "id": 139, + "id": 140, "name": "SlackDialog" } } @@ -25369,7 +25648,7 @@ ] }, { - "id": 149, + "id": 150, "name": "notifyOnCancel", "kind": 2048, "kindString": "Method", @@ -25380,7 +25659,7 @@ }, "signatures": [ { - "id": 150, + "id": 151, "name": "notifyOnCancel", "kind": 4096, "kindString": "Call signature", @@ -25392,7 +25671,7 @@ }, "parameters": [ { - "id": 151, + "id": 152, "name": "set", "kind": 32768, "kindString": "Parameter", @@ -25410,7 +25689,7 @@ ], "type": { "type": "reference", - "id": 139, + "id": 140, "name": "SlackDialog" } } @@ -25424,7 +25703,7 @@ ] }, { - "id": 146, + "id": 147, "name": "state", "kind": 2048, "kindString": "Method", @@ -25435,7 +25714,7 @@ }, "signatures": [ { - "id": 147, + "id": 148, "name": "state", "kind": 4096, "kindString": "Call signature", @@ -25447,7 +25726,7 @@ }, "parameters": [ { - "id": 148, + "id": 149, "name": "v", "kind": 32768, "kindString": "Parameter", @@ -25465,7 +25744,7 @@ ], "type": { "type": "reference", - "id": 139, + "id": 140, "name": "SlackDialog" } } @@ -25479,7 +25758,7 @@ ] }, { - "id": 158, + "id": 159, "name": "submit_label", "kind": 2048, "kindString": "Method", @@ -25490,7 +25769,7 @@ }, "signatures": [ { - "id": 159, + "id": 160, "name": "submit_label", "kind": 4096, "kindString": "Call signature", @@ -25502,7 +25781,7 @@ }, "parameters": [ { - "id": 160, + "id": 161, "name": "v", "kind": 32768, "kindString": "Parameter", @@ -25520,7 +25799,7 @@ ], "type": { "type": "reference", - "id": 139, + "id": 140, "name": "SlackDialog" } } @@ -25534,7 +25813,7 @@ ] }, { - "id": 152, + "id": 153, "name": "title", "kind": 2048, "kindString": "Method", @@ -25545,7 +25824,7 @@ }, "signatures": [ { - "id": 153, + "id": 154, "name": "title", "kind": 4096, "kindString": "Call signature", @@ -25557,7 +25836,7 @@ }, "parameters": [ { - "id": 154, + "id": 155, "name": "v", "kind": 32768, "kindString": "Parameter", @@ -25575,7 +25854,7 @@ ], "type": { "type": "reference", - "id": 139, + "id": 140, "name": "SlackDialog" } } @@ -25591,7 +25870,7 @@ ], "constructors": [ { - "id": 140, + "id": 141, "name": "constructor", "kind": 512, "kindString": "Constructor", @@ -25605,7 +25884,7 @@ }, "signatures": [ { - "id": 141, + "id": 142, "name": "new SlackDialog", "kind": 16384, "kindString": "Constructor signature", @@ -25617,7 +25896,7 @@ }, "parameters": [ { - "id": 142, + "id": 143, "name": "title", "kind": 32768, "kindString": "Parameter", @@ -25634,7 +25913,7 @@ } }, { - "id": 143, + "id": 144, "name": "callback_id", "kind": 32768, "kindString": "Parameter", @@ -25651,7 +25930,7 @@ } }, { - "id": 144, + "id": 145, "name": "submit_label", "kind": 32768, "kindString": "Parameter", @@ -25668,7 +25947,7 @@ } }, { - "id": 145, + "id": 146, "name": "elements", "kind": 32768, "kindString": "Parameter", @@ -25687,7 +25966,7 @@ ], "type": { "type": "reference", - "id": 139, + "id": 140, "name": "SlackDialog" } } @@ -25703,7 +25982,7 @@ ] }, { - "id": 222, + "id": 223, "name": "SlackEventMiddleware", "kind": 128, "kindString": "Class", @@ -25717,7 +25996,7 @@ }, "children": [ { - "id": 223, + "id": 224, "name": "onTurn", "kind": 2048, "kindString": "Method", @@ -25728,7 +26007,7 @@ }, "signatures": [ { - "id": 224, + "id": 225, "name": "onTurn", "kind": 4096, "kindString": "Call signature", @@ -25740,7 +26019,7 @@ }, "parameters": [ { - "id": 225, + "id": 226, "name": "context", "kind": 32768, "kindString": "Parameter", @@ -25754,7 +26033,7 @@ } }, { - "id": 226, + "id": 227, "name": "next", "kind": 32768, "kindString": "Parameter", @@ -25767,7 +26046,7 @@ "type": { "type": "reflection", "declaration": { - "id": 227, + "id": 228, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -25776,7 +26055,7 @@ }, "signatures": [ { - "id": 228, + "id": 229, "name": "__call", "kind": 4096, "kindString": "Call signature", @@ -25832,7 +26111,7 @@ "title": "Methods", "kind": 2048, "children": [ - 223 + 224 ] } ], @@ -25852,134 +26131,7 @@ "props": [], "methods": [ { - "id": 223, - "name": "onTurn", - "kind": 2048, - "kindString": "Method", - "flags": { - "isPublic": true, - "isExported": true, - "isExternal": true - }, - "signatures": [ - { - "id": 224, - "name": "onTurn", - "kind": 4096, - "kindString": "Call signature", - "flags": { - "isExported": true - }, - "comment": { - "shortText": "Not for direct use - implements the MiddlewareSet's required onTurn function used to process the event" - }, - "parameters": [ - { - "id": 225, - "name": "context", - "kind": 32768, - "kindString": "Parameter", - "flags": { - "isExported": true - }, - "comment": {}, - "type": { - "type": "reference", - "name": "TurnContext" - } - }, - { - "id": 226, - "name": "next", - "kind": 32768, - "kindString": "Parameter", - "flags": { - "isExported": true - }, - "comment": { - "text": "\n" - }, - "type": { - "type": "reflection", - "declaration": { - "id": 227, - "name": "__type", - "kind": 65536, - "kindString": "Type literal", - "flags": { - "isExported": true - }, - "signatures": [ - { - "id": 228, - "name": "__call", - "kind": 4096, - "kindString": "Call signature", - "flags": { - "isExported": true - }, - "type": { - "type": "reference", - "typeArguments": [ - { - "type": "intrinsic", - "name": "any" - } - ], - "name": "Promise" - } - } - ], - "sources": [ - { - "fileName": "slackevent_middleware.ts", - "line": 36, - "character": 51 - } - ] - } - } - } - ], - "type": { - "type": "reference", - "typeArguments": [ - { - "type": "intrinsic", - "name": "any" - } - ], - "name": "Promise" - } - } - ], - "sources": [ - { - "fileName": "slackevent_middleware.ts", - "line": 36, - "character": 23 - } - ] - } - ], - "constructors": [] - }, - { - "id": 214, - "name": "SlackMessageTypeMiddleware", - "kind": 128, - "kindString": "Class", - "flags": { - "isExported": true, - "isExternal": true - }, - "comment": { - "shortText": "A middleware for Botkit developers using the BotBuilder SlackAdapter class.\nThis middleware causes Botkit to emit more specialized events for the different types of message that Slack might send.\nResponsible for classifying messages:", - "text": " * `direct_message` events are messages received through 1:1 direct messages with the bot\n * `direct_mention` events are messages that start with a mention of the bot, i.e \"@mybot hello there\"\n * `mention` events are messages that include a mention of the bot, but not at the start, i.e \"hello there @mybot\"\n\nIn addition, messages from bots and changing them to `bot_message` events. All other types of message encountered remain `message` events.\n\nTo use this, bind it to the adapter before creating the Botkit controller:\n```javascript\nconst adapter = new SlackAdapter(options);\nadapter.use(new SlackMessageTypeMiddleware());\nconst controller = new Botkit({\n adapter: adapter,\n // ...\n});\n```\n" - }, - "children": [ - { - "id": 215, + "id": 224, "name": "onTurn", "kind": 2048, "kindString": "Method", @@ -25990,7 +26142,7 @@ }, "signatures": [ { - "id": 216, + "id": 225, "name": "onTurn", "kind": 4096, "kindString": "Call signature", @@ -26002,7 +26154,7 @@ }, "parameters": [ { - "id": 217, + "id": 226, "name": "context", "kind": 32768, "kindString": "Parameter", @@ -26015,8 +26167,135 @@ "name": "TurnContext" } }, + { + "id": 227, + "name": "next", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "isExported": true + }, + "comment": { + "text": "\n" + }, + "type": { + "type": "reflection", + "declaration": { + "id": 228, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": { + "isExported": true + }, + "signatures": [ + { + "id": 229, + "name": "__call", + "kind": 4096, + "kindString": "Call signature", + "flags": { + "isExported": true + }, + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "intrinsic", + "name": "any" + } + ], + "name": "Promise" + } + } + ], + "sources": [ + { + "fileName": "slackevent_middleware.ts", + "line": 36, + "character": 51 + } + ] + } + } + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "intrinsic", + "name": "any" + } + ], + "name": "Promise" + } + } + ], + "sources": [ + { + "fileName": "slackevent_middleware.ts", + "line": 36, + "character": 23 + } + ] + } + ], + "constructors": [] + }, + { + "id": 215, + "name": "SlackMessageTypeMiddleware", + "kind": 128, + "kindString": "Class", + "flags": { + "isExported": true, + "isExternal": true + }, + "comment": { + "shortText": "A middleware for Botkit developers using the BotBuilder SlackAdapter class.\nThis middleware causes Botkit to emit more specialized events for the different types of message that Slack might send.\nResponsible for classifying messages:", + "text": " * `direct_message` events are messages received through 1:1 direct messages with the bot\n * `direct_mention` events are messages that start with a mention of the bot, i.e \"@mybot hello there\"\n * `mention` events are messages that include a mention of the bot, but not at the start, i.e \"hello there @mybot\"\n\nIn addition, messages from bots and changing them to `bot_message` events. All other types of message encountered remain `message` events.\n\nTo use this, bind it to the adapter before creating the Botkit controller:\n```javascript\nconst adapter = new SlackAdapter(options);\nadapter.use(new SlackMessageTypeMiddleware());\nconst controller = new Botkit({\n adapter: adapter,\n // ...\n});\n```\n" + }, + "children": [ + { + "id": 216, + "name": "onTurn", + "kind": 2048, + "kindString": "Method", + "flags": { + "isPublic": true, + "isExported": true, + "isExternal": true + }, + "signatures": [ + { + "id": 217, + "name": "onTurn", + "kind": 4096, + "kindString": "Call signature", + "flags": { + "isExported": true + }, + "comment": { + "shortText": "Not for direct use - implements the MiddlewareSet's required onTurn function used to process the event" + }, + "parameters": [ { "id": 218, + "name": "context", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "isExported": true + }, + "comment": {}, + "type": { + "type": "reference", + "name": "TurnContext" + } + }, + { + "id": 219, "name": "next", "kind": 32768, "kindString": "Parameter", @@ -26029,7 +26308,7 @@ "type": { "type": "reflection", "declaration": { - "id": 219, + "id": 220, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -26038,7 +26317,7 @@ }, "signatures": [ { - "id": 220, + "id": 221, "name": "__call", "kind": 4096, "kindString": "Call signature", @@ -26094,7 +26373,7 @@ "title": "Methods", "kind": 2048, "children": [ - 215 + 216 ] } ], @@ -26114,7 +26393,7 @@ "props": [], "methods": [ { - "id": 215, + "id": 216, "name": "onTurn", "kind": 2048, "kindString": "Method", @@ -26125,7 +26404,7 @@ }, "signatures": [ { - "id": 216, + "id": 217, "name": "onTurn", "kind": 4096, "kindString": "Call signature", @@ -26137,7 +26416,7 @@ }, "parameters": [ { - "id": 217, + "id": 218, "name": "context", "kind": 32768, "kindString": "Parameter", @@ -26151,7 +26430,7 @@ } }, { - "id": 218, + "id": 219, "name": "next", "kind": 32768, "kindString": "Parameter", @@ -26164,7 +26443,7 @@ "type": { "type": "reflection", "declaration": { - "id": 219, + "id": 220, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -26173,7 +26452,7 @@ }, "signatures": [ { - "id": 220, + "id": 221, "name": "__call", "kind": 4096, "kindString": "Call signature", @@ -26229,7 +26508,7 @@ ], "interfaces": [ { - "id": 131, + "id": 132, "name": "AuthTestResult", "kind": 256, "kindString": "Interface", @@ -26238,7 +26517,7 @@ }, "children": [ { - "id": 136, + "id": 137, "name": "ok", "kind": 1024, "kindString": "Property", @@ -26248,7 +26527,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 769, + "line": 792, "character": 6 } ], @@ -26258,7 +26537,7 @@ } }, { - "id": 133, + "id": 134, "name": "team", "kind": 1024, "kindString": "Property", @@ -26268,7 +26547,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 766, + "line": 789, "character": 8 } ], @@ -26278,7 +26557,7 @@ } }, { - "id": 134, + "id": 135, "name": "team_id", "kind": 1024, "kindString": "Property", @@ -26288,7 +26567,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 767, + "line": 790, "character": 11 } ], @@ -26298,7 +26577,7 @@ } }, { - "id": 132, + "id": 133, "name": "user", "kind": 1024, "kindString": "Property", @@ -26308,7 +26587,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 765, + "line": 788, "character": 8 } ], @@ -26318,7 +26597,7 @@ } }, { - "id": 135, + "id": 136, "name": "user_id", "kind": 1024, "kindString": "Property", @@ -26328,7 +26607,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 768, + "line": 791, "character": 11 } ], @@ -26343,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 } ], @@ -26366,7 +26645,7 @@ ], "props": [ { - "id": 136, + "id": 137, "name": "ok", "kind": 1024, "kindString": "Property", @@ -26376,7 +26655,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 769, + "line": 792, "character": 6 } ], @@ -26386,7 +26665,7 @@ } }, { - "id": 133, + "id": 134, "name": "team", "kind": 1024, "kindString": "Property", @@ -26396,7 +26675,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 766, + "line": 789, "character": 8 } ], @@ -26406,7 +26685,7 @@ } }, { - "id": 134, + "id": 135, "name": "team_id", "kind": 1024, "kindString": "Property", @@ -26416,7 +26695,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 767, + "line": 790, "character": 11 } ], @@ -26426,7 +26705,7 @@ } }, { - "id": 132, + "id": 133, "name": "user", "kind": 1024, "kindString": "Property", @@ -26436,7 +26715,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 765, + "line": 788, "character": 8 } ], @@ -26446,7 +26725,7 @@ } }, { - "id": 135, + "id": 136, "name": "user_id", "kind": 1024, "kindString": "Property", @@ -26456,7 +26735,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 768, + "line": 791, "character": 11 } ], @@ -26468,7 +26747,7 @@ ] }, { - "id": 125, + "id": 126, "name": "ChatPostMessageResult", "kind": 256, "kindString": "Interface", @@ -26477,7 +26756,7 @@ }, "children": [ { - "id": 126, + "id": 127, "name": "channel", "kind": 1024, "kindString": "Property", @@ -26487,7 +26766,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 755, + "line": 778, "character": 11 } ], @@ -26497,7 +26776,7 @@ } }, { - "id": 128, + "id": 129, "name": "message", "kind": 1024, "kindString": "Property", @@ -26507,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", @@ -26531,7 +26810,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 758, + "line": 781, "character": 12 } ], @@ -26546,14 +26825,14 @@ "title": "Variables", "kind": 32, "children": [ - 130 + 131 ] } ], "sources": [ { "fileName": "slack_adapter.ts", - "line": 757, + "line": 780, "character": 12 } ] @@ -26561,7 +26840,7 @@ } }, { - "id": 127, + "id": 128, "name": "ts", "kind": 1024, "kindString": "Property", @@ -26571,7 +26850,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 756, + "line": 779, "character": 6 } ], @@ -26586,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 } ], @@ -26607,7 +26886,7 @@ ], "props": [ { - "id": 126, + "id": 127, "name": "channel", "kind": 1024, "kindString": "Property", @@ -26617,7 +26896,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 755, + "line": 778, "character": 11 } ], @@ -26627,7 +26906,7 @@ } }, { - "id": 128, + "id": 129, "name": "message", "kind": 1024, "kindString": "Property", @@ -26637,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", @@ -26661,7 +26940,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 758, + "line": 781, "character": 12 } ], @@ -26676,14 +26955,14 @@ "title": "Variables", "kind": 32, "children": [ - 130 + 131 ] } ], "sources": [ { "fileName": "slack_adapter.ts", - "line": 757, + "line": 780, "character": 12 } ] @@ -26691,7 +26970,7 @@ } }, { - "id": 127, + "id": 128, "name": "ts", "kind": 1024, "kindString": "Property", @@ -26701,7 +26980,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 756, + "line": 779, "character": 6 } ], @@ -26741,7 +27020,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 715, + "line": 734, "character": 12 } ], @@ -26766,7 +27045,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 720, + "line": 739, "character": 12 } ], @@ -26791,7 +27070,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 724, + "line": 743, "character": 16 } ], @@ -26816,7 +27095,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 711, + "line": 730, "character": 23 } ], @@ -26826,7 +27105,7 @@ } }, { - "id": 124, + "id": 125, "name": "enable_incomplete", "kind": 1024, "kindString": "Property", @@ -26841,7 +27120,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 749, + "line": 772, "character": 21 } ], @@ -26851,7 +27130,7 @@ } }, { - "id": 120, + "id": 121, "name": "getBotUserByTeam", "kind": 1024, "kindString": "Property", @@ -26866,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", @@ -26882,7 +27161,7 @@ }, "signatures": [ { - "id": 122, + "id": 123, "name": "__call", "kind": 4096, "kindString": "Call signature", @@ -26891,7 +27170,7 @@ }, "parameters": [ { - "id": 123, + "id": 124, "name": "teamId", "kind": 32768, "kindString": "Parameter", @@ -26919,7 +27198,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 742, + "line": 765, "character": 22 } ] @@ -26927,7 +27206,7 @@ } }, { - "id": 116, + "id": 117, "name": "getTokenForTeam", "kind": 1024, "kindString": "Property", @@ -26942,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", @@ -26958,7 +27237,7 @@ }, "signatures": [ { - "id": 118, + "id": 119, "name": "__call", "kind": 4096, "kindString": "Call signature", @@ -26967,7 +27246,7 @@ }, "parameters": [ { - "id": 119, + "id": 120, "name": "teamId", "kind": 32768, "kindString": "Parameter", @@ -26995,7 +27274,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 737, + "line": 760, "character": 21 } ] @@ -27004,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", @@ -27018,7 +27322,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 732, + "line": 755, "character": 15 } ], @@ -27038,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 } ], @@ -27071,7 +27375,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 707, + "line": 726, "character": 21 } ], @@ -27090,10 +27394,11 @@ 112, 113, 110, - 124, - 120, - 116, + 125, + 121, + 117, 115, + 116, 114, 109 ] @@ -27102,7 +27407,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 703, + "line": 722, "character": 36 } ], @@ -27123,7 +27428,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 715, + "line": 734, "character": 12 } ], @@ -27148,7 +27453,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 720, + "line": 739, "character": 12 } ], @@ -27173,7 +27478,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 724, + "line": 743, "character": 16 } ], @@ -27198,7 +27503,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 711, + "line": 730, "character": 23 } ], @@ -27208,7 +27513,7 @@ } }, { - "id": 124, + "id": 125, "name": "enable_incomplete", "kind": 1024, "kindString": "Property", @@ -27223,7 +27528,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 749, + "line": 772, "character": 21 } ], @@ -27233,7 +27538,7 @@ } }, { - "id": 120, + "id": 121, "name": "getBotUserByTeam", "kind": 1024, "kindString": "Property", @@ -27248,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", @@ -27264,7 +27569,7 @@ }, "signatures": [ { - "id": 122, + "id": 123, "name": "__call", "kind": 4096, "kindString": "Call signature", @@ -27273,7 +27578,7 @@ }, "parameters": [ { - "id": 123, + "id": 124, "name": "teamId", "kind": 32768, "kindString": "Parameter", @@ -27301,7 +27606,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 742, + "line": 765, "character": 22 } ] @@ -27309,7 +27614,7 @@ } }, { - "id": 116, + "id": 117, "name": "getTokenForTeam", "kind": 1024, "kindString": "Property", @@ -27324,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", @@ -27340,7 +27645,7 @@ }, "signatures": [ { - "id": 118, + "id": 119, "name": "__call", "kind": 4096, "kindString": "Call signature", @@ -27349,7 +27654,7 @@ }, "parameters": [ { - "id": 119, + "id": 120, "name": "teamId", "kind": 32768, "kindString": "Parameter", @@ -27377,7 +27682,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 737, + "line": 760, "character": 21 } ] @@ -27386,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", @@ -27400,7 +27730,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 732, + "line": 755, "character": 15 } ], @@ -27420,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 } ], @@ -27453,7 +27783,7 @@ "sources": [ { "fileName": "slack_adapter.ts", - "line": 707, + "line": 726, "character": 21 } ], @@ -31672,7 +32002,7 @@ "sources": [ { "fileName": "facebook_adapter.ts", - "line": 321, + "line": 323, "character": 87 } ] @@ -31695,7 +32025,7 @@ "sources": [ { "fileName": "facebook_adapter.ts", - "line": 321, + "line": 323, "character": 37 } ] @@ -31763,7 +32093,7 @@ "sources": [ { "fileName": "facebook_adapter.ts", - "line": 172, + "line": 174, "character": 23 } ] @@ -31943,7 +32273,7 @@ "sources": [ { "fileName": "facebook_adapter.ts", - "line": 338, + "line": 340, "character": 49 } ] @@ -31966,7 +32296,7 @@ "sources": [ { "fileName": "facebook_adapter.ts", - "line": 338, + "line": 340, "character": 32 } ] @@ -32054,7 +32384,7 @@ "sources": [ { "fileName": "facebook_adapter.ts", - "line": 272, + "line": 274, "character": 31 } ] @@ -32200,7 +32530,7 @@ "sources": [ { "fileName": "facebook_adapter.ts", - "line": 321, + "line": 323, "character": 87 } ] @@ -32223,7 +32553,7 @@ "sources": [ { "fileName": "facebook_adapter.ts", - "line": 321, + "line": 323, "character": 37 } ] @@ -32291,7 +32621,7 @@ "sources": [ { "fileName": "facebook_adapter.ts", - "line": 172, + "line": 174, "character": 23 } ] @@ -32471,7 +32801,7 @@ "sources": [ { "fileName": "facebook_adapter.ts", - "line": 338, + "line": 340, "character": 49 } ] @@ -32494,7 +32824,7 @@ "sources": [ { "fileName": "facebook_adapter.ts", - "line": 338, + "line": 340, "character": 32 } ] @@ -32582,7 +32912,7 @@ "sources": [ { "fileName": "facebook_adapter.ts", - "line": 272, + "line": 274, "character": 31 } ] @@ -33541,7 +33871,7 @@ "sources": [ { "fileName": "facebook_adapter.ts", - "line": 474, + "line": 476, "character": 16 } ], @@ -33566,7 +33896,7 @@ "sources": [ { "fileName": "facebook_adapter.ts", - "line": 455, + "line": 457, "character": 12 } ], @@ -33591,7 +33921,7 @@ "sources": [ { "fileName": "facebook_adapter.ts", - "line": 459, + "line": 461, "character": 15 } ], @@ -33615,7 +33945,7 @@ "sources": [ { "fileName": "facebook_adapter.ts", - "line": 469, + "line": 471, "character": 14 } ], @@ -33640,7 +33970,7 @@ "sources": [ { "fileName": "facebook_adapter.ts", - "line": 486, + "line": 488, "character": 21 } ], @@ -33665,7 +33995,7 @@ "sources": [ { "fileName": "facebook_adapter.ts", - "line": 479, + "line": 481, "character": 25 } ], @@ -33718,7 +34048,7 @@ "sources": [ { "fileName": "facebook_adapter.ts", - "line": 479, + "line": 481, "character": 27 } ] @@ -33740,7 +34070,7 @@ "sources": [ { "fileName": "facebook_adapter.ts", - "line": 464, + "line": 466, "character": 16 } ], @@ -33768,7 +34098,7 @@ "sources": [ { "fileName": "facebook_adapter.ts", - "line": 451, + "line": 453, "character": 39 } ], @@ -33789,7 +34119,7 @@ "sources": [ { "fileName": "facebook_adapter.ts", - "line": 474, + "line": 476, "character": 16 } ], @@ -33814,7 +34144,7 @@ "sources": [ { "fileName": "facebook_adapter.ts", - "line": 455, + "line": 457, "character": 12 } ], @@ -33839,7 +34169,7 @@ "sources": [ { "fileName": "facebook_adapter.ts", - "line": 459, + "line": 461, "character": 15 } ], @@ -33863,7 +34193,7 @@ "sources": [ { "fileName": "facebook_adapter.ts", - "line": 469, + "line": 471, "character": 14 } ], @@ -33888,7 +34218,7 @@ "sources": [ { "fileName": "facebook_adapter.ts", - "line": 486, + "line": 488, "character": 21 } ], @@ -33913,7 +34243,7 @@ "sources": [ { "fileName": "facebook_adapter.ts", - "line": 479, + "line": 481, "character": 25 } ], @@ -33966,7 +34296,7 @@ "sources": [ { "fileName": "facebook_adapter.ts", - "line": 479, + "line": 481, "character": 27 } ] @@ -33988,7 +34318,7 @@ "sources": [ { "fileName": "facebook_adapter.ts", - "line": 464, + "line": 466, "character": 16 } ], diff --git a/packages/docs/reference/core.md b/packages/docs/reference/core.md index 5796735f9..287010e0d 100644 --- a/packages/docs/reference/core.md +++ b/packages/docs/reference/core.md @@ -576,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) @@ -673,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. @@ -697,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. @@ -738,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. @@ -1119,7 +1162,7 @@ convo.ask('Do you want to eat a taco?', [ handler: async(response_text, convo, bot, full_message) => { return await convo.gotoThread('no_taco'); } - },s + }, { default: true, handler: async(response_text, convo, bot, full_message) => { 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.
From 0210ff547503ba5b87107fc6ec119aee90ae7196 Mon Sep 17 00:00:00 2001 From: Ben Brown Date: Tue, 17 Mar 2020 16:12:49 -0500 Subject: [PATCH 31/32] update changelog with links to docs --- changelog.md | 11 +++++++++-- packages/testbot/package.json | 8 ++++---- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/changelog.md b/changelog.md index 570f2ca7f..e7283c9a5 100644 --- a/changelog.md +++ b/changelog.md @@ -4,14 +4,21 @@ [Want to contribute? Read our guide!](https://github.com/howdyai/botkit/blob/master/CONTRIBUTING.md) -# 4.7 +# 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: 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. +* 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) * 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) 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", From 56f2fcd352cc6700b0cf13cfa7cee08aa82b7df5 Mon Sep 17 00:00:00 2001 From: Ben Brown Date: Tue, 17 Mar 2020 16:31:34 -0500 Subject: [PATCH 32/32] changelog formatting --- changelog.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/changelog.md b/changelog.md index e7283c9a5..f5877761e 100644 --- a/changelog.md +++ b/changelog.md @@ -10,6 +10,7 @@ In addition to fixing a bunch of bugs and adding some new features, this version 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) @@ -20,6 +21,8 @@ This allows developers to use payload values inside quick replies, button clicks [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)