{"_id":"@awesome-cordova-library/onesignal","_rev":"3-4417e11d1e7f8a1c2dfc166c605c6112","name":"@awesome-cordova-library/onesignal","dist-tags":{"latest":"1.0.3"},"versions":{"1.0.0":{"name":"@awesome-cordova-library/onesignal","version":"1.0.0","description":"OneSignal is a free email, sms, push notification, and in-app message service for mobile apps. This plugin makes it easy to integrate your Cordova based (e.g. Ionic, PhoneGap, and PhoneGap Build app with OneSignal.","main":"lib/index.js","types":"lib/index.d.ts","keywords":["cordova","capacitor","ionic","javascript","mobile","notification","push","notification push","reactjs"],"publishConfig":{"access":"public"},"author":{"name":"Jordan AZOULAY","email":"jazoulay@joazco.com","url":"https://github.com/joazco"},"license":"SEE LICENSE IN LICENSE","repository":{"type":"git","url":"git://github.com/joazco/awesome-cordova-library.git"},"bugs":{"url":"https://github.com/joazco/awesome-cordova-library/issues"},"homepage":"https://github.com/joazco/awesome-cordova-library","devDependencies":{"@types/jest":"^27.5.1","@types/react":"~17.0.21","jest":"^28.1.0","prettier":"^2.6.2","ts-jest":"^28.0.3","tslint":"^6.1.3","tslint-config-prettier":"^1.18.0","typescript":"^4.7.2"},"scripts":{"build":"rm -rf lib/ && tsc","build-yalc":"npm run build; yalc publish --push --private","test":"jest --config jestconfig.json","format":"prettier --write \"src/**/*.ts\"","lint":"tslint -p tsconfig.json","prepublish":"npm run format; npm run lint; npm test; npm run build"},"directories":{"lib":"lib"},"dependencies":{"onesignal-cordova-plugin":"^3.2.0"},"gitHead":"d01ddea977e58476f41ebf57e43a9acbf1f6b51f","_id":"@awesome-cordova-library/onesignal@1.0.0","_nodeVersion":"16.18.0","_npmVersion":"8.19.2","dist":{"integrity":"sha512-DINeA0+39GPR++HMAzX2af14gDS31eKUs4H3BpF6rbJtHTS/02oT0Ys5XIJbEFLBkBPuNLT7Rmllbk+bZMBujg==","shasum":"af6041e2b2168b352d4ec76abd57e8e936e4e7b3","tarball":"https://registry.npmjs.org/@awesome-cordova-library/onesignal/-/onesignal-1.0.0.tgz","fileCount":7,"unpackedSize":75312,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCRt+383dz4DdNsjbp73LfFcKopzFpeicS49BfQ6yAYBgIgBOZJ5ZoPZCTQV0ma//prAmSeK1yc1sT8oh3oFVEP3wU="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjdJ0WACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpafg//VA2DjnPiS4u4otfCX2HYK/uROc/cFLN+fzFRkzbww39sZ2bf\r\nKlaEYRQ2UfUaupOOehwDVuONYWV6jam63ZPF0pxH8+9wa/aTnCA90179WgMw\r\njlGW8KuPQBxTdmz4mKUcfPRgLgXxNxsDbRlfKyAy0wYyhh45uEgDhuUJgG2W\r\n5zt5rbFbzZdBUYTJkMR9GukfXuZUe19KsFgdBtZFHY8wP3Oii5yjPLtV8tzJ\r\nmZZjWm69QoAs2ALn18LqOjk998q//8sUU6ycC5xf5fOxQvaGNOiELe0YFUUA\r\ni1vr5LqOKgsuZkSqqg34o34MivhIySITKMWQgtCsqqo+oxm5xgPnAioTZEHA\r\nlfoRpPFMIdoYz2pi4qk2yRBnBYZ1mNO5wT7PA/9F59IASkoR1akYobKWhbyq\r\nDXNHcTR+y4e3wbrWRQWS2tBcn9KloCk3Y2tX7h02J1MLsvxmLspQ7SRUqfec\r\nqEIS0UEZFuw5MJlfeyOewuYhkpt0p0qqqmYVAscmxnqpwvsVkdj/t0592Qr7\r\nruyqQpD76DIDWYT1JGpbTKiFf4ywS5gf0MTbGEvBrR/1+F9fLKwhcwjkr3Ft\r\nzN0ru6hEZKwH707vUWNez4TimcowYFnMzw8SprWGCeErchDFEb/QK0/BJ+YN\r\nbOqko04fh9d8rp9WUHUleYNrCk9ji7/wuP0=\r\n=/9MI\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"joazco","email":"jazoulay@joazco.com"},"maintainers":[{"name":"joazco","email":"jazoulay@joazco.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/onesignal_1.0.0_1668586774257_0.8975741799766761"},"_hasShrinkwrap":false},"1.0.1":{"name":"@awesome-cordova-library/onesignal","version":"1.0.1","description":"OneSignal is a free email, sms, push notification, and in-app message service for mobile apps. This plugin makes it easy to integrate your Cordova based (e.g. Ionic, PhoneGap, and PhoneGap Build app with OneSignal.","main":"lib/index.js","types":"lib/index.d.ts","keywords":["cordova","capacitor","ionic","javascript","mobile","notification","push","notification push","reactjs"],"publishConfig":{"access":"public"},"author":{"name":"Jordan AZOULAY","email":"jazoulay@joazco.com","url":"https://github.com/joazco"},"license":"SEE LICENSE IN LICENSE","repository":{"type":"git","url":"git://github.com/joazco/awesome-cordova-library.git"},"bugs":{"url":"https://github.com/joazco/awesome-cordova-library/issues"},"homepage":"https://github.com/joazco/awesome-cordova-library","devDependencies":{"@types/jest":"^27.5.1","@types/react":"~17.0.21","jest":"^28.1.0","prettier":"^2.6.2","ts-jest":"^28.0.3","tslint":"^6.1.3","tslint-config-prettier":"^1.18.0","typescript":"^4.7.2"},"scripts":{"build":"rm -rf lib/ && tsc","build-yalc":"npm run build; yalc publish --push --private","test":"jest --config jestconfig.json","format":"prettier --write \"src/**/*.ts\"","lint":"tslint -p tsconfig.json","prepublish":"npm run format; npm run lint; npm test; npm run build"},"directories":{"lib":"lib"},"dependencies":{"onesignal-cordova-plugin":"^3.2.0"},"gitHead":"1f1966a8fbf6260c115fa904b1401319f15a7a7e","_id":"@awesome-cordova-library/onesignal@1.0.1","_nodeVersion":"16.18.0","_npmVersion":"8.19.2","dist":{"integrity":"sha512-X8e8jXkMZo6lIovS7AOkKV4ECNh3+dv2K7eXhSajAyNBzYY9ZiIvUP8QfEcJqmeTcZXtVGiU5912ta1rqFUEqg==","shasum":"cd08664ceda6a4c172762edeab3173eca535eeba","tarball":"https://registry.npmjs.org/@awesome-cordova-library/onesignal/-/onesignal-1.0.1.tgz","fileCount":7,"unpackedSize":75372,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDAlzjogp3LjZ3Q3411+cUe7kyX3f5quQlvKdfAMpxwZAiEAnBT2oGMzmrTztaeisc5PzEzvmR6WyYX0OhoF7AydzlU="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjdKDlACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpkXxAAnOEbYqXyTLXJf2rwBWci1+bHlmCEevh96NEJUSo56Jrge2FZ\r\nGvyAkbKI/tbuauXJWiqVxnTohqFZ1tkoJ/IZfIEc2m2vScq7Rw1OMKr6iY7F\r\nTly+jehkQocVgZLe+VQ5g7vLMr8+kft5SWj4Kh+QzpVIfSCaQ9rZtRvmxMNG\r\ncOTuHeyXCYcv8mr3OrmyiMa9pbv4BJnYgR+vPm8Y5kLYO3k2SR5LmawZX3xE\r\nXNpASpuwN93mGN6INM28OG+OFP8Ex67eqEyjIOG4CQULvYfk2H17Ao1+ewRx\r\ntbet/6m2wV7Lh+d4yI3nsw/401R/1EAfZhT4aa95yn4cA1HJY0KPG8lowp/9\r\nvg71CYIk5CtocwqxzGRksrxkt518Ph5/soJj/6MNqXb2V+aCNbJoZcASpOtf\r\nRkkjH87qkS1j7bsTY07Rlek/QDAbTQnEh4xcaB9cYk1+xbKV/H0t5gFQH3mo\r\nmZHPFjDSnB8Yt0vjOjrH2GD9CmAUjJ3LMWIvkosb2eVdOCpI4sfkMdt7J0iY\r\nyJVtWVwxlvnk4T0hHTw5rDdkZDy0OC30jKO69tcZ83ruzTq+8BQy63Ry2uj0\r\nI/eD9eGWhgipJzQdxGVBIlerYem8mdsHDX4/pYlj8FwwspoAXHfgZWiIUIid\r\nWrwdPp/vQKjhU2VnI1YsuEJqtAunyDIgUHo=\r\n=r2Jd\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"joazco","email":"jazoulay@joazco.com"},"maintainers":[{"name":"joazco","email":"jazoulay@joazco.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/onesignal_1.0.1_1668587749649_0.2896476570561848"},"_hasShrinkwrap":false},"1.0.2":{"name":"@awesome-cordova-library/onesignal","version":"1.0.2","description":"OneSignal is a free email, sms, push notification, and in-app message service for mobile apps. This plugin makes it easy to integrate your Cordova based (e.g. Ionic, PhoneGap, and PhoneGap Build app with OneSignal.","main":"lib/index.js","types":"lib/index.d.ts","keywords":["cordova","capacitor","ionic","javascript","mobile","notification","push","notification push","reactjs"],"publishConfig":{"access":"public"},"author":{"name":"Jordan AZOULAY","email":"jazoulay@joazco.com","url":"https://github.com/joazco"},"license":"SEE LICENSE IN LICENSE","repository":{"type":"git","url":"git://github.com/joazco/awesome-cordova-library.git"},"bugs":{"url":"https://github.com/joazco/awesome-cordova-library/issues"},"homepage":"https://github.com/joazco/awesome-cordova-library","devDependencies":{"@types/jest":"^27.5.1","@types/react":"~17.0.21","jest":"^28.1.0","prettier":"^2.6.2","ts-jest":"^28.0.3","tslint":"^6.1.3","tslint-config-prettier":"^1.18.0","typescript":"^4.7.2"},"scripts":{"build":"rm -rf lib/ && tsc","build-yalc":"npm run build; yalc publish --push --private","test":"jest --config jestconfig.json","format":"prettier --write \"src/**/*.ts\"","lint":"tslint -p tsconfig.json","prepublish":"npm run format; npm run lint; npm test; npm run build"},"directories":{"lib":"lib"},"dependencies":{"onesignal-cordova-plugin":"^3.2.0"},"gitHead":"3bd3b84582de137e250eef985d98abd1ad586fd0","_id":"@awesome-cordova-library/onesignal@1.0.2","_nodeVersion":"16.18.0","_npmVersion":"8.19.2","dist":{"integrity":"sha512-NKROBQHauin5epsJlon5REC6LNDevCbIj1K+jP3jpVo3c+X4uoNQIgM457AK2WprE0dLsPXOgGUfJsHgSeLrdw==","shasum":"44657dbf9ca1f4941c5a48fd7c309cca7b27a6e8","tarball":"https://registry.npmjs.org/@awesome-cordova-library/onesignal/-/onesignal-1.0.2.tgz","fileCount":7,"unpackedSize":75370,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBoBgpPMdQAY6CkTMsUKLSqfHu+UhzhYmtqz3S+HJK07AiBK9mEODJsj0BWm7xGGzmUrmTf3zP3JMbEgNnvvy15N2Q=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjdKGwACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqlBQ//S49wjt8LIJak9AiL2W03XHKloHMSsSzgdTR7o1mMDnB8dfIB\r\nsgnI/HbNSv85+y8QATpKuKYaGe1gcuhwwiLjb49t5COgMHDrKH8+gvDWMYHv\r\nmpTMxDy+7hjMq8SvuV350lkXv+iPksL0QPOlEyQQnpK0LGqWXZG/pUbveQSv\r\nOS010wfvIPyuNbXe1ytrf2IlHKH7CRd44qaqq5HLbYd+WHv3psGEvWQc4MMs\r\nkxYI8km/Dp4hJIhWhKTxV/L2QRoEHX8ztSJ0fs0Q9qRq0s10EZaBpBJRFTn4\r\no5SkZSArdqq+XDE152XzKZuMp/Y9eTuCEkmN38fKImvK9IY4BxvDMXPmARfP\r\nf0+fFzVtr3QvtdOg+hfO2NlObMKG9CehQeuTcoOLjtnvY3JKGtJsHDxuokgm\r\nzBfinnrrzVA1fDtI4H+ii83RRV6fmrvfwLYWMJ8U7ztNAXF/fHCMzpLI2j8/\r\nCZTA8FylJALSPdQ7EsqoA8W8vcQqtd5cb/jgIESO6UwV9EC4DQ21K/RjXmsM\r\nnqiN03aAO8cq1t5IqutQP31/LgzwtgazqMQSCIL9LanpDFwmevGRSVnDddFV\r\nTyJvOfleQPnEtwBDwObyS5EhGc/qJOt8UtCcDjq+uRojPz9hYGZz0KCv4zhN\r\n/6s49b1sd4UE1Ul9+rBhtNLo7B9lgU8WQ7Q=\r\n=taqO\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"joazco","email":"jazoulay@joazco.com"},"maintainers":[{"name":"joazco","email":"jazoulay@joazco.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/onesignal_1.0.2_1668587951974_0.11465123491849938"},"_hasShrinkwrap":false},"1.0.3":{"name":"@awesome-cordova-library/onesignal","version":"1.0.3","description":"OneSignal is a free email, sms, push notification, and in-app message service for mobile apps. This plugin makes it easy to integrate your Cordova based (e.g. Ionic, PhoneGap, and PhoneGap Build app with OneSignal.","main":"lib/index.js","types":"lib/index.d.ts","keywords":["cordova","capacitor","ionic","javascript","mobile","notification","push","notification push","reactjs"],"publishConfig":{"access":"public"},"author":{"name":"Jordan AZOULAY","email":"jazoulay@joazco.com","url":"https://github.com/joazco"},"license":"SEE LICENSE IN LICENSE","repository":{"type":"git","url":"git://github.com/joazco/awesome-cordova-library.git"},"bugs":{"url":"https://github.com/joazco/awesome-cordova-library/issues"},"homepage":"https://github.com/joazco/awesome-cordova-library","devDependencies":{"@types/jest":"^27.5.1","@types/react":"~17.0.21","jest":"^28.1.0","prettier":"^2.6.2","ts-jest":"^28.0.3","tslint":"^6.1.3","tslint-config-prettier":"^1.18.0","typescript":"^4.7.2"},"scripts":{"build":"rm -rf lib/ && tsc","build-yalc":"npm run build; yalc publish --push --private","test":"jest --config jestconfig.json","format":"prettier --write \"src/**/*.ts\"","lint":"tslint -p tsconfig.json","prepublish":"npm run format; npm run lint; npm test; npm run build"},"directories":{"lib":"lib"},"dependencies":{"onesignal-cordova-plugin":"^3.2.0"},"gitHead":"2a2b9cf007a870056251632315547e6a651d26a0","_id":"@awesome-cordova-library/onesignal@1.0.3","_nodeVersion":"16.20.0","_npmVersion":"8.19.4","dist":{"integrity":"sha512-OGPACtz/G1Fgr9QbhPltMpGyNhn0KESDDQmKzjHnsTSxo8pc8Kvm2/r0R0eps+AfjZ0TakopiOw/Eg3E/wet/g==","shasum":"78a56ae5d2061abe223a61972d5badb91e77a865","tarball":"https://registry.npmjs.org/@awesome-cordova-library/onesignal/-/onesignal-1.0.3.tgz","fileCount":7,"unpackedSize":76050,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHuIRBB3P9l9hY3F9fcybq29+q3DBDCGFYw7pq6U/WGjAiEAxtTjRFPBQirvG3lq3bJd6AgPOOrnjUJzbbvata+5AQw="}]},"_npmUser":{"name":"joazco","email":"jazoulay@joazco.com"},"maintainers":[{"name":"joazco","email":"jazoulay@joazco.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/onesignal_1.0.3_1694499034958_0.07011701346693422"},"_hasShrinkwrap":false}},"time":{"created":"2022-11-16T08:19:34.181Z","1.0.0":"2022-11-16T08:19:34.478Z","modified":"2023-09-12T06:10:35.419Z","1.0.1":"2022-11-16T08:35:49.799Z","1.0.2":"2022-11-16T08:39:12.209Z","1.0.3":"2023-09-12T06:10:35.217Z"},"maintainers":[{"name":"joazco","email":"jazoulay@joazco.com"}],"description":"OneSignal is a free email, sms, push notification, and in-app message service for mobile apps. This plugin makes it easy to integrate your Cordova based (e.g. Ionic, PhoneGap, and PhoneGap Build app with OneSignal.","homepage":"https://github.com/joazco/awesome-cordova-library","keywords":["cordova","capacitor","ionic","javascript","mobile","notification","push","notification push","reactjs"],"repository":{"type":"git","url":"git://github.com/joazco/awesome-cordova-library.git"},"author":{"name":"Jordan AZOULAY","email":"jazoulay@joazco.com","url":"https://github.com/joazco"},"bugs":{"url":"https://github.com/joazco/awesome-cordova-library/issues"},"license":"SEE LICENSE IN LICENSE","readme":"---\nid: plugin-onesignal\ntitle: Onesignal\ntags:\n  - cordova\n  - capacitor\n  - ionic\n  - javascript\n  - typescript\n  - plugin\n  - mobile\n  - onesignal\n  - notification\n  - notification push\n---\n\n# Onesignal\n\nOneSignal is a free email, sms, push notification, and in-app message service for mobile apps. This plugin makes it easy to integrate your Cordova based (e.g. Ionic, PhoneGap, and PhoneGap Build app with OneSignal.\n\n[Online documentation](https://awesomecordovalibrary.com)\n\n[Onesignal documentation](https://documentation.onesignal.com/docs/cordova-sdk-setup)\n\n## Installation\n\n### Cordova\n\n```sh\ncordova plugin add onesignal-cordova-plugin\nnpm install @awesome-cordova-library/onesignal\n```\n\n### Capacitor / Ionic\n\n```bash\nnpm install onesignal-cordova-plugin\nnpm install @awesome-cordova-library/onesignal\nnpx cap sync\n```\n\n## Vanilla\n\n### Declaration\n\n```typescript\nclass Onesignal {\n  static setAppId(appId: string): void;\n  /**\n   * Set the callback to run just before displaying a notification while the app is in focus.\n   * @param  {(event:NotificationReceivedEvent)=>void} handler\n   * @returns void\n   */\n  static setNotificationWillShowInForegroundHandler(\n    handler: (event: NotificationReceivedEvent) => void\n  ): void;\n  /**\n   * Set the callback to run on notification open.\n   * @param  {(openedEvent:OpenedEvent) => void} handler\n   * @returns void\n   */\n  static setNotificationOpenedHandler(\n    handler: (openedEvent: OpenedEvent) => void\n  ): void;\n  /**\n   * Sets an In-App Message click event handler.\n   * @param  {(action:InAppMessageAction)=>void} handler\n   * @returns void\n   */\n  static setInAppMessageClickHandler(\n    handler: (action: InAppMessageAction) => void\n  ): void;\n  /**\n   * Sets the In-App Message lifecycle handler object to run on displaying and/or dismissing an In-App Message.\n   * @param  {InAppMessageLifecycleHandlerObject} handlerObject\n   * @returns void\n   */\n  static setInAppMessageLifecycleHandler(\n    handlerObject: InAppMessageLifecycleHandlerObject\n  ): void;\n  /**\n   * This method returns a \"snapshot\" of the device state for when it was called.\n   * @param  {(response: DeviceState) => void} handler\n   * @returns void\n   */\n  static getDeviceState(handler: (response: DeviceState) => void): void;\n  /**\n   * Allows you to set the app defined language with the OneSignal SDK.\n   * @param  {string} language\n   * @param  {(success:object)=>void} onSuccess\n   * @param  {(failure:object)=>void} onFailure\n   * @returns void\n   */\n  static setLanguage(\n    language: string,\n    onSuccess?: (success: object) => void,\n    onFailure?: (failure: object) => void\n  ): void;\n  /**\n   * Add a callback that fires when the OneSignal subscription state changes.\n   * @param  {(event:ChangeEvent<SubscriptionChange>)=>void} observer\n   * @returns void\n   */\n  static addSubscriptionObserver(\n    observer: (event: ChangeEvent<SubscriptionChange>) => void\n  ): void;\n  /**\n   * Add a callback that fires when the OneSignal email subscription changes.\n   * @param  {(event:ChangeEvent<EmailSubscriptionChange>)=>void} observer\n   * @returns void\n   */\n  static addEmailSubscriptionObserver(\n    observer: (event: ChangeEvent<EmailSubscriptionChange>) => void\n  ): void;\n  /**\n   * Add a callback that fires when the OneSignal sms subscription changes.\n   * @param  {(event:ChangeEvent<SMSSubscriptionChange>)=>void} observer\n   * @returns void\n   */\n  static addSMSSubscriptionObserver(\n    observer: (event: ChangeEvent<SMSSubscriptionChange>) => void\n  ): void;\n  /**\n   * Add a callback that fires when the native push permission changes.\n   * @param  {(event:ChangeEvent<PermissionChange>)=>void} observer\n   * @returns void\n   */\n  static addPermissionObserver(\n    observer: (event: ChangeEvent<PermissionChange>) => void\n  ): void;\n  /**\n   * Retrieve a list of tags that have been set on the user from the OneSignal server.\n   * @param  {(tags:object)=>void} handler\n   * @returns void\n   */\n  static getTags(handler: (tags: object) => void): void;\n  /**\n   * Tag a user based on an app event of your choosing so they can be targeted later via segments.\n   * @param  {string} key\n   * @param  {string} value\n   * @returns void\n   */\n  static sendTag(key: string, value: string): void;\n  /**\n   * Deletes multiple tags that were previously set on a user.\n   * @param  {string[]} keys\n   * @returns void\n   */\n  static deleteTags(keys: string[]): void;\n  /**\n   * Only applies to iOS (does nothing on Android as it always silently registers)\n   * Call only if you passed false to autoRegister\n   * Request for Direct-To-History push notification authorization\n   *\n   * For more information: https://documentation.onesignal.com/docs/ios-customizations#provisional-push-notifications\n   *\n   * @param  {(response:{accepted:boolean})=>void} handler\n   * @returns void\n   */\n  static registerForProvisionalAuthorization(\n    handler?: (response: { accepted: boolean }) => void\n  ): void;\n  /**\n   * Prompts the user for push notifications permission in iOS and Android 13+.\n   * Use the fallbackToSettings parameter to prompt to open the settings app if a user has already declined push permissions.\n   *\n   * Call with promptForPushNotificationsWithUserResponse(fallbackToSettings?, handler?)\n   *\n   * @param  {boolean} fallbackToSettings\n   * @param  {(response:boolean)=>void} handler\n   * @returns void\n   */\n  static promptForPushNotificationsWithUserResponse(\n    fallbackToSettingsOrHandler?: boolean | ((response: boolean) => void),\n    handler?: (response: boolean) => void\n  ): void;\n  /**\n   * Android Only. iOS provides a standard way to clear notifications by clearing badge count.\n   * @returns void\n   */\n  static clearOneSignalNotifications(): void;\n  /**\n   * Android Only. If notifications are disabled for your application, unsubscribe the user from OneSignal.\n   * @param  {boolean} unsubscribe\n   * @returns void\n   */\n  static unsubscribeWhenNotificationsAreDisabled(unsubscribe: boolean): void;\n  /**\n   * Removes a single OneSignal notification based on its Android notification integer id.\n   * @param  {number} id - notification id to cancel\n   * @returns void\n   */\n  static removeNotification(id: number): void;\n  /**\n   * Removes all OneSignal notifications based on its Android notification group Id.\n   * @param  {string} id - notification group id to cancel\n   * @returns void\n   */\n  static removeGroupedNotifications(id: string): void;\n  /**\n   * Disable the push notification subscription to OneSignal.\n   * @param  {boolean} disable\n   * @returns void\n   */\n  static disablePush(disable: boolean): void;\n  /**\n   * Send a notification\n   * @param  {object} notificationObject - JSON payload (see REST API reference)\n   * @param  {(success:object)=>void} onSuccess\n   * @param  {(failure:object)=>void} onFailure\n   * @returns void\n   */\n  static postNotification(\n    notificationObject: object,\n    onSuccess?: (success: object) => void,\n    onFailure?: (failure: object) => void\n  ): void;\n  /**\n   * iOS only.\n   * This method can be used to set if launch URLs should be opened within the application or in Safari.\n   * @param  {boolean} isEnabled - false will open the link in Safari or user's default browser\n   * @returns void\n   */\n  static setLaunchURLsInApp(isEnabled: boolean): void;\n  /**\n   * Enable logging to help debug if you run into an issue setting up OneSignal.\n   * @param  {LogLevel} nsLogLevel - Sets the logging level to print to the Android LogCat log or Xcode log.\n   * @param  {LogLevel} visualLogLevel - Sets the logging level to show as alert dialogs.\n   * @returns void\n   */\n  static setLogLevel(nsLogLevel: LogLevel, visualLogLevel: LogLevel): void;\n  /**\n   * Did the user provide privacy consent for GDPR purposes.\n   * @param  {(response: boolean) => void} handler\n   * @returns void\n   */\n  static userProvidedPrivacyConsent(handler: (response: boolean) => void): void;\n  /**\n   * True if the application requires user privacy consent, false otherwise\n   * Passes a boolean on Android and passes an object on iOS to the handler.\n   *\n   * @param  {(response: boolean | {value: boolean}) => void} handler\n   * @returns void\n   */\n  static requiresUserPrivacyConsent(\n    handler: (\n      response:\n        | boolean\n        | {\n            value: boolean;\n          }\n    ) => void\n  ): void;\n  /**\n   * For GDPR users, your application should call this method before setting the App ID.\n   * @param  {boolean} required\n   * @returns void\n   */\n  static setRequiresUserPrivacyConsent(required: boolean): void;\n  /**\n   * If your application is set to require the user's privacy consent, you can provide this consent using this method.\n   * @param  {boolean} granted\n   * @returns void\n   */\n  static provideUserConsent(granted: boolean): void;\n  /**\n   * Allows you to set the user's email address with the OneSignal SDK.\n   * @param  {string} email\n   * @param  {string} authCode\n   * @param  {Function} onSuccess\n   * @param  {Function} onFailure\n   * @returns void\n   */\n  static setEmail(\n    email: string,\n    authCode?: string,\n    onSuccess?: Function,\n    onFailure?: Function\n  ): void;\n  /**\n   * If your app implements logout functionality, you can call logoutEmail to dissociate the email from the device.\n   * @param  {Function} onSuccess\n   * @param  {Function} onFailure\n   * @returns void\n   */\n  static logoutEmail(onSuccess?: Function, onFailure?: Function): void;\n  /**\n   * Allows you to set the user's SMS number with the OneSignal SDK.\n   * @param  {string} smsNumber\n   * @param  {string} authCode\n   * @param  {Function} onSuccess\n   * @param  {Function} onFailure\n   * @returns void\n   */\n  static setSMSNumber(\n    smsNumber: string,\n    authCode?: string,\n    onSuccess?: Function,\n    onFailure?: Function\n  ): void;\n  /**\n   * If your app implements logout functionality, you can call logoutSMSNumber to dissociate the SMS number from the device.\n   * @param  {Function} onSuccess\n   * @param  {Function} onFailure\n   * @returns void\n   */\n  static logoutSMSNumber(onSuccess?: Function, onFailure?: Function): void;\n  /**\n   * Allows you to use your own system's user ID's to send push notifications to your users.\n   *\n   * Possible function usages:\n   * setExternalUserId(externalId: string?): void\n   * setExternalUserId(externalId: string?, handler: function?): void\n   * setExternalUserId(externalId: string?, externalIdAuthCode: string?, handler: function?): void\n   *\n   * @param  {string} externalId\n   * @param  {string} externalIdAuthCode\n   * @param  {(results:object) => void} handler\n   * @returns void\n   */\n  static setExternalUserId(\n    externalId: string | null,\n    handlerOrAuth?: ((results: object) => void) | string,\n    handler?: (results: object) => void\n  ): void;\n  /**\n   * Removes whatever was set as the current user's external user ID.\n   * @param  {(results:object)=>void} handler\n   * @returns void\n   */\n  static removeExternalUserId(handler?: (results: object) => void): void;\n  /**\n   * Adds Multiple In-App Message Triggers.\n   * @param  {[key: string]: string | number | boolean} triggers\n   * @returns void\n   */\n  static addTriggers(triggers: {\n    [key: string]: string | number | boolean;\n  }): void;\n  /**\n   * Add an In-App Message Trigger.\n   * @param  {string} key\n   * @param  {string | number | boolean} value\n   * @returns void\n   */\n  static addTrigger(key: string, value: string | number | boolean): void;\n  /**\n   * Removes a list of triggers based on a key.\n   * @param  {string} key\n   * @returns void\n   */\n  static removeTriggerForKey(key: string): void;\n  /**\n   * Removes a list of triggers based on a collection of keys.\n   * @param  {string[]} keys\n   * @returns void\n   */\n  static removeTriggersForKeys(keys: string[]): void;\n  /**\n   * Gets a trigger value for a provided trigger key.\n   * @param  {string} key\n   * @param  {(value: string) => void} handler\n   * @returns void\n   */\n  static getTriggerValueForKey(\n    key: string,\n    handler: (value: string) => void\n  ): void;\n  /**\n   * Pause & unpause In-App Messages\n   * @param  {boolean} pause\n   * @returns void\n   */\n  static pauseInAppMessages(pause: boolean): void;\n  /**\n   * Increases the \"Count\" of this Outcome by 1 and will be counted each time sent.\n   * @param  {string} name\n   * @param  {(event:OutcomeEvent)=>void} handler\n   * @returns void\n   */\n  static sendOutcome(\n    name: string,\n    handler?: (event: OutcomeEvent) => void\n  ): void;\n  /**\n   * Increases \"Count\" by 1 only once. This can only be attributed to a single notification.\n   * @param  {string} name\n   * @param  {(event:OutcomeEvent)=>void} handler\n   * @returns void\n   */\n  static sendUniqueOutcome(\n    name: string,\n    handler?: (event: OutcomeEvent) => void\n  ): void;\n  /**\n   * Increases the \"Count\" of this Outcome by 1 and the \"Sum\" by the value. Will be counted each time sent.\n   * If the method is called outside of an attribution window, it will be unattributed until a new session occurs.\n   * @param  {string} name\n   * @param  {string|number} value\n   * @param  {(event:OutcomeEvent)=>void} handler\n   * @returns void\n   */\n  static sendOutcomeWithValue(\n    name: string,\n    value: string | number,\n    handler?: (event: OutcomeEvent) => void\n  ): void;\n  /**\n   * Prompts the user for location permissions to allow geotagging from the OneSignal dashboard.\n   * @returns void\n   */\n  static promptLocation(): void;\n  /**\n   * Disable or enable location collection (defaults to enabled if your app has location permission).\n   * @param  {boolean} shared\n   * @returns void\n   */\n  static setLocationShared(shared: boolean): void;\n  /**\n   * True if the application has location share activated, false otherwise\n   * Passes a boolean on Android and passes an object on iOS to the handler.\n   *\n   * @param  {(response: boolean | {value: boolean}) => void} handler\n   * @returns void\n   */\n  static isLocationShared(\n    handler: (\n      response:\n        | boolean\n        | {\n            value: boolean;\n          }\n    ) => void\n  ): void;\n}\nexport {\n  LogLevel,\n  InAppMessageAction,\n  InAppMessageLifecycleHandlerObject,\n  OpenedEvent,\n  OutcomeEvent,\n  NotificationReceivedEvent,\n  ChangeEvent,\n  DeviceState,\n  EmailSubscriptionChange,\n  PermissionChange,\n  SMSSubscriptionChange,\n  SubscriptionChange,\n};\n```\n\n### Usages\n\n```typescript\nimport Onesignal, { OpenedEvent } from \"@awesome-cordova-library/onesignal\";\n\nOnesignal.setAppId(\"YOUR_ONESIGNAL_APP_ID\");\nOnesignal.setNotificationOpenedHandler((jsonData: OpenedEvent) => {\n  console.log(\"notificationOpenedCallback: \" + JSON.stringify(jsonData));\n});\n```\n\n## React\n\n### Declaration\n\n```typescript\nconst useOnesignal: (appId: string) => {\n  setAppId: (appId: string) => void;\n  setNotificationWillShowInForegroundHandler: (\n    handler: (event: NotificationReceivedEvent) => void\n  ) => void;\n  setNotificationOpenedHandler: (\n    handler: (openedEvent: OpenedEvent) => void\n  ) => void;\n  setInAppMessageClickHandler: (\n    handler: (action: InAppMessageAction) => void\n  ) => void;\n  setInAppMessageLifecycleHandler: (\n    handlerObject: InAppMessageLifecycleHandlerObject\n  ) => void;\n  getDeviceState: (handler: (response: DeviceState) => void) => void;\n  setLanguage: (language: string) => Promise<unknown>;\n  addSubscriptionObserver: (\n    observer: (event: ChangeEvent<SubscriptionChange>) => void\n  ) => void;\n  addEmailSubscriptionObserver: (\n    observer: (event: ChangeEvent<EmailSubscriptionChange>) => void\n  ) => void;\n  addSMSSubscriptionObserver: (\n    observer: (event: ChangeEvent<SMSSubscriptionChange>) => void\n  ) => void;\n  addPermissionObserver: (\n    observer: (event: ChangeEvent<PermissionChange>) => void\n  ) => void;\n  getTags: (handler: (tags: object) => void) => void;\n  sendTag: (key: string, value: string) => void;\n  deleteTags: (keys: string[]) => void;\n  registerForProvisionalAuthorization: (\n    handler?: ((response: { accepted: boolean }) => void) | undefined\n  ) => void;\n  promptForPushNotificationsWithUserResponse: (\n    fallbackToSettingsOrHandler?:\n      | boolean\n      | ((response: boolean) => void)\n      | undefined,\n    handler?: ((response: boolean) => void) | undefined\n  ) => void;\n  clearOneSignalNotifications: () => void;\n  unsubscribeWhenNotificationsAreDisabled: (unsubscribe: boolean) => void;\n  removeNotification: (id: number) => void;\n  removeGroupedNotifications: (id: string) => void;\n  disablePush: (disable: boolean) => void;\n  postNotification: (notificationObject: object) => Promise<unknown>;\n  setLaunchURLsInApp: (isEnabled: boolean) => void;\n  setLogLevel: (nsLogLevel: LogLevel, visualLogLevel: LogLevel) => void;\n  userProvidedPrivacyConsent: (handler: (response: boolean) => void) => void;\n  requiresUserPrivacyConsent: (\n    handler: (\n      response:\n        | boolean\n        | {\n            value: boolean;\n          }\n    ) => void\n  ) => void;\n  setRequiresUserPrivacyConsent: (required: boolean) => void;\n  provideUserConsent: (granted: boolean) => void;\n  setEmail: (email: string, authCode?: string) => Promise<unknown>;\n  logoutEmail: () => Promise<unknown>;\n  setSMSNumber: (smsNumber: string, authCode?: string) => Promise<unknown>;\n  logoutSMSNumber: () => Promise<unknown>;\n  setExternalUserId: (\n    externalId: string | null,\n    handlerOrAuth?: string | ((results: object) => void) | undefined,\n    handler?: ((results: object) => void) | undefined\n  ) => void;\n  removeExternalUserId: (handler: (results: object) => void) => void;\n  addTriggers: (triggers: { [key: string]: string | number | boolean }) => void;\n  addTrigger: (key: string, value: string | number | boolean) => void;\n  removeTriggerForKey: (key: string) => void;\n  removeTriggersForKeys: (keys: string[]) => void;\n  getTriggerValueForKey: (\n    key: string,\n    handler: (value: string) => void\n  ) => void;\n  pauseInAppMessages: (pause: boolean) => void;\n  sendOutcome: (\n    name: string,\n    handler?: ((event: OutcomeEvent) => void) | undefined\n  ) => void;\n  sendUniqueOutcome: (\n    name: string,\n    handler?: ((event: OutcomeEvent) => void) | undefined\n  ) => void;\n  sendOutcomeWithValue: (\n    name: string,\n    value: string | number,\n    handler?: ((event: OutcomeEvent) => void) | undefined\n  ) => void;\n  promptLocation: () => void;\n  setLocationShared: (shared: boolean) => void;\n  isLocationShared: (\n    handler: (\n      response:\n        | boolean\n        | {\n            value: boolean;\n          }\n    ) => void\n  ) => void;\n};\n```\n\n### Usages\n\n```typescript\nimport { useState, useEffect } from \"react\";\nimport useOnesignal from \"@awesome-cordova-library/onesignal/lib/react\";\nimport { OpenedEvent } from \"@awesome-cordova-library/onesignal\";\n\nfunction App() {\n  const [notificationData, setNotificationData] = useState<\n    OpenedEvent | undefined\n  >();\n  const { setNotificationOpenedHandler } = useOnesignal(\n    \"YOUR_ONESIGNAL_APP_ID\"\n  );\n  useEffect(() => {\n    setNotificationOpenedHandler((jsonData) => {\n      setNotificationData(jsonData);\n    });\n  }, []);\n\n  return <div />;\n}\n```\n","readmeFilename":"README.md"}