Code migrated and compiling, now the bot needs to work again.

This commit is contained in:
Rodrigo Rodriguez 2018-06-04 05:34:08 -03:00
parent 8ba9cfbaf6
commit a42b6163a9
7 changed files with 24 additions and 23 deletions

View file

@ -1,6 +1,6 @@
{
"name": "botlib",
"version": "0.0.28",
"version": "0.0.29",
"description": "General Bot base library for building Node.js TypeScript Apps packages (.gbapp)",
"main": "dist/src/index.js",
"types": "dist/src/index.d.ts",
@ -16,7 +16,12 @@
},
"dependencies": {
"async": "^2.6.1",
"botbuilder": "^3.15.0",
"botbuilder": "^4.0.0-preview1.2",
"botbuilder-ai": "^4.0.0-preview1.2",
"botbuilder-azure": "^4.0.0-preview1.2",
"botbuilder-choices": "^4.0.0-preview1.2",
"botbuilder-dialogs": "^4.0.0-preview1.2",
"botbuilder-prompts": "^4.0.0-preview1.2",
"botbuilder-location": "^2.0.0",
"chrono-node": "^1.3.5",
"dotenv-extended": "^2.0.2",

View file

@ -31,7 +31,8 @@
\*****************************************************************************/
import { UniversalBot } from "botbuilder";
import { BotAdapter, UserState } from "botbuilder";
import { DialogSet } from "botbuilder-dialogs"
import { IGBInstance } from "./IGBinstance";
import { IGBCoreService } from "./IGBCoreService";
import { IGBConversationalService, IGBPackage } from ".";
@ -46,9 +47,12 @@ export class GBMinInstance {
core: IGBCoreService;
conversationalService: IGBConversationalService;
textServices: AzureText;
bot: UniversalBot;
bot: BotAdapter;
dialogs: DialogSet;
userState: UserState;
constructor() {
this.packages = [];
this.dialogs = new DialogSet();
}
}

View file

@ -32,14 +32,14 @@
"use strict";
import { UniversalBot, Session } from "botbuilder";
import { GBMinInstance } from "./GBMinInstance";
import { GBServiceCallback } from "./GBService";
import { DialogContext } from "botbuilder-dialogs";
export interface IGBConversationalService {
sendEvent(session: Session, name: string, value: any);
sendEvent(dc:any, name: string, value: any);
runNLP(
session: Session,
dc:any,
min: GBMinInstance,
text: string,
cb: GBServiceCallback<any>

View file

@ -32,7 +32,6 @@
"use strict";
import { UniversalBot, Session } from "botbuilder";
import { GBMinInstance } from "./GBMinInstance";
import { GBServiceCallback } from "./GBService";
import { Sequelize } from "sequelize-typescript";

View file

@ -1,3 +1,4 @@
import { BotAdapter } from 'botbuilder';
/*****************************************************************************\
| ( )_ _ |
| _ _ _ __ _ _ __ ___ ___ _ _ | ,_)(_) ___ ___ _ |
@ -32,21 +33,12 @@
"use strict";
import {
IChatConnectorSettings,
IDialogResult,
IFindMatchResult,
Session,
Prompts,
ChatConnector,
UniversalBot
} from "botbuilder";
import { GBService } from "./GBService";
export class IGBDialog {
bot: UniversalBot;
bot: BotAdapter;
service: GBService;
constructor(bot: UniversalBot) {
constructor(bot: BotAdapter) {
}
}

View file

@ -53,6 +53,8 @@ export interface IGBInstance {
theme: string;
ui: string;
kb: string;
nlpAppId: string;
nlpSubscriptionKey: string;
nlpServerUrl: string;
speechKey: string;
spellcheckerKey: string;

View file

@ -34,7 +34,6 @@
import { IGBCoreService } from './IGBCoreService';
import { Sequelize, Model } from 'sequelize-typescript';
import { GBMinInstance } from '.';
import { Session } from 'botbuilder';
"use strict";
@ -55,7 +54,7 @@ export interface IGBPackage{
/** Called whenever a bot instance needs to be shutdown. */
unloadBot(min: GBMinInstance): void;
/** Called in each new session. */
onNewSession(min: GBMinInstance, session: Session): void;
/** Called in each new dc. */
onNewSession(min: GBMinInstance, dc: any): void;
}