shipmail-cli 0.4.14 → 0.5.0

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.
Files changed (3) hide show
  1. package/README.md +0 -3
  2. package/dist/cli.js +18 -9
  3. package/package.json +2 -2
package/README.md CHANGED
@@ -147,9 +147,6 @@ The `api` command reaches every Shipmail REST endpoint, including endpoints that
147
147
 
148
148
  ```bash
149
149
  shipmail api GET /domains
150
-
151
- shipmail api PATCH /mailboxes/mbx_123/spam-filter \
152
- --data '{"threshold":6}'
153
150
  ```
154
151
 
155
152
  Use repeatable `--header "Name: value"` flags for request headers. Use `--output path` to write non-JSON responses, such as attachment downloads.
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.14";
17
+ var VERSION = "0.5.0";
18
18
 
19
19
  // src/cli.ts
20
20
  var DEFAULT_BASE_URL = "https://shipmail.to/api/v1";
@@ -369,7 +369,7 @@ Usage:
369
369
  shipmail mailboxes identities <id>
370
370
  shipmail mailboxes rules <id>
371
371
  shipmail mailboxes forwarding <id>
372
- shipmail mailboxes forwarding-add <id> --destination owner@example.com
372
+ shipmail mailboxes forwarding-add <id> --destination owner@example.com [--sender newsletter@example.com]
373
373
  shipmail mailboxes forwarding-remove <id> <forwarding-id>
374
374
  shipmail mailboxes delivery-routing <id>
375
375
  shipmail mailboxes delivery-routing-set <id> --mode keep|fixed|round-robin [--destination-mailbox-id mbx_...] [--fallback-mailbox-id mbx_...]
@@ -385,15 +385,15 @@ Usage:
385
385
  shipmail inbox thread-attention <mailbox-id> <thread-id> --done true --expected-version 3
386
386
  shipmail inbox draft <mailbox-id> <thread-id> --expected-version 3 (--text "Hello" | --html "<p>Hello</p>") [--reply-mode reply_all]
387
387
  shipmail inbox send-draft <mailbox-id> <thread-id> <draft-id>
388
- shipmail inbox reply-message <mailbox-id> <message-id> --to user@example.com (--text "Hello" | --html "<p>Hello</p>") [--track-reply]
389
- shipmail inbox reply-thread <mailbox-id> <thread-id> --to user@example.com (--text "Hello" | --html "<p>Hello</p>") [--track-reply]
388
+ shipmail inbox reply-message <mailbox-id> <message-id> --to user@example.com (--text "Hello" | --html "<p>Hello</p>") [--track-reply true|false]
389
+ shipmail inbox reply-thread <mailbox-id> <thread-id> --to user@example.com (--text "Hello" | --html "<p>Hello</p>") [--track-reply true|false]
390
390
  shipmail inbox update <mailbox-id> <message-id> [--read true] [--starred false]
391
391
  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] [--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']
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
393
  shipmail messages list (--mailbox-id mbx | --client-reference crm-123) [--limit 25] [--cursor cur]
394
394
  shipmail messages analytics [--updated-after ISO] [--updated-before ISO] [--limit 100] [--cursor cur]
395
395
  shipmail messages get <message-id>
396
- shipmail messages reply <message-id> --to user@example.com (--text "Hello" | --html "<p>Hello</p>") [--track-reply] [--client-reference crm-reply-123]
396
+ shipmail messages reply <message-id> --to user@example.com (--text "Hello" | --html "<p>Hello</p>") [--track-reply true|false] [--client-reference crm-reply-123]
397
397
  shipmail scheduled-messages list [--include-held] [--search text] [--limit 100]
398
398
  shipmail scheduled-messages get <message-id>
399
399
  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_...]
@@ -587,7 +587,10 @@ async function sendMessageParams(options) {
587
587
  ...headers.length > 0 ? { headers } : {},
588
588
  ...getStringList(options, "staged-attachment-id").length > 0 ? { staged_attachment_ids: getStringList(options, "staged-attachment-id") } : {},
589
589
  ...getString(options, "scheduled-at") ? { scheduled_at: getString(options, "scheduled-at") } : {},
590
- ...getBoolean(options, "track-reply") ? { track_reply: true } : {},
590
+ ...(() => {
591
+ const trackReply = getBoolean(options, "track-reply");
592
+ return trackReply === void 0 ? {} : { track_reply: trackReply };
593
+ })(),
591
594
  ...getString(options, "sandbox-outcome") ? {
592
595
  sandbox_outcome: getEnum(options, "sandbox-outcome", [
593
596
  "delivered",
@@ -616,7 +619,10 @@ async function replyToMessageParams(options) {
616
619
  ...getString(options, "source-rfc-message-id") ? { source_rfc_message_id: getString(options, "source-rfc-message-id") } : {},
617
620
  ...headers.length > 0 ? { headers } : {},
618
621
  ...getString(options, "scheduled-at") ? { scheduled_at: getString(options, "scheduled-at") } : {},
619
- ...getBoolean(options, "track-reply") ? { track_reply: true } : {},
622
+ ...(() => {
623
+ const trackReply = getBoolean(options, "track-reply");
624
+ return trackReply === void 0 ? {} : { track_reply: trackReply };
625
+ })(),
620
626
  ...getString(options, "sandbox-outcome") ? {
621
627
  sandbox_outcome: getEnum(options, "sandbox-outcome", [
622
628
  "delivered",
@@ -838,7 +844,10 @@ async function runMailboxes(client, parsed, out) {
838
844
  out,
839
845
  await client.mailboxes.createForwarding(
840
846
  requirePositional(parsed.positional, 2, "mailbox id"),
841
- { destination: getRequiredString(parsed.options, "destination") }
847
+ {
848
+ destination: getRequiredString(parsed.options, "destination"),
849
+ sender: getString(parsed.options, "sender") ?? null
850
+ }
842
851
  )
843
852
  );
844
853
  return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shipmail-cli",
3
- "version": "0.4.14",
3
+ "version": "0.5.0",
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.23"
44
+ "shipmail": "0.5.0"
45
45
  },
46
46
  "devDependencies": {
47
47
  "tsup": "^8.4.0",