Skip to content

Commit eedffdf

Browse files
onesignal-deploygithub-actions[bot]
andauthored
chore: Release 1.0.4 (#22)
Co-authored-by: github-actions[bot] <noreply@onesignal.com>
1 parent c7b49d5 commit eedffdf

4 files changed

Lines changed: 53 additions & 19 deletions

File tree

README.md

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

2525
<docgen-index>
2626

27-
- [`initialize(...)`](#initialize)
28-
- [`login(...)`](#login)
29-
- [`logout()`](#logout)
30-
- [`setConsentRequired(...)`](#setconsentrequired)
31-
- [`setConsentGiven(...)`](#setconsentgiven)
32-
- [Interfaces](#interfaces)
33-
- [Type Aliases](#type-aliases)
27+
* [`initialize(...)`](#initialize)
28+
* [`login(...)`](#login)
29+
* [`logout()`](#logout)
30+
* [`setConsentRequired(...)`](#setconsentrequired)
31+
* [`setConsentGiven(...)`](#setconsentgiven)
32+
* [Interfaces](#interfaces)
33+
* [Type Aliases](#type-aliases)
3434

3535
</docgen-index>
3636

@@ -51,7 +51,8 @@ Initialize the SDK with your OneSignal app ID. Call during app startup.
5151
| ----------- | ------------------- |
5252
| **`appId`** | <code>string</code> |
5353

54-
---
54+
--------------------
55+
5556

5657
### login(...)
5758

@@ -65,7 +66,8 @@ Log in to OneSignal as the user identified by `externalId`, switching the user c
6566
| ---------------- | ------------------- |
6667
| **`externalId`** | <code>string</code> |
6768

68-
---
69+
--------------------
70+
6971

7072
### logout()
7173

@@ -75,7 +77,8 @@ logout() => Promise<void>
7577

7678
Log out the current user. The SDK will reference a new device-scoped user.
7779

78-
---
80+
--------------------
81+
7982

8083
### setConsentRequired(...)
8184

@@ -89,7 +92,8 @@ Set whether user privacy consent is required before sending data to OneSignal. C
8992
| -------------- | -------------------- |
9093
| **`required`** | <code>boolean</code> |
9194

92-
---
95+
--------------------
96+
9397

9498
### setConsentGiven(...)
9599

@@ -103,10 +107,12 @@ Indicate whether the user has granted privacy consent.
103107
| ------------- | -------------------- |
104108
| **`granted`** | <code>boolean</code> |
105109

106-
---
110+
--------------------
111+
107112

108113
### Interfaces
109114

115+
110116
#### OneSignalDebugAPI
111117

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

125+
119126
#### OneSignalUserAPI
120127

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

156+
149157
#### UserChangedState
150158

151159
| Prop | Type |
152160
| ------------- | ----------------------------------------------- |
153161
| **`current`** | <code><a href="#userstate">UserState</a></code> |
154162

163+
155164
#### UserState
156165

157166
| Prop | Type |
158167
| ----------------- | ------------------- |
159168
| **`onesignalId`** | <code>string</code> |
160169
| **`externalId`** | <code>string</code> |
161170

171+
162172
#### OneSignalPushSubscriptionAPI
163173

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

186+
176187
#### PushSubscriptionChangedState
177188

178189
| Prop | Type |
179190
| -------------- | ----------------------------------------------------------------------- |
180191
| **`previous`** | <code><a href="#pushsubscriptionstate">PushSubscriptionState</a></code> |
181192
| **`current`** | <code><a href="#pushsubscriptionstate">PushSubscriptionState</a></code> |
182193

194+
183195
#### PushSubscriptionState
184196

185197
| Prop | Type |
@@ -188,6 +200,7 @@ Push subscription state and controls exposed via `OneSignal.User.pushSubscriptio
188200
| **`token`** | <code>string</code> |
189201
| **`optedIn`** | <code>boolean</code> |
190202

203+
191204
#### OneSignalNotificationsAPI
192205

193206
Notification permission and event handling exposed via `OneSignal.Notifications`.
@@ -205,20 +218,23 @@ Notification permission and event handling exposed via `OneSignal.Notifications`
205218
| **removeNotification** | (id: number) =&gt; Promise&lt;void&gt; | Android only. Cancel a single notification by its Android notification ID. |
206219
| **removeGroupedNotifications** | (id: string) =&gt; Promise&lt;void&gt; | Android only. Cancel a group of notifications by group key. |
207220

221+
208222
#### NotificationClickEvent
209223

210224
| Prop | Type |
211225
| ------------------ | --------------------------------------------------------------------------- |
212226
| **`result`** | <code><a href="#notificationclickresult">NotificationClickResult</a></code> |
213227
| **`notification`** | <code>OSNotification</code> |
214228

229+
215230
#### NotificationClickResult
216231

217232
| Prop | Type |
218233
| -------------- | ------------------- |
219234
| **`actionId`** | <code>string</code> |
220235
| **`url`** | <code>string</code> |
221236

237+
222238
#### OneSignalInAppMessagesAPI
223239

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

254+
238255
#### InAppMessageClickEvent
239256

240257
| Prop | Type |
241258
| ------------- | --------------------------------------------------------------------------- |
242259
| **`message`** | <code><a href="#osinappmessage">OSInAppMessage</a></code> |
243260
| **`result`** | <code><a href="#inappmessageclickresult">InAppMessageClickResult</a></code> |
244261

262+
245263
#### OSInAppMessage
246264

247265
| Prop | Type |
248266
| --------------- | ------------------- |
249267
| **`messageId`** | <code>string</code> |
250268

269+
251270
#### InAppMessageClickResult
252271

253272
| Prop | Type |
@@ -257,30 +276,35 @@ In-app message triggers and event handling exposed via `OneSignal.InAppMessages`
257276
| **`url`** | <code>string</code> |
258277
| **`urlTarget`** | <code><a href="#inappmessageactionurltype">InAppMessageActionUrlType</a></code> |
259278

279+
260280
#### InAppMessageWillDisplayEvent
261281

262282
| Prop | Type |
263283
| ------------- | --------------------------------------------------------- |
264284
| **`message`** | <code><a href="#osinappmessage">OSInAppMessage</a></code> |
265285

286+
266287
#### InAppMessageDidDisplayEvent
267288

268289
| Prop | Type |
269290
| ------------- | --------------------------------------------------------- |
270291
| **`message`** | <code><a href="#osinappmessage">OSInAppMessage</a></code> |
271292

293+
272294
#### InAppMessageWillDismissEvent
273295

274296
| Prop | Type |
275297
| ------------- | --------------------------------------------------------- |
276298
| **`message`** | <code><a href="#osinappmessage">OSInAppMessage</a></code> |
277299

300+
278301
#### InAppMessageDidDismissEvent
279302

280303
| Prop | Type |
281304
| ------------- | --------------------------------------------------------- |
282305
| **`message`** | <code><a href="#osinappmessage">OSInAppMessage</a></code> |
283306

307+
284308
#### OneSignalSessionAPI
285309

286310
Outcome reporting exposed via `OneSignal.Session`.
@@ -291,6 +315,7 @@ Outcome reporting exposed via `OneSignal.Session`.
291315
| **addUniqueOutcome** | (name: string) =&gt; Promise&lt;void&gt; | <a href="#record">Record</a> a unique outcome with the given name against the current session. |
292316
| **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. |
293317

318+
294319
#### OneSignalLocationAPI
295320

296321
Location permission and sharing exposed via `OneSignal.Location`.
@@ -301,6 +326,7 @@ Location permission and sharing exposed via `OneSignal.Location`.
301326
| **setShared** | (shared: boolean) =&gt; void | Enable or disable sharing the device location with OneSignal. |
302327
| **isShared** | () =&gt; Promise&lt;boolean&gt; | Whether the device location is currently shared with OneSignal. |
303328

329+
304330
#### OneSignalLiveActivitiesAPI
305331

306332
Live activity controls exposed via `OneSignal.LiveActivities`. iOS only unless noted.
@@ -314,48 +340,56 @@ Live activity controls exposed via `OneSignal.LiveActivities`. iOS only unless n
314340
| **setupDefault** | (options?: <a href="#liveactivitysetupoptions">LiveActivitySetupOptions</a> \| undefined) =&gt; Promise&lt;void&gt; | Set up the OneSignal default live activity, optionally enabling pushToStart/pushToUpdate. |
315341
| **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. |
316342

343+
317344
### Type Aliases
318345

346+
319347
#### LogLevel
320348

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

351+
323352
#### Record
324353

325354
Construct a type with a set of properties K of type T
326355

327-
<code>{
328-
[P in K]: T;
329-
}</code>
356+
<code>{ [P in K]: T; }</code>
357+
330358

331359
#### OSNotificationPermission
332360

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

363+
335364
#### NotificationEventName
336365

337366
<code>'click' | 'foregroundWillDisplay' | 'permissionChange'</code>
338367

368+
339369
#### NotificationEventTypeMap
340370

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

373+
343374
#### InAppMessageEventName
344375

345376
<code>'click' | 'willDisplay' | 'didDisplay' | 'willDismiss' | 'didDismiss'</code>
346377

378+
347379
#### InAppMessageEventTypeMap
348380

349381
<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>
350382

383+
351384
#### InAppMessageActionUrlType
352385

353386
<code>'browser' | 'webview' | 'replacement'</code>
354387

388+
355389
#### LiveActivitySetupOptions
356390

357391
The setup options for `OneSignal.LiveActivities.setupDefault`.
358392

359-
<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>
393+
<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>
360394

361395
</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
@@ -134,7 +134,7 @@ class OneSignalCapacitorPlugin : Plugin(),
134134
initialized = true
135135

136136
OneSignalWrapper.sdkType = "capacitor"
137-
OneSignalWrapper.sdkVersion = "010003"
137+
OneSignalWrapper.sdkVersion = "010004"
138138
OneSignal.initWithContext(context, appId)
139139

140140
// If the SDK was initialized from a non-Activity context (FCM/work

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 = "010003"
113+
OneSignalWrapper.sdkVersion = "010004"
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.3",
3+
"version": "1.0.4",
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)