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", "name": "botlib",
"version": "0.0.28", "version": "0.0.29",
"description": "General Bot base library for building Node.js TypeScript Apps packages (.gbapp)", "description": "General Bot base library for building Node.js TypeScript Apps packages (.gbapp)",
"main": "dist/src/index.js", "main": "dist/src/index.js",
"types": "dist/src/index.d.ts", "types": "dist/src/index.d.ts",
@ -16,7 +16,12 @@
}, },
"dependencies": { "dependencies": {
"async": "^2.6.1", "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", "botbuilder-location": "^2.0.0",
"chrono-node": "^1.3.5", "chrono-node": "^1.3.5",
"dotenv-extended": "^2.0.2", "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 { IGBInstance } from "./IGBinstance";
import { IGBCoreService } from "./IGBCoreService"; import { IGBCoreService } from "./IGBCoreService";
import { IGBConversationalService, IGBPackage } from "."; import { IGBConversationalService, IGBPackage } from ".";
@ -46,9 +47,12 @@ export class GBMinInstance {
core: IGBCoreService; core: IGBCoreService;
conversationalService: IGBConversationalService; conversationalService: IGBConversationalService;
textServices: AzureText; textServices: AzureText;
bot: UniversalBot; bot: BotAdapter;
dialogs: DialogSet;
userState: UserState;
constructor() { constructor() {
this.packages = []; this.packages = [];
this.dialogs = new DialogSet();
} }
} }

View file

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

View file

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

View file

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

View file

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

View file

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