{"_id":"@emnzbk/react-native-sms-user-consent","name":"@emnzbk/react-native-sms-user-consent","dist-tags":{"latest":"1.1.5"},"versions":{"1.1.5":{"name":"@emnzbk/react-native-sms-user-consent","version":"1.1.5","description":"This page describes how to use the SMS User Consent API to request user consent to read a single SMS verification message. If the user consents, the API returns the text of the message, from which you can get the verification code and complete the verific","react-native":"src/index","source":"src/index","types":"src/index.d.ts","scripts":{"test":"jest","typescript":"tsc --noEmit","lint":"eslint \"**/*.{js,ts,tsx}\"","prepare":"bob build","example":"yarn --cwd example","pods":"cd example && pod-install --quiet","bootstrap":"yarn example && yarn && yarn pods"},"keywords":["react-native","ios","android"],"repository":{"type":"git","url":"git+https://github.com/kyivstarteam/react-native-sms-user-consent.git"},"author":{"name":"Yevhenii Onipko","email":"y.onipko@kyivstar.net","url":"https://github.com/yevheniionipko"},"license":"MIT","bugs":{"url":"https://github.com/kyivstarteam/react-native-sms-user-consent/issues"},"homepage":"https://github.com/kyivstarteam/react-native-sms-user-consent#readme","devDependencies":{"@commitlint/config-conventional":"^8.3.4","@react-native-community/bob":"^0.16.2","@react-native-community/eslint-config":"^2.0.0","@release-it/conventional-changelog":"^1.1.4","@types/jest":"^26.0.0","@types/react":"^16.9.19","@types/react-native":"0.62.13","commitlint":"^8.3.5","eslint":"^7.2.0","eslint-config-prettier":"^6.11.0","eslint-plugin-prettier":"^3.1.3","husky":"^4.2.5","jest":"^26.0.1","pod-install":"^0.1.0","prettier":"^2.0.5","react":"16.11.0","react-native":"0.62.2","release-it":"^13.5.8","typescript":"^3.8.3"},"peerDependencies":{"react":"*","react-native":"*"},"jest":{"preset":"react-native","modulePathIgnorePatterns":["<rootDir>/example/node_modules","<rootDir>/lib/"]},"eslintConfig":{"extends":["@react-native-community","prettier"],"rules":{"prettier/prettier":["error",{"quoteProps":"consistent","singleQuote":true,"tabWidth":2,"trailingComma":"es5","useTabs":false}]}},"eslintIgnore":["node_modules/","lib/"],"prettier":{"quoteProps":"consistent","singleQuote":true,"tabWidth":2,"trailingComma":"es5","useTabs":false},"@react-native-community/bob":{"source":"src","output":"lib","targets":["commonjs","module","typescript"]},"publishConfig":{"access":"public"},"main":"babel.config.js","directories":{"example":"example"},"gitHead":"1c1baba5e79fca15bfb678d0b7b13b74d9e5d79d","_id":"@emnzbk/react-native-sms-user-consent@1.1.5","_nodeVersion":"18.0.0","_npmVersion":"8.6.0","dist":{"integrity":"sha512-axUdFh47wrQKf/q6Ui1ueXiguP92qgddIiyMY70OvUW/Tbu19nxdXwB3yvG0PdqPDDB1iTPWbr1Uk1BwZg5rww==","shasum":"cc2a2a534bfb6f9da1da9ce8fd02598745230a8c","tarball":"https://registry.npmjs.org/@emnzbk/react-native-sms-user-consent/-/react-native-sms-user-consent-1.1.5.tgz","fileCount":27,"unpackedSize":82795,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDjQkALRliaeBFjY0VyPrP/7BW1sq6ZYxnTqbFKdkDJrgIhAIjggw/6XEunXjpZdichFB0GPCBMEnVlQuYRvLPXpbZh"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkBy/iACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrNkw//TXbnktvw5VWkzcRaGR9PAq+q0U1YeabTAuNvAoTt8RtlyqFG\r\nLxnTFRK0Z1WttwDfx7927lyToUqG8mIqADqpJmOFcp+ZEY54UUL8redXMDev\r\nHDaeeYGmuppoKlaY55Zt0Bd+0TiypnCqnYCP1uJyHmesqhENdYOabaC799/M\r\naVVZvq5BqaN0sBGKY4m6TVzXkAKv8dEvQCGDRflE3kormHCrp76C++11hT8G\r\nR3YKK8jYOAwKTWeOGR33VpMJLOXfXXLGC4DIcj/QVmb7b7aG70LRtU/fqp8Q\r\nF965fZziMmDJoNhediORLd+3lj6ziA9WviYGB8dIF9YetE6DTwhH/sJTBZFs\r\nNzgHLq10eCGMeCpO6fFYTQBJkB/X7sRJYXrwpUJgveXVYUPF8QdbsSIGr6EU\r\nBt4yOooxyOF7F4eLppW+vpJrlIVgMtdeZ7joOqtT/3ezw3nUdDv7tRDhsvZe\r\nV26MEHxoCuBCCJ8dLr2vSBXUZr0m/rzAYwd+oZvH9j0lcZDTGLwPMtnDMeMt\r\nVI9aV7XGD3fLfgULAXFJA+yRv1pv1ddw7q9HX4/ep7xTn6kooOh5k2ZHqmmY\r\nonyZNSv6+UWdQKOVAp/Gf9w4qTGFcB9BJO0UWxeIZstgwGXzW+QByxutBcEq\r\nuJib8pnrXP4Al/rVaY+5F/cpXy4He3ZD+Fg=\r\n=w01V\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"emnzbk","email":"emin.ozbek@venhancer.com"},"maintainers":[{"name":"emnzbk","email":"emin.ozbek@venhancer.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-sms-user-consent_1.1.5_1678192610518_0.2899000358965862"},"_hasShrinkwrap":false}},"time":{"created":"2023-03-07T12:36:50.449Z","1.1.5":"2023-03-07T12:36:50.759Z","modified":"2023-03-07T12:36:50.983Z"},"maintainers":[{"name":"emnzbk","email":"emin.ozbek@venhancer.com"}],"description":"This page describes how to use the SMS User Consent API to request user consent to read a single SMS verification message. If the user consents, the API returns the text of the message, from which you can get the verification code and complete the verific","homepage":"https://github.com/kyivstarteam/react-native-sms-user-consent#readme","keywords":["react-native","ios","android"],"repository":{"type":"git","url":"git+https://github.com/kyivstarteam/react-native-sms-user-consent.git"},"author":{"name":"Yevhenii Onipko","email":"y.onipko@kyivstar.net","url":"https://github.com/yevheniionipko"},"bugs":{"url":"https://github.com/kyivstarteam/react-native-sms-user-consent/issues"},"license":"MIT","readme":"# React Native Sms User Consent\n\n## One-tap SMS verification with the SMS User Consent API\nThe SMS User Consent API complements the SMS Retriever API by allowing an app to prompt the user to grant access to the content of a single SMS message. When a user gives consent, the app will then have access to the entire message body to automatically complete SMS verification.\n\n## Getting Started\n\n\n### Install\n\n```\n$ yarn add @kyivstarteam/react-native-sms-user-consent\n```\n\n### Link\n\n- **React Native 0.60+**\n\n\n[CLI autolink feature](https://github.com/react-native-community/cli/blob/master/docs/autolinking.md) links the module while building the app. \n\n\n- **React Native <= 0.59**\n\n\n```bash\n$ react-native link @kyivstarteam/react-native-sms-user-consent\n```\n\n## Usage\n\n### User Flow for SMS User Consent API\n\n<div style=\"display: flex; flex-direction: row; flex-wrap: nowrap;\">\n<img src=\"/assets/images/user-consent-1.png\" width=200 height=\"390\" />\n<img src=\"/assets/images/user-consent-2.png\" width=200 height=\"390\" />\n<img src=\"/assets/images/user-consent-3.png\" width=200 height=\"390\" />\n</div>\n\n\n### Import\n\n```js\nimport SMSUserConsent from '@kyivstarteam/react-native-sms-user-consent';\n```\n\n### Start listen SMS and get message\n```tsx\ninterface SMSMessage {\n  receivedOtpMessage: string\n}\n\ngetSMSMessage = async () => {\n  try {\n    const message: SMSMessage = await SMSUserConsent.listenOTP()\n  } catch (e) {\n    // error\n  }\n}\n\n```\n\n### Remove listener\n```tsx\n\nremoveSmsListener = () => {\n  try {\n    SMSUserConsent.removeOTPListener()\n  } catch(e) {\n    // error\n  }\n}\n\n```\n","readmeFilename":"README.md"}