shipmail 0.2.0 → 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/README.md CHANGED
@@ -220,9 +220,11 @@ await testClient.mailboxes.injectSandboxInbound("mbx_...", {
220
220
  ```ts
221
221
  const threads = await shipmail.threads.list({ mailbox_id: "mbx_..." });
222
222
  const threadId = threads.data[0].id;
223
- const thread = await shipmail.threads.get(threadId);
223
+ const thread = await shipmail.threads.get(threadId, { mailbox_id: "mbx_..." });
224
224
 
225
225
  await shipmail.threads.reply(threadId, {
226
+ mailbox_id: "mbx_...",
227
+ to: ["customer@example.com"],
226
228
  text: "Thanks for your email.",
227
229
  });
228
230
  ```
@@ -356,6 +358,8 @@ Preflight responses include `url_breakdown` so you can see which links, image
356
358
  URLs, and video thumbnails contribute to deliverability checks.
357
359
  Block prose fields are plain text in API requests. Use newlines for paragraph
358
360
  breaks, and use `body_html` or `custom_html` only when you need raw HTML.
361
+ Concurrent newsletter updates can throw `ConflictError` (409). Fetch the latest
362
+ newsletter, merge your changes, and retry the update.
359
363
 
360
364
  ## Partner beta
361
365
 
package/dist/index.cjs CHANGED
@@ -639,6 +639,22 @@ var Mailboxes = class extends ApiResource {
639
639
  methodOptions: options
640
640
  });
641
641
  }
642
+ replyToInboxMessage(id, messageId, params, options) {
643
+ return this.client.request({
644
+ method: "POST",
645
+ path: `/mailboxes/${encodeURIComponent(id)}/inbox/messages/${encodeURIComponent(messageId)}/reply`,
646
+ body: params,
647
+ methodOptions: options
648
+ });
649
+ }
650
+ replyToInboxThread(id, threadId, params, options) {
651
+ return this.client.request({
652
+ method: "POST",
653
+ path: `/mailboxes/${encodeURIComponent(id)}/inbox/threads/${encodeURIComponent(threadId)}/reply`,
654
+ body: params,
655
+ methodOptions: options
656
+ });
657
+ }
642
658
  updateInboxMessage(id, messageId, params, options) {
643
659
  return this.client.request({
644
660
  method: "PATCH",
@@ -1144,8 +1160,9 @@ var Threads = class extends ApiResource {
1144
1160
  method: "GET",
1145
1161
  path: `/threads/${encodeURIComponent(id)}`,
1146
1162
  query: {
1147
- cursor: params?.cursor,
1148
- limit: params?.limit
1163
+ mailbox_id: params.mailbox_id,
1164
+ cursor: params.cursor,
1165
+ limit: params.limit
1149
1166
  },
1150
1167
  methodOptions: options
1151
1168
  });
@@ -1263,7 +1280,7 @@ var Webhooks = class extends ApiResource {
1263
1280
  };
1264
1281
 
1265
1282
  // src/version.ts
1266
- var VERSION = "0.2.0";
1283
+ var VERSION = "0.2.2";
1267
1284
 
1268
1285
  // src/client.ts
1269
1286
  var DEFAULT_BASE_URL = "https://shipmail.to/api/v1";