{"_id":"@a0n/aeon-invite","_rev":"2-5d0943916fa0357497905031bf33b40a","name":"@a0n/aeon-invite","dist-tags":{"latest":"5.0.0"},"versions":{"5.0.0":{"name":"@a0n/aeon-invite","version":"5.0.0","author":{"url":"https://buley.fyi","name":"Taylor William Buley"},"license":"MIT","_id":"@a0n/aeon-invite@5.0.0","maintainers":[{"name":"buley","email":"buley@outlook.com"}],"dist":{"shasum":"ba5aaee53779339d4f7ca2433ec56adb5880b42f","tarball":"https://registry.npmjs.org/@a0n/aeon-invite/-/aeon-invite-5.0.0.tgz","fileCount":25,"integrity":"sha512-du0fpXoYPyW5sjJtls7djjlVwJ53FDup503fadV+T7T13ruZ8KTy/u88/oiE/imY5IhdDf44ORBIBACf3+v1EQ==","signatures":[{"sig":"MEQCIE8GQ89kHNYgP9XExoZumKmFmwvh4TWCLmLiuvrplDgsAiBx9EcaUJXI6dmkaUgnb3lkBfUBzWXY2r52D3qGi0CNdw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":37271},"main":"dist/index.js","type":"module","_from":"file:a0n-aeon-invite-5.0.0.tgz","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./react":{"types":"./dist/react.d.ts","import":"./dist/react.js"}},"scripts":{"dev":"tsc -w","test":"bun test --coverage","build":"tsc"},"_npmUser":{"name":"buley","email":"buley@outlook.com"},"_resolved":"/private/var/folders/kf/tkq8cmd54fl9c1wh414dj3240000gn/T/b58e7e6623a1dc2b53963ff4ad478778/a0n-aeon-invite-5.0.0.tgz","_integrity":"sha512-du0fpXoYPyW5sjJtls7djjlVwJ53FDup503fadV+T7T13ruZ8KTy/u88/oiE/imY5IhdDf44ORBIBACf3+v1EQ==","_npmVersion":"11.11.0","description":"Beta shield, invite codes, waitlist management, and funnel analytics for controlled rollouts.","directories":{},"_nodeVersion":"25.8.0","_hasShrinkwrap":false,"devDependencies":{"react":"^19.2.4","react-dom":"^19.2.4","typescript":"^5.7.0","@types/react":"^19.2.14","@types/react-dom":"^19.2.3"},"peerDependencies":{"@a0n/aeon-flags":"5.0.0"},"peerDependenciesMeta":{"@a0n/aeon-flags":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/aeon-invite_5.0.0_1773802312922_0.43030468764435725","host":"s3://npm-registry-packages-npm-production"},"deprecated":"This package is deprecated and no longer supported. Do not use."}},"time":{"created":"2026-03-18T02:51:52.829Z","modified":"2026-03-27T20:49:14.798Z","5.0.0":"2026-03-18T02:51:53.073Z"},"author":{"url":"https://buley.fyi","name":"Taylor William Buley"},"license":"MIT","description":"Beta shield, invite codes, waitlist management, and funnel analytics for controlled rollouts.","maintainers":[{"name":"buley","email":"buley@outlook.com"}],"readme":"# @a0n/aeon-invite\n\nParent: [Open Source Catalog](../README.md)\n\n`@a0n/aeon-invite` handles invites, waitlists, beta shields, and rollout analytics for staged launches.\n\nThe fair brag is that it covers the whole rollout path in one package: code generation, waitlist handling, access evaluation, analytics hooks, storage adapters, and React bindings for gated UI.\n\n## Why People May Like It\n\n- invite code lifecycle management is built in,\n- waitlist joins and position checks are part of the same package,\n- access evaluation can consider admin, beta, redeemed, and code-based paths,\n- analytics hooks exist for funnel tracking,\n- and the React surface makes it easy to gate parts of the UI without rewriting the same logic.\n\n## Install\n\n```bash\nbun add @a0n/aeon-invite\n```\n\n## Quick Start\n\n```ts\nimport { InviteManager, MemoryInviteStore } from '@a0n/aeon-invite';\n\nconst manager = new InviteManager({\n  store: new MemoryInviteStore(),\n  adminEmails: ['founder@example.com'],\n  betaTesterEmails: ['qa@example.com'],\n});\n\nconst invite = await manager.createInviteCode('direct', 'founder@example.com', {\n  maxUses: 100,\n});\n\nconst gate = await manager.evaluate({\n  email: 'user@example.com',\n  inviteCode: invite.code,\n});\n```\n\n## Store Adapters\n\n- `MemoryInviteStore`: in-memory adapter for tests and local work\n- `D1InviteStore`: D1-backed persistence\n- `FetchInviteStore`: client-side adapter for `/api/invite/*` endpoints\n\nSchema for D1 lives at [sql/schema.sql](./sql/schema.sql).\n\n## React Bindings\n\nReact entrypoint: `@a0n/aeon-invite/react`\n\n```tsx\nimport { InviteProvider, BetaShield } from '@a0n/aeon-invite/react';\n\n<InviteProvider manager={manager} context={{ email: 'user@example.com' }}>\n  <BetaShield waitlistFallback={<div>Join waitlist</div>}>\n    <App />\n  </BetaShield>\n</InviteProvider>;\n```\n\n## Other Useful Exports\n\n- `generateInviteCode()` and `validateCodeFormat()`\n- `joinWaitlist()` and `getWaitlistPosition()`\n- `createFunnelEvent()`\n- `D1Analytics`, `ConsoleAnalytics`, and `BeaconAnalytics`\n\n## Development\n\n```bash\ncd open-source/aeon-invite\nbun run build\nbun test\n```\n\n## Why This README Is Grounded\n\nAeon Invite does not need inflated language. The strongest fair brag is that it already gives you a practical rollout package instead of forcing you to glue invites, waitlists, analytics, and UI gating together yourself.\n","readmeFilename":"README.md"}