react-onesignal 3.2.1 → 3.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/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # Changelog
2
2
 
3
+ ## [3.2.3](https://github.com/OneSignal/react-onesignal/compare/3.2.2...3.2.3) (2025-06-06)
4
+
5
+ ### Bug Fixes
6
+
7
+ * sync with web-shim-codegen v3.0.5 ([2d2b0e7](https://github.com/OneSignal/react-onesignal/commit/2d2b0e718a6dd51efe142fd1f416029ce113fd42))
8
+
9
+ ## [3.2.2](https://github.com/OneSignal/react-onesignal/compare/3.2.1...3.2.2) (2025-03-28)
10
+
11
+ ### Bug Fixes
12
+
13
+ * add promise reject for init call ([daadfa8](https://github.com/OneSignal/react-onesignal/commit/daadfa8de3ba98a2b9bd81a497187c4ef07cbc30))
14
+ * add promise reject for init call ([f951175](https://github.com/OneSignal/react-onesignal/commit/f9511751b930cc65ec78e355f07056c54ac997be))
15
+
3
16
  ## [3.2.1](https://github.com/OneSignal/react-onesignal/compare/3.2.0...3.2.1) (2025-03-27)
4
17
 
5
18
  ### Bug Fixes
package/README.md CHANGED
@@ -19,7 +19,7 @@
19
19
  - 🏠 [Homepage](https://github.com/OneSignal/react-onesignal#readme)
20
20
  - 🖤 [npm](https://www.npmjs.com/package/react-onesignal)
21
21
 
22
- OneSignal is the world's leader for Mobile Push Notifications, Web Push, and In-App Messaging. It is trusted by 2 million+ businesses to send 9 billion Push Notifications per day.
22
+ OneSignal is the world's leader for Mobile Push Notifications, Web Push, and In-App Messaging. It is trusted by 2 million+ developers to send 12 billion Push Notifications per day.
23
23
 
24
24
  You can find more information on OneSignal [here](https://onesignal.com/).
25
25
 
@@ -83,8 +83,7 @@ OneSignal.init({ appId: 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' }).then(() => {
83
83
  ```
84
84
 
85
85
  ### Init Options
86
-
87
- You can pass other [options](https://documentation.onesignal.com/v11.0/docs/web-sdk#initializing-the-sdk) to the `init` function. Use these options to configure personalized prompt options, auto-resubscribe, and more.
86
+ You can pass other [options](https://documentation.onesignal.com/docs/web-sdk-reference#init) to the `init` function. Use these options to configure personalized prompt options, auto-resubscribe, and more.
88
87
 
89
88
  <details>
90
89
  <summary>Expand to see more options</summary>
@@ -155,7 +154,7 @@ interface IOneSignalOneSignal {
155
154
 
156
155
  ### OneSignal API
157
156
 
158
- See the official [OneSignal WebSDK reference](https://documentation.onesignal.com/v11.0/docs/web-sdk) for information on all available SDK functions.
157
+ See the official [OneSignal WebSDK reference](https://documentation.onesignal.com/docs/web-sdk-reference) for information on all available SDK functions.
159
158
 
160
159
  ---
161
160
 
@@ -195,7 +194,9 @@ OneSignal.Notifications.addEventListener('click', (event) => {
195
194
  });
196
195
  ```
197
196
 
198
- See the [OneSignal WebSDK Reference](https://documentation.onesignal.com/v11.0/docs/web-sdk) for all available event listeners.
197
+
198
+
199
+ See the [OneSignal WebSDK Reference](https://documentation.onesignal.com/docs/web-sdk-reference#addeventlistener-push-notification) for all available event listeners.
199
200
 
200
201
  ## Troubleshooting
201
202
 
package/dist/index.d.ts CHANGED
@@ -41,7 +41,7 @@ export type SubscriptionChangeEvent = {
41
41
  current: PushSubscriptionNamespaceProperties;
42
42
  };
43
43
  export type NotificationEventName = 'click' | 'foregroundWillDisplay' | 'dismiss' | 'permissionChange' | 'permissionPromptDisplay';
44
- export type SlidedownEventName = 'slidedownShown';
44
+ export type SlidedownEventName = 'slidedownAllowClick' | 'slidedownCancelClick' | 'slidedownClosed' | 'slidedownQueued' | 'slidedownShown';
45
45
  export type OneSignalDeferredLoadedCallback = (onesignal: IOneSignalOneSignal) => void;
46
46
  export interface IOSNotification {
47
47
  /**
@@ -215,8 +215,13 @@ export interface IInitObject {
215
215
  welcomeNotification?: {
216
216
  /**
217
217
  * Disables sending a welcome notification to new site visitors. If you want to disable welcome notifications, this is the only option you need.
218
+ * @deprecated Use 'disable' instead. This will be removed in a future version.
218
219
  */
219
220
  disabled?: boolean;
221
+ /**
222
+ * Disables sending a welcome notification to new site visitors. If you want to disable welcome notifications, this is the only option you need.
223
+ */
224
+ disable?: boolean;
220
225
  /**
221
226
  * The welcome notification's message. You can localize this to your own language.
222
227
  * If left blank or set to blank, the default of 'Thanks for subscribing!' will be used.
@@ -231,7 +236,7 @@ export interface IInitObject {
231
236
  * By default, clicking the welcome notification does not open any link.
232
237
  * This is recommended because the user has just visited your site and subscribed.
233
238
  */
234
- url: string;
239
+ url?: string;
235
240
  };
236
241
  /**
237
242
  * Will enable customization of the notify/subscription bell button.
@@ -355,7 +360,7 @@ export interface IOneSignalSlidedown {
355
360
  removeEventListener(event: SlidedownEventName, listener: (wasShown: boolean) => void): void;
356
361
  }
357
362
  export interface IOneSignalDebug {
358
- setLogLevel(logLevel: string): void;
363
+ setLogLevel(logLevel: 'trace' | 'debug' | 'info' | 'warn' | 'error'): void;
359
364
  }
360
365
  export interface IOneSignalSession {
361
366
  sendOutcome(outcomeName: string, outcomeWeight?: number): Promise<void>;