shipmail 0.6.3 → 0.6.5

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
@@ -191,6 +191,11 @@ const inbox = await shipmail.mailboxes.listInboxMessages(mailboxId, {
191
191
  before: "2026-07-20T00:00:00.000Z",
192
192
  limit: 50,
193
193
  });
194
+ const invoices = await shipmail.mailboxes.listInboxMessages(mailboxId, {
195
+ from: "billing@vendor.example",
196
+ subject: "invoice",
197
+ has_attachment: true,
198
+ });
194
199
  const exact = await shipmail.mailboxes.getInboxMessage(mailboxId, inbox.data[0].id);
195
200
 
196
201
  const queue = await shipmail.mailboxes.listInboxThreads(mailboxId, {
@@ -359,12 +364,21 @@ const webhook = await shipmail.webhooks.create({
359
364
  url: "https://example.com/webhook",
360
365
  events: ["message.received", "message.sent"],
361
366
  description: "Incoming email handler",
367
+ // Optional. Sent as the Authorization header of every delivery. Never returned.
368
+ authorization: "Bearer your-endpoint-key",
369
+ // Optional. A whsec_ secret from the receiving service, such as a Grok automation.
370
+ // Deliveries then carry webhook-id, webhook-timestamp and webhook-signature. Never returned.
371
+ standard_webhooks_secret: "whsec_...",
362
372
  });
363
373
  // webhook.secret is returned only on creation. Store it now.
374
+ // webhook.has_authorization is true when an authorization value is set.
375
+ // webhook.has_standard_webhooks_secret is true when a signing secret is set.
364
376
 
365
377
  await shipmail.webhooks.list();
366
378
  await shipmail.webhooks.get("whk_...");
367
379
  await shipmail.webhooks.update("whk_...", { active: false });
380
+ await shipmail.webhooks.update("whk_...", { authorization: null }); // remove the header
381
+ await shipmail.webhooks.update("whk_...", { standard_webhooks_secret: null }); // stop signing
368
382
  await shipmail.webhooks.delete("whk_...");
369
383
 
370
384
  await shipmail.webhooks.rotateSecret("whk_...");
@@ -381,6 +395,7 @@ Supported event types:
381
395
  ```
382
396
  message.received
383
397
  message.sent
398
+ message.delayed
384
399
  message.delivered
385
400
  message.bounced
386
401
  message.complained
package/dist/index.cjs CHANGED
@@ -853,6 +853,10 @@ var Mailboxes = class extends ApiResource {
853
853
  folder_id: params?.folder_id,
854
854
  folder_role: params?.folder_role,
855
855
  search_text: params?.search_text,
856
+ from: params?.from,
857
+ to: params?.to,
858
+ subject: params?.subject,
859
+ has_attachment: params?.has_attachment,
856
860
  cursor: params?.cursor,
857
861
  after: params?.after,
858
862
  before: params?.before,
@@ -1665,7 +1669,7 @@ var Webhooks = class extends ApiResource {
1665
1669
  };
1666
1670
 
1667
1671
  // src/version.ts
1668
- var VERSION = "0.6.3";
1672
+ var VERSION = "0.6.5";
1669
1673
 
1670
1674
  // src/client.ts
1671
1675
  var DEFAULT_BASE_URL = "https://shipmail.to/api/v1";
@@ -1858,6 +1862,7 @@ var CONFERENCING_PROVIDER_IDS = ["zoom", "google_meet"];
1858
1862
  var WEBHOOK_EVENT_TYPES = [
1859
1863
  "message.received",
1860
1864
  "message.sent",
1865
+ "message.delayed",
1861
1866
  "message.delivered",
1862
1867
  "message.bounced",
1863
1868
  "message.complained",