@onesignal/onesignal-vue3 2.1.0 → 2.2.0
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/{.eslintrc.js → .eslintrc.cjs} +8 -14
- package/.github/workflows/release.yml +1 -1
- package/CHANGELOG.md +6 -0
- package/README.md +103 -76
- package/dist/index.d.ts +187 -30
- package/dist/index.js.map +1 -1
- package/index.ts +212 -30
- package/package.json +5 -5
- package/tsconfig.json +0 -1
|
@@ -4,33 +4,27 @@ module.exports = {
|
|
|
4
4
|
browser: true,
|
|
5
5
|
es6: true,
|
|
6
6
|
node: true,
|
|
7
|
+
worker: true,
|
|
7
8
|
},
|
|
8
9
|
settings: {
|
|
9
10
|
"import/resolver": {
|
|
10
11
|
node: {
|
|
11
12
|
paths: ["src"],
|
|
12
|
-
extensions: [
|
|
13
|
-
".js",
|
|
14
|
-
".ts",
|
|
15
|
-
],
|
|
13
|
+
extensions: [".js", ".ts"],
|
|
16
14
|
},
|
|
17
15
|
},
|
|
18
16
|
},
|
|
19
17
|
globals: {
|
|
20
|
-
Atomics:
|
|
21
|
-
SharedArrayBuffer:
|
|
18
|
+
Atomics: "readonly",
|
|
19
|
+
SharedArrayBuffer: "readonly",
|
|
22
20
|
},
|
|
23
|
-
parser:
|
|
21
|
+
parser: "@typescript-eslint/parser",
|
|
24
22
|
parserOptions: {
|
|
25
23
|
ecmaVersion: 2018,
|
|
26
|
-
sourceType:
|
|
24
|
+
sourceType: "module",
|
|
27
25
|
},
|
|
28
|
-
plugins: [
|
|
29
|
-
|
|
30
|
-
],
|
|
31
|
-
extends: [
|
|
32
|
-
'plugin:@typescript-eslint/recommended',
|
|
33
|
-
],
|
|
26
|
+
plugins: ["@typescript-eslint"],
|
|
27
|
+
extends: ["plugin:@typescript-eslint/recommended"],
|
|
34
28
|
rules: {
|
|
35
29
|
"prefer-destructuring": 0,
|
|
36
30
|
"no-param-reassign": 0,
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [2.2.0](https://github.com/OneSignal/onesignal-vue3/compare/2.1.0...2.2.0) (2025-03-24)
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* sync with web-shim-codegen v3.0.2 ([7bca3c5](https://github.com/OneSignal/onesignal-vue3/commit/7bca3c52704d04a55beb179f23ef5bd3d35e660f))
|
|
8
|
+
|
|
3
9
|
## [2.1.0](https://github.com/OneSignal/onesignal-vue3/compare/2.0.1...2.1.0) (2025-03-18)
|
|
4
10
|
|
|
5
11
|
### Features
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<h1 align="center">
|
|
1
|
+
<h1 align="center">Welcome to onesignal-vue3 👋</h1>
|
|
2
2
|
<p>
|
|
3
3
|
<a href="https://www.npmjs.com/package/onesignal-vue3" target="_blank">
|
|
4
4
|
<img alt="Version" src="https://img.shields.io/npm/v/onesignal-vue3.svg">
|
|
@@ -16,35 +16,37 @@
|
|
|
16
16
|
|
|
17
17
|
> This is a JavaScript module that can be used to easily include [OneSignal](https://onesignal.com/) code in a website or app that uses Vue for its front-end codebase.
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
- 🏠 [Homepage](https://onesignal.com)
|
|
20
|
+
- 🖤 [npm](https://www.npmjs.com/package/@onesignal/onesignal-vue3)
|
|
21
21
|
|
|
22
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.
|
|
23
23
|
|
|
24
24
|
You can find more information on OneSignal [here](https://onesignal.com/).
|
|
25
25
|
|
|
26
26
|
> Upgrading from Version 1?
|
|
27
|
-
See our [migration guide](./MigrationGuide.md) to get started with v2.
|
|
27
|
+
> See our [migration guide](./MigrationGuide.md) to get started with v2.
|
|
28
28
|
|
|
29
29
|
## Contents
|
|
30
|
+
|
|
30
31
|
- [Install](#install)
|
|
31
32
|
- [Usage](#usage)
|
|
32
33
|
- [API](#onesignal-api)
|
|
33
34
|
- [Advanced Usage](#advanced-usage)
|
|
34
35
|
|
|
35
36
|
---
|
|
37
|
+
|
|
36
38
|
## Vue Compatibility
|
|
39
|
+
|
|
37
40
|
Make sure you install a plugin version compatible with your Vue environment.
|
|
38
41
|
|
|
39
|
-
| Vue | OneSignal Plugin
|
|
40
|
-
|
|
41
|
-
| 2 | [onesignal-vue](https://github.com/OneSignal/onesignal-vue)
|
|
42
|
-
| 3 | onesignal-vue3
|
|
42
|
+
| Vue | OneSignal Plugin |
|
|
43
|
+
| --- | ----------------------------------------------------------- |
|
|
44
|
+
| 2 | [onesignal-vue](https://github.com/OneSignal/onesignal-vue) |
|
|
45
|
+
| 3 | onesignal-vue3 |
|
|
43
46
|
|
|
44
47
|
## Install
|
|
45
48
|
|
|
46
|
-
|
|
47
|
-
|
|
49
|
+
Run `npm install`
|
|
48
50
|
|
|
49
51
|
### Yarn
|
|
50
52
|
|
|
@@ -58,7 +60,14 @@ yarn add @onesignal/onesignal-vue3
|
|
|
58
60
|
npm install --save @onesignal/onesignal-vue3
|
|
59
61
|
```
|
|
60
62
|
|
|
63
|
+
### Yarn
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
yarn add @onesignal/onesignal-vue3
|
|
67
|
+
```
|
|
68
|
+
|
|
61
69
|
---
|
|
70
|
+
|
|
62
71
|
## Usage
|
|
63
72
|
|
|
64
73
|
## Plugin setup
|
|
@@ -67,28 +76,29 @@ In Vue 3, you can pass in the OneSignal initialization options directly as an ar
|
|
|
67
76
|
|
|
68
77
|
```js
|
|
69
78
|
// main
|
|
70
|
-
import { createApp } from 'vue'
|
|
71
|
-
import OneSignalVuePlugin from '@onesignal/onesignal-vue3'
|
|
72
|
-
|
|
73
|
-
createApp(App)
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
79
|
+
import { createApp } from 'vue';
|
|
80
|
+
import OneSignalVuePlugin from '@onesignal/onesignal-vue3';
|
|
81
|
+
|
|
82
|
+
createApp(App)
|
|
83
|
+
.use(OneSignalVuePlugin, {
|
|
84
|
+
appId: 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx',
|
|
85
|
+
})
|
|
86
|
+
.mount('#app');
|
|
77
87
|
```
|
|
88
|
+
|
|
78
89
|
or
|
|
79
90
|
|
|
80
91
|
```js
|
|
81
92
|
//main
|
|
82
|
-
import { createApp } from 'vue'
|
|
83
|
-
import OneSignalVuePlugin from '@onesignal/onesignal-vue3'
|
|
93
|
+
import { createApp } from 'vue';
|
|
94
|
+
import OneSignalVuePlugin from '@onesignal/onesignal-vue3';
|
|
84
95
|
|
|
85
96
|
createApp(App).use(OneSignalVuePlugin).mount('#app');
|
|
86
97
|
|
|
87
98
|
// component
|
|
88
99
|
this.$OneSignal.init({
|
|
89
|
-
appId:
|
|
100
|
+
appId: 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx',
|
|
90
101
|
});
|
|
91
|
-
|
|
92
102
|
```
|
|
93
103
|
|
|
94
104
|
The OneSignal plugin automatically exposes a `$OneSignal` global property accessible inside the application.
|
|
@@ -98,63 +108,70 @@ The OneSignal plugin automatically exposes a `$OneSignal` global property access
|
|
|
98
108
|
You can also leverage Vue's [Composition API](https://vuejs.org/guide/extras/composition-api-faq.html) via the `useOneSignal` function that can be called from within [`setup`](https://vuejs.org/api/composition-api-setup.html#basic-usage).
|
|
99
109
|
|
|
100
110
|
## Reference
|
|
111
|
+
|
|
101
112
|
### Initialization
|
|
113
|
+
|
|
102
114
|
The `init` function returns a promise that resolves when OneSignal is loaded.
|
|
103
115
|
|
|
104
116
|
**Examples**
|
|
117
|
+
|
|
105
118
|
```js
|
|
106
119
|
await this.$OneSignal.init({ appId: 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' });
|
|
107
120
|
// do other stuff
|
|
108
121
|
```
|
|
109
122
|
|
|
110
123
|
```js
|
|
111
|
-
this.$OneSignal
|
|
112
|
-
|
|
113
|
-
|
|
124
|
+
this.$OneSignal
|
|
125
|
+
.init({ appId: 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' })
|
|
126
|
+
.then(() => {
|
|
127
|
+
// do other stuff
|
|
128
|
+
});
|
|
114
129
|
```
|
|
115
130
|
|
|
116
131
|
### Init Options
|
|
132
|
+
|
|
117
133
|
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.
|
|
118
134
|
|
|
119
135
|
<details>
|
|
120
136
|
<summary>Expand to see more options</summary>
|
|
121
137
|
|
|
122
|
-
|
|
123
|
-
|
|
|
124
|
-
| `appId`
|
|
125
|
-
| `autoRegister`
|
|
126
|
-
| `autoResubscribe`
|
|
127
|
-
| `path`
|
|
128
|
-
| `serviceWorkerPath`
|
|
129
|
-
| `serviceWorkerUpdaterPath`
|
|
130
|
-
| `subdomainName`
|
|
131
|
-
| `allowLocalhostAsSecureOrigin`
|
|
132
|
-
| `requiresUserPrivacyConsent
|
|
133
|
-
| `persistNotification`
|
|
134
|
-
| `notificationClickHandlerMatch
|
|
135
|
-
| `notificationClickHandlerAction
|
|
136
|
-
| `welcomeNotification`
|
|
137
|
-
| `notifyButton`
|
|
138
|
-
| `promptOptions`
|
|
139
|
-
| `webhooks`
|
|
140
|
-
| `[key: string]`
|
|
138
|
+
| Property Name | Type | Description |
|
|
139
|
+
| -------------------------------- | -------------------- | -------------------------------------------------------- |
|
|
140
|
+
| `appId` | `string` | The ID of your OneSignal app. |
|
|
141
|
+
| `autoRegister` | `boolean` (optional) | Whether or not to automatically register the user. |
|
|
142
|
+
| `autoResubscribe` | `boolean` (optional) | Whether or not to automatically resubscribe the user. |
|
|
143
|
+
| `path` | `string` (optional) | The path to the OneSignal service worker file. |
|
|
144
|
+
| `serviceWorkerPath` | `string` (optional) | The path to the OneSignal service worker script. |
|
|
145
|
+
| `serviceWorkerUpdaterPath` | `string` (optional) | The path to the OneSignal service worker updater script. |
|
|
146
|
+
| `subdomainName` | `string` (optional) | The subdomain of your OneSignal app. |
|
|
147
|
+
| `allowLocalhostAsSecureOrigin` | `boolean` (optional) | Whether or not to allow localhost as a secure origin. |
|
|
148
|
+
| `requiresUserPrivacyConsent` | `boolean` (optional) | Whether or not the user's consent is required. |
|
|
149
|
+
| `persistNotification` | `boolean` (optional) | Whether or not notifications should persist. |
|
|
150
|
+
| `notificationClickHandlerMatch` | `string` (optional) | The URL match pattern for notification clicks. |
|
|
151
|
+
| `notificationClickHandlerAction` | `string` (optional) | The action to perform when a notification is clicked. |
|
|
152
|
+
| `welcomeNotification` | `object` (optional) | The welcome notification configuration. |
|
|
153
|
+
| `notifyButton` | `object` (optional) | The notify button configuration. |
|
|
154
|
+
| `promptOptions` | `object` (optional) | Additional options for the subscription prompt. |
|
|
155
|
+
| `webhooks` | `object` (optional) | The webhook configuration. |
|
|
156
|
+
| `[key: string]` | `any` | Additional properties can be added as needed. |
|
|
141
157
|
|
|
142
158
|
**Service Worker Params**
|
|
143
159
|
You can customize the location and filenames of service worker assets. You are also able to specify the specific scope that your service worker should control. You can read more [here](https://documentation.onesignal.com/docs/onesignal-service-worker-faq#sdk-parameter-reference-for-service-workers).
|
|
144
160
|
|
|
145
161
|
In this distribution, you can specify the parameters via the following:
|
|
146
162
|
|
|
147
|
-
| Field
|
|
148
|
-
|
|
149
|
-
| `serviceWorkerParam`
|
|
150
|
-
| `serviceWorkerPath`
|
|
163
|
+
| Field | Details |
|
|
164
|
+
| -------------------- | -------------------------------------------------------------------------------------------------------------------- |
|
|
165
|
+
| `serviceWorkerParam` | Use to specify the scope, or the path the service worker has control of. Example: `{ scope: "/js/push/onesignal/" }` |
|
|
166
|
+
| `serviceWorkerPath` | The path to the service worker file. |
|
|
151
167
|
|
|
152
168
|
</details>
|
|
153
169
|
|
|
154
170
|
---
|
|
155
171
|
|
|
156
172
|
### Service Worker File
|
|
157
|
-
|
|
173
|
+
|
|
174
|
+
If you haven't done so already, you will need to add the [OneSignal Service Worker file](https://github.com/OneSignal/OneSignal-Website-SDK/files/11480764/OneSignalSDK-v16-ServiceWorker.zip) to your site ([learn more](https://documentation.onesignal.com/docs/web-push-quickstart#step-6-upload-files)).
|
|
158
175
|
|
|
159
176
|
The OneSignal SDK file must be publicly accessible. You can put them in your top-level root or a subdirectory. However, if you are placing the file not on top-level root make sure to specify the path via the service worker params in the init options (see section above).
|
|
160
177
|
|
|
@@ -162,59 +179,69 @@ The OneSignal SDK file must be publicly accessible. You can put them in your top
|
|
|
162
179
|
Visit `https://yoursite.com/OneSignalSDKWorker.js` in the address bar to make sure the files are being served successfully.
|
|
163
180
|
|
|
164
181
|
### Code completion
|
|
182
|
+
|
|
165
183
|
If IntelliSense is not working as expected in your `.vue` file, try adding an import from the OneSignal plugin.
|
|
166
184
|
|
|
167
185
|

|
|
168
186
|
|
|
169
187
|
### Typescript
|
|
188
|
+
|
|
170
189
|
This package includes Typescript support.
|
|
171
190
|
|
|
172
191
|
```ts
|
|
173
192
|
interface IOneSignalOneSignal {
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
193
|
+
Slidedown: IOneSignalSlidedown;
|
|
194
|
+
Notifications: IOneSignalNotifications;
|
|
195
|
+
Session: IOneSignalSession;
|
|
196
|
+
User: IOneSignalUser;
|
|
197
|
+
Debug: IOneSignalDebug;
|
|
198
|
+
login(externalId: string, jwtToken?: string): Promise<void>;
|
|
199
|
+
logout(): Promise<void>;
|
|
200
|
+
init(options: IInitObject): Promise<void>;
|
|
201
|
+
setConsentGiven(consent: boolean): Promise<void>;
|
|
202
|
+
setConsentRequired(requiresConsent: boolean): Promise<void>;
|
|
184
203
|
}
|
|
185
204
|
```
|
|
186
205
|
|
|
187
206
|
### OneSignal API
|
|
207
|
+
|
|
188
208
|
See the official [OneSignal WebSDK reference](https://documentation.onesignal.com/v11.0/docs/web-sdk) for information on all available SDK functions.
|
|
189
209
|
|
|
190
210
|
---
|
|
211
|
+
|
|
191
212
|
## Advanced Usage
|
|
213
|
+
|
|
192
214
|
### Events and Event Listeners
|
|
215
|
+
|
|
193
216
|
Use listeners to react to OneSignal-related events:
|
|
194
217
|
|
|
195
218
|
### Notifications Namespace
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
|
199
|
-
|'
|
|
200
|
-
| '
|
|
201
|
-
|'
|
|
202
|
-
|'
|
|
219
|
+
|
|
220
|
+
| Event Name | Callback Argument Type |
|
|
221
|
+
| ------------------------- | -------------------------------------- |
|
|
222
|
+
| 'click' | NotificationClickEvent |
|
|
223
|
+
| 'foregroundWillDisplay' | NotificationForegroundWillDisplayEvent |
|
|
224
|
+
| 'dismiss' | NotificationDismissEvent |
|
|
225
|
+
| 'permissionChange' | boolean |
|
|
226
|
+
| 'permissionPromptDisplay' | void |
|
|
203
227
|
|
|
204
228
|
### Slidedown Namespace
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
|
229
|
+
|
|
230
|
+
| Event Name | Callback Argument Type |
|
|
231
|
+
| ---------------- | ---------------------- |
|
|
232
|
+
| 'slidedownShown' | boolean |
|
|
208
233
|
|
|
209
234
|
### Push Subscription Namespace
|
|
235
|
+
|
|
210
236
|
| Event Name | Callback Argument Type |
|
|
211
|
-
|
|
212
|
-
|'change'
|
|
237
|
+
| ---------- | ---------------------- |
|
|
238
|
+
| 'change' | boolean |
|
|
213
239
|
|
|
214
240
|
**Example**
|
|
241
|
+
|
|
215
242
|
```js
|
|
216
243
|
this.$OneSignal.Notifications.addEventListener('change', (event) => {
|
|
217
|
-
console.log(
|
|
244
|
+
console.log('The notification was clicked!', event);
|
|
218
245
|
});
|
|
219
246
|
```
|
|
220
247
|
|
|
@@ -232,12 +259,13 @@ Give a ⭐️ if this project helped you!
|
|
|
232
259
|
|
|
233
260
|
## OneSignal
|
|
234
261
|
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
262
|
+
- [Website](https://onesignal.com)
|
|
263
|
+
- Twitter: [@onesignal](https://twitter.com/onesignal)
|
|
264
|
+
- Github: [@OneSignal](https://github.com/OneSignal)
|
|
265
|
+
- LinkedIn: [@onesignal](https://linkedin.com/company/onesignal)
|
|
239
266
|
|
|
240
267
|
## Discord
|
|
268
|
+
|
|
241
269
|
Reach out to us via our [Discord server](https://discord.com/invite/EP7gf6Uz7G)!
|
|
242
270
|
|
|
243
271
|
## 📝 License
|
|
@@ -245,5 +273,4 @@ Reach out to us via our [Discord server](https://discord.com/invite/EP7gf6Uz7G)!
|
|
|
245
273
|
Copyright © 2023 [OneSignal](https://github.com/OneSignal).<br />
|
|
246
274
|
This project is [Modified MIT](https://github.com/OneSignal/onesignal-vue3/blob/main/LICENSE) licensed.
|
|
247
275
|
|
|
248
|
-
|
|
249
276
|
Enjoy!
|
package/dist/index.d.ts
CHANGED
|
@@ -13,18 +13,18 @@ declare global {
|
|
|
13
13
|
};
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
|
-
interface AutoPromptOptions {
|
|
16
|
+
export interface AutoPromptOptions {
|
|
17
17
|
force?: boolean;
|
|
18
18
|
forceSlidedownOverNative?: boolean;
|
|
19
19
|
slidedownPromptOptions?: IOneSignalAutoPromptOptions;
|
|
20
20
|
}
|
|
21
|
-
interface IOneSignalAutoPromptOptions {
|
|
21
|
+
export interface IOneSignalAutoPromptOptions {
|
|
22
22
|
force?: boolean;
|
|
23
23
|
forceSlidedownOverNative?: boolean;
|
|
24
24
|
isInUpdateMode?: boolean;
|
|
25
25
|
categoryOptions?: IOneSignalCategories;
|
|
26
26
|
}
|
|
27
|
-
interface IOneSignalCategories {
|
|
27
|
+
export interface IOneSignalCategories {
|
|
28
28
|
positiveUpdateButton: string;
|
|
29
29
|
negativeUpdateButton: string;
|
|
30
30
|
savingButtonText: string;
|
|
@@ -32,24 +32,24 @@ interface IOneSignalCategories {
|
|
|
32
32
|
updateMessage: string;
|
|
33
33
|
tags: IOneSignalTagCategory[];
|
|
34
34
|
}
|
|
35
|
-
interface IOneSignalTagCategory {
|
|
35
|
+
export interface IOneSignalTagCategory {
|
|
36
36
|
tag: string;
|
|
37
37
|
label: string;
|
|
38
38
|
checked?: boolean;
|
|
39
39
|
}
|
|
40
|
-
|
|
40
|
+
export type PushSubscriptionNamespaceProperties = {
|
|
41
41
|
id: string | null | undefined;
|
|
42
42
|
token: string | null | undefined;
|
|
43
43
|
optedIn: boolean;
|
|
44
44
|
};
|
|
45
|
-
|
|
45
|
+
export type SubscriptionChangeEvent = {
|
|
46
46
|
previous: PushSubscriptionNamespaceProperties;
|
|
47
47
|
current: PushSubscriptionNamespaceProperties;
|
|
48
48
|
};
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
interface IOSNotification {
|
|
49
|
+
export type NotificationEventName = 'click' | 'foregroundWillDisplay' | 'dismiss' | 'permissionChange' | 'permissionPromptDisplay';
|
|
50
|
+
export type SlidedownEventName = 'slidedownShown';
|
|
51
|
+
export type OneSignalDeferredLoadedCallback = (onesignal: IOneSignalOneSignal) => void;
|
|
52
|
+
export interface IOSNotification {
|
|
53
53
|
/**
|
|
54
54
|
* The OneSignal notification id;
|
|
55
55
|
* - Primary id on OneSignal's REST API and dashboard
|
|
@@ -100,7 +100,7 @@ interface IOSNotification {
|
|
|
100
100
|
*/
|
|
101
101
|
readonly confirmDelivery: boolean;
|
|
102
102
|
}
|
|
103
|
-
interface IOSNotificationActionButton {
|
|
103
|
+
export interface IOSNotificationActionButton {
|
|
104
104
|
/**
|
|
105
105
|
* Any unique identifier to represent which button was clicked. This is typically passed back to the service worker
|
|
106
106
|
* and host page through events to identify which button was clicked.
|
|
@@ -120,44 +120,201 @@ interface IOSNotificationActionButton {
|
|
|
120
120
|
*/
|
|
121
121
|
readonly launchURL?: string;
|
|
122
122
|
}
|
|
123
|
-
interface NotificationClickResult {
|
|
123
|
+
export interface NotificationClickResult {
|
|
124
124
|
readonly actionId?: string;
|
|
125
125
|
readonly url?: string;
|
|
126
126
|
}
|
|
127
|
-
|
|
127
|
+
export type NotificationEventTypeMap = {
|
|
128
128
|
'click': NotificationClickEvent;
|
|
129
129
|
'foregroundWillDisplay': NotificationForegroundWillDisplayEvent;
|
|
130
130
|
'dismiss': NotificationDismissEvent;
|
|
131
131
|
'permissionChange': boolean;
|
|
132
132
|
'permissionPromptDisplay': void;
|
|
133
133
|
};
|
|
134
|
-
interface NotificationForegroundWillDisplayEvent {
|
|
134
|
+
export interface NotificationForegroundWillDisplayEvent {
|
|
135
135
|
readonly notification: IOSNotification;
|
|
136
136
|
preventDefault(): void;
|
|
137
137
|
}
|
|
138
|
-
interface NotificationDismissEvent {
|
|
138
|
+
export interface NotificationDismissEvent {
|
|
139
139
|
notification: IOSNotification;
|
|
140
140
|
}
|
|
141
|
-
interface NotificationClickEvent {
|
|
141
|
+
export interface NotificationClickEvent {
|
|
142
142
|
readonly notification: IOSNotification;
|
|
143
143
|
readonly result: NotificationClickResult;
|
|
144
144
|
}
|
|
145
|
-
|
|
145
|
+
export type UserChangeEvent = {
|
|
146
146
|
current: UserNamespaceProperties;
|
|
147
147
|
};
|
|
148
|
-
|
|
148
|
+
export type UserNamespaceProperties = {
|
|
149
149
|
onesignalId: string | undefined;
|
|
150
150
|
externalId: string | undefined;
|
|
151
151
|
};
|
|
152
|
-
interface IInitObject {
|
|
152
|
+
export interface IInitObject {
|
|
153
153
|
appId: string;
|
|
154
154
|
subdomainName?: string;
|
|
155
155
|
requiresUserPrivacyConsent?: boolean;
|
|
156
|
-
promptOptions?:
|
|
157
|
-
|
|
158
|
-
|
|
156
|
+
promptOptions?: {
|
|
157
|
+
slidedown: {
|
|
158
|
+
prompts: {
|
|
159
|
+
/**
|
|
160
|
+
* Whether to automatically display the prompt.
|
|
161
|
+
* `true` will display the prompt based on the delay options.
|
|
162
|
+
* `false` will prevent the prompt from displaying until the Slidedowns methods are used.
|
|
163
|
+
*/
|
|
164
|
+
autoPrompt: boolean;
|
|
165
|
+
/**
|
|
166
|
+
* Only available for type: category. Up to 10 categories.
|
|
167
|
+
* @example
|
|
168
|
+
* categories: [{ tag: 'local_news', label: 'Local News' }] // The user will be tagged with local_news but will see "Local News" in the prompt.
|
|
169
|
+
*/
|
|
170
|
+
categories: {
|
|
171
|
+
/** Should identify the action. */
|
|
172
|
+
tag: string;
|
|
173
|
+
/** What the user will see. */
|
|
174
|
+
label: string;
|
|
175
|
+
}[];
|
|
176
|
+
/**
|
|
177
|
+
* The delay options for the prompt.
|
|
178
|
+
* @example delay: { pageViews: 3, timeDelay: 20 } // The user will not be shown the prompt until 20 seconds after the 3rd page view.
|
|
179
|
+
*/
|
|
180
|
+
delay: {
|
|
181
|
+
/** The number of pages a user needs to visit before the prompt is displayed. */
|
|
182
|
+
pageViews?: number;
|
|
183
|
+
/** The number of seconds a user needs to wait before the prompt is displayed.Both options must be satisfied for the prompt to display */
|
|
184
|
+
timeDelay?: number;
|
|
185
|
+
};
|
|
186
|
+
/**
|
|
187
|
+
* The text to display in the prompt.
|
|
188
|
+
*/
|
|
189
|
+
text?: {
|
|
190
|
+
/** The callout asking the user to opt-in. Up to 90 characters. */
|
|
191
|
+
actionMessage?: string;
|
|
192
|
+
/** Triggers the opt-in. Up to 15 characters. */
|
|
193
|
+
acceptButton?: string;
|
|
194
|
+
/** Cancels opt-in. Up to 15 characters. */
|
|
195
|
+
cancelMessage?: string;
|
|
196
|
+
/** The message of the confirmation prompt displayed after the email and/or phone number is provided. Up to 90 characters. */
|
|
197
|
+
confirmMessage?: string;
|
|
198
|
+
/** Identifies the email text field. Up to 15 characters. */
|
|
199
|
+
emailLabel?: string;
|
|
200
|
+
/** Cancels the category update. Up to 15 characters. */
|
|
201
|
+
negativeUpdateButton?: string;
|
|
202
|
+
/** Saves the updated category tags. Up to 15 characters. */
|
|
203
|
+
positiveUpdateButton?: string;
|
|
204
|
+
/** Identifies the phone number text field. Up to 15 characters. */
|
|
205
|
+
smsLabel?: string;
|
|
206
|
+
/** A different message shown to subscribers presented the prompt again to update categories. Up to 90 characters. */
|
|
207
|
+
updateMessage?: string;
|
|
208
|
+
};
|
|
209
|
+
/**
|
|
210
|
+
* The type of prompt to display.
|
|
211
|
+
* `push` which is the Slide Prompt without categories.
|
|
212
|
+
* `category` which is the Slide Prompt with categories.
|
|
213
|
+
* `sms` only asks for phone number.
|
|
214
|
+
* `email` only asks for email address.
|
|
215
|
+
* `smsAndEmail` asks for both phone number and email address.
|
|
216
|
+
*/
|
|
217
|
+
type: 'push' | 'category' | 'sms' | 'email' | 'smsAndEmail';
|
|
218
|
+
}[];
|
|
219
|
+
};
|
|
220
|
+
};
|
|
221
|
+
welcomeNotification?: {
|
|
222
|
+
/**
|
|
223
|
+
* Disables sending a welcome notification to new site visitors. If you want to disable welcome notifications, this is the only option you need.
|
|
224
|
+
*/
|
|
225
|
+
disabled?: boolean;
|
|
226
|
+
/**
|
|
227
|
+
* The welcome notification's message. You can localize this to your own language.
|
|
228
|
+
* If left blank or set to blank, the default of 'Thanks for subscribing!' will be used.
|
|
229
|
+
*/
|
|
230
|
+
message: string;
|
|
231
|
+
/**
|
|
232
|
+
* The welcome notification's title. You can localize this to your own language. If not set, or left blank, the site's title will be used.
|
|
233
|
+
* Set to one space ' ' to clear the title, although this is not recommended.
|
|
234
|
+
*/
|
|
235
|
+
title?: string;
|
|
236
|
+
/**
|
|
237
|
+
* By default, clicking the welcome notification does not open any link.
|
|
238
|
+
* This is recommended because the user has just visited your site and subscribed.
|
|
239
|
+
*/
|
|
240
|
+
url: string;
|
|
241
|
+
};
|
|
242
|
+
/**
|
|
243
|
+
* Will enable customization of the notify/subscription bell button.
|
|
244
|
+
*/
|
|
245
|
+
notifyButton?: {
|
|
246
|
+
/**
|
|
247
|
+
* A function you define that returns true to show the Subscription Bell, or false to hide it.
|
|
248
|
+
* Typically used the hide the Subscription Bell after the user is subscribed.
|
|
249
|
+
* This function is not re-evaluated on every state change; this function is only evaluated once when the Subscription Bell begins to show.
|
|
250
|
+
*/
|
|
251
|
+
displayPredicate?: () => boolean | Promise<boolean>;
|
|
252
|
+
/**
|
|
253
|
+
* Enable the Subscription Bell. The Subscription Bell is otherwise disabled by default.
|
|
254
|
+
*/
|
|
255
|
+
enable?: boolean;
|
|
256
|
+
/** Specify CSS-valid pixel offsets using bottom, left, and right. */
|
|
257
|
+
offset?: {
|
|
258
|
+
bottom: string;
|
|
259
|
+
left: string;
|
|
260
|
+
right: string;
|
|
261
|
+
};
|
|
262
|
+
/**
|
|
263
|
+
* If `true`, the Subscription Bell will display an icon that there is 1 unread message.
|
|
264
|
+
* When hovering over the Subscription Bell, the user will see custom text set by message.prenotify.
|
|
265
|
+
*/
|
|
266
|
+
prenotify: boolean;
|
|
267
|
+
/** Either `bottom-left` or `bottom-right`. The Subscription Bell will be fixed at this location on your page. */
|
|
268
|
+
position?: 'bottom-left' | 'bottom-right';
|
|
269
|
+
/** Set `false` to hide the 'Powered by OneSignal' text in the Subscription Bell dialog popup. */
|
|
270
|
+
showCredit: boolean;
|
|
271
|
+
/**
|
|
272
|
+
* The Subscription Bell will initially appear at one of these sizes, and then shrink down to size `small` after the user subscribes.
|
|
273
|
+
*/
|
|
274
|
+
size?: 'small' | 'medium' | 'large';
|
|
275
|
+
/** Customize the Subscription Bell text. */
|
|
276
|
+
text: {
|
|
277
|
+
'dialog.blocked.message': string;
|
|
278
|
+
'dialog.blocked.title': string;
|
|
279
|
+
'dialog.main.button.subscribe': string;
|
|
280
|
+
'dialog.main.button.unsubscribe': string;
|
|
281
|
+
'dialog.main.title': string;
|
|
282
|
+
'message.action.resubscribed': string;
|
|
283
|
+
'message.action.subscribed': string;
|
|
284
|
+
'message.action.subscribing': string;
|
|
285
|
+
'message.action.unsubscribed': string;
|
|
286
|
+
'message.prenotify': string;
|
|
287
|
+
'tip.state.blocked': string;
|
|
288
|
+
'tip.state.subscribed': string;
|
|
289
|
+
'tip.state.unsubscribed': string;
|
|
290
|
+
};
|
|
291
|
+
};
|
|
159
292
|
persistNotification?: boolean;
|
|
160
|
-
webhooks?:
|
|
293
|
+
webhooks?: {
|
|
294
|
+
/**
|
|
295
|
+
* Enable this setting only if your server has CORS enabled and supports non-simple CORS requests.
|
|
296
|
+
* If this setting is disabled, your webhook will not need CORS to receive data, but it will not receive the custom headers.
|
|
297
|
+
* The simplest option is to leave it disabled.
|
|
298
|
+
* @default false
|
|
299
|
+
*/
|
|
300
|
+
cors: boolean;
|
|
301
|
+
/**
|
|
302
|
+
* This event occurs after a notification is clicked.
|
|
303
|
+
* @example https://site.com/hook
|
|
304
|
+
*/
|
|
305
|
+
'notification.clicked'?: string;
|
|
306
|
+
/**
|
|
307
|
+
* This event occurs after a notification is intentionally dismissed by the user (clicking the notification body or one of the notification action buttons does not trigger the dismissed webhook),
|
|
308
|
+
* after a group of notifications are all dismissed (with this notification as part of that group), or after a notification expires on its own time and disappears. This event is supported on Chrome only.
|
|
309
|
+
* @example https://site.com/hook
|
|
310
|
+
*/
|
|
311
|
+
'notification.dismissed'?: string;
|
|
312
|
+
/**
|
|
313
|
+
* This event occurs after a notification is displayed.
|
|
314
|
+
* @example https://site.com/hook
|
|
315
|
+
*/
|
|
316
|
+
'notification.willDisplay'?: string;
|
|
317
|
+
};
|
|
161
318
|
autoResubscribe?: boolean;
|
|
162
319
|
autoRegister?: boolean;
|
|
163
320
|
notificationClickHandlerMatch?: string;
|
|
@@ -172,7 +329,7 @@ interface IInitObject {
|
|
|
172
329
|
allowLocalhostAsSecureOrigin?: boolean;
|
|
173
330
|
[key: string]: any;
|
|
174
331
|
}
|
|
175
|
-
interface IOneSignalOneSignal {
|
|
332
|
+
export interface IOneSignalOneSignal {
|
|
176
333
|
Slidedown: IOneSignalSlidedown;
|
|
177
334
|
Notifications: IOneSignalNotifications;
|
|
178
335
|
Session: IOneSignalSession;
|
|
@@ -184,7 +341,7 @@ interface IOneSignalOneSignal {
|
|
|
184
341
|
setConsentGiven(consent: boolean): Promise<void>;
|
|
185
342
|
setConsentRequired(requiresConsent: boolean): Promise<void>;
|
|
186
343
|
}
|
|
187
|
-
interface IOneSignalNotifications {
|
|
344
|
+
export interface IOneSignalNotifications {
|
|
188
345
|
permissionNative: NotificationPermission;
|
|
189
346
|
permission: boolean;
|
|
190
347
|
setDefaultUrl(url: string): Promise<void>;
|
|
@@ -194,7 +351,7 @@ interface IOneSignalNotifications {
|
|
|
194
351
|
addEventListener<K extends NotificationEventName>(event: K, listener: (obj: NotificationEventTypeMap[K]) => void): void;
|
|
195
352
|
removeEventListener<K extends NotificationEventName>(event: K, listener: (obj: NotificationEventTypeMap[K]) => void): void;
|
|
196
353
|
}
|
|
197
|
-
interface IOneSignalSlidedown {
|
|
354
|
+
export interface IOneSignalSlidedown {
|
|
198
355
|
promptPush(options?: AutoPromptOptions): Promise<void>;
|
|
199
356
|
promptPushCategories(options?: AutoPromptOptions): Promise<void>;
|
|
200
357
|
promptSms(options?: AutoPromptOptions): Promise<void>;
|
|
@@ -203,14 +360,14 @@ interface IOneSignalSlidedown {
|
|
|
203
360
|
addEventListener(event: SlidedownEventName, listener: (wasShown: boolean) => void): void;
|
|
204
361
|
removeEventListener(event: SlidedownEventName, listener: (wasShown: boolean) => void): void;
|
|
205
362
|
}
|
|
206
|
-
interface IOneSignalDebug {
|
|
363
|
+
export interface IOneSignalDebug {
|
|
207
364
|
setLogLevel(logLevel: string): void;
|
|
208
365
|
}
|
|
209
|
-
interface IOneSignalSession {
|
|
366
|
+
export interface IOneSignalSession {
|
|
210
367
|
sendOutcome(outcomeName: string, outcomeWeight?: number): Promise<void>;
|
|
211
368
|
sendUniqueOutcome(outcomeName: string): Promise<void>;
|
|
212
369
|
}
|
|
213
|
-
interface IOneSignalUser {
|
|
370
|
+
export interface IOneSignalUser {
|
|
214
371
|
onesignalId: string | undefined;
|
|
215
372
|
externalId: string | undefined;
|
|
216
373
|
PushSubscription: IOneSignalPushSubscription;
|
|
@@ -238,7 +395,7 @@ interface IOneSignalUser {
|
|
|
238
395
|
setLanguage(language: string): void;
|
|
239
396
|
getLanguage(): string;
|
|
240
397
|
}
|
|
241
|
-
interface IOneSignalPushSubscription {
|
|
398
|
+
export interface IOneSignalPushSubscription {
|
|
242
399
|
id: string | null | undefined;
|
|
243
400
|
token: string | null | undefined;
|
|
244
401
|
optedIn: boolean | undefined;
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAEA,MAAM,gBAAgB,GAAG,eAAe,CAAC;AACzC,MAAM,qBAAqB,GAAG,6DAA6D,CAAC;AAE5F,sDAAsD;AACtD,IAAI,sBAAsB,GAAG,KAAK,CAAC;AACnC,0EAA0E;AAC1E,mEAAmE;AACnE,kBAAkB;AAClB,IAAI,uBAAuB,GAAG,KAAK,CAAC;AAEpC,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;IACjC,MAAM,CAAC,iBAAiB,GAAG,MAAM,CAAC,iBAAiB,IAAI,EAAE,CAAC;IAC1D,YAAY,EAAE,CAAC;CAChB;AAED,mBAAmB;AAEnB,SAAS,aAAa;IACpB,uBAAuB,GAAG,IAAI,CAAC;AACjC,CAAC;AAED,SAAS,YAAY;IACnB,MAAM,MAAM,GAAG,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;IAChD,MAAM,CAAC,EAAE,GAAG,gBAAgB,CAAC;IAC7B,MAAM,CAAC,KAAK,GAAG,IAAI,CAAC;IACpB,MAAM,CAAC,GAAG,GAAG,qBAAqB,CAAC;IAEnC,wEAAwE;IACxE,0EAA0E;IAC1E,MAAM,CAAC,OAAO,GAAG,GAAG,EAAE;QACpB,aAAa,EAAE,CAAC;IAClB,CAAC,CAAA;IAED,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;AACpC,CAAC;AAoBD,gCAAgC;AAEhC;;GAEG;AACF,MAAM,IAAI,GAAG,CAAC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A,MAAA,MAAM,CAAC,SAAS,0CAAE,aAAa,0CAAE,UAAU,mCAAI,KAAK,CAAC,CAAC,CAAC;IAC1F,aAAa,EAAE,0BAA0B;IACzC,eAAe,EAAE,4BAA4B;IAC7C,eAAe;IACf,iBAAiB,EAAE,8BAA8B;IACjD,gBAAgB,EAAE,6BAA6B;IAC/C,mBAAmB,EAAE,gCAAgC;CACrD,CAAC;AAEF,MAAM,kBAAkB,GAAwB;IAC/C,KAAK,EAAE,cAAc;IACrB,MAAM,EAAE,eAAe;IACvB,IAAI;IACJ,eAAe,EAAE,wBAAwB;IACzC,kBAAkB,EAAE,2BAA2B;IAC/C,SAAS,EAAE,kBAAkB;IAC7B,aAAa,EAAE,sBAAsB;IACrC,OAAO,EAAE,gBAAgB;IACzB,IAAI,EAAE,aAAa;IACnB,KAAK,EAAE,cAAc;CACrB,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAG,GAAG,EAAE;IAC/B,OAAO,kBAAkB,CAAC;AAC5B,CAAC,CAAA;AAED,MAAM,kBAAkB,GAAG;IACzB,OAAO,CAAC,GAAQ,EAAE,OAAoB;QACpC,GAAG,CAAC,MAAM,CAAC,gBAAgB,CAAC,UAAU,GAAG,kBAAyC,CAAC;QACnF,GAAG,CAAC,MAAM,CAAC,gBAAgB,CAAC,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACvD,CAAC;CACF,CAAA;AAED,eAAe,kBAAkB,CAAC"}
|
package/index.ts
CHANGED
|
@@ -120,16 +120,16 @@ const isPushSupported = (): boolean => {
|
|
|
120
120
|
return isPushNotificationsSupported();
|
|
121
121
|
}
|
|
122
122
|
|
|
123
|
-
interface AutoPromptOptions { force?: boolean; forceSlidedownOverNative?: boolean; slidedownPromptOptions?: IOneSignalAutoPromptOptions; }
|
|
124
|
-
interface IOneSignalAutoPromptOptions { force?: boolean; forceSlidedownOverNative?: boolean; isInUpdateMode?: boolean; categoryOptions?: IOneSignalCategories; }
|
|
125
|
-
interface IOneSignalCategories { positiveUpdateButton: string; negativeUpdateButton: string; savingButtonText: string; errorButtonText: string; updateMessage: string; tags: IOneSignalTagCategory[]; }
|
|
126
|
-
interface IOneSignalTagCategory { tag: string; label: string; checked?: boolean; }
|
|
127
|
-
type PushSubscriptionNamespaceProperties = { id: string | null | undefined; token: string | null | undefined; optedIn: boolean; };
|
|
128
|
-
type SubscriptionChangeEvent = { previous: PushSubscriptionNamespaceProperties; current: PushSubscriptionNamespaceProperties; };
|
|
129
|
-
type NotificationEventName = 'click' | 'foregroundWillDisplay' | 'dismiss' | 'permissionChange' | 'permissionPromptDisplay';
|
|
130
|
-
type SlidedownEventName = 'slidedownShown';
|
|
131
|
-
type OneSignalDeferredLoadedCallback = (onesignal: IOneSignalOneSignal) => void;
|
|
132
|
-
interface IOSNotification {
|
|
123
|
+
export interface AutoPromptOptions { force?: boolean; forceSlidedownOverNative?: boolean; slidedownPromptOptions?: IOneSignalAutoPromptOptions; }
|
|
124
|
+
export interface IOneSignalAutoPromptOptions { force?: boolean; forceSlidedownOverNative?: boolean; isInUpdateMode?: boolean; categoryOptions?: IOneSignalCategories; }
|
|
125
|
+
export interface IOneSignalCategories { positiveUpdateButton: string; negativeUpdateButton: string; savingButtonText: string; errorButtonText: string; updateMessage: string; tags: IOneSignalTagCategory[]; }
|
|
126
|
+
export interface IOneSignalTagCategory { tag: string; label: string; checked?: boolean; }
|
|
127
|
+
export type PushSubscriptionNamespaceProperties = { id: string | null | undefined; token: string | null | undefined; optedIn: boolean; };
|
|
128
|
+
export type SubscriptionChangeEvent = { previous: PushSubscriptionNamespaceProperties; current: PushSubscriptionNamespaceProperties; };
|
|
129
|
+
export type NotificationEventName = 'click' | 'foregroundWillDisplay' | 'dismiss' | 'permissionChange' | 'permissionPromptDisplay';
|
|
130
|
+
export type SlidedownEventName = 'slidedownShown';
|
|
131
|
+
export type OneSignalDeferredLoadedCallback = (onesignal: IOneSignalOneSignal) => void;
|
|
132
|
+
export interface IOSNotification {
|
|
133
133
|
/**
|
|
134
134
|
* The OneSignal notification id;
|
|
135
135
|
* - Primary id on OneSignal's REST API and dashboard
|
|
@@ -191,7 +191,7 @@ interface IOSNotification {
|
|
|
191
191
|
readonly confirmDelivery: boolean;
|
|
192
192
|
}
|
|
193
193
|
|
|
194
|
-
interface IOSNotificationActionButton {
|
|
194
|
+
export interface IOSNotificationActionButton {
|
|
195
195
|
/**
|
|
196
196
|
* Any unique identifier to represent which button was clicked. This is typically passed back to the service worker
|
|
197
197
|
* and host page through events to identify which button was clicked.
|
|
@@ -212,12 +212,12 @@ interface IOSNotificationActionButton {
|
|
|
212
212
|
readonly launchURL?: string;
|
|
213
213
|
}
|
|
214
214
|
|
|
215
|
-
interface NotificationClickResult {
|
|
215
|
+
export interface NotificationClickResult {
|
|
216
216
|
readonly actionId?: string;
|
|
217
217
|
readonly url?: string;
|
|
218
218
|
}
|
|
219
219
|
|
|
220
|
-
type NotificationEventTypeMap = {
|
|
220
|
+
export type NotificationEventTypeMap = {
|
|
221
221
|
'click': NotificationClickEvent;
|
|
222
222
|
'foregroundWillDisplay': NotificationForegroundWillDisplayEvent;
|
|
223
223
|
'dismiss': NotificationDismissEvent;
|
|
@@ -225,37 +225,219 @@ type NotificationEventTypeMap = {
|
|
|
225
225
|
'permissionPromptDisplay': void;
|
|
226
226
|
};
|
|
227
227
|
|
|
228
|
-
interface NotificationForegroundWillDisplayEvent {
|
|
228
|
+
export interface NotificationForegroundWillDisplayEvent {
|
|
229
229
|
readonly notification: IOSNotification;
|
|
230
230
|
preventDefault(): void;
|
|
231
231
|
}
|
|
232
232
|
|
|
233
|
-
interface NotificationDismissEvent {
|
|
233
|
+
export interface NotificationDismissEvent {
|
|
234
234
|
notification: IOSNotification;
|
|
235
235
|
}
|
|
236
236
|
|
|
237
|
-
interface NotificationClickEvent {
|
|
237
|
+
export interface NotificationClickEvent {
|
|
238
238
|
readonly notification: IOSNotification;
|
|
239
239
|
readonly result: NotificationClickResult;
|
|
240
240
|
}
|
|
241
241
|
|
|
242
|
-
type UserChangeEvent = {
|
|
242
|
+
export type UserChangeEvent = {
|
|
243
243
|
current: UserNamespaceProperties;
|
|
244
244
|
};
|
|
245
|
-
type UserNamespaceProperties = {
|
|
245
|
+
export type UserNamespaceProperties = {
|
|
246
246
|
onesignalId: string | undefined;
|
|
247
247
|
externalId: string | undefined;
|
|
248
248
|
};
|
|
249
249
|
|
|
250
|
-
interface IInitObject {
|
|
250
|
+
export interface IInitObject {
|
|
251
251
|
appId: string;
|
|
252
252
|
subdomainName?: string;
|
|
253
253
|
requiresUserPrivacyConsent?: boolean;
|
|
254
|
-
promptOptions?:
|
|
255
|
-
|
|
256
|
-
|
|
254
|
+
promptOptions?: {
|
|
255
|
+
slidedown: {
|
|
256
|
+
prompts: {
|
|
257
|
+
/**
|
|
258
|
+
* Whether to automatically display the prompt.
|
|
259
|
+
* `true` will display the prompt based on the delay options.
|
|
260
|
+
* `false` will prevent the prompt from displaying until the Slidedowns methods are used.
|
|
261
|
+
*/
|
|
262
|
+
autoPrompt: boolean;
|
|
263
|
+
|
|
264
|
+
/**
|
|
265
|
+
* Only available for type: category. Up to 10 categories.
|
|
266
|
+
* @example
|
|
267
|
+
* categories: [{ tag: 'local_news', label: 'Local News' }] // The user will be tagged with local_news but will see "Local News" in the prompt.
|
|
268
|
+
*/
|
|
269
|
+
categories: {
|
|
270
|
+
/** Should identify the action. */
|
|
271
|
+
tag: string;
|
|
272
|
+
|
|
273
|
+
/** What the user will see. */
|
|
274
|
+
label: string;
|
|
275
|
+
}[];
|
|
276
|
+
|
|
277
|
+
/**
|
|
278
|
+
* The delay options for the prompt.
|
|
279
|
+
* @example delay: { pageViews: 3, timeDelay: 20 } // The user will not be shown the prompt until 20 seconds after the 3rd page view.
|
|
280
|
+
*/
|
|
281
|
+
delay: {
|
|
282
|
+
/** The number of pages a user needs to visit before the prompt is displayed. */
|
|
283
|
+
pageViews?: number;
|
|
284
|
+
|
|
285
|
+
/** The number of seconds a user needs to wait before the prompt is displayed.Both options must be satisfied for the prompt to display */
|
|
286
|
+
timeDelay?: number;
|
|
287
|
+
};
|
|
288
|
+
|
|
289
|
+
/**
|
|
290
|
+
* The text to display in the prompt.
|
|
291
|
+
*/
|
|
292
|
+
text?: {
|
|
293
|
+
/** The callout asking the user to opt-in. Up to 90 characters. */
|
|
294
|
+
actionMessage?: string;
|
|
295
|
+
|
|
296
|
+
/** Triggers the opt-in. Up to 15 characters. */
|
|
297
|
+
acceptButton?: string;
|
|
298
|
+
|
|
299
|
+
/** Cancels opt-in. Up to 15 characters. */
|
|
300
|
+
cancelMessage?: string;
|
|
301
|
+
|
|
302
|
+
/** The message of the confirmation prompt displayed after the email and/or phone number is provided. Up to 90 characters. */
|
|
303
|
+
confirmMessage?: string;
|
|
304
|
+
|
|
305
|
+
/** Identifies the email text field. Up to 15 characters. */
|
|
306
|
+
emailLabel?: string;
|
|
307
|
+
|
|
308
|
+
/** Cancels the category update. Up to 15 characters. */
|
|
309
|
+
negativeUpdateButton?: string;
|
|
310
|
+
|
|
311
|
+
/** Saves the updated category tags. Up to 15 characters. */
|
|
312
|
+
positiveUpdateButton?: string;
|
|
313
|
+
|
|
314
|
+
/** Identifies the phone number text field. Up to 15 characters. */
|
|
315
|
+
smsLabel?: string;
|
|
316
|
+
|
|
317
|
+
/** A different message shown to subscribers presented the prompt again to update categories. Up to 90 characters. */
|
|
318
|
+
updateMessage?: string;
|
|
319
|
+
};
|
|
320
|
+
|
|
321
|
+
/**
|
|
322
|
+
* The type of prompt to display.
|
|
323
|
+
* `push` which is the Slide Prompt without categories.
|
|
324
|
+
* `category` which is the Slide Prompt with categories.
|
|
325
|
+
* `sms` only asks for phone number.
|
|
326
|
+
* `email` only asks for email address.
|
|
327
|
+
* `smsAndEmail` asks for both phone number and email address.
|
|
328
|
+
*/
|
|
329
|
+
type: 'push' | 'category' | 'sms' | 'email' | 'smsAndEmail';
|
|
330
|
+
}[];
|
|
331
|
+
};
|
|
332
|
+
};
|
|
333
|
+
welcomeNotification?: {
|
|
334
|
+
/**
|
|
335
|
+
* Disables sending a welcome notification to new site visitors. If you want to disable welcome notifications, this is the only option you need.
|
|
336
|
+
*/
|
|
337
|
+
disabled?: boolean;
|
|
338
|
+
|
|
339
|
+
/**
|
|
340
|
+
* The welcome notification's message. You can localize this to your own language.
|
|
341
|
+
* If left blank or set to blank, the default of 'Thanks for subscribing!' will be used.
|
|
342
|
+
*/
|
|
343
|
+
message: string;
|
|
344
|
+
|
|
345
|
+
/**
|
|
346
|
+
* The welcome notification's title. You can localize this to your own language. If not set, or left blank, the site's title will be used.
|
|
347
|
+
* Set to one space ' ' to clear the title, although this is not recommended.
|
|
348
|
+
*/
|
|
349
|
+
title?: string;
|
|
350
|
+
|
|
351
|
+
/**
|
|
352
|
+
* By default, clicking the welcome notification does not open any link.
|
|
353
|
+
* This is recommended because the user has just visited your site and subscribed.
|
|
354
|
+
*/
|
|
355
|
+
url: string;
|
|
356
|
+
};
|
|
357
|
+
|
|
358
|
+
/**
|
|
359
|
+
* Will enable customization of the notify/subscription bell button.
|
|
360
|
+
*/
|
|
361
|
+
notifyButton?: {
|
|
362
|
+
/**
|
|
363
|
+
* A function you define that returns true to show the Subscription Bell, or false to hide it.
|
|
364
|
+
* Typically used the hide the Subscription Bell after the user is subscribed.
|
|
365
|
+
* This function is not re-evaluated on every state change; this function is only evaluated once when the Subscription Bell begins to show.
|
|
366
|
+
*/
|
|
367
|
+
displayPredicate?: () => boolean | Promise<boolean>;
|
|
368
|
+
|
|
369
|
+
/**
|
|
370
|
+
* Enable the Subscription Bell. The Subscription Bell is otherwise disabled by default.
|
|
371
|
+
*/
|
|
372
|
+
enable?: boolean;
|
|
373
|
+
|
|
374
|
+
/** Specify CSS-valid pixel offsets using bottom, left, and right. */
|
|
375
|
+
offset?: { bottom: string; left: string; right: string };
|
|
376
|
+
|
|
377
|
+
/**
|
|
378
|
+
* If `true`, the Subscription Bell will display an icon that there is 1 unread message.
|
|
379
|
+
* When hovering over the Subscription Bell, the user will see custom text set by message.prenotify.
|
|
380
|
+
*/
|
|
381
|
+
prenotify: boolean;
|
|
382
|
+
|
|
383
|
+
/** Either `bottom-left` or `bottom-right`. The Subscription Bell will be fixed at this location on your page. */
|
|
384
|
+
position?: 'bottom-left' | 'bottom-right';
|
|
385
|
+
|
|
386
|
+
/** Set `false` to hide the 'Powered by OneSignal' text in the Subscription Bell dialog popup. */
|
|
387
|
+
showCredit: boolean;
|
|
388
|
+
|
|
389
|
+
/**
|
|
390
|
+
* The Subscription Bell will initially appear at one of these sizes, and then shrink down to size `small` after the user subscribes.
|
|
391
|
+
*/
|
|
392
|
+
size?: 'small' | 'medium' | 'large';
|
|
393
|
+
|
|
394
|
+
/** Customize the Subscription Bell text. */
|
|
395
|
+
text: {
|
|
396
|
+
'dialog.blocked.message': string;
|
|
397
|
+
'dialog.blocked.title': string;
|
|
398
|
+
'dialog.main.button.subscribe': string;
|
|
399
|
+
'dialog.main.button.unsubscribe': string;
|
|
400
|
+
'dialog.main.title': string;
|
|
401
|
+
'message.action.resubscribed': string;
|
|
402
|
+
'message.action.subscribed': string;
|
|
403
|
+
'message.action.subscribing': string;
|
|
404
|
+
'message.action.unsubscribed': string;
|
|
405
|
+
'message.prenotify': string;
|
|
406
|
+
'tip.state.blocked': string;
|
|
407
|
+
'tip.state.subscribed': string;
|
|
408
|
+
'tip.state.unsubscribed': string;
|
|
409
|
+
};
|
|
410
|
+
};
|
|
411
|
+
|
|
257
412
|
persistNotification?: boolean;
|
|
258
|
-
webhooks?:
|
|
413
|
+
webhooks?: {
|
|
414
|
+
/**
|
|
415
|
+
* Enable this setting only if your server has CORS enabled and supports non-simple CORS requests.
|
|
416
|
+
* If this setting is disabled, your webhook will not need CORS to receive data, but it will not receive the custom headers.
|
|
417
|
+
* The simplest option is to leave it disabled.
|
|
418
|
+
* @default false
|
|
419
|
+
*/
|
|
420
|
+
cors: boolean;
|
|
421
|
+
|
|
422
|
+
/**
|
|
423
|
+
* This event occurs after a notification is clicked.
|
|
424
|
+
* @example https://site.com/hook
|
|
425
|
+
*/
|
|
426
|
+
'notification.clicked'?: string;
|
|
427
|
+
|
|
428
|
+
/**
|
|
429
|
+
* This event occurs after a notification is intentionally dismissed by the user (clicking the notification body or one of the notification action buttons does not trigger the dismissed webhook),
|
|
430
|
+
* after a group of notifications are all dismissed (with this notification as part of that group), or after a notification expires on its own time and disappears. This event is supported on Chrome only.
|
|
431
|
+
* @example https://site.com/hook
|
|
432
|
+
*/
|
|
433
|
+
'notification.dismissed'?: string;
|
|
434
|
+
|
|
435
|
+
/**
|
|
436
|
+
* This event occurs after a notification is displayed.
|
|
437
|
+
* @example https://site.com/hook
|
|
438
|
+
*/
|
|
439
|
+
'notification.willDisplay'?: string;
|
|
440
|
+
};
|
|
259
441
|
autoResubscribe?: boolean;
|
|
260
442
|
autoRegister?: boolean;
|
|
261
443
|
notificationClickHandlerMatch?: string;
|
|
@@ -269,7 +451,7 @@ interface IInitObject {
|
|
|
269
451
|
[key: string]: any;
|
|
270
452
|
}
|
|
271
453
|
|
|
272
|
-
interface IOneSignalOneSignal {
|
|
454
|
+
export interface IOneSignalOneSignal {
|
|
273
455
|
Slidedown: IOneSignalSlidedown;
|
|
274
456
|
Notifications: IOneSignalNotifications;
|
|
275
457
|
Session: IOneSignalSession;
|
|
@@ -281,7 +463,7 @@ interface IOneSignalOneSignal {
|
|
|
281
463
|
setConsentGiven(consent: boolean): Promise<void>;
|
|
282
464
|
setConsentRequired(requiresConsent: boolean): Promise<void>;
|
|
283
465
|
}
|
|
284
|
-
interface IOneSignalNotifications {
|
|
466
|
+
export interface IOneSignalNotifications {
|
|
285
467
|
permissionNative: NotificationPermission;
|
|
286
468
|
permission: boolean;
|
|
287
469
|
setDefaultUrl(url: string): Promise<void>;
|
|
@@ -291,7 +473,7 @@ interface IOneSignalNotifications {
|
|
|
291
473
|
addEventListener<K extends NotificationEventName>(event: K, listener: (obj: NotificationEventTypeMap[K]) => void): void;
|
|
292
474
|
removeEventListener<K extends NotificationEventName>(event: K, listener: (obj: NotificationEventTypeMap[K]) => void): void;
|
|
293
475
|
}
|
|
294
|
-
interface IOneSignalSlidedown {
|
|
476
|
+
export interface IOneSignalSlidedown {
|
|
295
477
|
promptPush(options?: AutoPromptOptions): Promise<void>;
|
|
296
478
|
promptPushCategories(options?: AutoPromptOptions): Promise<void>;
|
|
297
479
|
promptSms(options?: AutoPromptOptions): Promise<void>;
|
|
@@ -300,14 +482,14 @@ interface IOneSignalSlidedown {
|
|
|
300
482
|
addEventListener(event: SlidedownEventName, listener: (wasShown: boolean) => void): void;
|
|
301
483
|
removeEventListener(event: SlidedownEventName, listener: (wasShown: boolean) => void): void;
|
|
302
484
|
}
|
|
303
|
-
interface IOneSignalDebug {
|
|
485
|
+
export interface IOneSignalDebug {
|
|
304
486
|
setLogLevel(logLevel: string): void;
|
|
305
487
|
}
|
|
306
|
-
interface IOneSignalSession {
|
|
488
|
+
export interface IOneSignalSession {
|
|
307
489
|
sendOutcome(outcomeName: string, outcomeWeight?: number): Promise<void>;
|
|
308
490
|
sendUniqueOutcome(outcomeName: string): Promise<void>;
|
|
309
491
|
}
|
|
310
|
-
interface IOneSignalUser {
|
|
492
|
+
export interface IOneSignalUser {
|
|
311
493
|
onesignalId: string | undefined;
|
|
312
494
|
externalId: string | undefined;
|
|
313
495
|
PushSubscription: IOneSignalPushSubscription;
|
|
@@ -329,7 +511,7 @@ interface IOneSignalUser {
|
|
|
329
511
|
setLanguage(language: string): void;
|
|
330
512
|
getLanguage(): string;
|
|
331
513
|
}
|
|
332
|
-
interface IOneSignalPushSubscription {
|
|
514
|
+
export interface IOneSignalPushSubscription {
|
|
333
515
|
id: string | null | undefined;
|
|
334
516
|
token: string | null | undefined;
|
|
335
517
|
optedIn: boolean | undefined;
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onesignal/onesignal-vue3",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"description": "Vue 3 OneSignal Plugin: Make it easy to integrate OneSignal with your Vue App!",
|
|
5
|
-
"
|
|
5
|
+
"type": "module",
|
|
6
6
|
"contributors": [
|
|
7
7
|
{
|
|
8
8
|
"name": "Rodrigo Gomez-Palacio"
|
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
"main": "dist/index.js",
|
|
17
17
|
"types": "dist/index.d.ts",
|
|
18
18
|
"scripts": {
|
|
19
|
-
"lint": "
|
|
20
|
-
"build": "
|
|
21
|
-
"prepare": "
|
|
19
|
+
"lint": "eslint . --ext .ts",
|
|
20
|
+
"build": "npm run lint && tsc",
|
|
21
|
+
"prepare": "npm run build"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"vue": "^3.2.0"
|