You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+50-16Lines changed: 50 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,13 +24,13 @@ See the `examples/demo` directory for a full working example.
24
24
25
25
<docgen-index>
26
26
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)
34
34
35
35
</docgen-index>
36
36
@@ -51,7 +51,8 @@ Initialize the SDK with your OneSignal app ID. Call during app startup.
51
51
| ----------- | ------------------- |
52
52
|**`appId`**| <code>string</code> |
53
53
54
-
---
54
+
--------------------
55
+
55
56
56
57
### login(...)
57
58
@@ -65,7 +66,8 @@ Log in to OneSignal as the user identified by `externalId`, switching the user c
65
66
| ---------------- | ------------------- |
66
67
|**`externalId`**| <code>string</code> |
67
68
68
-
---
69
+
--------------------
70
+
69
71
70
72
### logout()
71
73
@@ -75,7 +77,8 @@ logout() => Promise<void>
75
77
76
78
Log out the current user. The SDK will reference a new device-scoped user.
77
79
78
-
---
80
+
--------------------
81
+
79
82
80
83
### setConsentRequired(...)
81
84
@@ -89,7 +92,8 @@ Set whether user privacy consent is required before sending data to OneSignal. C
89
92
| -------------- | -------------------- |
90
93
|**`required`**| <code>boolean</code> |
91
94
92
-
---
95
+
--------------------
96
+
93
97
94
98
### setConsentGiven(...)
95
99
@@ -103,10 +107,12 @@ Indicate whether the user has granted privacy consent.
103
107
| ------------- | -------------------- |
104
108
|**`granted`**| <code>boolean</code> |
105
109
106
-
---
110
+
--------------------
111
+
107
112
108
113
### Interfaces
109
114
115
+
110
116
#### OneSignalDebugAPI
111
117
112
118
Debug helpers exposed via `OneSignal.Debug`.
@@ -116,6 +122,7 @@ Debug helpers exposed via `OneSignal.Debug`.
116
122
|**setLogLevel**| (logLevel: <ahref="#loglevel">LogLevel</a>) => void | Set the log level printed to LogCat (Android) or the Xcode console (iOS). |
117
123
|**setAlertLevel**| (visualLogLevel: <ahref="#loglevel">LogLevel</a>) => void | Set the log level shown to the user as alert dialogs. |
118
124
125
+
119
126
#### OneSignalUserAPI
120
127
121
128
Current-user operations exposed via `OneSignal.User`.
@@ -146,19 +153,22 @@ Current-user operations exposed via `OneSignal.User`.
146
153
|**getExternalId**| () => Promise<string \| null>| Get the external ID set via `login`, or null if the user is anonymous. |
147
154
|**trackEvent**| (name: string, properties?: object \| undefined) => Promise<void>| Track a custom event with an optional set of JSON-serializable properties. |
Outcome reporting exposed via `OneSignal.Session`.
@@ -291,6 +315,7 @@ Outcome reporting exposed via `OneSignal.Session`.
291
315
|**addUniqueOutcome**| (name: string) => Promise<void>| <ahref="#record">Record</a> a unique outcome with the given name against the current session. |
292
316
|**addOutcomeWithValue**| (name: string, value: number) => Promise<void>| <ahref="#record">Record</a> an outcome with the given name and value against the current session. |
293
317
318
+
294
319
#### OneSignalLocationAPI
295
320
296
321
Location permission and sharing exposed via `OneSignal.Location`.
@@ -301,6 +326,7 @@ Location permission and sharing exposed via `OneSignal.Location`.
301
326
|**setShared**| (shared: boolean) => void | Enable or disable sharing the device location with OneSignal. |
302
327
|**isShared**| () => Promise<boolean>| Whether the device location is currently shared with OneSignal. |
303
328
329
+
304
330
#### OneSignalLiveActivitiesAPI
305
331
306
332
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
314
340
|**setupDefault**| (options?: <ahref="#liveactivitysetupoptions">LiveActivitySetupOptions</a> \| undefined) => Promise<void>| Set up the OneSignal default live activity, optionally enabling pushToStart/pushToUpdate. |
315
341
|**startDefault**| (activityId: string, attributes: <ahref="#record">Record</a><string, unknown>, content: <ahref="#record">Record</a><string, unknown>) => Promise<void>| Start a live activity backed by the OneSignal default attributes type. |
The setup options for `OneSignal.LiveActivities.setupDefault`.
358
392
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>
0 commit comments