@intuitionrobotics/push-pub-sub 0.45.1 → 0.46.0
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.
- package/app-backend/api/_push.js +2 -2
- package/app-backend/api/_push.js.map +1 -1
- package/app-backend/api/v1/push/read.js +4 -4
- package/app-backend/api/v1/push/read.js.map +1 -1
- package/app-backend/api/v1/push/register.js +4 -5
- package/app-backend/api/v1/push/register.js.map +1 -1
- package/app-backend/core/module-pack.d.ts +0 -3
- package/app-backend/core/module-pack.js +0 -31
- package/app-backend/core/module-pack.js.map +1 -1
- package/app-backend/modules/PushKey.d.ts +2 -2
- package/app-backend/modules/PushKey.js +0 -18
- package/app-backend/modules/PushKey.js.map +1 -1
- package/app-backend/modules/PushPubSubModule.d.ts +5 -4
- package/app-backend/modules/PushPubSubModule.js +33 -43
- package/app-backend/modules/PushPubSubModule.js.map +1 -1
- package/app-backend/modules/ScheduledPushCleanup.d.ts +1 -1
- package/app-backend/modules/ScheduledPushCleanup.js +2 -20
- package/app-backend/modules/ScheduledPushCleanup.js.map +1 -1
- package/app-backend/modules/{_imports.d.ts → consts.d.ts} +0 -1
- package/app-backend/modules/consts.js +6 -0
- package/app-backend/modules/consts.js.map +1 -0
- package/app-frontend/core/module-pack.d.ts +1 -3
- package/app-frontend/core/module-pack.js +2 -32
- package/app-frontend/core/module-pack.js.map +1 -1
- package/app-frontend/modules/NotificationModule.d.ts +2 -2
- package/app-frontend/modules/NotificationModule.js +10 -8
- package/app-frontend/modules/NotificationModule.js.map +1 -1
- package/app-frontend/modules/PushPubSubModule.d.ts +2 -2
- package/app-frontend/modules/PushPubSubModule.js +24 -34
- package/app-frontend/modules/PushPubSubModule.js.map +1 -1
- package/index.d.ts +0 -2
- package/index.js +0 -13
- package/index.js.map +1 -1
- package/package.json +5 -5
- package/shared/api.d.ts +1 -1
- package/shared/types.d.ts +1 -1
- package/app-backend/modules/_imports.js +0 -17
- package/app-backend/modules/_imports.js.map +0 -1
- package/backend.d.ts +0 -1
- package/backend.js +0 -14
- package/backend.js.map +0 -1
- package/frontend.d.ts +0 -3
- package/frontend.js +0 -16
- package/frontend.js.map +0 -1
package/app-backend/api/_push.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const
|
|
4
|
-
module.exports = new
|
|
3
|
+
const HttpServer_1 = require("@intuitionrobotics/thunderstorm/app-backend/modules/server/HttpServer");
|
|
4
|
+
module.exports = new HttpServer_1.RouteResolver(require, __dirname);
|
|
5
5
|
//# sourceMappingURL=_push.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_push.js","sourceRoot":"","sources":["../../../src/main/app-backend/api/_push.ts"],"names":[],"mappings":";;AAAA,
|
|
1
|
+
{"version":3,"file":"_push.js","sourceRoot":"","sources":["../../../src/main/app-backend/api/_push.ts"],"names":[],"mappings":";;AAAA,sGAAoG;AAEpG,MAAM,CAAC,OAAO,GAAG,IAAI,0BAAa,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC"}
|
|
@@ -9,12 +9,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
const backend_1 = require("@intuitionrobotics/thunderstorm/backend");
|
|
13
|
-
const thunderstorm_1 = require("@intuitionrobotics/thunderstorm");
|
|
14
12
|
const PushPubSubModule_1 = require("../../../modules/PushPubSubModule");
|
|
15
|
-
|
|
13
|
+
const server_api_1 = require("@intuitionrobotics/thunderstorm/app-backend/modules/server/server-api");
|
|
14
|
+
const types_1 = require("@intuitionrobotics/thunderstorm/shared/types");
|
|
15
|
+
class ServerApi_PushRead extends server_api_1.ServerApi {
|
|
16
16
|
constructor() {
|
|
17
|
-
super(
|
|
17
|
+
super(types_1.HttpMethod.POST, "read");
|
|
18
18
|
}
|
|
19
19
|
process(request, response, queryParams, body) {
|
|
20
20
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"read.js","sourceRoot":"","sources":["../../../../../src/main/app-backend/api/v1/push/read.ts"],"names":[],"mappings":";;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"read.js","sourceRoot":"","sources":["../../../../../src/main/app-backend/api/v1/push/read.ts"],"names":[],"mappings":";;;;;;;;;;;AACA,wEAAmE;AACnE,sGAA6G;AAC7G,wEAAwE;AAIxE,MAAM,kBACF,SAAQ,sBAAiC;IAEzC;QACI,KAAK,CAAC,kBAAU,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IACnC,CAAC;IAEe,OAAO,CAAC,OAAuB,EAAE,QAAqB,EAAE,WAAe,EAAE,IAAsB;;YAC3G,4DAA4D;YAC5D,OAAO,MAAM,mCAAgB,CAAC,gBAAgB,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;QACxE,CAAC;KAAA;CACJ;AAED,MAAM,CAAC,OAAO,GAAG,IAAI,kBAAkB,EAAE,CAAC"}
|
|
@@ -9,16 +9,15 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
const backend_1 = require("@intuitionrobotics/thunderstorm/backend");
|
|
13
|
-
const thunderstorm_1 = require("@intuitionrobotics/thunderstorm");
|
|
14
12
|
const PushPubSubModule_1 = require("../../../modules/PushPubSubModule");
|
|
15
|
-
|
|
13
|
+
const server_api_1 = require("@intuitionrobotics/thunderstorm/app-backend/modules/server/server-api");
|
|
14
|
+
const types_1 = require("@intuitionrobotics/thunderstorm/shared/types");
|
|
15
|
+
class ServerApi_PushRegister extends server_api_1.ServerApi {
|
|
16
16
|
constructor() {
|
|
17
|
-
super(
|
|
17
|
+
super(types_1.HttpMethod.POST, "register");
|
|
18
18
|
}
|
|
19
19
|
process(request, response, queryParams, body) {
|
|
20
20
|
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
-
// const user = await KasperoProxy.validateSession(request);
|
|
22
21
|
return yield PushPubSubModule_1.PushPubSubModule.register(body, request);
|
|
23
22
|
});
|
|
24
23
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"register.js","sourceRoot":"","sources":["../../../../../src/main/app-backend/api/v1/push/register.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"register.js","sourceRoot":"","sources":["../../../../../src/main/app-backend/api/v1/push/register.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,wEAAmE;AACnE,sGAA6G;AAC7G,wEAAwE;AAMxE,MAAM,sBACF,SAAQ,sBAA+B;IAEvC;QACI,KAAK,CAAC,kBAAU,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;IACvC,CAAC;IAEe,OAAO,CAAC,OAAuB,EAAE,QAAqB,EAAE,WAAe,EAAE,IAA0B;;YAC/G,OAAO,MAAM,mCAAgB,CAAC,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAC1D,CAAC;KAAA;CACJ;AAED,MAAM,CAAC,OAAO,GAAG,IAAI,sBAAsB,EAAE,CAAC"}
|
|
@@ -1,4 +1 @@
|
|
|
1
1
|
export declare const Backend_ModulePack_PushPubSub: (import("../modules/PushPubSubModule").PushPubSubModule_Class | import("../modules/ScheduledPushCleanup").ScheduledCleanup_Class)[];
|
|
2
|
-
export * from "../modules/PushPubSubModule";
|
|
3
|
-
export * from "../modules/ScheduledPushCleanup";
|
|
4
|
-
export * from "../modules/PushKey";
|
|
@@ -1,32 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Permissions management system, define access level for each of
|
|
4
|
-
* your server apis, and restrict users by giving them access levels
|
|
5
|
-
*
|
|
6
|
-
* Copyright (C) 2020 Intuition Robotics
|
|
7
|
-
*
|
|
8
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
9
|
-
* you may not use this file except in compliance with the License.
|
|
10
|
-
* You may obtain a copy of the License at
|
|
11
|
-
*
|
|
12
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
13
|
-
*
|
|
14
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
15
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
16
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17
|
-
* See the License for the specific language governing permissions and
|
|
18
|
-
* limitations under the License.
|
|
19
|
-
*/
|
|
20
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
21
|
-
if (k2 === undefined) k2 = k;
|
|
22
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
23
|
-
}) : (function(o, m, k, k2) {
|
|
24
|
-
if (k2 === undefined) k2 = k;
|
|
25
|
-
o[k2] = m[k];
|
|
26
|
-
}));
|
|
27
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
28
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
29
|
-
};
|
|
30
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31
3
|
exports.Backend_ModulePack_PushPubSub = void 0;
|
|
32
4
|
const PushPubSubModule_1 = require("../modules/PushPubSubModule");
|
|
@@ -35,7 +7,4 @@ exports.Backend_ModulePack_PushPubSub = [
|
|
|
35
7
|
PushPubSubModule_1.PushPubSubModule,
|
|
36
8
|
ScheduledPushCleanup_1.ScheduledCleanup
|
|
37
9
|
];
|
|
38
|
-
__exportStar(require("../modules/PushPubSubModule"), exports);
|
|
39
|
-
__exportStar(require("../modules/ScheduledPushCleanup"), exports);
|
|
40
|
-
__exportStar(require("../modules/PushKey"), exports);
|
|
41
10
|
//# sourceMappingURL=module-pack.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module-pack.js","sourceRoot":"","sources":["../../../src/main/app-backend/core/module-pack.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"module-pack.js","sourceRoot":"","sources":["../../../src/main/app-backend/core/module-pack.ts"],"names":[],"mappings":";;;AAAA,kEAA6D;AAC7D,0EAAiE;AAEpD,QAAA,6BAA6B,GAAG;IACzC,mCAAgB;IAChB,uCAAgB;CACnB,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { SubscribeProps } from "../../shared/types";
|
|
2
|
+
import { ObjectTS } from "@intuitionrobotics/ts-common/utils/types";
|
|
3
3
|
export declare class PushKey<K extends string, P extends SubscribeProps, D extends ObjectTS> {
|
|
4
4
|
private readonly key;
|
|
5
5
|
private readonly persist;
|
|
@@ -1,22 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Permissions management system, define access level for each of
|
|
4
|
-
* your server apis, and restrict users by giving them access levels
|
|
5
|
-
*
|
|
6
|
-
* Copyright (C) 2020 Intuition Robotics
|
|
7
|
-
*
|
|
8
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
9
|
-
* you may not use this file except in compliance with the License.
|
|
10
|
-
* You may obtain a copy of the License at
|
|
11
|
-
*
|
|
12
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
13
|
-
*
|
|
14
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
15
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
16
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17
|
-
* See the License for the specific language governing permissions and
|
|
18
|
-
* limitations under the License.
|
|
19
|
-
*/
|
|
20
2
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
21
3
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
22
4
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PushKey.js","sourceRoot":"","sources":["../../../src/main/app-backend/modules/PushKey.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PushKey.js","sourceRoot":"","sources":["../../../src/main/app-backend/modules/PushKey.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAAoD;AAIpD,MAAa,OAAO;IAKhB,YAAY,GAAM,EAAE,OAAO,GAAG,KAAK;QAC/B,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IAC3B,CAAC;IAEK,IAAI,CAAC,IAAO,EAAE,KAAS;;YACzB,OAAO,mCAAgB,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;QAC3E,CAAC;KAAA;IAAA,CAAC;CACL;AAbD,0BAaC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { DB_Notifications, IFP, ISP, ITP, MessageType, Request_PushRegister, SubscribeProps } from "../../shared/types";
|
|
2
|
+
import { Module } from "@intuitionrobotics/ts-common/core/module";
|
|
3
|
+
import { ExpressRequest } from "@intuitionrobotics/thunderstorm/app-backend/utils/types";
|
|
4
|
+
import { FirestoreTransaction } from "@intuitionrobotics/firebase/app-backend/firestore/FirestoreTransaction";
|
|
5
|
+
import { FirebaseType_BatchResponse, FirebaseType_Message } from "@intuitionrobotics/firebase/app-backend/push/types";
|
|
5
6
|
declare type Config = {
|
|
6
7
|
notificationsCleanupTime?: number;
|
|
7
8
|
sessionsCleanupTime?: number;
|
|
@@ -1,22 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Permissions management system, define access level for each of
|
|
4
|
-
* your server apis, and restrict users by giving them access levels
|
|
5
|
-
*
|
|
6
|
-
* Copyright (C) 2020 Intuition Robotics
|
|
7
|
-
*
|
|
8
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
9
|
-
* you may not use this file except in compliance with the License.
|
|
10
|
-
* You may obtain a copy of the License at
|
|
11
|
-
*
|
|
12
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
13
|
-
*
|
|
14
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
15
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
16
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17
|
-
* See the License for the specific language governing permissions and
|
|
18
|
-
* limitations under the License.
|
|
19
|
-
*/
|
|
20
2
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
21
3
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
22
4
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -28,16 +10,21 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
28
10
|
};
|
|
29
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
12
|
exports.PushPubSubModule = exports.PushPubSubModule_Class = void 0;
|
|
31
|
-
const
|
|
32
|
-
const
|
|
33
|
-
const
|
|
34
|
-
|
|
13
|
+
const module_1 = require("@intuitionrobotics/ts-common/core/module");
|
|
14
|
+
const FirebaseModule_1 = require("@intuitionrobotics/firebase/app-backend/FirebaseModule");
|
|
15
|
+
const types_1 = require("@intuitionrobotics/thunderstorm/app-backend/utils/types");
|
|
16
|
+
const date_time_tools_1 = require("@intuitionrobotics/ts-common/utils/date-time-tools");
|
|
17
|
+
const array_tools_1 = require("@intuitionrobotics/ts-common/utils/array-tools");
|
|
18
|
+
const object_tools_1 = require("@intuitionrobotics/ts-common/utils/object-tools");
|
|
19
|
+
const random_tools_1 = require("@intuitionrobotics/ts-common/utils/random-tools");
|
|
20
|
+
const tools_1 = require("@intuitionrobotics/ts-common/utils/tools");
|
|
21
|
+
class PushPubSubModule_Class extends module_1.Module {
|
|
35
22
|
constructor() {
|
|
36
23
|
super("PushPubSubModule");
|
|
37
24
|
this.buildNotification = (pushkey, persistent, data, props, user) => {
|
|
38
25
|
const notification = {
|
|
39
|
-
_id:
|
|
40
|
-
timestamp:
|
|
26
|
+
_id: random_tools_1.generateHex(16),
|
|
27
|
+
timestamp: date_time_tools_1.currentTimeMillies(),
|
|
41
28
|
read: false,
|
|
42
29
|
pushKey: pushkey,
|
|
43
30
|
persistent
|
|
@@ -51,7 +38,10 @@ class PushPubSubModule_Class extends ts_common_1.Module {
|
|
|
51
38
|
return notification;
|
|
52
39
|
};
|
|
53
40
|
this.sendMessage = (persistent, _messages) => __awaiter(this, void 0, void 0, function* () {
|
|
54
|
-
const messages = Object.keys(_messages).map(token => ({
|
|
41
|
+
const messages = Object.keys(_messages).map(token => ({
|
|
42
|
+
token,
|
|
43
|
+
data: { messages: tools_1.__stringify(_messages[token]) }
|
|
44
|
+
}));
|
|
55
45
|
if (messages.length === 0)
|
|
56
46
|
return;
|
|
57
47
|
console.log("sending a message to \n" + Object.keys(_messages).join("\n"));
|
|
@@ -64,11 +54,11 @@ class PushPubSubModule_Class extends ts_common_1.Module {
|
|
|
64
54
|
});
|
|
65
55
|
this.scheduledCleanup = () => __awaiter(this, void 0, void 0, function* () {
|
|
66
56
|
var _a, _b;
|
|
67
|
-
const sessionsCleanupTime = ((_a = this.config) === null || _a === void 0 ? void 0 : _a.sessionsCleanupTime) ||
|
|
68
|
-
const notificationsCleanupTime = ((_b = this.config) === null || _b === void 0 ? void 0 : _b.notificationsCleanupTime) || 7 *
|
|
69
|
-
const docs = yield this.pushSessions.query({ where: { timestamp: { $lt:
|
|
57
|
+
const sessionsCleanupTime = ((_a = this.config) === null || _a === void 0 ? void 0 : _a.sessionsCleanupTime) || date_time_tools_1.Hour;
|
|
58
|
+
const notificationsCleanupTime = ((_b = this.config) === null || _b === void 0 ? void 0 : _b.notificationsCleanupTime) || 7 * date_time_tools_1.Day;
|
|
59
|
+
const docs = yield this.pushSessions.query({ where: { timestamp: { $lt: date_time_tools_1.currentTimeMillies() - sessionsCleanupTime } } });
|
|
70
60
|
yield Promise.all([
|
|
71
|
-
this.notifications.delete({ where: { timestamp: { $lt:
|
|
61
|
+
this.notifications.delete({ where: { timestamp: { $lt: date_time_tools_1.currentTimeMillies() - notificationsCleanupTime } } }),
|
|
72
62
|
this.cleanUpImpl(docs.map(d => d.firebaseToken))
|
|
73
63
|
]);
|
|
74
64
|
});
|
|
@@ -86,7 +76,7 @@ class PushPubSubModule_Class extends ts_common_1.Module {
|
|
|
86
76
|
});
|
|
87
77
|
}
|
|
88
78
|
init() {
|
|
89
|
-
const session =
|
|
79
|
+
const session = FirebaseModule_1.FirebaseModule.createAdminSession();
|
|
90
80
|
const firestore = session.getFirestore();
|
|
91
81
|
this.pushSessions = firestore.getCollection("push-sessions", ["pushSessionId"]);
|
|
92
82
|
this.pushKeys = firestore.getCollection("push-keys");
|
|
@@ -96,14 +86,14 @@ class PushPubSubModule_Class extends ts_common_1.Module {
|
|
|
96
86
|
register(body, request) {
|
|
97
87
|
var _a, _b, _c;
|
|
98
88
|
return __awaiter(this, void 0, void 0, function* () {
|
|
99
|
-
const resp = yield
|
|
89
|
+
const resp = yield types_1.dispatch_queryRequestInfo.dispatchModuleAsync([request]);
|
|
100
90
|
const userId = ((_b = (_a = resp.find(e => e.key === "AccountsModule")) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b._id) || ((_c = resp.find(e => e.key === "RemoteProxy")) === null || _c === void 0 ? void 0 : _c.data);
|
|
101
91
|
// if (!userId)
|
|
102
92
|
// throw new ImplementationMissingException("Missing user from accounts Module");
|
|
103
93
|
const session = {
|
|
104
94
|
firebaseToken: body.firebaseToken,
|
|
105
95
|
pushSessionId: body.pushSessionId,
|
|
106
|
-
timestamp:
|
|
96
|
+
timestamp: date_time_tools_1.currentTimeMillies()
|
|
107
97
|
};
|
|
108
98
|
if (userId)
|
|
109
99
|
session.userId = userId;
|
|
@@ -119,12 +109,12 @@ class PushPubSubModule_Class extends ts_common_1.Module {
|
|
|
119
109
|
return this.pushSessions.runInTransaction((transaction) => __awaiter(this, void 0, void 0, function* () {
|
|
120
110
|
const pushKeys = subscriptions.map(_sub => _sub.pushKey);
|
|
121
111
|
let subscriptionNotifications = pushKeys.length !== 0 ?
|
|
122
|
-
yield
|
|
112
|
+
yield array_tools_1.batchAction(pushKeys, 10, (elements) => __awaiter(this, void 0, void 0, function* () { return transaction.query(this.notifications, { where: { pushKey: { $in: elements } } }); })) : [];
|
|
123
113
|
if (subscriptionNotifications.length > 0)
|
|
124
114
|
subscriptionNotifications = subscriptionNotifications.filter(_notification => {
|
|
125
115
|
var _a;
|
|
126
116
|
const x = (_a = subscriptions.find(_sub => _sub.pushKey === _notification.pushKey)) === null || _a === void 0 ? void 0 : _a.props;
|
|
127
|
-
return
|
|
117
|
+
return object_tools_1.compare(x, _notification.props) || _notification.userId;
|
|
128
118
|
});
|
|
129
119
|
const userNotifications = userId ? yield transaction.query(this.notifications, { where: { userId } }) : [];
|
|
130
120
|
const notifications = userNotifications.concat(subscriptionNotifications);
|
|
@@ -132,7 +122,7 @@ class PushPubSubModule_Class extends ts_common_1.Module {
|
|
|
132
122
|
const write = yield transaction.delete_Read(this.pushKeys, { where: { pushSessionId: body.pushSessionId } });
|
|
133
123
|
yield transaction.insertAll(this.pushKeys, subscriptions);
|
|
134
124
|
yield Promise.all([write(), writePush()]);
|
|
135
|
-
return
|
|
125
|
+
return array_tools_1.filterDuplicates(notifications);
|
|
136
126
|
}));
|
|
137
127
|
});
|
|
138
128
|
}
|
|
@@ -142,7 +132,7 @@ class PushPubSubModule_Class extends ts_common_1.Module {
|
|
|
142
132
|
console.log("i am pushing to key...", key, props, data);
|
|
143
133
|
let docs = yield _transaction.query(this.pushKeys, { where: { pushKey: key } });
|
|
144
134
|
if (props)
|
|
145
|
-
docs = docs.filter(doc => !doc.props ||
|
|
135
|
+
docs = docs.filter(doc => !doc.props || object_tools_1.compare(doc.props, props));
|
|
146
136
|
const notification = this.buildNotification(key, persistent, data, props);
|
|
147
137
|
// If we need to do read and write for a transaction move this to a callback and rename to pushToKey_Read
|
|
148
138
|
if (persistent) {
|
|
@@ -152,7 +142,7 @@ class PushPubSubModule_Class extends ts_common_1.Module {
|
|
|
152
142
|
return;
|
|
153
143
|
const sessionsIds = docs.map(d => d.pushSessionId);
|
|
154
144
|
// I get the tokens relative to those sessions (query)
|
|
155
|
-
const sessions = yield
|
|
145
|
+
const sessions = yield array_tools_1.batchAction(sessionsIds, 10, (elements) => __awaiter(this, void 0, void 0, function* () { return _transaction.query(this.pushSessions, { where: { pushSessionId: { $in: elements } } }); }));
|
|
156
146
|
const _messages = docs.reduce((carry, db_pushKey) => {
|
|
157
147
|
const session = sessions.find(s => s.pushSessionId === db_pushKey.pushSessionId);
|
|
158
148
|
if (!session)
|
|
@@ -185,7 +175,7 @@ class PushPubSubModule_Class extends ts_common_1.Module {
|
|
|
185
175
|
if (docs.length === 0)
|
|
186
176
|
return;
|
|
187
177
|
const sessionsIds = docs.map(d => d.pushSessionId);
|
|
188
|
-
const sessions = yield
|
|
178
|
+
const sessions = yield array_tools_1.batchAction(sessionsIds, 10, (elements) => __awaiter(this, void 0, void 0, function* () { return this.pushSessions.query({ where: { pushSessionId: { $in: elements } } }); }));
|
|
189
179
|
const _messages = docs.reduce((carry, db_pushKey) => {
|
|
190
180
|
const session = sessions.find(s => s.pushSessionId === db_pushKey.pushSessionId);
|
|
191
181
|
if (!session)
|
|
@@ -200,12 +190,12 @@ class PushPubSubModule_Class extends ts_common_1.Module {
|
|
|
200
190
|
return __awaiter(this, void 0, void 0, function* () {
|
|
201
191
|
if (_toDelete.length === 0)
|
|
202
192
|
return;
|
|
203
|
-
const toDelete =
|
|
204
|
-
const _sessions = yield
|
|
205
|
-
const sessions =
|
|
193
|
+
const toDelete = array_tools_1.filterDuplicates(_toDelete);
|
|
194
|
+
const _sessions = yield array_tools_1.batchActionParallel(toDelete, 10, (elements) => __awaiter(this, void 0, void 0, function* () { return this.pushSessions.query({ where: { firebaseToken: { $in: elements } } }); }));
|
|
195
|
+
const sessions = array_tools_1.filterDuplicates(_sessions.map(s => s.pushSessionId));
|
|
206
196
|
const async = [
|
|
207
|
-
|
|
208
|
-
|
|
197
|
+
array_tools_1.batchActionParallel(toDelete, 10, (elements) => __awaiter(this, void 0, void 0, function* () { return this.pushSessions.delete({ where: { firebaseToken: { $in: elements } } }); })),
|
|
198
|
+
array_tools_1.batchActionParallel(sessions, 10, (elements) => __awaiter(this, void 0, void 0, function* () { return this.pushKeys.delete({ where: { pushSessionId: { $in: elements } } }); }))
|
|
209
199
|
];
|
|
210
200
|
yield Promise.all(async);
|
|
211
201
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PushPubSubModule.js","sourceRoot":"","sources":["../../../src/main/app-backend/modules/PushPubSubModule.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PushPubSubModule.js","sourceRoot":"","sources":["../../../src/main/app-backend/modules/PushPubSubModule.ts"],"names":[],"mappings":";;;;;;;;;;;;AAWA,qEAAgE;AAEhE,2FAAsF;AAEtF,mFAAkH;AAClH,wFAAiG;AACjG,gFAAkH;AAClH,kFAAwE;AACxE,kFAA4E;AAC5E,oEAAqE;AAcrE,MAAa,sBACT,SAAQ,eAAc;IAEtB;QACI,KAAK,CAAC,kBAAkB,CAAC,CAAC;QAkJtB,sBAAiB,GAAG,CAAC,OAAe,EAAE,UAAmB,EAAE,IAAU,EAAE,KAAW,EAAE,IAAa,EAAE,EAAE;YACzG,MAAM,YAAY,GAAqB;gBACnC,GAAG,EAAE,0BAAW,CAAC,EAAE,CAAC;gBACpB,SAAS,EAAE,oCAAkB,EAAE;gBAC/B,IAAI,EAAE,KAA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AAC,EAAC,EAAC,CAAC,CAAA,GAAA,CAAC,CAAA;YAC/I,MAAM,QAAQ,GAAG,8BAAgB,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC;YACvE,MAAM,KAAK,GAAmB;gBAC1B,iCAAmB,CAAC,QAAQ,EAAE,EAAE,EAAE,CAAM,QAAQ,EAAC,EAAE,gDAAC,OAAA,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,EAAC,KAAK,EAAE,EAAC,aAAa,EAAE,EAAC,GAAG,EAAE,QAAQ,EAAC,EAAC,EAAC,CAAC,CAAA,GAAA,CAAC;gBACxH,iCAAmB,CAAC,QAAQ,EAAE,EAAE,EAAE,CAAM,QAAQ,EAAC,EAAE,gDAAC,OAAA,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAC,KAAK,EAAE,EAAC,aAAa,EAAE,EAAC,GAAG,EAAE,QAAQ,EAAC,EAAC,EAAC,CAAC,CAAA,GAAA,CAAC;aACvH,CAAC;YAEF,MAAM,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QAC7B,CAAC;KAAA;CACJ;AA3OD,wDA2OC;AAEY,QAAA,gBAAgB,GAAG,IAAI,sBAAsB,EAAE,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FirebaseScheduledFunction } from "@intuitionrobotics/firebase/backend-
|
|
1
|
+
import { FirebaseScheduledFunction } from "@intuitionrobotics/firebase/app-backend/functions/firebase-function";
|
|
2
2
|
export declare class ScheduledCleanup_Class extends FirebaseScheduledFunction {
|
|
3
3
|
constructor();
|
|
4
4
|
onScheduledEvent: () => Promise<any>;
|
|
@@ -1,22 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Permissions management system, define access level for each of
|
|
4
|
-
* your server apis, and restrict users by giving them access levels
|
|
5
|
-
*
|
|
6
|
-
* Copyright (C) 2020 Intuition Robotics
|
|
7
|
-
*
|
|
8
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
9
|
-
* you may not use this file except in compliance with the License.
|
|
10
|
-
* You may obtain a copy of the License at
|
|
11
|
-
*
|
|
12
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
13
|
-
*
|
|
14
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
15
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
16
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17
|
-
* See the License for the specific language governing permissions and
|
|
18
|
-
* limitations under the License.
|
|
19
|
-
*/
|
|
20
2
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
21
3
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
22
4
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -28,9 +10,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
28
10
|
};
|
|
29
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
12
|
exports.ScheduledCleanup = exports.ScheduledCleanup_Class = void 0;
|
|
31
|
-
const
|
|
13
|
+
const firebase_function_1 = require("@intuitionrobotics/firebase/app-backend/functions/firebase-function");
|
|
32
14
|
const PushPubSubModule_1 = require("./PushPubSubModule");
|
|
33
|
-
class ScheduledCleanup_Class extends
|
|
15
|
+
class ScheduledCleanup_Class extends firebase_function_1.FirebaseScheduledFunction {
|
|
34
16
|
constructor() {
|
|
35
17
|
super("ScheduledCleanup");
|
|
36
18
|
this.onScheduledEvent = () => __awaiter(this, void 0, void 0, function* () {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScheduledPushCleanup.js","sourceRoot":"","sources":["../../../src/main/app-backend/modules/ScheduledPushCleanup.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ScheduledPushCleanup.js","sourceRoot":"","sources":["../../../src/main/app-backend/modules/ScheduledPushCleanup.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2GAA8G;AAC9G,yDAAoD;AAEpD,MAAa,sBACT,SAAQ,6CAAyB;IAEjC;QACI,KAAK,CAAC,kBAAkB,CAAC,CAAC;QAI9B,qBAAgB,GAAG,GAAuB,EAAE;YACxC,OAAO,mCAAgB,CAAC,gBAAgB,EAAE,CAAA;QAC9C,CAAC,CAAA,CAAC;QALE,IAAI,CAAC,WAAW,CAAC,eAAe,CAAC,CAAC;IACtC,CAAC;CAKJ;AAXD,wDAWC;AAEY,QAAA,gBAAgB,GAAG,IAAI,sBAAsB,EAAE,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CollectionName_Tabs = exports.CollectionName_PushSubscribers = void 0;
|
|
4
|
+
exports.CollectionName_PushSubscribers = "push-pub-sub--subscribers";
|
|
5
|
+
exports.CollectionName_Tabs = "push-pub-sub--tabs";
|
|
6
|
+
//# sourceMappingURL=consts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consts.js","sourceRoot":"","sources":["../../../src/main/app-backend/modules/consts.ts"],"names":[],"mappings":";;;AAAa,QAAA,8BAA8B,GAAG,2BAA2B,CAAC;AAC7D,QAAA,mBAAmB,GAAG,oBAAoB,CAAC"}
|
|
@@ -1,3 +1 @@
|
|
|
1
|
-
export declare const Frontend_ModulePack_PushPubSub: (import("
|
|
2
|
-
export * from "../modules/PushPubSubModule";
|
|
3
|
-
export * from "../modules/NotificationModule";
|
|
1
|
+
export declare const Frontend_ModulePack_PushPubSub: (import("../modules/NotificationModule").NotificationsModule_Class | import("@intuitionrobotics/firebase/app-frontend/FirebaseModule").FirebaseModule_Class | import("../modules/PushPubSubModule").PushPubSubModule_Class)[];
|
|
@@ -1,42 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Permissions management system, define access level for each of
|
|
4
|
-
* your server apis, and restrict users by giving them access levels
|
|
5
|
-
*
|
|
6
|
-
* Copyright (C) 2020 Intuition Robotics
|
|
7
|
-
*
|
|
8
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
9
|
-
* you may not use this file except in compliance with the License.
|
|
10
|
-
* You may obtain a copy of the License at
|
|
11
|
-
*
|
|
12
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
13
|
-
*
|
|
14
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
15
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
16
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17
|
-
* See the License for the specific language governing permissions and
|
|
18
|
-
* limitations under the License.
|
|
19
|
-
*/
|
|
20
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
21
|
-
if (k2 === undefined) k2 = k;
|
|
22
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
23
|
-
}) : (function(o, m, k, k2) {
|
|
24
|
-
if (k2 === undefined) k2 = k;
|
|
25
|
-
o[k2] = m[k];
|
|
26
|
-
}));
|
|
27
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
28
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
29
|
-
};
|
|
30
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31
3
|
exports.Frontend_ModulePack_PushPubSub = void 0;
|
|
32
4
|
const PushPubSubModule_1 = require("../modules/PushPubSubModule");
|
|
33
|
-
const
|
|
5
|
+
const FirebaseModule_1 = require("@intuitionrobotics/firebase/app-frontend/FirebaseModule");
|
|
34
6
|
const NotificationModule_1 = require("../modules/NotificationModule");
|
|
35
7
|
exports.Frontend_ModulePack_PushPubSub = [
|
|
36
|
-
|
|
8
|
+
FirebaseModule_1.FirebaseModule,
|
|
37
9
|
PushPubSubModule_1.PushPubSubModule,
|
|
38
10
|
NotificationModule_1.NotificationsModule
|
|
39
11
|
];
|
|
40
|
-
__exportStar(require("../modules/PushPubSubModule"), exports);
|
|
41
|
-
__exportStar(require("../modules/NotificationModule"), exports);
|
|
42
12
|
//# sourceMappingURL=module-pack.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module-pack.js","sourceRoot":"","sources":["../../../src/main/app-frontend/core/module-pack.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"module-pack.js","sourceRoot":"","sources":["../../../src/main/app-frontend/core/module-pack.ts"],"names":[],"mappings":";;;AAAA,kEAA6D;AAC7D,4FAAuF;AACvF,sEAAkE;AAErD,QAAA,8BAA8B,GAAG;IAC1C,+BAAc;IACd,mCAAgB;IAChB,wCAAmB;CACtB,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ThunderDispatcher } from "@intuitionrobotics/thunderstorm/app-frontend/core/thunder-dispatcher";
|
|
2
|
-
import { Module } from "@intuitionrobotics/ts-common";
|
|
3
|
-
import { DB_Notifications } from "
|
|
2
|
+
import { Module } from "@intuitionrobotics/ts-common/core/module";
|
|
3
|
+
import { DB_Notifications } from "../../shared/types";
|
|
4
4
|
export interface OnNotificationsUpdated {
|
|
5
5
|
__onNotificationsUpdated(): void;
|
|
6
6
|
}
|
|
@@ -2,11 +2,13 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.NotificationsModule = exports.NotificationsModule_Class = exports.dispatch_NotificationsUpdated = void 0;
|
|
4
4
|
const thunder_dispatcher_1 = require("@intuitionrobotics/thunderstorm/app-frontend/core/thunder-dispatcher");
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const
|
|
5
|
+
const module_1 = require("@intuitionrobotics/ts-common/core/module");
|
|
6
|
+
const array_tools_1 = require("@intuitionrobotics/ts-common/utils/array-tools");
|
|
7
|
+
const types_1 = require("@intuitionrobotics/thunderstorm/shared/types");
|
|
8
|
+
const date_time_tools_1 = require("@intuitionrobotics/ts-common/utils/date-time-tools");
|
|
9
|
+
const XhrHttpModule_1 = require("@intuitionrobotics/thunderstorm/app-frontend/modules/http/XhrHttpModule");
|
|
8
10
|
exports.dispatch_NotificationsUpdated = new thunder_dispatcher_1.ThunderDispatcher('__onNotificationsUpdated');
|
|
9
|
-
class NotificationsModule_Class extends
|
|
11
|
+
class NotificationsModule_Class extends module_1.Module {
|
|
10
12
|
constructor() {
|
|
11
13
|
super("NotificationsModule");
|
|
12
14
|
this.notifications = [];
|
|
@@ -26,12 +28,12 @@ class NotificationsModule_Class extends ts_common_1.Module {
|
|
|
26
28
|
_id: id,
|
|
27
29
|
read
|
|
28
30
|
};
|
|
29
|
-
|
|
30
|
-
.createRequest(
|
|
31
|
+
XhrHttpModule_1.XhrHttpModule
|
|
32
|
+
.createRequest(types_1.HttpMethod.POST, 'read-notification')
|
|
31
33
|
.setRelativeUrl("/v1/push/read")
|
|
32
34
|
.setJsonBody(body)
|
|
33
35
|
.setOnError('Something went wrong while reading your notification')
|
|
34
|
-
.setTimeout(
|
|
36
|
+
.setTimeout(date_time_tools_1.Minute)
|
|
35
37
|
.execute(() => {
|
|
36
38
|
exports.dispatch_NotificationsUpdated.dispatchUI([]);
|
|
37
39
|
});
|
|
@@ -45,7 +47,7 @@ class NotificationsModule_Class extends ts_common_1.Module {
|
|
|
45
47
|
exports.dispatch_NotificationsUpdated.dispatchUI([]);
|
|
46
48
|
}
|
|
47
49
|
removeNotification(notification) {
|
|
48
|
-
|
|
50
|
+
array_tools_1.removeItemFromArray(this.notifications, notification);
|
|
49
51
|
exports.dispatch_NotificationsUpdated.dispatchUI([]);
|
|
50
52
|
return notification._id;
|
|
51
53
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotificationModule.js","sourceRoot":"","sources":["../../../src/main/app-frontend/modules/NotificationModule.ts"],"names":[],"mappings":";;;AAAA,6GAAuG;AACvG,
|
|
1
|
+
{"version":3,"file":"NotificationModule.js","sourceRoot":"","sources":["../../../src/main/app-frontend/modules/NotificationModule.ts"],"names":[],"mappings":";;;AAAA,6GAAuG;AACvG,qEAAgE;AAChE,gFAAmF;AAGnF,wEAAwE;AACxE,wFAA0E;AAC1E,2GAAsG;AAMzF,QAAA,6BAA6B,GAAG,IAAI,sCAAiB,CAAqD,0BAA0B,CAAC,CAAC;AAGnJ,MAAa,yBACT,SAAQ,eAAM;IAEd;QACI,KAAK,CAAC,qBAAqB,CAAC,CAAC;QAGzB,kBAAa,GAAuB,EAAE,CAAC;QAM/C,wBAAmB,GAAG,CAAC,aAAiC,EAAE,EAAE;YACxD,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;YACnC,qCAA6B,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;QACjD,CAAC,CAAC;QAaF,SAAI,GAAG,CAAC,YAA8B,EAAE,IAAa,EAAE,EAAE;YACrD,MAAM,gBAAgB,GAAG,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,aAAa,CAAC,EAAE,CAAC,aAAa,CAAC,GAAG,KAAK,YAAY,CAAC,GAAG,CAAC,CAAC;YAC1G,IAAI,CAAC,gBAAgB,IAAI,CAAC,gBAAgB,CAAC,UAAU;gBACjD,OAAO;YAEX,gBAAgB,CAAC,IAAI,GAAG,IAAI,CAAC;YAC7B,IAAI,CAAC,gBAAgB,CAAC,YAAY,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;QAClD,CAAC,CAAC;QAEF,qBAAgB,GAAG,CAAC,EAAU,EAAE,IAAa,EAAE,EAAE;YAC7C,MAAM,IAAI,GAAG;gBACT,GAAG,EAAE,EAAE;gBACP,IAAI;aACP,CAAC;YAEF,6BAAa;iBACR,aAAa,CAAyB,kBAAU,CAAC,IAAI,EAAE,mBAAmB,CAAC;iBAC3E,cAAc,CAAC,eAAe,CAAC;iBAC/B,WAAW,CAAC,IAAI,CAAC;iBACjB,UAAU,CAAC,sDAAsD,CAAC;iBAClE,UAAU,CAAC,wBAAM,CAAC;iBAClB,OAAO,CAAC,GAAG,EAAE;gBACV,qCAA6B,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;YACjD,CAAC,CAAC,CAAC;QACX,CAAC,CAAC;IAhDF,CAAC;IAID,gBAAgB;QACZ,OAAO,IAAI,CAAC,aAAa,CAAC;IAC9B,CAAC;IAOD,eAAe,CAAC,eAAiC;QAC7C,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;QACzC,qCAA6B,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;IACjD,CAAC;IAED,kBAAkB,CAAC,YAA8B;QAC7C,iCAAmB,CAAC,IAAI,CAAC,aAAa,EAAE,YAAY,CAAC,CAAC;QACtD,qCAA6B,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;QAC7C,OAAO,YAAY,CAAC,GAAG,CAAC;IAC5B,CAAC;CA4BJ;AAvDD,8DAuDC;AAEY,QAAA,mBAAmB,GAAG,IAAI,yBAAyB,EAAE,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Module } from "@intuitionrobotics/ts-common";
|
|
2
|
-
import { BaseSubscriptionData, DB_Notifications, IFP, ISP, ITP, MessageType, SubscribeProps } from "../../
|
|
1
|
+
import { Module } from "@intuitionrobotics/ts-common/core/module";
|
|
2
|
+
import { BaseSubscriptionData, DB_Notifications, IFP, ISP, ITP, MessageType, SubscribeProps } from "../../shared/types";
|
|
3
3
|
export declare const Command_SwToApp = "SwToApp";
|
|
4
4
|
export interface OnPushMessageReceived<M extends MessageType<any, any, any> = never, S extends string = IFP<M>, P extends SubscribeProps = ISP<M>, D = ITP<M>> {
|
|
5
5
|
__onMessageReceived(notification: DB_Notifications): void;
|
|
@@ -1,21 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* A typescript & react boilerplate with api call example
|
|
4
|
-
*
|
|
5
|
-
* Copyright (C) 2018 Intuition Robotics
|
|
6
|
-
*
|
|
7
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
8
|
-
* you may not use this file except in compliance with the License.
|
|
9
|
-
* You may obtain a copy of the License at
|
|
10
|
-
*
|
|
11
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
-
*
|
|
13
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
14
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
-
* See the License for the specific language governing permissions and
|
|
17
|
-
* limitations under the License.
|
|
18
|
-
*/
|
|
19
2
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
20
3
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
21
4
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -27,19 +10,26 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
27
10
|
};
|
|
28
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
12
|
exports.PushPubSubModule = exports.PushPubSubModule_Class = exports.pushSessionIdKey = exports.Command_SwToApp = void 0;
|
|
30
|
-
const
|
|
31
|
-
const
|
|
32
|
-
const
|
|
33
|
-
const
|
|
13
|
+
const thunder_dispatcher_1 = require("@intuitionrobotics/thunderstorm/app-frontend/core/thunder-dispatcher");
|
|
14
|
+
const module_1 = require("@intuitionrobotics/ts-common/core/module");
|
|
15
|
+
const array_tools_1 = require("@intuitionrobotics/ts-common/utils/array-tools");
|
|
16
|
+
const types_1 = require("@intuitionrobotics/thunderstorm/shared/types");
|
|
17
|
+
const XhrHttpModule_1 = require("@intuitionrobotics/thunderstorm/app-frontend/modules/http/XhrHttpModule");
|
|
34
18
|
const NotificationModule_1 = require("./NotificationModule");
|
|
19
|
+
const random_tools_1 = require("@intuitionrobotics/ts-common/utils/random-tools");
|
|
20
|
+
const exceptions_1 = require("@intuitionrobotics/ts-common/core/exceptions");
|
|
21
|
+
const FirebaseModule_1 = require("@intuitionrobotics/firebase/app-frontend/FirebaseModule");
|
|
22
|
+
const object_tools_1 = require("@intuitionrobotics/ts-common/utils/object-tools");
|
|
23
|
+
const tools_1 = require("@intuitionrobotics/ts-common/utils/tools");
|
|
24
|
+
const StorageModule_1 = require("@intuitionrobotics/thunderstorm/app-frontend/modules/StorageModule");
|
|
35
25
|
exports.Command_SwToApp = "SwToApp";
|
|
36
26
|
exports.pushSessionIdKey = "x-push-session-id";
|
|
37
|
-
const pushSessionId = new
|
|
38
|
-
class PushPubSubModule_Class extends
|
|
27
|
+
const pushSessionId = new StorageModule_1.StorageKey(exports.pushSessionIdKey, false);
|
|
28
|
+
class PushPubSubModule_Class extends module_1.Module {
|
|
39
29
|
constructor() {
|
|
40
30
|
super("PushPubSubModule");
|
|
41
31
|
this.subscriptions = [];
|
|
42
|
-
this.dispatch_pushMessage = new
|
|
32
|
+
this.dispatch_pushMessage = new thunder_dispatcher_1.ThunderDispatcher("__onMessageReceived");
|
|
43
33
|
this.timeout = 800;
|
|
44
34
|
this.registerServiceWorker = () => __awaiter(this, void 0, void 0, function* () {
|
|
45
35
|
console.log("Registering service worker...");
|
|
@@ -48,12 +38,12 @@ class PushPubSubModule_Class extends ts_common_1.Module {
|
|
|
48
38
|
this.initApp = () => {
|
|
49
39
|
var _a;
|
|
50
40
|
if (!((_a = this.config) === null || _a === void 0 ? void 0 : _a.publicKeyBase64))
|
|
51
|
-
throw new
|
|
41
|
+
throw new exceptions_1.ImplementationMissingException(`Please specify the right config for the 'PushPubSubModule'`);
|
|
52
42
|
this.runAsync("Initializing Firebase SDK and registering SW", () => __awaiter(this, void 0, void 0, function* () {
|
|
53
43
|
if ("serviceWorker" in navigator) {
|
|
54
44
|
const asyncs = [
|
|
55
45
|
this.registerServiceWorker(),
|
|
56
|
-
|
|
46
|
+
FirebaseModule_1.FirebaseModule.createSession()
|
|
57
47
|
];
|
|
58
48
|
const { 0: registration, 1: app } = yield Promise.all(asyncs);
|
|
59
49
|
yield registration.update();
|
|
@@ -82,7 +72,7 @@ class PushPubSubModule_Class extends ts_common_1.Module {
|
|
|
82
72
|
if (permission !== "granted")
|
|
83
73
|
return;
|
|
84
74
|
if (!this.messaging)
|
|
85
|
-
throw new
|
|
75
|
+
throw new exceptions_1.BadImplementationException("I literally just set this!");
|
|
86
76
|
this.firebaseToken = yield this.messaging.getToken(options);
|
|
87
77
|
if (!this.firebaseToken)
|
|
88
78
|
return;
|
|
@@ -126,7 +116,7 @@ class PushPubSubModule_Class extends ts_common_1.Module {
|
|
|
126
116
|
return this.register();
|
|
127
117
|
};
|
|
128
118
|
this.unsubscribe = (subscription) => {
|
|
129
|
-
|
|
119
|
+
array_tools_1.removeFromArray(this.subscriptions, d => d.pushKey === subscription.pushKey && object_tools_1.compare(subscription.props, d.props));
|
|
130
120
|
return this.register();
|
|
131
121
|
};
|
|
132
122
|
this.register = () => {
|
|
@@ -141,10 +131,10 @@ class PushPubSubModule_Class extends ts_common_1.Module {
|
|
|
141
131
|
};
|
|
142
132
|
this.logDebug("Registering subscriptions");
|
|
143
133
|
for (const sub of this.subscriptions) {
|
|
144
|
-
this.logDebug(`${sub.pushKey} => ${sub.props ?
|
|
134
|
+
this.logDebug(`${sub.pushKey} => ${sub.props ? tools_1.__stringify(sub.props) : "no props"}`);
|
|
145
135
|
}
|
|
146
|
-
|
|
147
|
-
.createRequest(
|
|
136
|
+
XhrHttpModule_1.XhrHttpModule
|
|
137
|
+
.createRequest(types_1.HttpMethod.POST, "register-pub-sub-tab")
|
|
148
138
|
.setRelativeUrl("/v1/push/register")
|
|
149
139
|
.setJsonBody(body)
|
|
150
140
|
.setOnError("Failed to register for push")
|
|
@@ -154,7 +144,7 @@ class PushPubSubModule_Class extends ts_common_1.Module {
|
|
|
154
144
|
});
|
|
155
145
|
}, "debounce-register", this.timeout);
|
|
156
146
|
};
|
|
157
|
-
window.name = window.name ||
|
|
147
|
+
window.name = window.name || random_tools_1.generateHex(32);
|
|
158
148
|
this.pushSessionId = pushSessionId.set(window.name);
|
|
159
149
|
}
|
|
160
150
|
init() {
|
|
@@ -167,9 +157,9 @@ class PushPubSubModule_Class extends ts_common_1.Module {
|
|
|
167
157
|
return this.pushSessionId;
|
|
168
158
|
}
|
|
169
159
|
subscribeImpl(subscription) {
|
|
170
|
-
if (this.subscriptions.find(d => d.pushKey === subscription.pushKey &&
|
|
160
|
+
if (this.subscriptions.find(d => d.pushKey === subscription.pushKey && object_tools_1.compare(subscription.props, d.props)))
|
|
171
161
|
return;
|
|
172
|
-
|
|
162
|
+
array_tools_1.addItemToArray(this.subscriptions, subscription);
|
|
173
163
|
}
|
|
174
164
|
}
|
|
175
165
|
exports.PushPubSubModule_Class = PushPubSubModule_Class;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PushPubSubModule.js","sourceRoot":"","sources":["../../../src/main/app-frontend/modules/PushPubSubModule.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PushPubSubModule.js","sourceRoot":"","sources":["../../../src/main/app-frontend/modules/PushPubSubModule.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6GAAuG;AACvG,qEAAgE;AAChE,gFAA+F;AAY/F,wEAAwE;AACxE,2GAAsG;AACtG,6DAAyD;AAEzD,kFAA4E;AAC5E,6EAAwH;AAExH,4FAAuF;AAEvF,kFAAwE;AACxE,oEAAqE;AACrE,sGAA6F;AAEhF,QAAA,eAAe,GAAG,SAAS,CAAC;AAwB5B,QAAA,gBAAgB,GAAG,mBAAmB,CAAC;AACpD,MAAM,aAAa,GAAG,IAAI,0BAAU,CAAS,wBAAgB,EAAE,KAAK,CAAC,CAAC;AAEtE,MAAa,sBACT,SAAQ,eAAwB;IAWhC;QACI,KAAK,CAAC,kBAAkB,CAAC,CAAC;QAVtB,kBAAa,GAA2B,EAAE,CAAC;QAI3C,yBAAoB,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|| (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
-
};
|
|
12
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
__exportStar(require("./shared/api"), exports);
|
|
14
|
-
__exportStar(require("./shared/types"), exports);
|
|
15
2
|
//# sourceMappingURL=index.js.map
|
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/main/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/main/index.ts"],"names":[],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intuitionrobotics/push-pub-sub",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.46.00",
|
|
4
4
|
"description": "push-pub-sub",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"IR",
|
|
@@ -23,12 +23,12 @@
|
|
|
23
23
|
"build": "tsc"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@intuitionrobotics/firebase": "~0.
|
|
27
|
-
"@intuitionrobotics/thunderstorm": "~0.
|
|
28
|
-
"@intuitionrobotics/ts-common": "~0.
|
|
26
|
+
"@intuitionrobotics/firebase": "~0.46.0",
|
|
27
|
+
"@intuitionrobotics/thunderstorm": "~0.46.0",
|
|
28
|
+
"@intuitionrobotics/ts-common": "~0.46.0"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@intuitionrobotics/testelot": "~0.
|
|
31
|
+
"@intuitionrobotics/testelot": "~0.46.0",
|
|
32
32
|
"@types/node": "^16.0.0",
|
|
33
33
|
"ts-node": "^8.6.2",
|
|
34
34
|
"tslint": "^5.16.0",
|
package/shared/api.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ApiWithBody } from "@intuitionrobotics/thunderstorm";
|
|
1
|
+
import { ApiWithBody } from "@intuitionrobotics/thunderstorm/shared/types";
|
|
2
2
|
import { Request_PushRegister, Request_ReadPush, Response_PushRegister } from "./types";
|
|
3
3
|
export declare type PubSubRegisterClient = ApiWithBody<'/v1/push/register', Request_PushRegister, Response_PushRegister>;
|
|
4
4
|
export declare type PubSubReadNotification = ApiWithBody<'/v1/push/read', Request_ReadPush, void>;
|
package/shared/types.d.ts
CHANGED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
-
};
|
|
12
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
exports.CollectionName_Tabs = exports.CollectionName_PushSubscribers = void 0;
|
|
14
|
-
__exportStar(require("../../shared/types"), exports);
|
|
15
|
-
exports.CollectionName_PushSubscribers = "push-pub-sub--subscribers";
|
|
16
|
-
exports.CollectionName_Tabs = "push-pub-sub--tabs";
|
|
17
|
-
//# sourceMappingURL=_imports.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"_imports.js","sourceRoot":"","sources":["../../../src/main/app-backend/modules/_imports.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,qDAAmC;AAEtB,QAAA,8BAA8B,GAAG,2BAA2B,CAAC;AAC7D,QAAA,mBAAmB,GAAG,oBAAoB,CAAC"}
|
package/backend.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./app-backend/core/module-pack";
|
package/backend.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
-
};
|
|
12
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
__exportStar(require("./app-backend/core/module-pack"), exports);
|
|
14
|
-
//# sourceMappingURL=backend.js.map
|
package/backend.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"backend.js","sourceRoot":"","sources":["../src/main/backend.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,iEAA8C"}
|
package/frontend.d.ts
DELETED
package/frontend.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
-
};
|
|
12
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
__exportStar(require("./app-frontend/modules/PushPubSubModule"), exports);
|
|
14
|
-
__exportStar(require("./app-frontend/modules/NotificationModule"), exports);
|
|
15
|
-
__exportStar(require("./app-frontend/core/module-pack"), exports);
|
|
16
|
-
//# sourceMappingURL=frontend.js.map
|
package/frontend.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"frontend.js","sourceRoot":"","sources":["../src/main/frontend.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,0EAAwD;AACxD,4EAAyD;AACzD,kEAAgD"}
|