@intuitionrobotics/push-pub-sub 2.4.4 → 2.4.6
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/dist/app-backend/api/routes.d.ts.map +1 -1
- package/dist/app-backend/api/routes.js +0 -2
- package/dist/app-backend/api/routes.js.map +1 -1
- package/dist/app-backend/modules/PushKey.d.ts +1 -2
- package/dist/app-backend/modules/PushKey.d.ts.map +1 -1
- package/dist/app-backend/modules/PushKey.js +2 -4
- package/dist/app-backend/modules/PushKey.js.map +1 -1
- package/dist/app-backend/modules/PushPubSubModule.d.ts +7 -11
- package/dist/app-backend/modules/PushPubSubModule.d.ts.map +1 -1
- package/dist/app-backend/modules/PushPubSubModule.js +18 -52
- package/dist/app-backend/modules/PushPubSubModule.js.map +1 -1
- package/dist/app-frontend/core/module-pack.d.ts +1 -2
- package/dist/app-frontend/core/module-pack.d.ts.map +1 -1
- package/dist/app-frontend/core/module-pack.js +1 -4
- package/dist/app-frontend/core/module-pack.js.map +1 -1
- package/dist/app-frontend/modules/PushPubSubModule.d.ts.map +1 -1
- package/dist/app-frontend/modules/PushPubSubModule.js +1 -7
- package/dist/app-frontend/modules/PushPubSubModule.js.map +1 -1
- package/dist/frontend.d.ts +0 -1
- package/dist/frontend.d.ts.map +1 -1
- package/dist/frontend.js +0 -1
- package/dist/frontend.js.map +1 -1
- package/dist/shared/api.d.ts +2 -3
- package/dist/shared/api.d.ts.map +1 -1
- package/dist/shared/api.js.map +1 -1
- package/dist/shared/types.d.ts +2 -7
- package/dist/shared/types.d.ts.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +5 -5
- package/dist/app-backend/api/v1/push/read.d.ts +0 -4
- package/dist/app-backend/api/v1/push/read.d.ts.map +0 -1
- package/dist/app-backend/api/v1/push/read.js +0 -8
- package/dist/app-backend/api/v1/push/read.js.map +0 -1
- package/dist/app-frontend/modules/NotificationModule.d.ts +0 -19
- package/dist/app-frontend/modules/NotificationModule.d.ts.map +0 -1
- package/dist/app-frontend/modules/NotificationModule.js +0 -52
- package/dist/app-frontend/modules/NotificationModule.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intuitionrobotics/push-pub-sub",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.6",
|
|
4
4
|
"engines": {
|
|
5
5
|
"node": ">=20.10.0"
|
|
6
6
|
},
|
|
@@ -27,9 +27,9 @@
|
|
|
27
27
|
"dist"
|
|
28
28
|
],
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@intuitionrobotics/firebase": "2.4.
|
|
31
|
-
"@intuitionrobotics/thunderstorm": "2.4.
|
|
32
|
-
"@intuitionrobotics/ts-common": "2.4.
|
|
30
|
+
"@intuitionrobotics/firebase": "2.4.6",
|
|
31
|
+
"@intuitionrobotics/thunderstorm": "2.4.6",
|
|
32
|
+
"@intuitionrobotics/ts-common": "2.4.6"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
35
|
"@types/react": "^18.0.0"
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"@types/node": "^20.0.0",
|
|
39
39
|
"ts-node": "^8.6.2",
|
|
40
40
|
"typescript": "^5.3.0",
|
|
41
|
-
"@intuitionrobotics/testelot": "2.4.
|
|
41
|
+
"@intuitionrobotics/testelot": "2.4.6"
|
|
42
42
|
},
|
|
43
43
|
"typesVersions": {
|
|
44
44
|
"*": {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"read.d.ts","sourceRoot":"","sources":["../../../../../src/main/app-backend/api/v1/push/read.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,YAAY,EAAC,MAAM,yCAAyC,CAAC;AAE1E,OAAO,EAAC,KAAK,sBAAsB,EAAwB,MAAM,sBAAsB,CAAC;AACxF,eAAO,MAAM,IAAI,EAAE,YAAY,CAAC,sBAAsB,CAGrD,CAAC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import {} from "@intuitionrobotics/thunderstorm/backend";
|
|
2
|
-
import { PushPubSubModule } from "../../../modules/PushPubSubModule.js";
|
|
3
|
-
import {} from "../../../../index.js";
|
|
4
|
-
export const read = async (req) => {
|
|
5
|
-
const body = req.body;
|
|
6
|
-
return await PushPubSubModule.readNotification(body._id, body.read);
|
|
7
|
-
};
|
|
8
|
-
//# sourceMappingURL=read.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"read.js","sourceRoot":"","sources":["../../../../../src/main/app-backend/api/v1/push/read.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,MAAM,yCAAyC,CAAC;AAC1E,OAAO,EAAC,gBAAgB,EAAC,MAAM,sCAAsC,CAAC;AACtE,OAAO,EAAoD,MAAM,sBAAsB,CAAC;AACxF,MAAM,CAAC,MAAM,IAAI,GAAyC,KAAK,EAAE,GAAG,EAAE,EAAE;IACpE,MAAM,IAAI,GAAG,GAAG,CAAC,IAAwB,CAAC;IAC1C,OAAO,MAAM,gBAAgB,CAAC,gBAAgB,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;AACxE,CAAC,CAAC"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { ThunderDispatcher } from "@intuitionrobotics/thunderstorm/app-frontend/core/thunder-dispatcher";
|
|
2
|
-
import { Module } from "@intuitionrobotics/ts-common";
|
|
3
|
-
import { type DB_Notifications } from "../../index.js";
|
|
4
|
-
export interface OnNotificationsUpdated {
|
|
5
|
-
__onNotificationsUpdated(): void;
|
|
6
|
-
}
|
|
7
|
-
export declare const dispatch_NotificationsUpdated: ThunderDispatcher<OnNotificationsUpdated, "__onNotificationsUpdated", [], void>;
|
|
8
|
-
export declare class NotificationsModule_Class extends Module {
|
|
9
|
-
constructor();
|
|
10
|
-
private notifications;
|
|
11
|
-
getNotifications(): DB_Notifications[];
|
|
12
|
-
setNotificationList: (notifications: DB_Notifications[]) => void;
|
|
13
|
-
addNotification(newNotification: DB_Notifications): void;
|
|
14
|
-
removeNotification(notification: DB_Notifications): string;
|
|
15
|
-
read: (notification: DB_Notifications, read: boolean) => void;
|
|
16
|
-
readNotification: (id: string, read: boolean) => void;
|
|
17
|
-
}
|
|
18
|
-
export declare const NotificationsModule: NotificationsModule_Class;
|
|
19
|
-
//# sourceMappingURL=NotificationModule.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"NotificationModule.d.ts","sourceRoot":"","sources":["../../../src/main/app-frontend/modules/NotificationModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,iBAAiB,EAAC,MAAM,sEAAsE,CAAC;AACvG,OAAO,EAEN,MAAM,EAEN,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACN,KAAK,gBAAgB,EAErB,MAAM,gBAAgB,CAAC;AAIxB,MAAM,WAAW,sBAAsB;IACtC,wBAAwB,IAAI,IAAI,CAAA;CAChC;AAED,eAAO,MAAM,6BAA6B,iFAAwG,CAAC;AAGnJ,qBAAa,yBACZ,SAAQ,MAAM;;IAMd,OAAO,CAAC,aAAa,CAA0B;IAE/C,gBAAgB;IAIhB,mBAAmB,GAAI,eAAe,gBAAgB,EAAE,UAGtD;IAEF,eAAe,CAAC,eAAe,EAAE,gBAAgB;IAKjD,kBAAkB,CAAC,YAAY,EAAE,gBAAgB;IAMjD,IAAI,GAAI,cAAc,gBAAgB,EAAE,MAAM,OAAO,UAOnD;IAEF,gBAAgB,GAAI,IAAI,MAAM,EAAE,MAAM,OAAO,UAe3C;CAEF;AAED,eAAO,MAAM,mBAAmB,2BAAkC,CAAC"}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { ThunderDispatcher } from "@intuitionrobotics/thunderstorm/app-frontend/core/thunder-dispatcher";
|
|
2
|
-
import { Minute, Module, removeItemFromArray } from "@intuitionrobotics/ts-common";
|
|
3
|
-
import {} from "../../index.js";
|
|
4
|
-
import { XhrHttpModule } from "@intuitionrobotics/thunderstorm/frontend";
|
|
5
|
-
import { HttpMethod } from "@intuitionrobotics/thunderstorm";
|
|
6
|
-
export const dispatch_NotificationsUpdated = new ThunderDispatcher('__onNotificationsUpdated');
|
|
7
|
-
export class NotificationsModule_Class extends Module {
|
|
8
|
-
constructor() {
|
|
9
|
-
super("NotificationsModule");
|
|
10
|
-
}
|
|
11
|
-
notifications = [];
|
|
12
|
-
getNotifications() {
|
|
13
|
-
return this.notifications;
|
|
14
|
-
}
|
|
15
|
-
setNotificationList = (notifications) => {
|
|
16
|
-
this.notifications = notifications;
|
|
17
|
-
dispatch_NotificationsUpdated.dispatchUI();
|
|
18
|
-
};
|
|
19
|
-
addNotification(newNotification) {
|
|
20
|
-
this.notifications.push(newNotification);
|
|
21
|
-
dispatch_NotificationsUpdated.dispatchUI();
|
|
22
|
-
}
|
|
23
|
-
removeNotification(notification) {
|
|
24
|
-
removeItemFromArray(this.notifications, notification);
|
|
25
|
-
dispatch_NotificationsUpdated.dispatchUI();
|
|
26
|
-
return notification._id;
|
|
27
|
-
}
|
|
28
|
-
read = (notification, read) => {
|
|
29
|
-
const readNotification = this.notifications.find(_notification => _notification._id === notification._id);
|
|
30
|
-
if (!readNotification || !readNotification.persistent)
|
|
31
|
-
return;
|
|
32
|
-
readNotification.read = read;
|
|
33
|
-
this.readNotification(notification._id, read);
|
|
34
|
-
};
|
|
35
|
-
readNotification = (id, read) => {
|
|
36
|
-
const body = {
|
|
37
|
-
_id: id,
|
|
38
|
-
read
|
|
39
|
-
};
|
|
40
|
-
XhrHttpModule
|
|
41
|
-
.createRequest(HttpMethod.POST, 'read-notification')
|
|
42
|
-
.setRelativeUrl("/v1/push/read")
|
|
43
|
-
.setJsonBody(body)
|
|
44
|
-
.setOnError('Something went wrong while reading your notification')
|
|
45
|
-
.setTimeout(Minute)
|
|
46
|
-
.execute(() => {
|
|
47
|
-
dispatch_NotificationsUpdated.dispatchUI();
|
|
48
|
-
});
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
export const NotificationsModule = new NotificationsModule_Class();
|
|
52
|
-
//# sourceMappingURL=NotificationModule.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"NotificationModule.js","sourceRoot":"","sources":["../../../src/main/app-frontend/modules/NotificationModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,iBAAiB,EAAC,MAAM,sEAAsE,CAAC;AACvG,OAAO,EACN,MAAM,EACN,MAAM,EACN,mBAAmB,EACnB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAGN,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAC,aAAa,EAAC,MAAM,0CAA0C,CAAC;AACvE,OAAO,EAAC,UAAU,EAAC,MAAM,iCAAiC,CAAC;AAM3D,MAAM,CAAC,MAAM,6BAA6B,GAAG,IAAI,iBAAiB,CAAqD,0BAA0B,CAAC,CAAC;AAGnJ,MAAM,OAAO,yBACZ,SAAQ,MAAM;IAEd;QACC,KAAK,CAAC,qBAAqB,CAAC,CAAC;IAC9B,CAAC;IAEO,aAAa,GAAuB,EAAE,CAAC;IAE/C,gBAAgB;QACf,OAAO,IAAI,CAAC,aAAa,CAAC;IAC3B,CAAC;IAED,mBAAmB,GAAG,CAAC,aAAiC,EAAE,EAAE;QAC3D,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACnC,6BAA6B,CAAC,UAAU,EAAE,CAAC;IAC5C,CAAC,CAAC;IAEF,eAAe,CAAC,eAAiC;QAChD,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;QACzC,6BAA6B,CAAC,UAAU,EAAE,CAAC;IAC5C,CAAC;IAED,kBAAkB,CAAC,YAA8B;QAChD,mBAAmB,CAAC,IAAI,CAAC,aAAa,EAAE,YAAY,CAAC,CAAC;QACtD,6BAA6B,CAAC,UAAU,EAAE,CAAC;QAC3C,OAAO,YAAY,CAAC,GAAG,CAAC;IACzB,CAAC;IAED,I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