Skip to content

Commit

Permalink
fix(all): Packages updated and new DirectLine behaviour fixed.
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigorodriguez committed Jun 13, 2021
1 parent 9ab7349 commit 517689f
Show file tree
Hide file tree
Showing 12 changed files with 13,313 additions and 11,699 deletions.
8 changes: 8 additions & 0 deletions DATABASE-CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,3 +97,11 @@ ALTER TABLE dbo.GuaribasQuestion ADD
skipIndex bit NULL
GO

# 2.0.116 >


ALTER TABLE dbo.GuaribasInstance ADD
googleBotKey nvarchar(255) NULL,
googleChatApiKey nvarchar(255) NULL,
googleChatSubscriptionName nvarchar(255) NULL,
GO
13 changes: 13 additions & 0 deletions google-chat.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"type": "service_account",
"project_id": "eastern-amp-316323",
"private_key_id": "4105f7f4cf2293adf2f561f7649449dedf9ab839",
"private_key": "-----BEGIN PRIVATE KEY-----\nMIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCfIuztkRf8AZOr\ngOS8TDghQdme7eyvnT2Z+ly+9Q9D51frqsoKtbPJJSO9l3vX1qYGGEWHZlaPX5n6\nP1uTfYv9jjW9A2/oKZW/cV70O5wdFonn0sQblzC2+ZhlHuS6MQN0PqUvLNFGF57U\n5NCG3JUx1qhBHCPP5a/MXSXsvXTxngRtHfpKo2JbhsYXDHJl0+2DRJvx3+0WeIxW\ni7J2I0UXX4WlTORj9yaN4xVe/C2NPvQ+k9WGt1d2ql+F5w0ndnegOUOI8ZhQ3les\nw9KA0k1/ImC3q57+BIN5Xeg+NaY7r2gCEROqeDEs2v1TK9JsFhQJyvmLgjV64iLO\nogt677b5AgMBAAECggEAAymoCM6t6dnELA/rO9zN7sdGwnRbFGBtJX7G0hq/u2tB\nIZNq4Yyb7p74119H3FHNSei4lQjRJpdRUZppwQQpQJhPdBq54iTVb5EawILgxuk4\nQ226bQvzsWdDgpr7E8I+ndRS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A7cbGQ4J\n/5RAByRbjc1dDtaI/m5BssQ=\n-----END PRIVATE KEY-----\n",
"client_email": "starting-account-otllxgcv9auu@eastern-amp-316323.iam.gserviceaccount.com",
"client_id": "103388169832798500398",
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
"token_uri": "https://oauth2.googleapis.com/token",
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
"client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/starting-account-otllxgcv9auu%40eastern-amp-316323.iam.gserviceaccount.com"
}

7,397 changes: 2,719 additions & 4,678 deletions package-lock.json

Large diffs are not rendered by default.

