{"_id":"@8xsend/node","_rev":"4-ba0eb36eeed87ee09298130f248811f9","name":"@8xsend/node","dist-tags":{"latest":"0.1.2"},"versions":{"0.1.0":{"name":"@8xsend/node","version":"0.1.0","keywords":["8xsend","email","lifecycle","events","resend"],"license":"MIT","_id":"@8xsend/node@0.1.0","maintainers":[{"name":"samieahmad","email":"samie@8x.social"}],"bin":{"8xsend":"bin/8xsend.mjs"},"dist":{"shasum":"a20bb149f167bd9ea92014a018e808015a26910a","tarball":"https://registry.npmjs.org/@8xsend/node/-/node-0.1.0.tgz","fileCount":7,"integrity":"sha512-jlSxhGOuZ1ncXLRMCCt6b6nQutHi99QgcG25q7SkWaxIK2B37PAzVutL81xF6XoZq3S/J7XOgqarONEpRbu5vA==","signatures":[{"sig":"MEQCIHlMXD6aG3tsySZOENolLqCNkGEVC0tiYZM/337KsHleAiBMjQycIUFGnd1rnXwk9lxFFU5QXqv2xJCZf9QJQfIX1g==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":38197},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"59870f04958aed48962df54f41edf35f54d2584a","scripts":{"build":"tsc -p tsconfig.json","prepublishOnly":"npm run build"},"_npmUser":{"name":"samieahmad","email":"samie@8x.social"},"deprecated":"Broken build, use 0.1.1","_npmVersion":"10.9.8","description":"Server-side client for the 8xSend lifecycle-email events API. Typed events, retries, batching, sandbox-friendly.","directories":{},"_nodeVersion":"22.23.2","_hasShrinkwrap":false,"devDependencies":{"typescript":"^5"},"_npmOperationalInternal":{"tmp":"tmp/node_0.1.0_1788865510598_0.18765002322081936","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@8xsend/node","version":"0.1.1","keywords":["8xsend","email","lifecycle","events","resend"],"license":"MIT","_id":"@8xsend/node@0.1.1","maintainers":[{"name":"samieahmad","email":"samie@8x.social"}],"bin":{"8xsend":"bin/8xsend.mjs"},"dist":{"shasum":"5e4753a1ccd26e7142bdeb72b8d6d4877adb9681","tarball":"https://registry.npmjs.org/@8xsend/node/-/node-0.1.1.tgz","fileCount":7,"integrity":"sha512-VinlyQ7utPDnJd19gMl27PEQoUDAJR8IsQjyP66cwzvO/uVdx0pEhkeMG5eND4Ai9drvgMhaSmQ4Rrkoxei1MQ==","signatures":[{"sig":"MEQCIEcaDcaHtQ8LM7996wWjI/XJ+bo6/oyOPwgYOyImMd84AiAJPNcZtD07lDCqkHUu3w3HSBQPMI7D/JRw63RgkMD7Eg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":38333},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"4330850f591c2cd0d366317b52c5f41731469e66","scripts":{"build":"tsc -p tsconfig.json && node --input-type=module -e \"import('./dist/index.js').then(m => { if (!m.EightXSend) throw new Error('bad build') })\"","prepublishOnly":"npm run build"},"_npmUser":{"name":"samieahmad","email":"samie@8x.social"},"_npmVersion":"10.9.8","description":"Server-side client for the 8xSend lifecycle-email events API. Typed events, retries, batching, sandbox-friendly.","directories":{},"_nodeVersion":"22.23.2","_hasShrinkwrap":false,"devDependencies":{"typescript":"^5"},"_npmOperationalInternal":{"tmp":"tmp/node_0.1.1_1788866597464_0.27672581510898575","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@8xsend/node","version":"0.1.2","description":"Server-side client for the 8xSend lifecycle-email events API. Typed events, retries, batching, sandbox-friendly.","license":"MIT","type":"module","main":"./dist/cjs/index.js","types":"./dist/index.d.ts","exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/cjs/index.d.ts","default":"./dist/cjs/index.js"}},"./package.json":"./package.json"},"engines":{"node":">=18"},"scripts":{"build":"rm -rf dist && tsc -p tsconfig.json && tsc -p tsconfig.cjs.json && echo '{\"type\":\"commonjs\"}' > dist/cjs/package.json","verify":"npm run build && node scripts/verify-publish.mjs","prepublishOnly":"npm run verify"},"keywords":["8xsend","email","lifecycle","events","resend"],"devDependencies":{"typescript":"^5"},"bin":{"8xsend":"bin/8xsend.mjs"},"module":"./dist/index.js","_id":"@8xsend/node@0.1.2","gitHead":"bcc095a4a59d8789a03f20f1b67a6b0a5f0b1ad9","_nodeVersion":"22.23.2","_npmVersion":"10.9.8","dist":{"integrity":"sha512-MNZ77xjL0d3CVuDezexRj3OG/V8IHDUk/pRcDxMFKMhbdqmELydPnBzsYECCI78k6Bp4CfRv3CLyG6p/VurWwA==","shasum":"4816cfcacc8fe9150258ee88ec5524b654afa370","tarball":"https://registry.npmjs.org/@8xsend/node/-/node-0.1.2.tgz","fileCount":12,"unpackedSize":69875,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIHXEemeq4SXRg2oh91JeHicauJN9xrz7YxPv6vt3LF4KAiBsLbKSti55hBSuNH4kphPUI29moVx4aBqpEsUlElXz5g=="}]},"_npmUser":{"name":"samieahmad","email":"samie@8x.social"},"directories":{},"maintainers":[{"name":"samieahmad","email":"samie@8x.social"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/node_0.1.2_1788867465861_0.6251799317501952"},"_hasShrinkwrap":false}},"time":{"created":"2026-09-08T11:05:10.254Z","modified":"2026-09-08T11:37:46.254Z","0.1.0":"2026-09-08T11:05:10.747Z","0.1.1":"2026-09-08T11:23:17.600Z","0.1.2":"2026-09-08T11:37:45.990Z"},"license":"MIT","keywords":["8xsend","email","lifecycle","events","resend"],"description":"Server-side client for the 8xSend lifecycle-email events API. Typed events, retries, batching, sandbox-friendly.","maintainers":[{"name":"samieahmad","email":"samie@8x.social"}],"readme":"# @8xsend/node\n\nServer-side client for 8xSend's events API. Zero dependencies, Node 18+.\n\n```bash\nnpm i @8xsend/node\n```\n\n```ts\nimport { EightXSend, eventId } from \"@8xsend/node\";\n\nexport const send = new EightXSend({\n  baseUrl: process.env.EIGHTXSEND_BASE_URL!,     // your 8xSend origin\n  key: process.env.EIGHTXSEND_INGEST_KEY!,       // 8xs_ing_… — server-side only\n  disabled: process.env.NODE_ENV !== \"production\" && !process.env.EIGHTXSEND_INGEST_KEY,\n});\n\n// on signup\nawait send.track(\n  \"user_signed_up\",\n  { id: user.id, email: user.email, name: user.name, locale: user.locale, marketing_consent: true },\n  { signup_method: \"google\" },\n  { eventId: eventId(\"signup\", user.id) },       // stable → retries and backfills dedupe\n);\n\n// on a Stripe invoice.payment_failed webhook\nawait send.track(\"payment_failed\", { id: user.id, email: user.email },\n  { amount_cents: invoice.amount_due, currency: invoice.currency, manage_billing_url: invoice.hosted_invoice_url },\n  { eventId: eventId(\"payment_failed\", invoice.id) });\n\n// the user opts back in from your preferences screen\nawait send.consent.subscribe({ id: user.id, email: user.email }, \"preferences\");\n\n// daily cron\nawait send.trackBatch(inactive.map((u) =>\n  send.envelope(\"user_inactive\", { id: u.id, email: u.email },\n    { last_active_at: u.lastActiveAt, days_inactive: 14 },\n    { eventId: eventId(\"inactive\", u.id, weekStamp) })));\n```\n\nWhat it does for you:\n\n- **Types from the catalog.** Event names and the properties each one needs are compile-time checked. Money is integer cents.\n- **Retries** 429 and 5xx with backoff, honouring `Retry-After`, with the same `event_id` so nothing double-sends.\n- **Batches** are chunked to the API's 500 limit.\n- **Partial rejections and property warnings** on a 202 are surfaced through `onWarning` (default: `console.warn`) and returned in the result — never silently dropped.\n- **`disabled: true`** turns every call into a no-op for local dev, CI and preview deployments.\n- **Errors** are `EightXSendError` with `status`, `code`, `hint` and `requestId` — the same request id 8xSend logs.\n\nNever use this from a browser or a mobile app. The key is a server secret; call your own backend and let it call 8xSend.\n\nContract: `<your 8xSend>/llms.txt`, `/api/ingest/v1/schema.json`, `/api/ingest/v1/openapi.json`.\n","readmeFilename":"README.md"}