{"_id":"@aiginy/hyperstack","_rev":"7-3abb72ac08fe0fbc3747bf3730fbd5bf","name":"@aiginy/hyperstack","dist-tags":{"latest":"1.0.5"},"versions":{"1.0.0":{"name":"@aiginy/hyperstack","version":"1.0.0","keywords":["whatsapp","whatsapp-business","oauth","embedded-signup","modal","shadow-dom","onboarding"],"license":"MIT","_id":"@aiginy/hyperstack@1.0.0","maintainers":[{"name":"aiginy","email":"devteam@aiginy.com"}],"dist":{"shasum":"11c43a292454ecffcf3fd3232f09b822ad9d408f","tarball":"https://registry.npmjs.org/@aiginy/hyperstack/-/hyperstack-1.0.0.tgz","fileCount":13,"integrity":"sha512-/kejq5IO0eWdswDnZRljIsdSX7rBd/6+UYrghJyJHChBg6Y3o9xM10+aW373ggRnBG9V+XEhIf86qgQBXC1SHw==","signatures":[{"sig":"MEUCIQCDNMaCx7MbNLGc7jlPaqPy3Mw8OC7dA4wHC4e/V4EKXwIgeNGF6fXFGz7g3OoRkCd6BHmKj13631tRAsQk2SOWtMo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":74479},"main":"./dist/client-v2.cjs","types":"./types/client-v2.d.ts","unpkg":"./dist/client-v2.umd.js","module":"./dist/client-v2.mjs","browser":"./dist/client-v2.mjs","exports":{".":{"types":"./types/client-v2.d.ts","import":"./dist/client-v2.mjs","default":"./dist/client-v2.mjs","require":"./dist/client-v2.cjs"},"./popup":{"types":"./types/client.d.ts","import":"./dist/client.mjs","default":"./dist/client.mjs","require":"./dist/client.cjs"},"./server":{"types":"./types/server.d.ts","import":"./dist/server.mjs","default":"./dist/server.mjs","require":"./dist/server.cjs"}},"scripts":{"test":"node --test tests/client.test.mjs tests/server.test.mjs","build":"node scripts/build.mjs","prepublishOnly":"npm run build"},"_npmUser":{"name":"aiginy","email":"devteam@aiginy.com"},"_npmVersion":"10.9.3","description":"Drop-in WhatsApp Business OAuth. Shadow DOM modal, zero dependencies, works with React, Vue, Svelte, Next.js, or plain HTML.","directories":{},"_nodeVersion":"22.20.0","typesVersions":{"*":{".":["./types/client-v2.d.ts"],"popup":["./types/client.d.ts"],"server":["./types/server.d.ts"]}},"_hasShrinkwrap":false,"devDependencies":{"esbuild":"^0.20.0"},"_npmOperationalInternal":{"tmp":"tmp/hyperstack_1.0.0_1774343074633_0.932150873917361","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@aiginy/hyperstack","version":"1.0.1","keywords":["whatsapp","whatsapp-business","oauth","embedded-signup","modal","shadow-dom","onboarding"],"license":"MIT","_id":"@aiginy/hyperstack@1.0.1","maintainers":[{"name":"aiginy","email":"devteam@aiginy.com"}],"dist":{"shasum":"717a2f06d418a2d5ec1d62476fd4666dd764ecb8","tarball":"https://registry.npmjs.org/@aiginy/hyperstack/-/hyperstack-1.0.1.tgz","fileCount":13,"integrity":"sha512-SQkcQL0gv0jwHvEx+RUpIg9RWnSI5EExyWqakCehkmYXKd1DWGe4D0pwn1yIDnG7Nt/ZTBiTAn2hJIyDNuxI2w==","signatures":[{"sig":"MEUCIQCbswiJLSd4JBBRreWdiE3r2pUEHqffHPsZbIsSKblpagIgUSBxGNgCovTQqHniLz6QpouPaKFreTgFElNtsSgXnSI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":74997},"main":"./dist/client-v2.cjs","types":"./types/client-v2.d.ts","unpkg":"./dist/client-v2.umd.js","module":"./dist/client-v2.mjs","browser":"./dist/client-v2.mjs","exports":{".":{"types":"./types/client-v2.d.ts","import":"./dist/client-v2.mjs","default":"./dist/client-v2.mjs","require":"./dist/client-v2.cjs"},"./popup":{"types":"./types/client.d.ts","import":"./dist/client.mjs","default":"./dist/client.mjs","require":"./dist/client.cjs"},"./server":{"types":"./types/server.d.ts","import":"./dist/server.mjs","default":"./dist/server.mjs","require":"./dist/server.cjs"}},"scripts":{"test":"node --test tests/client.test.mjs tests/server.test.mjs","build":"node scripts/build.mjs","prepublishOnly":"npm run build"},"_npmUser":{"name":"aiginy","email":"devteam@aiginy.com"},"_npmVersion":"10.9.3","description":"Drop-in WhatsApp Business OAuth. Shadow DOM modal, zero dependencies, works with React, Vue, Svelte, Next.js, or plain HTML.","directories":{},"_nodeVersion":"22.20.0","typesVersions":{"*":{".":["./types/client-v2.d.ts"],"popup":["./types/client.d.ts"],"server":["./types/server.d.ts"]}},"_hasShrinkwrap":false,"devDependencies":{"esbuild":"^0.20.0"},"_npmOperationalInternal":{"tmp":"tmp/hyperstack_1.0.1_1774343221096_0.4181404114422307","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@aiginy/hyperstack","version":"1.0.2","keywords":["whatsapp","whatsapp-business","oauth","embedded-signup","modal","shadow-dom","onboarding"],"license":"MIT","_id":"@aiginy/hyperstack@1.0.2","maintainers":[{"name":"aiginy","email":"devteam@aiginy.com"}],"dist":{"shasum":"49665436e125963d6ace7b13d75f10a4b5890bfc","tarball":"https://registry.npmjs.org/@aiginy/hyperstack/-/hyperstack-1.0.2.tgz","fileCount":13,"integrity":"sha512-EQuQfVpBzQ1TuuNQdu/DWgZ5W/MTfST5JNYtyyd9F/FRn/GTeNY4x36FVnmkNw2diohJUv2huTSoKiVUk9hNRw==","signatures":[{"sig":"MEUCIQC2g3P+HXI59WQjc803tP8ghLZz2Ag15hyC32SucGFwAgIgYlBsIKAm0Y3NzVRPizidh7qUGEbl46X4LXuH9Ict0z0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":75428},"main":"./dist/client-v2.cjs","types":"./types/client-v2.d.ts","unpkg":"./dist/client-v2.umd.js","module":"./dist/client-v2.mjs","browser":"./dist/client-v2.mjs","exports":{".":{"types":"./types/client-v2.d.ts","import":"./dist/client-v2.mjs","default":"./dist/client-v2.mjs","require":"./dist/client-v2.cjs"},"./popup":{"types":"./types/client.d.ts","import":"./dist/client.mjs","default":"./dist/client.mjs","require":"./dist/client.cjs"},"./server":{"types":"./types/server.d.ts","import":"./dist/server.mjs","default":"./dist/server.mjs","require":"./dist/server.cjs"}},"scripts":{"test":"node --test tests/client.test.mjs tests/server.test.mjs","build":"node scripts/build.mjs","prepublishOnly":"npm run build"},"_npmUser":{"name":"aiginy","email":"devteam@aiginy.com"},"_npmVersion":"10.9.3","description":"Drop-in WhatsApp Business OAuth. Shadow DOM modal, zero dependencies, works with React, Vue, Svelte, Next.js, or plain HTML.","directories":{},"_nodeVersion":"22.20.0","typesVersions":{"*":{".":["./types/client-v2.d.ts"],"popup":["./types/client.d.ts"],"server":["./types/server.d.ts"]}},"_hasShrinkwrap":false,"devDependencies":{"esbuild":"^0.20.0"},"_npmOperationalInternal":{"tmp":"tmp/hyperstack_1.0.2_1774343394586_0.598630854794453","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@aiginy/hyperstack","version":"1.0.3","keywords":["whatsapp","whatsapp-business","instagram","messenger","facebook","email","multi-channel","oauth","onboarding","embedded-signup","modal","shadow-dom"],"license":"MIT","_id":"@aiginy/hyperstack@1.0.3","maintainers":[{"name":"aiginy","email":"devteam@aiginy.com"}],"dist":{"shasum":"d00cf99d952a31dc972dda6a51495282004c023a","tarball":"https://registry.npmjs.org/@aiginy/hyperstack/-/hyperstack-1.0.3.tgz","fileCount":13,"integrity":"sha512-kCqX+i/yi0JmfqY39cEA6p06TwkwaCoLdZ828mjJrJhYqtv5NN1ETfg61gBotNxwK6Awj0Q13t8ox3wdZ0mCSg==","signatures":[{"sig":"MEYCIQD495gXIzaky4rGcy8vVki0nuhBat6z8WEdGi0vJ46TKQIhAMAjm68ObIU8Gzx3wfZGd/Dids5/mxd1q3bhDLmQLrtp","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":75608},"main":"./dist/client-v2.cjs","types":"./types/client-v2.d.ts","unpkg":"./dist/client-v2.umd.js","module":"./dist/client-v2.mjs","browser":"./dist/client-v2.mjs","exports":{".":{"types":"./types/client-v2.d.ts","import":"./dist/client-v2.mjs","default":"./dist/client-v2.mjs","require":"./dist/client-v2.cjs"},"./popup":{"types":"./types/client.d.ts","import":"./dist/client.mjs","default":"./dist/client.mjs","require":"./dist/client.cjs"},"./server":{"types":"./types/server.d.ts","import":"./dist/server.mjs","default":"./dist/server.mjs","require":"./dist/server.cjs"}},"scripts":{"test":"node --test tests/client.test.mjs tests/server.test.mjs","build":"node scripts/build.mjs","prepublishOnly":"npm run build"},"_npmUser":{"name":"aiginy","email":"devteam@aiginy.com"},"_npmVersion":"10.9.3","description":"Drop-in OAuth onboarding for any channel — WhatsApp, Instagram, Messenger, email and more. Shadow DOM modal, zero dependencies, works with any framework.","directories":{},"_nodeVersion":"22.20.0","typesVersions":{"*":{".":["./types/client-v2.d.ts"],"popup":["./types/client.d.ts"],"server":["./types/server.d.ts"]}},"_hasShrinkwrap":false,"devDependencies":{"esbuild":"^0.20.0"},"_npmOperationalInternal":{"tmp":"tmp/hyperstack_1.0.3_1774343625213_0.27389635511033505","host":"s3://npm-registry-packages-npm-production"}},"1.0.4":{"name":"@aiginy/hyperstack","version":"1.0.4","keywords":["whatsapp","whatsapp-business","instagram","messenger","facebook","email","multi-channel","oauth","onboarding","embedded-signup","modal","shadow-dom"],"license":"MIT","_id":"@aiginy/hyperstack@1.0.4","maintainers":[{"name":"aiginy","email":"devteam@aiginy.com"}],"dist":{"shasum":"4b2e4c5cebee826b2e6377c2a2e7c3dfa9241de2","tarball":"https://registry.npmjs.org/@aiginy/hyperstack/-/hyperstack-1.0.4.tgz","fileCount":13,"integrity":"sha512-qaylSkF0rix99y1LMa+lB6x6rufEwMQw9vxsTlHfMlAb71EKeCOXM7Mdcrrq7ic6hLMp+h/bT0jNSg0m1CEnBA==","signatures":[{"sig":"MEYCIQDB014sqJ+Bfdl1NjbPlQm57sapxumFkWf+fxJPdc3iJgIhAIJino0FXy4+Te63QZEmjb9RK+GvascMXauDtmQNmAcV","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":75508},"main":"./dist/client-v2.cjs","types":"./types/client-v2.d.ts","unpkg":"./dist/client-v2.umd.js","module":"./dist/client-v2.mjs","browser":"./dist/client-v2.mjs","exports":{".":{"types":"./types/client-v2.d.ts","import":"./dist/client-v2.mjs","default":"./dist/client-v2.mjs","require":"./dist/client-v2.cjs"},"./popup":{"types":"./types/client.d.ts","import":"./dist/client.mjs","default":"./dist/client.mjs","require":"./dist/client.cjs"},"./server":{"types":"./types/server.d.ts","import":"./dist/server.mjs","default":"./dist/server.mjs","require":"./dist/server.cjs"}},"scripts":{"test":"node --test tests/client.test.mjs tests/server.test.mjs","build":"node scripts/build.mjs","prepublishOnly":"npm run build"},"_npmUser":{"name":"aiginy","email":"devteam@aiginy.com"},"_npmVersion":"10.9.3","description":"Drop-in OAuth onboarding for any channel — WhatsApp, Instagram, Messenger, email and more. Shadow DOM modal, zero dependencies, works with any framework.","directories":{},"_nodeVersion":"22.20.0","typesVersions":{"*":{".":["./types/client-v2.d.ts"],"popup":["./types/client.d.ts"],"server":["./types/server.d.ts"]}},"_hasShrinkwrap":false,"devDependencies":{"esbuild":"^0.20.0"},"_npmOperationalInternal":{"tmp":"tmp/hyperstack_1.0.4_1774343722164_0.8206732329749535","host":"s3://npm-registry-packages-npm-production"}},"1.0.5":{"name":"@aiginy/hyperstack","version":"1.0.5","keywords":["whatsapp","whatsapp-business","instagram","messenger","facebook","email","multi-channel","oauth","onboarding","embedded-signup","modal","shadow-dom"],"license":"MIT","_id":"@aiginy/hyperstack@1.0.5","maintainers":[{"name":"aiginy","email":"devteam@aiginy.com"}],"dist":{"shasum":"aa0243d77c8dd7c9ee38bf93922a1571fbfb4bc9","tarball":"https://registry.npmjs.org/@aiginy/hyperstack/-/hyperstack-1.0.5.tgz","fileCount":13,"integrity":"sha512-arFsWaM5eC++ADSqkihunJz7nt+4mTXHYmcPhpvhhuDnpR6HNqmIr7RNnbthlxuPEtdKlIstIKbrBrde/sj+gQ==","signatures":[{"sig":"MEUCIQComLWjO3z83VhgqFT67bEx33X2sdXueAfWeqLZ8b3hJwIgb2S4nPWC+iB+Ho0d4/XAA5QXsSDQD9OTKjjCAuc8ZnU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":75507},"main":"./dist/client-v2.cjs","types":"./types/client-v2.d.ts","unpkg":"./dist/client-v2.umd.js","module":"./dist/client-v2.mjs","browser":"./dist/client-v2.mjs","exports":{".":{"types":"./types/client-v2.d.ts","import":"./dist/client-v2.mjs","default":"./dist/client-v2.mjs","require":"./dist/client-v2.cjs"},"./popup":{"types":"./types/client.d.ts","import":"./dist/client.mjs","default":"./dist/client.mjs","require":"./dist/client.cjs"},"./server":{"types":"./types/server.d.ts","import":"./dist/server.mjs","default":"./dist/server.mjs","require":"./dist/server.cjs"}},"scripts":{"test":"node --test tests/client.test.mjs tests/server.test.mjs","build":"node scripts/build.mjs","prepublishOnly":"npm run build"},"_npmUser":{"name":"aiginy","email":"devteam@aiginy.com"},"_npmVersion":"10.9.3","description":"Drop-in OAuth onboarding for any channel — WhatsApp, Instagram, Messenger, email and more. Shadow DOM modal, zero dependencies, works with any framework.","directories":{},"_nodeVersion":"22.20.0","typesVersions":{"*":{".":["./types/client-v2.d.ts"],"popup":["./types/client.d.ts"],"server":["./types/server.d.ts"]}},"_hasShrinkwrap":false,"devDependencies":{"esbuild":"^0.20.0"},"_npmOperationalInternal":{"tmp":"tmp/hyperstack_1.0.5_1774343844262_0.34357570702074214","host":"s3://npm-registry-packages-npm-production"}}},"time":{"created":"2026-03-24T09:04:34.563Z","modified":"2026-04-12T12:33:10.593Z","1.0.0":"2026-03-24T09:04:34.783Z","1.0.1":"2026-03-24T09:07:01.298Z","1.0.2":"2026-03-24T09:09:54.730Z","1.0.3":"2026-03-24T09:13:45.360Z","1.0.4":"2026-03-24T09:15:22.324Z","1.0.5":"2026-03-24T09:17:24.459Z"},"license":"MIT","keywords":["whatsapp","whatsapp-business","instagram","messenger","facebook","email","multi-channel","oauth","onboarding","embedded-signup","modal","shadow-dom"],"description":"Drop-in OAuth onboarding for any channel — WhatsApp, Instagram, Messenger, email and more. Shadow DOM modal, zero dependencies, works with any framework.","maintainers":[{"email":"devteam@aiginy.com","name":"aiginy.dev"}],"readme":"# Hyperstack\n\nDrop-in OAuth onboarding for any channel — WhatsApp, Instagram, Messenger, email and more. Shadow DOM modal, zero dependencies — works with React, Vue, Svelte, Next.js, or plain HTML.\n\n\n## Installation\n\n```bash\nnpm install @aiginy/hyperstack\n```\n\n> **Base URL:** The SDK points to `https://api.hyperstack.in` by default. No configuration needed unless you're self-hosting.\n\n## Quick Start\n\n### 1. Set environment variables on your server\n\n```bash\nHYPERSTACK_CLIENT_ID=cs_abc123\nHYPERSTACK_CLIENT_SECRET=sk_live_xxxxxxxxxxxxxxxxxxxxxxxx\n# HYPERSTACK_URL=https://api.hyperstack.in  ← default, only set to override\n```\n\n### 2. Create one backend endpoint\n\n```js\n// Example: Express\nimport { exchangeToken, ExchangeError } from \"@aiginy/hyperstack/server\";\n\napp.post(\"/api/exchange-token\", async (req, res) => {\n  try {\n    const result = await exchangeToken(req.body.token);\n    res.json(result);\n  } catch (err) {\n    if (err instanceof ExchangeError) {\n      res.status(err.statusCode).json({ error: err.message });\n    } else {\n      res.status(500).json({ error: \"Unknown error\" });\n    }\n  }\n});\n```\n\n### 3. Init and connect\n\n```js\nimport Hyperstack from \"@aiginy/hyperstack\";\n\nconst channel = Hyperstack.init({\n  clientId: \"cs_abc123\",\n  integrationUid: \"550e8400-e29b-41d4-a716-446655440000\",\n  // baseUrl: \"https://api.hyperstack.in\" — default, omit unless self-hosting\n});\n\n// On button click:\nchannel.connect({\n  customerRef: \"customer-123\",\n  onSuccess: async ({ token }) => {\n    const res = await fetch(\"/api/exchange-token\", {\n      method: \"POST\",\n      headers: { \"Content-Type\": \"application/json\" },\n      body: JSON.stringify({ token }),\n    });\n    const { connection_id, status } = await res.json();\n    console.log(\"Connected!\", connection_id, status);\n  },\n  onError: ({ code, message }) => {\n    console.error(\"Error:\", code, message);\n  },\n  onClose: () => {\n    console.log(\"Closed without completing\");\n  },\n});\n```\n\n## Entry Points\n\n| Import | Environment | What it does |\n|--------|-------------|--------------|\n| `@aiginy/hyperstack` | Browser | Shadow DOM modal OAuth flow (default) |\n| `@aiginy/hyperstack/popup` | Browser | Popup window OAuth flow (legacy) |\n| `@aiginy/hyperstack/server` | Node.js | Token exchange with client credentials |\n\nThe server entry **cannot** run in the browser — it reads `client_secret` from `process.env`.\n\n## Client API\n\n### `Hyperstack.init(config)`\n\n| Param | Type | Required | Description |\n|-------|------|----------|-------------|\n| `clientId` | `string` | ✅ | Public client_id (safe for frontend) |\n| `integrationUid` | `string` | ✅ | Integration UUID — identifies the channel (WhatsApp, Instagram, Messenger, email…) |\n| `baseUrl` | `string` | — | Defaults to `https://api.hyperstack.in`. Override only if self-hosting. |\n\nReturns a channel instance with `.connect()` and `.close()` methods.\n\n### `channel.connect(options?)`\n\n| Param | Type | Description |\n|-------|------|-------------|\n| `customerRef` | `string` | Your internal customer identifier |\n| `connectionId` | `string` | Existing connection UUID (reconnect flow) |\n| `brandName` | `string` | Override brand name shown in the modal |\n| `brandLogo` | `string` | Override brand logo URL shown in the modal |\n| `onSuccess` | `({ token }) => void` | Called with opaque token on completion |\n| `onError` | `({ code, message }) => void` | Called on error |\n| `onClose` | `() => void` | Called when modal closed without completing |\n\n**Callback guarantee:** Exactly one callback fires per `connect()` call.\n\n### `channel.close()`\n\nProgrammatically close the modal and fire `onClose`.\n\n### Error Codes\n\n| Code | When |\n|------|------|\n| `popup_blocked` | Browser blocked the FB dialog popup |\n| `bad_fb_url` | iframe returned an invalid Facebook URL |\n| `unknown` | Unexpected error |\n\n## Server API\n\n### `exchangeToken(token, config?)`\n\nExchanges the opaque token received from `onSuccess` for a `connection_id` + `status`.\n\n```js\nimport { exchangeToken } from \"@aiginy/hyperstack/server\";\n\nconst { connection_id, status } = await exchangeToken(token);\n```\n\nReads credentials from env vars by default:\n\n| Env Var | Description |\n|---------|-------------|\n| `HYPERSTACK_CLIENT_ID` | Your client_id |\n| `HYPERSTACK_CLIENT_SECRET` | Your client_secret |\n| `HYPERSTACK_URL` | Override the base URL (defaults to `https://api.hyperstack.in`) |\n\nOr pass them explicitly:\n\n```js\nconst result = await exchangeToken(token, {\n  clientId: \"cs_abc123\",\n  clientSecret: \"sk_live_xxx\",\n  // serviceUrl: \"https://api.hyperstack.in\" — default, omit unless self-hosting\n});\n```\n\n### `ExchangeError`\n\nThrown on non-2xx responses from the exchange API.\n\n| Property | Type | Description |\n|----------|------|-------------|\n| `statusCode` | `number` | HTTP status (0 for network errors) |\n| `code` | `string` | Machine-readable error code |\n| `message` | `string` | Human-readable message |\n\n**Error codes:** `invalid_credentials` · `token_expired` · `bad_request` · `server_error` · `network_error` · `invalid_response` · `exchange_failed`\n\n## Framework Examples\n\n```js\n// React\nconst channel = Hyperstack.init({ ... });\n<button onClick={() => channel.connect({ onSuccess, onError, onClose })}>\n  Connect Channel\n</button>\n```\n\n```js\n// Vue 3\nconst channel = Hyperstack.init({ ... });\nchannel.connect({ onSuccess, onError, onClose });\n```\n\n```svelte\n<!-- SvelteKit -->\n<script>\n  import Hyperstack from '@aiginy/hyperstack';\n  const channel = Hyperstack.init({ ... });\n</script>\n<button onclick={() => channel.connect({ onSuccess, onError, onClose })}>\n  Connect Channel\n</button>\n```\n\n```html\n<!-- Vanilla HTML -->\n<script src=\"https://unpkg.com/@aiginy/hyperstack/dist/client-v2.umd.js\"></script>\n<script>\n  const channel = ChannelServiceV2.init({ ... });\n</script>\n```\n\n## Package Structure\n\n```\n@aiginy/hyperstack/\n├── dist/\n│   ├── client-v2.mjs     ← ESM  — shadow DOM modal (default)\n│   ├── client-v2.cjs     ← CJS  — shadow DOM modal (default)\n│   ├── client-v2.umd.js  ← UMD  — shadow DOM modal (default)\n│   ├── client.mjs        ← ESM  — popup (legacy)\n│   ├── client.cjs        ← CJS  — popup (legacy)\n│   ├── client.umd.js     ← UMD  — popup (legacy)\n│   ├── server.mjs        ← ESM  — server token exchange\n│   └── server.cjs        ← CJS  — server token exchange\n├── types/\n│   ├── client-v2.d.ts    ← TypeScript types (modal)\n│   ├── client.d.ts       ← TypeScript types (popup)\n│   └── server.d.ts       ← TypeScript types (server)\n└── package.json\n```\n\n## Security\n\n- `client_id` is public — safe to ship in frontend code (like Stripe's publishable key)\n- `client_secret` never touches the browser — only used in the server helper\n- OAuth tokens are one-time use, deleted immediately after exchange\n- All credentials encrypted at rest with AES-256-GCM\n\n## License\n\nMIT — Secured by [Hyperstack](https://hyperstack.in)\n","readmeFilename":"README.md"}