hgs-twilio-class-lib 1.1.73 → 1.1.74

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.
Files changed (52) hide show
  1. package/README.md +5 -5
  2. package/lib/config/DatabaseConfig.d.ts +2 -29
  3. package/lib/config/DatabaseConfig.js +31 -29
  4. package/lib/controller/RealTimeDashboardController.d.ts +39 -0
  5. package/lib/controller/RealTimeDashboardController.js +267 -0
  6. package/lib/controller/twilio/AgentActionsController.js +5 -5
  7. package/lib/controller/twilio/AgentScorecardController.js +4 -4
  8. package/lib/controller/twilio/AuditLogController.js +1 -1
  9. package/lib/controller/twilio/CallLogsController.js +5 -5
  10. package/lib/controller/twilio/CallbackAndVoicemailController.js +5 -5
  11. package/lib/controller/twilio/ChannelSettingTaskInfoController.js +5 -5
  12. package/lib/controller/twilio/ChannelSettingsController.js +1 -1
  13. package/lib/controller/twilio/CxConfigAssetController.js +5 -5
  14. package/lib/controller/twilio/CxConfigController.js +1 -1
  15. package/lib/controller/twilio/CxConfigExternalNumbersController.js +5 -5
  16. package/lib/controller/twilio/CxConfigOther.js +5 -5
  17. package/lib/controller/twilio/CxConfigQueueMenuController.js +5 -5
  18. package/lib/controller/twilio/CxConfigUIconfigController.js +5 -5
  19. package/lib/controller/twilio/GPMController.js +5 -5
  20. package/lib/controller/twilio/HoopHolidaysController.js +5 -5
  21. package/lib/controller/twilio/HoopMainController.js +3 -3
  22. package/lib/controller/twilio/HoopNotesController.js +5 -5
  23. package/lib/controller/twilio/HoopOperationsController.js +5 -5
  24. package/lib/controller/twilio/HoopOverrideBranchesController.js +5 -5
  25. package/lib/controller/twilio/HoopPartialDaysController.js +5 -5
  26. package/lib/controller/twilio/HoopProfilesListController.js +5 -5
  27. package/lib/controller/twilio/NavigationController.js +5 -5
  28. package/lib/controller/twilio/QualityFormsController.js +5 -5
  29. package/lib/controller/twilio/QuickLinkController.js +4 -4
  30. package/lib/controller/twilio/RealTimeReportQueueDetailsController.js +1 -1
  31. package/lib/controller/twilio/RealTimeReportsWGDetailsController.js +4 -4
  32. package/lib/controller/twilio/TaskInfoPanelController.js +1 -1
  33. package/lib/models/impl/DailySummaryModel.d.ts +60 -0
  34. package/lib/models/impl/DailySummaryModel.js +247 -0
  35. package/lib/models/impl/IntervalSummaryModel.d.ts +63 -0
  36. package/lib/models/impl/IntervalSummaryModel.js +261 -0
  37. package/lib/models/index.d.ts +2 -0
  38. package/lib/models/index.js +5 -1
  39. package/lib/models/types/RealtimeSyncMapDetails.type.d.ts +6 -0
  40. package/lib/models/types/RealtimeSyncMapDetails.type.js +7 -0
  41. package/lib/server.js +2 -0
  42. package/lib/twilio/impl/sync/SyncMap.js +11 -69
  43. package/lib/twilio/impl/sync/SyncMapItem.d.ts +24 -4
  44. package/lib/twilio/impl/sync/SyncMapItem.js +134 -2
  45. package/lib/twilio/impl/sync/SyncMapItemsTransaction.d.ts +22 -0
  46. package/lib/twilio/impl/sync/SyncMapItemsTransaction.js +38 -0
  47. package/lib/twilio/impl/sync/SyncMapTransaction.js +2 -2
  48. package/lib/twilio/impl/sync/SyncResource.d.ts +1 -0
  49. package/lib/twilio/impl/sync/SyncResource.js +7 -0
  50. package/lib/twilio/impl/sync/SyncServiceFactory.d.ts +1 -1
  51. package/lib/twilio/impl/sync/SyncServiceFactory.js +1 -2
  52. package/package.json +56 -56
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SyncMapItemTransaction = void 0;
4
+ const ServiceTransaction_1 = require("../../abstract/ServiceTransaction");
5
+ const SyncMapItem_1 = require("./SyncMapItem");
6
+ const SyncServiceFactory_1 = require("./SyncServiceFactory");
7
+ class SyncMapItemTransaction extends ServiceTransaction_1.ServiceTransaction {
8
+ constructor(db, mode, error, objectStoreNames, durability) {
9
+ super(db, mode, error, objectStoreNames, durability);
10
+ this.onabort = null;
11
+ this.oncomplete = null;
12
+ this.onerror = null;
13
+ }
14
+ static get syncMapInstance() {
15
+ return SyncMapItemTransaction._syncMapInstance;
16
+ }
17
+ abort() {
18
+ throw new Error("Method not implemented.");
19
+ }
20
+ commit() {
21
+ throw new Error("Method not implemented.");
22
+ }
23
+ objectStore(name) {
24
+ SyncMapItemTransaction._syncMapInstance = SyncServiceFactory_1.SyncServiceFactory.syncServiceInstance.syncMaps(name);
25
+ console.log('map try ', SyncMapItemTransaction._syncMapInstance);
26
+ return new SyncMapItem_1.SyncMapItem(name, this); // need to explore how to get the database transaction , which holds the connection
27
+ }
28
+ addEventListener(type, listener, options) {
29
+ throw new Error("Method not implemented.");
30
+ }
31
+ removeEventListener(type, listener, options) {
32
+ throw new Error("Method not implemented.");
33
+ }
34
+ dispatchEvent(event) {
35
+ throw new Error("Method not implemented.");
36
+ }
37
+ }
38
+ exports.SyncMapItemTransaction = SyncMapItemTransaction;
@@ -21,8 +21,8 @@ class SyncMapTransaction extends ServiceTransaction_1.ServiceTransaction {
21
21
  throw new Error("Method not implemented.");
22
22
  }
