@awesome-cordova-plugins/onesignal 7.0.0 → 8.0.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/ngx/bundle.js CHANGED
@@ -3,7 +3,7 @@
3
3
  var tslib = require('tslib');
4
4
  var i0 = require('@angular/core');
5
5
  var core = require('@awesome-cordova-plugins/core');
6
- var rxjs = require('rxjs');
6
+ require('rxjs');
7
7
 
8
8
  function _interopNamespaceDefault(e) {
9
9
  var n = Object.create(null);
@@ -24,7 +24,6 @@ function _interopNamespaceDefault(e) {
24
24
 
25
25
  var i0__namespace = /*#__PURE__*/_interopNamespaceDefault(i0);
26
26
 
27
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
28
27
  /**
29
28
  * ANDROID** - Privacy setting for how the notification should be shown on the lockscreen of Android 5+ devices.
30
29
  */
@@ -66,613 +65,75 @@ exports.OSActionType = void 0;
66
65
  OSActionType[OSActionType["Opened"] = 0] = "Opened";
67
66
  OSActionType[OSActionType["ActionTake"] = 1] = "ActionTake";
68
67
  })(exports.OSActionType || (exports.OSActionType = {}));
69
- class OneSignal extends core.AwesomeCordovaNativePlugin {
70
- constructor() {
71
- super(...arguments);
68
+ var OneSignal = /** @class */ (function (_super) {
69
+ tslib.__extends(OneSignal, _super);
70
+ function OneSignal() {
71
+ var _this = _super !== null && _super.apply(this, arguments) || this;
72
72
  /**
73
73
  * constants to use in inFocusDisplaying()
74
+ *
74
75
  * @hidden
75
76
  */
76
- this.OSInFocusDisplayOption = {
77
+ _this.OSInFocusDisplayOption = {
77
78
  None: 0,
78
79
  InAppAlert: 1,
79
80
  Notification: 2,
80
81
  };
81
- }
82
- /**
83
- * Start the initialization process. Once you are done configuring OneSignal, call the `endInit` function.
84
- * @param {string} appId Your OneSignal app id
85
- * @param {string} googleProjectNumber **ANDROID** - your Google project number; only required for Android GCM/FCM pushes.
86
- * @returns {any}
87
- */
88
- startInit(appId, googleProjectNumber) {
89
- return;
90
- }
91
- /**
92
- * Callback to run when a notification is received, whether it was displayed or not.
93
- * @returns {Observable<OneSignalReceivedNotification>}
94
- */
95
- handleNotificationReceived() {
96
- return;
97
- }
98
- /**
99
- * Callback to run when a notification is tapped on from the notification shade (**ANDROID**) or notification
100
- * center (**iOS**), or when closing an Alert notification shown in the app (if InAppAlert is enabled in
101
- * inFocusDisplaying).
102
- * @returns {Observable<OneSignalOpenedNotification>}
103
- */
104
- handleNotificationOpened() {
105
- return;
106
- }
107
- /**
108
- * Use to process an In-App Message the user just tapped on.
109
- * @returns {Observable<OSInAppMessageAction>}
110
- */
111
- handleInAppMessageClicked() {
112
- return;
113
- }
114
- /**
115
- * iOS** - Settings for iOS apps
116
- * @param settings
117
- * kOSSettingsKeyAutoPrompt: boolean = true
118
- * Auto prompt user for notification permissions.
119
- *
120
- * kOSSettingsKeyInAppLaunchURL: boolean = false
121
- * Launch notifications with a launch URL as an in app webview.
122
- * @param settings.kOSSettingsKeyAutoPrompt
123
- * @param settings.kOSSettingsKeyInAppLaunchURL
124
- * @returns {any}
125
- */
126
- iOSSettings(settings) {
127
- return;
128
- }
129
- /**
130
- * Must be called after `startInit` to complete initialization of OneSignal.
131
- * @returns {any}
132
- */
133
- endInit() {
134
- return;
135
- }
136
- /**
137
- * Prompt the user for notification permissions. Callback fires as soon as the user accepts or declines notifications.
138
- * @returns {Promise<boolean>}
139
- */
140
- promptForPushNotificationsWithUserResponse() {
141
- return;
142
- }
143
- /**
144
- * Retrieve a list of tags that have been set on the user from the OneSignal server.
145
- *
146
- * Quirk**: You must wait for `getTags` to resolve before calling it again, as the plugin will only process the last method call and discard any previous ones.
147
- * @returns {Promise<any>} Returns a Promise that resolves when tags are recieved.
148
- */
149
- getTags() {
150
- return;
151
- }
152
- /**
153
- * Lets you retrieve the OneSignal user id and device token.
154
- * Your handler is called after the device is successfully registered with OneSignal.
155
- * @returns {Promise<Object>} Returns a Promise that resolves if the device was successfully registered.
156
- *
157
- * userId {string} OneSignal userId is a UUID formatted string. (unique per device per app)
158
- *
159
- * pushToken {string} A push token is a Google/Apple assigned identifier(unique per device per app).
160
- */
161
- getIds() {
162
- return;
163
- }
164
- /**
165
- * Tag a user based on an app event of your choosing so later you can create segments on [onesignal.com](https://onesignal.com/) to target these users.
166
- * Recommend using sendTags over sendTag if you need to set more than one tag on a user at a time.
167
- * @param {string} Key of your choosing to create or update.
168
- * @param {string} Value to set on the key. NOTE: Passing in a blank String deletes the key, you can also call deleteTag.
169
- * @param key
170
- * @param value
171
- */
172
- sendTag(key, value) { }
173
- /**
174
- * Tag a user based on an app event of your choosing so later you can create segments on [onesignal.com](https://onesignal.com/) to target these users.
175
- * Recommend using sendTags over sendTag if you need to set more than one tag on a user at a time.
176
- * @param {string} Pass a json object with key/value pairs like: {key: "value", key2: "value2"}
177
- * @param json
178
- */
179
- sendTags(json) { }
180
- /**
181
- * Deletes a tag that was previously set on a user with `sendTag` or `sendTags`. Use `deleteTags` if you need to delete more than one.
182
- * @param {string} Key to remove.
183
- * @param key
184
- */
185
- deleteTag(key) { }
186
- /**
187
- * Deletes tags that were previously set on a user with `sendTag` or `sendTags`.
188
- * @param {string[]} Keys to remove.
189
- * @param keys
190
- */
191
- deleteTags(keys) { }
192
- /**
193
- * Call this when you would like to prompt an iOS user to accept push notifications with the default system prompt.
194
- * Only works if you set `kOSSettingsAutoPrompt` to `false` in `iOSSettings`
195
- */
196
- registerForPushNotifications() { }
197
- /**
198
- * Warning:
199
- * Only applies to Android and Amazon. You can call this from your UI from a button press for example to give your user's options for your notifications.
200
- *
201
- * By default OneSignal always vibrates the device when a notification is displayed unless the device is in a total silent mode.
202
- * Passing false means that the device will only vibrate lightly when the device is in it's vibrate only mode.
203
- * @param {boolean} false to disable vibrate, true to re-enable it.
204
- * @param enable
205
- */
206
- enableVibrate(enable) { }
207
- /**
208
- * Warning:
209
- * Only applies to Android and Amazon. You can call this from your UI from a button press for example to give your user's options for your notifications.
210
- *
211
- * By default OneSignal plays the system's default notification sound when the device's notification system volume is turned on.
212
- * Passing false means that the device will only vibrate unless the device is set to a total silent mode.
213
- * @param {boolean} false to disable sound, true to re-enable it.
214
- * @param enable
215
- */
216
- enableSound(enable) { }
217
- /**
218
- *
219
- *Setting to control how OneSignal notifications will be shown when one is received while your app is in focus. By default this is set to inAppAlert, which can be helpful during development.
220
- * @param {DisplayType} displayOption
221
- * @returns {any}
222
- */
223
- inFocusDisplaying(displayOption) {
224
- return;
225
- }
226
- /**
227
- * You can call this method with false to opt users out of receiving all notifications through OneSignal.
228
- * You can pass true later to opt users back into notifications.
229
- * @param {boolean} enable
230
- */
231
- setSubscription(enable) { }
232
- /**
233
- * Get the current notification and permission state. Returns a OSPermissionSubscriptionState type described below.
234
- * @returns {Promise<OSPermissionSubscriptionState>}
235
- */
236
- getPermissionSubscriptionState() {
237
- return;
238
- }
239
- /**
240
- *
241
- * @param {notificationObj} Parameters see POST [documentation](https://documentation.onesignal.com/v2.0/docs/notifications-create-notification)
242
- * @param notificationObj
243
- * @returns {Promise<any>} Returns a Promise that resolves if the notification was send successfully.
244
- */
245
- postNotification(notificationObj) {
246
- return;
247
- }
248
- /**
249
- * Cancels a single OneSignal notification based on its Android notification integer id. Use instead of NotificationManager.cancel(id); otherwise the notification will be restored when your app is restarted.
250
- * @param notificationId {string}
251
- */
252
- cancelNotification(notificationId) { }
253
- /**
254
- * Prompts the user for location permission to allow geotagging based on the "Location radius" filter on the OneSignal dashboard.
255
- */
256
- promptLocation() { }
257
- /**
258
- *
259
- * @param email {string}
260
- */
261
- syncHashedEmail(email) { }
262
- /**
263
- * Enable logging to help debug if you run into an issue setting up OneSignal.
264
- * The logging levels are as follows: 0 = None, 1= Fatal, 2 = Errors, 3 = Warnings, 4 = Info, 5 = Debug, 6 = Verbose
265
- *
266
- * The higher the value the more information is shown.
267
- * @param {loglevel} contains two properties: logLevel (for console logging) and visualLevel (for dialog messages)
268
- * @param logLevel
269
- * @param logLevel.logLevel
270
- * @param logLevel.visualLevel
271
- */
272
- setLogLevel(logLevel) { }
273
- /**
274
- * Disable or enable location collection (Defaults to enabled) if your app has location permission.
275
- * @param shared {boolean}
276
- */
277
- setLocationShared(shared) { }
278
- /**
279
- * The passed in function will be fired when a notification permission setting changes.
280
- * This includes the following events:
281
- * - Notification permission prompt shown
282
- * - The user accepting or declining the permission prompt
283
- * - Enabling/disabling notifications for your app in the device Settings after returning to your app.
284
- * @returns {Observable<any>}
285
- */
286
- addPermissionObserver() {
287
- return;
288
- }
289
- /**
290
- * The passed in function will be fired when a notification subscription property changes.
291
- * This includes the following events:
292
- * - Getting a push token from Apple / Google.
293
- * - Getting a player / user id from OneSignal
294
- * - OneSignal.setSubscription is called
295
- * - User disables or enables notifications
296
- * @returns {Observable<any>}
297
- */
298
- addSubscriptionObserver() {
299
- return;
300
- }
301
- /**
302
- * Clears all OneSignal notifications
303
- * @param email
304
- * @param emailAuthToken
305
- */
306
- setEmail(email, emailAuthToken) {
307
- return;
308
- }
309
- /**
310
- * If your app implements logout functionality, you can call logoutEmail to dissociate the email from the device
311
- */
312
- logoutEmail() {
313
- return;
314
- }
315
- /**
316
- * The passed in function will be fired when a notification subscription property changes.
317
- * This includes the following events:
318
- * - Getting a push token from Apple / Google.
319
- * - Getting a player / user id from OneSignal
320
- * - OneSignal.setSubscription is called
321
- * - User disables or enables notifications
322
- * @returns {Observable<any>}
323
- */
324
- addEmailSubscriptionObserver() {
325
- return;
326
- }
327
- /**
328
- * Clears all OneSignal notifications
329
- */
330
- clearOneSignalNotifications() { }
331
- /**
332
- * Allows you to delay the initialization of the SDK until the user provides privacy consent.
333
- * The SDK will not be fully initialized until the provideUserConsent(true) method is called.
334
- * @param {boolean} required
335
- */
336
- setRequiresUserPrivacyConsent(required) { }
337
- /**
338
- * If your application is set to require the user's privacy consent, you can provide this consent using this method.
339
- * Until you call provideUserConsent(true), the SDK will not fully initialize and will not send any data to OneSignal.
340
- * @param {boolean} granted
341
- */
342
- provideUserConsent(granted) { }
343
- /**
344
- * Accepts a callback, which returns a boolean variable indicating if the user has given privacy consent yet.
345
- * @param {Function} callback
346
- */
347
- userProvidedPrivacyConsent(callback) { }
348
- /**
349
- * Allows you to use your own system's user ID's to send push notifications to your users.
350
- * To tie a user to a given user ID, you can use this method.
351
- * @param {string} externalId
352
- */
353
- setExternalUserId(externalId) { }
354
- /**
355
- * Removes whatever was set as the current user's external user ID.
356
- */
357
- removeExternalUserId() { }
358
- /**
359
- * Add a trigger. May show an In-App Message if its trigger conditions were met.
360
- * @param {string} key Key for the trigger.
361
- * @param {string | number | Object} value Value for the trigger. String or number recommended. Object passed in will be converted to a string.
362
- */
363
- addTrigger(key, value) { }
364
- /**
365
- * Add a map of triggers. May show an In-App Message if its trigger conditions were met.
366
- * @param {Object.<string, string | number | Object>} triggers Allows you to set multiple trigger key/value pairs simultaneously. Pass a json object with key/value pairs like: `{"key": "value", "key2": "value2"}`.
367
- */
368
- addTriggers(triggers) { }
369
- /**
370
- * Removes a single trigger for the given key. May show an In-App Message if its trigger conditions were met.
371
- * @param {string} key Key for trigger to remove.
372
- */
373
- removeTriggerForKey(key) { }
374
- /**
375
- * Removes a list of triggers based on a collection (array) of keys. May show an In-App Message if its trigger conditions were met.
376
- * @param {string[]} keys Removes a collection of triggers from their keys. Pass an array of trigger keys like: `["key1", "key2", "key3"]`.
377
- */
378
- removeTriggersForKeys(keys) { }
379
- /**
380
- * Gets a trigger value for a provided trigger key.
381
- * @param {string} key Key for trigger to get value.
382
- * @returns {Promise<string | number | Object>} Return value set with `addTrigger`, or `null`/`nil` (iOS) if never set or removed.
383
- */
384
- getTriggerValueForKey(key) {
385
- return;
386
- }
387
- /**
388
- * Allows you to temporarily pause all In-App Messages. You may want to do this while the user is engaged in an activity that you don't want a message to interrupt (such as watching a video).
389
- * An In-App Message that would display if not paused will display right after resume if its conditions to display remains satisfied.
390
- * @param {boolean} pause To pause, set `true`. To resume, set `false`.
391
- */
392
- pauseInAppMessages(pause) { }
393
- }
394
- OneSignal.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0__namespace, type: OneSignal, deps: null, target: i0__namespace.ɵɵFactoryTarget.Injectable });
395
- OneSignal.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0__namespace, type: OneSignal });
396
- tslib.__decorate([
397
- Cordova({ sync: true }),
398
- tslib.__metadata("design:type", Function),
399
- tslib.__metadata("design:paramtypes", [String, String]),
400
- tslib.__metadata("design:returntype", Object)
401
- ], OneSignal.prototype, "startInit", null);
402
- tslib.__decorate([
403
- Cordova({
404
- observable: true,
405
- }),
406
- tslib.__metadata("design:type", Function),
407
- tslib.__metadata("design:paramtypes", []),
408
- tslib.__metadata("design:returntype", typeof (_a = typeof rxjs.Observable !== "undefined" && rxjs.Observable) === "function" ? _a : Object)
409
- ], OneSignal.prototype, "handleNotificationReceived", null);
410
- tslib.__decorate([
411
- Cordova({
412
- observable: true,
413
- }),
414
- tslib.__metadata("design:type", Function),
415
- tslib.__metadata("design:paramtypes", []),
416
- tslib.__metadata("design:returntype", typeof (_b = typeof rxjs.Observable !== "undefined" && rxjs.Observable) === "function" ? _b : Object)
417
- ], OneSignal.prototype, "handleNotificationOpened", null);
418
- tslib.__decorate([
419
- Cordova({
420
- observable: true,
421
- }),
422
- tslib.__metadata("design:type", Function),
423
- tslib.__metadata("design:paramtypes", []),
424
- tslib.__metadata("design:returntype", typeof (_c = typeof rxjs.Observable !== "undefined" && rxjs.Observable) === "function" ? _c : Object)
425
- ], OneSignal.prototype, "handleInAppMessageClicked", null);
426
- tslib.__decorate([
427
- Cordova({
428
- sync: true,
429
- platforms: ['iOS'],
430
- }),
431
- tslib.__metadata("design:type", Function),
432
- tslib.__metadata("design:paramtypes", [Object]),
433
- tslib.__metadata("design:returntype", Object)
434
- ], OneSignal.prototype, "iOSSettings", null);
435
- tslib.__decorate([
436
- Cordova({ sync: true }),
437
- tslib.__metadata("design:type", Function),
438
- tslib.__metadata("design:paramtypes", []),
439
- tslib.__metadata("design:returntype", Object)
440
- ], OneSignal.prototype, "endInit", null);
441
- tslib.__decorate([
442
- Cordova({
443
- platforms: ['iOS'],
444
- }),
445
- tslib.__metadata("design:type", Function),
446
- tslib.__metadata("design:paramtypes", []),
447
- tslib.__metadata("design:returntype", typeof (_d = typeof Promise !== "undefined" && Promise) === "function" ? _d : Object)
448
- ], OneSignal.prototype, "promptForPushNotificationsWithUserResponse", null);
449
- tslib.__decorate([
450
- Cordova(),
451
- tslib.__metadata("design:type", Function),
452
- tslib.__metadata("design:paramtypes", []),
453
- tslib.__metadata("design:returntype", typeof (_e = typeof Promise !== "undefined" && Promise) === "function" ? _e : Object)
454
- ], OneSignal.prototype, "getTags", null);
455
- tslib.__decorate([
456
- Cordova(),
457
- tslib.__metadata("design:type", Function),
458
- tslib.__metadata("design:paramtypes", []),
459
- tslib.__metadata("design:returntype", typeof (_f = typeof Promise !== "undefined" && Promise) === "function" ? _f : Object)
460
- ], OneSignal.prototype, "getIds", null);
461
- tslib.__decorate([
462
- Cordova({ sync: true }),
463
- tslib.__metadata("design:type", Function),
464
- tslib.__metadata("design:paramtypes", [String, String]),
465
- tslib.__metadata("design:returntype", void 0)
466
- ], OneSignal.prototype, "sendTag", null);
467
- tslib.__decorate([
468
- Cordova({ sync: true }),
469
- tslib.__metadata("design:type", Function),
470
- tslib.__metadata("design:paramtypes", [Object]),
471
- tslib.__metadata("design:returntype", void 0)
472
- ], OneSignal.prototype, "sendTags", null);
473
- tslib.__decorate([
474
- Cordova({ sync: true }),
475
- tslib.__metadata("design:type", Function),
476
- tslib.__metadata("design:paramtypes", [String]),
477
- tslib.__metadata("design:returntype", void 0)
478
- ], OneSignal.prototype, "deleteTag", null);
479
- tslib.__decorate([
480
- Cordova({ sync: true }),
481
- tslib.__metadata("design:type", Function),
482
- tslib.__metadata("design:paramtypes", [Array]),
483
- tslib.__metadata("design:returntype", void 0)
484
- ], OneSignal.prototype, "deleteTags", null);
485
- tslib.__decorate([
486
- Cordova({ sync: true }),
487
- tslib.__metadata("design:type", Function),
488
- tslib.__metadata("design:paramtypes", []),
489
- tslib.__metadata("design:returntype", void 0)
490
- ], OneSignal.prototype, "registerForPushNotifications", null);
491
- tslib.__decorate([
492
- Cordova({ sync: true }),
493
- tslib.__metadata("design:type", Function),
494
- tslib.__metadata("design:paramtypes", [Boolean]),
495
- tslib.__metadata("design:returntype", void 0)
496
- ], OneSignal.prototype, "enableVibrate", null);
497
- tslib.__decorate([
498
- Cordova({ sync: true }),
499
- tslib.__metadata("design:type", Function),
500
- tslib.__metadata("design:paramtypes", [Boolean]),
501
- tslib.__metadata("design:returntype", void 0)
502
- ], OneSignal.prototype, "enableSound", null);
503
- tslib.__decorate([
504
- Cordova({ sync: true }),
505
- tslib.__metadata("design:type", Function),
506
- tslib.__metadata("design:paramtypes", [typeof (_g = typeof exports.OSDisplayType !== "undefined" && exports.OSDisplayType) === "function" ? _g : Object]),
507
- tslib.__metadata("design:returntype", Object)
508
- ], OneSignal.prototype, "inFocusDisplaying", null);
509
- tslib.__decorate([
510
- Cordova({ sync: true }),
511
- tslib.__metadata("design:type", Function),
512
- tslib.__metadata("design:paramtypes", [Boolean]),
513
- tslib.__metadata("design:returntype", void 0)
514
- ], OneSignal.prototype, "setSubscription", null);
515
- tslib.__decorate([
516
- Cordova(),
517
- tslib.__metadata("design:type", Function),
518
- tslib.__metadata("design:paramtypes", []),
519
- tslib.__metadata("design:returntype", typeof (_h = typeof Promise !== "undefined" && Promise) === "function" ? _h : Object)
520
- ], OneSignal.prototype, "getPermissionSubscriptionState", null);
521
- tslib.__decorate([
522
- Cordova(),
523
- tslib.__metadata("design:type", Function),
524
- tslib.__metadata("design:paramtypes", [typeof (_j = typeof OSNotification !== "undefined" && OSNotification) === "function" ? _j : Object]),
525
- tslib.__metadata("design:returntype", typeof (_k = typeof Promise !== "undefined" && Promise) === "function" ? _k : Object)
526
- ], OneSignal.prototype, "postNotification", null);
527
- tslib.__decorate([
528
- Cordova({ sync: true }),
529
- tslib.__metadata("design:type", Function),
530
- tslib.__metadata("design:paramtypes", [String]),
531
- tslib.__metadata("design:returntype", void 0)
532
- ], OneSignal.prototype, "cancelNotification", null);
533
- tslib.__decorate([
534
- Cordova({ sync: true }),
535
- tslib.__metadata("design:type", Function),
536
- tslib.__metadata("design:paramtypes", []),
537
- tslib.__metadata("design:returntype", void 0)
538
- ], OneSignal.prototype, "promptLocation", null);
539
- tslib.__decorate([
540
- Cordova({ sync: true }),
541
- tslib.__metadata("design:type", Function),
542
- tslib.__metadata("design:paramtypes", [String]),
543
- tslib.__metadata("design:returntype", void 0)
544
- ], OneSignal.prototype, "syncHashedEmail", null);
545
- tslib.__decorate([
546
- Cordova({ sync: true }),
547
- tslib.__metadata("design:type", Function),
548
- tslib.__metadata("design:paramtypes", [Object]),
549
- tslib.__metadata("design:returntype", void 0)
550
- ], OneSignal.prototype, "setLogLevel", null);
551
- tslib.__decorate([
552
- Cordova({ sync: true }),
553
- tslib.__metadata("design:type", Function),
554
- tslib.__metadata("design:paramtypes", [Boolean]),
555
- tslib.__metadata("design:returntype", void 0)
556
- ], OneSignal.prototype, "setLocationShared", null);
557
- tslib.__decorate([
558
- Cordova({
559
- observable: true,
560
- }),
561
- tslib.__metadata("design:type", Function),
562
- tslib.__metadata("design:paramtypes", []),
563
- tslib.__metadata("design:returntype", typeof (_l = typeof rxjs.Observable !== "undefined" && rxjs.Observable) === "function" ? _l : Object)
564
- ], OneSignal.prototype, "addPermissionObserver", null);
565
- tslib.__decorate([
566
- Cordova({
567
- observable: true,
568
- }),
569
- tslib.__metadata("design:type", Function),
570
- tslib.__metadata("design:paramtypes", []),
571
- tslib.__metadata("design:returntype", typeof (_m = typeof rxjs.Observable !== "undefined" && rxjs.Observable) === "function" ? _m : Object)
572
- ], OneSignal.prototype, "addSubscriptionObserver", null);
573
- tslib.__decorate([
574
- Cordova(),
575
- tslib.__metadata("design:type", Function),
576
- tslib.__metadata("design:paramtypes", [String, String]),
577
- tslib.__metadata("design:returntype", typeof (_o = typeof Promise !== "undefined" && Promise) === "function" ? _o : Object)
578
- ], OneSignal.prototype, "setEmail", null);
579
- tslib.__decorate([
580
- Cordova(),
581
- tslib.__metadata("design:type", Function),
582
- tslib.__metadata("design:paramtypes", []),
583
- tslib.__metadata("design:returntype", typeof (_p = typeof Promise !== "undefined" && Promise) === "function" ? _p : Object)
584
- ], OneSignal.prototype, "logoutEmail", null);
585
- tslib.__decorate([
586
- Cordova({
587
- observable: true,
588
- }),
589
- tslib.__metadata("design:type", Function),
590
- tslib.__metadata("design:paramtypes", []),
591
- tslib.__metadata("design:returntype", typeof (_q = typeof rxjs.Observable !== "undefined" && rxjs.Observable) === "function" ? _q : Object)
592
- ], OneSignal.prototype, "addEmailSubscriptionObserver", null);
593
- tslib.__decorate([
594
- Cordova({ sync: true }),
595
- tslib.__metadata("design:type", Function),
596
- tslib.__metadata("design:paramtypes", []),
597
- tslib.__metadata("design:returntype", void 0)
598
- ], OneSignal.prototype, "clearOneSignalNotifications", null);
599
- tslib.__decorate([
600
- Cordova(),
601
- tslib.__metadata("design:type", Function),
602
- tslib.__metadata("design:paramtypes", [Boolean]),
603
- tslib.__metadata("design:returntype", void 0)
604
- ], OneSignal.prototype, "setRequiresUserPrivacyConsent", null);
605
- tslib.__decorate([
606
- Cordova(),
607
- tslib.__metadata("design:type", Function),
608
- tslib.__metadata("design:paramtypes", [Boolean]),
609
- tslib.__metadata("design:returntype", void 0)
610
- ], OneSignal.prototype, "provideUserConsent", null);
611
- tslib.__decorate([
612
- Cordova(),
613
- tslib.__metadata("design:type", Function),
614
- tslib.__metadata("design:paramtypes", [typeof (_r = typeof Function !== "undefined" && Function) === "function" ? _r : Object]),
615
- tslib.__metadata("design:returntype", void 0)
616
- ], OneSignal.prototype, "userProvidedPrivacyConsent", null);
617
- tslib.__decorate([
618
- Cordova(),
619
- tslib.__metadata("design:type", Function),
620
- tslib.__metadata("design:paramtypes", [String]),
621
- tslib.__metadata("design:returntype", void 0)
622
- ], OneSignal.prototype, "setExternalUserId", null);
623
- tslib.__decorate([
624
- Cordova(),
625
- tslib.__metadata("design:type", Function),
626
- tslib.__metadata("design:paramtypes", []),
627
- tslib.__metadata("design:returntype", void 0)
628
- ], OneSignal.prototype, "removeExternalUserId", null);
629
- tslib.__decorate([
630
- Cordova({
631
- sync: true,
632
- }),
633
- tslib.__metadata("design:type", Function),
634
- tslib.__metadata("design:paramtypes", [String, Object]),
635
- tslib.__metadata("design:returntype", void 0)
636
- ], OneSignal.prototype, "addTrigger", null);
637
- tslib.__decorate([
638
- Cordova({
639
- sync: true,
640
- }),
641
- tslib.__metadata("design:type", Function),
642
- tslib.__metadata("design:paramtypes", [typeof (_s = typeof Object !== "undefined" && Object) === "function" ? _s : Object]),
643
- tslib.__metadata("design:returntype", void 0)
644
- ], OneSignal.prototype, "addTriggers", null);
645
- tslib.__decorate([
646
- Cordova({
647
- sync: true,
648
- }),
649
- tslib.__metadata("design:type", Function),
650
- tslib.__metadata("design:paramtypes", [String]),
651
- tslib.__metadata("design:returntype", void 0)
652
- ], OneSignal.prototype, "removeTriggerForKey", null);
653
- tslib.__decorate([
654
- Cordova({
655
- sync: true,
656
- }),
657
- tslib.__metadata("design:type", Function),
658
- tslib.__metadata("design:paramtypes", [Array]),
659
- tslib.__metadata("design:returntype", void 0)
660
- ], OneSignal.prototype, "removeTriggersForKeys", null);
661
- tslib.__decorate([
662
- Cordova(),
663
- tslib.__metadata("design:type", Function),
664
- tslib.__metadata("design:paramtypes", [String]),
665
- tslib.__metadata("design:returntype", typeof (_t = typeof Promise !== "undefined" && Promise) === "function" ? _t : Object)
666
- ], OneSignal.prototype, "getTriggerValueForKey", null);
667
- tslib.__decorate([
668
- Cordova({
669
- sync: true,
670
- }),
671
- tslib.__metadata("design:type", Function),
672
- tslib.__metadata("design:paramtypes", [Boolean]),
673
- tslib.__metadata("design:returntype", void 0)
674
- ], OneSignal.prototype, "pauseInAppMessages", null);
675
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0__namespace, type: OneSignal, decorators: [{
82
+ return _this;
83
+ }
84
+ OneSignal.prototype.startInit = function (appId, googleProjectNumber) { return core.cordova(this, "startInit", { "sync": true }, arguments); };
85
+ OneSignal.prototype.handleNotificationReceived = function () { return core.cordova(this, "handleNotificationReceived", { "observable": true }, arguments); };
86
+ OneSignal.prototype.handleNotificationOpened = function () { return core.cordova(this, "handleNotificationOpened", { "observable": true }, arguments); };
87
+ OneSignal.prototype.handleInAppMessageClicked = function () { return core.cordova(this, "handleInAppMessageClicked", { "observable": true }, arguments); };
88
+ OneSignal.prototype.iOSSettings = function (settings) { return core.cordova(this, "iOSSettings", { "sync": true, "platforms": ["iOS"] }, arguments); };
89
+ OneSignal.prototype.endInit = function () { return core.cordova(this, "endInit", { "sync": true }, arguments); };
90
+ OneSignal.prototype.promptForPushNotificationsWithUserResponse = function () { return core.cordova(this, "promptForPushNotificationsWithUserResponse", { "platforms": ["iOS"] }, arguments); };
91
+ OneSignal.prototype.getTags = function () { return core.cordova(this, "getTags", {}, arguments); };
92
+ OneSignal.prototype.getIds = function () { return core.cordova(this, "getIds", {}, arguments); };
93
+ OneSignal.prototype.sendTag = function (key, value) { return core.cordova(this, "sendTag", { "sync": true }, arguments); };
94
+ OneSignal.prototype.sendTags = function (json) { return core.cordova(this, "sendTags", { "sync": true }, arguments); };
95
+ OneSignal.prototype.deleteTag = function (key) { return core.cordova(this, "deleteTag", { "sync": true }, arguments); };
96
+ OneSignal.prototype.deleteTags = function (keys) { return core.cordova(this, "deleteTags", { "sync": true }, arguments); };
97
+ OneSignal.prototype.registerForPushNotifications = function () { return core.cordova(this, "registerForPushNotifications", { "sync": true }, arguments); };
98
+ OneSignal.prototype.enableVibrate = function (enable) { return core.cordova(this, "enableVibrate", { "sync": true }, arguments); };
99
+ OneSignal.prototype.enableSound = function (enable) { return core.cordova(this, "enableSound", { "sync": true }, arguments); };
100
+ OneSignal.prototype.inFocusDisplaying = function (displayOption) { return core.cordova(this, "inFocusDisplaying", { "sync": true }, arguments); };
101
+ OneSignal.prototype.setSubscription = function (enable) { return core.cordova(this, "setSubscription", { "sync": true }, arguments); };
102
+ OneSignal.prototype.getPermissionSubscriptionState = function () { return core.cordova(this, "getPermissionSubscriptionState", {}, arguments); };
103
+ OneSignal.prototype.postNotification = function (notificationObj) { return core.cordova(this, "postNotification", {}, arguments); };
104
+ OneSignal.prototype.cancelNotification = function (notificationId) { return core.cordova(this, "cancelNotification", { "sync": true }, arguments); };
105
+ OneSignal.prototype.promptLocation = function () { return core.cordova(this, "promptLocation", { "sync": true }, arguments); };
106
+ OneSignal.prototype.syncHashedEmail = function (email) { return core.cordova(this, "syncHashedEmail", { "sync": true }, arguments); };
107
+ OneSignal.prototype.setLogLevel = function (logLevel) { return core.cordova(this, "setLogLevel", { "sync": true }, arguments); };
108
+ OneSignal.prototype.setLocationShared = function (shared) { return core.cordova(this, "setLocationShared", { "sync": true }, arguments); };
109
+ OneSignal.prototype.addPermissionObserver = function () { return core.cordova(this, "addPermissionObserver", { "observable": true }, arguments); };
110
+ OneSignal.prototype.addSubscriptionObserver = function () { return core.cordova(this, "addSubscriptionObserver", { "observable": true }, arguments); };
111
+ OneSignal.prototype.setEmail = function (email, emailAuthToken) { return core.cordova(this, "setEmail", {}, arguments); };
112
+ OneSignal.prototype.logoutEmail = function () { return core.cordova(this, "logoutEmail", {}, arguments); };
113
+ OneSignal.prototype.addEmailSubscriptionObserver = function () { return core.cordova(this, "addEmailSubscriptionObserver", { "observable": true }, arguments); };
114
+ OneSignal.prototype.clearOneSignalNotifications = function () { return core.cordova(this, "clearOneSignalNotifications", { "sync": true }, arguments); };
115
+ OneSignal.prototype.setRequiresUserPrivacyConsent = function (required) { return core.cordova(this, "setRequiresUserPrivacyConsent", {}, arguments); };
116
+ OneSignal.prototype.provideUserConsent = function (granted) { return core.cordova(this, "provideUserConsent", {}, arguments); };
117
+ OneSignal.prototype.userProvidedPrivacyConsent = function (callback) { return core.cordova(this, "userProvidedPrivacyConsent", {}, arguments); };
118
+ OneSignal.prototype.setExternalUserId = function (externalId) { return core.cordova(this, "setExternalUserId", {}, arguments); };
119
+ OneSignal.prototype.removeExternalUserId = function () { return core.cordova(this, "removeExternalUserId", {}, arguments); };
120
+ OneSignal.prototype.addTrigger = function (key, value) { return core.cordova(this, "addTrigger", { "sync": true }, arguments); };
121
+ OneSignal.prototype.addTriggers = function (triggers) { return core.cordova(this, "addTriggers", { "sync": true }, arguments); };
122
+ OneSignal.prototype.removeTriggerForKey = function (key) { return core.cordova(this, "removeTriggerForKey", { "sync": true }, arguments); };
123
+ OneSignal.prototype.removeTriggersForKeys = function (keys) { return core.cordova(this, "removeTriggersForKeys", { "sync": true }, arguments); };
124
+ OneSignal.prototype.getTriggerValueForKey = function (key) { return core.cordova(this, "getTriggerValueForKey", {}, arguments); };
125
+ OneSignal.prototype.pauseInAppMessages = function (pause) { return core.cordova(this, "pauseInAppMessages", { "sync": true }, arguments); };
126
+ OneSignal.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: OneSignal, deps: null, target: i0__namespace.ɵɵFactoryTarget.Injectable });
127
+ OneSignal.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: OneSignal });
128
+ OneSignal.pluginName = "OneSignal";
129
+ OneSignal.plugin = "onesignal-cordova-plugin";
130
+ OneSignal.pluginRef = "plugins.OneSignal";
131
+ OneSignal.repo = "https://github.com/OneSignal/OneSignal-Cordova-SDK";
132
+ OneSignal.platforms = ["Amazon Fire OS", "Android", "iOS", "Windows"];
133
+ OneSignal = tslib.__decorate([], OneSignal);
134
+ return OneSignal;
135
+ }(core.AwesomeCordovaNativePlugin));
136
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: OneSignal, decorators: [{
676
137
  type: i0.Injectable
677
138
  }], propDecorators: { startInit: [], handleNotificationReceived: [], handleNotificationOpened: [], handleInAppMessageClicked: [], iOSSettings: [], endInit: [], promptForPushNotificationsWithUserResponse: [], getTags: [], getIds: [], sendTag: [], sendTags: [], deleteTag: [], deleteTags: [], registerForPushNotifications: [], enableVibrate: [], enableSound: [], inFocusDisplaying: [], setSubscription: [], getPermissionSubscriptionState: [], postNotification: [], cancelNotification: [], promptLocation: [], syncHashedEmail: [], setLogLevel: [], setLocationShared: [], addPermissionObserver: [], addSubscriptionObserver: [], setEmail: [], logoutEmail: [], addEmailSubscriptionObserver: [], clearOneSignalNotifications: [], setRequiresUserPrivacyConsent: [], provideUserConsent: [], userProvidedPrivacyConsent: [], setExternalUserId: [], removeExternalUserId: [], addTrigger: [], addTriggers: [], removeTriggerForKey: [], removeTriggersForKeys: [], getTriggerValueForKey: [], pauseInAppMessages: [] } });
678
139