@billionsend/node 0.2.1 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.2.2 (2026-11-19)
4
+
5
+ The OpenAPI snapshot follows the document the API now publishes (180 operations, as before).
6
+
7
+ - Suppressions can block a whole domain: `suppressions.create({ domain })` and `suppressions.batch.add({ domains })` (`emails` and `email` are optional now, and a request names either or both); `suppressions.list` and `listAll` take `kind` (`email` by default, `domain` or `all`). Every entry carries `kind` (`email` or `domain`), `domain` and `removable` (`false` for a bounce or a complaint, which cannot be removed), and `email` is `null` on a domain entry, so `string | null` in the types. A consumer mailbox provider such as `gmail.com` is refused as a domain.
8
+ - `deliverability.get()` answers a `domains` array (`DomainDeliverability`: `domain_id`, `domain`, `status`, `tier`, `paused_by`, `emails_sent`, the rates and the counts, `recent_hard_bounce_rate`, `recent_complaint_rate`, `pause_margin`, `window_days`), each sending domain's own standing.
9
+ - A send from a paused domain answers `403 domain_sending_paused` (a paused team is still `sending_paused`); both come back as a `PermissionDeniedError`.
10
+ - `domains.create` defaults `custom_return_path` to `bounce` (server-side); `domains.update` with `custom_return_path` is refused with 422, since the return path cannot change after the domain is added.
11
+ - The `deliverability.warning` and `deliverability.paused` webhook payloads carry `scope` (`team` or `domain`) and `domain` (`{ id, name }`, `null` for the team). Deliveries now carry the user agent `BillionSend-Webhooks/1.0 (+https://billionsend.com/docs/concepts/webhooks)` from `51.161.117.92`, which a receiving end behind a WAF should allow.
12
+ - The live suite refuses a domain suppression, which would block addresses the run did not make.
13
+
3
14
  ## 0.2.1 (2026-11-19)
4
15
 
5
16
  The OpenAPI snapshot follows the document the API now publishes.
package/README.md CHANGED
@@ -194,6 +194,8 @@ app.post("/webhooks/billionsend", express.raw({ type: "application/json" }), asy
194
194
 
195
195
  With the Fetch API (Next.js route handlers, Hono, Bun, Deno, workers) it is `await verifyWebhook(await request.text(), request.headers, secret)`. During a secret rotation a delivery carries a signature for each live secret, and either secret verifies it.
196
196
 
197
+ Deliveries come from `51.161.117.92` with the user agent `BillionSend-Webhooks/1.0 (+https://billionsend.com/docs/concepts/webhooks)`; when the receiving end sits behind a WAF or Cloudflare, allow them as the [webhooks guide](https://billionsend.com/docs/concepts/webhooks) describes.
198
+
197
199
  ## Import contacts from a CSV
198
200
 
199
201
  `contacts.imports.create` uploads a CSV (a string, a `Blob` or a `File`) and imports it in the background; poll the import for its `status` and `counts`. `column_map`, `segments` and `topics` are objects here; the SDK sends them as the JSON text the endpoint expects.
@@ -256,7 +258,7 @@ Every method takes a last `options` argument with `signal`, `headers`, `timeoutM
256
258
  | `broadcasts` | create, list, get, update, delete, send, duplicate, cancel, recipients, clickedLinks |
257
259
  | `templates` | create, list, get, update, delete, publish, duplicate |
258
260
  | `webhooks` | create, list, get, update, delete, rotateSigningSecret, `events` (list, get, replay, `attempts.list`) |
259
- | `suppressions` | create, list, get, delete, `batch` add / remove |
261
+ | `suppressions` | create, list, get, delete, `batch` add / remove; an entry is one address or a whole domain (`kind`, `domain`, `removable`; `email` is `null` on a domain entry) |
260
262
  | `unsubscribes` | create, list |
261
263
  | `verifications` | availability, estimate, create, list, get |
262
264
  | `usage`, `deliverability` | get |
package/dist/index.cjs CHANGED
@@ -166,7 +166,7 @@ function sleep(ms, signal) {
166
166
  }
167
167
 
168
168
  // src/version.ts
169
- var VERSION = "0.2.1";
169
+ var VERSION = "0.2.2";
170
170
 
171
171
  // src/core.ts
172
172
  var DEFAULT_BASE_URL = "https://api.billionsend.com";