shipmail 0.6.3 → 0.6.4

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/README.md CHANGED
@@ -359,12 +359,21 @@ const webhook = await shipmail.webhooks.create({
359
359
  url: "https://example.com/webhook",
360
360
  events: ["message.received", "message.sent"],
361
361
  description: "Incoming email handler",
362
+ // Optional. Sent as the Authorization header of every delivery. Never returned.
363
+ authorization: "Bearer your-endpoint-key",
364
+ // Optional. A whsec_ secret from the receiving service, such as a Grok automation.
365
+ // Deliveries then carry webhook-id, webhook-timestamp and webhook-signature. Never returned.
366
+ standard_webhooks_secret: "whsec_...",
362
367
  });
363
368
  // webhook.secret is returned only on creation. Store it now.
369
+ // webhook.has_authorization is true when an authorization value is set.
370
+ // webhook.has_standard_webhooks_secret is true when a signing secret is set.
364
371
 
365
372
  await shipmail.webhooks.list();
366
373
  await shipmail.webhooks.get("whk_...");
367
374
  await shipmail.webhooks.update("whk_...", { active: false });
375
+ await shipmail.webhooks.update("whk_...", { authorization: null }); // remove the header
376
+ await shipmail.webhooks.update("whk_...", { standard_webhooks_secret: null }); // stop signing
368
377
  await shipmail.webhooks.delete("whk_...");
369
378
 
370
379
  await shipmail.webhooks.rotateSecret("whk_...");
@@ -381,6 +390,7 @@ Supported event types:
381
390
  ```
382
391
  message.received
383
392
  message.sent
393
+ message.delayed
384
394
  message.delivered
385
395
  message.bounced
386
396
  message.complained
package/dist/index.cjs CHANGED
@@ -1665,7 +1665,7 @@ var Webhooks = class extends ApiResource {
1665
1665
  };
1666
1666
 
1667
1667
  // src/version.ts
1668
- var VERSION = "0.6.3";
1668
+ var VERSION = "0.6.4";
1669
1669
 
1670
1670
  // src/client.ts
1671
1671
  var DEFAULT_BASE_URL = "https://shipmail.to/api/v1";
@@ -1858,6 +1858,7 @@ var CONFERENCING_PROVIDER_IDS = ["zoom", "google_meet"];
1858
1858
  var WEBHOOK_EVENT_TYPES = [
1859
1859
  "message.received",
1860
1860
  "message.sent",
1861
+ "message.delayed",
1861
1862
  "message.delivered",
1862
1863
  "message.bounced",
1863
1864
  "message.complained",