@suprsend/web-sdk 1.2.2 → 1.2.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@suprsend/web-sdk",
3
- "version": "1.2.2",
3
+ "version": "1.2.3",
4
4
  "description": "This is sdk used to integrate suprsend functionality in javascript applications",
5
5
  "main": "dist/cjs_bundle.js",
6
6
  "scripts": {
package/src/index.d.ts CHANGED
@@ -146,6 +146,7 @@ interface User {
146
146
 
147
147
  export interface WebPush {
148
148
  register_push(): void;
149
+ notification_permission(): NotificationPermission;
149
150
  }
150
151
 
151
152
  export interface SuprSend {
package/src/web_push.js CHANGED
@@ -106,6 +106,10 @@ class WebPush {
106
106
  return !!subscription;
107
107
  };
108
108
 
109
+ notification_permission() {
110
+ return Notification.permission;
111
+ }
112
+
109
113
  // unsubscribe_push = () => {
110
114
  // navigator.serviceWorker.ready
111
115
  // .then((registration) => {