{"_id":"@applaudiq/embed-capacitor","_rev":"4-deb24c6f058b57bee03ad22ec4210506","name":"@applaudiq/embed-capacitor","dist-tags":{"latest":"1.3.0"},"versions":{"1.1.0":{"name":"@applaudiq/embed-capacitor","version":"1.1.0","keywords":["capacitor","ionic","applaudiq","embed","sso","recognition","webview"],"author":{"name":"Arulraj V","email":"abofficial1997@gmail.com"},"license":"MIT","_id":"@applaudiq/embed-capacitor@1.1.0","maintainers":[{"name":"arul_thereward_store","email":"arulraj@vananam.com"}],"homepage":"https://github.com/therewardstore/applaudiq-embed-capacitor#readme","bugs":{"url":"https://github.com/therewardstore/applaudiq-embed-capacitor/issues"},"dist":{"shasum":"cca14776b6826f58217d4d3e40a27639d3c7b82c","tarball":"https://registry.npmjs.org/@applaudiq/embed-capacitor/-/embed-capacitor-1.1.0.tgz","fileCount":9,"integrity":"sha512-wXOAFqbbPjxGPb32OtTQXJVMq9htYA5y8bdmQ9d0fEC6RQwCFxZBnp0nxDlH5GlWACnwNE3NsNuKSTMPonpJjw==","signatures":[{"sig":"MEUCIACAJGjXOEm+06hmy9k5fGWyarDZMzpTqHi8m3w8qiIJAiEApqSOOXgQqPDDWyqETfaXwWJWLKACuHRjy2RUl8hfeXI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":64978},"main":"dist/index.cjs","type":"module","types":"dist/index.d.ts","module":"dist/index.js","source":"src/index.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"scripts":{"build":"tsup src/index.ts --format esm,cjs --dts --clean","clean":"rm -rf dist","prepare":"tsup src/index.ts --format esm,cjs --dts --clean","release":"release-it","typecheck":"tsc --noEmit"},"_npmUser":{"name":"arul_thereward_store","email":"arulraj@vananam.com"},"repository":{"url":"git+https://github.com/therewardstore/applaudiq-embed-capacitor.git","type":"git"},"_npmVersion":"10.9.2","description":"Capacitor SDK to embed the Applaud IQ recognition portal (auto + manual login, native SSO). Works with plain Capacitor and Ionic React/Angular/Vue.","directories":{},"_nodeVersion":"22.14.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","release-it":"^17.10.0","typescript":"^5.4.0","@capacitor/app":"^6.0.0","@capacitor/core":"^6.0.0","@capacitor/browser":"^6.0.0"},"peerDependencies":{"@capacitor/app":">=5","@capacitor/core":">=5","@capacitor/browser":">=5"},"_npmOperationalInternal":{"tmp":"tmp/embed-capacitor_1.1.0_1782219817989_0.7688407314797179","host":"s3://npm-registry-packages-npm-production"}},"1.1.1":{"name":"@applaudiq/embed-capacitor","version":"1.1.1","keywords":["capacitor","ionic","applaudiq","embed","sso","recognition","webview"],"author":{"name":"Arulraj V","email":"abofficial1997@gmail.com"},"license":"MIT","_id":"@applaudiq/embed-capacitor@1.1.1","maintainers":[{"name":"arul_thereward_store","email":"arulraj@vananam.com"}],"homepage":"https://github.com/therewardstore/applaudiq-embed-capacitor#readme","bugs":{"url":"https://github.com/therewardstore/applaudiq-embed-capacitor/issues"},"dist":{"shasum":"714e4bf8848d6e200ba4c2724e9aa0cf9d11969e","tarball":"https://registry.npmjs.org/@applaudiq/embed-capacitor/-/embed-capacitor-1.1.1.tgz","fileCount":9,"integrity":"sha512-pnyVCQ3unzEp8Ib+XhonIDtA5LMtSdZeel+2aO26QgmNNSRI0NYV+xXK6r0P6qczeCczJTxtlDVl/5OGMrVmpA==","signatures":[{"sig":"MEUCIEqDh6Ts4syFm7ZVXe/rfhozjU67g8lxIeWXo7/n63RuAiEAmAkGq7TH3frbXBLFoFk85GSaWwk7uRrnMpy6JER+Dvk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":65067},"main":"dist/index.cjs","type":"module","types":"dist/index.d.ts","module":"dist/index.js","source":"src/index.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"ac120cf09f0c4cc276fc6b0f80e99fc652c26f5b","scripts":{"build":"tsup src/index.ts --format esm,cjs --dts --clean","clean":"rm -rf dist","prepare":"tsup src/index.ts --format esm,cjs --dts --clean","release":"release-it","typecheck":"tsc --noEmit"},"_npmUser":{"name":"arul_thereward_store","email":"arulraj@vananam.com"},"repository":{"url":"git+https://github.com/therewardstore/applaudiq-embed-capacitor.git","type":"git"},"_npmVersion":"10.9.2","description":"Capacitor SDK to embed the Applaud IQ recognition portal (auto + manual login, native SSO). Works with plain Capacitor and Ionic React/Angular/Vue.","directories":{},"_nodeVersion":"22.14.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","release-it":"^17.10.0","typescript":"^5.4.0","@capacitor/app":"^6.0.0","@capacitor/core":"^6.0.0","@capacitor/browser":"^6.0.0"},"peerDependencies":{"@capacitor/app":">=5","@capacitor/core":">=5","@capacitor/browser":">=5"},"_npmOperationalInternal":{"tmp":"tmp/embed-capacitor_1.1.1_1782232320902_0.34696354137544017","host":"s3://npm-registry-packages-npm-production"}},"1.2.0":{"name":"@applaudiq/embed-capacitor","version":"1.2.0","keywords":["capacitor","ionic","applaudiq","embed","sso","recognition","webview"],"author":{"name":"Arulraj V","email":"abofficial1997@gmail.com"},"license":"MIT","_id":"@applaudiq/embed-capacitor@1.2.0","maintainers":[{"name":"arul_thereward_store","email":"arulraj@vananam.com"}],"homepage":"https://github.com/therewardstore/applaudiq-embed-capacitor#readme","bugs":{"url":"https://github.com/therewardstore/applaudiq-embed-capacitor/issues"},"dist":{"shasum":"818de588e53f3002a8b65aa44b9fff60386cf644","tarball":"https://registry.npmjs.org/@applaudiq/embed-capacitor/-/embed-capacitor-1.2.0.tgz","fileCount":9,"integrity":"sha512-2YLwLXoLT1YUCV1KX+8+dK1CgT+//w6/IHHbk71dd4yakrV3G9UpMp0WK78q2b7IVLI5HgWd/Ti+L2OiTxBhnA==","signatures":[{"sig":"MEUCIQDUTCgnE7bcPPoaDd16y/3dophCC0fnjfn5TY4NDQ8CugIgJKbq4Z9YQUHsDOrdgm1PzDXOj/S2fjMDJ6Th9dXguwc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":66899},"main":"dist/index.cjs","type":"module","types":"dist/index.d.ts","module":"dist/index.js","source":"src/index.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"e970be7f46f5bfb6fbc67c11c02b396fd8c7f51c","scripts":{"build":"tsup src/index.ts --format esm,cjs --dts --clean","clean":"rm -rf dist","prepare":"tsup src/index.ts --format esm,cjs --dts --clean","release":"release-it","typecheck":"tsc --noEmit"},"_npmUser":{"name":"arul_thereward_store","email":"arulraj@vananam.com"},"repository":{"url":"git+https://github.com/therewardstore/applaudiq-embed-capacitor.git","type":"git"},"_npmVersion":"10.9.2","description":"Capacitor SDK to embed the Applaud IQ recognition portal (auto + manual login, native SSO). Works with plain Capacitor and Ionic React/Angular/Vue.","directories":{},"_nodeVersion":"22.14.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","release-it":"^17.10.0","typescript":"^5.4.0","@capacitor/app":"^6.0.0","@capacitor/core":"^6.0.0","@capacitor/browser":"^6.0.0"},"peerDependencies":{"@capacitor/app":">=5","@capacitor/core":">=5","@capacitor/browser":">=5"},"_npmOperationalInternal":{"tmp":"tmp/embed-capacitor_1.2.0_1782991182585_0.7456189505125645","host":"s3://npm-registry-packages-npm-production"}},"1.3.0":{"name":"@applaudiq/embed-capacitor","version":"1.3.0","description":"Capacitor SDK to embed the Applaud IQ recognition portal (auto + manual login, native SSO). Works with plain Capacitor and Ionic React/Angular/Vue.","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"}},"source":"src/index.ts","scripts":{"clean":"rm -rf dist","build":"tsup src/index.ts --format esm,cjs --dts --clean","prepare":"tsup src/index.ts --format esm,cjs --dts --clean","typecheck":"tsc --noEmit","release":"release-it"},"publishConfig":{"access":"public"},"keywords":["capacitor","ionic","applaudiq","embed","sso","recognition","webview"],"repository":{"type":"git","url":"git+https://github.com/therewardstore/applaudiq-embed-capacitor.git"},"homepage":"https://github.com/therewardstore/applaudiq-embed-capacitor#readme","bugs":{"url":"https://github.com/therewardstore/applaudiq-embed-capacitor/issues"},"author":{"name":"Arulraj V","email":"abofficial1997@gmail.com"},"license":"MIT","peerDependencies":{"@capacitor/app":">=5","@capacitor/browser":">=5","@capacitor/core":">=5","@capacitor/filesystem":">=5","@capacitor/share":">=5"},"peerDependenciesMeta":{"@capacitor/filesystem":{"optional":true},"@capacitor/share":{"optional":true}},"devDependencies":{"@capacitor/app":"^6.0.0","@capacitor/browser":"^6.0.0","@capacitor/core":"^6.0.0","@capacitor/filesystem":"^6.0.0","@capacitor/share":"^6.0.0","release-it":"^17.10.0","tsup":"^8.0.0","typescript":"^5.4.0"},"_id":"@applaudiq/embed-capacitor@1.3.0","gitHead":"7a7d0a8b5c8d07677aaf8e53f5e7c9d586f199ca","_nodeVersion":"22.14.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-0gIAt4vmO9nytd5YXzPu0WDwQ6mbNAK64d4gAaFXFl2bRsVhOxfbVjQ8CK5u4ksanxbn1T9dMgmpp7ZNG2XS1Q==","shasum":"1992a2765b5499260bcda9f83fa14933d6cc2f2d","tarball":"https://registry.npmjs.org/@applaudiq/embed-capacitor/-/embed-capacitor-1.3.0.tgz","fileCount":9,"unpackedSize":72590,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCID0SLGrm4c7jLMKiSjAqpAdh6twSZ+SXq8axNYocj4E8AiARCxJ25xV/ZCUcCDOFWZgNH/Y8TZyYziKthxpmX213cw=="}]},"_npmUser":{"name":"arul_thereward_store","email":"arulraj@vananam.com"},"directories":{},"maintainers":[{"name":"arul_thereward_store","email":"arulraj@vananam.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/embed-capacitor_1.3.0_1783099537677_0.9761515736443238"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-23T13:03:37.741Z","modified":"2026-07-03T17:25:37.951Z","1.1.0":"2026-06-23T13:03:38.127Z","1.1.1":"2026-06-23T16:32:01.075Z","1.2.0":"2026-07-02T11:19:42.737Z","1.3.0":"2026-07-03T17:25:37.829Z"},"bugs":{"url":"https://github.com/therewardstore/applaudiq-embed-capacitor/issues"},"author":{"name":"Arulraj V","email":"abofficial1997@gmail.com"},"license":"MIT","homepage":"https://github.com/therewardstore/applaudiq-embed-capacitor#readme","keywords":["capacitor","ionic","applaudiq","embed","sso","recognition","webview"],"repository":{"type":"git","url":"git+https://github.com/therewardstore/applaudiq-embed-capacitor.git"},"description":"Capacitor SDK to embed the Applaud IQ recognition portal (auto + manual login, native SSO). Works with plain Capacitor and Ionic React/Angular/Vue.","maintainers":[{"name":"arul_thereward_store","email":"arulraj@vananam.com"}],"readme":"# @applaudiq/embed-capacitor\n\n[![npm](https://img.shields.io/npm/v/@applaudiq/embed-capacitor.svg)](https://www.npmjs.com/package/@applaudiq/embed-capacitor)\n\nEmbed the full **Applaud IQ** recognition portal inside a **Capacitor** app — plain Capacitor or\n**Ionic React / Angular / Vue** — with **auto-login** (a one-time token minted by your server) or\n**manual login** (the portal's own email / SSO). The portal renders in an `<iframe>`; **SSO** and the\nAndroid **Back** button go through Capacitor's native plugins.\n\n- Works with **plain Capacitor** and **Ionic** (React / Angular / Vue) — the API is framework-agnostic.\n- **Auto + manual login**, the **HR-approval gate**, and native **SSO** (Google / Microsoft).\n- Peer deps: `@capacitor/core`, `@capacitor/app`, `@capacitor/browser`.\n\n---\n\n## 1. Install\n\n```bash\nnpm install @applaudiq/embed-capacitor@^1.3.0 @capacitor/app @capacitor/browser\nnpx cap sync\n```\n\n## 2. Register your SSO callback scheme\n\nSSO opens in the system browser and the backend hands the one-time code back to **your app's** deep link.\nPick a scheme **unique to your app** (not the brand-wide `applaudiq://`) and register it natively:\n\n```xml\n<!-- iOS: ios/App/App/Info.plist -->\n<key>CFBundleURLTypes</key>\n<array><dict>\n  <key>CFBundleURLSchemes</key><array><string>myapp</string></array>\n</dict></array>\n```\n\n```xml\n<!-- Android: android/app/src/main/AndroidManifest.xml — inside <activity android:name=\".MainActivity\"> -->\n<intent-filter>\n  <action android:name=\"android.intent.action.VIEW\" />\n  <category android:name=\"android.intent.category.DEFAULT\" />\n  <category android:name=\"android.intent.category.BROWSABLE\" />\n  <data android:scheme=\"myapp\" android:host=\"sso-callback\" />\n</intent-filter>\n```\n\nPass it as `ssoCallback` (the SDK sends it to the backend as `native_redirect`). Default `applaudiq://sso-callback`.\n\n## 3. Render the embed\n\n**Manual login** — just the publishable key:\n\n```ts\nimport { ApplaudIQ } from '@applaudiq/embed-capacitor';\n\nApplaudIQ.init({ key: 'pk_live_…', ssoCallback: 'myapp://sso-callback' })\n  .open({ mode: 'manual', render: 'fullscreen' });\n```\n\n**Auto-login** — a one-time token your backend minted (`POST /api/v1/embed/sessions`):\n\n```ts\nconst embed = ApplaudIQ.init({ key: 'pk_live_…', ssoCallback: 'myapp://sso-callback' }).open({\n  mode: 'auto',\n  token: embedToken,\n  render: 'fullscreen',\n  onReady: () => {},        // signed in\n  onAuthPending: () => {},  // awaiting HR approval\n  onError: (m) => {},       // failed (incl. SSO ?error=)\n  onClose: () => {},        // dismissed\n});\n// later: embed.close();\n```\n\n## 4. Options\n\n| Option | |\n|---|---|\n| `config.key` | Publishable key (`pk_live_…`). Required, both modes. |\n| `config.baseUrl` | Portal origin. Defaults to the production portal. **HTTPS** in production. |\n| `config.ssoCallback` | Your app's `scheme://host` deep link (default `applaudiq://sso-callback`); sent as `native_redirect`. |\n| `config.backNavigation` | `true` (default): **Android** hardware Back + **iOS** left-edge swipe step back inside the embed (`onClose` at the root). `false`: platform default, no iOS swipe. See [Back navigation](#back-navigation). |\n| `mode` | `'auto'` (needs `token`) or `'manual'` (portal login). |\n| `render` | `'fullscreen'` (default) · `'modal'` · `'inline'` (needs `container`). |\n| callbacks | `onReady` · `onAuthPending` · `onError(message)` · `onClose` · `onSignOut`. |\n\n## Back navigation\n\nThe portal renders in a **cross-origin iframe**, so the SDK can't read its history directly. With\n`backNavigation` on (the default), it relays a back request to the portal, which steps back through its own\nscreens and replies only when it's already at the embed root — then the SDK tears the embed down and fires\n`onClose`. Route home in `onClose` (the Angular example navigates back to its Home page there):\n\n- **Android** — the hardware Back button.\n- **iOS** — a **left-edge swipe** (iOS has no hardware Back, and WKWebView's own swipe-back can't traverse the\n  iframe). The gesture lives in the leftmost ~20px of the embed.\n\n```ts\n.open({\n  mode: 'manual',\n  onClose: () => router.navigate(['/']),   // dismissed at the embed root → go Home\n});\n```\n\n## How SSO works\n\n`mode: 'manual'` shows the portal's email / SSO login inside the embed. SSO can't run in a WebView, so the SDK\nopens the IdP in the **system browser** (`@capacitor/browser`) at\n`…/auth/sso/{provider}/employee/authorize?native=1&native_redirect=<ssoCallback>`. The backend redirects the\none-time code to `<ssoCallback>?code=` (or `?error=`), `@capacitor/app`'s `appUrlOpen` catches it, and the SDK\nrelays it into the embed, which redeems it and reloads — signed in.\n\n## Downloads & external links\n\nWhen the portal (or the reward store nested inside it) needs to open a URL outside the WebView —\na file download, a payment page, or an OAuth handoff — it sends the `applaudiq:open-external` bridge\nmessage with payload `{ url }`. The SDK opens `http(s)` URLs in the **system browser**\n(`@capacitor/browser`). No app code is required; it works out of the box.\n\nThe reward store's **gift-card voucher download** additionally sends `applaudiq:save-file` with payload\n`{ base64, filename, mime }` — the file bytes, since a blob download can't reach disk in a WebView. To\nenable it, install the two **optional** plugins in your app:\n\n```bash\nnpm install @capacitor/filesystem @capacitor/share\nnpx cap sync\n```\n\nThe SDK then writes the file to the app cache and opens the OS share sheet (\"Save to Files\" / share\ntargets). If the plugins aren't installed, voucher downloads are a silent no-op — nothing else is affected.\n\n## Test integration\n\nA runnable example ships for each framework in\n[`applaudiq-sdk-example`](https://github.com/therewardstore/applaudiq-sdk-example) under\n`native-integration/capacitor/` (vanilla · react · angular · vue · ionic-react · ionic-angular · ionic-vue).\n\nLatest: **v1.3.0 (LTS)**. See [CHANGELOG.md](./CHANGELOG.md). MIT licensed.\n","readmeFilename":"README.md"}