shipmail 0.4.15 → 0.4.17
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 +16 -6
- package/dist/index.cjs +11 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +62 -21
- package/dist/index.d.ts +62 -21
- package/dist/index.js +11 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -196,13 +196,13 @@ const inbox = await shipmail.mailboxes.listInboxMessages(mailboxId, {
|
|
|
196
196
|
const exact = await shipmail.mailboxes.getInboxMessage(mailboxId, inbox.data[0].id);
|
|
197
197
|
|
|
198
198
|
const queue = await shipmail.mailboxes.listInboxThreads(mailboxId, {
|
|
199
|
-
|
|
199
|
+
attention_state: "needs_reply",
|
|
200
200
|
after: "2025-07-20T00:00:00.000Z",
|
|
201
201
|
});
|
|
202
202
|
const candidate = queue.data[0];
|
|
203
203
|
const draft = await shipmail.mailboxes.createInboxReplyDraft(mailboxId, candidate.thread_id, {
|
|
204
204
|
text: "Thanks for the note.",
|
|
205
|
-
|
|
205
|
+
expected_version: candidate.version,
|
|
206
206
|
});
|
|
207
207
|
// Apply your approval policy before sending. Stale versions fail with 409 without delivery.
|
|
208
208
|
await shipmail.mailboxes.sendInboxReplyDraft(mailboxId, candidate.thread_id, draft.id);
|
|
@@ -454,8 +454,16 @@ const newsletter = await shipmail.newsletters.create({
|
|
|
454
454
|
preview_text: "A quick product update",
|
|
455
455
|
blocks: [
|
|
456
456
|
{ type: "heading", level: 1, text: "July updates" },
|
|
457
|
-
{
|
|
458
|
-
|
|
457
|
+
{
|
|
458
|
+
type: "callout",
|
|
459
|
+
variant: "info",
|
|
460
|
+
title: "Quick note",
|
|
461
|
+
body: "A <strong>short</strong> intro.",
|
|
462
|
+
},
|
|
463
|
+
{
|
|
464
|
+
type: "paragraph",
|
|
465
|
+
body: 'Read the <a href="https://example.com/launch">full announcement</a>.',
|
|
466
|
+
},
|
|
459
467
|
{ type: "image", url: hero.url, alt: "Product screenshot" },
|
|
460
468
|
{ type: "image", url: existingHero.url, alt: "Existing CDN screenshot" },
|
|
461
469
|
{
|
|
@@ -484,8 +492,10 @@ Newsletter test sends and schedules must pass preflight. Guardrail failures thro
|
|
|
484
492
|
`ValidationError` with the failed preflight items in `error.details`.
|
|
485
493
|
Preflight responses include `url_breakdown` so you can see which links, image
|
|
486
494
|
URLs, and video thumbnails contribute to deliverability checks.
|
|
487
|
-
|
|
488
|
-
|
|
495
|
+
Paragraph, quote, callout, list-item, and column bodies accept bare text or
|
|
496
|
+
sanitized inline HTML. Use `<p>` and `<br>` for line breaks. Allowed tags are
|
|
497
|
+
`a`, `b`, `br`, `code`, `em`, `i`, `p`, `s`, `span`, `strong`, and `u`. Use
|
|
498
|
+
`body_html` or `custom_html` for a fully custom email-safe layout.
|
|
489
499
|
Concurrent newsletter updates can throw `ConflictError` (409). Fetch the latest
|
|
490
500
|
newsletter, merge your changes, and retry the update.
|
|
491
501
|
|
package/dist/index.cjs
CHANGED
|
@@ -837,7 +837,7 @@ var Mailboxes = class extends ApiResource {
|
|
|
837
837
|
method: "GET",
|
|
838
838
|
path: `/mailboxes/${encodeURIComponent(id)}/inbox/threads`,
|
|
839
839
|
query: {
|
|
840
|
-
|
|
840
|
+
attention_state: params?.attention_state,
|
|
841
841
|
sort_by: params?.sort_by,
|
|
842
842
|
order: params?.order,
|
|
843
843
|
after: params?.after,
|
|
@@ -855,7 +855,7 @@ var Mailboxes = class extends ApiResource {
|
|
|
855
855
|
methodOptions: options
|
|
856
856
|
});
|
|
857
857
|
}
|
|
858
|
-
|
|
858
|
+
updateInboxThreadAttention(id, threadId, params, options) {
|
|
859
859
|
return this.client.request({
|
|
860
860
|
method: "PATCH",
|
|
861
861
|
path: `/mailboxes/${encodeURIComponent(id)}/inbox/threads/${encodeURIComponent(threadId)}`,
|
|
@@ -1180,6 +1180,14 @@ var NewsletterAssets = class extends ApiResource {
|
|
|
1180
1180
|
methodOptions: options
|
|
1181
1181
|
});
|
|
1182
1182
|
}
|
|
1183
|
+
prepareUpload(params, options) {
|
|
1184
|
+
return this.client.request({
|
|
1185
|
+
method: "POST",
|
|
1186
|
+
path: "/newsletter-assets/upload-tokens",
|
|
1187
|
+
body: params,
|
|
1188
|
+
methodOptions: options
|
|
1189
|
+
});
|
|
1190
|
+
}
|
|
1183
1191
|
registerFromUrl(params, options) {
|
|
1184
1192
|
return this.client.request({
|
|
1185
1193
|
method: "POST",
|
|
@@ -1613,7 +1621,7 @@ var Webhooks = class extends ApiResource {
|
|
|
1613
1621
|
};
|
|
1614
1622
|
|
|
1615
1623
|
// src/version.ts
|
|
1616
|
-
var VERSION = "0.4.
|
|
1624
|
+
var VERSION = "0.4.17";
|
|
1617
1625
|
|
|
1618
1626
|
// src/client.ts
|
|
1619
1627
|
var DEFAULT_BASE_URL = "https://shipmail.to/api/v1";
|