Skip to content

Commit f9e24d4

Browse files
onesignal-deploygithub-actions[bot]fadi-george
authored
chore: Release 1.1.0 (#31)
Co-authored-by: github-actions[bot] <noreply@onesignal.com> Co-authored-by: Fadi George <fadii925@gmail.com>
1 parent 2bda911 commit f9e24d4

5 files changed

Lines changed: 54 additions & 20 deletions

File tree

README.md

Lines changed: 50 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -106,13 +106,13 @@ See the `examples/demo` directory for a full working example.
106106

107107
<docgen-index>
108108

109-
- [`initialize(...)`](#initialize)
110-
- [`login(...)`](#login)
111-
- [`logout()`](#logout)
112-
- [`setConsentRequired(...)`](#setconsentrequired)
113-
- [`setConsentGiven(...)`](#setconsentgiven)
114-
- [Interfaces](#interfaces)
115-
- [Type Aliases](#type-aliases)
109+
* [`initialize(...)`](#initialize)
110+
* [`login(...)`](#login)
111+
* [`logout()`](#logout)
112+
* [`setConsentRequired(...)`](#setconsentrequired)
113+
* [`setConsentGiven(...)`](#setconsentgiven)
114+
* [Interfaces](#interfaces)
115+
* [Type Aliases](#type-aliases)
116116

117117
</docgen-index>
118118

@@ -133,7 +133,8 @@ Initialize the SDK with your OneSignal app ID. Call during app startup.
133133
| ----------- | ------------------- |
134134
| **`appId`** | <code>string</code> |
135135

136-
---
136+
--------------------
137+
137138

138139
### login(...)
139140

@@ -147,7 +148,8 @@ Log in to OneSignal as the user identified by `externalId`, switching the user c
147148
| ---------------- | ------------------- |
148149
| **`externalId`** | <code>string</code> |
149150

150-
---
151+
--------------------
152+
151153

152154
### logout()
153155

@@ -157,7 +159,8 @@ logout() => Promise<void>
157159

158160
Log out the current user. The SDK will reference a new device-scoped user.
159161

160-
---
162+
--------------------
163+
161164

162165
### setConsentRequired(...)
163166

@@ -171,7 +174,8 @@ Set whether user privacy consent is required before sending data to OneSignal. C
171174
| -------------- | -------------------- |
172175
| **`required`** | <code>boolean</code> |
173176

174-
---
177+
--------------------
178+
175179

176180
### setConsentGiven(...)
177181

@@ -185,10 +189,12 @@ Indicate whether the user has granted privacy consent.
185189
| ------------- | -------------------- |
186190
| **`granted`** | <code>boolean</code> |
187191

188-
---
192+
--------------------
193+
189194

190195
### Interfaces
191196

197+
192198
#### OneSignalDebugAPI
193199

194200
Debug helpers exposed via `OneSignal.Debug`.
@@ -198,6 +204,7 @@ Debug helpers exposed via `OneSignal.Debug`.
198204
| **setLogLevel** | (logLevel: <a href="#loglevel">LogLevel</a>) =&gt; void | Set the log level printed to LogCat (Android) or the Xcode console (iOS). |
199205
| **setAlertLevel** | (visualLogLevel: <a href="#loglevel">LogLevel</a>) =&gt; void | Set the log level shown to the user as alert dialogs. |
200206

207+
201208
#### OneSignalUserAPI
202209

203210
Current-user operations exposed via `OneSignal.User`.
@@ -228,19 +235,22 @@ Current-user operations exposed via `OneSignal.User`.
228235
| **getExternalId** | () =&gt; Promise&lt;string \| null&gt; | Get the external ID set via `login`, or null if the user is anonymous. |
229236
| **trackEvent** | (name: string, properties?: object \| undefined) =&gt; Promise&lt;void&gt; | Track a custom event with an optional set of JSON-serializable properties. |
230237

238+
231239
#### UserChangedState
232240

233241
| Prop | Type |
234242
| ------------- | ----------------------------------------------- |
235243
| **`current`** | <code><a href="#userstate">UserState</a></code> |
236244

245+
237246
#### UserState
238247

239248
| Prop | Type |
240249
| ----------------- | ------------------- |
241250
| **`onesignalId`** | <code>string</code> |
242251
| **`externalId`** | <code>string</code> |
243252

253+
244254
#### OneSignalPushSubscriptionAPI
245255

246256
Push subscription state and controls exposed via `OneSignal.User.pushSubscription`.
@@ -255,13 +265,15 @@ Push subscription state and controls exposed via `OneSignal.User.pushSubscriptio
255265
| **optIn** | () =&gt; Promise&lt;void&gt; | Opt the user in to push notifications. Prompts for permission if needed. |
256266
| **optOut** | () =&gt; Promise&lt;void&gt; | Opt the user out of push notifications on this device. |
257267

268+
258269
#### PushSubscriptionChangedState
259270

260271
| Prop | Type |
261272
| -------------- | ----------------------------------------------------------------------- |
262273
| **`previous`** | <code><a href="#pushsubscriptionstate">PushSubscriptionState</a></code> |
263274
| **`current`** | <code><a href="#pushsubscriptionstate">PushSubscriptionState</a></code> |
264275

276+
265277
#### PushSubscriptionState
266278

267279
| Prop | Type |
@@ -270,6 +282,7 @@ Push subscription state and controls exposed via `OneSignal.User.pushSubscriptio
270282
| **`token`** | <code>string</code> |
271283
| **`optedIn`** | <code>boolean</code> |
272284

285+
273286
#### OneSignalNotificationsAPI
274287

275288
Notification permission and event handling exposed via `OneSignal.Notifications`.
@@ -287,20 +300,23 @@ Notification permission and event handling exposed via `OneSignal.Notifications`
287300
| **removeNotification** | (id: number) =&gt; Promise&lt;void&gt; | Android only. Cancel a single notification by its Android notification ID. |
288301
| **removeGroupedNotifications** | (id: string) =&gt; Promise&lt;void&gt; | Android only. Cancel a group of notifications by group key. |
289302

303+
290304
#### NotificationClickEvent
291305

292306
| Prop | Type |
293307
| ------------------ | --------------------------------------------------------------------------- |
294308
| **`result`** | <code><a href="#notificationclickresult">NotificationClickResult</a></code> |
295309
| **`notification`** | <code>OSNotification</code> |
296310

311+
297312
#### NotificationClickResult
298313

299314
| Prop | Type |
300315
| -------------- | ------------------- |
301316
| **`actionId`** | <code>string</code> |
302317
| **`url`** | <code>string</code> |
303318

319+
304320
#### OneSignalInAppMessagesAPI
305321

306322
In-app message triggers and event handling exposed via `OneSignal.InAppMessages`.
@@ -317,19 +333,22 @@ In-app message triggers and event handling exposed via `OneSignal.InAppMessages`
317333
| **setPaused** | (pause: boolean) =&gt; void | Pause or resume the display of in-app messages. |
318334
| **getPaused** | () =&gt; Promise&lt;boolean&gt; | Whether in-app messaging is currently paused. |
319335

336+
320337
#### InAppMessageClickEvent
321338

322339
| Prop | Type |
323340
| ------------- | --------------------------------------------------------------------------- |
324341
| **`message`** | <code><a href="#osinappmessage">OSInAppMessage</a></code> |
325342
| **`result`** | <code><a href="#inappmessageclickresult">InAppMessageClickResult</a></code> |
326343

344+
327345
#### OSInAppMessage
328346

329347
| Prop | Type |
330348
| --------------- | ------------------- |
331349
| **`messageId`** | <code>string</code> |
332350

351+
333352
#### InAppMessageClickResult
334353

335354
| Prop | Type |
@@ -339,30 +358,35 @@ In-app message triggers and event handling exposed via `OneSignal.InAppMessages`
339358
| **`url`** | <code>string</code> |
340359
| **`urlTarget`** | <code><a href="#inappmessageactionurltype">InAppMessageActionUrlType</a></code> |
341360

361+
342362
#### InAppMessageWillDisplayEvent
343363

344364
| Prop | Type |
345365
| ------------- | --------------------------------------------------------- |
346366
| **`message`** | <code><a href="#osinappmessage">OSInAppMessage</a></code> |
347367

368+
348369
#### InAppMessageDidDisplayEvent
349370

350371
| Prop | Type |
351372
| ------------- | --------------------------------------------------------- |
352373
| **`message`** | <code><a href="#osinappmessage">OSInAppMessage</a></code> |
353374

375+
354376
#### InAppMessageWillDismissEvent
355377

356378
| Prop | Type |
357379
| ------------- | --------------------------------------------------------- |
358380
| **`message`** | <code><a href="#osinappmessage">OSInAppMessage</a></code> |
359381

382+
360383
#### InAppMessageDidDismissEvent
361384

362385
| Prop | Type |
363386
| ------------- | --------------------------------------------------------- |
364387
| **`message`** | <code><a href="#osinappmessage">OSInAppMessage</a></code> |
365388

389+
366390
#### OneSignalSessionAPI
367391

368392
Outcome reporting exposed via `OneSignal.Session`.
@@ -373,6 +397,7 @@ Outcome reporting exposed via `OneSignal.Session`.
373397
| **addUniqueOutcome** | (name: string) =&gt; Promise&lt;void&gt; | <a href="#record">Record</a> a unique outcome with the given name against the current session. |
374398
| **addOutcomeWithValue** | (name: string, value: number) =&gt; Promise&lt;void&gt; | <a href="#record">Record</a> an outcome with the given name and value against the current session. |
375399

400+
376401
#### OneSignalLocationAPI
377402

378403
Location permission and sharing exposed via `OneSignal.Location`.
@@ -383,6 +408,7 @@ Location permission and sharing exposed via `OneSignal.Location`.
383408
| **setShared** | (shared: boolean) =&gt; void | Enable or disable sharing the device location with OneSignal. |
384409
| **isShared** | () =&gt; Promise&lt;boolean&gt; | Whether the device location is currently shared with OneSignal. |
385410

411+
386412
#### OneSignalLiveActivitiesAPI
387413

388414
Live activity controls exposed via `OneSignal.LiveActivities`. iOS only unless noted.
@@ -396,48 +422,56 @@ Live activity controls exposed via `OneSignal.LiveActivities`. iOS only unless n
396422
| **setupDefault** | (options?: <a href="#liveactivitysetupoptions">LiveActivitySetupOptions</a> \| undefined) =&gt; Promise&lt;void&gt; | Set up the OneSignal default live activity, optionally enabling pushToStart/pushToUpdate. |
397423
| **startDefault** | (activityId: string, attributes: <a href="#record">Record</a>&lt;string, unknown&gt;, content: <a href="#record">Record</a>&lt;string, unknown&gt;) =&gt; Promise&lt;void&gt; | Start a live activity backed by the OneSignal default attributes type. |
398424

425+
399426
### Type Aliases
400427

428+
401429
#### LogLevel
402430

403431
<code>(typeof <a href="#loglevel">LogLevel</a>)[keyof typeof LogLevel]</code>
404432

433+
405434
#### Record
406435

407436
Construct a type with a set of properties K of type T
408437

409-
<code>{
410-
[P in K]: T;
411-
}</code>
438+
<code>{ [P in K]: T; }</code>
439+
412440

413441
#### OSNotificationPermission
414442

415443
<code>(typeof <a href="#osnotificationpermission">OSNotificationPermission</a>)[keyof typeof OSNotificationPermission]</code>
416444

445+
417446
#### NotificationEventName
418447

419448
<code>'click' | 'foregroundWillDisplay' | 'permissionChange'</code>
420449

450+
421451
#### NotificationEventTypeMap
422452

423453
<code>{ click: <a href="#notificationclickevent">NotificationClickEvent</a>; foregroundWillDisplay: NotificationWillDisplayEvent; permissionChange: boolean; }</code>
424454

455+
425456
#### InAppMessageEventName
426457

427458
<code>'click' | 'willDisplay' | 'didDisplay' | 'willDismiss' | 'didDismiss'</code>
428459

460+
429461
#### InAppMessageEventTypeMap
430462

431463
<code>{ click: <a href="#inappmessageclickevent">InAppMessageClickEvent</a>; willDisplay: <a href="#inappmessagewilldisplayevent">InAppMessageWillDisplayEvent</a>; didDisplay: <a href="#inappmessagediddisplayevent">InAppMessageDidDisplayEvent</a>; willDismiss: <a href="#inappmessagewilldismissevent">InAppMessageWillDismissEvent</a>; didDismiss: <a href="#inappmessagediddismissevent">InAppMessageDidDismissEvent</a>; }</code>
432464

465+
433466
#### InAppMessageActionUrlType
434467

435468
<code>'browser' | 'webview' | 'replacement'</code>
436469

470+
437471
#### LiveActivitySetupOptions
438472

439473
The setup options for `OneSignal.LiveActivities.setupDefault`.
440474

441-
<code>{ /** _ When true, OneSignal will listen for pushToStart tokens for the `OneSignalLiveActivityAttributes` structure. _/ enablePushToStart: boolean; /** _ When true, OneSignal will listen for pushToUpdate tokens for each start live activity that uses the _ `OneSignalLiveActivityAttributes` structure. \*/ enablePushToUpdate: boolean; }</code>
475+
<code>{ /** * When true, OneSignal will listen for pushToStart tokens for the `OneSignalLiveActivityAttributes` structure. */ enablePushToStart: boolean; /** * When true, OneSignal will listen for pushToUpdate tokens for each start live activity that uses the * `OneSignalLiveActivityAttributes` structure. */ enablePushToUpdate: boolean; }</code>
442476

443477
</docgen-api>

android/src/main/kotlin/com/onesignal/capacitor/OneSignalCapacitorPlugin.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ class OneSignalCapacitorPlugin : Plugin(),
140140
initialized = true
141141

142142
OneSignalWrapper.sdkType = "capacitor"
143-
OneSignalWrapper.sdkVersion = "010006"
143+
OneSignalWrapper.sdkVersion = "010100"
144144
OneSignal.initWithContext(context, appId)
145145

146146
OneSignal.Notifications.addPermissionObserver(permissionObserver)

examples/demo-no-location/setup.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ info "Packing local Capacitor plugin..."
1212
(cd "$SDK_ROOT" && rm -f onesignal-capacitor-plugin*.tgz && bun pm pack --filename onesignal-capacitor-plugin.tgz >/dev/null)
1313

1414
info "Installing demo dependencies..."
15-
(cd "$DEMO_DIR" && bun install)
15+
(cd "$DEMO_DIR" && bun update @onesignal/capacitor-plugin && bun install)
1616

1717
info "Building web bundle..."
1818
(cd "$DEMO_DIR" && vp build)

ios/Sources/OneSignalCapacitorPlugin/OneSignalCapacitorPlugin.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ public class OneSignalCapacitorPlugin: CAPPlugin, CAPBridgedPlugin {
110110
initialized = true
111111

112112
OneSignalWrapper.sdkType = "capacitor"
113-
OneSignalWrapper.sdkVersion = "010006"
113+
OneSignalWrapper.sdkVersion = "010100"
114114
// OSCapacitorLaunchOptions's +load captures the dictionary from
115115
// UIApplicationDidFinishLaunchingNotification at process start (before
116116
// main()), so cold-start notification taps that arrive via launchOptions

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@onesignal/capacitor-plugin",
3-
"version": "1.0.6",
3+
"version": "1.1.0",
44
"description": "OneSignal is a high volume Push Notification service for mobile apps. This is the pure Capacitor plugin for OneSignal, providing push notifications, in-app messaging, and more.",
55
"keywords": [
66
"apns",

0 commit comments

Comments
 (0)