shipmail-cli 0.5.0 → 0.5.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 +3 -2
- package/dist/cli.js +9 -3
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -112,7 +112,7 @@ shipmail newsletters preview nws_123
|
|
|
112
112
|
shipmail newsletters test-send nws_123 --recipient-email owner@example.com
|
|
113
113
|
shipmail newsletters preflight nws_123
|
|
114
114
|
shipmail newsletters schedule nws_123 --scheduled-at 2026-08-01T09:00:00.000Z
|
|
115
|
-
shipmail newsletter-assets list --kind image
|
|
115
|
+
shipmail newsletter-assets list --kind image --q hero --limit 25
|
|
116
116
|
shipmail newsletter-assets upload ./hero.png --content-type image/png
|
|
117
117
|
shipmail newsletter-assets upload ./demo.mp4 --content-type video/mp4 --thumbnail ./demo-poster.jpg
|
|
118
118
|
shipmail newsletter-assets register-url https://cdn.shipmail.to/newsletter-images/org_123/hero.png
|
|
@@ -139,7 +139,8 @@ sanitized inline HTML. Use `<p>` and `<br>` for line breaks. Shipmail keeps `a`,
|
|
|
139
139
|
|
|
140
140
|
`newsletter-assets upload` uses a five-minute direct storage PUT, then calls the single-use
|
|
141
141
|
completion URL. Video uploads require a JPEG poster through `--thumbnail`. `newsletter-assets list`
|
|
142
|
-
includes current newsletter media storage usage in the JSON
|
|
142
|
+
includes current newsletter media storage usage and a `pagination.next_cursor` value in the JSON
|
|
143
|
+
response. Pass that opaque value back with `--cursor` to browse the next page.
|
|
143
144
|
|
|
144
145
|
## Generic API Command
|
|
145
146
|
|
package/dist/cli.js
CHANGED
|
@@ -8,13 +8,14 @@ import { env as processEnv, exit, stderr, stdout } from "process";
|
|
|
8
8
|
import { fileURLToPath } from "url";
|
|
9
9
|
import {
|
|
10
10
|
CONFERENCING_PROVIDER_IDS,
|
|
11
|
+
ReconciliationRequiredError,
|
|
11
12
|
ShipmailClient,
|
|
12
13
|
ShipmailError,
|
|
13
14
|
WEBHOOK_EVENT_TYPES
|
|
14
15
|
} from "shipmail";
|
|
15
16
|
|
|
16
17
|
// src/version.ts
|
|
17
|
-
var VERSION = "0.5.
|
|
18
|
+
var VERSION = "0.5.2";
|
|
18
19
|
|
|
19
20
|
// src/cli.ts
|
|
20
21
|
var DEFAULT_BASE_URL = "https://shipmail.to/api/v1";
|
|
@@ -389,7 +390,7 @@ Usage:
|
|
|
389
390
|
shipmail inbox reply-thread <mailbox-id> <thread-id> --to user@example.com (--text "Hello" | --html "<p>Hello</p>") [--track-reply true|false]
|
|
390
391
|
shipmail inbox update <mailbox-id> <message-id> [--read true] [--starred false]
|
|
391
392
|
shipmail inbox move <mailbox-id> <message-id> (--target-role archive | --target-folder-id fld)
|
|
392
|
-
shipmail messages send --mailbox-id mbx --to user@example.com --subject "Hi" --text "Hello" [--track-reply true|false] [--sandbox-outcome delivered|bounced|complained] [--client-reference crm-123] [--metadata JSON|@file] [--source-rfc-message-id '<crm-123@example.com>'] [--header 'X-CRM-ID: 123']
|
|
393
|
+
shipmail messages send (--mailbox-id mbx | --from 'Acme Support <hello@example.com>') --to user@example.com --subject "Hi" --text "Hello" [--track-reply true|false] [--sandbox-outcome delivered|bounced|complained] [--client-reference crm-123] [--metadata JSON|@file] [--source-rfc-message-id '<crm-123@example.com>'] [--header 'X-CRM-ID: 123']
|
|
393
394
|
shipmail messages list (--mailbox-id mbx | --client-reference crm-123) [--limit 25] [--cursor cur]
|
|
394
395
|
shipmail messages analytics [--updated-after ISO] [--updated-before ISO] [--limit 100] [--cursor cur]
|
|
395
396
|
shipmail messages get <message-id>
|
|
@@ -469,6 +470,10 @@ Booking page conferencing:
|
|
|
469
470
|
--conferencing-provider <zoom|google_meet> Create a meeting for every booking.
|
|
470
471
|
--conferencing-provider none Stop creating meeting links on update.
|
|
471
472
|
|
|
473
|
+
Conversation IDs:
|
|
474
|
+
<thread-id> accepts a conversation ID (thd_...) or the mail-server thread ID. Store the
|
|
475
|
+
conversation_id every response carries. thread_id is deprecated and unchanged.
|
|
476
|
+
|
|
472
477
|
Newsletter styling:
|
|
473
478
|
--styling-mode <styled|plain> styled applies Shipmail's email theme. plain sends your HTML without injected styles, width, or centering, so the reader's email client styles it.
|
|
474
479
|
|
|
@@ -2203,7 +2208,8 @@ ${JSON.stringify(err.body, null, 2)}
|
|
|
2203
2208
|
const shipmailError = err;
|
|
2204
2209
|
const status = shipmailError.status !== void 0 ? ` (HTTP ${shipmailError.status})` : "";
|
|
2205
2210
|
const requestId = shipmailError.requestId ? ` request_id=${shipmailError.requestId}` : "";
|
|
2206
|
-
|
|
2211
|
+
const messageId = shipmailError instanceof ReconciliationRequiredError && shipmailError.messageId ? ` message_id=${shipmailError.messageId}` : "";
|
|
2212
|
+
errOut.write(`Error: ${shipmailError.message}${status}${requestId}${messageId}
|
|
2207
2213
|
`);
|
|
2208
2214
|
return;
|
|
2209
2215
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "shipmail-cli",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.2",
|
|
4
4
|
"description": "Official CLI for the Shipmail API",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"access": "public"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"shipmail": "0.5.
|
|
44
|
+
"shipmail": "0.5.6"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"tsup": "^8.4.0",
|