From a59e2e3e66b024dc622e2cbe98eb38478e010624 Mon Sep 17 00:00:00 2001 From: Rodrigo Rodriguez Date: Sun, 16 Sep 2018 17:01:01 -0300 Subject: [PATCH] Added Azure AD administration routines. --- package.json | 11 ++++++----- src/IGBAdminService.ts | 38 ++++++++++++++++++++++++++++++++++++++ src/IGBCoreService.ts | 2 ++ src/IGBInstance.ts | 4 +++- 4 files changed, 49 insertions(+), 6 deletions(-) create mode 100644 src/IGBAdminService.ts diff --git a/package.json b/package.json index ec69228..5d24d7c 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "botlib", "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", "types": "dist/src/index.d.ts", "homepage": "http://www.generalbot.com", @@ -21,17 +21,18 @@ "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-prompts": "^4.0.0-preview1.2", "chrono-node": "^1.3.5", - "dotenv-extended": "^2.2.0", + "dotenv-extended": "^2.3.0", "iconv-lite": "^0.4.24", + "ms": "^2.1.1", "pragmatismo-io-framework": "^1.0.15", "reflect-metadata": "^0.1.12", - "sequelize": "^4.38.0", + "sequelize": "^4.38.1", "sequelize-typescript": "^0.6.6", "wait-until": "^0.0.2", - "winston": "^3.0.0" + "winston": "^3.1.0" }, "devDependencies": { "@types/chai": "^4.1.4", diff --git a/src/IGBAdminService.ts b/src/IGBAdminService.ts new file mode 100644 index 0000000..ebfc834 --- /dev/null +++ b/src/IGBAdminService.ts @@ -0,0 +1,38 @@ +/*****************************************************************************\ +| ( )_ _ | +| _ _ _ __ _ _ __ ___ ___ _ _ | ,_)(_) ___ ___ _ | +| ( '_`\ ( '__)/'_` ) /'_ `\/' _ ` _ `\ /'_` )| | | |/',__)/' _ `\ /'_`\ | +| | (_) )| | ( (_| |( (_) || ( ) ( ) |( (_| || |_ | |\__, \| ( ) |( (_) ) | +| | ,__/'(_) `\__,_)`\__ |(_) (_) (_)`\__,_)`\__)(_)(____/(_) (_)`\___/' | +| | | ( )_) | | +| (_) \___/' | +| | +| General Bots Copyright (c) Pragmatismo.io. All rights reserved. | +| Licensed under the AGPL-3.0. | +| | +| According to our dual licensing model, this program can be used either | +| under the terms of the GNU Affero General Public License, version 3, | +| or under a proprietary license. | +| | +| The texts of the GNU Affero General Public License with an additional | +| permission and of our proprietary license can be found at and | +| in the LICENSE file you have received along with this program. | +| | +| This program is distributed in the hope that it will be useful, | +| but WITHOUT ANY WARRANTY, without even the implied warranty of | +| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | +| GNU Affero General Public License for more details. | +| | +| "General Bots" is a registered trademark of Pragmatismo.io. | +| The licensing of the program under the AGPLv3 does not imply a | +| trademark license. Therefore any rights, title and interest in | +| our trademarks remain entirely with us. | +| | +\*****************************************************************************/ + +"use strict" + +export interface IGBAdminService { + putValue(key: string, value: string); + getValue(key: string) +} \ No newline at end of file diff --git a/src/IGBCoreService.ts b/src/IGBCoreService.ts index 71ef805..d6260a0 100644 --- a/src/IGBCoreService.ts +++ b/src/IGBCoreService.ts @@ -34,6 +34,7 @@ import { Sequelize } from "sequelize-typescript" import { IGBInstance } from "./IGBInstance" +import { IGBAdminService } from "./IGBAdminService"; /** * This interface defines the core service which is shared among @@ -41,6 +42,7 @@ import { IGBInstance } from "./IGBInstance" */ export interface IGBCoreService { sequelize: Sequelize + adminService: IGBAdminService initDatabase() syncDatabaseStructure() loadInstances(): IGBInstance[] diff --git a/src/IGBInstance.ts b/src/IGBInstance.ts index 31a6eb4..b1f46d2 100644 --- a/src/IGBInstance.ts +++ b/src/IGBInstance.ts @@ -37,7 +37,6 @@ export interface IGBInstance { whoAmIVideo: string applicationPrincipal: string authenticatorTenant: string - authenticatorsignUpSignInPolicy: string authenticatorClientID: string instanceId: number title: string @@ -55,6 +54,9 @@ export interface IGBInstance { whatsappServiceNumber: string whatsappServiceUrl: string whatsappServiceWebhookUrl: string + smsKey: string + smsSecret: string + smsServiceNumber: string theme: string ui: string kb: string