@rivium/push-web 0.1.9 → 0.1.10
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/index.d.ts +14 -0
- package/dist/index.esm.js +1 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
- package/service-worker.js +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -466,6 +466,20 @@ declare class RiviumPush {
|
|
|
466
466
|
* Unsubscribe from a topic
|
|
467
467
|
*/
|
|
468
468
|
unsubscribeTopic(topic: string): Promise<void>;
|
|
469
|
+
/**
|
|
470
|
+
* Show an OS notification for a message the app received while its page was
|
|
471
|
+
* visible.
|
|
472
|
+
*
|
|
473
|
+
* A message that arrives over the real-time connection is handed to
|
|
474
|
+
* `onMessage` and, while the page is visible, deliberately not shown as an
|
|
475
|
+
* OS notification - the app is in front and usually shows its own UI. Some
|
|
476
|
+
* messages still deserve one: a chat message for a conversation the user is
|
|
477
|
+
* not reading, for instance. The app knows that; the SDK does not.
|
|
478
|
+
*
|
|
479
|
+
* Goes through the service worker when there is one, so clicks are handled
|
|
480
|
+
* the same way as a notification the worker showed itself.
|
|
481
|
+
*/
|
|
482
|
+
showNotification(message: RiviumPushMessage): void;
|
|
469
483
|
/**
|
|
470
484
|
* Check if connected to MQTT broker
|
|
471
485
|
*/
|