hgs-twilio-class-lib 1.1.79 → 1.1.81
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.
|
@@ -10,6 +10,7 @@ export declare class RealTimeDashboardController {
|
|
|
10
10
|
addMap(reqBody: {
|
|
11
11
|
syncMapName: string;
|
|
12
12
|
Id: string;
|
|
13
|
+
ttl: number;
|
|
13
14
|
}): Promise<any>;
|
|
14
15
|
getAllMaps(query: SearchParameterType & {
|
|
15
16
|
syncServiceName: string;
|
|
@@ -22,6 +23,7 @@ export declare class RealTimeDashboardController {
|
|
|
22
23
|
}): Promise<any>;
|
|
23
24
|
addItem(reqBody: {
|
|
24
25
|
syncMapName: string;
|
|
26
|
+
ttl: number;
|
|
25
27
|
data: RealtimeDashboardSummaryModel;
|
|
26
28
|
}): Promise<any>;
|
|
27
29
|
getItem(query: Pick<RealtimeDashboardSummaryModel, "id"> & {
|
|
@@ -39,13 +39,13 @@ class RealTimeDashboardController {
|
|
|
39
39
|
addMap(reqBody) {
|
|
40
40
|
return __awaiter(this, void 0, void 0, function* () {
|
|
41
41
|
try {
|
|
42
|
-
const { syncMapName, Id } = reqBody;
|
|
42
|
+
const { syncMapName, Id, ttl } = reqBody;
|
|
43
43
|
if (!syncMapName) {
|
|
44
44
|
throw new Error("uniqueName is required.");
|
|
45
45
|
}
|
|
46
46
|
const dbTransaction = yield this.getsyncTransaction(syncMapName);
|
|
47
47
|
const table = dbTransaction.objectStore(syncMapName);
|
|
48
|
-
return table.add(syncMapName, Id,
|
|
48
|
+
return table.add(syncMapName, Id, ttl);
|
|
49
49
|
}
|
|
50
50
|
catch (error) {
|
|
51
51
|
console.error("Error adding real-time dashboard Map:", error);
|
|
@@ -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) {
|