{"_id":"@buun_group/destroy-network-sdk","_rev":"3-65e410d9b941af1fcd83b7ac58fe0ddb","name":"@buun_group/destroy-network-sdk","dist-tags":{"latest":"1.0.3"},"versions":{"1.0.0":{"name":"@buun_group/destroy-network-sdk","version":"1.0.0","keywords":["destroy-network","burnermail","disposable-email","temporary-email","temp-mail","email","sdk","api-client","typescript"],"author":{"name":"BUUN Group","email":"hello@buun.co"},"license":"MIT","_id":"@buun_group/destroy-network-sdk@1.0.0","maintainers":[{"name":"buun_group","email":"sacha.roussakis-notter@buungroup.com"}],"homepage":"https://destroy.network","bugs":{"url":"https://github.com/buun-group/destroy-network-sdk/issues"},"dist":{"shasum":"69e5d2acb22d317833c3d8ddcfb5a64d168da49e","tarball":"https://registry.npmjs.org/@buun_group/destroy-network-sdk/-/destroy-network-sdk-1.0.0.tgz","fileCount":9,"integrity":"sha512-FtO5RGk8ciqLmPbc446EqbJbYxaOSdKa7jrZvYRfeW7wTGITVStGlLUtIk0SgUaiICaPkLS44R84h8IZp+81IA==","signatures":[{"sig":"MEYCIQCO+YrFbkDv/+Bhf27e1hXe46hyA5RKKy6wLItVmGMbSQIhAOkbtGF3KyC3aKGLHutYyD5x7Krb9pcQcfFcPXaQa4EM","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":633150},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./package.json":"./package.json"},"gitHead":"7877af908ebaf9e8d8e9606c8618539da7fbb0dc","scripts":{"dev":"tsup --watch","test":"vitest run","build":"tsup","clean":"rm -rf dist","prepack":"npm run build && npm run check-exports","typecheck":"tsc --noEmit","test:watch":"vitest","check-exports":"node scripts/check-exports.mjs","prepublishOnly":"npm run typecheck && npm run test"},"_npmUser":{"name":"buun_group","email":"sacha.roussakis-notter@buungroup.com"},"repository":{"url":"git+https://github.com/buun-group/destroy-network-sdk.git","type":"git"},"_npmVersion":"11.4.2","description":"Official TypeScript SDK for DESTROY.NETWORK — privacy-first disposable email service","directories":{},"sideEffects":false,"_nodeVersion":"20.19.1","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.3.0","vitest":"^3.0.0","typescript":"^5.7.0","@types/node":"^22.0.0"},"_npmOperationalInternal":{"tmp":"tmp/destroy-network-sdk_1.0.0_1770343742577_0.6887106626206831","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@buun_group/destroy-network-sdk","version":"1.0.2","keywords":["destroy-network","burnermail","disposable-email","temporary-email","temp-mail","email","sdk","api-client","typescript"],"author":{"name":"BUUN Group","email":"hello@buun.co"},"license":"MIT","_id":"@buun_group/destroy-network-sdk@1.0.2","maintainers":[{"name":"buun_group","email":"sacha.roussakis-notter@buungroup.com"}],"homepage":"https://destroy.network","bugs":{"url":"https://github.com/buun-group/destroy-network-sdk/issues"},"dist":{"shasum":"4102ee8ee00cf5a59ee4da609645dae8de4e510b","tarball":"https://registry.npmjs.org/@buun_group/destroy-network-sdk/-/destroy-network-sdk-1.0.2.tgz","fileCount":35,"integrity":"sha512-bKg6SuLb9keeepVIkKd7CsA81Uoisrc3LqRqWw5vu8H58fKnCtMuTqM8z4zyW5dyKgj6ulOMtuvjOjNXoo8AGg==","signatures":[{"sig":"MEYCIQDtbu15+SjQvFAB45XUT09o6K7RSOUQ7iixd75eBLmaPgIhAL9Mm5f5M63ziRUymGfO1M6Cjyj6Czw4w7rCyL/DcvZ1","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":885423},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./package.json":"./package.json"},"gitHead":"7877af908ebaf9e8d8e9606c8618539da7fbb0dc","scripts":{"dev":"tsup --watch","test":"vitest run","build":"tsup","clean":"rm -rf dist","prepack":"npm run build && npm run check-exports","release":"node scripts/release.mjs","typecheck":"tsc --noEmit","test:watch":"vitest","check-exports":"node scripts/check-exports.mjs","prepublishOnly":"npm run typecheck && npm run test"},"_npmUser":{"name":"buun_group","email":"sacha.roussakis-notter@buungroup.com"},"repository":{"url":"git+https://github.com/buun-group/destroy-network-sdk.git","type":"git"},"_npmVersion":"11.4.2","description":"Official TypeScript SDK for DESTROY.NETWORK — privacy-first disposable email service","directories":{},"sideEffects":false,"_nodeVersion":"20.19.1","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.3.0","vitest":"^3.0.0","typescript":"^5.7.0","@types/node":"^22.0.0"},"_npmOperationalInternal":{"tmp":"tmp/destroy-network-sdk_1.0.2_1770346282667_0.7195212294700539","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@buun_group/destroy-network-sdk","version":"1.0.3","description":"Official TypeScript SDK for DESTROY.NETWORK — privacy-first disposable email service","author":{"name":"BUUN Group","email":"hello@buun.co"},"license":"MIT","type":"module","sideEffects":false,"main":"./dist/index.cjs","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./package.json":"./package.json"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"engines":{"node":">=18"},"scripts":{"build":"tsup","dev":"tsup --watch","test":"vitest run","test:watch":"vitest","typecheck":"tsc --noEmit","clean":"rm -rf dist","check-exports":"node scripts/check-exports.mjs","release":"node scripts/release.mjs","prepack":"npm run build && npm run check-exports","prepublishOnly":"npm run typecheck && npm run test"},"devDependencies":{"@types/node":"^22.0.0","tsup":"^8.3.0","typescript":"^5.7.0","vitest":"^3.0.0"},"keywords":["destroy-network","burnermail","disposable-email","temporary-email","temp-mail","email","sdk","api-client","typescript"],"homepage":"https://destroy.network","repository":{"type":"git","url":"git+https://github.com/buun-group/destroy-network-sdk.git"},"bugs":{"url":"https://github.com/buun-group/destroy-network-sdk/issues"},"_id":"@buun_group/destroy-network-sdk@1.0.3","gitHead":"7877af908ebaf9e8d8e9606c8618539da7fbb0dc","_nodeVersion":"20.19.1","_npmVersion":"11.4.2","dist":{"integrity":"sha512-B1CtAdK7462GbwuihP1MUkC8Y0WEbRB4Ige2jQiurqY63dZwEhTyhno+FoQPd3Dn+dTS86NjSN2mD+PKgKlX/A==","shasum":"fd96d3880376b86ab45105edb09206b8a778d1b7","tarball":"https://registry.npmjs.org/@buun_group/destroy-network-sdk/-/destroy-network-sdk-1.0.3.tgz","fileCount":35,"unpackedSize":873669,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQC4V2Uv5LVgV5jp1xF92ze1R3h7kOdcOmc3SRJczwvJrgIgJO2VmRT4g5/gS1L8H5syJo+XMzv62SKJ2jiOTig06rU="}]},"_npmUser":{"name":"buun_group","email":"sacha.roussakis-notter@buungroup.com"},"directories":{},"maintainers":[{"name":"buun_group","email":"sacha.roussakis-notter@buungroup.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/destroy-network-sdk_1.0.3_1770347239081_0.38786077892706294"},"_hasShrinkwrap":false}},"time":{"created":"2026-02-06T02:09:02.507Z","modified":"2026-02-06T03:07:19.360Z","1.0.0":"2026-02-06T02:09:02.776Z","1.0.2":"2026-02-06T02:51:22.865Z","1.0.3":"2026-02-06T03:07:19.262Z"},"bugs":{"url":"https://github.com/buun-group/destroy-network-sdk/issues"},"author":{"name":"BUUN Group","email":"hello@buun.co"},"license":"MIT","homepage":"https://destroy.network","keywords":["destroy-network","burnermail","disposable-email","temporary-email","temp-mail","email","sdk","api-client","typescript"],"repository":{"type":"git","url":"git+https://github.com/buun-group/destroy-network-sdk.git"},"description":"Official TypeScript SDK for DESTROY.NETWORK — privacy-first disposable email service","maintainers":[{"name":"buun_group","email":"sacha.roussakis-notter@buungroup.com"}],"readme":"# @buun_group/destroy-network-sdk\n\nOfficial TypeScript SDK for [DESTROY.NETWORK](https://destroy.network) — a privacy-first disposable email service.\n\n## Installation\n\n```bash\nnpm install @buun_group/destroy-network-sdk\n```\n\n## Quick Start\n\n```typescript\nimport { DestroyNetwork } from '@buun_group/destroy-network-sdk';\n\n// Reads DESTROY_NETWORK_API_KEY from environment automatically\nconst client = new DestroyNetwork();\n\n// Or provide explicitly\nconst client = new DestroyNetwork({\n  apiKey: 'sk_live_abc123...',\n});\n```\n\n## Usage\n\n### Inboxes\n\n```typescript\n// Create a disposable inbox\nconst inbox = await client.inboxes.create({\n  domain: '748392.best',\n  customName: 'my-temp',\n});\nconsole.log(inbox.address); // my-temp@748392.best\n\n// List messages (paginated)\nconst page = await client.inboxes.listMessages(inbox.id, { limit: 10 });\nconsole.log(`${page.pagination.total} messages`);\n\n// Auto-paginate through all messages\nfor await (const msg of client.inboxes.listMessagesAutoPaging(inbox.id)) {\n  console.log(msg.subject, msg.from);\n}\n\n// Get full message content\nconst message = await client.inboxes.getMessage(inbox.id, 'msg_123');\nconsole.log(message.bodyText);\nconsole.log(message.bodyHtml);\n\n// Download attachment\nconst response = await client.inboxes.downloadAttachment(inbox.id, 'msg_123', 'att_456');\nconst blob = await response.blob();\n\n// Extend inbox lifetime\nawait client.inboxes.extend(inbox.id);\n\n// Delete inbox\nawait client.inboxes.delete(inbox.id);\n```\n\n### User Account\n\n```typescript\n// Get current user profile\nconst user = await client.user.me();\nconsole.log(user.email, user.subscriptionTier);\n\n// Get user stats\nconst stats = await client.user.stats();\nconsole.log(`${stats.messages.total} emails received`);\n\n// List all inboxes\nconst inboxes = await client.user.listInboxes();\n```\n\n### Teams (Business Plan)\n\n```typescript\n// Create a team\nconst team = await client.teams.create({ name: 'Engineering' });\n\n// Invite a member\nawait client.teams.invite(team.id, { email: 'colleague@example.com' });\n\n// Share an inbox with the team\nawait client.teams.shareInbox(team.id, { inboxId: inbox.id });\n\n// List team inboxes\nconst shared = await client.teams.listInboxes(team.id);\n```\n\n### Labels (Pro/Business)\n\n```typescript\n// Create a label\nconst label = await client.labels.create({ name: 'Important', color: '#ff0000' });\n\n// Add label to a message\nawait client.labels.addToMessage('msg_123', label.id);\n```\n\n### Inbox Rules (Pro/Business)\n\n```typescript\n// Auto-forward emails from a specific sender\nawait client.inboxRules.create({\n  name: 'Forward GitHub',\n  fromPattern: '*@github.com',\n  action: 'forward',\n  actionValue: 'real@example.com',\n});\n```\n\n### Webhooks\n\n```typescript\n// Create a webhook for new messages\nconst webhook = await client.webhooks.create({\n  url: 'https://example.com/webhook',\n  events: ['message.received', 'inbox.expired'],\n});\nconsole.log(webhook.secret); // Store this — only returned once\n\n// Test webhook delivery\nawait client.webhooks.test(webhook.id);\n```\n\n### Custom Domains\n\n```typescript\n// Add a custom domain\nconst domain = await client.domains.add({ domain: 'mail.example.com' });\n\n// Verify DNS records\nconst txt = await client.domains.verifyTxt(domain.id);\nconst mx = await client.domains.verifyMx(domain.id);\n```\n\n### Billing\n\n```typescript\n// Create a checkout session for upgrading\nconst { url } = await client.billing.createCheckout({\n  plan: 'pro',\n  interval: 'monthly',\n});\n// Redirect user to `url`\n\n// Check subscription status\nconst sub = await client.billing.getSubscription();\nconsole.log(sub.plan, sub.status);\n```\n\n## Error Handling\n\nAll errors extend `APIError` with typed subclasses:\n\n```typescript\nimport {\n  DestroyNetwork,\n  NotFoundError,\n  RateLimitError,\n  AuthenticationError,\n} from '@buun_group/destroy-network-sdk';\n\ntry {\n  await client.inboxes.get('nonexistent');\n} catch (error) {\n  if (error instanceof NotFoundError) {\n    console.log('Inbox not found');\n  } else if (error instanceof RateLimitError) {\n    console.log(`Retry after ${error.retryAfter}s`);\n  } else if (error instanceof AuthenticationError) {\n    console.log('Invalid API key');\n  }\n}\n```\n\n## Configuration\n\n```typescript\nconst client = new DestroyNetwork({\n  // API key (default: reads DESTROY_NETWORK_API_KEY env var)\n  apiKey: 'sk_live_...',\n\n  // Base URL (default: https://destroy.network)\n  baseURL: 'https://destroy.network',\n\n  // Request timeout in ms (default: 30000)\n  timeout: 30000,\n\n  // Retry config\n  retry: {\n    maxRetries: 2,           // default: 2\n    initialDelayMs: 500,     // default: 500\n    maxDelayMs: 8000,        // default: 8000\n    backoffMultiplier: 2,    // default: 2\n  },\n\n  // Custom fetch implementation\n  fetch: customFetch,\n});\n```\n\n## Requirements\n\n- Node.js >= 18 (or any runtime with global `fetch`)\n- TypeScript >= 5.0 (optional, for type safety)\n\n## License\n\nMIT\n","readmeFilename":"README.md"}