{"_id":"@alhwyn/luma","_rev":"2-cb74445676841e04ac67646bbe549eb6","name":"@alhwyn/luma","dist-tags":{"latest":"0.1.2"},"versions":{"0.1.1":{"name":"@alhwyn/luma","version":"0.1.1","keywords":["luma","events","api","sdk","typescript"],"license":"MIT","_id":"@alhwyn/luma@0.1.1","maintainers":[{"name":"alhwyn","email":"alhwyn@alhwyn.com"}],"homepage":"https://github.com/Alhwyn/luma#readme","bugs":{"url":"https://github.com/Alhwyn/luma/issues"},"dist":{"shasum":"c460d0c88fe3b6bd779c4b80cc6a74ce909bc9ed","tarball":"https://registry.npmjs.org/@alhwyn/luma/-/luma-0.1.1.tgz","fileCount":37,"integrity":"sha512-G2AWOvBKFM1Fn8FSWa12RaLWpKEOabk7Fzh3XU1kJacJmfFjU+ti6TKd9ZVamzFf4KNpGJwlLeSMumYRKtIOUg==","signatures":[{"sig":"MEYCIQDALof/exd8o12zA6cukY6y71ljb1Evonmt+6JbmFmLUAIhAJXD7pQbSeJFbNq5EmnzCRcjz83V3lWF8alwdPgT+rLU","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":418623},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18"},"exports":{".":{"bun":"./src/index.ts","types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"gitHead":"77597c10a84c6db121a8b9a49d028e79764e499d","scripts":{"luma":"bun cli/src/index.ts","test":"bun test","build":"bun run build:api && bun run build:cli","build:api":"bun build ./src/index.ts --outdir dist --target node --format esm && tsc -p tsconfig.build.json","build:cli":"bun run --cwd cli build","publish:npm":"npm publish --access public","generate:types":"openapi-typescript https://public-api.luma.com/openapi.json -o src/types/generated.d.ts","prepublishOnly":"bun run build:api"},"_npmUser":{"name":"alhwyn","email":"alhwyn@alhwyn.com"},"repository":{"url":"git+https://github.com/Alhwyn/luma.git","type":"git"},"workspaces":[".","cli"],"_npmVersion":"11.6.2","description":"Unofficial TypeScript SDK for the Luma API","directories":{},"_nodeVersion":"24.11.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"bun-types":"^1.3.14","typescript":"^5","@types/node":"^26.0.1","openapi-typescript":"^7.13.0"},"_npmOperationalInternal":{"tmp":"tmp/luma_0.1.1_1782942192221_0.5253171889316743","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@alhwyn/luma","version":"0.1.2","description":"Unofficial TypeScript SDK for the Luma API","type":"module","license":"MIT","repository":{"type":"git","url":"git+https://github.com/Alhwyn/luma.git"},"publishConfig":{"access":"public"},"keywords":["luma","events","api","sdk","typescript"],"main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"bun":"./src/index.ts","types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"workspaces":[".","cli"],"engines":{"node":">=18"},"scripts":{"luma":"bun cli/src/index.ts","build:api":"bun build ./src/index.ts --outdir dist --target node --format esm && tsc -p tsconfig.build.json","build:cli":"bun run --cwd cli build","build":"bun run build:api && bun run build:cli","test":"bun test","prepublishOnly":"bun run build:api","publish:npm":"npm publish --access public","generate:types":"openapi-typescript https://public-api.luma.com/openapi.json -o src/types/generated.d.ts"},"devDependencies":{"@types/node":"^26.0.1","bun-types":"^1.3.14","openapi-typescript":"^7.13.0","typescript":"^5"},"gitHead":"2feb3c08919d530bc9b62c78b9cef9ba781d74ce","_id":"@alhwyn/luma@0.1.2","bugs":{"url":"https://github.com/Alhwyn/luma/issues"},"homepage":"https://github.com/Alhwyn/luma#readme","_nodeVersion":"24.11.1","_npmVersion":"11.6.2","dist":{"integrity":"sha512-Zk/v5dHvDtWEAoSVKrCYRD3KfNLvUld+8+qbYUArDfq3ODRuoQnR15XU5cbMfSbn7XjL2WaPNUf2R+hftD3jqg==","shasum":"bda79eed7a8cb470d3d4d0cd14abbb8239d1dd9c","tarball":"https://registry.npmjs.org/@alhwyn/luma/-/luma-0.1.2.tgz","fileCount":37,"unpackedSize":419371,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDmUCSVa1PqEjExlh8yXscvN4b7kkZOcLapWslPoF2AuQIhAIFipErckJhC5aXK1EX9z0xj4Cv79cDmOaWCmk0UgRTl"}]},"_npmUser":{"name":"alhwyn","email":"alhwyn@alhwyn.com"},"directories":{},"maintainers":[{"name":"alhwyn","email":"alhwyn@alhwyn.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/luma_0.1.2_1783028801391_0.5601726362288635"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-01T21:43:11.820Z","modified":"2026-07-02T21:46:41.671Z","0.1.1":"2026-07-01T21:43:12.381Z","0.1.2":"2026-07-02T21:46:41.572Z"},"bugs":{"url":"https://github.com/Alhwyn/luma/issues"},"license":"MIT","homepage":"https://github.com/Alhwyn/luma#readme","keywords":["luma","events","api","sdk","typescript"],"repository":{"type":"git","url":"git+https://github.com/Alhwyn/luma.git"},"description":"Unofficial TypeScript SDK for the Luma API","maintainers":[{"name":"alhwyn","email":"alhwyn@alhwyn.com"}],"readme":"# Unofficial Luma SDK\n\n> **Under construction** — not ready for production use.\n\nA TypeScript client for the [Luma public API](https://public-api.luma.com). Not affiliated with or maintained by Luma.\n\n**Note:** You need a [Luma Plus](https://luma.com) organization to use the API. See the [Getting Started guide](https://docs.luma.com/reference/getting-started-with-your-api) for setup and authentication.\n\n**Documentation:** [alhwyn.mintlify.site](https://alhwyn.mintlify.site/introduction) — install, authentication, API guides, webhooks, and CLI.\n\n## Install\n\n```bash\nbun add @alhwyn/luma\n```\n\nIf npm returns a 404, install from GitHub instead (no token required):\n\n```bash\nbun add github:Alhwyn/luma\n```\n\nBoth install as `@alhwyn/luma` in `node_modules`.\n\n### CLI (optional)\n\n```bash\nbun add @alhwyn/luma-cli\n```\n\n\n\n## Setup\n\nGet an API key from [Luma API keys](https://luma.com/calendar/manage/api-keys) (Luma Plus required).\n\n```bash\n# add LUMA_API_KEY=your-key-here\n```\n\n\n\n## Usage\n\n```ts\nimport { Luma } from \"@alhwyn/luma\";\n\nconst luma = new Luma(process.env.LUMA_API_KEY!);\n\nawait luma.events.guests.add(\"evt-abc123\", {\n  guests: [\n    { email: \"jane@example.com\", name: \"Jane Doe\" },\n  ],\n});\n```\n\n\n\n## Webhooks\n\nAdd to `.env` (see [.env.example](.env.example)):\n\n```bash\nLUMA_WEBHOOK_SECRET=whsec_...\nLUMA_WEBHOOK_EVENT_TYPES=guest.updated,guest.registered\n```\n\n\n\n### Register an endpoint\n\n```ts\nimport { Luma } from \"@alhwyn/luma\";\n\nconst luma = new Luma(process.env.LUMA_API_KEY!);\n\nconst endpoint = await luma.webhooks.create({\n  url: \"https://myapp.com/api/luma-webhook\",\n  event_types: [\"guest.updated\", \"guest.registered\"],\n});\n\n// Save endpoint.secret as LUMA_WEBHOOK_SECRET\n```\n\n`event_types` also reads from `LUMA_WEBHOOK_EVENT_TYPES` via `webhookEventTypesFromEnv()`.\n\n### Verify incoming events\n\n```ts\nimport { Luma } from \"@alhwyn/luma\";\n\nconst webhook = new Luma(process.env.LUMA_API_KEY!).webhooks.client({\n  secret: process.env.LUMA_WEBHOOK_SECRET!,\n});\n\n// In your HTTP handler — pass the raw body, not re-serialized JSON\nconst event = webhook.verify({\n  body: await req.text(),\n  headers: req.headers,\n});\n```\n\nInbound-only handlers do not need an API key:\n\n```ts\nimport { WebhookInboundClient } from \"@alhwyn/luma\";\n\nconst webhook = new WebhookInboundClient({\n  secret: process.env.LUMA_WEBHOOK_SECRET!,\n});\n```\n\n\n\n### Handle an event\n\n```ts\nif (event.type === \"guest.updated\") {\n  const checkedIn = event.data.event_tickets.some((t) => t.checked_in_at !== null);\n  if (checkedIn) {\n    // e.g. send welcome email to event.data.user_email\n  }\n}\n```\n\nLuma has no dedicated check-in webhook — check-in arrives as `guest.updated` with `event_tickets[].checked_in_at` set. See the [Guest Updated docs](https://docs.luma.com/reference/webhook_guest_updated).\n\n## CLI\n\nAfter installing `@alhwyn/luma-cli`:\n\n```bash\nluma users get\nluma events list\nluma --help\n```\n\n","readmeFilename":"README.md"}