hgs-twilio-class-lib 1.1.80 → 1.1.82

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.
@@ -23,6 +23,7 @@ export declare class RealTimeDashboardController {
23
23
  }): Promise<any>;
24
24
  addItem(reqBody: {
25
25
  syncMapName: string;
26
+ ttl: number;
26
27
  data: RealtimeDashboardSummaryModel;
27
28
  }): Promise<any>;
28
29
  getItem(query: Pick<RealtimeDashboardSummaryModel, "id"> & {
@@ -118,7 +118,7 @@ class RealTimeDashboardController {
118
118
  addItem(reqBody) {
119
119
  return __awaiter(this, void 0, void 0, function* () {
120
120
  try {
121
- const { syncMapName, data } = reqBody;
121
+ const { syncMapName, data, ttl } = reqBody;
122
122
  if (!syncMapName) {
123
123
  throw new Error("syncMapName is required.");
124
124
  }
@@ -128,7 +128,7 @@ class RealTimeDashboardController {
128
128
  }
129
129
  const dbTransaction = yield this.getItemTransaction(syncMapName);
130
130
  const table = dbTransaction.objectStore(syncMapName);
131
- const result = yield table.add(queuedetails.serialize, queuedetails.id);
131
+ const result = yield table.add(queuedetails.serialize, queuedetails.id, ttl);
132
132
  return result;
133
133
  }
134
134
  catch (error) {
@@ -9,7 +9,7 @@ class SyncMap extends ServiceObjectStore_1.ServiceObjectStore {
9
9
  super(name, transaction, autoIncrement, indexNames, keyPath);
10
10
  }
11
11
  getMap() {
12
- return SyncMapTransaction_1.SyncMapTransaction.syncMapInstance.fetch().then((map) => {
12
+ return SyncMapTransaction_1.SyncMapTransaction.syncMapInstance.syncMap.fetch().then((map) => {
13
13
  return map;
14
14
  });
15
15
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hgs-twilio-class-lib",
3
- "version": "1.1.80",
3
+ "version": "1.1.82",
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",