shipmail 0.4.6 → 0.4.9

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
@@ -372,7 +372,6 @@ message.sent
372
372
  message.delivered
373
373
  message.bounced
374
374
  message.complained
375
- thread.needs_reply
376
375
  mailbox.rule_matched
377
376
  domain.verified
378
377
  domain.verification_failed
@@ -414,6 +413,8 @@ await shipmail.audiences.subscribers.add(audience.id, {
414
413
  await shipmail.audiences.feeds.update(audience.id, {
415
414
  enabled: true,
416
415
  title: "Release notes",
416
+ canonical_url: "https://example.com/feed.xml",
417
+ entry_limit: 25,
417
418
  });
418
419
  // Graceful migration: the current URL redirects to the replacement.
419
420
  await shipmail.audiences.feeds.rotate(audience.id);
@@ -426,7 +427,7 @@ await shipmail.audiences.feeds.revoke(audience.id);
426
427
  ```ts
427
428
  import { readFile } from "node:fs/promises";
428
429
 
429
- const newsletterDomains = await shipmail.newsletters.domains.list({ limit: 25 });
430
+ const senderIdentities = await shipmail.newsletters.senderIdentities.list({ limit: 25 });
430
431
  const assets = await shipmail.newsletters.assets.list({ kind: "image", limit: 25 });
431
432
  const hero = await shipmail.newsletters.assets.upload({
432
433
  filename: "hero.png",
@@ -442,7 +443,7 @@ console.log(assets.storage.used_bytes, assets.storage.limit_bytes);
442
443
 
443
444
  const newsletter = await shipmail.newsletters.create({
444
445
  audience_id: "aud_...",
445
- newsletter_domain_id: newsletterDomains.data[0].id,
446
+ sender_identity_id: senderIdentities.data[0].id,
446
447
  name: "July changelog",
447
448
  subject: "What shipped in July",
448
449
  preview_text: "A quick product update",
@@ -768,4 +769,4 @@ This is the recommended pattern for unit tests. No HTTP interception or mocking
768
769
  - [TypeScript SDK guide](https://shipmail.to/docs/sdks/typescript)
769
770
  - [`shipmail-mcp` (MCP server)](https://www.npmjs.com/package/shipmail-mcp)
770
771
  - [Changelog](./CHANGELOG.md)
771
- - [Issues](https://github.com/jcoulaud/ShipMail/issues)
772
+ - [Issues](https://github.com/shipmail-to/Shipmail/issues)
package/dist/index.cjs CHANGED
@@ -1076,6 +1076,21 @@ var NewsletterDomains = class extends ApiResource {
1076
1076
  return new Page(this.client, "/newsletter-domains", { limit: params?.limit });
1077
1077
  }
1078
1078
  };
1079
+ var NewsletterSenderIdentities = class extends ApiResource {
1080
+ list(params, options) {
1081
+ return this.client.request({
1082
+ method: "GET",
1083
+ path: "/newsletter-sender-identities",
1084
+ query: { cursor: params?.cursor, limit: params?.limit },
1085
+ methodOptions: options
1086
+ });
1087
+ }
1088
+ listAutoPaginating(params) {
1089
+ return new Page(this.client, "/newsletter-sender-identities", {
1090
+ limit: params?.limit
1091
+ });
1092
+ }
1093
+ };
1079
1094
  var NewsletterAssets = class extends ApiResource {
1080
1095
  list(params, options) {
1081
1096
  return this.client.request({
@@ -1120,6 +1135,7 @@ var Newsletters = class extends ApiResource {
1120
1135
  constructor(client) {
1121
1136
  super(client);
1122
1137
  this.domains = new NewsletterDomains(client);
1138
+ this.senderIdentities = new NewsletterSenderIdentities(client);
1123
1139
  this.assets = new NewsletterAssets(client);
1124
1140
  }
1125
1141
  create(params, options) {
@@ -1539,7 +1555,7 @@ var Webhooks = class extends ApiResource {
1539
1555
  };
1540
1556
 
1541
1557
  // src/version.ts
1542
- var VERSION = "0.4.6";
1558
+ var VERSION = "0.4.9";
1543
1559
 
1544
1560
  // src/client.ts
1545
1561
  var DEFAULT_BASE_URL = "https://shipmail.to/api/v1";
@@ -1713,7 +1729,6 @@ var WEBHOOK_EVENT_TYPES = [
1713
1729
  "message.delivered",
1714
1730
  "message.bounced",
1715
1731
  "message.complained",
1716
- "thread.needs_reply",
1717
1732
  "mailbox.rule_matched",
1718
1733
  "domain.verified",
1719
1734
  "domain.verification_failed",