65 changes: 32 additions & 33 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,15 @@
"commit": "git-cz"
},
"dependencies": {
"@azure/ms-rest-js": "2.1.0",
"@azure/ms-rest-js": "2.5.1",
"@google-cloud/pubsub": "^2.13.0",
"@microsoft/microsoft-graph-client": "2.1.1",
"@microsoft/microsoft-graph-client": "2.2.1",
"@semantic-release/changelog": "5.0.1",
"@semantic-release/exec": "5.0.0",
"@semantic-release/git": "9.0.0",
"@sendgrid/mail": "^7.4.2",
"@types/validator": "13.1.0",
"adal-node": "0.2.1",
"@sendgrid/mail": "^7.4.4",
"@types/validator": "13.1.4",
"adal-node": "0.2.2",
"any-shell-escape": "0.1.1",
"async-promises": "0.2.3",
"azure-arm-cognitiveservices": "3.0.0",
Expand All @@ -67,34 +67,33 @@
"azure-search-client": "3.1.5",
"bluebird": "3.7.2",
"body-parser": "1.19.0",
"botbuilder": "4.11.0",
"botbuilder": "4.13.5",
"botbuilder-adapter-facebook": "^1.0.11",
"botbuilder-adapter-hangouts": "^1.0.8",
"botbuilder-ai": "4.11.0",
"botbuilder-dialogs": "4.11.0",
"botframework-connector": "4.11.0",
"botlib": "1.7.1",
"botbuilder-ai": "4.13.5",
"botbuilder-dialogs": "4.13.5",
"botframework-connector": "4.13.5",
"botlib": "1.8.1",
"cli-spinner": "0.2.10",
"core-js": "3.7.0",
"core-js": "3.14.0",
"dotenv-extended": "2.9.0",
"exceljs": "4.2.0",
"exceljs": "4.2.1",
"express": "4.17.1",
"express-remove-route": "1.0.0",
"ffmpeg-static": "4.2.7",
"google-libphonenumber": "3.2.15",
"ffmpeg-static": "4.3.0",
"google-libphonenumber": "3.2.21",
"googleapis": "^76.0.0",
"ibm-watson": "5.7.1",
"js-beautify": "1.13.0",
"marked": "1.2.5",
"microsoft-cognitiveservices-speech-sdk": "1.14.1",
"ibm-watson": "6.1.1",
"js-beautify": "1.13.13",
"marked": "2.0.7",
"microsoft-cognitiveservices-speech-sdk": "1.17.0",
"ms-rest-azure": "3.0.0",
"nexmo": "2.9.1",
"node-cron": "2.0.3",
"node-cron": "3.0.0",
"opn": "6.0.0",
"phone": "2.4.17",
"phone": "2.4.21",
"pragmatismo-io-framework": "1.0.20",
"prism-media": "1.2.2",
"public-ip": "4.0.2",
"prism-media": "1.3.1",
"public-ip": "4.0.4",
"readline": "1.3.0",
"reflect-metadata": "0.1.13",
"request-promise": "4.2.5",
Expand All @@ -104,14 +103,14 @@
"scanf": "1.1.2",
"sequelize": "5.21.5",
"sequelize-typescript": "1.1.0",
"simple-git": "2.23.0",
"simple-git": "2.39.1",
"speakingurl": "^14.0.1",
"sppull": "2.6.7",
"sppull": "2.7.0",
"strict-password-generator": "1.1.2",
"swagger-client": "2.1.18",
"tedious": "9.2.1",
"textract": "2.5.0",
"typescript": "4.1.2",
"typescript": "4.3.2",
"url-join": "4.0.1",
"vbscript-to-typescript": "1.0.8",
"walk-promise": "0.2.0",
Expand All @@ -120,22 +119,22 @@
"devDependencies": {
"@types/url-join": "4.0.0",
"@types/winston": "2.4.4",
"ban-sensitive-files": "1.9.14",
"commitizen": "4.2.2",
"ban-sensitive-files": "1.9.15",
"commitizen": "4.2.4",
"cz-conventional-changelog": "3.3.0",
"dependency-check": "4.1.0",
"git-issues": "1.3.1",
"license-checker": "25.0.1",
"ngrok": "3.3.0",
"ngrok": "4.0.1",
"nsp": "3.2.1",
"prettier-standard": "16.4.1",
"semantic-release": "17.2.4",
"simple-commit-message": "4.0.13",
"semantic-release": "17.4.3",
"simple-commit-message": "4.1.2",
"travis-deploy-once": "5.0.11",
"ts-node": "9.0.0",
"ts-node": "10.0.0",
"tslint": "6.1.2",
"tslint-microsoft-contrib": "^6.2.0",
"typedoc": "0.19.2"
"typedoc": "0.20.36"
},
"eslintConfig": {
"env": {
Expand Down
3 changes: 1 addition & 2 deletions packages/basic.gblib/services/SystemKeywords.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,7 @@ export class SystemKeywords {
method: 'GET',
encoding: 'binary'
};
const res = await request(options);
Buffer.from(res, 'binary').toString();
return await request(options); // TODO: Check this.
}

/**
Expand Down
9 changes: 9 additions & 0 deletions packages/core.gbapp/models/GBModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,15 @@ export class GuaribasInstance extends Model<GuaribasInstance>
@Column
public cloudLocation: string;

@Column
public googleBotKey: string;

@Column
public googleChatApiKey: string;

@Column
public googleChatSubscriptionName: string;

@Column
public whatsappBotKey: string;

Expand Down
16 changes: 3 additions & 13 deletions packages/core.gbapp/services/GBMinService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ const removeRoute = require('express-remove-route');
const AuthenticationContext = require('adal-node').AuthenticationContext;
const wash = require('washyourmouthoutwithsoap');
const { FacebookAdapter } = require('botbuilder-adapter-facebook');
const { HangoutsAdapter } = require('botbuilder-adapter-hangouts');
import {
AutoSaveStateMiddleware,
BotFrameworkAdapter,
Expand Down Expand Up @@ -652,14 +651,13 @@ export class GBMinService {
}
});

let GoogleChatSubscriptionName = '';
let GoogleWebChatKey = '';

min['googleDirectLine'] = new GoogleChatDirectLine(
min,
min.botId,
GoogleWebChatKey,
GoogleChatSubscriptionName
min.instance.googleBotKey,
min.instance.googleChatSubscriptionName,
min.instance.googleChatApiKey
);
await min['googleDirectLine'].setup(true);

Expand Down Expand Up @@ -807,14 +805,6 @@ export class GBMinService {

firstTime = true;

// Sends loadInstance event to .gbui clients and loads FAQ.

await min.conversationalService.sendEvent(min, step, 'loadInstance', {
instanceId: instance.instanceId,
botId: instance.botId,
theme: instance.theme ? instance.theme : 'default.gbtheme',
secret: instance.webchatKey
});
const service = new KBService(min.core.sequelize);
const data = await service.getFaqBySubjectArray(instance.instanceId, 'faq', undefined);
await min.conversationalService.sendEvent(min, step, 'play', {
Expand Down

0 comments on commit 517689f

Please sign in to comment.