Removal of semicolon.

This commit is contained in:
Rodrigo Rodriguez 2018-09-11 19:42:22 -03:00
parent 9466a214b7
commit 3247a189c7
9 changed files with 106 additions and 105 deletions

View file

@ -19,7 +19,7 @@
| in the LICENSE file you have received along with this program. | | in the LICENSE file you have received along with this program. |
| | | |
| This program is distributed in the hope that it will be useful, | | This program is distributed in the hope that it will be useful, |
| but WITHOUT ANY WARRANTY; without even the implied warranty of | | but WITHOUT ANY WARRANTY without even the implied warranty of |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| GNU Affero General Public License for more details. | | GNU Affero General Public License for more details. |
| | | |
@ -30,7 +30,7 @@
| | | |
\******************************************************************************/ \******************************************************************************/
'use strict'; 'use strict'
export enum GBERROR_TYPE { export enum GBERROR_TYPE {
generalError = 2, generalError = 2,
@ -42,17 +42,17 @@ export class GBError {
getMessageFromErrorCode(type: GBERROR_TYPE) { getMessageFromErrorCode(type: GBERROR_TYPE) {
if (type == GBERROR_TYPE.nlpGeneralError) { if (type == GBERROR_TYPE.nlpGeneralError) {
return `GuaribasBusinessError: Error accessing NLP, check of the service.`; return `GuaribasBusinessError: Error accessing NLP, check of the service.`
} }
} }
e: Error; e: Error
constructor(e: Error, type: GBERROR_TYPE = GBERROR_TYPE.generalError) { constructor(e: Error, type: GBERROR_TYPE = GBERROR_TYPE.generalError) {
this.e = e; this.e = e
} }
static create(message) { static create(message) {
return new GBError(Error(message)); return new GBError(Error(message))
} }
} }

View file

@ -19,7 +19,7 @@
| in the LICENSE file you have received along with this program. | | in the LICENSE file you have received along with this program. |
| | | |
| This program is distributed in the hope that it will be useful, | | This program is distributed in the hope that it will be useful, |
| but WITHOUT ANY WARRANTY; without even the implied warranty of | | but WITHOUT ANY WARRANTY, without even the implied warranty of |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| GNU Affero General Public License for more details. | | GNU Affero General Public License for more details. |
| | | |
@ -31,28 +31,28 @@
\*****************************************************************************/ \*****************************************************************************/
import { BotAdapter, UserState } from "botbuilder"; import { BotAdapter, UserState } from "botbuilder"
import { DialogSet } from "botbuilder-dialogs" 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 "."
import { AzureText } from "pragmatismo-io-framework"; import { AzureText } from "pragmatismo-io-framework"
/** Minimal services for bot. */ /** Minimal services for bot. */
export class GBMinInstance { export class GBMinInstance {
packages: IGBPackage[]; packages: IGBPackage[]
botId: string; botId: string
instance: IGBInstance; instance: IGBInstance
core: IGBCoreService; core: IGBCoreService
conversationalService: IGBConversationalService; conversationalService: IGBConversationalService
textServices: AzureText; textServices: AzureText
bot: BotAdapter; bot: BotAdapter
dialogs: DialogSet; dialogs: DialogSet
userState: UserState; userState: UserState
constructor() { constructor() {
this.packages = []; this.packages = []
this.dialogs = new DialogSet(); this.dialogs = new DialogSet()
} }
} }

View file

@ -19,7 +19,7 @@
| in the LICENSE file you have received along with this program. | | in the LICENSE file you have received along with this program. |
| | | |
| This program is distributed in the hope that it will be useful, | | This program is distributed in the hope that it will be useful, |
| but WITHOUT ANY WARRANTY; without even the implied warranty of | | but WITHOUT ANY WARRANTY without even the implied warranty of |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| GNU Affero General Public License for more details. | | GNU Affero General Public License for more details. |
| | | |
@ -30,6 +30,6 @@
| | | |
\******************************************************************************/ \******************************************************************************/
'use strict'; 'use strict'
export class GBService { } export class GBService { }

View file

@ -19,7 +19,7 @@
| in the LICENSE file you have received along with this program. | | in the LICENSE file you have received along with this program. |
| | | |
| This program is distributed in the hope that it will be useful, | | This program is distributed in the hope that it will be useful, |
| but WITHOUT ANY WARRANTY; without even the implied warranty of | | but WITHOUT ANY WARRANTY, without even the implied warranty of |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| GNU Affero General Public License for more details. | | GNU Affero General Public License for more details. |
| | | |
@ -30,15 +30,15 @@
| | | |
\*****************************************************************************/ \*****************************************************************************/
"use strict"; "use strict"
import { GBMinInstance } from "./GBMinInstance"; import { GBMinInstance } from "./GBMinInstance"
export interface IGBConversationalService { export interface IGBConversationalService {
sendEvent(dc:any, name: string, value: any); sendEvent(dc:any, name: string, value: any)
runNLP( runNLP(
dc:any, dc:any,
min: GBMinInstance, min: GBMinInstance,
text: string text: string
); )
} }

View file

@ -19,7 +19,7 @@
| in the LICENSE file you have received along with this program. | | in the LICENSE file you have received along with this program. |
| | | |
| This program is distributed in the hope that it will be useful, | | This program is distributed in the hope that it will be useful, |
| but WITHOUT ANY WARRANTY; without even the implied warranty of | | but WITHOUT ANY WARRANTY, without even the implied warranty of |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| GNU Affero General Public License for more details. | | GNU Affero General Public License for more details. |
| | | |
@ -30,19 +30,19 @@
| | | |
\*****************************************************************************/ \*****************************************************************************/
"use strict"; "use strict"
import { Sequelize } from "sequelize-typescript"; import { Sequelize } from "sequelize-typescript"
import { IGBInstance } from "./IGBInstance"; import { IGBInstance } from "./IGBInstance"
/** /**
* This interface defines the core service which is shared among * This interface defines the core service which is shared among
* bot packages so they can have direct access to base services. * bot packages so they can have direct access to base services.
*/ */
export interface IGBCoreService { export interface IGBCoreService {
sequelize: Sequelize; sequelize: Sequelize
initDatabase(); initDatabase()
syncDatabaseStructure(); syncDatabaseStructure()
loadInstances(): IGBInstance[]; loadInstances(): IGBInstance[]
loadInstance(botId: string): IGBInstance; loadInstance(botId: string): IGBInstance
} }

View file

@ -1,4 +1,4 @@
import { BotAdapter } from 'botbuilder'; import { BotAdapter } from 'botbuilder'
/*****************************************************************************\ /*****************************************************************************\
| ( )_ _ | | ( )_ _ |
| _ _ _ __ _ _ __ ___ ___ _ _ | ,_)(_) ___ ___ _ | | _ _ _ __ _ _ __ ___ ___ _ _ | ,_)(_) ___ ___ _ |
@ -20,7 +20,7 @@ import { BotAdapter } from 'botbuilder';
| in the LICENSE file you have received along with this program. | | in the LICENSE file you have received along with this program. |
| | | |
| This program is distributed in the hope that it will be useful, | | This program is distributed in the hope that it will be useful, |
| but WITHOUT ANY WARRANTY; without even the implied warranty of | | but WITHOUT ANY WARRANTY, without even the implied warranty of |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| GNU Affero General Public License for more details. | | GNU Affero General Public License for more details. |
| | | |
@ -31,13 +31,13 @@ import { BotAdapter } from 'botbuilder';
| | | |
\*****************************************************************************/ \*****************************************************************************/
"use strict"; "use strict"
import { GBService } from "./GBService"; import { GBService } from "./GBService"
export class IGBDialog { export class IGBDialog {
bot: BotAdapter; bot: BotAdapter
service: GBService; service: GBService
constructor(bot: BotAdapter) { constructor(bot: BotAdapter) {
} }
} }

View file

@ -19,7 +19,7 @@
| in the LICENSE file you have received along with this program. | | in the LICENSE file you have received along with this program. |
| | | |
| This program is distributed in the hope that it will be useful, | | This program is distributed in the hope that it will be useful, |
| but WITHOUT ANY WARRANTY; without even the implied warranty of | | but WITHOUT ANY WARRANTY, without even the implied warranty of |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| GNU Affero General Public License for more details. | | GNU Affero General Public License for more details. |
| | | |
@ -30,43 +30,44 @@
| | | |
\*****************************************************************************/ \*****************************************************************************/
"use strict"; "use strict"
export interface IGBInstance { export interface IGBInstance {
botId:string; botId:string
whoAmIVideo: string; whoAmIVideo: string
applicationPrincipal: string; applicationPrincipal: string
authenticatorTenant: string; authenticatorTenant: string
authenticatorsignUpSignInPolicy: string; authenticatorsignUpSignInPolicy: string
authenticatorClientID: string; authenticatorClientID: string
instanceId: number; instanceId: number
title: string; title: string
description: string; description: string
version: string; version: string
enabledAdmin: boolean; enabledAdmin: boolean
engineName: string; engineName: string
marketplaceId: string; marketplaceId: string
textAnalyticsKey: string; textAnalyticsKey: string
marketplacePassword: string; textAnalyticsServerUrl: string
webchatKey: string; marketplacePassword: string
whatsappServiceKey: string; webchatKey: string
whatsappBotKey: string; whatsappServiceKey: string
whatsappServiceNumber: string; whatsappBotKey: string
whatsappServiceUrl: string; whatsappServiceNumber: string
whatsappServiceWebhookUrl: string; whatsappServiceUrl: string
theme: string; whatsappServiceWebhookUrl: string
ui: string; theme: string
kb: string; ui: string
nlpAppId: string; kb: string
nlpSubscriptionKey: string; nlpAppId: string
nlpServerUrl: string; nlpSubscriptionKey: string
speechKey: string; nlpServerUrl: string
spellcheckerKey: string; speechKey: string
searchHost: string; spellcheckerKey: string
searchKey: string; searchHost: string
searchIndex: string; searchKey: string
searchIndexer: string; searchIndex: string
nlpVsSearch: number; searchIndexer: string
searchScore: number; nlpVsSearch: number
nlpScore: number; searchScore: number
nlpScore: number
} }

View file

@ -19,7 +19,7 @@
| in the LICENSE file you have received along with this program. | | in the LICENSE file you have received along with this program. |
| | | |
| This program is distributed in the hope that it will be useful, | | This program is distributed in the hope that it will be useful, |
| but WITHOUT ANY WARRANTY; without even the implied warranty of | | but WITHOUT ANY WARRANTY, without even the implied warranty of |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| GNU Affero General Public License for more details. | | GNU Affero General Public License for more details. |
| | | |
@ -31,41 +31,41 @@
\*****************************************************************************/ \*****************************************************************************/
import { IGBCoreService } from './IGBCoreService'; import { IGBCoreService } from './IGBCoreService'
import { Sequelize } from 'sequelize-typescript'; import { Sequelize } from 'sequelize-typescript'
import { GBMinInstance } from '.'; import { GBMinInstance } from '.'
// TODO: Include "use strict"; in all files. // TODO: Include "use strict" in all files.
export interface IGBPackage{ export interface IGBPackage{
/** /**
* Each app has its own set of sys packages. * Each app has its own set of sys packages.
*/ */
sysPackages: IGBPackage[]; sysPackages: IGBPackage[]
/** /**
* Called when a package is being loaded, once per server or at demand. * Called when a package is being loaded, once per server or at demand.
*/ */
loadPackage(core: IGBCoreService, sequelize: Sequelize): void; loadPackage(core: IGBCoreService, sequelize: Sequelize): void
/** /**
* Called when a package needs to be unloaded. * Called when a package needs to be unloaded.
*/ */
unloadPackage(core: IGBCoreService): void; unloadPackage(core: IGBCoreService): void
/** /**
* Called when a new bot instance is loaded. * Called when a new bot instance is loaded.
*/ */
loadBot(min: GBMinInstance): void; loadBot(min: GBMinInstance): void
/** /**
* 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 dc. * Called in each new dc.
*/ */
onNewSession(min: GBMinInstance, dc: any): void; onNewSession(min: GBMinInstance, dc: any): void
} }

View file

@ -19,7 +19,7 @@
| in the LICENSE file you have received along with this program. | | in the LICENSE file you have received along with this program. |
| | | |
| This program is distributed in the hope that it will be useful, | | This program is distributed in the hope that it will be useful, |
| but WITHOUT ANY WARRANTY; without even the implied warranty of | | but WITHOUT ANY WARRANTY without even the implied warranty of |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| GNU Affero General Public License for more details. | | GNU Affero General Public License for more details. |
| | | |
@ -30,14 +30,14 @@
| | | |
\******************************************************************************/ \******************************************************************************/
'use strict'; 'use strict'
export { Sequelize } from 'sequelize-typescript'; export { Sequelize } from 'sequelize-typescript'
export { IGBConversationalService } from './IGBConversationalService'; export { IGBConversationalService } from './IGBConversationalService'
export { IGBCoreService } from './IGBCoreService'; export { IGBCoreService } from './IGBCoreService'
export { IGBDialog } from './IGBDialog'; export { IGBDialog } from './IGBDialog'
export { IGBPackage } from './IGBPackage'; export { IGBPackage } from './IGBPackage'
export { IGBInstance } from './IGBInstance'; export { IGBInstance } from './IGBInstance'
export { GBError, GBERROR_TYPE } from './GBError'; export { GBError, GBERROR_TYPE } from './GBError'
export { GBService } from './GBService'; export { GBService } from './GBService'
export { GBMinInstance } from './GBMinInstance'; export { GBMinInstance } from './GBMinInstance'