23
23
  objectStore(name) {
24
- SyncMapTransaction._syncMapInstance = SyncServiceFactory_1.SyncServiceFactory.syncServiceInstance.syncMaps(name);
25
- console.log('map try ', SyncMapTransaction._syncMapInstance);
24
+ SyncMapTransaction._syncMapInstance = SyncServiceFactory_1.SyncServiceFactory.syncServiceInstance;
25
+ console.log('map try in sync map', SyncMapTransaction._syncMapInstance);
26
26
  return new SyncMap_1.SyncMap(name, this); // need to explore how to get the database transaction , which holds the connection
27
27
  }
28
28
  addEventListener(type, listener, options) {
@@ -40,6 +40,7 @@ export declare class SyncResource extends ServiceResource {
40
40
  transaction(storeNames: string | string[], mode?: IDBTransactionMode | undefined, options?: ISyncTransactionOptions | undefined): IServiceTransaction;
41
41
  transaction(storeNames: string | Iterable<string>, mode?: IDBTransactionMode | undefined, options?: ISyncTransactionOptions | undefined): IServiceTransaction;
42
42
  transaction(storeNames: unknown, mode?: unknown, options?: unknown): IServiceTransaction;
43
+ transactionItem(storeNames: unknown, mode?: unknown, options?: unknown): IServiceTransaction;
43
44
  addEventListener<K extends keyof IDBDatabaseEventMap>(type: K, listener: (this: IServiceResource, ev: IDBDatabaseEventMap[K]) => any, options?: boolean | AddEventListenerOptions | undefined): void;
44
45
  addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions | undefined): void;
45
46
  addEventListener(type: unknown, listener: unknown, options?: unknown): void;
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SyncResource = void 0;
4
4
  const ServiceResource_1 = require("../../abstract/ServiceResource");
5
+ const SyncMapItemsTransaction_1 = require("./SyncMapItemsTransaction");
5
6
  const SyncMapTransaction_1 = require("./SyncMapTransaction");
6
7
  const SyncServiceFactory_1 = require("./SyncServiceFactory");
7
8
  class SyncResource extends ServiceResource_1.ServiceResource {
@@ -84,6 +85,12 @@ class SyncResource extends ServiceResource_1.ServiceResource {
84
85
  SyncResource._syncResourceInstance = SyncServiceFactory_1.SyncServiceFactory.syncServiceInstance;
85
86
  return new SyncMapTransaction_1.SyncMapTransaction(SyncServiceFactory_1.SyncServiceFactory.syncServiceInstance, mode);
86
87
  }
88
+ transactionItem(storeNames, mode, options) {
89
+ //Not setting the storenames - need to be checked
90
+ //
91
+ SyncResource._syncResourceInstance = SyncServiceFactory_1.SyncServiceFactory.syncServiceInstance;
92
+ return new SyncMapItemsTransaction_1.SyncMapItemTransaction(SyncServiceFactory_1.SyncServiceFactory.syncServiceInstance, mode);
93
+ }
87
94
  addEventListener(type, listener, options) {
88
95
  throw new Error("Method not implemented.");
89
96
  }
@@ -10,7 +10,7 @@ export declare class SyncServiceFactory extends ServiceResourceFactory {
10
10
  constructor(twilioClient: TwilioClient);
11
11
  static get syncServiceInstance(): any;
12
12
  open(name: string, version: number): IServiceDBOpenRequest;
13
- asyncOpen(name: string, version: number): Promise<IServiceDBOpenRequest>;
13
+ asyncOpen(name: string, version?: number): Promise<IServiceDBOpenRequest>;
14
14
  deleteDatabase(name: string): IServiceDBOpenRequest;
15
15
  databases(name?: string): Promise<IServiceResource[]>;
16
16
  create(database: IDatabase): Promise<IServiceRequest<IDatabase>>;
@@ -79,10 +79,9 @@ class SyncServiceFactory extends ServiceResourceFactory_1.ServiceResourceFactory
79
79
  }
80
80
  checkDatabaseExists(name, version) {
81
81
  return __awaiter(this, void 0, void 0, function* () {
82
- console.log('database and version ', `${name}-${version}`);
83
82
  let syncServices = yield this.databases();
84
83
  const existingSyncService = syncServices.filter((syncResource) => {
85
- return syncResource.friendlyName === `${name}-${version}`;
84
+ return version ? syncResource.friendlyName === `${name}-${version}` : syncResource.friendlyName === `${name}`;
86
85
  });
87
86
  return existingSyncService;
88
87
  });
package/package.json CHANGED
@@ -1,56 +1,56 @@
1
- {
2
- "name": "hgs-twilio-class-lib",
3
- "version": "1.1.73",
4
- "description": "Flex 2.0 backend to connect with any database ",
5
- "main": "./lib/index.js",
6
- "types": "./types/index.d.ts",
7
- "type": "commonjs",
8
- "files": [
9
- "lib",
10
- "types",
11
- "package.json"
12
- ],
13
- "publishConfig": {
14
- "directory": "lib"
15
- },
16
- "scripts": {
17
- "clean": "rimraf lib types",
18
- "build": "npm run clean && tsc",
19
- "start": "node lib/server.js",
20
- "dev": "nodemon server.ts",
21
- "test": "echo \"Error: no test specified\" && exit 1",
22
- "check:unused": "ts-prune"
23
- },
24
- "author": "HGS",
25
- "license": "",
26
- "devDependencies": {
27
- "@rollup/plugin-commonjs": "^28.0.3",
28
- "@rollup/plugin-node-resolve": "^16.0.1",
29
- "@rollup/plugin-typescript": "^12.1.2",
30
- "@types/express": "4.17.21",
31
- "@types/node": "20.11.17",
32
- "@types/uuid": "9.0.8",
33
- "esbuild": "^0.25.4",
34
- "express": "^4.18.2",
35
- "fast-glob": "^3.3.3",
36
- "nodemon": "^3.1.0",
37
- "rimraf": "^6.0.1",
38
- "rollup": "^2.79.2",
39
- "rollup-plugin-terser": "^7.0.2",
40
- "rollup-plugin-visualizer": "^5.14.0",
41
- "ts-loader": "9.5.1",
42
- "ts-node": "^10.9.2",
43
- "typescript": "5.3.3"
44
- },
45
- "dependencies": {
46
- "@aws-sdk/client-connect": "3.723.0",
47
- "cors": "^2.8.5",
48
- "moment": "2.30.1",
49
- "moment-timezone": "^0.5.46",
50
- "twilio": "4.22.0",
51
- "uuid": "^9.0.1"
52
- },
53
- "engines": {
54
- "node": ">=18"
55
- }
56
- }
1
+ {
2
+ "name": "hgs-twilio-class-lib",
3
+ "version": "1.1.74",
4
+ "description": "Flex 2.0 backend to connect with any database ",
5
+ "main": "./lib/index.js",
6
+ "types": "./types/index.d.ts",
7
+ "type": "commonjs",
8
+ "files": [
9
+ "lib",
10
+ "types",
11
+ "package.json"
12
+ ],
13
+ "publishConfig": {
14
+ "directory": "lib"
15
+ },
16
+ "scripts": {
17
+ "clean": "rimraf lib types",
18
+ "build": "npm run clean && tsc",
19
+ "start": "node lib/server.js",
20
+ "dev": "nodemon server.ts",
21
+ "test": "echo \"Error: no test specified\" && exit 1",
22
+ "check:unused": "ts-prune"
23
+ },
24
+ "author": "HGS",
25
+ "license": "",
26
+ "devDependencies": {
27
+ "@rollup/plugin-commonjs": "^28.0.3",
28
+ "@rollup/plugin-node-resolve": "^16.0.1",
29
+ "@rollup/plugin-typescript": "^12.1.2",
30
+ "@types/express": "4.17.21",
31
+ "@types/node": "20.11.17",
32
+ "@types/uuid": "9.0.8",
33
+ "esbuild": "^0.25.4",
34
+ "express": "^4.18.2",
35
+ "fast-glob": "^3.3.3",
36
+ "nodemon": "^3.1.0",
37
+ "rimraf": "^6.0.1",
38
+ "rollup": "^2.79.2",
39
+ "rollup-plugin-terser": "^7.0.2",
40
+ "rollup-plugin-visualizer": "^5.14.0",
41
+ "ts-loader": "9.5.1",
42
+ "ts-node": "^10.9.2",
43
+ "typescript": "5.3.3"
44
+ },
45
+ "dependencies": {
46
+ "@aws-sdk/client-connect": "3.723.0",
47
+ "cors": "^2.8.5",
48
+ "moment": "2.30.1",
49
+ "moment-timezone": "^0.5.46",
50
+ "twilio": "4.22.0",
51
+ "uuid": "^9.0.1"
52
+ },
53
+ "engines": {
54
+ "node": ">=18"
55
+ }
56
+ }