{"_id":"otpless-headless-js","_rev":"9-386ff2a00b4e7ef920bb68315fbe7383","name":"otpless-headless-js","dist-tags":{"latest":"1.3.2"},"versions":{"1.0.0":{"name":"otpless-headless-js","version":"1.0.0","keywords":["otpless","otp","auth","react","headless"],"author":{"name":"OTPLESS","email":"developer@otpless.com"},"license":"MIT","_id":"otpless-headless-js@1.0.0","maintainers":[{"name":"otpless-tech","email":"digvijay.singh@otpless.com"}],"homepage":"https://github.com/otpless-tech/otpless-headless-js#readme","bugs":{"url":"https://github.com/otpless-tech/otpless-headless-js/issues"},"dist":{"shasum":"0e2dacea30610b46582392e3588bc88f1f9297ff","tarball":"https://registry.npmjs.org/otpless-headless-js/-/otpless-headless-js-1.0.0.tgz","fileCount":6,"integrity":"sha512-oytkOiPvDdKHoiBrgqQ5Abi0a+6pDOSdmmlPlVD+3OvakNBCyDtAf/9XHZkwWtlvet6Uarhwxn9/Z1kWmLJAQg==","signatures":[{"sig":"MEUCIQDsd4ZpoaeyshfS/8d5NP97QP2ZTrdLgyEcW71WQvb0yAIgOPKplbKRhN2etyUvC4Ac7Jomiy65IU2s4MkIBQqZLxg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":19975},"main":"dist/index.cjs","type":"module","types":"dist/index.d.ts","module":"dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"40d58ea4f85d2490362541c0f7e25da687d65bf3","scripts":{"test":"echo 'No tests specified' && exit 0","build":"tsup","prepare":"husky install","version":"git add -A","preversion":"npm run build && npm test","postversion":"git push && git push --tags","check-version":"node scripts/check-version.js","release:major":"npm run version:major && npm publish --access public","release:minor":"npm run version:minor && npm publish --access public","release:patch":"npm run version:patch && npm publish --access public","version:major":"npm version major","version:minor":"npm version minor","version:patch":"npm version patch","prepublishOnly":"npm run build && npm run check-version"},"_npmUser":{"name":"otpless-tech","email":"digvijay.singh@otpless.com"},"repository":{"url":"git+https://github.com/otpless-tech/otpless-headless-js.git","type":"git"},"_npmVersion":"9.6.7","description":"OTPless Headless SDK for JS framework.","directories":{},"sideEffects":false,"_nodeVersion":"18.17.1","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.1","husky":"^8.0.3","typescript":"^5.5.4","@types/react":"^18.3.3"},"peerDependencies":{"react":">=17"},"_npmOperationalInternal":{"tmp":"tmp/otpless-headless-js_1.0.0_1757687078994_0.5465057734107295","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"otpless-headless-js","version":"1.0.2","keywords":["otpless","otp","auth","react","headless"],"author":{"name":"OTPLESS","email":"developer@otpless.com"},"license":"MIT","_id":"otpless-headless-js@1.0.2","maintainers":[{"name":"otpless-tech","email":"digvijay.singh@otpless.com"}],"homepage":"https://github.com/otpless-tech/otpless-headless-js#readme","bugs":{"url":"https://github.com/otpless-tech/otpless-headless-js/issues"},"dist":{"shasum":"577377cea23ad4160b1296dd5b5ee26ba43944c2","tarball":"https://registry.npmjs.org/otpless-headless-js/-/otpless-headless-js-1.0.2.tgz","fileCount":6,"integrity":"sha512-xUlAYlSSkUsbENSRBzxRvIAPIT9BBFIoqsVNGhGUuribG4HbeRP86xv1sASnQ7if1zzf/dyZ0//pc8qazHcMHA==","signatures":[{"sig":"MEQCIB5ol9FPi8FGlkD8vrWWuA4U+gmUzpCouo9gFpzyrKG0AiAIivab088Diej+MZloH6TchD16P2KMesjYWRYxgeBS1Q==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":25077},"main":"dist/index.cjs","type":"module","types":"dist/index.d.ts","module":"dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"1660f7e45adecf6a9608700e526a2da1cd497bbc","scripts":{"test":"echo 'No tests specified' && exit 0","build":"tsup","prepare":"husky install","version":"git add -A","preversion":"npm run build && npm test","postversion":"git push && git push --tags","check-version":"node scripts/check-version.js","release:major":"npm run version:major && npm publish --access public","release:minor":"npm run version:minor && npm publish --access public","release:patch":"npm run version:patch && npm publish --access public","version:major":"npm version major","version:minor":"npm version minor","version:patch":"npm version patch","prepublishOnly":"npm run build && npm run check-version"},"_npmUser":{"name":"otpless-tech","email":"digvijay.singh@otpless.com"},"repository":{"url":"git+https://github.com/otpless-tech/otpless-headless-js.git","type":"git"},"_npmVersion":"9.6.7","description":"OTPless Headless SDK for JS framework.","directories":{},"sideEffects":false,"_nodeVersion":"18.17.1","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.1","husky":"^8.0.3","typescript":"^5.5.4","@types/react":"^18.3.3"},"peerDependencies":{"react":">=17"},"_npmOperationalInternal":{"tmp":"tmp/otpless-headless-js_1.0.2_1758107805119_0.5034669800487357","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"otpless-headless-js","version":"1.0.3","keywords":["otpless","otp","auth","react","headless"],"author":{"name":"OTPLESS","email":"developer@otpless.com"},"license":"MIT","_id":"otpless-headless-js@1.0.3","maintainers":[{"name":"otpless-tech","email":"digvijay.singh@otpless.com"}],"homepage":"https://github.com/otpless-tech/otpless-headless-js#readme","bugs":{"url":"https://github.com/otpless-tech/otpless-headless-js/issues"},"dist":{"shasum":"fcbed48412bac27e85d05a1876e83f9fd1a05fa2","tarball":"https://registry.npmjs.org/otpless-headless-js/-/otpless-headless-js-1.0.3.tgz","fileCount":6,"integrity":"sha512-lCShfYfqEFKWkdqcRzZZY6twrb6WnN8ZgHv+DN62dwdp9IzB6KprbRLJOEpZZkpc/+7VKT+72TzzeArAsr37uw==","signatures":[{"sig":"MEUCIQCGMkIX0IO295IIzgNpBQ33F7ztHzh2zqtxpYVujOkslwIgASdUR7YlmVWTzgHDE5iY0gX2tRBueoB3rue7FdBaLIM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":25340},"main":"dist/index.cjs","type":"module","types":"dist/index.d.ts","module":"dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"d602bc322f4930716401d904d36da60f018400ee","scripts":{"test":"echo 'No tests specified' && exit 0","build":"tsup","prepare":"husky install","version":"git add -A","preversion":"npm run build && npm test","postversion":"git push && git push --tags","check-version":"node scripts/check-version.js","release:major":"npm run version:major && npm publish --access public","release:minor":"npm run version:minor && npm publish --access public","release:patch":"npm run version:patch && npm publish --access public","version:major":"npm version major","version:minor":"npm version minor","version:patch":"npm version patch","prepublishOnly":"npm run build && npm run check-version"},"_npmUser":{"name":"otpless-tech","email":"digvijay.singh@otpless.com"},"repository":{"url":"git+https://github.com/otpless-tech/otpless-headless-js.git","type":"git"},"_npmVersion":"9.6.7","description":"OTPless Headless SDK for JS framework.","directories":{},"sideEffects":false,"_nodeVersion":"18.17.1","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.1","husky":"^8.0.3","typescript":"^5.5.4","@types/react":"^18.3.3"},"peerDependencies":{"react":">=17"},"_npmOperationalInternal":{"tmp":"tmp/otpless-headless-js_1.0.3_1758115430401_0.027277645537445494","host":"s3://npm-registry-packages-npm-production"}},"1.0.4":{"name":"otpless-headless-js","version":"1.0.4","keywords":["otpless","otp","auth","react","headless"],"author":{"name":"OTPLESS","email":"developer@otpless.com"},"license":"MIT","_id":"otpless-headless-js@1.0.4","maintainers":[{"name":"otpless-tech","email":"digvijay.singh@otpless.com"}],"homepage":"https://github.com/otpless-tech/otpless-headless-js#readme","bugs":{"url":"https://github.com/otpless-tech/otpless-headless-js/issues"},"dist":{"shasum":"09befd8ce4080a4a5040648dc2061bb6071503d3","tarball":"https://registry.npmjs.org/otpless-headless-js/-/otpless-headless-js-1.0.4.tgz","fileCount":6,"integrity":"sha512-aNnYIlhkFcInbbLcJVSAIKFQufmqr8vJEfXYZ1vgQRAwHwoGVxbHd/tvYvjx2NNPW1NwQQ+NYfnkHDqiPdnUuw==","signatures":[{"sig":"MEUCIGrwNt9WnFzFKl2JcHs92Eypp3INIItDHBhKW/LarmSGAiEAl/jMYgXBZ/doHYbZSaKorzhMT/wQoQ/A8db7fELU/40=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":27538},"main":"dist/index.cjs","type":"module","types":"dist/index.d.ts","module":"dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"d602bc322f4930716401d904d36da60f018400ee","scripts":{"test":"echo 'No tests specified' && exit 0","build":"tsup","prepare":"husky install","version":"git add -A","preversion":"npm run build && npm test","postversion":"git push && git push --tags","check-version":"node scripts/check-version.js","release:major":"npm run version:major && npm publish --access public","release:minor":"npm run version:minor && npm publish --access public","release:patch":"npm run version:patch && npm publish --access public","version:major":"npm version major","version:minor":"npm version minor","version:patch":"npm version patch","prepublishOnly":"npm run build && npm run check-version"},"_npmUser":{"name":"otpless-tech","email":"digvijay.singh@otpless.com"},"repository":{"url":"git+https://github.com/otpless-tech/otpless-headless-js.git","type":"git"},"_npmVersion":"9.6.7","description":"OTPless Headless SDK for JS framework.","directories":{},"sideEffects":false,"_nodeVersion":"18.17.1","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.1","husky":"^8.0.3","typescript":"^5.5.4","@types/react":"^18.3.3"},"peerDependencies":{"react":">=17"},"_npmOperationalInternal":{"tmp":"tmp/otpless-headless-js_1.0.4_1758179769495_0.9122479368290235","host":"s3://npm-registry-packages-npm-production"}},"1.0.5":{"name":"otpless-headless-js","version":"1.0.5","keywords":["otpless","otp","auth","react","headless"],"author":{"name":"OTPLESS","email":"developer@otpless.com"},"license":"MIT","_id":"otpless-headless-js@1.0.5","maintainers":[{"name":"otpless-tech","email":"digvijay.singh@otpless.com"}],"homepage":"https://github.com/otpless-tech/otpless-headless-js#readme","bugs":{"url":"https://github.com/otpless-tech/otpless-headless-js/issues"},"dist":{"shasum":"1eae7784a1e96fe0aca6ee8ea234cfa27a114d6b","tarball":"https://registry.npmjs.org/otpless-headless-js/-/otpless-headless-js-1.0.5.tgz","fileCount":6,"integrity":"sha512-+S6VF1HupJ9tYPEaWH0D1RNwlFaSuI6TeFmgKNulXVCFwmr8BKnfw7YKgxaJgWOkdP5OQ3ueYWA0I5fjNpfTGg==","signatures":[{"sig":"MEUCIQDhvDfDyTAa/fCRANRDa5uQm0FBE3M7L2aSgiux5WP1sgIgZzxNFa6OYpfCG6jAk9paQcJbh+ExP7/V+Uur64NBnvE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":27386},"main":"dist/index.cjs","type":"module","types":"dist/index.d.ts","module":"dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"3c507b8c75e573d56e72686f5508c088ae5a6807","scripts":{"test":"echo 'No tests specified' && exit 0","build":"tsup","prepare":"husky install","version":"git add -A","preversion":"npm run build && npm test","postversion":"git push && git push --tags","check-version":"node scripts/check-version.js","release:major":"npm run version:major && npm publish --access public","release:minor":"npm run version:minor && npm publish --access public","release:patch":"npm run version:patch && npm publish --access public","version:major":"npm version major","version:minor":"npm version minor","version:patch":"npm version patch","prepublishOnly":"npm run build && npm run check-version"},"_npmUser":{"name":"otpless-tech","email":"digvijay.singh@otpless.com"},"repository":{"url":"git+https://github.com/otpless-tech/otpless-headless-js.git","type":"git"},"_npmVersion":"10.8.2","description":"OTPless Headless SDK for JS framework.","directories":{},"sideEffects":false,"_nodeVersion":"20.19.5","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.1","husky":"^8.0.3","typescript":"^5.5.4","@types/react":"^18.3.3"},"peerDependencies":{"react":">=17"},"_npmOperationalInternal":{"tmp":"tmp/otpless-headless-js_1.0.5_1758890128424_0.873207344538302","host":"s3://npm-registry-packages-npm-production"}},"1.0.7":{"name":"otpless-headless-js","version":"1.0.7","keywords":["otpless","otp","auth","react","headless"],"author":{"name":"OTPLESS","email":"developer@otpless.com"},"license":"MIT","_id":"otpless-headless-js@1.0.7","maintainers":[{"name":"otpless-tech","email":"digvijay.singh@otpless.com"}],"homepage":"https://github.com/otpless-tech/otpless-headless-js#readme","bugs":{"url":"https://github.com/otpless-tech/otpless-headless-js/issues"},"dist":{"shasum":"4b50fb8052666634bc94ba83bc3ed6b087d918e1","tarball":"https://registry.npmjs.org/otpless-headless-js/-/otpless-headless-js-1.0.7.tgz","fileCount":6,"integrity":"sha512-3K0dy3iFQ+pO9ss7rithl4NYWSmjxYmDdUoBFghgvt1fsU+cddNACvRcfaNJKMu3jjA07gCViDukar90poTXDg==","signatures":[{"sig":"MEYCIQC7QZxI6Y4W1TjwS/0sLls5pjLimJt0xniOCcEZlcIAPgIhAPT2NHwVOI5zDZ8fs745XehaNyWH0WSwYoW4YaoiF3Zw","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":27476},"main":"dist/index.cjs","type":"module","types":"dist/index.d.ts","module":"dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"091dace7f291095b955e410e407b5af0b0df7308","scripts":{"test":"echo 'No tests specified' && exit 0","build":"tsup","prepare":"husky install","version":"git add -A","preversion":"npm run build && npm test","postversion":"git push && git push --tags","check-version":"node scripts/check-version.js","release:major":"npm run version:major && npm publish --access public","release:minor":"npm run version:minor && npm publish --access public","release:patch":"npm run version:patch && npm publish --access public","version:major":"npm version major","version:minor":"npm version minor","version:patch":"npm version patch","prepublishOnly":"npm run build && npm run check-version"},"_npmUser":{"name":"otpless-tech","email":"digvijay.singh@otpless.com"},"repository":{"url":"git+https://github.com/otpless-tech/otpless-headless-js.git","type":"git"},"_npmVersion":"10.8.2","description":"OTPless Headless SDK for JS framework.","directories":{},"sideEffects":false,"_nodeVersion":"20.19.5","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.1","husky":"^8.0.3","typescript":"^5.5.4","@types/react":"^18.3.3"},"peerDependencies":{"react":">=17"},"_npmOperationalInternal":{"tmp":"tmp/otpless-headless-js_1.0.7_1771061343212_0.3181591600124034","host":"s3://npm-registry-packages-npm-production"}},"1.0.9":{"name":"otpless-headless-js","version":"1.0.9","keywords":["otpless","otp","auth","react","headless"],"author":{"name":"OTPLESS","email":"developer@otpless.com"},"license":"MIT","_id":"otpless-headless-js@1.0.9","maintainers":[{"name":"otpless-tech","email":"digvijay.singh@otpless.com"}],"homepage":"https://github.com/otpless-tech/otpless-headless-js#readme","bugs":{"url":"https://github.com/otpless-tech/otpless-headless-js/issues"},"dist":{"shasum":"8df49db93169916fa4368f0a355ab7515aa3dce6","tarball":"https://registry.npmjs.org/otpless-headless-js/-/otpless-headless-js-1.0.9.tgz","fileCount":6,"integrity":"sha512-dVb96cZhRXneHC3Es7xhZOeJnQ3u6qJdE3OUie+ZkI8jAOgTJaGfLZfc15EyX0hzFV4kHu0H17n7IHW7zXMVRw==","signatures":[{"sig":"MEUCIBxkxYM0uPzP8tQs2DIBSPQDeCTJC58xBRHd2/WozAYyAiEA2oZB/f4m71rkdoLXDrugGWiEPxLQPKVRRb8FLA9KS4k=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":27666},"main":"dist/index.cjs","type":"module","types":"dist/index.d.ts","module":"dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"402577d4bc008e69f4f71eac8fcf66b124a23eaf","scripts":{"test":"echo 'No tests specified' && exit 0","build":"tsup","prepare":"husky install","version":"git add -A","preversion":"npm run build && npm test","postversion":"git push && git push --tags","check-version":"node scripts/check-version.js","release:major":"npm run version:major && npm publish --access public","release:minor":"npm run version:minor && npm publish --access public","release:patch":"npm run version:patch && npm publish --access public","version:major":"npm version major","version:minor":"npm version minor","version:patch":"npm version patch","prepublishOnly":"npm run build && npm run check-version"},"_npmUser":{"name":"otpless-tech","email":"digvijay.singh@otpless.com"},"repository":{"url":"git+https://github.com/otpless-tech/otpless-headless-js.git","type":"git"},"_npmVersion":"10.8.2","description":"OTPless Headless SDK for JS framework.","directories":{},"sideEffects":false,"_nodeVersion":"20.19.5","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.1","husky":"^8.0.3","typescript":"^5.5.4","@types/react":"^18.3.3"},"peerDependencies":{"react":">=17"},"_npmOperationalInternal":{"tmp":"tmp/otpless-headless-js_1.0.9_1781689744976_0.005229395723750585","host":"s3://npm-registry-packages-npm-production"}},"1.2.0":{"name":"otpless-headless-js","version":"1.2.0","keywords":["otpless","otp","auth","react","headless"],"author":{"name":"OTPLESS","email":"developer@otpless.com"},"license":"MIT","_id":"otpless-headless-js@1.2.0","maintainers":[{"name":"otpless-tech","email":"digvijay.singh@otpless.com"}],"homepage":"https://github.com/otpless-tech/otpless-headless-js#readme","bugs":{"url":"https://github.com/otpless-tech/otpless-headless-js/issues"},"dist":{"shasum":"7ea522f3a1fcf468456e6effc21567e2f01204bb","tarball":"https://registry.npmjs.org/otpless-headless-js/-/otpless-headless-js-1.2.0.tgz","fileCount":6,"integrity":"sha512-Zc4g0H0Fy8cZ7eo0Uj+6J6QKcmBSQo8LjK70DFy2u8TNWOTjgY5AhiPl3bWqLaZ4BGDHEQjizKqK6Z3vSXuI/Q==","signatures":[{"sig":"MEUCICgtDFmwHKYSw3PyGQPSI9fbc0RgaCEx50/3U+9Fbhk1AiEAoz8RgM0L4bSvWEfQ5XclsZOfokIGNdxQniHv2jvDqEQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":30101},"main":"dist/index.cjs","type":"module","types":"dist/index.d.ts","module":"dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"84db2629aeee7444988262d48f08815baeeaf982","scripts":{"test":"echo 'No tests specified' && exit 0","build":"tsup","prepare":"husky install","version":"git add -A","preversion":"npm run build && npm test","postversion":"git push && git push --tags","check-version":"node scripts/check-version.js","release:major":"npm run version:major && npm publish --access public","release:minor":"npm run version:minor && npm publish --access public","release:patch":"npm run version:patch && npm publish --access public","version:major":"npm version major","version:minor":"npm version minor","version:patch":"npm version patch","prepublishOnly":"npm run build && npm run check-version"},"_npmUser":{"name":"otpless-tech","email":"digvijay.singh@otpless.com"},"repository":{"url":"git+https://github.com/otpless-tech/otpless-headless-js.git","type":"git"},"_npmVersion":"10.8.2","description":"OTPless Headless SDK for JS framework.","directories":{},"sideEffects":false,"_nodeVersion":"20.19.5","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.1","husky":"^8.0.3","typescript":"^5.5.4","@types/react":"^18.3.3"},"peerDependencies":{"react":">=17"},"_npmOperationalInternal":{"tmp":"tmp/otpless-headless-js_1.2.0_1781690956130_0.6467777813272169","host":"s3://npm-registry-packages-npm-production"}},"1.3.2":{"name":"otpless-headless-js","version":"1.3.2","description":"OTPless Headless SDK for JS framework.","type":"module","main":"dist/index.cjs","module":"dist/index.js","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"sideEffects":false,"keywords":["otpless","otp","auth","react","headless"],"license":"MIT","repository":{"type":"git","url":"git+https://github.com/otpless-tech/otpless-headless-js.git"},"author":{"name":"OTPLESS","email":"developer@otpless.com"},"peerDependencies":{"react":">=17"},"devDependencies":{"@types/react":"^18.3.3","husky":"^8.0.3","tsup":"^8.0.1","typescript":"^5.5.4"},"scripts":{"build":"tsup","version:patch":"npm version patch","version:minor":"npm version minor","version:major":"npm version major","preversion":"npm run build && npm test","version":"git add -A","postversion":"git push && git push --tags","prepublishOnly":"npm run build && npm run check-version","check-version":"node scripts/check-version.js","release:patch":"npm run version:patch && npm publish --access public","release:minor":"npm run version:minor && npm publish --access public","release:major":"npm run version:major && npm publish --access public","test":"echo 'No tests specified' && exit 0","prepare":"husky install"},"_id":"otpless-headless-js@1.3.2","gitHead":"e03a8a928a7a5f0231c5874c1c456adf3e1438c8","bugs":{"url":"https://github.com/otpless-tech/otpless-headless-js/issues"},"homepage":"https://github.com/otpless-tech/otpless-headless-js#readme","_nodeVersion":"20.19.5","_npmVersion":"10.8.2","dist":{"integrity":"sha512-kYjSqhWPLd1ND19jA8gyYvI5g8FIUBp23OP0iTAmEFXBSzBwC7xLIzLND1mUmdOb3u+G+LQjmGGxVysHEdPOpg==","shasum":"27f5b133c9ee55b2201a6ba9cf935f7202128f39","tarball":"https://registry.npmjs.org/otpless-headless-js/-/otpless-headless-js-1.3.2.tgz","fileCount":6,"unpackedSize":30721,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQClff99rA5UkfT241vyIxOwi/Jqf6HyZbdHrpknxj1vUAIgYUFAhr+Qfya4QAD3cmMhhBBKrHnaoFEDj96QcyvcNJw="}]},"_npmUser":{"name":"otpless-tech","email":"digvijay.singh@otpless.com"},"directories":{},"maintainers":[{"name":"otpless-tech","email":"digvijay.singh@otpless.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/otpless-headless-js_1.3.2_1786093236194_0.3902358845868814"},"_hasShrinkwrap":false}},"time":{"created":"2025-09-12T14:24:38.890Z","modified":"2026-08-07T09:00:36.515Z","1.0.0":"2025-09-12T14:24:39.202Z","1.0.2":"2025-09-17T11:16:45.295Z","1.0.3":"2025-09-17T13:23:50.564Z","1.0.4":"2025-09-18T07:16:09.661Z","1.0.5":"2025-09-26T12:35:28.664Z","1.0.7":"2026-02-14T09:29:03.362Z","1.0.9":"2026-06-17T09:49:05.115Z","1.2.0":"2026-06-17T10:09:16.282Z","1.3.2":"2026-08-07T09:00:36.350Z"},"bugs":{"url":"https://github.com/otpless-tech/otpless-headless-js/issues"},"author":{"name":"OTPLESS","email":"developer@otpless.com"},"license":"MIT","homepage":"https://github.com/otpless-tech/otpless-headless-js#readme","keywords":["otpless","otp","auth","react","headless"],"repository":{"type":"git","url":"git+https://github.com/otpless-tech/otpless-headless-js.git"},"description":"OTPless Headless SDK for JS framework.","maintainers":[{"name":"otpless-tech","email":"digvijay.singh@otpless.com"}],"readme":"# OTPless Headless\n\n[![npm version](https://badge.fury.io/js/otpless-headless-js.svg)](https://badge.fury.io/js/otpless-headless-js)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\nA lightweight JavaScript SDK wrapper for OTPless Headless that provides seamless OTP authentication with WhatsApp, SMS, and email. Works with React, Vue.js, Next.js, and any JavaScript framework.\n\n## Features\n\n- 🚀 **Tiny Bundle** - Only 3.6KB minified\n- 🎯 **Framework Agnostic** - Works with React, Vue, Next.js, and any JS framework\n- 📱 **Phone Authentication** - SMS OTP with country code support\n- 🔄 **Loading States** - Built-in loading management\n- 🎪 **Event System** - Listen to authentication events\n- 🛡️ **Type Safe** - Full TypeScript support\n- 🌐 **SSR Ready** - Works with Next.js and other SSR frameworks\n\n## Demo\n\nExplore the live demo repository to see OTPless Headless in action:\n\nhttps://github.com/otpless-tech/headless-demo\n\n[![Open in CodeSandbox](https://img.shields.io/badge/Open%20in-CodeSandbox-151515?logo=codesandbox)](https://codesandbox.io/s/github/otpless-tech/headless-demo)\n\n## Installation\n\n```bash\nnpm install otpless-headless-js\n# or\nyarn add otpless-headless-js\n# or\npnpm add otpless-headless-js\n```\n\n## Quick Start\n\n```tsx\nimport { useEffect } from 'react';\nimport { useOTPless, CHANNELS, EVENT_TYPES } from 'otpless-headless-js';\n\nfunction MyComponent() {\n  const { init, initiate, verify, on, loading, ready } = useOTPless();\n\n  useEffect(() => {\n    // Initialize with your OTPless App ID\n    init('YOUR_APP_ID');\n\n    // Listen to a single event\n    const unsubscribe = on(EVENT_TYPES.OTP_AUTO_READ, (event) => {\n      const autoOtp = event?.response?.otp ?? '';\n      console.log('OTP auto-read:', autoOtp);\n    });\n\n    // Listen to multiple events at once\n    const unsubscribeAll = on({\n      [EVENT_TYPES.ONETAP]: (event) => {\n        console.log('Auth success:', event);\n      },\n      [EVENT_TYPES.OTP_AUTO_READ]: (event) => {\n        const autoOtp = event?.response?.otp ?? '';\n        console.log('OTP auto-read:', autoOtp);\n      },\n      [EVENT_TYPES.FALLBACK_TRIGGERED]: (event) => {\n        // Fired when the delivery channel changes (e.g. WhatsApp → SMS fallback)\n        console.log('Fallback channel:', event.response?.deliveryChannel);\n      },\n      [EVENT_TYPES.FAILED]: (event) => {\n        console.error('Failed:', event.response?.errorMessage);\n      },\n    });\n\n    return () => {\n      unsubscribe();\n      unsubscribeAll();\n    };\n  }, [init, on]);\n\n  const initiateAuth = async () => {\n    if (!ready) {\n      console.log('SDK not ready yet');\n      return;\n    }\n\n    try {\n      const result = await initiate({\n        channel: CHANNELS.PHONE,\n        phone: '9876543210',\n        countryCode: '+91',\n      });\n      \n      if (result.success) {\n        console.log('OTP sent successfully:', result);\n      } else {\n        console.error('Failed to send OTP:', result.response?.errorMessage);\n      }\n    } catch (error) {\n      console.error('Failed to send OTP:', error);\n    }\n  };\n\n  const verifyAuth = async () => {\n    if (!ready) {\n      console.log('SDK not ready yet');\n      return;\n    }\n\n    try {\n      const result = await verify({\n        channel: CHANNELS.PHONE,\n        phone: '9876543210',\n        otp: '123456',\n        countryCode: '+91',\n      });\n      \n      if (result.success) {\n        console.log('OTP verified successfully:', result);\n        // User is authenticated - proceed with your app logic\n      } else {\n        console.error('OTP verification failed:', result.response?.errorMessage);\n      }\n    } catch (error) {\n      console.error('Verification failed:', error);\n    }\n  };\n\n  if (!ready) {\n    return <div>Loading OTPless SDK...</div>;\n  }\n\n  return (\n    <div>\n      <button onClick={initiateAuth} disabled={loading}>\n        {loading ? 'Sending...' : 'Send OTP'}\n      </button>\n      <button onClick={verifyAuth} disabled={loading}>\n        {loading ? 'Verifying...' : 'Verify OTP'}\n      </button>\n    </div>\n  );\n}\n```\n\n## API Reference\n\n### `useOTPless()`\n\nReturns an object with the following properties:\n\n```ts\ntype UseOTPless = () => {\n  ready: boolean;\n  loading: boolean;\n  init(appId: string): Promise<void>;\n  initiate(request: InitiateRequest): Promise<OTPlessResponse>;\n  verify(request: VerifyRequest): Promise<OTPlessResponse>;\n  on(\n    event: EventType | Record<EventType, Function>,\n    callback?: Function\n  ): () => void;\n  off(event: EventType, callback: Function): void;\n};\n```\n\n| Property | Type | Description |\n| --- | --- | --- |\n| `ready` | `boolean` | Whether the OTPless SDK script is loaded and ready. |\n| `loading` | `boolean` | True while an operation is in progress (init/initiate/verify). |\n| `init(appId)` | `Promise<void>` | Initialize the SDK with your App ID. Call this once. |\n| `initiate(request)` | `Promise<OTPlessResponse>` | Send OTP (e.g., via `CHANNELS.PHONE`). |\n| `verify(request)` | `Promise<OTPlessResponse>` | Verify the OTP received by the user. |\n| `on(event, callback?)` | `() => void` | Subscribe to events. Accepts a single `EventType` or a map of `{ [EventType]: handler }`. Returns an unsubscribe function. |\n| `off(event, callback)` | `void` | Remove a previously registered listener. |\n\n### `InitiateRequest`\n\n| Field | Type | Required | Description |\n| --- | --- | --- | --- |\n| `channel` | `\"PHONE\" \\| \"EMAIL\" \\| \"OAUTH\"` | Yes | Authentication channel. |\n| `phone` | `string` | For PHONE | Digits only, no country code. |\n| `countryCode` | `string` | For PHONE | e.g. `\"+91\"` or `\"91\"`. |\n| `email` | `string` | For EMAIL | User's email address. |\n| `metaData` | `Record<string, any>` | No | Custom key-value data attached to the request. Returned as-is in the ONETAP response. Use this to pass `tid` (template ID) or any other custom fields. |\n\n#### Passing custom metadata and `tid`\n\n```typescript\nawait initiate({\n  channel: CHANNELS.PHONE,\n  phone: '9876543210',\n  countryCode: '+91',\n  metaData: {\n    tid: 'your-template-id',   // template ID\n    source: 'signup-page',     // any custom fields\n    userId: 'abc123',\n  },\n});\n```\n\n### Types and Constants\n\nThis package exports TypeScript types and enum-like constants for safer usage:\n\n```typescript\nimport type { InitiateRequest, VerifyRequest, EventType, OTPlessResponse } from 'otpless-headless-js';\nimport { CHANNELS, EVENT_TYPES } from 'otpless-headless-js';\n\n// Example usage\nconst req: InitiateRequest = {\n  channel: CHANNELS.PHONE,\n  phone: '9876543210',\n  countryCode: '+91',\n};\n\nconst onEvent = (type: EventType) => {\n  if (type === EVENT_TYPES.FAILED) {\n    console.error('Operation failed');\n  }\n};\n```\n\n### Response Type\n\nAll OTPless API calls (`initiate`, `verify`) resolve to the same response shape:\n\n```ts\ntype OTPlessResponsePayload = {\n  otp?: string;\n  token?: string;\n  [key: string]: any;\n};\n\ntype OTPlessResponse = {\n  responseType: string;\n  response?: OTPlessResponsePayload;\n  success: boolean;\n  statusCode: number;\n};\n```\n\nExample:\n\n```ts\nconst res: OTPlessResponse = await initiate({\n  channel: CHANNELS.PHONE,\n  phone: '9876543210',\n  countryCode: '+91',\n});\n\nif (res.success) {\n  console.log('requestId:', res.response?.requestID);\n} else {\n  console.error('initiate failed:', res.response?.errorMessage);\n}\n```\n\n## Framework-Agnostic Usage\n\nThis package works with any JavaScript framework. Here's how to use it without React hooks:\n\n```typescript\nimport { otpless, CHANNELS, EVENT_TYPES } from 'otpless-headless-js';\n\n// Initialize\nawait otpless.init('YOUR_APP_ID');\n\n// Send OTP\nawait otpless.initiate({\n  channel: CHANNELS.PHONE,\n  phone: '9876543210',\n  countryCode: '+91',\n});\n\n// Verify OTP\nawait otpless.verify({\n  channel: CHANNELS.PHONE,\n  phone: '9876543210',\n  countryCode: '+91',\n  otp: '123456',\n});\n\n// Listen to a single event\nconst unsubscribe = otpless.on(EVENT_TYPES.OTP_AUTO_READ, (event) => {\n  console.log('OTP auto-read:', event.response?.otp);\n});\n\n// Listen to multiple events at once\nconst unsubscribeAll = otpless.on({\n  [EVENT_TYPES.ONETAP]: (event) => console.log('Auth Success:', event),\n  [EVENT_TYPES.OTP_AUTO_READ]: (event) => console.log('Auto OTP:', event.response?.otp),\n  [EVENT_TYPES.FALLBACK_TRIGGERED]: (event) => console.log('Fallback to:', event.response?.deliveryChannel),\n  [EVENT_TYPES.FAILED]: (event) => console.error('Failed:', event.response?.errorMessage),\n});\n```\n\n## Events Reference\n\n| Event | `EVENT_TYPES` constant | When it fires | Key response fields |\n| --- | --- | --- | --- |\n| `ONETAP` | `EVENT_TYPES.ONETAP` | Authentication completed successfully | `token`, `userId` |\n| `OTP_AUTO_READ` | `EVENT_TYPES.OTP_AUTO_READ` | OTP was automatically read from SMS | `otp` |\n| `FALLBACK_TRIGGERED` | `EVENT_TYPES.FALLBACK_TRIGGERED` | Delivery channel changed (e.g. WhatsApp → SMS) | `deliveryChannel`, `authType`, `requestID` |\n| `FAILED` | `EVENT_TYPES.FAILED` | Authentication or SDK initialization failed | `errorMessage`, `errorCode` |\n| `LOADING_STATE` | `EVENT_TYPES.LOADING_STATE` | Loading state changed | `loading`, `sdkLoading`, `apiPending` |\n\n### `FALLBACK_TRIGGERED` in detail\n\nThis event fires when the OTPless backend switches the delivery channel mid-flow — for example, when a WhatsApp OTP could not be delivered and the SDK automatically falls back to SMS.\n\n```typescript\non(EVENT_TYPES.FALLBACK_TRIGGERED, (event) => {\n  const { deliveryChannel, authType, requestID } = event.response;\n  // deliveryChannel: the new channel being used (e.g. \"SMS\")\n  // authType: the auth type (e.g. \"OTP\")\n  // requestID: the original request token\n  console.log(`Switched to ${deliveryChannel}`);\n});\n```\n\n## Utility Functions\n\n```typescript\nimport { normalizeCountryCode, digitsOnly, redactTokens } from 'otpless-headless-js';\n\n// Normalize country code\nnormalizeCountryCode('91'); // '+91'\nnormalizeCountryCode('+1-234'); // '+1234'\n\n// Extract digits only\ndigitsOnly('98-765-43210'); // '9876543210'\n\n// Redact sensitive data for logging\nconst safeData = redactTokens({\n  phone: '9876543210',\n  otp: '123456',\n  token: 'secret'\n});\n// { phone: '9876543210', otp: '***redacted***', token: '***redacted***' }\n```\n\n## Next.js Usage\n\n```tsx\n'use client'; // Required for client components\n\nimport { useOTPless } from 'otpless-headless-js';\n\nexport default function AuthPage() {\n  const { ready, loading, init, initiate, verify } = useOTPless();\n  \n  // ... rest of your component\n{{ ... }}\n```\n\n## License\n\nMIT\n\n## Support\n\nFor issues and questions, please visit the [GitHub repository](https://github.com/otpless-tech/react-otpless) or contact [developer@otpless.com](mailto:developer@otpless.com).\n# otpless-headless-js\n","readmeFilename":"README.md"}