diff --git a/package-lock.json b/package-lock.json index 6c4c642..ac8fb58 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "botlib", - "version": "1.4.4", + "version": "1.5.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 206a5ae..2d9809d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "botlib", - "version": "1.4.4", + "version": "1.5.0", "description": "General Bot base library for building Node.js TypeScript Apps packages (.gbapp) and Libray packages (.gblib)", "main": "dist/index.js", "types": "dist/index", @@ -9,7 +9,8 @@ "Rodrigo Rodriguez ", "João Antonio Ferreira ", "Jorge Ramos ", - "PH " + "PH ", + "Dário Vieira " ], "license": "AGPL-3.0", "repository": { diff --git a/src/IGBCoreService.ts b/src/IGBCoreService.ts index f8507e1..17d47f4 100644 --- a/src/IGBCoreService.ts +++ b/src/IGBCoreService.ts @@ -35,6 +35,7 @@ import { Sequelize } from "sequelize-typescript" import { IGBInstance } from "./IGBInstance" import { IGBInstallationDeployer } from "./IGBInstallationDeployer"; +import { IGBPackage } from "./IGBPackage"; /** * This interface defines the core service which is shared among @@ -50,7 +51,7 @@ export interface IGBCoreService { initStorage(): Promise; createBootInstance(core: IGBCoreService, installationDeployer: IGBInstallationDeployer, proxyAddress: string); ensureAdminIsSecured(); - loadSysPackages(core: IGBCoreService); + loadSysPackages(core: IGBCoreService): Promise; ensureProxy(port): Promise; ensureInstances(instances: IGBInstance[], bootInstance: any, core: IGBCoreService); checkStorage(azureDeployer: IGBInstallationDeployer); diff --git a/src/IGBPackage.ts b/src/IGBPackage.ts index 46e3264..b45a4d4 100644 --- a/src/IGBPackage.ts +++ b/src/IGBPackage.ts @@ -48,30 +48,30 @@ export interface IGBPackage{ /** * Called when a package is being loaded, once per server or at demand. */ - loadPackage(core: IGBCoreService, sequelize: Sequelize): void + loadPackage(core: IGBCoreService, sequelize: Sequelize): Promise /** * Called when a package needs to be unloaded. */ - unloadPackage(core: IGBCoreService): void + unloadPackage(core: IGBCoreService): Promise /** * Called when a new bot instance is loaded. */ - getDialogs(min: GBMinInstance) + getDialogs(min: GBMinInstance) /** * Called when a new bot instance is loaded. */ - loadBot(min: GBMinInstance): void + loadBot(min: GBMinInstance): Promise /** * Called whenever a bot instance needs to be shutdown. */ - unloadBot(min: GBMinInstance): void + unloadBot(min: GBMinInstance): Promise /** * Called in each new session. */ - onNewSession(min: GBMinInstance, step: GBDialogStep): void + onNewSession(min: GBMinInstance, step: GBDialogStep): Promise } \ No newline at end of file