shipmail-cli 0.4.11 → 0.4.12
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/dist/cli.js +31 -5
- package/package.json +2 -2
package/dist/cli.js
CHANGED
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
} from "shipmail";
|
|
15
15
|
|
|
16
16
|
// src/version.ts
|
|
17
|
-
var VERSION = "0.4.
|
|
17
|
+
var VERSION = "0.4.12";
|
|
18
18
|
|
|
19
19
|
// src/cli.ts
|
|
20
20
|
var DEFAULT_BASE_URL = "https://shipmail.to/api/v1";
|
|
@@ -360,6 +360,8 @@ Usage:
|
|
|
360
360
|
shipmail mailboxes resume <id>
|
|
361
361
|
shipmail mailboxes export <id>
|
|
362
362
|
shipmail mailboxes export-status <id> <export-id>
|
|
363
|
+
shipmail mailboxes import-resume <id> <import-id>
|
|
364
|
+
shipmail mailboxes import-restore <id> <import-id> --file-id impf_...
|
|
363
365
|
shipmail mailboxes app-passwords list <id>
|
|
364
366
|
shipmail mailboxes app-passwords create <id> --name "Desktop mail" [--expires-at 2026-10-01T00:00:00Z] [--allowed-cidr 203.0.113.0/24]
|
|
365
367
|
shipmail mailboxes app-passwords revoke <id> <app-password-id>
|
|
@@ -379,15 +381,15 @@ Usage:
|
|
|
379
381
|
shipmail inbox thread-attention <mailbox-id> <thread-id> --done true --expected-version 3
|
|
380
382
|
shipmail inbox draft <mailbox-id> <thread-id> --expected-version 3 (--text "Hello" | --html "<p>Hello</p>") [--reply-mode reply_all]
|
|
381
383
|
shipmail inbox send-draft <mailbox-id> <thread-id> <draft-id>
|
|
382
|
-
shipmail inbox reply-message <mailbox-id> <message-id> --to user@example.com (--text "Hello" | --html "<p>Hello</p>")
|
|
383
|
-
shipmail inbox reply-thread <mailbox-id> <thread-id> --to user@example.com (--text "Hello" | --html "<p>Hello</p>")
|
|
384
|
+
shipmail inbox reply-message <mailbox-id> <message-id> --to user@example.com (--text "Hello" | --html "<p>Hello</p>") [--track-reply]
|
|
385
|
+
shipmail inbox reply-thread <mailbox-id> <thread-id> --to user@example.com (--text "Hello" | --html "<p>Hello</p>") [--track-reply]
|
|
384
386
|
shipmail inbox update <mailbox-id> <message-id> [--read true] [--starred false]
|
|
385
387
|
shipmail inbox move <mailbox-id> <message-id> (--target-role archive | --target-folder-id fld)
|
|
386
|
-
shipmail messages send --mailbox-id mbx --to user@example.com --subject "Hi" --text "Hello" [--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']
|
|
388
|
+
shipmail messages send --mailbox-id mbx --to user@example.com --subject "Hi" --text "Hello" [--track-reply] [--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']
|
|
387
389
|
shipmail messages list (--mailbox-id mbx | --client-reference crm-123) [--limit 25] [--cursor cur]
|
|
388
390
|
shipmail messages analytics [--updated-after ISO] [--updated-before ISO] [--limit 100] [--cursor cur]
|
|
389
391
|
shipmail messages get <message-id>
|
|
390
|
-
shipmail messages reply <message-id> --to user@example.com (--text "Hello" | --html "<p>Hello</p>") [--client-reference crm-reply-123]
|
|
392
|
+
shipmail messages reply <message-id> --to user@example.com (--text "Hello" | --html "<p>Hello</p>") [--track-reply] [--client-reference crm-reply-123]
|
|
391
393
|
shipmail scheduled-messages list [--include-held] [--search text] [--limit 100]
|
|
392
394
|
shipmail scheduled-messages get <message-id>
|
|
393
395
|
shipmail scheduled-messages update <message-id> --to user@example.com --subject "Hi" --scheduled-at ISO (--text "Hello" | --html "<p>Hello</p>") [--staged-attachment-id sat_...]
|
|
@@ -581,6 +583,7 @@ async function sendMessageParams(options) {
|
|
|
581
583
|
...headers.length > 0 ? { headers } : {},
|
|
582
584
|
...getStringList(options, "staged-attachment-id").length > 0 ? { staged_attachment_ids: getStringList(options, "staged-attachment-id") } : {},
|
|
583
585
|
...getString(options, "scheduled-at") ? { scheduled_at: getString(options, "scheduled-at") } : {},
|
|
586
|
+
...getBoolean(options, "track-reply") ? { track_reply: true } : {},
|
|
584
587
|
...getString(options, "sandbox-outcome") ? {
|
|
585
588
|
sandbox_outcome: getEnum(options, "sandbox-outcome", [
|
|
586
589
|
"delivered",
|
|
@@ -609,6 +612,7 @@ async function replyToMessageParams(options) {
|
|
|
609
612
|
...getString(options, "source-rfc-message-id") ? { source_rfc_message_id: getString(options, "source-rfc-message-id") } : {},
|
|
610
613
|
...headers.length > 0 ? { headers } : {},
|
|
611
614
|
...getString(options, "scheduled-at") ? { scheduled_at: getString(options, "scheduled-at") } : {},
|
|
615
|
+
...getBoolean(options, "track-reply") ? { track_reply: true } : {},
|
|
612
616
|
...getString(options, "sandbox-outcome") ? {
|
|
613
617
|
sandbox_outcome: getEnum(options, "sandbox-outcome", [
|
|
614
618
|
"delivered",
|
|
@@ -749,6 +753,28 @@ async function runMailboxes(client, parsed, out) {
|
|
|
749
753
|
);
|
|
750
754
|
return;
|
|
751
755
|
}
|
|
756
|
+
if (subcommand === "import-resume") {
|
|
757
|
+
writeJson(
|
|
758
|
+
out,
|
|
759
|
+
await client.mailboxes.resumeImport(
|
|
760
|
+
requirePositional(parsed.positional, 2, "mailbox id"),
|
|
761
|
+
requirePositional(parsed.positional, 3, "import id")
|
|
762
|
+
)
|
|
763
|
+
);
|
|
764
|
+
return;
|
|
765
|
+
}
|
|
766
|
+
if (subcommand === "import-restore") {
|
|
767
|
+
const fileIds = getStringList(parsed.options, "file-id");
|
|
768
|
+
writeJson(
|
|
769
|
+
out,
|
|
770
|
+
await client.mailboxes.restoreImport(
|
|
771
|
+
requirePositional(parsed.positional, 2, "mailbox id"),
|
|
772
|
+
requirePositional(parsed.positional, 3, "import id"),
|
|
773
|
+
{ file_ids: fileIds }
|
|
774
|
+
)
|
|
775
|
+
);
|
|
776
|
+
return;
|
|
777
|
+
}
|
|
752
778
|
if (subcommand === "app-passwords") {
|
|
753
779
|
const command = requirePositional(parsed.positional, 2, "app-password command");
|
|
754
780
|
const mailboxId = requirePositional(parsed.positional, 3, "mailbox id");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "shipmail-cli",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.12",
|
|
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.4.
|
|
44
|
+
"shipmail": "0.4.20"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"tsup": "^8.4.0",
|