hgs-twilio-class-lib 1.1.77 → 1.1.78

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,9 @@
1
+ import { SyncServiceFactory } from "../twilio/impl/sync/SyncServiceFactory";
1
2
  import { SearchParameterType } from "../common/type/SearchParameterType";
2
3
  import { IntervalSummaryModel } from "../models/impl/IntervalSummaryModel";
3
4
  export declare class RealTimeDashboardController {
4
5
  private _dbFactory;
5
- constructor();
6
+ constructor(dbFactory: SyncServiceFactory);
6
7
  private getDatabaseConnection;
7
8
  private getItemTransaction;
8
9
  private getsyncTransaction;
@@ -10,19 +10,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.RealTimeDashboardController = void 0;
13
- const DatabaseFactoryCollection_1 = require("./DatabaseFactoryCollection");
14
- const TwilioAuthTokenConfig_1 = require("../twilio/impl/TwilioAuthTokenConfig");
15
- const TwilioClient_1 = require("../twilio/impl/TwilioClient");
16
- const SyncServiceFactory_1 = require("../twilio/impl/sync/SyncServiceFactory");
17
- const TwilioConfig_1 = require("../config/TwilioConfig");
18
13
  const DatabaseConfig_1 = require("../config/DatabaseConfig");
19
14
  const IntervalSummaryModel_1 = require("../models/impl/IntervalSummaryModel");
20
15
  class RealTimeDashboardController {
21
- constructor() {
22
- let twilConfig = new TwilioAuthTokenConfig_1.TwilioAuthTokenConfig(TwilioConfig_1.TwilioConfig.accountSid, TwilioConfig_1.TwilioConfig.authToken);
23
- let twilioClient = new TwilioClient_1.TwilioClient(twilConfig);
24
- this._dbFactory = new SyncServiceFactory_1.SyncServiceFactory(twilioClient);
25
- DatabaseFactoryCollection_1.DatabaseFactoryCollection.setdatabaseFactoryCollection("Twilio", this._dbFactory);
16
+ constructor(dbFactory) {
17
+ this._dbFactory = dbFactory;
26
18
  }
27
19
  getDatabaseConnection() {
28
20
  return __awaiter(this, void 0, void 0, function* () {
package/lib/server.js CHANGED
@@ -5,7 +5,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const express_1 = __importDefault(require("express"));
7
7
  const MainController_1 = require("./controller/MainController");
8
- const RealTimeDashboardController_1 = require("./controller/RealTimeDashboardController");
9
8
  var cors = require('cors');
10
9
  const app = (0, express_1.default)();
11
10
  const PORT = 3010;
@@ -33,7 +32,7 @@ app.use(cors());
33
32
  Do not remove Below code
34
33
  */
35
34
  // app.use(validateRequiredCommonParams, validateRequiredParams)
36
- app.use('/realtime', (req, res) => new RealTimeDashboardController_1.RealTimeDashboardController().routeHandler(req, res));
35
+ // app.use('/realtime', (req, res) => new RealTimeDashboardController().routeHandler(req, res));
37
36
  app.use('/', (req, res, next) => new MainController_1.MainController().routeHandler(req, res));
38
37
  // Start the server
39
38
  app.listen(PORT, () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hgs-twilio-class-lib",
3
- "version": "1.1.77",
3
+ "version": "1.1.78",
4
4
  "description": "Flex 2.0 backend to connect with any database ",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./types/index.d.ts",