[Connector] Split ConnectorClient into Schema and Connector package (#29)

* Update Connector Client with latest Swagger spec

* Import test framework for testing ConnectorClient

* Update generateClient.cmd to use config from Swagger/README.md

* Update connector-auth deps to match connector deps versions

* Export models in connector package

* Simple EchoBot using connector, connector-auth and restify

* Update client with latest spec (2018/01/26)

* Proper Type Definitions for ConnectorClient

* Export model entities directly

* Update botbuilder package with new botframework-connector

* Update botbuilder-ai package with new botframework-connector

* Update botbuilder-choices package with new botframework-connector

* Update botbuilder-services package with new botframework-connector

* Deps cleanup

* Connector Tests now run on project dir

* Build fixes for connector-auth

* Enable build/test tasks

* Export missing references and cleanup

* Move remaining model types to connector package

* Merge botframework-connector-auth into botframework-connector

* Sample update with Lerna deps

* Sample deps version updated when possible, removed when not present

* Fix sample credentials usage

* Set botframework-connector version to 4.0.0-m1.0

* Cleanup

* Revert .npmrc

* Add compiled files

* Bump Connector version in echobot-simple-ts sample

* package-lock regenerate

* Remove TS devDependency from connector

* connector postinstall task to install test tools

* Split Connector into Schema and Connector package

- Models are now part of botbuilder-schema
- botbuilder no longer references the ConnectorClient
- BotFrameworkAdapter (botbuilder-services) in the only dependent to ConnectorClient

* output lib updates

* generateClient.cmd (windows)

* [Connector] README updates (#41)

* Schema and Connector re-generated with Autorest Typescript

* Higher modules updated with TS botbuilder-schema

* Connector Tests updated

* Connector Types generation based on Typescript

* README fix

* Mark all properties as required

* Flatten botbuilder-schema dir structure

* Add proper headers to Autorest generated files

* package-lock updated

* Updated spec with latest version

c39181cc20

* generatedClient.sh for *nix systems

* Revert Mark all properties as required

* Test update with correct enumeration values

* Cleanup

* Cleanup

* Version bump

* Update Schema entities with required and optional properties (#57)
This commit is contained in:
Pablo Costantini 2018-02-15 08:27:12 -03:00 коммит произвёл Steven Ickman
Родитель 2a8182ac9d
Коммит 1debda8d41
426 изменённых файлов: 103858 добавлений и 26529 удалений

Просмотреть файл

@ -5,7 +5,8 @@
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
import { Activity, ConversationResourceResponse, Middleware } from 'botbuilder';
import { Middleware } from 'botbuilder';
import { Activity, ConversationResourceResponse } from 'botbuilder';
export interface TranslationContext {
sourceText: string;
sourceLanguage: string;

Просмотреть файл

@ -132,7 +132,7 @@ class LanguageTranslator {
text += '\n';
text += translateResult[iData].TranslatedText;
}
// restore mentions
// restore mentions
if (message.entities) {
let i = 0;
for (let iEntity in message.entities) {

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

2883
libraries/botbuilder-ai/package-lock.json сгенерированный

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -2,20 +2,21 @@
* @module botbuilder-ai
*/
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
import { Activity, ConversationResourceResponse, Middleware } from 'botbuilder';
import { Middleware } from 'botbuilder';
import { Activity, ConversationResourceResponse } from 'botbuilder';
import * as LanguageMap from './languageMap';
import LuisClient = require('botframework-luis');
let MsTranslator = require('mstranslator');
export interface TranslationContext {
/// Original pre-translation text
/// Original pre-translation text
sourceText: string;
/// source language
/// source language
sourceLanguage: string;
/// The targeted translation language
@ -119,7 +120,7 @@ export class LanguageTranslator implements Middleware {
}
/// Translate .Text field of a message, regardless of direction
private TranslateMessageAsync(context: BotContext, message: Activity, sourceLanguage: string, targetLanguage: string): Promise<void> {
private TranslateMessageAsync(context: BotContext, message: Partial<Activity>, sourceLanguage: string, targetLanguage: string): Promise<void> {
// if we have text and a target language
if (message.text && message.text.length > 0 && targetLanguage != sourceLanguage) {
// truncate big text
@ -153,7 +154,7 @@ export class LanguageTranslator implements Middleware {
text += translateResult[iData].TranslatedText;
}
// restore mentions
// restore mentions
if (message.entities) {
let i = 0;
for (let iEntity in message.entities) {

2278
libraries/botbuilder-azure/package-lock.json сгенерированный

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -1,10 +1,3 @@
/**
* @module botbuilder-choices
*/
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
import { Activity } from 'botbuilder';
import { Choice } from './findChoices';
export interface ChoiceStylerOptions {

Просмотреть файл

@ -89,7 +89,7 @@ class ChoiceStyler {
return choice.action;
}
else {
return { type: 'imBack', value: choice.value, title: choice.value };
return { type: botbuilder_1.ActionTypes.ImBack, value: choice.value, title: choice.value };
}
});
// Return activity with choices as suggested actions

Просмотреть файл

@ -1 +1 @@
{"version":3,"file":"choiceStyler.js","sourceRoot":"","sources":["../src/choiceStyler.ts"],"names":[],"mappings":";AAAA;;GAEG;AACH;;;GAGG;;AAEH,2CAAiE;AAEjE,qCAAqC;AA4BrC;IAEI,MAAM,CAAC,UAAU,CAAC,gBAAmC,EAAE,OAA0B,EAAE,IAAa,EAAE,KAAc,EAAE,OAA6B;QAC3I,MAAM,SAAS,GAAG,OAAO,gBAAgB,KAAK,QAAQ,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,OAAO,CAAC,YAAY,CAAC,gBAAgB,CAAC,CAAC;QAEnH,oBAAoB;QACpB,MAAM,IAAI,GAAG,YAAY,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;QAE7C,4BAA4B;QAC5B,IAAI,cAAc,GAAG,CAAC,CAAC;QACvB,IAAI,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE;YACpB,IAAI,CAAC,GAAG,MAAM,CAAC,MAAM,IAAI,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC;YAChG,EAAE,CAAC,CAAC,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC;gBACrB,cAAc,GAAG,CAAC,CAAC;YACvB,CAAC;QACL,CAAC,CAAC,CAAC;QAEH,uBAAuB;QACvB,MAAM,wBAAwB,GAAG,OAAO,CAAC,wBAAwB,CAAC,SAAS,EA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AC,OAAoC;QACjD,MAAM,CAAC,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,OAAO,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;IACpG,CAAC;CAEJ;AAnGD,oCAmGC"}

2222
libraries/botbuilder-choices/package-lock.json сгенерированный

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -2,36 +2,37 @@
* @module botbuilder-choices
*/
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
import { Activity, MessageStyler, CardAction } from 'botbuilder';
import { MessageStyler, ActionTypes } from 'botbuilder';
import { Activity, CardAction } from 'botbuilder';
import { Choice } from './findChoices';
import * as channel from './channel';
export interface ChoiceStylerOptions {
/**
* (Optional) character used to separate individual choices when there are more than 2 choices.
* The default value is `", "`.
/**
* (Optional) character used to separate individual choices when there are more than 2 choices.
* The default value is `", "`.
*/
inlineSeparator?: string;
/**
* (Optional) separator inserted between the choices when their are only 2 choices. The default
/**
* (Optional) separator inserted between the choices when their are only 2 choices. The default
* value is `" or "`.
*/
inlineOr?: string
/**
* (Optional) separator inserted between the last 2 choices when their are more than 2 choices.
/**
* (Optional) separator inserted between the last 2 choices when their are more than 2 choices.
* The default value is `", or "`.
*/
inlineOrMore?: string;
/**
* (Optional) if `true`, inline and list style choices will be prefixed with the index of the
* choice as in "1. choice". If `false`, the list style will use a bulleted list instead. The default value is `true`.
* (Optional) if `true`, inline and list style choices will be prefixed with the index of the
* choice as in "1. choice". If `false`, the list style will use a bulleted list instead. The default value is `true`.
*/
includeNumbers?: boolean;
}
@ -116,14 +117,14 @@ export class ChoiceStyler {
// Return activity with choices as a numbered list.
return MessageStyler.text(txt, speak);
}
static suggestedAction(choices: (string|Choice)[], text?: string, speak?: string, options?: ChoiceStylerOptions): Partial<Activity> {
// Map choices to actions
const actions = ChoiceStyler.toChoices(choices).map<CardAction>((choice) => {
if (choice.action) {
return choice.action;
} else {
return { type: 'imBack', value: choice.value, title: choice.value }
return { type: ActionTypes.ImBack, value: choice.value, title: choice.value }
}
});
@ -134,5 +135,5 @@ export class ChoiceStyler {
static toChoices(choices: (string|Choice)[]|undefined): Choice[] {
return (choices || []).map((choice) => typeof choice === 'string' ? { value: choice } : choice);
}
}

Просмотреть файл

@ -2,7 +2,7 @@
* @module botbuilder-choices
*/
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
@ -22,18 +22,18 @@ export interface Choice {
}
export interface FindChoicesOptions extends FindValuesOptions {
/**
/**
* (Optional) locale of the user preferred language. This is used when recognizing the
* numerical or ordinal index of the choice. The default is assumed to be `en-US`.
*/
culture?: string;
/**
* (Optional) If `true`, the choices value will NOT be search over. The default is `false`.
/**
* (Optional) If `true`, the choices value will NOT be search over. The default is `false`.
*/
noValue?: boolean;
/**
/**
* (Optional) If `true`, the title of the choices action will NOT be searched over. The default is `false`.
*/
noAction?: boolean;
@ -46,7 +46,7 @@ export interface FoundChoice {
/** The choices index within the list of choices that was searched over. */
index: number;
/**
/**
* The accuracy with which the synonym matched the specified portion of the utterance. A
* value of 1.0 would indicate a perfect match.
*/

Просмотреть файл

@ -5,7 +5,8 @@
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
import { ActivityAdapter, Activity, ConversationResourceResponse } from 'botbuilder';
import { ActivityAdapter } from 'botbuilder';
import { Activity, ConversationResourceResponse } from 'botbuilder';
/**
* Lets a user communicate with a bot from a console window.
*

Просмотреть файл

@ -1,12 +1,5 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
/**
* @module botbuilder-node
*/
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
const botbuilder_1 = require("botbuilder");
const readline = require("readline");
/**
@ -36,11 +29,11 @@ class ConsoleAdapter {
if (i < activities.length) {
responses.push({});
let a = activities[i];
switch (a.type || botbuilder_1.ActivityTypes.message) {
switch (a.type || botbuilder_1.ActivityTypes.Message) {
case 'delay':
setTimeout(() => next(i + 1), a.value || 0);
break;
case botbuilder_1.ActivityTypes.message:
case botbuilder_1.ActivityTypes.Message:
if (a.attachments && a.attachments.length > 0) {
const append = a.attachments.length == 1 ? `(1 attachment)` : `(${a.attachments.length} attachments)`;
console.log(`${a.text || ''} ${append}`);
@ -89,12 +82,12 @@ class ConsoleAdapter {
receive(text) {
if (this.onReceive) {
const activity = {
type: botbuilder_1.ActivityTypes.message,
type: botbuilder_1.ActivityTypes.Message,
channelId: 'console',
from: { id: 'user', name: 'User1' },
recipient: { id: 'bot', name: 'Bot' },
conversation: { id: 'Convo1' },
timestamp: new Date().toISOString(),
timestamp: new Date(),
text: text || '',
id: (this.nextId++).toString()
};

Просмотреть файл

@ -1 +1 @@
{"version":3,"file":"consoleAdapter.js","sourceRoot":"","sources":["../src/consoleAdapter.ts"],"names":[],"mappings":";;AAAA;;GAEG;AACH;;;GAGG;AACH,2CAAoG;AACpG,qCAAqC;AAErC;;;;;;;;;;;;GAYG;AACH;IAII;QAHQ,WAAM,GAAG,CAAC,CAAC;QAIf,IAAI,CAAC,EAAE,GAAG,SAAgB,CAAC;QAC3B,IAAI,CAAC,SAAS,GAAG,SAAgB,CAAC;IACtC,CAAC;IAKD,mDAAmD;IAC5C,IAAI,CAAC,UAA+B;QACvC,MAAM,CAAC,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACnC,MAAM,SAAS,GAAmC,EAAE,CAAC;YACrD,cAAc,CAAS;gBACnB,EAAE,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC;oBACxB,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;oBACnB,IAAI,CAAC,GAAG,UAAU,CA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,IAAI,CAAC;IAChB,CAAC;IAED;;;;OAIG;IACI,OAAO,CAAC,IAAY;QACvB,EAAE,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC;YACjB,MAAM,QAAQ,GAAa;gBACvB,IAAI,EAAE,0BAAa,CAAC,OAAO;gBAC3B,SAAS,EAAE,SAAS;gBACpB,IAAI,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE;gBACnC,SAAS,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE;gBACrC,YAAY,EAAG,EAAE,EAAE,EAAE,QAAQ,EAAE;gBAC/B,SAAS,EAAE,IAAI,IAAI,EAAE;gBACrB,IAAI,EAAE,IAAI,IAAI,EAAE;gBAChB,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;aACjC,CAAC;YACF,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;QAC7B,CAAC;QACD,MAAM,CAAC,IAAI,CAAC;IAChB,CAAC;CAEJ;AAtFD,wCAsFC"}

2001
libraries/botbuilder-node/package-lock.json сгенерированный

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -2,10 +2,11 @@
* @module botbuilder-node
*/
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
import { ActivityAdapter, Activity, ActivityTypes, ConversationResourceResponse } from 'botbuilder';
import { ActivityAdapter } from 'botbuilder';
import { ActivityTypes, Activity, ConversationResourceResponse } from 'botbuilder';
import * as readline from 'readline';
/**
@ -39,13 +40,13 @@ export class ConsoleAdapter implements ActivityAdapter {
const responses: ConversationResourceResponse[] = [];
function next(i: number) {
if (i < activities.length) {
responses.push({});
responses.push(<ConversationResourceResponse>{});
let a = activities[i];
switch (a.type || ActivityTypes.message) {
case 'delay':
switch (a.type || ActivityTypes.Message) {
case <ActivityTypes>'delay':
setTimeout(() => next(i + 1), a.value || 0);
break;
case ActivityTypes.message:
case ActivityTypes.Message:
if (a.attachments && a.attachments.length > 0) {
const append = a.attachments.length == 1 ? `(1 attachment)` : `(${a.attachments.length} attachments)`;
console.log(`${a.text || ''} ${append}`);
@ -67,9 +68,9 @@ export class ConsoleAdapter implements ActivityAdapter {
});
}
/**
* Begins listening to console input. The listener will call [receive()](#receive) after
* parsing input from the user.
/**
* Begins listening to console input. The listener will call [receive()](#receive) after
* parsing input from the user.
*/
public listen(): this {
this.rl = readline.createInterface({ input: process.stdin, output: process.stdout, terminal: false });
@ -93,18 +94,18 @@ export class ConsoleAdapter implements ActivityAdapter {
public receive(text: string): this {
if (this.onReceive) {
const activity = <Activity>{
type: ActivityTypes.message,
type: ActivityTypes.Message,
channelId: 'console',
from: { id: 'user', name: 'User1' },
recipient: { id: 'bot', name: 'Bot' },
conversation: { id: 'Convo1' },
timestamp: new Date().toISOString(),
timestamp: new Date(),
text: text || '',
id: (this.nextId++).toString()
};
this.onReceive(activity);
}
return this;
return this;
}
}

1759
libraries/botbuilder-schema/lib/index.d.ts поставляемый Normal file

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -0,0 +1,203 @@
"use strict";
/**
* @module botbuilder-schema
*/
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
/**
* Defines values for ActivityTypes.
* Possible values include: 'message', 'contactRelationUpdate',
* 'conversationUpdate', 'typing', 'ping', 'endOfConversation', 'event',
* 'invoke', 'deleteUserData', 'messageUpdate', 'messageDelete',
* 'installationUpdate', 'messageReaction', 'suggestion'
* There could be more values for this enum apart from the ones defined here.If
* you want to set a value that is not from the known values then you can do
* the following:
* let param: ActivityTypes =
* <ActivityTypes>"someUnknownValueThatWillStillBeValid";
* @readonly
* @enum {string}
*/
var ActivityTypes;
(function (ActivityTypes) {
ActivityTypes["Message"] = "message";
ActivityTypes["ContactRelationUpdate"] = "contactRelationUpdate";
ActivityTypes["ConversationUpdate"] = "conversationUpdate";
ActivityTypes["Typing"] = "typing";
ActivityTypes["Ping"] = "ping";
ActivityTypes["EndOfConversation"] = "endOfConversation";
ActivityTypes["Event"] = "event";
ActivityTypes["Invoke"] = "invoke";
ActivityTypes["DeleteUserData"] = "deleteUserData";
ActivityTypes["MessageUpdate"] = "messageUpdate";
ActivityTypes["MessageDelete"] = "messageDelete";
ActivityTypes["InstallationUpdate"] = "installationUpdate";
ActivityTypes["MessageReaction"] = "messageReaction";
ActivityTypes["Suggestion"] = "suggestion";
})(ActivityTypes = exports.ActivityTypes || (exports.ActivityTypes = {}));
/**
* Defines values for TextFormatTypes.
* Possible values include: 'markdown', 'plain', 'xml'
* There could be more values for this enum apart from the ones defined here.If
* you want to set a value that is not from the known values then you can do
* the following:
* let param: TextFormatTypes =
* <TextFormatTypes>"someUnknownValueThatWillStillBeValid";
* @readonly
* @enum {string}
*/
var TextFormatTypes;
(function (TextFormatTypes) {
TextFormatTypes["Markdown"] = "markdown";
TextFormatTypes["Plain"] = "plain";
TextFormatTypes["Xml"] = "xml";
})(TextFormatTypes = exports.TextFormatTypes || (exports.TextFormatTypes = {}));
/**
* Defines values for AttachmentLayoutTypes.
* Possible values include: 'list', 'carousel'
* There could be more values for this enum apart from the ones defined here.If
* you want to set a value that is not from the known values then you can do
* the following:
* let param: AttachmentLayoutTypes =
* <AttachmentLayoutTypes>"someUnknownValueThatWillStillBeValid";
* @readonly
* @enum {string}
*/
var AttachmentLayoutTypes;
(function (AttachmentLayoutTypes) {
AttachmentLayoutTypes["List"] = "list";
AttachmentLayoutTypes["Carousel"] = "carousel";
})(AttachmentLayoutTypes = exports.AttachmentLayoutTypes || (exports.AttachmentLayoutTypes = {}));
/**
* Defines values for MessageReactionTypes.
* Possible values include: 'like', 'plusOne'
* There could be more values for this enum apart from the ones defined here.If
* you want to set a value that is not from the known values then you can do
* the following:
* let param: MessageReactionTypes =
* <MessageReactionTypes>"someUnknownValueThatWillStillBeValid";
* @readonly
* @enum {string}
*/
var MessageReactionTypes;
(function (MessageReactionTypes) {
MessageReactionTypes["Like"] = "like";
MessageReactionTypes["PlusOne"] = "plusOne";
})(MessageReactionTypes = exports.MessageReactionTypes || (exports.MessageReactionTypes = {}));
/**
* Defines values for InputHints.
* Possible values include: 'acceptingInput', 'ignoringInput', 'expectingInput'
* There could be more values for this enum apart from the ones defined here.If
* you want to set a value that is not from the known values then you can do
* the following:
* let param: InputHints = <InputHints>"someUnknownValueThatWillStillBeValid";
* @readonly
* @enum {string}
*/
var InputHints;
(function (InputHints) {
InputHints["AcceptingInput"] = "acceptingInput";
InputHints["IgnoringInput"] = "ignoringInput";
InputHints["ExpectingInput"] = "expectingInput";
})(InputHints = exports.InputHints || (exports.InputHints = {}));
/**
* Defines values for ActionTypes.
* Possible values include: 'openUrl', 'imBack', 'postBack', 'playAudio',
* 'playVideo', 'showImage', 'downloadFile', 'signin', 'call', 'payment',
* 'messageBack'
* There could be more values for this enum apart from the ones defined here.If
* you want to set a value that is not from the known values then you can do
* the following:
* let param: ActionTypes =
* <ActionTypes>"someUnknownValueThatWillStillBeValid";
* @readonly
* @enum {string}
*/
var ActionTypes;
(function (ActionTypes) {
ActionTypes["OpenUrl"] = "openUrl";
ActionTypes["ImBack"] = "imBack";
ActionTypes["PostBack"] = "postBack";
ActionTypes["PlayAudio"] = "playAudio";
ActionTypes["PlayVideo"] = "playVideo";
ActionTypes["ShowImage"] = "showImage";
ActionTypes["DownloadFile"] = "downloadFile";
ActionTypes["Signin"] = "signin";
ActionTypes["Call"] = "call";
ActionTypes["Payment"] = "payment";
ActionTypes["MessageBack"] = "messageBack";
})(ActionTypes = exports.ActionTypes || (exports.ActionTypes = {}));
/**
* Defines values for EndOfConversationCodes.
* Possible values include: 'unknown', 'completedSuccessfully',
* 'userCancelled', 'botTimedOut', 'botIssuedInvalidMessage', 'channelFailed'
* There could be more values for this enum apart from the ones defined here.If
* you want to set a value that is not from the known values then you can do
* the following:
* let param: EndOfConversationCodes =
* <EndOfConversationCodes>"someUnknownValueThatWillStillBeValid";
* @readonly
* @enum {string}
*/
var EndOfConversationCodes;
(function (EndOfConversationCodes) {
EndOfConversationCodes["Unknown"] = "unknown";
EndOfConversationCodes["CompletedSuccessfully"] = "completedSuccessfully";
EndOfConversationCodes["UserCancelled"] = "userCancelled";
EndOfConversationCodes["BotTimedOut"] = "botTimedOut";
EndOfConversationCodes["BotIssuedInvalidMessage"] = "botIssuedInvalidMessage";
EndOfConversationCodes["ChannelFailed"] = "channelFailed";
})(EndOfConversationCodes = exports.EndOfConversationCodes || (exports.EndOfConversationCodes = {}));
/**
* Defines values for ContactRelationUpdateActionTypes.
* Possible values include: 'add', 'remove'
* There could be more values for this enum apart from the ones defined here.If
* you want to set a value that is not from the known values then you can do
* the following:
* let param: ContactRelationUpdateActionTypes =
* <ContactRelationUpdateActionTypes>"someUnknownValueThatWillStillBeValid";
* @readonly
* @enum {string}
*/
var ContactRelationUpdateActionTypes;
(function (ContactRelationUpdateActionTypes) {
ContactRelationUpdateActionTypes["Add"] = "add";
ContactRelationUpdateActionTypes["Remove"] = "remove";
})(ContactRelationUpdateActionTypes = exports.ContactRelationUpdateActionTypes || (exports.ContactRelationUpdateActionTypes = {}));
/**
* Defines values for InstallationUpdateActionTypes.
* Possible values include: 'add', 'remove'
* There could be more values for this enum apart from the ones defined here.If
* you want to set a value that is not from the known values then you can do
* the following:
* let param: InstallationUpdateActionTypes =
* <InstallationUpdateActionTypes>"someUnknownValueThatWillStillBeValid";
* @readonly
* @enum {string}
*/
var InstallationUpdateActionTypes;
(function (InstallationUpdateActionTypes) {
InstallationUpdateActionTypes["Add"] = "add";
InstallationUpdateActionTypes["Remove"] = "remove";
})(InstallationUpdateActionTypes = exports.InstallationUpdateActionTypes || (exports.InstallationUpdateActionTypes = {}));
/**
* Defines values for ActivityImportance.
* Possible values include: 'low', 'normal', 'high'
* There could be more values for this enum apart from the ones defined here.If
* you want to set a value that is not from the known values then you can do
* the following:
* let param: ActivityImportance =
* <ActivityImportance>"someUnknownValueThatWillStillBeValid";
* @readonly
* @enum {string}
*/
var ActivityImportance;
(function (ActivityImportance) {
ActivityImportance["Low"] = "low";
ActivityImportance["Normal"] = "normal";
ActivityImportance["High"] = "high";
})(ActivityImportance = exports.ActivityImportance || (exports.ActivityImportance = {}));
//# sourceMappingURL=index.js.map

Просмотреть файл

@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;GAEG;AACH;;;GAGG;;AAwlDH;;;;;;;;;;;;;GAaG;AACH,IAAY,aAeX;AAfD,WAAY,aAAa;IACvB,oCAAmB,CAAA;IACnB,gEAA+C,CAAA;IAC/C,0DAAyC,CAAA;IACzC,kCAAiB,CAAA;IACjB,8BAAa,CAAA;IACb,wDAAuC,CAAA;IACvC,gCAAe,CAAA;IACf,kCAAiB,CAAA;IACjB,kDAAiC,CAAA;IACjC,gDAA+B,CAAA;IAC/B,gDAA+B,CAAA;IAC/B,0DAAyC,CAAA;IACzC,oDAAmC,CAAA;IACnC,0CAAyB,CAAA;AAC3B,CAAC,EAfW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAexB;AAED;;;;;;;;;;GAUG;AACH,IAAY,eAIX;AAJD,WAAY,eAAe;IACzB,wCAAqB,CAAA;IACrB,kCAAe,CAAA;IACf,8BAAW,CAAA;AACb,CAAC,EAJW,eAAe,GAAf,uBAAe,KAAf,uBAAe,QAI1B;AAED;;;;;;;;;;GAUG;AACH,IAAY,qBAGX;AAHD,WAAY,qBAAqB;IAC/B,sCAAa,CAAA;IACb,8CAAqB,CAAA;AACvB,CAAC,EAHW,qBAAqB,GAArB,6BAAqB,KAArB,6BAAqB,QAGhC;AAED;;;;;;;;;;GAUG;AACH,IAAY,oBAGX;AAHD,WAAY,oBAAoB;IAC9B,qCAAa,CAAA;IACb,2CAAmB,CAAA;AACrB,CAAC,EAHW,oBAAoB,GAApB,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,mCAAa,CAAA;AACf,CAAC,EAJW,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QAI7B"}

Просмотреть файл

@ -0,0 +1,35 @@
{
"name": "botbuilder-schema",
"version": "4.0.0-m1.2",
"keywords": [
"botconnector",
"bots",
"chatbots"
],
"main": "./lib/index.js",
"typings": "./lib/index.d.ts",
"dependencies": {
},
"devDependencies": {
"@types/jsonwebtoken": "7.2.5",
"@types/mocha": "^2.2.47",
"@types/node": "^9.3.0",
"codelyzer": "^4.1.0",
"mocha": "^5.0.0",
"nyc": "^11.4.1",
"source-map-support": "^0.5.3",
"ts-node": "^4.1.0"
},
"scripts": {
"build": "tsc",
"clean": "erase /q lib\\*.*"
},
"homepage": "http://github.com/Microsoft/BotBuilder-JS",
"bugs": {
"url": "http://github.com/Microsoft/BotBuilder-JS/issues"
},
"repository": {
"type": "git",
"url": "git@github.com:Microsoft/BotBuilder-JS.git"
}
}

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -0,0 +1,53 @@
{
"compilerOptions": {
/* Basic Options */
"target": "ES2015", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'. */
"module": "commonjs", /* Specify module code generation: 'commonjs', 'amd', 'system', 'umd' or 'es2015'. */
// "lib": [], /* Specify library files to be included in the compilation: */
// "allowJs": true, /* Allow javascript files to be compiled. */
// "checkJs": true, /* Report errors in .js files. */
// "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
"declaration": true, /* Generates corresponding '.d.ts' file. */
"sourceMap": true, /* Generates corresponding '.map' file. */
// "outFile": "./", /* Concatenate and emit output to single file. */
"outDir": "./lib", /* Redirect output structure to the directory. */
"rootDir": "./src", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
// "removeComments": true, /* Do not emit comments to output. */
// "noEmit": true, /* Do not emit outputs. */
// "importHelpers": true, /* Import emit helpers from 'tslib'. */
// "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */
// "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */
/* Strict Type-Checking Options */
"strict": true, /* Enable all strict type-checking options. */
// "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */
// "strictNullChecks": true, /* Enable strict null checks. */
// "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */
// "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */
/* Additional Checks */
// "noUnusedLocals": true, /* Report errors on unused locals. */
// "noUnusedParameters": true, /* Report errors on unused parameters. */
// "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
// "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
/* Module Resolution Options */
"moduleResolution": "node" /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
// "baseUrl": "./", /* Base directory to resolve non-absolute module names. */
// "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
// "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
// "typeRoots": [], /* List of folders to include type definitions from. */
// "types": [], /* Type declaration files to be included in compilation. */
// "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
/* Source Map Options */
// "sourceRoot": "./", /* Specify the location where debugger should locate TypeScript files instead of source locations. */
// "mapRoot": "./", /* Specify the location where debugger should locate map files instead of generated locations. */
// "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */
// "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */
/* Experimental Options */
// "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */
// "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */
}
}

Просмотреть файл

@ -5,8 +5,8 @@
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
import { Activity, ActivityAdapter, ConversationReference, ConversationResourceResponse, ConversationParameters } from 'botbuilder';
import { Headers } from 'botframework-connector-auth';
import { ActivityAdapter, Activity, ConversationReference, ConversationResourceResponse, ConversationParameters } from 'botbuilder';
import { Headers } from 'botframework-connector';
/** Express or Restify Request object. */
export interface WebRequest {
body: any;
@ -35,7 +35,7 @@ export interface BotAdapterSettings {
* **Usage Example**
*
* ```js
* import { Bot } from 'botbuilder-core';
* import { Bot } from 'botbuilder';
* import { BotFrameworkAdapter } from 'botbuilder-services';
* import * as restify from 'restify';
*

Просмотреть файл

@ -8,15 +8,15 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
});
};
Object.defineProperty(exports, "__esModule", { value: true });
const botframework_connector_auth_1 = require("botframework-connector-auth");
const ConnectorClient = require("botframework-connector");
const botframework_connector_1 = require("botframework-connector");
const botframework_connector_2 = require("botframework-connector");
/**
* ActivityAdapter class needed to communicate with a Bot Framework channel or the Emulator.
*
* **Usage Example**
*
* ```js
* import { Bot } from 'botbuilder-core';
* import { Bot } from 'botbuilder';
* import { BotFrameworkAdapter } from 'botbuilder-services';
* import * as restify from 'restify';
*
@ -47,8 +47,8 @@ class BotFrameworkAdapter {
this.nextId = 0;
settings = settings === undefined ? { appId: '', appPassword: '' } : settings;
const botCredentials = { appId: settings.appId, appPassword: settings.appPassword };
this.credentials = new botframework_connector_auth_1.MicrosoftAppCredentials(botCredentials);
this.authenticator = new botframework_connector_auth_1.BotAuthenticator(botCredentials);
this.credentials = new botframework_connector_2.MicrosoftAppCredentials(botCredentials);
this.authenticator = new botframework_connector_2.BotAuthenticator(botCredentials);
this.onReceive = undefined;
}
/**
@ -66,10 +66,9 @@ class BotFrameworkAdapter {
};
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
try {
let client = new ConnectorClient(this.credentials);
let client = new botframework_connector_1.ConnectorClient(this.credentials);
let response = yield client.conversations.createConversation(conversationParameters);
let body = typeof response.body === 'string' ? response.body : JSON.parse(response.body);
conversationResourceResponse.id = body.id;
conversationResourceResponse.id = response.id;
resolve(conversationResourceResponse);
}
catch (err) {
@ -80,7 +79,7 @@ class BotFrameworkAdapter {
update(activity) {
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
try {
let client = new ConnectorClient(this.credentials);
let client = new botframework_connector_1.ConnectorClient(this.credentials);
yield client.conversations.updateActivity(activity.conversation.id, activity.id, activity);
resolve();
}
@ -92,7 +91,7 @@ class BotFrameworkAdapter {
delete(activity) {
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
try {
let client = new ConnectorClient(this.credentials);
let client = new botframework_connector_1.ConnectorClient(this.credentials);
yield client.conversations.deleteActivity(activity.conversation.id, activity.id);
resolve();
}
@ -108,7 +107,7 @@ class BotFrameworkAdapter {
function createClient(serviceUrl) {
if (serviceUrl) {
if (!clientCache.hasOwnProperty(serviceUrl)) {
clientCache[serviceUrl] = new ConnectorClient(credentials, serviceUrl);
clientCache[serviceUrl] = new botframework_connector_1.ConnectorClient(credentials, serviceUrl);
}
return clientCache[serviceUrl];
}
@ -128,7 +127,7 @@ class BotFrameworkAdapter {
const client = createClient(activity.serviceUrl);
if (client) {
if (activity.conversation && activity.conversation.id) {
client.conversations.sendToConversation(activity, activity.conversation.id)
client.conversations.sendToConversation(activity.conversation.id, activity)
.then((result) => {
responses.push(result || {});
next(i + 1);

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

3296
libraries/botbuilder-services/package-lock.json сгенерированный

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -21,8 +21,7 @@
"typings": "./lib/index.d.ts",
"dependencies": {
"botbuilder": "^4.0.0-m1.2",
"botframework-connector": "^4.0.0-m1.2",
"botframework-connector-auth": "^4.0.0-m1.2"
"botframework-connector": "^4.0.0-m1.2"
},
"devDependencies": {
"@types/mocha": "^2.2.47",
@ -34,7 +33,6 @@
"ts-node": "^4.1.0"
},
"scripts": {
"test": "tsc && nyc mocha tests/",
"build": "tsc",
"build-docs": "typedoc --theme markdown --entryPoint botbuilder-services --excludePrivate --includeDeclarations --ignoreCompilerErrors --module amd --out ..\\..\\doc\\botbuilder-services .\\lib\\index.d.ts --hideGenerator --name \"Bot Builder SDK - Services\" --readme none",
"clean": "erase /q lib\\*.*"

Просмотреть файл

@ -2,12 +2,12 @@
* @module botbuilder-services
*/
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
import { Activity, ActivityTypes, ActivityAdapter, ConversationReference, ConversationResourceResponse, ConversationParameters, ConversationAccount } from 'botbuilder';
import { MicrosoftAppCredentials, BotAuthenticator, Headers, BotCredentials } from 'botframework-connector-auth';
import ConnectorClient = require('botframework-connector');
import { ActivityAdapter, ActivityTypes, Activity, ConversationReference, ConversationResourceResponse, ConversationParameters, ConversationAccount } from 'botbuilder';
import { ConnectorClient } from 'botframework-connector';
import { MicrosoftAppCredentials, BotAuthenticator, Headers, BotCredentials } from 'botframework-connector';
/** Express or Restify Request object. */
export interface WebRequest {
@ -41,20 +41,20 @@ export interface BotAdapterSettings {
* **Usage Example**
*
* ```js
* import { Bot } from 'botbuilder-core';
* import { Bot } from 'botbuilder';
* import { BotFrameworkAdapter } from 'botbuilder-services';
* import * as restify from 'restify';
*
*
* // Create server
* let server = restify.createServer();
* server.listen(process.env.port || process.env.PORT || 3978, function () {
* console.log('%s listening to %s', server.name, server.url);
* });
*
*
* // Create activity adapter and listen to our servers '/api/messages' route.
* const activityAdapter = new BotFrameworkAdapter({ appId: process.env.MICROSOFT_APP_ID, appPassword: process.env.MICROSOFT_APP_PASSWORD});
* server.post('/api/messages', activityAdapter.listen() as any);
*
*
* // Initialize bot by passing it a activity Adapter
* const bot = new Bot(activityAdapter)
* .onReceive((context) => {
@ -99,8 +99,7 @@ export class BotFrameworkAdapter implements ActivityAdapter {
try {
let client = new ConnectorClient(this.credentials);
let response = await client.conversations.createConversation(conversationParameters);
let body = typeof response.body === 'string' ? response.body : JSON.parse(response.body);
conversationResourceResponse.id = body.id;
conversationResourceResponse.id = response.id;
resolve(conversationResourceResponse);
}
catch (err) {
@ -109,7 +108,7 @@ export class BotFrameworkAdapter implements ActivityAdapter {
});
}
public update(activity: Partial<Activity>): Promise<void> {
return new Promise<void>(async (resolve, reject) => {
try {
@ -154,7 +153,7 @@ export class BotFrameworkAdapter implements ActivityAdapter {
if (i < activities.length) {
const activity = activities[i];
switch (activity.type) {
case 'delay':
case <ActivityTypes>'delay':
setTimeout(() => {
responses.push({});
next(i + 1);
@ -164,7 +163,7 @@ export class BotFrameworkAdapter implements ActivityAdapter {
const client = createClient(activity.serviceUrl);
if (client) {
if (activity.conversation && activity.conversation.id) {
client.conversations.sendToConversation(activity, activity.conversation.id)
client.conversations.sendToConversation(activity.conversation.id, activity)
.then((result) => {
responses.push(result || {});
next(i + 1);
@ -209,7 +208,7 @@ export class BotFrameworkAdapter implements ActivityAdapter {
private async processRequest(req: WebRequest, res: WebResponse) {
let activity: Activity = req.body;
try {
// authenticate the incoming request
await this.authenticator.authenticate(req.headers, activity.channelId, activity.serviceUrl);
@ -217,7 +216,7 @@ export class BotFrameworkAdapter implements ActivityAdapter {
await this.onReceive(activity);
// TODO: Add logic to return 'invoke' response
res.send(202);
res.send(202);
} catch (err) {
// TODO: Added logic to unpack error
res.send(500, err.message);

Просмотреть файл

@ -7,56 +7,6 @@
* Licensed under the MIT License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
/** List of activity types supported by the Bot Framework. */
exports.ActivityTypes = {
/** A user has added/removed the bot as a contact. */
contactRelationUpdate: 'contactRelationUpdate',
/** User(s) have either joined or left the conversation. */
conversationUpdate: 'conversationUpdate',
/** The conversation is being ended by either the bot or user. */
endOfConversation: 'endOfConversation',
/** A named event sent from or to a client. */
event: 'event',
/** An operation is being invoked. */
invoke: 'invoke',
/** A message sent from or to a user/group. */
message: 'message',
/** A message activity within a conversation has had a message reaction added or removed. */
messageReaction: 'messageReaction',
/** An indicator that the bot is typing. Should be periodically resent every few seconds. */
typing: 'typing'
};
/** Desired text format for a message being sent to a user. */
exports.TextFormats = {
/** Message text should be rendered as plain text. */
plain: 'plain',
/** Message text should be rendered using markdown. */
markdown: 'markdown'
};
/** Desired layout style for a list of attachments sent to a user. */
exports.AttachmentLayouts = {
/** Attachments should be rendered as a list. */
list: 'list',
/** Attachments should be rendered using a carousel layout. */
carousel: 'carousel'
};
/** Codes indicating why a conversation has ended. */
exports.EndOfConversationCodes = {
/** The conversation was ended for unknown reasons. */
unknown: 'unknown',
/** The conversation completed successfully. */
completedSuccessfully: 'completedSuccessfully',
/** The user cancelled the conversation. */
userCancelled: 'userCancelled',
/** The conversation was ended because requests sent to the bot timed out. */
botTimedOut: 'botTimedOut',
/** The conversation was ended because the bot sent an invalid message. */
botIssuedInvalidMessage: 'botIssuedInvalidMessage',
/** The conversation ended because the channel experienced an internal failure */
channelFailed: 'channelFailed',
/** The conversation ended because the bot didn't recognize the users utterance. */
unrecognized: 'unrecognized'
};
function getConversationReference(activity) {
return {
activityId: activity.id,

Просмотреть файл

@ -5,7 +5,7 @@
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
import { Activity, ConversationResourceResponse } from './activity';
import { Activity, ConversationResourceResponse } from 'botbuilder-schema';
/**
* Implemented by activity adapters
*/

6
libraries/botbuilder/lib/bot.d.ts поставляемый
Просмотреть файл

@ -6,7 +6,7 @@
* Licensed under the MIT License.
*/
import { MiddlewareSet } from './middlewareSet';
import { Activity, ConversationReference } from './activity';
import { Activity, ConversationReference, ConversationResourceResponse } from 'botbuilder-schema';
import { ActivityAdapter } from './activityAdapter';
import { Promiseable } from './middleware';
import { TemplateRenderer } from './templateManager';
@ -17,7 +17,7 @@ import { TemplateDictionary } from './botbuilder';
* **Usage Example**
*
* ```js
* import { Bot } from 'botbuilder-core'; // typescript
* import { Bot } from 'botbuilder'; // typescript
*
* const bot = new Bot(adapter); // init bot and bind to adapter
*
@ -91,7 +91,7 @@ export declare class Bot extends MiddlewareSet {
* @param context Context for the current turn of the conversation.
* @param activities Set of activities to send.
*/
post(context: BotContext, ...activities: Partial<Activity>[]): Promise<ConversationReference[]>;
post(context: BotContext, ...activities: Partial<Activity>[]): Promise<Partial<ConversationResourceResponse>[]>;
/**
* Dispatches an incoming set of activities. This method can be used to dispatch an activity
* to the bot as if a user had sent it which is sometimes useful.

Просмотреть файл

@ -8,7 +8,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
* Licensed under the MIT License.
*/
const middlewareSet_1 = require("./middlewareSet");
const activity_1 = require("./activity");
const botbuilder_schema_1 = require("botbuilder-schema");
const botContext_1 = require("./botContext");
const templateManager_1 = require("./templateManager");
const botbuilder_1 = require("./botbuilder");
@ -18,7 +18,7 @@ const botbuilder_1 = require("./botbuilder");
* **Usage Example**
*
* ```js
* import { Bot } from 'botbuilder-core'; // typescript
* import { Bot } from 'botbuilder'; // typescript
*
* const bot = new Bot(adapter); // init bot and bind to adapter
*
@ -145,9 +145,9 @@ class Bot extends middlewareSet_1.MiddlewareSet {
for (let i = 0; i < activities.length; i++) {
let activity = activities[i];
if (!activity.type) {
activity.type = activity_1.ActivityTypes.message;
activity.type = botbuilder_schema_1.ActivityTypes.Message;
}
activity_1.applyConversationReference(activity, context.conversationReference);
botContext_1.applyConversationReference(activity, context.conversationReference);
}
// Run post activity pipeline
const adapter = this.adapter;
@ -157,10 +157,11 @@ class Bot extends middlewareSet_1.MiddlewareSet {
.then((responses) => {
// Ensure responses array populated
if (!Array.isArray(responses)) {
responses = [];
let mockResponses = [];
for (let i = 0; i < activities.length; i++) {
responses.push({});
mockResponses.push({});
}
return mockResponses;
}
return responses;
});

Просмотреть файл

@ -1 +1 @@
{"version":3,"file":"bot.js","sourceRoot":"","sources":["../src/bot.ts"],"names":[],"mappings":";;AAAA;;GAEG;AACH;;;GAGG;AACH,mDAAgD;AAChD,yCAAsI;AAGtI,6CAAgD;AAChD,uDAAsE;AACtE,6CAAsE;AAEtE;;;;;;;;;;;;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-5,7 +5,7 @@
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
import { Activity } from './activity';
import { Activity, ConversationReference } from 'botbuilder-schema';
import { Bot } from './bot';
/**
* Creates a new BotContext instance.
@ -13,4 +13,6 @@ import { Bot } from './bot';
* @param bot Bot the context is for.
* @param request (Optional) request to initialize the context with.
*/
export declare function createBotContext(bot: Bot, request?: Activity): BotContext;
export declare function createBotContext(bot: Bot, request?: Activity | ConversationReference): BotContext;
export declare function getConversationReference(activity: Partial<Activity>): Partial<ConversationReference>;
export declare function applyConversationReference(activity: Partial<Activity>, reference: Partial<ConversationReference>): void;

Просмотреть файл

@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
const activity_1 = require("./activity");
const botbuilder_schema_1 = require("botbuilder-schema");
const bot_1 = require("./bot");
/**
* Creates a new BotContext instance.
@ -25,7 +25,7 @@ function createBotContext(bot, request) {
context.templateEngines = [];
// Populate conversation reference
if (request) {
context.conversationReference = activity_1.getConversationReference(request);
context.conversationReference = getConversationReference(request);
}
// Add methods
// !!!!!!! Be sure to use "this." when accessing members of the context object because
@ -47,8 +47,8 @@ function createBotContext(bot, request) {
context.endOfConversation = function endOfConversation(code) {
throwIfDisposed('endOfConversation');
const activity = {
type: activity_1.ActivityTypes.endOfConversation,
code: code || activity_1.EndOfConversationCodes.completedSuccessfully
type: botbuilder_schema_1.ActivityTypes.EndOfConversation,
code: code || botbuilder_schema_1.EndOfConversationCodes.CompletedSuccessfully
};
this.responses.push(activity);
return this;
@ -62,13 +62,13 @@ function createBotContext(bot, request) {
}
if (typeof textOrActivity === 'object') {
if (!textOrActivity.type) {
textOrActivity.type = activity_1.ActivityTypes.message;
textOrActivity.type = botbuilder_schema_1.ActivityTypes.Message;
}
this.responses.push(textOrActivity);
}
else {
const activity = Object.assign({
type: activity_1.ActivityTypes.message,
type: botbuilder_schema_1.ActivityTypes.Message,
text: textOrActivity || '',
}, additional || {});
if (typeof speak === 'string') {
@ -106,7 +106,7 @@ function createBotContext(bot, request) {
};
context.showTyping = function showTyping() {
throwIfDisposed('showTyping');
this.responses.push({ type: activity_1.ActivityTypes.typing });
this.responses.push({ type: botbuilder_schema_1.ActivityTypes.Typing });
return this;
};
Object.defineProperty(context, 'responded', {
@ -117,4 +117,24 @@ function createBotContext(bot, request) {
return context;
}
exports.createBotContext = createBotContext;
function getConversationReference(activity) {
return {
activityId: activity.id,
user: activity.from,
bot: activity.recipient,
conversation: activity.conversation,
channelId: activity.channelId,
serviceUrl: activity.serviceUrl
};
}
exports.getConversationReference = getConversationReference;
function applyConversationReference(activity, reference) {
activity.channelId = reference.channelId;
activity.serviceUrl = reference.serviceUrl;
activity.conversation = reference.conversation;
activity.from = reference.bot;
activity.recipient = reference.user;
activity.replyToId = reference.activityId;
}
exports.applyConversationReference = applyConversationReference;
//# sourceMappingURL=botContext.js.map

Просмотреть файл

@ -1 +1 @@
{"version":3,"file":"botContext.js","sourceRoot":"","sources":["../src/botContext.ts"],"names":[],"mappings":";;AAAA;;GAEG;AACH;;;GAGG;AACH,yCAA8H;AAC9H,+BAA4B;AAM5B;;;;;GAKG;AACH,0BAAiC,GAAQ,EAAE,OAAkB;IACzD,MAAM,OAAO,GAAe,EAAE,CAAC;IAC/B,OAAO,CAAC,GAAG,GAAG,GAAG,CAAC;IAClB,OAAO,CAAC,OAAO,GAAG,OAAO,IAAI,EAAE,CAAC;IAChC,OAAO,CAAC,SAAS,GAAG,EAAE,CAAC;IACvB,OAAO,CAAC,qBAAqB,GAAG,EAAE,CAAC;IACnC,OAAO,CAAC,KAAK,GAAG,EAAE,CAAC;IACb,OAAQ,CAAC,eAAe,GAAG,EAAE,CAAC;IAEpC,kCAAkC;IAClC,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;QACV,OAAO,CAAC,qBAAqB,GAAG,mCAAwB,CAAC,OAAO,CAAC,CAAC;IACtE,CAAC;I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U,EAAE,QAAQ,CAAC,EAAE;QACvB,IAAI,EAAE,QAAQ,CAAC,IAAI;QACnB,GAAG,EAAE,QAAQ,CAAC,SAAS;QACvB,YAAY,EAAE,QAAQ,CAAC,YAAY;QACnC,SAAS,EAAE,QAAQ,CAAC,SAAS;QAC7B,UAAU,EAAE,QAAQ,CAAC,UAAU;KAClC,CAAC;AACN,CAAC;AATD,4DASC;AAED,oCAA2C,QAA2B,EAAE,SAAyC;IAC7G,QAAQ,CAAC,SAAS,GAAG,SAAS,CAAC,SAAS,CAAC;IACzC,QAAQ,CAAC,UAAU,GAAG,SAAS,CAAC,UAAU,CAAC;IAC3C,QAAQ,CAAC,YAAY,GAAG,SAAS,CAAC,YAAY,CAAC;IAC/C,QAAQ,CAAC,IAAI,GAAG,SAAS,CAAC,GAAG,CAAC;IAC9B,QAAQ,CAAC,SAAS,GAAG,SAAS,CAAC,IAAI,CAAC;IACpC,QAAQ,CAAC,SAAS,GAAG,SAAS,CAAC,UAAU,CAAC;AAC9C,CAAC;AAPD,gEAOC"}

Просмотреть файл

@ -6,7 +6,7 @@
* Licensed under the MIT License.
*/
import { Middleware } from './middleware';
import { Activity, ConversationResourceResponse } from './activity';
import { Activity, ConversationResourceResponse } from 'botbuilder-schema';
import { StoreItems } from './storage';
/** Optional settings used to configure a BotStateManager instance. */
export interface BotStateManagerSettings {

Просмотреть файл

@ -41,7 +41,7 @@ class BotStateManager {
}
postActivity(context, activities, next) {
if (this.settings.writeBeforePost) {
// save state
// save state
return this.write(context, {}).then(() => next());
}
else {
@ -49,7 +49,7 @@ class BotStateManager {
}
}
contextDone(context, next) {
// save state
// save state
return this.write(context, {}).then(() => next());
}
read(context, keys) {

Просмотреть файл

@ -1 +1 @@
{"version":3,"file":"botStateManager.js","sourceRoot":"","sources":["../src/botStateManager.ts"],"names":[],"mappings":";;AA2BA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH;IAGI;;;;OAIG;IACH,YAAmB,QAA2C;QAC1D,IAAI,CAAC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CAAC,CAAC,GAAG,OAAO,CAAC,KAAK,CAAC,IAAI,IAAI,EAAE,CAAC;QAC9D,CAAC;QACD,EAAE,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,wBAAwB,CAAC,CAAC,CAAC;YACzC,OAAO,CAAC,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC,GAAG,OAAO,CAAC,KAAK,CAAC,YAAY,IAAI,EAAE,CAAC;QAC9E,CAAC;QAED,eAAe;QACf,EAAE,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC,CAAC;YAC/B,GAAG,CAAC,CAAC,MAAM,GAAG,IAAI,OAAO,CAAC,CAAC,CAAC;gBACxB,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,GAAG,GAAG,CAAC;YAC5B,CAAC;QACL,CAAC;QAED,gBAAgB;QAChB,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IAC1C,CAAC;IAEO,OAAO,CAAC,OAAmB;QAC/B,MAAM,GAAG,GAAG,OAAO,CAAC,qBAAqB,CAAC;QAC1C,MAAM,CAAC,OAAO,GAAG,GAAG,CAAC,SAAS,GAAG,GAAG,GAAS,GAAG,CAAC,IAAK,CAAC,EAAE,CAAC;IAC9D,CAAC;IAEO,eAAe,CAAC,OAAmB;QACvC,MAAM,GAAG,GAAG,OAAO,CAAC,qBAAqB,CAAC;QAC1C,MAAM,CAAC,eAAe,GAAG,GAAG,CAAC,SAAS,GAAG,GAAG,GAAS,GAAG,CAAC,YAAa,CAAC,EAAE,CAAC;IAC9E,CAAC;CACJ;AAjGD,0CAiGC"}

8
libraries/botbuilder/lib/botbuilder.d.ts поставляемый
Просмотреть файл

@ -5,7 +5,6 @@
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
export * from './activity';
export * from './attachmentRecognizer';
export * from './bot';
export * from './botService';
@ -29,8 +28,9 @@ export * from './storageMiddleware';
export * from './templateManager';
export * from './dictionaryRenderer';
export * from './testAdapter';
export * from 'botbuilder-schema';
import { Bot } from './bot';
import { Activity, ConversationReference, ConversationResourceResponse } from './activity';
import { Activity, ConversationReference, ConversationResourceResponse } from 'botbuilder-schema';
import { Intent } from './intentRecognizer';
import { StoreItem, Storage } from './storage';
import { TemplateManager } from './templateManager';
@ -42,13 +42,13 @@ declare global {
/** The Bot object for this context. */
bot: Bot;
/** The received activity. */
request: Activity;
request: Partial<Activity>;
/** Queue of responses to send to the user. */
responses: Partial<Activity>[];
/** If true at least one response has been sent for the current turn of conversation. */
readonly responded: boolean;
/** The calculated conversation reference for this request. */
conversationReference: ConversationReference;
conversationReference: Partial<ConversationReference>;
/**
* Persisted state related to the request.
*/

Просмотреть файл

@ -10,7 +10,6 @@ function __export(m) {
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
Object.defineProperty(exports, "__esModule", { value: true });
__export(require("./activity"));
__export(require("./attachmentRecognizer"));
__export(require("./bot"));
__export(require("./botService"));
@ -31,4 +30,5 @@ __export(require("./storageMiddleware"));
__export(require("./templateManager"));
__export(require("./dictionaryRenderer"));
__export(require("./testAdapter"));
__export(require("botbuilder-schema"));
//# sourceMappingURL=botbuilder.js.map

Просмотреть файл

@ -1 +1 @@
{"version":3,"file":"botbuilder.js","sourceRoot":"","sources":["../src/botbuilder.ts"],"names":[],"mappings":";AAAA;;GAEG;AACH;;;GAGG;;;;;AAEH,gCAA2B;AAC3B,4CAAuC;AACvC,2BAAsB;AACtB,kCAA6B;AAC7B,uCAAkC;AAClC,sCAAiC;AACjC,kCAA6B;AAE7B,oCAA+B;AAC/B,wCAAmC;AACnC,2CAAsC;AACtC,qCAAgC;AAChC,kCAA6B;AAC7B,qCAAgC;AAChC,qCAAgC;AAChC,kCAA6B;AAC7B,qCAAgC;AAChC,wCAAmC;AAGnC,yCAAoC;AACpC,uCAAkC;AAClC,0CAAqC;AACrC,mCAA8B"}
{"version":3,"file":"botbuilder.js","sourceRoot":"","sources":["../src/botbuilder.ts"],"names":[],"mappings":";AAAA;;GAEG;AACH;;;GAGG;;;;;AAEH,4CAAuC;AACvC,2BAAsB;AACtB,kCAA6B;AAC7B,uCAAkC;AAClC,sCAAiC;AACjC,kCAA6B;AAE7B,oCAA+B;AAC/B,wCAAmC;AACnC,2CAAsC;AACtC,qCAAgC;AAChC,kCAA6B;AAC7B,qCAAgC;AAChC,qCAAgC;AAChC,kCAA6B;AAC7B,qCAAgC;AAChC,wCAAmC;AAGnC,yCAAoC;AACpC,uCAAkC;AAClC,0CAAqC;AACrC,mCAA8B;AAC9B,uCAAkC"}

28
libraries/botbuilder/lib/cardStyler.d.ts поставляемый
Просмотреть файл

@ -5,7 +5,7 @@
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
import * as activity from './activity';
import { Attachment, MediaUrl, CardAction, AnimationCard, CardImage, HeroCard, ReceiptCard, ThumbnailCard } from "botbuilder-schema";
/**
* A set of utility functions designed to assist with the formatting of the various card types a
* bot can return. All of these functions return an `Attachment` which can be added to an `Activity`
@ -48,7 +48,7 @@ export declare class CardStyler {
*
* @param card The adaptive card to return as an attachment.
*/
static adaptiveCard(card: any): activity.Attachment;
static adaptiveCard(card: any): Attachment;
/**
* Returns an attachment for an animation card.
*
@ -57,7 +57,7 @@ export declare class CardStyler {
* @param buttons (Optional) set of buttons to include on the card.
* @param other (Optional) additional properties to include on the card.
*/
static animationCard(title: string, media: (activity.MediaUrl | string)[], buttons?: (activity.CardAction | string)[], other?: Partial<activity.AnimationCard>): activity.Attachment;
static animationCard(title: string, media: (MediaUrl | string)[], buttons?: (CardAction | string)[], other?: Partial<AnimationCard>): Attachment;
/**
* Returns an attachment for an audio card.
*
@ -66,7 +66,7 @@ export declare class CardStyler {
* @param buttons (Optional) set of buttons to include on the card.
* @param other (Optional) additional properties to include on the card.
*/
static audioCard(title: string, media: (activity.MediaUrl | string)[], buttons?: (activity.CardAction | string)[], other?: Partial<activity.AnimationCard>): activity.Attachment;
static audioCard(title: string, media: (MediaUrl | string)[], buttons?: (CardAction | string)[], other?: Partial<AnimationCard>): Attachment;
/**
* Returns an attachment for a hero card. Hero cards tend to have one dominant full width image
* and the cards text & buttons can usually be found below the image.
@ -77,15 +77,15 @@ export declare class CardStyler {
* @param buttons (Optional) set of buttons to include on the card.
* @param other (Optional) additional properties to include on the card.
*/
static heroCard(title: string, images?: (activity.CardImage | string)[], buttons?: (activity.CardAction | string)[], other?: Partial<activity.HeroCard>): activity.Attachment;
static heroCard(title: string, text: string, images?: (activity.CardImage | string)[], buttons?: (activity.CardAction | string)[], other?: Partial<activity.HeroCard>): activity.Attachment;
static heroCard(title: string, images?: (CardImage | string)[], buttons?: (CardAction | string)[], other?: Partial<HeroCard>): Attachment;
static heroCard(title: string, text: string, images?: (CardImage | string)[], buttons?: (CardAction | string)[], other?: Partial<HeroCard>): Attachment;
/**
* Returns an attachment for a receipt card. The attachment will contain the card and the
* appropriate `contentType`.
*
* @param card The adaptive card to return as an attachment.
*/
static receiptCard(card: activity.ReceiptCard): activity.Attachment;
static receiptCard(card: ReceiptCard): Attachment;
/**
* Returns an attachment for a signin card. For channels that don't natively support signin
* cards an alternative message will be rendered.
@ -94,7 +94,7 @@ export declare class CardStyler {
* @param url The link to the signin page the user needs to visit.
* @param text (Optional) additional text to include on the card.
*/
static signinCard(title: string, url: string, text?: string): activity.Attachment;
static signinCard(title: string, url: string, text?: string): Attachment;
/**
* Returns an attachment for a thumbnail card. Thumbnail cards are similar to [hero cards](#herocard)
* but instead of a full width image, they're typically rendered with a smaller thumbnail version of
@ -107,8 +107,8 @@ export declare class CardStyler {
* @param buttons (Optional) set of buttons to include on the card.
* @param other (Optional) additional properties to include on the card.
*/
static thumbnailCard(title: string, images?: (activity.CardImage | string)[], buttons?: (activity.CardAction | string)[], other?: Partial<activity.ThumbnailCard>): activity.Attachment;
static thumbnailCard(title: string, text: string, images?: (activity.CardImage | string)[], buttons?: (activity.CardAction | string)[], other?: Partial<activity.ThumbnailCard>): activity.Attachment;
static thumbnailCard(title: string, images?: (CardImage | string)[], buttons?: (CardAction | string)[], other?: Partial<ThumbnailCard>): Attachment;
static thumbnailCard(title: string, text: string, images?: (CardImage | string)[], buttons?: (CardAction | string)[], other?: Partial<ThumbnailCard>): Attachment;
/**
* Returns an attachment for a video card.
*
@ -117,24 +117,24 @@ export declare class CardStyler {
* @param buttons (Optional) set of buttons to include on the card.
* @param other (Optional) additional properties to include on the card.
*/
static videoCard(title: string, media: (activity.MediaUrl | string)[], buttons?: (activity.CardAction | string)[], other?: Partial<activity.AnimationCard>): activity.Attachment;
static videoCard(title: string, media: (MediaUrl | string)[], buttons?: (CardAction | string)[], other?: Partial<AnimationCard>): Attachment;
/**
* Returns a properly formatted array of actions. Supports converting strings to `messageBack`
* actions (note: using 'imBack' for now as 'messageBack' doesn't work properly in emulator.)
*
* @param actions Array of card actions or strings. Strings will be converted to `messageBack` actions.
*/
static actions(actions: (activity.CardAction | string)[] | undefined): activity.CardAction[];
static actions(actions: (CardAction | string)[] | undefined): CardAction[];
/**
* Returns a properly formatted array of card images.
*
* @param images Array of card images or strings. Strings will be converted to card images.
*/
static images(images: (activity.CardImage | string)[] | undefined): activity.CardImage[];
static images(images: (CardImage | string)[] | undefined): CardImage[];
/**
* Returns a properly formatted array of media url objects.
*
* @param links Array of media url objects or strings. Strings will be converted to a media url object.
*/
static media(links: (activity.MediaUrl | string)[] | undefined): activity.MediaUrl[];
static media(links: (MediaUrl | string)[] | undefined): MediaUrl[];
}

Просмотреть файл

@ -1,5 +1,13 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
/**
* @module botbuilder
*/
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
const botbuilder_schema_1 = require("botbuilder-schema");
/**
* A set of utility functions designed to assist with the formatting of the various card types a
* bot can return. All of these functions return an `Attachment` which can be added to an `Activity`
@ -79,7 +87,7 @@ class CardStyler {
* @param text (Optional) additional text to include on the card.
*/
static signinCard(title, url, text) {
const card = { buttons: [{ type: 'signin', title: title, value: url }] };
const card = { buttons: [{ type: botbuilder_schema_1.ActionTypes.Signin, title: title, value: url }] };
if (text) {
card.text = text;
}
@ -131,7 +139,7 @@ class CardStyler {
list.push(a);
}
else {
list.push({ type: 'imBack', value: a.toString(), title: a.toString() });
list.push({ type: botbuilder_schema_1.ActionTypes.ImBack, value: a.toString(), title: a.toString() });
}
});
return list;

Просмотреть файл

@ -1 +1 @@
{"version":3,"file":"cardStyler.js","sourceRoot":"","sources":["../src/cardStyler.ts"],"names":[],"mappings":";;AASA;;;;;;;;;;;;;;GAcG;AACH;IAaI;;;;;;;;;;;;;;OAcG;IACH,MAAM,CAAC,YAAY,CAAC,IAAS;QAEzB,MAAM,CAAC,EAAE,WAAW,EAAE,UAAU,CAAC,YAAY,CAAC,YAAY,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IAChF,CAAC;IAED;;;;;;;OAOG;IACH,MAAM,CAAC,aAAa,CAAC,KAAa,EACb,KAAmC,EACnC,OAAwC,EACxC,KAAuC;QAExD,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,YAAY,CAAC,aAAa,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;IAC1F,CAAC;IAED;;;;;;;OAOG;IACH,MAAM,CAAC,SAAS,CAAC,KAAa,EACb,KAAmC,EACnC,OAAwC,EACxC,KAAuC;QAEpD,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,YAAY,CAAC,SAAS,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;IACtF,CAAC;IAcD,MAAM,CAAC,QAAQ,CAAC,KAAa,EAAE,IAAU,EAAE,MAAY,EAAE,OAAa,EAAE,KAAkC;QACtG,MAAM,CAAC,GAAG,UAAU,CAAC,aAAa,CAAC,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;QACxE,CAAC,CAAC,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,CAAC,CAAC;QACH,MAAM,CAAC,IAAI,CAAC;IAChB,CAAC;;AA1MD,iDAAiD;AAC1C,uBAAY,GAAG;IAClB,YAAY,EAAE,yCAAyC;IACvD,aAAa,EAAE,0CAA0C;IACzD,SAAS,EAAE,sCAAsC;IACjD,QAAQ,EAAE,qCAAqC;IAC/C,WAAW,EAAE,wCAAwC;IACrD,UAAU,EAAE,uCAAuC;IACnD,aAAa,EAAE,0CAA0C;IACzD,SAAS,EAAE,sCAAsC;CACpD,CAAC;AAXN,gCA4MC;AAED,mBAAmB,WAAmB,EACnB,KAAa,EACb,KAA0B,EAC1B,OAA+B,EAC/B,KAAW;IAE1B,MAAM,IAAI,GAAc,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;IACjD,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;QAAC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IAAC,CAAC;IAClC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;QAAC,IAAI,CAAC,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAAC,CAAC;IACpD,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;QAAC,IAAI,CAAC,OAAO,GAAG,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IAAC,CAAC;IAC5D,MAAM,CAAC,EAAE,WAAW,EAAE,WAAW,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;AACvD,CAAC"}

Просмотреть файл

@ -7,7 +7,7 @@
*/
import { TemplateRenderer } from './templateManager';
import { Middleware } from './middleware';
import { Activity } from './activity';
import { Activity } from 'botbuilder-schema';
export declare type SimpleTemplateFunction = (context: BotContext, data: Object) => Partial<Activity> | string | undefined;
/**
* Map of template Id -> Function

2
libraries/botbuilder/lib/entityObject.d.ts поставляемый
Просмотреть файл

@ -2,7 +2,7 @@
* @module botbuilder
*/
/** second comment block */
import { Entity } from './activity';
import { Entity } from 'botbuilder-schema';
/**
* A strongly typed entity.
*/

2
libraries/botbuilder/lib/jsonTemplates.d.ts поставляемый
Просмотреть файл

@ -7,7 +7,7 @@
*/
import { TemplateRenderer } from './templateManager';
import { Middleware } from './middleware';
import { Activity } from './activity';
import { Activity } from 'botbuilder-schema';
/**
* A template function that can return a stringified value from a given data object.
*

Просмотреть файл

@ -103,7 +103,7 @@ class JsonTemplates {
return (data, path) => {
// Check for optional path.
// - Templates can be executed as children of other templates so the path
// specifies the property off the parent to execute the template for.
// specifies the property off the parent to execute the template for.
let obj = '';
if (path) {
const value = getValue(data, path);

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

21
libraries/botbuilder/lib/messageStyler.d.ts поставляемый
Просмотреть файл

@ -1,11 +1,4 @@
/**
* @module botbuilder
*/
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
import * as activity from './activity';
import { Activity, CardAction, Attachment } from 'botbuilder-schema';
/**
* A set of utility functions to assist with the formatting of the various message types a bot can
* return.
@ -41,7 +34,7 @@ export declare class MessageStyler {
* @param text Text to include in the message.
* @param speak (Optional) SSML to include in the message.
*/
static text(text: string, speak?: string): Partial<activity.Activity>;
static text(text: string, speak?: string): Partial<Activity>;
/**
* Returns a message that includes a set of suggested actions and optional text.
*
@ -49,7 +42,7 @@ export declare class MessageStyler {
* @param text (Optional) text of the message.
* @param speak (Optional) SSML to include with the message.
*/
static suggestedActions(actions: (activity.CardAction | string)[], text?: string, speak?: string): Partial<activity.Activity>;
static suggestedActions(actions: (CardAction | string)[], text?: string, speak?: string): Partial<Activity>;
/**
* Returns a single message activity containing an attachment.
*
@ -57,7 +50,7 @@ export declare class MessageStyler {
* @param text (Optional) text of the message.
* @param speak (Optional) SSML to include with the message.
*/
static attachment(attachment: activity.Attachment, text?: string, speak?: string): Partial<activity.Activity>;
static attachment(attachment: Attachment, text?: string, speak?: string): Partial<Activity>;
/**
* Returns a message that will display a set of attachments in list form.
*
@ -65,7 +58,7 @@ export declare class MessageStyler {
* @param text (Optional) text of the message.
* @param speak (Optional) SSML to include with the message.
*/
static list(attachments: activity.Attachment[], text?: string, speak?: string): Partial<activity.Activity>;
static list(attachments: Attachment[], text?: string, speak?: string): Partial<Activity>;
/**
* Returns a message that will display a set of attachments using a carousel layout.
*
@ -86,7 +79,7 @@ export declare class MessageStyler {
* @param text (Optional) text of the message.
* @param speak (Optional) SSML to include with the message.
*/
static carousel(attachments: activity.Attachment[], text?: string, speak?: string): Partial<activity.Activity>;
static carousel(attachments: Attachment[], text?: string, speak?: string): Partial<Activity>;
/**
* Returns a message that will display a single image or video to a user.
*
@ -105,5 +98,5 @@ export declare class MessageStyler {
* @param text (Optional) text of the message.
* @param speak (Optional) SSML to include with the message.
*/
static contentUrl(url: string, contentType: string, name?: string, text?: string, speak?: string): Partial<activity.Activity>;
static contentUrl(url: string, contentType: string, name?: string, text?: string, speak?: string): Partial<Activity>;
}

Просмотреть файл

@ -1,4 +1,5 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
/**
* @module botbuilder
*/
@ -6,9 +7,8 @@
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
const activity = require("./activity");
const cardStyler_1 = require("./cardStyler");
const botbuilder_schema_1 = require("botbuilder-schema");
/**
* A set of utility functions to assist with the formatting of the various message types a bot can
* return.
@ -46,7 +46,7 @@ class MessageStyler {
*/
static text(text, speak) {
const msg = {
type: activity.ActivityTypes.message,
type: botbuilder_schema_1.ActivityTypes.Message,
text: text || ''
};
if (speak) {
@ -63,7 +63,7 @@ class MessageStyler {
*/
static suggestedActions(actions, text, speak) {
const msg = {
type: activity.ActivityTypes.message,
type: botbuilder_schema_1.ActivityTypes.Message,
suggestedActions: {
actions: cardStyler_1.CardStyler.actions(actions)
}
@ -84,7 +84,7 @@ class MessageStyler {
* @param speak (Optional) SSML to include with the message.
*/
static attachment(attachment, text, speak) {
return attachmentActivity(activity.AttachmentLayouts.list, [attachment], text, speak);
return attachmentActivity(botbuilder_schema_1.AttachmentLayoutTypes.List, [attachment], text, speak);
}
/**
* Returns a message that will display a set of attachments in list form.
@ -94,7 +94,7 @@ class MessageStyler {
* @param speak (Optional) SSML to include with the message.
*/
static list(attachments, text, speak) {
return attachmentActivity(activity.AttachmentLayouts.list, attachments, text, speak);
return attachmentActivity(botbuilder_schema_1.AttachmentLayoutTypes.List, attachments, text, speak);
}
/**
* Returns a message that will display a set of attachments using a carousel layout.
@ -117,7 +117,7 @@ class MessageStyler {
* @param speak (Optional) SSML to include with the message.
*/
static carousel(attachments, text, speak) {
return attachmentActivity(activity.AttachmentLayouts.carousel, attachments, text, speak);
return attachmentActivity(botbuilder_schema_1.AttachmentLayoutTypes.Carousel, attachments, text, speak);
}
/**
* Returns a message that will display a single image or video to a user.
@ -142,13 +142,13 @@ class MessageStyler {
if (name) {
a.name = name;
}
return attachmentActivity(activity.AttachmentLayouts.list, [a], text, speak);
return attachmentActivity(botbuilder_schema_1.AttachmentLayoutTypes.List, [a], text, speak);
}
}
exports.MessageStyler = MessageStyler;
function attachmentActivity(attachmentLayout, attachments, text, speak) {
const msg = {
type: activity.ActivityTypes.message,
type: botbuilder_schema_1.ActivityTypes.Message,
attachmentLayout: attachmentLayout,
attachments: attachments
};

Просмотреть файл

@ -1 +1 @@
{"version":3,"file":"messageStyler.js","sourceRoot":"","sources":["../src/messageStyler.ts"],"names":[],"mappings":";AAAA;;GAEG;AACH;;;GAGG;;AAEH,uCAAuC;AACvC,6CAA0C;AAE1C;;;;;;;;;;;;;;;;;;GAkBG;AACH;IACI;;;;;;;;;;;;;;OAcG;IACH,MAAM,CAAC,IAAI,CAAC,IAAY,EAAE,KAAc;QACpC,MAAM,GAAG,GAA+B;YACpC,IAAI,EAAE,QAAQ,CAAC,aAAa,CAAC,OAAO;YACpC,IAAI,EAAE,IAAI,IAAI,EAAE;SACnB,CAAC;QACF,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC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,EAAE,KAAK,CAAC,CAAC;IACxF,CAAC;IAED;;;;;;;;;;;;;;;;;OAiBG;IACH,MAAM,CAAC,UAAU,CAAC,GAAW,EAAE,WAAmB,EAAE,IAAa,EAAE,IAAa,EAAE,KAAc;QAC5F,MAAM,CAAC,GAAe,EAAE,WAAW,EAAE,WAAW,EAAE,UAAU,EAAE,GAAG,EAAE,CAAC;QACpE,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;YAAC,CAAC,CAAC,IAAI,GAAG,IAAI,CAAC;QAAC,CAAC;QAC5B,MAAM,CAAC,kBAAkB,CAAC,yCAAqB,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;IAC5E,CAAC;CACJ;AAjHD,sCAiHC;AAGD,4BAA4B,gBAAuC,EAAE,WAAyB,EAAE,IAAa,EAAE,KAAc;IACzH,MAAM,GAAG,GAAsB;QAC3B,IAAI,EAAE,iCAAa,CAAC,OAAO;QAC3B,gBAAgB,EAAE,gBAAgB;QAClC,WAAW,EAAE,WAAW;KAC3B,CAAC;IACF,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;QACP,GAAG,CAAC,IAAI,GAAG,IAAI,CAAC;IACpB,CAAC;IACD,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;QACR,GAAG,CAAC,KAAK,GAAG,KAAK,CAAC;IACtB,CAAC;IACD,MAAM,CAAC,GAAG,CAAC;AACf,CAAC"}

2
libraries/botbuilder/lib/middleware.d.ts поставляемый
Просмотреть файл

@ -5,7 +5,7 @@
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
import { Activity, ConversationResourceResponse } from './activity';
import { Activity, ConversationResourceResponse } from 'botbuilder-schema';
/**
* Type signature for a return value that can (Optionally) return its value
* asynchronously using a Promise.

2
libraries/botbuilder/lib/middlewareSet.d.ts поставляемый
Просмотреть файл

@ -5,7 +5,7 @@
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
import { Activity, ConversationResourceResponse } from './activity';
import { Activity, ConversationResourceResponse } from 'botbuilder-schema';
import { Middleware } from './middleware';
/**
* A set of `Middleware` plugins. The set itself is middleware so you can easily package up a set

Просмотреть файл

@ -30,7 +30,7 @@ export interface RegExpRecognizerSettings {
* **Usage Example**
*
* ```js
* import { RegExpRecognizer } from 'botbuilder-core';
* import { RegExpRecognizer } from 'botbuilder';
*
* // Define RegExp's for well known commands.
* const recognizer = new RegExpRecognizer()

Просмотреть файл

@ -22,7 +22,7 @@ const entityObject_1 = require("./entityObject");
* **Usage Example**
*
* ```js
* import { RegExpRecognizer } from 'botbuilder-core';
* import { RegExpRecognizer } from 'botbuilder';
*
* // Define RegExp's for well known commands.
* const recognizer = new RegExpRecognizer()

Просмотреть файл

@ -6,7 +6,7 @@
* Licensed under the MIT License.
*/
import { Middleware } from './middleware';
import { Activity, ConversationResourceResponse } from './activity';
import { Activity, ConversationResourceResponse } from 'botbuilder-schema';
/** Interface for a template renderer which provides the ability
* to create a text reply or activity reply from the language, templateid and data object
**/

Просмотреть файл

@ -8,7 +8,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
});
};
Object.defineProperty(exports, "__esModule", { value: true });
const activity_1 = require("./activity");
const botbuilder_schema_1 = require("botbuilder-schema");
class TemplateManager {
constructor() {
this.templateRenderers = [];
@ -64,13 +64,13 @@ class TemplateManager {
if (templateOutput) {
if (typeof templateOutput === 'object') {
if (!templateOutput.type) {
templateOutput.type = activity_1.ActivityTypes.message;
templateOutput.type = botbuilder_schema_1.ActivityTypes.Message;
}
return templateOutput;
}
else {
const activity = {
type: activity_1.ActivityTypes.message,
type: botbuilder_schema_1.ActivityTypes.Message,
text: templateOutput || '',
};
return activity;

Просмотреть файл

@ -1 +1 @@
{"version":3,"file":"templateManager.js","sourceRoot":"","sources":["../src/templateManager.ts"],"names":[],"mappings":";;;;;;;;;;AAQA,yCAAsI;AAiBtI;IAAA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GAAG,IAAI,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,iBAAiB;YACzE,EAAE,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC;gBACzB,eAAe,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;YACjD,eAAe,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;YAEhC,qCAAqC;YACrC,6BAA6B;YAC7B,EAAE,CAAC,CAAC,QAAQ,CAAC,IAAI,IAAmB,UAAU,CAAC,CAAC,CAAC;gBAC7C,mCAAmC;gBACnC,GAAG,CAAC,CAAC,IAAI,MAAM,IAAI,eAAe,CAAC,CAAC,CAAC;oBACjC,iBAAiB;oBACjB,IAAI,aAAa,GAAG,MAAM,IAAI,CAAC,oBAAoB,CAAC,OAAO,EAAE,MAAM,EAAU,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAA;oBAC3G,EAAE,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC;wBAChB,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE,aAAa,CAAC,CAAC;wBACvC,MAAM,CAAC;oBACX,CAAC;gBACL,CAAC;gBACD,MAAM,IAAI,KAAK,CAAC,iCAAiC,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC;YACtE,CAAC;QACL,CAAC;KAAA;CAEJ;AA/FD,0CA+FC"}

12
libraries/botbuilder/lib/testAdapter.d.ts поставляемый
Просмотреть файл

@ -6,7 +6,7 @@
* Licensed under the MIT License.
*/
import { ActivityAdapter } from './activityAdapter';
import { Activity, ConversationReference } from './activity';
import { Activity, ConversationReference } from 'botbuilder-schema';
/**
* Test adapter used for unit tests.
* @example
@ -29,7 +29,7 @@ import { Activity, ConversationReference } from './activity';
export declare class TestAdapter implements ActivityAdapter {
private nextId;
reference: ConversationReference;
botReplies: Activity[];
botReplies: Partial<Activity>[];
/** INTERNAL implementation of `Adapter.onReceive`. */
onReceive: (activity: Activity) => Promise<void>;
/**
@ -58,14 +58,14 @@ export declare class TestAdapter implements ActivityAdapter {
* @param description description of test case
* @param timeout (default 3000ms) time to wait for response from bot
*/
test(userSays: string | Partial<Activity>, expected: string | Partial<Activity> | ((activity: Activity, description?: string) => void), description?: string, timeout?: number): TestFlow;
test(userSays: string | Partial<Activity>, expected: string | Partial<Activity> | ((activity: Partial<Activity>, description?: string) => void), description?: string, timeout?: number): TestFlow;
/**
* Throws if the bot's response doesn't match the expected text/activity
* @param expected expected text or activity from the bot
* @param description description of test case
* @param timeout (default 3000ms) time to wait for response from bot
*/
assertReply(expected: string | Partial<Activity> | ((activity: Activity, description?: string) => void), description?: string, timeout?: number): TestFlow;
assertReply(expected: string | Partial<Activity> | ((activity: Partial<Activity>, description?: string) => void), description?: string, timeout?: number): TestFlow;
/**
* throws if the bot's response is not one of the candidate strings
* @param candidates candidate responses
@ -86,7 +86,7 @@ export declare class TestFlow {
* @param description description of test case
* @param timeout (default 3000ms) time to wait for response from bot
*/
test(userSays: string | Partial<Activity>, expected: string | Partial<Activity> | ((activity: Activity, description?: string) => void), description?: string, timeout?: number): TestFlow;
test(userSays: string | Partial<Activity>, expected: string | Partial<Activity> | ((activity: Partial<Activity>, description?: string) => void), description?: string, timeout?: number): TestFlow;
/**
* Send something to the bot
* @param userSays text or activity simulating user input
@ -98,7 +98,7 @@ export declare class TestFlow {
* @param description description of test case
* @param timeout (default 3000ms) time to wait for response from bot
*/
assertReply(expected: string | Partial<Activity> | ((activity: Activity, description?: string) => void), description?: string, timeout?: number): TestFlow;
assertReply(expected: string | Partial<Activity> | ((activity: Partial<Activity>, description?: string) => void), description?: string, timeout?: number): TestFlow;
/**
* throws if the bot's response is not one of the candidate strings
* @param candidates candidate responses

Просмотреть файл

@ -1,6 +1,6 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const activity_1 = require("./activity");
const botbuilder_schema_1 = require("botbuilder-schema");
const assert = require("assert");
/**
* Test adapter used for unit tests.
@ -47,7 +47,7 @@ class TestAdapter {
/* INTERNAL */
_sendActivityToBot(userSays) {
// ready for next reply
let activity = (typeof userSays === 'string' ? { type: activity_1.ActivityTypes.message, text: userSays } : userSays);
let activity = (typeof userSays === 'string' ? { type: botbuilder_schema_1.ActivityTypes.Message, text: userSays } : userSays);
if (!activity.type)
throw new Error("Missing activity.type");
activity.channelId = this.reference.channelId;
@ -149,7 +149,7 @@ class TestFlow {
let myInterval = setInterval(() => {
let current = new Date().getTime();
if ((current - start) > timeout) {
let expectedActivity = (typeof expected === 'string' ? { type: activity_1.ActivityTypes.message, text: expected } : expected);
let expectedActivity = (typeof expected === 'string' ? { type: botbuilder_schema_1.ActivityTypes.Message, text: expected } : expected);
throw new Error(`${timeout}ms Timed out waiting for:${description || expectedActivity.text}`);
}
// if we have replies
@ -161,7 +161,7 @@ class TestFlow {
expected(botReply, description);
}
else if (typeof expected === 'string') {
assert.equal(botReply.type, activity_1.ActivityTypes.message, (description || '') + ` type === '${botReply.type}'. `);
assert.equal(botReply.type, botbuilder_schema_1.ActivityTypes.Message, (description || '') + ` type === '${botReply.type}'. `);
assert.equal(botReply.text, expected, (description || '') + ` text === "${botReply.text}"`);
}
else {

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

1881
libraries/botbuilder/package-lock.json сгенерированный

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -19,6 +19,10 @@
},
"main": "./lib/botbuilder.js",
"typings": "./lib/botbuilder.d.ts",
"dependencies": {
"botbuilder-schema": "^4.0.0-m1.2",
"assert": "^1.4.1"
},
"devDependencies": {
"@types/mocha": "^2.2.47",
"@types/node": "^9.3.0",
@ -32,8 +36,5 @@
"build": "tsc",
"build-docs": "typedoc --theme markdown --entryPoint botbuilder --excludePrivate --includeDeclarations --ignoreCompilerErrors --module amd --out ..\\..\\doc\\botbuilder .\\lib\\botbuilder.d.ts --hideGenerator --name \"Bot Builder SDK - Core\" --readme none",
"clean": "erase /q lib\\*.*"
},
"dependencies": {
"assert": "^1.4.1"
}
}

Просмотреть файл

@ -1,100 +0,0 @@
/**
* @module botbuilder
*/
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
export * from './index';
import { Activity, ConversationReference } from './index';
/** List of activity types supported by the Bot Framework. */
export const ActivityTypes = {
/** A user has added/removed the bot as a contact. */
contactRelationUpdate: 'contactRelationUpdate',
/** User(s) have either joined or left the conversation. */
conversationUpdate: 'conversationUpdate',
/** The conversation is being ended by either the bot or user. */
endOfConversation: 'endOfConversation',
/** A named event sent from or to a client. */
event: 'event',
/** An operation is being invoked. */
invoke: 'invoke',
/** A message sent from or to a user/group. */
message: 'message',
/** A message activity within a conversation has had a message reaction added or removed. */
messageReaction: 'messageReaction',
/** An indicator that the bot is typing. Should be periodically resent every few seconds. */
typing: 'typing'
}
/** Desired text format for a message being sent to a user. */
export const TextFormats = {
/** Message text should be rendered as plain text. */
plain: 'plain',
/** Message text should be rendered using markdown. */
markdown: 'markdown'
}
/** Desired layout style for a list of attachments sent to a user. */
export const AttachmentLayouts = {
/** Attachments should be rendered as a list. */
list: 'list',
/** Attachments should be rendered using a carousel layout. */
carousel: 'carousel'
}
/** Codes indicating why a conversation has ended. */
export const EndOfConversationCodes = {
/** The conversation was ended for unknown reasons. */
unknown: 'unknown',
/** The conversation completed successfully. */
completedSuccessfully: 'completedSuccessfully',
/** The user cancelled the conversation. */
userCancelled: 'userCancelled',
/** The conversation was ended because requests sent to the bot timed out. */
botTimedOut: 'botTimedOut',
/** The conversation was ended because the bot sent an invalid message. */
botIssuedInvalidMessage: 'botIssuedInvalidMessage',
/** The conversation ended because the channel experienced an internal failure */
channelFailed: 'channelFailed',
/** The conversation ended because the bot didn't recognize the users utterance. */
unrecognized: 'unrecognized'
}
export function getConversationReference(activity: Partial<Activity>): ConversationReference {
return {
activityId: activity.id,
user: activity.from,
bot: activity.recipient,
conversation: activity.conversation,
channelId: activity.channelId,
serviceUrl: activity.serviceUrl
};
}
export function applyConversationReference(activity: Partial<Activity>, reference: ConversationReference): void {
activity.channelId = reference.channelId;
activity.serviceUrl = reference.serviceUrl;
activity.conversation = reference.conversation;
activity.from = reference.bot;
activity.recipient = reference.user;
activity.replyToId = reference.activityId;
}

Просмотреть файл

@ -1,24 +1,24 @@
/**
* @module botbuilder
*/
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
import { Activity, ConversationReference, ConversationResourceResponse } from './activity';
import { Activity, ConversationReference, ConversationResourceResponse } from 'botbuilder-schema';
/**
* Implemented by activity adapters
*/
export interface ActivityAdapter {
/**
* Handler that returns incoming activities to a single consumer. The `Bot` will set this
* when the adapter is passed to its constructor. Just keep in mind that should the bots
* Handler that returns incoming activities to a single consumer. The `Bot` will set this
* when the adapter is passed to its constructor. Just keep in mind that should the bots
* adapter be replaced (like when running unit tests) this handler can end up being set
* back to undefined.
*/
onReceive: (activity: Activity) => Promise<void>;
/**
* Called by a consumer to send outgoing set of activities to a user.
*

Просмотреть файл

@ -2,21 +2,21 @@
* @module botbuilder
*/
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
import { Intent, IntentRecognizer } from './intentRecognizer';
import { EntityObject, EntityTypes } from './entityObject';
import { Attachment } from './index';
import { Attachment } from 'botbuilder-schema';
/** Optional settings for an `AttachmentRecognizer`. */
export interface AttachmentRecognizerSettings {
/**
* Name of the intent to return when an attachment is detected. This defaults to
/**
* Name of the intent to return when an attachment is detected. This defaults to
* a value of "Intents.AttachmentReceived".
*
*
* Developers can also adjust the name of the intent returned by adding content filters to
* the recognizer. This setting will be ignored when content filters are active.
* the recognizer. This setting will be ignored when content filters are active.
*/
intentName: string;
}
@ -58,10 +58,10 @@ export class AttachmentRecognizer extends IntentRecognizer {
if (context.request.attachments && context.request.attachments.length > 0) {
// Map attachments to entities
const entities: EntityObject<Attachment>[] = [];
context.request.attachments.forEach((a) => entities.push({
type: a.contentType || EntityTypes.attachment,
score: 1.0,
value: a
context.request.attachments.forEach((a) => entities.push({
type: a.contentType || EntityTypes.attachment,
score: 1.0,
value: a
}));
// Filter by content type
@ -97,8 +97,8 @@ export class AttachmentRecognizer extends IntentRecognizer {
});
} else {
// Return a single intent for all attachments
intents.push({
score: 1.0,
intents.push({
score: 1.0,
name: <string>this.settings.intentName,
entities: entities
});
@ -108,12 +108,12 @@ export class AttachmentRecognizer extends IntentRecognizer {
});
}
/**
/**
* Add a new content type filter to the recognizer. Adding one or more `contentType()` filters
* will result in only attachments of the specified type(s) being recognized.
*
* @param contentType The `Attachment.contentType` to look for.
* @param intentName Name of the intent to return when the given type is matched.
* @param intentName Name of the intent to return when the given type is matched.
*/
public contentType(contentType: string|RegExp, intentName: string): this {
this.typeFilters.push({ type: contentType, intentName: intentName });

Просмотреть файл

@ -2,14 +2,14 @@
* @module botbuilder
*/
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
import { MiddlewareSet } from './middlewareSet';
import { Activity, ConversationReference, ActivityTypes, ConversationResourceResponse, applyConversationReference } from './activity';
import { ActivityTypes, Activity, ConversationReference, ConversationResourceResponse, } from 'botbuilder-schema';
import { ActivityAdapter } from './activityAdapter';
import { Promiseable } from './middleware';
import { createBotContext } from './botContext';
import { createBotContext, applyConversationReference } from './botContext';
import { TemplateManager, TemplateRenderer } from './templateManager';
import { DictionaryRenderer, TemplateDictionary } from './botbuilder';
@ -19,7 +19,7 @@ import { DictionaryRenderer, TemplateDictionary } from './botbuilder';
* **Usage Example**
*
* ```js
* import { Bot } from 'botbuilder-core'; // typescript
* import { Bot } from 'botbuilder'; // typescript
*
* const bot = new Bot(adapter); // init bot and bind to adapter
*
@ -55,8 +55,8 @@ export class Bot extends MiddlewareSet {
}
/**
* Creates a new context object given an activity or conversation reference. The context object
* will be disposed of automatically once the callback completes or the promise it returns
* Creates a new context object given an activity or conversation reference. The context object
* will be disposed of automatically once the callback completes or the promise it returns
* completes.
*
* **Usage Example**
@ -77,10 +77,10 @@ export class Bot extends MiddlewareSet {
// Initialize context object
let context: BotContext;
if ((activityOrReference as Activity).type) {
context = createBotContext(this, activityOrReference);
context = createBotContext(this, <Activity>activityOrReference);
} else {
context = createBotContext(this);
context.conversationReference = activityOrReference;
context.conversationReference = <ConversationReference>activityOrReference;
}
// Run context created pipeline
@ -98,7 +98,7 @@ export class Bot extends MiddlewareSet {
/**
* Registers a new receiver with the bot. All incoming activities are routed to receivers in
* the order they're registered. The first receiver to return `{ handled: true }` prevents
* the order they're registered. The first receiver to return `{ handled: true }` prevents
* the receivers after it from being called.
*
* **Usage Example**
@ -106,7 +106,7 @@ export class Bot extends MiddlewareSet {
* ```js
* const bot = new Bot(adapter)
* .onReceive((context) => {
* context.reply(`Hello World`);
* context.reply(`Hello World`);
* });
* ```
*
@ -145,18 +145,18 @@ export class Bot extends MiddlewareSet {
}
/**
* INTERNAL sends an outgoing set of activities to the user. Calling `context.flushResponses()` achieves the same
* INTERNAL sends an outgoing set of activities to the user. Calling `context.flushResponses()` achieves the same
* effect and is the preferred way of sending activities to the user.
*
* @param context Context for the current turn of the conversation.
* @param activities Set of activities to send.
*/
public post(context: BotContext, ...activities: Partial<Activity>[]): Promise<ConversationReference[]> {
public post(context: BotContext, ...activities: Partial<Activity>[]): Promise<Partial<ConversationResourceResponse>[]> {
// Ensure activities are well formed.
for (let i = 0; i < activities.length; i++) {
let activity = activities[i];
if (!activity.type) {
activity.type = ActivityTypes.message
activity.type = ActivityTypes.Message
}
applyConversationReference(activity, context.conversationReference);
}
@ -169,8 +169,12 @@ export class Bot extends MiddlewareSet {
.then((responses) => {
// Ensure responses array populated
if (!Array.isArray(responses)) {
responses = [];
for (let i = 0; i < activities.length; i++) { responses.push({}) }
let mockResponses: ConversationResourceResponse[] = [];
for (let i = 0; i < activities.length; i++) {
mockResponses.push(<ConversationResourceResponse>{})
}
return mockResponses;
}
return responses;
});
@ -186,8 +190,8 @@ export class Bot extends MiddlewareSet {
*/
public receive(activity: Activity): Promise<void> {
// Create context and run receive activity pipeline
return this.createContext(activity,
(context) => this.receiveActivity(context,
return this.createContext(activity,
(context) => this.receiveActivity(context,
() => Promise.resolve()));
}
}

Просмотреть файл

@ -2,10 +2,10 @@
* @module botbuilder
*/
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
import { Activity, ActivityTypes, EndOfConversationCodes, ConversationReference, getConversationReference } from './activity';
import { ActivityTypes, EndOfConversationCodes, Activity, ConversationReference } from 'botbuilder-schema';
import { Bot } from './bot';
import { Intent } from './intentRecognizer';
import { EntityObject } from './entityObject';
@ -18,7 +18,7 @@ import { TemplateManager } from './templateManager';
* @param bot Bot the context is for.
* @param request (Optional) request to initialize the context with.
*/
export function createBotContext(bot: Bot, request?: Activity): BotContext {
export function createBotContext(bot: Bot, request?: Activity|ConversationReference): BotContext {
const context = <BotContext>{};
context.bot = bot;
context.request = request || {};
@ -44,7 +44,7 @@ export function createBotContext(bot: Bot, request?: Activity): BotContext {
context.delay = function delay(duration: number) {
throwIfDisposed('delay');
this.responses.push({ type: 'delay', value: duration });
this.responses.push({ type: <ActivityTypes>'delay', value: duration });
return this;
};
@ -52,11 +52,11 @@ export function createBotContext(bot: Bot, request?: Activity): BotContext {
disposed = true;
};
context.endOfConversation = function endOfConversation(code?: string) {
context.endOfConversation = function endOfConversation(code?: EndOfConversationCodes) {
throwIfDisposed('endOfConversation');
const activity: Partial<Activity> = {
type: ActivityTypes.endOfConversation,
code: code || EndOfConversationCodes.completedSuccessfully
type: ActivityTypes.EndOfConversation,
code: code || EndOfConversationCodes.CompletedSuccessfully
};
this.responses.push(activity);
return this;
@ -71,11 +71,11 @@ export function createBotContext(bot: Bot, request?: Activity): BotContext {
}
if (typeof textOrActivity === 'object') {
if (!(textOrActivity as Activity).type) { textOrActivity.type = ActivityTypes.message; }
if (!(textOrActivity as Activity).type) { textOrActivity.type = ActivityTypes.Message; }
this.responses.push(textOrActivity);
} else {
const activity: Partial<Activity> = Object.assign(<Partial<Activity>>{
type: ActivityTypes.message,
type: ActivityTypes.Message,
text: textOrActivity || '',
}, additional || {});
if (typeof speak === 'string') {
@ -91,7 +91,7 @@ export function createBotContext(bot: Bot, request?: Activity): BotContext {
// push internal template record
const activity: Partial<Activity> = <Partial<Activity>>{
type: "template",
type: <ActivityTypes>"template",
};
activity.text = templateId;
activity.value = data;
@ -108,9 +108,9 @@ export function createBotContext(bot: Bot, request?: Activity): BotContext {
args.unshift(this);
return Bot.prototype.post.apply(this.bot, args)
.then((results: ConversationReference[]) => {
if (cnt > 0) {
if (cnt > 0) {
this.responses.splice(0, cnt);
responded = true;
responded = true;
}
return results;
});
@ -118,15 +118,35 @@ export function createBotContext(bot: Bot, request?: Activity): BotContext {
context.showTyping = function showTyping() {
throwIfDisposed('showTyping');
this.responses.push({ type: ActivityTypes.typing });
this.responses.push({ type: ActivityTypes.Typing });
return this;
};
Object.defineProperty(context, 'responded', {
get: function () {
return (this as BotContext).responses.length > 0 || responded;
return (this as BotContext).responses.length > 0 || responded;
}
});
return context;
}
export function getConversationReference(activity: Partial<Activity>): Partial<ConversationReference> {
return {
activityId: activity.id,
user: activity.from,
bot: activity.recipient,
conversation: activity.conversation,
channelId: activity.channelId,
serviceUrl: activity.serviceUrl
};
}
export function applyConversationReference(activity: Partial<Activity>, reference: Partial<ConversationReference>): void {
activity.channelId = reference.channelId;
activity.serviceUrl = reference.serviceUrl;
activity.conversation = reference.conversation;
activity.from = reference.bot;
activity.recipient = reference.user;
activity.replyToId = reference.activityId;
}

Просмотреть файл

@ -2,11 +2,11 @@
* @module botbuilder
*/
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
import { Middleware } from './middleware';
import { Activity, ConversationResourceResponse } from './activity';
import { Activity, ConversationResourceResponse } from 'botbuilder-schema';
import { StoreItem, StoreItems } from './storage';
@ -25,16 +25,16 @@ export interface BotStateManagerSettings {
lastWriterWins: boolean;
}
/**
/**
* Middleware for tracking conversation and user state using the `context.storage` provider.
*
*
* __Extends BotContext:__
* * context.state.user - User persisted state
* * context.state.conversation - Conversation persisted data
*
*
* __Depends on:__
* * context.storage - Storage provider for storing and retrieving objects
*
*
* **Usage Example**
*
* ```js
@ -52,10 +52,10 @@ export class BotStateManager implements Middleware {
/**
* Creates a new instance of the state manager.
*
* @param settings (Optional) settings to adjust the behavior of the state manager.
* @param settings (Optional) settings to adjust the behavior of the state manager.
*/
public constructor(settings?: Partial<BotStateManagerSettings>) {
this.settings = Object.assign(<BotStateManagerSettings>{
this.settings = Object.assign(<BotStateManagerSettings>{
persistUserState: true,
persistConversationState: true,
writeBeforePost: true,
@ -70,7 +70,7 @@ export class BotStateManager implements Middleware {
public postActivity(context: BotContext, activities: Partial<Activity>[], next: (newActivities?: Partial<Activity>[]) => Promise<ConversationResourceResponse[]>): Promise<ConversationResourceResponse[]> {
if (this.settings.writeBeforePost) {
// save state
// save state
return this.write(context, {}).then(() => next());
} else {
return next();
@ -78,7 +78,7 @@ export class BotStateManager implements Middleware {
}
public contextDone(context: BotContext, next: () => Promise<void>): Promise<void> {
// save state
// save state
return this.write(context, {}).then(() => next());
}
@ -124,7 +124,7 @@ export class BotStateManager implements Middleware {
}
// Update eTags
if (this.settings.lastWriterWins) {
if (this.settings.lastWriterWins) {
for (const key in changes) {
changes[key].eTag = '*';
}

Просмотреть файл

@ -6,7 +6,6 @@
* Licensed under the MIT License.
*/
export * from './activity';
export * from './attachmentRecognizer';
export * from './bot';
export * from './botService';
@ -30,9 +29,10 @@ export * from './storageMiddleware';
export * from './templateManager';
export * from './dictionaryRenderer';
export * from './testAdapter';
export * from 'botbuilder-schema';
import { Bot } from './bot';
import { Activity, ConversationReference, ConversationResourceResponse } from './activity';
import { Activity, ConversationReference, ConversationResourceResponse } from 'botbuilder-schema';
import { Intent } from './intentRecognizer';
import { EntityObject } from './entityObject';
import { StoreItem, Storage } from './storage';
@ -47,7 +47,7 @@ declare global {
bot: Bot;
/** The received activity. */
request: Activity;
request: Partial<Activity>;
/** Queue of responses to send to the user. */
responses: Partial<Activity>[];
@ -56,7 +56,7 @@ declare global {
readonly responded: boolean;
/** The calculated conversation reference for this request. */
conversationReference: ConversationReference;
conversationReference: Partial<ConversationReference>;
/**
* Persisted state related to the request.

Просмотреть файл

@ -2,10 +2,10 @@
* @module botbuilder
*/
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
import * as activity from './activity';
import { Attachment, MediaUrl, CardAction, AnimationCard, CardImage, HeroCard, ReceiptCard, SigninCard, ThumbnailCard, VideoCard, ActionTypes } from "botbuilder-schema";
/**
* A set of utility functions designed to assist with the formatting of the various card types a
@ -38,19 +38,19 @@ export class CardStyler {
/**
* Returns an attachment for an adaptive card. The attachment will contain the card and the
* appropriate `contentType`.
*
*
* Adaptive Cards are a new way for bots to send interactive and immersive card content to
* users. For channels that don't yet support Adaptive Cards natively, the Bot Framework will
* down render the card to an image that's been styled to look good on the target channel. For
* channels that support [hero cards](#herocards) you can continue to include Adaptive Card
* channels that support [hero cards](#herocards) you can continue to include Adaptive Card
* actions and they will be sent as buttons along with the rendered version of the card.
*
* For more information about Adaptive Cards and to download the latest SDK, visit
*
* For more information about Adaptive Cards and to download the latest SDK, visit
* [adaptivecards.io](http://adaptivecards.io/).
*
* @param card The adaptive card to return as an attachment.
*/
static adaptiveCard(card: any): activity.Attachment
static adaptiveCard(card: any): Attachment
{
return { contentType: CardStyler.contentTypes.adaptiveCard, content: card };
}
@ -63,10 +63,10 @@ export class CardStyler {
* @param buttons (Optional) set of buttons to include on the card.
* @param other (Optional) additional properties to include on the card.
*/
static animationCard(title: string,
media: (activity.MediaUrl|string)[],
buttons?: (activity.CardAction|string)[],
other?: Partial<activity.AnimationCard>): activity.Attachment
static animationCard(title: string,
media: (MediaUrl|string)[],
buttons?: (CardAction|string)[],
other?: Partial<AnimationCard>): Attachment
{
return mediaCard(CardStyler.contentTypes.animationCard, title, media, buttons, other);
}
@ -79,31 +79,31 @@ export class CardStyler {
* @param buttons (Optional) set of buttons to include on the card.
* @param other (Optional) additional properties to include on the card.
*/
static audioCard(title: string,
media: (activity.MediaUrl|string)[],
buttons?: (activity.CardAction|string)[],
other?: Partial<activity.AnimationCard>): activity.Attachment
static audioCard(title: string,
media: (MediaUrl|string)[],
buttons?: (CardAction|string)[],
other?: Partial<AnimationCard>): Attachment
{
return mediaCard(CardStyler.contentTypes.audioCard, title, media, buttons, other);
}
/**
* Returns an attachment for a hero card. Hero cards tend to have one dominant full width image
* and the cards text & buttons can usually be found below the image.
*
* @param title The cards title.
* @param text (Optional) text field for the card.
* @param images (Optional) set of images to include on the card.
* @param images (Optional) set of images to include on the card.
* @param buttons (Optional) set of buttons to include on the card.
* @param other (Optional) additional properties to include on the card.
*/
static heroCard(title: string, images?: (activity.CardImage|string)[], buttons?: (activity.CardAction|string)[], other?: Partial<activity.HeroCard>): activity.Attachment;
static heroCard(title: string, text: string, images?: (activity.CardImage|string)[], buttons?: (activity.CardAction|string)[], other?: Partial<activity.HeroCard>): activity.Attachment;
static heroCard(title: string, text?: any, images?: any, buttons?: any, other?: Partial<activity.HeroCard>): activity.Attachment {
static heroCard(title: string, images?: (CardImage|string)[], buttons?: (CardAction|string)[], other?: Partial<HeroCard>): Attachment;
static heroCard(title: string, text: string, images?: (CardImage|string)[], buttons?: (CardAction|string)[], other?: Partial<HeroCard>): Attachment;
static heroCard(title: string, text?: any, images?: any, buttons?: any, other?: Partial<HeroCard>): Attachment {
const a = CardStyler.thumbnailCard(title, text, images, buttons, other);
a.contentType = CardStyler.contentTypes.heroCard;
return a;
}
}
/**
* Returns an attachment for a receipt card. The attachment will contain the card and the
@ -111,7 +111,7 @@ export class CardStyler {
*
* @param card The adaptive card to return as an attachment.
*/
static receiptCard(card: activity.ReceiptCard): activity.Attachment
static receiptCard(card: ReceiptCard): Attachment
{
return { contentType: CardStyler.contentTypes.receiptCard, content: card };
}
@ -124,40 +124,40 @@ export class CardStyler {
* @param url The link to the signin page the user needs to visit.
* @param text (Optional) additional text to include on the card.
*/
static signinCard(title: string, url: string, text?: string): activity.Attachment {
const card: activity.SigninCard = { buttons: [{ type: 'signin', title: title, value: url }] };
static signinCard(title: string, url: string, text?: string): Attachment {
const card: SigninCard = { buttons: [{ type: ActionTypes.Signin, title: title, value: url }] };
if (text) { card.text = text; }
return { contentType: CardStyler.contentTypes.signinCard, content: card };
return { contentType: CardStyler.contentTypes.signinCard, content: card };
}
/**
* Returns an attachment for a thumbnail card. Thumbnail cards are similar to [hero cards](#herocard)
* but instead of a full width image, they're typically rendered with a smaller thumbnail version of
* the image on either side and the text will be rendered in column next to the image. Any buttons
* the image on either side and the text will be rendered in column next to the image. Any buttons
* will typically show up under the card.
*
* @param title The cards title.
* @param text (Optional) text field for the card.
* @param images (Optional) set of images to include on the card.
* @param images (Optional) set of images to include on the card.
* @param buttons (Optional) set of buttons to include on the card.
* @param other (Optional) additional properties to include on the card.
*/
static thumbnailCard(title: string, images?: (activity.CardImage|string)[], buttons?: (activity.CardAction|string)[], other?: Partial<activity.ThumbnailCard>): activity.Attachment;
static thumbnailCard(title: string, text: string, images?: (activity.CardImage|string)[], buttons?: (activity.CardAction|string)[], other?: Partial<activity.ThumbnailCard>): activity.Attachment;
static thumbnailCard(title: string, text?: any, images?: any, buttons?: any, other?: Partial<activity.ThumbnailCard>): activity.Attachment {
static thumbnailCard(title: string, images?: (CardImage|string)[], buttons?: (CardAction|string)[], other?: Partial<ThumbnailCard>): Attachment;
static thumbnailCard(title: string, text: string, images?: (CardImage|string)[], buttons?: (CardAction|string)[], other?: Partial<ThumbnailCard>): Attachment;
static thumbnailCard(title: string, text?: any, images?: any, buttons?: any, other?: Partial<ThumbnailCard>): Attachment {
if (typeof text !== 'string') {
other = buttons;
buttons = images;
images = text;
text = undefined;
}
const card: activity.ThumbnailCard = Object.assign({}, other);
const card: Partial<ThumbnailCard> = Object.assign({}, other);
if (title) { card.title = title; }
if (text) { card.text = text; }
if (images) { card.images = CardStyler.images(images); }
if (buttons) { card.buttons = CardStyler.actions(buttons); }
return { contentType: CardStyler.contentTypes.thumbnailCard, content: card };
}
}
/**
* Returns an attachment for a video card.
@ -167,27 +167,27 @@ export class CardStyler {
* @param buttons (Optional) set of buttons to include on the card.
* @param other (Optional) additional properties to include on the card.
*/
static videoCard(title: string,
media: (activity.MediaUrl|string)[],
buttons?: (activity.CardAction|string)[],
other?: Partial<activity.AnimationCard>): activity.Attachment
static videoCard(title: string,
media: (MediaUrl|string)[],
buttons?: (CardAction|string)[],
other?: Partial<AnimationCard>): Attachment
{
return mediaCard(CardStyler.contentTypes.videoCard, title, media, buttons, other);
}
/**
* Returns a properly formatted array of actions. Supports converting strings to `messageBack`
* Returns a properly formatted array of actions. Supports converting strings to `messageBack`
* actions (note: using 'imBack' for now as 'messageBack' doesn't work properly in emulator.)
*
* @param actions Array of card actions or strings. Strings will be converted to `messageBack` actions.
*/
static actions(actions: (activity.CardAction|string)[]|undefined): activity.CardAction[] {
const list: activity.CardAction[] = [];
static actions(actions: (CardAction|string)[]|undefined): CardAction[] {
const list: CardAction[] = [];
(actions || []).forEach((a) => {
if (typeof a === 'object') {
list.push(a);
} else {
list.push({ type: 'imBack', value: a.toString(), title: a.toString() });
list.push({ type: ActionTypes.ImBack, value: a.toString(), title: a.toString() });
}
});
return list;
@ -198,8 +198,8 @@ export class CardStyler {
*
* @param images Array of card images or strings. Strings will be converted to card images.
*/
static images(images: (activity.CardImage|string)[]|undefined): activity.CardImage[] {
const list: activity.CardImage[] = [];
static images(images: (CardImage|string)[]|undefined): CardImage[] {
const list: CardImage[] = [];
(images || []).forEach((img) => {
if (typeof img === 'object') {
list.push(img);
@ -215,8 +215,8 @@ export class CardStyler {
*
* @param links Array of media url objects or strings. Strings will be converted to a media url object.
*/
static media(links: (activity.MediaUrl|string)[]|undefined): activity.MediaUrl[] {
const list: activity.MediaUrl[] = [];
static media(links: (MediaUrl|string)[]|undefined): MediaUrl[] {
const list: MediaUrl[] = [];
(links || []).forEach((lnk) => {
if (typeof lnk === 'object') {
list.push(lnk);
@ -228,13 +228,13 @@ export class CardStyler {
}
}
function mediaCard(contentType: string,
title: string,
media: (activity.MediaUrl|string)[],
buttons?: (activity.CardAction|string)[],
other?: any): activity.Attachment
function mediaCard(contentType: string,
title: string,
media: (MediaUrl|string)[],
buttons?: (CardAction|string)[],
other?: any): Attachment
{
const card: activity.VideoCard = Object.assign({}, other);
const card: VideoCard = Object.assign({}, other);
if (title) { card.title = title; }
if (media) { card.media = CardStyler.media(media); }
if (buttons) { card.buttons = CardStyler.actions(buttons); }

Просмотреть файл

@ -2,13 +2,13 @@
* @module botbuilder
*/
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
import { TemplateRenderer } from './templateManager';
import { Middleware } from './middleware';
import { BotService } from './botService';
import { Activity } from './activity';
import { Activity } from 'botbuilder-schema';
export declare type SimpleTemplateFunction = (context: BotContext, data: Object) => Partial<Activity> | string | undefined;
@ -30,10 +30,10 @@ export declare type TemplateDictionary = {
* This is a simple template renderer which has a resource map of template functions
* let myTemplates = {
* "en" : {
* "templateId": (context, data) => `your name is ${data.name}`
* "templateId": (context, data) => `your name is ${data.name}`
* }
* }
*
*
* To use, simply add to your pipeline
* bot.use(new DictionaryRenderer(myTemplates))
*/

Просмотреть файл

@ -2,7 +2,7 @@
* @module botbuilder
*/
/** second comment block */
import { Entity } from './activity';
import { Entity } from 'botbuilder-schema';
/**
* A strongly typed entity.

Просмотреть файл

@ -1,632 +0,0 @@
/**
* @module botbuilder
*/
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
/**
* Attachment View name and size
*/
export interface AttachmentView {
/** Content type of the attachment. */
viewId?: string;
/** Name of the attachment. */
size?: number;
}
/**
* Metadata for an attachment.
*/
export interface AttachmentInfo {
/** Name of the attachment. */
name?: string;
/** ContentType of the attachment. */
type?: string;
/** Attachment views. */
views?: AttachmentView[];
}
/**
* Channel account information needed to route an activity.
*/
export interface ChannelAccount {
/** Channel id for the user or bot on this channel (Example: joe@smith.com, or @joesmith or 123456). */
id?: string;
/** Display friendly name. */
name?: string;
}
/**
* Channel account information for a conversation.
*/
export interface ConversationAccount extends ChannelAccount {
/** Is this a reference to a group. */
isGroup?: boolean;
}
/**
* An action on a card.
*
* @member {string} [type]
*
* @member {string} [title]
*
* @member {string} [image]
*
* @member {object} [value]
*
*/
export interface CardAction {
/** Defines the type of action implemented by this button. */
type?: string;
/** Text description which appear on the button. */
title?: string;
/** URL Picture which will appear on the button, next to text label. */
image?: string;
/** Supplementary parameter for action. Content of this property depends on the [type](#type). */
value?: any;
}
/**
* SuggestedActions that can be performed.
*/
export interface SuggestedActions {
/**
* Ids of the recipients that the actions should be shown to. These Ids are relative to the
* channelId and a subset of all recipients of the activity.
*/
to?: string[];
/** Actions that can be shown to the user. */
actions?: CardAction[];
}
/**
* An attachment within an activity.
*
* @member {string} [contentType]
*
* @member {string} [contentUrl]
*
* @member {object} [content]
*
* @member {string} [name]
*
* @member {string} [thumbnailUrl]
*
*/
export interface Attachment {
/** Mimetype/Contenttype for the file. */
contentType?: string;
/** Content Url. */
contentUrl?: string;
/** Embedded content. */
content?: any;
/** (OPTIONAL) The name of the attachment. */
name?: string;
/** (OPTIONAL) Thumbnail associated with attachment. */
thumbnailUrl?: string;
}
/**
* Object of schema.org types.
*/
export interface Entity {
/** Entity Type (typically from schema.org types). */
type?: string;
}
/**
* An object relating to a particular point in a conversation.
*/
export interface ConversationReference {
/** (Optional) ID of the activity to refer to. */
activityId?: string;
/** (Optional) User participating in this conversation. */
user?: ChannelAccount;
/** Bot participating in this conversation. */
bot?: ChannelAccount;
/** Conversation reference. */
conversation?: ConversationAccount;
/** Channel ID. */
channelId?: string;
/** Service endpoint where operations concerning the referenced conversation may be performed. */
serviceUrl?: string;
}
/**
* An Activity is the basic communication type for the Bot Framework 3.0
* protocol.
*/
export interface Activity {
/** The type of the activity. */
type?: string;
/** ID of this activity. */
id?: string;
/** UTC Time when message was sent (set by service). */
timestamp?: string;
/** Local time when message was sent (set by client, Ex: 2016-09-23T13:07:49.4714686-07:00). */
localTimestamp?: string;
/** Service endpoint where operations concerning the activity may be performed. */
serviceUrl?: string;
/** ID of the channel where the activity was sent. */
channelId?: string;
/** Sender address. */
from?: ChannelAccount;
/** Conversation. */
conversation?: ConversationAccount;
/** (Outbound to bot only) Bot's address that received the message. */
recipient?: ChannelAccount;
/** Format of text fields. The default value is `TextFormats.markdown`. */
textFormat?: string;
/** Hint for how to deal with multiple attachments. The default value is `AttachmentLayouts.list` */
attachmentLayout?: string;
/** Array of address added. */
membersAdded?: ChannelAccount[];
/** Array of addresses removed. */
membersRemoved?: ChannelAccount[];
/** Conversations new topic name. */
topicName?: string;
/** True if the previous history of the channel is disclosed. */
historyDisclosed?: boolean;
/** The language code of the Text field. */
locale?: string;
/** Content for the message. */
text?: string;
/** SSML Speak for TTS audio response. */
speak?: string;
/** Indicates whether the bot is accepting, expecting, or ignoring input. */
inputHint?: string;
/** Text to display if the channel cannot render cards. */
summary?: string;
/** SuggestedActions are used to provide keyboard/quickreply like behavior in many clients. */
suggestedActions?: SuggestedActions;
/** Attachments. */
attachments?: Attachment[];
/**
* Collection of Entity objects, each of which contains metadata about this activity.
* Each Entity object is typed. */
entities?: Entity[];
/** Channel-specific payload. */
channelData?: any;
/** ContactAdded/Removed action. */
action?: string;
/** The original ID this message is a response to. */
replyToId?: string;
/** Open-ended value. */
value?: any;
/** Name of the operation to invoke or the name of the event. */
name?: string;
/** Reference to another conversation or activity. */
relatesTo?: ConversationReference;
/** Code indicating why the conversation has ended. */
code?: string;
/** Array of reactions added to an activity. */
reactionsAdded?: MessageReaction[];
/** Array of reactions removed from an activity. */
reactionsRemoved?: MessageReaction[];
}
/** Message reaction object. */
export interface MessageReaction {
/** Message reaction type. */
type: string;
}
/**
* Parameters for creating a new conversation.
*/
export interface ConversationParameters {
/** If true this is a group conversation. */
isGroup?: boolean;
/** The bot address for this conversation. */
bot?: ChannelAccount;
/** Members to add to the conversation. */
members?: ChannelAccount[];
/** (Optional) Topic of the conversation (if supported by the channel). */
topicName?: string;
/**
* (Optional) When creating a new conversation, use this activity as the initial message
* to the conversation.
*/
activity?: Activity;
/** Channel specific payload for creating the conversation. */
channelData?: any;
}
/**
* A response containing a resource.
*/
export interface ConversationResourceResponse {
/** ID of the Activity (if sent). */
activityId?: string;
/** Service endpoint where operations concerning the conversation may be performed. */
serviceUrl?: string;
/** Id of the resource. */
id?: string;
}
/**
* A response containing a resource ID.
*/
export interface ResourceResponse {
/** Id of the resource. */
id?: string;
}
/**
* Attachment data.
*/
export interface AttachmentData {
/** Content type of the attachment. */
type?: string;
/** Name of the attachment. */
name?: string;
/** Original content. */
originalBase64?: Buffer;
/** Thumbnail. */
thumbnailBase64?: Buffer;
}
/**
* An image on a card
*/
export interface CardImage {
/** URL Thumbnail image for major content property. */
url?: string;
/** Image description intended for screen readers. */
alt?: string;
/** Action assigned to specific Attachment.E.g.navigate to specific URL or play/open media content. */
tap?: CardAction;
}
/**
* A Hero card (card with a single, large image).
*/
export interface HeroCard {
/** Title of the card. */
title?: string;
/** Subtitle of the card. */
subtitle?: string;
/** Text for the card. */
text?: string;
/** Array of images for the card. */
images?: CardImage[];
/** Set of actions applicable to the current card. */
buttons?: CardAction[];
/** This action will be activated when user taps on the card itself. */
tap?: CardAction;
}
/**
* A thumbnail card (card with a single, small thumbnail image).
*/
export interface ThumbnailCard {
/** Title of the card. */
title?: string;
/** Subtitle of the card. */
subtitle?: string;
/** Text for the card. */
text?: string;
/** Array of images for the card. */
images?: CardImage[];
/** Set of actions applicable to the current card. */
buttons?: CardAction[];
/** This action will be activated when user taps on the card itself. */
tap?: CardAction;
}
/**
* An item on a receipt card.
*/
export interface ReceiptItem {
/** Title of the Card. */
title?: string;
/** Subtitle appears just below [Title](#title) field, differs from Title in font styling only. */
subtitle?: string;
/** Text field appears just below [Subtitle](#subtitle), differs from Subtitle in font styling only. */
text?: string;
/** Items image. */
image?: CardImage;
/** Amount with currency. */
price?: string;
/** Number of items of given kind. */
quantity?: string;
/** This action will be activated when user taps on the item bubble. */
tap?: CardAction;
}
/**
* Set of key-value pairs. Advantage of this section is that key and value properties will be
* rendered with default style information with some delimiter between them. So there is no
* need for developer to specify style information.
*/
export interface Fact {
/** The key for this Fact. */
key?: string;
/** The value for this Fact. */
value?: string;
}
/**
* A receipt card
*/
export interface ReceiptCard {
/** Title of the card. */
title?: string;
/** Array of Receipt Items. */
items?: ReceiptItem[];
/** Array of Fact Objects (Array of key-value pairs.) */
facts?: Fact[];
/** This action will be activated when user taps on the card. */
tap?: CardAction;
/** Total amount of money paid (or should be paid). */
total?: string;
/** Total amount of TAX paid(or should be paid). */
tax?: string;
/** Total amount of VAT paid(or should be paid). */
vat?: string;
/** Set of actions applicable to the current card. */
buttons?: CardAction[];
}
/**
* A card representing a request to sign in.
*/
export interface SigninCard {
/** Text for signin request. */
text?: string;
/** Text for signin request. */
buttons?: CardAction[];
}
/**
* Object describing a media thumbnail.
*/
export interface ThumbnailUrl {
/** url pointing to an thumbnail to use for media content. */
url?: string;
/** Alt text to display for screen readers on the thumbnail image. */
alt?: string;
}
/**
* MediaUrl data.
*/
export interface MediaUrl {
/** Url for the media. */
url?: string;
/** Optional profile hint to the client to differentiate multiple MediaUrl objects from each other. */
profile?: string;
}
/**
* A audio card.
*/
export interface AudioCard {
/** Aspect ratio of thumbnail/media placeholder, allowed values are "16x9" and "9x16". */
aspect?: string;
/** Title of the card. */
title?: string;
/** Subtitle of the card. */
subtitle?: string;
/** Text of the card. */
text?: string;
/** Thumbnail placeholder. */
image?: ThumbnailUrl;
/** Array of media Url objects. */
media?: MediaUrl[];
/** Set of actions applicable to the current card. */
buttons?: CardAction[];
/** Is it OK for this content to be shareable with others. The default value is true. */
shareable?: boolean;
/** Should the client loop playback at end of content. The default value is true. */
autoloop?: boolean;
/** Should the client automatically start playback of video in this card. The default value is true. */
autostart?: boolean;
}
/**
* An animation card (Ex: gif or short video clip).
*/
export interface AnimationCard {
/** Title of the card. */
title?: string;
/** Subtitle of the card. */
subtitle?: string;
/** Text of the card. */
text?: string;
/** Thumbnail placeholder. */
image?: ThumbnailUrl;
/** Array of media Url objects. */
media?: MediaUrl[];
/** Set of actions applicable to the current card. */
buttons?: CardAction[];
/** Is it OK for this content to be shareable with others. The default value is true. */
shareable?: boolean;
/** Should the client loop playback at end of content. The default value is true. */
autoloop?: boolean;
/** Should the client automatically start playback of video in this card. The default value is true. */
autostart?: boolean;
}
/**
* A video card.
*/
export interface VideoCard {
/** Aspect ratio of thumbnail/media placeholder, allowed values are "16x9" and "9x16". */
aspect?: string;
/** Title of the card. */
title?: string;
/** Subtitle of the card. */
subtitle?: string;
/** Text of the card. */
text?: string;
/** Thumbnail placeholder. */
image?: ThumbnailUrl;
/** Array of media Url objects. */
media?: MediaUrl[];
/** Set of actions applicable to the current card. */
buttons?: CardAction[];
/** Is it OK for this content to be shareable with others. The default value is true. */
shareable?: boolean;
/** Should the client loop playback at end of content. The default value is true. */
autoloop?: boolean;
/** Should the client automatically start playback of video in this card. The default value is true. */
autostart?: boolean;
}
/**
* GeoCoordinates (entity type: "https://schema.org/GeoCoordinates").
*/
export interface GeoCoordinates {
/** Elevation of the location [WGS 84](https://en.wikipedia.org/wiki/World_Geodetic_System). */
elevation?: number;
/** Latitude of the location [WGS 84](https://en.wikipedia.org/wiki/World_Geodetic_System). */
latitude?: number;
/** Longitude of the location [WGS 84](https://en.wikipedia.org/wiki/World_Geodetic_System). */
longitude?: number;
/** The type of the thing. */
type?: string;
/** The name of the thing. */
name?: string;
}
/**
* Place (entity type: "https://schema.org/Place")
*/
export interface Place {
/** Address of the place (may be `string` or complex object of type `PostalAddress`). */
address?: any;
/** Geo coordinates of the place (may be complex object of type `GeoCoordinates` or `GeoShape`). */
geo?: any;
/** Map to the place (may be `string` (URL) or complex object of type `Map`). */
hasMap?: any;
/** The type of the thing. */
type?: string;
/** The name of the thing. */
name?: string;
}
/* istanbul ignore file */

Просмотреть файл

@ -2,13 +2,13 @@
* @module botbuilder
*/
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
import { TemplateRenderer } from './templateManager';
import { Middleware } from './middleware';
import { BotService } from './botService';
import { Activity } from './activity';
import { Activity } from 'botbuilder-schema';
/**
* A template function that can return a stringified value from a given data object.
@ -86,8 +86,8 @@ export class JsonTemplates implements TemplateRenderer, Middleware {
*
* @param name Name of the registered template to render.
* @param data Data object to render template against.
* @param postProcess (Optional) if `true` the rendered output object will be scanned looking
* for any processing directives, such as @prune. The default value is `true`.
* @param postProcess (Optional) if `true` the rendered output object will be scanned looking
* for any processing directives, such as @prune. The default value is `true`.
*/
public renderAsJSON(name: string, data: Object, postProcess?: boolean): any {
var json = this.render(name, data);
@ -103,7 +103,7 @@ export class JsonTemplates implements TemplateRenderer, Middleware {
/**
* Post processes a JSON object by walking the object and evaluating any processing directives
* like @prune.
* @param object Object to post process.
* @param object Object to post process.
*/
public postProcess(object: any): any {
if (!processNode(object, {})) {
@ -118,7 +118,7 @@ export class JsonTemplates implements TemplateRenderer, Middleware {
* a data object.
*
* @param json The JSON template to compile.
* @param templates (Optional) map of template functions (and other compiled templates) that
* @param templates (Optional) map of template functions (and other compiled templates) that
* can be called at render time.
*/
static compile(json: string | any, templates?: TemplateFunctionMap): TemplateFunction {
@ -135,7 +135,7 @@ export class JsonTemplates implements TemplateRenderer, Middleware {
return (data: Object, path?: string) => {
// Check for optional path.
// - Templates can be executed as children of other templates so the path
// specifies the property off the parent to execute the template for.
// specifies the property off the parent to execute the template for.
let obj = '';
if (path) {
const value = getValue(data, path);

Просмотреть файл

@ -2,12 +2,11 @@
* @module botbuilder
*/
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
import * as activity from './activity';
import { CardStyler } from './cardStyler';
import { ActivityTypes, AttachmentLayoutTypes, Activity, CardAction, SuggestedActions, Attachment } from 'botbuilder-schema';
/**
* A set of utility functions to assist with the formatting of the various message types a bot can
@ -44,9 +43,9 @@ export class MessageStyler {
* @param text Text to include in the message.
* @param speak (Optional) SSML to include in the message.
*/
static text(text: string, speak?: string): Partial<activity.Activity> {
const msg: Partial<activity.Activity> = {
type: activity.ActivityTypes.message,
static text(text: string, speak?: string): Partial<Activity> {
const msg: Partial<Activity> = {
type: ActivityTypes.Message,
text: text || ''
};
if (speak) { msg.speak = speak; }
@ -57,13 +56,13 @@ export class MessageStyler {
* Returns a message that includes a set of suggested actions and optional text.
*
* @param actions Array of card actions or strings to include. Strings will be converted to `messageBack` actions.
* @param text (Optional) text of the message.
* @param text (Optional) text of the message.
* @param speak (Optional) SSML to include with the message.
*/
static suggestedActions(actions: (activity.CardAction|string)[], text?: string, speak?: string): Partial<activity.Activity> {
const msg: Partial<activity.Activity> = {
type: activity.ActivityTypes.message,
suggestedActions: <activity.SuggestedActions>{
static suggestedActions(actions: (CardAction|string)[], text?: string, speak?: string): Partial<Activity> {
const msg: Partial<Activity> = {
type: ActivityTypes.Message,
suggestedActions: <SuggestedActions>{
actions: CardStyler.actions(actions)
}
};
@ -76,22 +75,22 @@ export class MessageStyler {
* Returns a single message activity containing an attachment.
*
* @param attachment Adaptive card to include in the message.
* @param text (Optional) text of the message.
* @param text (Optional) text of the message.
* @param speak (Optional) SSML to include with the message.
*/
static attachment(attachment: activity.Attachment, text?: string, speak?: string): Partial<activity.Activity> {
return attachmentActivity(activity.AttachmentLayouts.list, [attachment], text, speak);
}
static attachment(attachment: Attachment, text?: string, speak?: string): Partial<Activity> {
return attachmentActivity(AttachmentLayoutTypes.List, [attachment], text, speak);
}
/**
* Returns a message that will display a set of attachments in list form.
*
* @param attachments Array of attachments to include in the message.
* @param text (Optional) text of the message.
* @param text (Optional) text of the message.
* @param speak (Optional) SSML to include with the message.
*/
static list(attachments: activity.Attachment[], text?: string, speak?: string): Partial<activity.Activity> {
return attachmentActivity(activity.AttachmentLayouts.list, attachments, text, speak);
static list(attachments: Attachment[], text?: string, speak?: string): Partial<Activity> {
return attachmentActivity(AttachmentLayoutTypes.List, attachments, text, speak);
}
/**
@ -111,11 +110,11 @@ export class MessageStyler {
* ```
*
* @param attachments Array of attachments to include in the message.
* @param text (Optional) text of the message.
* @param text (Optional) text of the message.
* @param speak (Optional) SSML to include with the message.
*/
static carousel(attachments: activity.Attachment[], text?: string, speak?: string): Partial<activity.Activity> {
return attachmentActivity(activity.AttachmentLayouts.carousel, attachments, text, speak);
static carousel(attachments: Attachment[], text?: string, speak?: string): Partial<Activity> {
return attachmentActivity(AttachmentLayoutTypes.Carousel, attachments, text, speak);
}
/**
@ -133,20 +132,20 @@ export class MessageStyler {
* @param url Url of the image/video to send.
* @param contentType The MIME type of the image/video.
* @param name (Optional) Name of the image/video file.
* @param text (Optional) text of the message.
* @param text (Optional) text of the message.
* @param speak (Optional) SSML to include with the message.
*/
static contentUrl(url: string, contentType: string, name?: string, text?: string, speak?: string): Partial<activity.Activity> {
const a: activity.Attachment = { contentType: contentType, contentUrl: url };
static contentUrl(url: string, contentType: string, name?: string, text?: string, speak?: string): Partial<Activity> {
const a: Attachment = { contentType: contentType, contentUrl: url };
if (name) { a.name = name; }
return attachmentActivity(activity.AttachmentLayouts.list, [a], text, speak);
return attachmentActivity(AttachmentLayoutTypes.List, [a], text, speak);
}
}
function attachmentActivity(attachmentLayout: string, attachments: activity.Attachment[], text?: string, speak?: string): Partial<activity.Activity> {
const msg: Partial<activity.Activity> = {
type: activity.ActivityTypes.message,
function attachmentActivity(attachmentLayout: AttachmentLayoutTypes, attachments: Attachment[], text?: string, speak?: string): Partial<Activity> {
const msg: Partial<Activity> = {
type: ActivityTypes.Message,
attachmentLayout: attachmentLayout,
attachments: attachments
};

Просмотреть файл

@ -2,13 +2,13 @@
* @module botbuilder
*/
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
import { Activity, ConversationResourceResponse } from './activity';
import { Activity, ConversationResourceResponse } from 'botbuilder-schema';
/**
* Type signature for a return value that can (Optionally) return its value
* Type signature for a return value that can (Optionally) return its value
* asynchronously using a Promise.
* @param T (Optional) type of value being returned. This defaults to `void`.
*/
@ -22,20 +22,20 @@ export function isPromised <T>(result: Promiseable<T>): result is Promise<T> {
return result && (result as Promise<T>).then !== undefined;
}
/**
/**
* Implemented by middleware plugins. Plugins have four separate methods they can implement to tap
* into the life cycle of a request. When an activity is received from a user, middleware plugins
* into the life cycle of a request. When an activity is received from a user, middleware plugins
* will have their methods invoked in the following sequence:
*
* >> [contextCreated()](#contextcreated) -> [receiveActivity()](#receiveactivity) -> (bots logic)
*
* >> [contextCreated()](#contextcreated) -> [receiveActivity()](#receiveactivity) -> (bots logic)
* -> [postActivity()](#postactivity) -> [contextDone()](#contextdone)
*
*
*
*
*
*
*/
export interface Middleware {
/**
* (Optional) called when a new context object has been created. Plugins can extend the
/**
* (Optional) called when a new context object has been created. Plugins can extend the
* context object in this call.
*
* @param context Context for the current turn of the conversation.
@ -44,8 +44,8 @@ export interface Middleware {
contextCreated?(context: BotContext, next: () => Promise<void>): Promise<void>;
/**
* (Optional) called after [contextCreated](#contextCreated) to route a received activity.
* Plugins can return `{ handled: true }` to indicate that they have successfully routed
* (Optional) called after [contextCreated](#contextCreated) to route a received activity.
* Plugins can return `{ handled: true }` to indicate that they have successfully routed
* the activity. This will prevent further calls to `receiveActivity()`.
*
* @param context Context for the current turn of the conversation.

Просмотреть файл

@ -2,10 +2,10 @@
* @module botbuilder
*/
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
import { Activity, ConversationResourceResponse } from './activity';
import { Activity, ConversationResourceResponse } from 'botbuilder-schema';
import { Middleware } from './middleware';
/**
@ -22,7 +22,7 @@ export class MiddlewareSet implements Middleware {
public get middleware(): Middleware[] {
return this._middleware;
}
/**
* Registers middleware plugin(s) with the bot or set.
*

Просмотреть файл

@ -15,32 +15,32 @@ export interface RegExpLocaleMap {
/** Optional settings for a `RegExpRecognizer`. */
export interface RegExpRecognizerSettings {
/**
* Minimum score, on a scale from 0.0 to 1.0, that should be returned for a matched
* expression. This defaults to a value of 0.0.
* Minimum score, on a scale from 0.0 to 1.0, that should be returned for a matched
* expression. This defaults to a value of 0.0.
*/
minScore: number;
}
/**
* An intent recognizer for detecting the users intent using a series of regular expressions.
*
* One of the primary advantages of using a RegExpRecognizer is that you can easily switch between
* An intent recognizer for detecting the users intent using a series of regular expressions.
*
* One of the primary advantages of using a RegExpRecognizer is that you can easily switch between
* the use of regular expressions and a LUIS model. This could be useful for running unit tests
* locally without having to make a cloud request.
*
*
* The other advantage for non-LUIS bots is that it potentially lets your bot support multiple
* languages by providing a unique set of expressions for each language.
*
* **Usage Example**
*
* ```js
* import { RegExpRecognizer } from 'botbuilder-core';
* import { RegExpRecognizer } from 'botbuilder';
*
* // Define RegExp's for well known commands.
* const recognizer = new RegExpRecognizer()
* .addIntent('HelpIntent', /^help/i)
* .addIntent('CancelIntent', /^cancel/i);
*
*
* // init bot and bind to adapter
* const bot = new Bot(adapter);
* // bind recognizer to bot
@ -77,8 +77,8 @@ export class RegExpRecognizer extends IntentRecognizer {
if (this.settings.minScore < 0 || this.settings.minScore > 1.0) {
throw new Error(`RegExpRecognizer: a minScore of '${this.settings.minScore}' is out of range.`);
}
this.onRecognize((context) => {
this.onRecognize((context) => {
const intents: Intent[] = [];
const utterance = (context.request.text || '').trim();
const minScore = this.settings.minScore;
@ -164,24 +164,24 @@ export class RegExpRecognizer extends IntentRecognizer {
/**
* Matches a text string using the given expression. If matched, an `Intent` will be returned
* containing a coverage score, from 0.0 to 1.0, indicating how much of the text matched
* the expression. The more of the text the matched the greater the score. The name of
* containing a coverage score, from 0.0 to 1.0, indicating how much of the text matched
* the expression. The more of the text the matched the greater the score. The name of
* the intent will be the value of `expression.toString()` and any capture groups will be
* returned as individual entities of type `string`.
*
* @param text The text string to match against.
* @param expression The expression to match.
* @param entityTypes (Optional) array of types to assign to each entity returned for a numbered
* @param entityTypes (Optional) array of types to assign to each entity returned for a numbered
* capture group. As an example, for the expression `/flight from (.*) to (.*)/i` you could
* pass a value of `['fromCity', 'toCity']`. The entity returned for the first capture group will
* have a type of `fromCity` and the entity for the second capture group will have a type of
* have a type of `fromCity` and the entity for the second capture group will have a type of
* `toCity`. The default entity type returned when not specified is `string`.
* @param minScore (Optional) minimum score to return for the coverage score. The default value
* is 0.0 but if provided, the calculated coverage score will be scaled to a value between the
* minScore and 1.0. For example, a expression that matches 50% of the text will result in a
* base coverage score of 0.5. If the minScore supplied is also 0.5 the returned score will be
* scaled to be 0.75 or 50% between 0.5 and 1.0. As another example, providing a minScore of 1.0
* will always result in a match returning a score of 1.0.
* base coverage score of 0.5. If the minScore supplied is also 0.5 the returned score will be
* scaled to be 0.75 or 50% between 0.5 and 1.0. As another example, providing a minScore of 1.0
* will always result in a match returning a score of 1.0.
*/
static recognize(text: string, expression: RegExp, entityTypes: string[] = [], minScore = 0.0): Intent|undefined {
if (typeof minScore !== 'number' || minScore < 0 || minScore > 1.0) {
@ -193,7 +193,7 @@ export class RegExpRecognizer extends IntentRecognizer {
// Calculate coverage
const coverage = matched[0].length / text.length;
const score = minScore + ((1.0 - minScore) * coverage);
// Populate entities
const entities: EntityObject<string>[] = [];
if (matched.length > 1) {

Просмотреть файл

@ -2,20 +2,19 @@
* @module botbuilder
*/
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
import { Middleware, Promiseable } from './middleware';
import { Activity, ConversationReference, ActivityTypes, ConversationResourceResponse, applyConversationReference } from './activity';
import { Activity, ConversationReference, ActivityTypes, ConversationResourceResponse } from 'botbuilder-schema';
/** Interface for a template renderer which provides the ability
/** Interface for a template renderer which provides the ability
* to create a text reply or activity reply from the language, templateid and data object
**/
export interface TemplateRenderer {
/**
* renders a template for the language/templateId
*
/**
* renders a template for the language/templateId
*
* @param language id (such as 'en')
* @param templateId id of the template to apply
* @param data Data object to bind to
@ -36,7 +35,7 @@ export class TemplateManager implements Middleware {
// Ensure activities are well formed.
for (let i = 0; i < activities.length; i++) {
let activity = activities[i];
if (activity.type == "template") {
if (activity.type == <ActivityTypes>"template") {
await this.bindActivityTemplate(context, activity);
}
}
@ -45,7 +44,7 @@ export class TemplateManager implements Middleware {
/**
* register template renderer
* @param renderer
* @param renderer
*/
public register(renderer: TemplateRenderer): TemplateManager {
this.templateRenderers.push(renderer);
@ -60,7 +59,7 @@ export class TemplateManager implements Middleware {
}
/**
* SetLanguagePolicy allows you to set the fallback strategy
* SetLanguagePolicy allows you to set the fallback strategy
* @param fallback array of languages to try when binding templates
*/
public setLanguagePolicy(fallback:string[]) :void {
@ -80,12 +79,12 @@ export class TemplateManager implements Middleware {
if (templateOutput) {
if (typeof templateOutput === 'object') {
if (!(templateOutput as Activity).type) {
templateOutput.type = ActivityTypes.message;
templateOutput.type = ActivityTypes.Message;
}
return <Partial<Activity>>templateOutput;
} else {
const activity: Partial<Activity> = {
type: ActivityTypes.message,
type: ActivityTypes.Message,
text: templateOutput || '',
};
return activity;
@ -101,10 +100,10 @@ export class TemplateManager implements Middleware {
if (!!context.request.locale)
fallbackLocales.push(context.request.locale);
fallbackLocales.push('default');
// Ensure activities are well formed.
// bind any template activity
if (activity.type == "template") {
if (activity.type == <ActivityTypes>"template") {
// try each locale until successful
for (let locale of fallbackLocales) {
// apply template

Просмотреть файл

@ -2,11 +2,11 @@
* @module botbuilder
*/
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
import { ActivityAdapter } from './activityAdapter';
import { Activity, ActivityTypes, ConversationReference } from './activity';
import { ActivityTypes, Activity, ConversationReference, ChannelAccount } from 'botbuilder-schema';
import { Promiseable } from './middleware';
import assert = require('assert');
@ -33,14 +33,14 @@ export class TestAdapter implements ActivityAdapter {
private nextId = 0;
public reference: ConversationReference;
public botReplies: Activity[] = [];
public botReplies: Partial<Activity>[] = [];
/** INTERNAL implementation of `Adapter.onReceive`. */
public onReceive: (activity: Activity) => Promise<void>;
/**
* Creates a new instance of the test adapter.
* @param reference (Optional) conversation reference that lets you customize the address
* @param reference (Optional) conversation reference that lets you customize the address
* information for messages sent during a test.
*/
constructor(reference?: ConversationReference) {
@ -63,11 +63,11 @@ export class TestAdapter implements ActivityAdapter {
/* INTERNAL */
public _sendActivityToBot(userSays: string | Partial<Activity>): Promise<void> {
// ready for next reply
let activity = <Activity>(typeof userSays === 'string' ? { type:ActivityTypes.message, text: userSays } : userSays);
if (!activity.type)
let activity = <Activity>(typeof userSays === 'string' ? { type:ActivityTypes.Message, text: userSays } : userSays);
if (!activity.type)
throw new Error("Missing activity.type");
activity.channelId = this.reference.channelId;
activity.from = this.reference.user;
activity.from = <ChannelAccount>this.reference.user;
activity.recipient = this.reference.bot;
activity.conversation = this.reference.conversation;
activity.serviceUrl = this.reference.serviceUrl;
@ -99,7 +99,7 @@ export class TestAdapter implements ActivityAdapter {
* @param description description of test case
* @param timeout (default 3000ms) time to wait for response from bot
*/
public test(userSays: string | Partial<Activity>, expected: string | Partial<Activity> | ((activity: Activity, description?: string) => void), description?: string, timeout?: number): TestFlow {
public test(userSays: string | Partial<Activity>, expected: string | Partial<Activity> | ((activity: Partial<Activity>, description?: string) => void), description?: string, timeout?: number): TestFlow {
return this.send(userSays)
.assertReply(expected, description);
}
@ -110,7 +110,7 @@ export class TestAdapter implements ActivityAdapter {
* @param description description of test case
* @param timeout (default 3000ms) time to wait for response from bot
*/
public assertReply(expected: string | Partial<Activity> | ((activity: Activity, description?: string) => void), description?: string, timeout?: number): TestFlow {
public assertReply(expected: string | Partial<Activity> | ((activity: Partial<Activity>, description?: string) => void), description?: string, timeout?: number): TestFlow {
return new TestFlow(Promise.resolve(), this).assertReply(expected, description, timeout);
}
@ -140,7 +140,7 @@ export class TestFlow {
* @param description description of test case
* @param timeout (default 3000ms) time to wait for response from bot
*/
public test(userSays: string | Partial<Activity>, expected: string | Partial<Activity> | ((activity: Activity, description?: string) => void), description?: string, timeout?: number): TestFlow {
public test(userSays: string | Partial<Activity>, expected: string | Partial<Activity> | ((activity: Partial<Activity>, description?: string) => void), description?: string, timeout?: number): TestFlow {
if (!expected)
throw new Error(".test() Missing expected parameter");
return this.send(userSays)
@ -157,11 +157,11 @@ export class TestFlow {
/**
* Throws if the bot's response doesn't match the expected text/activity
* @param expected expected text or activity from the bot, or callback to inspect object
* @param expected expected text or activity from the bot, or callback to inspect object
* @param description description of test case
* @param timeout (default 3000ms) time to wait for response from bot
*/
public assertReply(expected: string | Partial<Activity> | ((activity: Activity, description?: string) => void), description?: string, timeout?: number): TestFlow {
public assertReply(expected: string | Partial<Activity> | ((activity: Partial<Activity>, description?: string) => void), description?: string, timeout?: number): TestFlow {
if (!expected)
throw new Error(".assertReply() Missing expected parameter");
@ -174,7 +174,7 @@ export class TestFlow {
let myInterval = setInterval(() => {
let current = new Date().getTime();
if ((current - start) > <number>timeout) {
let expectedActivity = <Activity>(typeof expected === 'string' ? { type: ActivityTypes.message, text: expected } : expected);
let expectedActivity = <Activity>(typeof expected === 'string' ? { type: ActivityTypes.Message, text: expected } : expected);
throw new Error(`${timeout}ms Timed out waiting for:${description || expectedActivity.text}`);
}
@ -186,7 +186,7 @@ export class TestFlow {
if (typeof expected === 'function') {
expected(botReply, description);
} else if (typeof expected === 'string') {
assert.equal(botReply.type, ActivityTypes.message, (description || '') + ` type === '${botReply.type}'. `);
assert.equal(botReply.type, ActivityTypes.Message, (description || '') + ` type === '${botReply.type}'. `);
assert.equal(botReply.text, expected, (description || '') + ` text === "${botReply.text}"`);
} else {
this.validateActivity(botReply, expected);

Просмотреть файл

@ -236,13 +236,13 @@ describe('context', function () {
});
testAdapter.test('hi', (a) => {
assert(a.type === 'endOfConversation');
assert(a.code === builder.EndOfConversationCodes.completedSuccessfully)
assert(a.code === builder.EndOfConversationCodes.CompletedSuccessfully)
})
.then(() => done());
});
it('should send endOfConversation() with a custom code', function (done) {
const code = builder.EndOfConversationCodes.botTimedOut;
const code = builder.EndOfConversationCodes.BotTimedOut;
const testAdapter = new builder.TestAdapter();
const bot = new builder.Bot(testAdapter)
.onReceive((context) => {
@ -306,7 +306,7 @@ describe('context', function () {
postActivity: (context, activities, next) => {
batch = 1;
return next();
}
}
})
.onReceive((context) => {
return context.flushResponses().then((r) => {

Просмотреть файл

@ -1,4 +0,0 @@
/**/node_modules
/**/.vscode
coverage
.nyc_output

Просмотреть файл

@ -1,4 +0,0 @@
/**/node_modules
/**/.vscode
coverage
.nyc_output

Просмотреть файл

@ -1,19 +0,0 @@
{
"extension": [
".js"
],
"include": [
"lib/**/*.js"
],
"exclude": [
"**/node_modules/**",
"**/tests/**",
"**/coverage/**",
"**/*.d.ts"
],
"reporter": [
"html"
],
"all": true,
"cache": true
}

Просмотреть файл

@ -1,5 +0,0 @@
@ECHO OFF
ECHO [COMPILING DOCS]
md ..\..\..\docs
md ..\..\..\docs\connector-auth
typedoc --theme markdown --entryPoint botframework-connector-auth --excludePrivate --includeDeclarations --ignoreCompilerErrors --module amd --out ..\..\..\docs\connector-auth ..\lib\index.d.ts --hideGenerator --name "Bot Framework Connector Auth" --readme none

Просмотреть файл

@ -1,3 +0,0 @@
#!/bin/bash
typedoc --entryPoint botbuilder-ai --excludePrivate --includeDeclarations --ignoreCompilerErrors --module amd --out doc ../lib/index.d.ts --hideGenerator --name "Bot Builder SDK - AI" --readme none

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Просмотреть файл

@ -1 +0,0 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;AAAA;;;GAGG;AACH,+CAA0C;AAC1C,wCAAmC;AACnC,gCAA2B"}

Просмотреть файл

@ -1 +0,0 @@
{"version":3,"file":"microsoftAppCredentials.js","sourceRoot":"","sources":["../src/microsoftAppCredentials.ts"],"names":[],"mappings":";;AAAA;;;GAGG;AACH,kCAAkC;AAClC,mCAAmC;AACnC,yCAA0D;AAE1D;IAUI,YAAmB,WAA2B;QARtC,gBAAW,GAAW,EAAE,CAAC;QAEzB,UAAK,GAAW,EAAE,CAAC;QACnB,gBAAW,GAAW,EAAE,CAAC;QAM7B,EAAE,CAAC,CAAC,OAAO,WAAW,KAAK,WAAW,CAAC,CAAC,CAAC;YACrC,EAAE,CAAC,CAAC,OAAO,WAAW,CAAC,KAAK,KAAK,WAAW,CAAC,CAAC,CAAC;gBAC3C,IAAI,CAAC,KAAK,GAAG,WAAW,CAAC,KAAK,CAAC;YACnC,CAAC;YAED,EAAE,CAAC,CAAC,OAAO,WAAW,CAAC,WAAW,KAAK,WAAW,CAAC,CAAC,CAAC;gBACjD,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC,WAAW,CAAC;YAC/C,CAAC;QACL,CAAC;IACL,CAAC;IAEM,WAAW,CAAC,WAA+B,EAAE,EAA0B;QAC1E,EAAE,CAAC,CAAC,IAAI,CAAC,KAAK,KAAK,EAAE,IAAI,IAAI,CAAC,WAAW,KAAK,EAAE,CAAC,CAAC,CAAC;YAC/C,IAAI,CAAC,cAAc,CAAC,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE;gBAC/B,EAAE,CAAC,CAAC,CAAC,GAAG,IAAI,KAAK,CAAC,CAAC,CAAC;oBAChB,IAAI,gBAAgB,GAAG,IAAI,MAAM,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC;oBAC1D,gBAAgB,CAAC,WAAW,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;gBAClD,CAAC;gBAAC,IAAI,CAAC,CAAC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,GAAG,CAAC,YAAY,EAAwB,CAAC;YACpG,CAAC;QACL,CAAC;QAED,MAAM,CAAC,IAAI,CAAC;IAChB,CAAC;CACJ;AA5FD,wCA4FC"}

Просмотреть файл

@ -1 +0,0 @@
{"version":3,"file":"settings.js","sourceRoot":"","sources":["../src/settings.ts"],"names":[],"mappings":";;AA4Ba,QAAA,YAAY,GAAG;IACxB,eAAe,EAAE,sEAAsE;IACvF,YAAY,EAAE,uCAAuC;IACrD,0BAA0B,EAAE,mEAAmE;IAC/F,kBAAkB,EAAE,8BAA8B;IAClD,sBAAsB,EAAE,0FAA0F;IAClH,uBAAuB,EAAE,+DAA+D;IACxF,uBAAuB,EAAE,6EAA6E;IACtG,uBAAuB,EAAE,+DAA+D;IACxF,uBAAuB,EAAE,6EAA6E;CACzG,CAAC"}

797
libraries/botframework-connector-auth/package-lock.json сгенерированный
Просмотреть файл

@ -1,797 +0,0 @@
{
"name": "botframework-connector-auth",
"version": "4.0.0-h4.1",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"@types/form-data": {
"version": "2.2.1",
"resolved": "http://bbnpm.azurewebsites.net/@types%2fform-data/-/form-data-2.2.1.tgz",
"integrity": "sha512-JAMFhOaHIciYVh8fb5/83nmuO/AHwmto+Hq7a9y8FzLDcC1KCU344XDOMEmahnrTFlHjgh4L0WJFczNIX2GxnQ==",
"requires": {
"@types/node": "^9.3.0"
}
},
"@types/jsonwebtoken": {
"version": "7.2.5",
"resolved": "http://bbnpm.azurewebsites.net/@types%2fjsonwebtoken/-/jsonwebtoken-7.2.5.tgz",
"integrity": "sha512-8CIcK1Vzq4w5TJyJYkLVhqASmCo1FSO1XIPQM1qv+Xo2nnb9RoRHxx8pkIzSZ4Tm9r3V4ZyFbF/fBewNPdclwA==",
"requires": {
"@types/node": "^9.3.0"
}
},
"@types/node": {
"version": "^9.3.0",
"resolved": "http://bbnpm.azurewebsites.net/@types%2fnode/-/node-8.5.9.tgz",
"integrity": "sha512-s+c3AjymyAccTI4hcgNFK4mToH8l+hyPDhu4LIkn71lRy56FLijGu00fyLgldjM/846Pmk9N4KFUs2P8GDs0pA=="
},
"@types/request": {
"version": "2.0.12",
"resolved": "http://bbnpm.azurewebsites.net/@types%2frequest/-/request-2.0.12.tgz",
"integrity": "sha512-VPNlIpxg4Hvm5ayuJ3cx+LIVq5VtsEs+RH8ZVHZAzu/N+7Jw2u+9oLMCY1Hz0qM9p4heIL0dXJpeB5XUPQIQyw==",
"requires": {
"@types/form-data": "2.2.1",
"@types/node": "^9.3.0",
"@types/tough-cookie": "2.3.2"
}
},
"@types/tough-cookie": {
"version": "2.3.2",
"resolved": "http://bbnpm.azurewebsites.net/@types%2ftough-cookie/-/tough-cookie-2.3.2.tgz",
"integrity": "sha512-vOVmaruQG5EatOU/jM6yU2uCp3Lz6mK1P5Ztu4iJjfM4SVHU9XYktPUQtKlIXuahqXHdEyUarMrBEwg5Cwu+bA=="
},
"@types/uuid": {
"version": "3.4.3",
"resolved": "http://bbnpm.azurewebsites.net/@types%2fuuid/-/uuid-3.4.3.tgz",
"integrity": "sha512-5fRLCYhLtDb3hMWqQyH10qtF+Ud2JnNCXTCZ+9ktNdCcgslcuXkDTkFcJNk++MT29yDntDnlF1+jD+uVGumsbw==",
"requires": {
"@types/node": "^9.3.0"
}
},
"ajv": {
"version": "5.5.2",
"resolved": "http://bbnpm.azurewebsites.net/ajv/-/ajv-5.5.2.tgz",
"integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=",
"requires": {
"co": "4.6.0",
"fast-deep-equal": "1.0.0",
"fast-json-stable-stringify": "2.0.0",
"json-schema-traverse": "0.3.1"
}
},
"asn1": {
"version": "0.2.3",
"resolved": "http://bbnpm.azurewebsites.net/asn1/-/asn1-0.2.3.tgz",
"integrity": "sha1-2sh4dxPJlmhJ/IGAd36+nB3fO4Y="
},
"assert-plus": {
"version": "1.0.0",
"resolved": "http://bbnpm.azurewebsites.net/assert-plus/-/assert-plus-1.0.0.tgz",
"integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU="
},
"asynckit": {
"version": "0.4.0",
"resolved": "http://bbnpm.azurewebsites.net/asynckit/-/asynckit-0.4.0.tgz",
"integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k="
},
"aws-sign2": {
"version": "0.7.0",
"resolved": "http://bbnpm.azurewebsites.net/aws-sign2/-/aws-sign2-0.7.0.tgz",
"integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg="
},
"aws4": {
"version": "1.6.0",
"resolved": "http://bbnpm.azurewebsites.net/aws4/-/aws4-1.6.0.tgz",
"integrity": "sha1-g+9cqGCysy5KDe7e6MdxudtXRx4="
},
"balanced-match": {
"version": "1.0.0",
"resolved": "http://bbnpm.azurewebsites.net/balanced-match/-/balanced-match-1.0.0.tgz",
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=",
"dev": true
},
"base64url": {
"version": "2.0.0",
"resolved": "http://bbnpm.azurewebsites.net/base64url/-/base64url-2.0.0.tgz",
"integrity": "sha1-6sFuA+oUOO/5Qj1puqNiYu0fcLs="
},
"bcrypt-pbkdf": {
"version": "1.0.1",
"resolved": "http://bbnpm.azurewebsites.net/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz",
"integrity": "sha1-Y7xdy2EzG5K8Bf1SiVPDNGKgb40=",
"optional": true,
"requires": {
"tweetnacl": "0.14.5"
}
},
"boom": {
"version": "4.3.1",
"resolved": "http://bbnpm.azurewebsites.net/boom/-/boom-4.3.1.tgz",
"integrity": "sha1-T4owBctKfjiJ90kDD9JbluAdLjE=",
"requires": {
"hoek": "4.2.0"
},
"dependencies": {
"hoek": {
"version": "4.2.0",
"resolved": "http://bbnpm.azurewebsites.net/hoek/-/hoek-4.2.0.tgz",
"integrity": "sha512-v0XCLxICi9nPfYrS9RL8HbYnXi9obYAeLbSP00BmnZwCK9+Ih9WOjoZ8YoHCoav2csqn4FOz4Orldsy2dmDwmQ=="
}
}
},
"brace-expansion": {
"version": "1.1.8",
"resolved": "http://bbnpm.azurewebsites.net/brace-expansion/-/brace-expansion-1.1.8.tgz",
"integrity": "sha1-wHshHHyVLsH479Uad+8NHTmQopI=",
"dev": true,
"requires": {
"balanced-match": "1.0.0",
"concat-map": "0.0.1"
}
},
"browser-stdout": {
"version": "1.3.0",
"resolved": "http://bbnpm.azurewebsites.net/browser-stdout/-/browser-stdout-1.3.0.tgz",
"integrity": "sha1-81HTKWnTL6XXpVZxVCY9korjvR8=",
"dev": true
},
"buffer-equal-constant-time": {
"version": "1.0.1",
"resolved": "http://bbnpm.azurewebsites.net/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz",
"integrity": "sha1-+OcRMvf/5uAaXJaXpMbz5I1cyBk="
},
"caseless": {
"version": "0.12.0",
"resolved": "http://bbnpm.azurewebsites.net/caseless/-/caseless-0.12.0.tgz",
"integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw="
},
"co": {
"version": "4.6.0",
"resolved": "http://bbnpm.azurewebsites.net/co/-/co-4.6.0.tgz",
"integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ="
},
"combined-stream": {
"version": "1.0.5",
"resolved": "http://bbnpm.azurewebsites.net/combined-stream/-/combined-stream-1.0.5.tgz",
"integrity": "sha1-k4NwpXtKUd6ix3wV1cX9+JUWQAk=",
"requires": {
"delayed-stream": "1.0.0"
}
},
"commander": {
"version": "2.11.0",
"resolved": "http://bbnpm.azurewebsites.net/commander/-/commander-2.11.0.tgz",
"integrity": "sha512-b0553uYA5YAEGgyYIGYROzKQ7X5RAqedkfjiZxwi0kL1g3bOaBNNZfYkzt/CL0umgD5wc9Jec2FbB98CjkMRvQ==",
"dev": true
},
"concat-map": {
"version": "0.0.1",
"resolved": "http://bbnpm.azurewebsites.net/concat-map/-/concat-map-0.0.1.tgz",
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
"dev": true
},
"core-util-is": {
"version": "1.0.2",
"resolved": "http://bbnpm.azurewebsites.net/core-util-is/-/core-util-is-1.0.2.tgz",
"integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac="
},
"cryptiles": {
"version": "3.1.2",
"resolved": "http://bbnpm.azurewebsites.net/cryptiles/-/cryptiles-3.1.2.tgz",
"integrity": "sha1-qJ+7Ig9c4l7FboxKqKT9e1sNKf4=",
"requires": {
"boom": "5.2.0"
},
"dependencies": {
"boom": {
"version": "5.2.0",
"resolved": "http://bbnpm.azurewebsites.net/boom/-/boom-5.2.0.tgz",
"integrity": "sha512-Z5BTk6ZRe4tXXQlkqftmsAUANpXmuwlsF5Oov8ThoMbQRzdGTA1ngYRW160GexgOgjsFOKJz0LYhoNi+2AMBUw==",
"requires": {
"hoek": "4.2.0"
}
},
"hoek": {
"version": "4.2.0",
"resolved": "http://bbnpm.azurewebsites.net/hoek/-/hoek-4.2.0.tgz",
"integrity": "sha512-v0XCLxICi9nPfYrS9RL8HbYnXi9obYAeLbSP00BmnZwCK9+Ih9WOjoZ8YoHCoav2csqn4FOz4Orldsy2dmDwmQ=="
}
}
},
"dashdash": {
"version": "1.14.1",
"resolved": "http://bbnpm.azurewebsites.net/dashdash/-/dashdash-1.14.1.tgz",
"integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=",
"requires": {
"assert-plus": "1.0.0"
}
},
"debug": {
"version": "3.1.0",
"resolved": "http://bbnpm.azurewebsites.net/debug/-/debug-3.1.0.tgz",
"integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
"dev": true,
"requires": {
"ms": "2.0.0"
},
"dependencies": {
"ms": {
"version": "2.0.0",
"resolved": "http://bbnpm.azurewebsites.net/ms/-/ms-2.0.0.tgz",
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
"dev": true
}
}
},
"delayed-stream": {
"version": "1.0.0",
"resolved": "http://bbnpm.azurewebsites.net/delayed-stream/-/delayed-stream-1.0.0.tgz",
"integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk="
},
"diff": {
"version": "3.3.1",
"resolved": "http://bbnpm.azurewebsites.net/diff/-/diff-3.3.1.tgz",
"integrity": "sha512-MKPHZDMB0o6yHyDryUOScqZibp914ksXwAMYMTHj6KO8UeKsRYNJD3oNCKjTqZon+V488P7N/HzXF8t7ZR95ww==",
"dev": true
},
"duplexer": {
"version": "0.1.1",
"resolved": "http://bbnpm.azurewebsites.net/duplexer/-/duplexer-0.1.1.tgz",
"integrity": "sha1-rOb/gIwc5mtX0ev5eXessCM0z8E="
},
"ecc-jsbn": {
"version": "0.1.1",
"resolved": "http://bbnpm.azurewebsites.net/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz",
"integrity": "sha1-D8c6ntXw1Tw4GTOYUj735UN3dQU=",
"optional": true,
"requires": {
"jsbn": "0.1.1"
}
},
"ecdsa-sig-formatter": {
"version": "1.0.9",
"resolved": "http://bbnpm.azurewebsites.net/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.9.tgz",
"integrity": "sha1-S8kmJ07Dtau1AW5+HWCSGsJisqE=",
"requires": {
"base64url": "2.0.0",
"safe-buffer": "5.1.1"
}
},
"escape-string-regexp": {
"version": "1.0.5",
"resolved": "http://bbnpm.azurewebsites.net/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
"integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
"dev": true
},
"extend": {
"version": "3.0.1",
"resolved": "http://bbnpm.azurewebsites.net/extend/-/extend-3.0.1.tgz",
"integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ="
},
"extsprintf": {
"version": "1.3.0",
"resolved": "http://bbnpm.azurewebsites.net/extsprintf/-/extsprintf-1.3.0.tgz",
"integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU="
},
"fast-deep-equal": {
"version": "1.0.0",
"resolved": "http://bbnpm.azurewebsites.net/fast-deep-equal/-/fast-deep-equal-1.0.0.tgz",
"integrity": "sha1-liVqO8l1WV6zbYLpkp0GDYk0Of8="
},
"fast-json-stable-stringify": {
"version": "2.0.0",
"resolved": "http://bbnpm.azurewebsites.net/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz",
"integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I="
},
"forever-agent": {
"version": "0.6.1",
"resolved": "http://bbnpm.azurewebsites.net/forever-agent/-/forever-agent-0.6.1.tgz",
"integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE="
},
"form-data": {
"version": "2.3.1",
"resolved": "http://bbnpm.azurewebsites.net/form-data/-/form-data-2.3.1.tgz",
"integrity": "sha1-b7lPvXGIUwbXPRXMSX/kzE7NRL8=",
"requires": {
"asynckit": "0.4.0",
"combined-stream": "1.0.5",
"mime-types": "2.1.17"
}
},
"fs.realpath": {
"version": "1.0.0",
"resolved": "http://bbnpm.azurewebsites.net/fs.realpath/-/fs.realpath-1.0.0.tgz",
"integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=",
"dev": true
},
"getpass": {
"version": "0.1.7",
"resolved": "http://bbnpm.azurewebsites.net/getpass/-/getpass-0.1.7.tgz",
"integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=",
"requires": {
"assert-plus": "1.0.0"
}
},
"glob": {
"version": "7.1.2",
"resolved": "http://bbnpm.azurewebsites.net/glob/-/glob-7.1.2.tgz",
"integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==",
"dev": true,
"requires": {
"fs.realpath": "1.0.0",
"inflight": "1.0.6",
"inherits": "2.0.3",
"minimatch": "3.0.4",
"once": "1.4.0",
"path-is-absolute": "1.0.1"
}
},
"growl": {
"version": "1.10.3",
"resolved": "http://bbnpm.azurewebsites.net/growl/-/growl-1.10.3.tgz",
"integrity": "sha512-hKlsbA5Vu3xsh1Cg3J7jSmX/WaW6A5oBeqzM88oNbCRQFz+zUaXm6yxS4RVytp1scBoJzSYl4YAEOQIt6O8V1Q==",
"dev": true
},
"har-schema": {
"version": "2.0.0",
"resolved": "http://bbnpm.azurewebsites.net/har-schema/-/har-schema-2.0.0.tgz",
"integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI="
},
"har-validator": {
"version": "5.0.3",
"resolved": "http://bbnpm.azurewebsites.net/har-validator/-/har-validator-5.0.3.tgz",
"integrity": "sha1-ukAsJmGU8VlW7xXg/PJCmT9qff0=",
"requires": {
"ajv": "5.5.2",
"har-schema": "2.0.0"
}
},
"has-flag": {
"version": "2.0.0",
"resolved": "http://bbnpm.azurewebsites.net/has-flag/-/has-flag-2.0.0.tgz",
"integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=",
"dev": true
},
"hawk": {
"version": "6.0.2",
"resolved": "http://bbnpm.azurewebsites.net/hawk/-/hawk-6.0.2.tgz",
"integrity": "sha512-miowhl2+U7Qle4vdLqDdPt9m09K6yZhkLDTWGoUiUzrQCn+mHHSmfJgAyGaLRZbPmTqfFFjRV1QWCW0VWUJBbQ==",
"requires": {
"boom": "4.3.1",
"cryptiles": "3.1.2",
"hoek": "4.2.0",
"sntp": "2.1.0"
},
"dependencies": {
"hoek": {
"version": "4.2.0",
"resolved": "http://bbnpm.azurewebsites.net/hoek/-/hoek-4.2.0.tgz",
"integrity": "sha512-v0XCLxICi9nPfYrS9RL8HbYnXi9obYAeLbSP00BmnZwCK9+Ih9WOjoZ8YoHCoav2csqn4FOz4Orldsy2dmDwmQ=="
}
}
},
"he": {
"version": "1.1.1",
"resolved": "http://bbnpm.azurewebsites.net/he/-/he-1.1.1.tgz",
"integrity": "sha1-k0EP0hsAlzUVH4howvJx80J+I/0=",
"dev": true
},
"hoek": {
"version": "2.16.3",
"resolved": "http://bbnpm.azurewebsites.net/hoek/-/hoek-2.16.3.tgz",
"integrity": "sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0="
},
"http-signature": {
"version": "1.2.0",
"resolved": "http://bbnpm.azurewebsites.net/http-signature/-/http-signature-1.2.0.tgz",
"integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=",
"requires": {
"assert-plus": "1.0.0",
"jsprim": "1.4.1",
"sshpk": "1.13.1"
}
},
"inflight": {
"version": "1.0.6",
"resolved": "http://bbnpm.azurewebsites.net/inflight/-/inflight-1.0.6.tgz",
"integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
"dev": true,
"requires": {
"once": "1.4.0",
"wrappy": "1.0.2"
}
},
"inherits": {
"version": "2.0.3",
"resolved": "http://bbnpm.azurewebsites.net/inherits/-/inherits-2.0.3.tgz",
"integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=",
"dev": true
},
"is-buffer": {
"version": "1.1.6",
"resolved": "http://bbnpm.azurewebsites.net/is-buffer/-/is-buffer-1.1.6.tgz",
"integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w=="
},
"is-stream": {
"version": "1.1.0",
"resolved": "http://bbnpm.azurewebsites.net/is-stream/-/is-stream-1.1.0.tgz",
"integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ="
},
"is-typedarray": {
"version": "1.0.0",
"resolved": "http://bbnpm.azurewebsites.net/is-typedarray/-/is-typedarray-1.0.0.tgz",
"integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo="
},
"isemail": {
"version": "1.2.0",
"resolved": "http://bbnpm.azurewebsites.net/isemail/-/isemail-1.2.0.tgz",
"integrity": "sha1-vgPfjMPineTSxd9lASY/H6RZXpo="
},
"isstream": {
"version": "0.1.2",
"resolved": "http://bbnpm.azurewebsites.net/isstream/-/isstream-0.1.2.tgz",
"integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo="
},
"joi": {
"version": "6.10.1",
"resolved": "http://bbnpm.azurewebsites.net/joi/-/joi-6.10.1.tgz",
"integrity": "sha1-TVDDGAeRIgAP5fFq8f+OGRe3fgY=",
"requires": {
"hoek": "2.16.3",
"isemail": "1.2.0",
"moment": "2.20.1",
"topo": "1.1.0"
}
},
"jsbn": {
"version": "0.1.1",
"resolved": "http://bbnpm.azurewebsites.net/jsbn/-/jsbn-0.1.1.tgz",
"integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=",
"optional": true
},
"json-schema": {
"version": "0.2.3",
"resolved": "http://bbnpm.azurewebsites.net/json-schema/-/json-schema-0.2.3.tgz",
"integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM="
},
"json-schema-traverse": {
"version": "0.3.1",
"resolved": "http://bbnpm.azurewebsites.net/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz",
"integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A="
},
"json-stringify-safe": {
"version": "5.0.1",
"resolved": "http://bbnpm.azurewebsites.net/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz",
"integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus="
},
"jsonwebtoken": {
"version": "7.4.3",
"resolved": "http://bbnpm.azurewebsites.net/jsonwebtoken/-/jsonwebtoken-7.4.3.tgz",
"integrity": "sha1-d/UCHeBYtgWheD+hKD6ZgS5kVjg=",
"requires": {
"joi": "6.10.1",
"jws": "3.1.4",
"lodash.once": "4.1.1",
"ms": "2.1.1",
"xtend": "4.0.1"
}
},
"jsprim": {
"version": "1.4.1",
"resolved": "http://bbnpm.azurewebsites.net/jsprim/-/jsprim-1.4.1.tgz",
"integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=",
"requires": {
"assert-plus": "1.0.0",
"extsprintf": "1.3.0",
"json-schema": "0.2.3",
"verror": "1.10.0"
}
},
"jwa": {
"version": "1.1.5",
"resolved": "http://bbnpm.azurewebsites.net/jwa/-/jwa-1.1.5.tgz",
"integrity": "sha1-oFUs4CIHQs1S4VN3SjKQXDDnVuU=",
"requires": {
"base64url": "2.0.0",
"buffer-equal-constant-time": "1.0.1",
"ecdsa-sig-formatter": "1.0.9",
"safe-buffer": "5.1.1"
}
},
"jws": {
"version": "3.1.4",
"resolved": "http://bbnpm.azurewebsites.net/jws/-/jws-3.1.4.tgz",
"integrity": "sha1-+ei5M46KhHJ31kRLFGT2GIDgUKI=",
"requires": {
"base64url": "2.0.0",
"jwa": "1.1.5",
"safe-buffer": "5.1.1"
}
},
"lodash.once": {
"version": "4.1.1",
"resolved": "http://bbnpm.azurewebsites.net/lodash.once/-/lodash.once-4.1.1.tgz",
"integrity": "sha1-DdOXEhPHxW34gJd9UEyI+0cal6w="
},
"mime-db": {
"version": "1.30.0",
"resolved": "http://bbnpm.azurewebsites.net/mime-db/-/mime-db-1.30.0.tgz",
"integrity": "sha1-dMZD2i3Z1qRTmZY0ZbJtXKfXHwE="
},
"mime-types": {
"version": "2.1.17",
"resolved": "http://bbnpm.azurewebsites.net/mime-types/-/mime-types-2.1.17.tgz",
"integrity": "sha1-Cdejk/A+mVp5+K+Fe3Cp4KsWVXo=",
"requires": {
"mime-db": "1.30.0"
}
},
"minimatch": {
"version": "3.0.4",
"resolved": "http://bbnpm.azurewebsites.net/minimatch/-/minimatch-3.0.4.tgz",
"integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
"dev": true,
"requires": {
"brace-expansion": "1.1.8"
}
},
"minimist": {
"version": "0.0.8",
"resolved": "http://bbnpm.azurewebsites.net/minimist/-/minimist-0.0.8.tgz",
"integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=",
"dev": true
},
"mkdirp": {
"version": "0.5.1",
"resolved": "http://bbnpm.azurewebsites.net/mkdirp/-/mkdirp-0.5.1.tgz",
"integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
"dev": true,
"requires": {
"minimist": "0.0.8"
}
},
"mocha": {
"version": "^5.0.0",
"resolved": "http://bbnpm.azurewebsites.net/mocha/-/mocha-4.1.0.tgz",
"integrity": "sha512-0RVnjg1HJsXY2YFDoTNzcc1NKhYuXKRrBAG2gDygmJJA136Cs2QlRliZG1mA0ap7cuaT30mw16luAeln+4RiNA==",
"dev": true,
"requires": {
"browser-stdout": "1.3.0",
"commander": "2.11.0",
"debug": "3.1.0",
"diff": "3.3.1",
"escape-string-regexp": "1.0.5",
"glob": "7.1.2",
"growl": "1.10.3",
"he": "1.1.1",
"mkdirp": "0.5.1",
"supports-color": "4.4.0"
}
},
"moment": {
"version": "2.20.1",
"resolved": "http://bbnpm.azurewebsites.net/moment/-/moment-2.20.1.tgz",
"integrity": "sha512-Yh9y73JRljxW5QxN08Fner68eFLxM5ynNOAw2LbIB1YAGeQzZT8QFSUvkAz609Zf+IHhhaUxqZK8dG3W/+HEvg=="
},
"ms": {
"version": "2.1.1",
"resolved": "http://bbnpm.azurewebsites.net/ms/-/ms-2.1.1.tgz",
"integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg=="
},
"ms-rest": {
"version": "2.3.0",
"resolved": "http://bbnpm.azurewebsites.net/ms-rest/-/ms-rest-2.3.0.tgz",
"integrity": "sha512-jjMjl1il7nJSXVhpPrzvCWrjeQAk6OlSyf/SGLea9uvDGMQDLjXndRqvzt1zSUCadJA2m3f+U0K3+lQfubvqmg==",
"requires": {
"@types/node": "^9.3.0",
"@types/request": "2.0.12",
"@types/uuid": "3.4.3",
"duplexer": "0.1.1",
"is-buffer": "1.1.6",
"is-stream": "1.1.0",
"moment": "2.18.1",
"request": "2.83.0",
"through": "2.3.8",
"tunnel": "0.0.5",
"uuid": "3.2.1"
},
"dependencies": {
"moment": {
"version": "2.18.1",
"resolved": "http://bbnpm.azurewebsites.net/moment/-/moment-2.18.1.tgz",
"integrity": "sha1-w2GT3Tzhwu7SrbfIAtu8d6gbHA8="
}
}
},
"oauth-sign": {
"version": "0.8.2",
"resolved": "http://bbnpm.azurewebsites.net/oauth-sign/-/oauth-sign-0.8.2.tgz",
"integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM="
},
"once": {
"version": "1.4.0",
"resolved": "http://bbnpm.azurewebsites.net/once/-/once-1.4.0.tgz",
"integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
"dev": true,
"requires": {
"wrappy": "1.0.2"
}
},
"path-is-absolute": {
"version": "1.0.1",
"resolved": "http://bbnpm.azurewebsites.net/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
"integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
"dev": true
},
"performance-now": {
"version": "2.1.0",
"resolved": "http://bbnpm.azurewebsites.net/performance-now/-/performance-now-2.1.0.tgz",
"integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns="
},
"punycode": {
"version": "1.4.1",
"resolved": "http://bbnpm.azurewebsites.net/punycode/-/punycode-1.4.1.tgz",
"integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4="
},
"qs": {
"version": "6.5.1",
"resolved": "http://bbnpm.azurewebsites.net/qs/-/qs-6.5.1.tgz",
"integrity": "sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A=="
},
"request": {
"version": "2.83.0",
"resolved": "http://bbnpm.azurewebsites.net/request/-/request-2.83.0.tgz",
"integrity": "sha512-lR3gD69osqm6EYLk9wB/G1W/laGWjzH90t1vEa2xuxHD5KUrSzp9pUSfTm+YC5Nxt2T8nMPEvKlhbQayU7bgFw==",
"requires": {
"aws-sign2": "0.7.0",
"aws4": "1.6.0",
"caseless": "0.12.0",
"combined-stream": "1.0.5",
"extend": "3.0.1",
"forever-agent": "0.6.1",
"form-data": "2.3.1",
"har-validator": "5.0.3",
"hawk": "6.0.2",
"http-signature": "1.2.0",
"is-typedarray": "1.0.0",
"isstream": "0.1.2",
"json-stringify-safe": "5.0.1",
"mime-types": "2.1.17",
"oauth-sign": "0.8.2",
"performance-now": "2.1.0",
"qs": "6.5.1",
"safe-buffer": "5.1.1",
"stringstream": "0.0.5",
"tough-cookie": "2.3.3",
"tunnel-agent": "0.6.0",
"uuid": "3.2.1"
}
},
"rsa-pem-from-mod-exp": {
"version": "0.8.4",
"resolved": "http://bbnpm.azurewebsites.net/rsa-pem-from-mod-exp/-/rsa-pem-from-mod-exp-0.8.4.tgz",
"integrity": "sha1-NipCxtMEBW1JOz8SvOq7LGV2ptQ="
},
"safe-buffer": {
"version": "5.1.1",
"resolved": "http://bbnpm.azurewebsites.net/safe-buffer/-/safe-buffer-5.1.1.tgz",
"integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg=="
},
"sntp": {
"version": "2.1.0",
"resolved": "http://bbnpm.azurewebsites.net/sntp/-/sntp-2.1.0.tgz",
"integrity": "sha512-FL1b58BDrqS3A11lJ0zEdnJ3UOKqVxawAkF3k7F0CVN7VQ34aZrV+G8BZ1WC9ZL7NyrwsW0oviwsWDgRuVYtJg==",
"requires": {
"hoek": "4.2.0"
},
"dependencies": {
"hoek": {
"version": "4.2.0",
"resolved": "http://bbnpm.azurewebsites.net/hoek/-/hoek-4.2.0.tgz",
"integrity": "sha512-v0XCLxICi9nPfYrS9RL8HbYnXi9obYAeLbSP00BmnZwCK9+Ih9WOjoZ8YoHCoav2csqn4FOz4Orldsy2dmDwmQ=="
}
}
},
"sshpk": {
"version": "1.13.1",
"resolved": "http://bbnpm.azurewebsites.net/sshpk/-/sshpk-1.13.1.tgz",
"integrity": "sha1-US322mKHFEMW3EwY/hzx2UBzm+M=",
"requires": {
"asn1": "0.2.3",
"assert-plus": "1.0.0",
"bcrypt-pbkdf": "1.0.1",
"dashdash": "1.14.1",
"ecc-jsbn": "0.1.1",
"getpass": "0.1.7",
"jsbn": "0.1.1",
"tweetnacl": "0.14.5"
}
},
"stringstream": {
"version": "0.0.5",
"resolved": "http://bbnpm.azurewebsites.net/stringstream/-/stringstream-0.0.5.tgz",
"integrity": "sha1-TkhM1N5aC7vuGORjB3EKioFiGHg="
},
"supports-color": {
"version": "4.4.0",
"resolved": "http://bbnpm.azurewebsites.net/supports-color/-/supports-color-4.4.0.tgz",
"integrity": "sha512-rKC3+DyXWgK0ZLKwmRsrkyHVZAjNkfzeehuFWdGGcqGDTZFH73+RH6S/RDAAxl9GusSjZSUWYLmT9N5pzXFOXQ==",
"dev": true,
"requires": {
"has-flag": "2.0.0"
}
},
"through": {
"version": "2.3.8",
"resolved": "http://bbnpm.azurewebsites.net/through/-/through-2.3.8.tgz",
"integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU="
},
"topo": {
"version": "1.1.0",
"resolved": "http://bbnpm.azurewebsites.net/topo/-/topo-1.1.0.tgz",
"integrity": "sha1-6ddRYV0buH3IZdsYL6HKCl71NtU=",
"requires": {
"hoek": "2.16.3"
}
},
"tough-cookie": {
"version": "2.3.3",
"resolved": "http://bbnpm.azurewebsites.net/tough-cookie/-/tough-cookie-2.3.3.tgz",
"integrity": "sha1-C2GKVWW23qkL80JdBNVe3EdadWE=",
"requires": {
"punycode": "1.4.1"
}
},
"tunnel": {
"version": "0.0.5",
"resolved": "http://bbnpm.azurewebsites.net/tunnel/-/tunnel-0.0.5.tgz",
"integrity": "sha512-gj5sdqherx4VZKMcBA4vewER7zdK25Td+z1npBqpbDys4eJrLx+SlYjJvq1bDXs2irkuJM5pf8ktaEQVipkrbA=="
},
"tunnel-agent": {
"version": "0.6.0",
"resolved": "http://bbnpm.azurewebsites.net/tunnel-agent/-/tunnel-agent-0.6.0.tgz",
"integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=",
"requires": {
"safe-buffer": "5.1.1"
}
},
"tweetnacl": {
"version": "0.14.5",
"resolved": "http://bbnpm.azurewebsites.net/tweetnacl/-/tweetnacl-0.14.5.tgz",
"integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=",
"optional": true
},
"typescript": {
"version": "2.2.1",
"resolved": "http://bbnpm.azurewebsites.net/typescript/-/typescript-2.2.1.tgz",
"integrity": "sha1-SGK2YrmIpMj/aRzHlpYi0k23auk=",
"dev": true
},
"uuid": {
"version": "3.2.1",
"resolved": "http://bbnpm.azurewebsites.net/uuid/-/uuid-3.2.1.tgz",
"integrity": "sha512-jZnMwlb9Iku/O3smGWvZhauCf6cvvpKi4BKRiliS3cxnI+Gz9j5MEpTz2UFuXiKPJocb7gnsLHwiS05ige5BEA=="
},
"verror": {
"version": "1.10.0",
"resolved": "http://bbnpm.azurewebsites.net/verror/-/verror-1.10.0.tgz",
"integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=",
"requires": {
"assert-plus": "1.0.0",
"core-util-is": "1.0.2",
"extsprintf": "1.3.0"
}
},
"wrappy": {
"version": "1.0.2",
"resolved": "http://bbnpm.azurewebsites.net/wrappy/-/wrappy-1.0.2.tgz",
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
"dev": true
},
"xtend": {
"version": "4.0.1",
"resolved": "http://bbnpm.azurewebsites.net/xtend/-/xtend-4.0.1.tgz",
"integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68="
}
}
}

Просмотреть файл

@ -1,44 +0,0 @@
{
"name": "botframework-connector-auth",
"author": "Microsoft Corp.",
"description": "Authentication package for Microsoft Bot Connector",
"version": "4.0.0-m1.2",
"license": "MIT",
"keywords": [
"botbuilder",
"botframework",
"bots",
"chatbots"
],
"bugs": {
"url": "https://github.com/Microsoft/botbuilder-js/issues"
},
"repository": {
"type": "git",
"url": "https://github.com/Microsoft/botbuilder-js.git"
},
"main": "./lib/index.js",
"typings": "./lib/index.d.ts",
"dependencies": {
"base64url": "^2.0.0",
"jsonwebtoken": "8.0.1",
"ms-rest": "^2.2.0",
"rsa-pem-from-mod-exp": "^0.8.4"
},
"devDependencies": {
"@types/jsonwebtoken": "7.2.5",
"@types/mocha": "^2.2.47",
"@types/node": "^9.3.0",
"codelyzer": "^4.1.0",
"mocha": "^5.0.0",
"nyc": "^11.4.1",
"source-map-support": "^0.5.3",
"ts-node": "^4.1.0",
"typescript": "^2.5.2"
},
"scripts": {
"test": "tsc && nyc mocha tests/",
"build": "tsc",
"clean": "erase /q lib\\*.*"
}
}

Просмотреть файл

@ -1,6 +0,0 @@
const assert = require('assert');
const connector = require('../');
describe('Connector Auth Tests', function() {
console.warn('WARNING: no botframework-connector-auth tests have been defined yet.');
});

Просмотреть файл

@ -1,53 +0,0 @@
{
"compilerOptions": {
/* Basic Options */
"target": "ES2015", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'. */
"module": "commonjs", /* Specify module code generation: 'commonjs', 'amd', 'system', 'umd' or 'es2015'. */
// "lib": [], /* Specify library files to be included in the compilation: */
// "allowJs": true, /* Allow javascript files to be compiled. */
// "checkJs": true, /* Report errors in .js files. */
// "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
"declaration": true, /* Generates corresponding '.d.ts' file. */
"sourceMap": true, /* Generates corresponding '.map' file. */
// "outFile": "./", /* Concatenate and emit output to single file. */
"outDir": "./lib", /* Redirect output structure to the directory. */
"rootDir": "./src", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
// "removeComments": true, /* Do not emit comments to output. */
// "noEmit": true, /* Do not emit outputs. */
// "importHelpers": true, /* Import emit helpers from 'tslib'. */
// "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */
// "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */
/* Strict Type-Checking Options */
"strict": false, /* Enable all strict type-checking options. */
// "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */
// "strictNullChecks": true, /* Enable strict null checks. */
// "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */
// "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */
/* Additional Checks */
// "noUnusedLocals": true, /* Report errors on unused locals. */
// "noUnusedParameters": true, /* Report errors on unused parameters. */
// "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
// "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
/* Module Resolution Options */
"moduleResolution": "node" /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
// "baseUrl": "./", /* Base directory to resolve non-absolute module names. */
// "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
// "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
// "typeRoots": [], /* List of folders to include type definitions from. */
// "types": [], /* Type declaration files to be included in compilation. */
// "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
/* Source Map Options */
// "sourceRoot": "./", /* Specify the location where debugger should locate TypeScript files instead of source locations. */
// "mapRoot": "./", /* Specify the location where debugger should locate map files instead of generated locations. */
// "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */
// "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */
/* Experimental Options */
// "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */
// "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */
}
}

Просмотреть файл

@ -1,4 +1,5 @@
/**/node_modules
/**/.vscode
tests
.vscode
swagger
coverage
.nyc_output

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше