shipmail-cli 0.1.10 → 0.2.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.
- package/README.md +7 -1
- package/dist/cli.js +54 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -34,6 +34,9 @@ shipmail mailboxes resume mbx_123
|
|
|
34
34
|
shipmail mailboxes forwarding-add mbx_123 --destination owner@example.net
|
|
35
35
|
shipmail mailboxes forwarding mbx_123
|
|
36
36
|
shipmail mailboxes forwarding-remove mbx_123 fwd_123
|
|
37
|
+
shipmail mailboxes app-passwords list mbx_123
|
|
38
|
+
shipmail mailboxes app-passwords create mbx_123 --name "Desktop mail" --expires-at 2026-10-01T00:00:00Z
|
|
39
|
+
shipmail mailboxes app-passwords revoke mbx_123 appwd_123
|
|
37
40
|
|
|
38
41
|
# Send email
|
|
39
42
|
shipmail messages send \
|
|
@@ -83,6 +86,8 @@ shipmail webhooks replay-delivery whk_123 dlv_123 --idempotency-key replay-123
|
|
|
83
86
|
# Partner beta lifecycle and delegated infrastructure
|
|
84
87
|
shipmail partner organizations create --name "Operator" --external-reference operator_123 --owner-email owner@example.com --mailbox-limit 3 --data-classification internal_test
|
|
85
88
|
shipmail partner usage
|
|
89
|
+
shipmail partner credential-grants list
|
|
90
|
+
shipmail partner credential-grants consume grant_123 --name "Embedded webmail"
|
|
86
91
|
shipmail domains list --organization-id 00000000-0000-4000-8000-000000000123
|
|
87
92
|
shipmail mailboxes create --organization-id 00000000-0000-4000-8000-000000000123 --domain-id dom_123 --address support --generate-password
|
|
88
93
|
```
|
|
@@ -110,7 +115,7 @@ Use repeatable `--header "Name: value"` flags for request headers. Use `--output
|
|
|
110
115
|
- `status`
|
|
111
116
|
- `api <METHOD> <PATH>`
|
|
112
117
|
- `domains list|search|create|get|verify|delete`
|
|
113
|
-
- `mailboxes list|create|get|suspend|resume|forwarding|forwarding-add|forwarding-remove|folders|identities|rules`
|
|
118
|
+
- `mailboxes list|create|get|suspend|resume|forwarding|forwarding-add|forwarding-remove|app-passwords|folders|identities|rules`
|
|
114
119
|
- `inbox list|thread|update|move`
|
|
115
120
|
- `messages send|list|get|reply` (test keys also support `--sandbox-outcome`)
|
|
116
121
|
- `mailboxes sandbox-inbound`
|
|
@@ -120,6 +125,7 @@ Use repeatable `--header "Name: value"` flags for request headers. Use `--output
|
|
|
120
125
|
- `newsletters create|update|preview|preflight|test-send|schedule|cancel|resume`
|
|
121
126
|
- `newsletter-assets list|upload|register-url`
|
|
122
127
|
- `partner organizations list|create|get|update|invite|suspend|resume|offboard`
|
|
128
|
+
- `partner credential-grants list|consume`
|
|
123
129
|
- `partner usage`
|
|
124
130
|
|
|
125
131
|
Run `shipmail --help` for flags and examples.
|
package/dist/cli.js
CHANGED
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
} from "shipmail";
|
|
14
14
|
|
|
15
15
|
// src/version.ts
|
|
16
|
-
var VERSION = "0.
|
|
16
|
+
var VERSION = "0.2.0";
|
|
17
17
|
|
|
18
18
|
// src/cli.ts
|
|
19
19
|
var DEFAULT_BASE_URL = "https://shipmail.to/api/v1";
|
|
@@ -330,6 +330,9 @@ Usage:
|
|
|
330
330
|
shipmail mailboxes resume <id>
|
|
331
331
|
shipmail mailboxes export <id>
|
|
332
332
|
shipmail mailboxes export-status <id> <export-id>
|
|
333
|
+
shipmail mailboxes app-passwords list <id>
|
|
334
|
+
shipmail mailboxes app-passwords create <id> --name "Desktop mail" [--expires-at 2026-10-01T00:00:00Z] [--allowed-cidr 203.0.113.0/24]
|
|
335
|
+
shipmail mailboxes app-passwords revoke <id> <app-password-id>
|
|
333
336
|
shipmail mailboxes folders <id>
|
|
334
337
|
shipmail mailboxes identities <id>
|
|
335
338
|
shipmail mailboxes rules <id>
|
|
@@ -399,6 +402,8 @@ Usage:
|
|
|
399
402
|
shipmail partner organizations suspend <id>
|
|
400
403
|
shipmail partner organizations resume <id>
|
|
401
404
|
shipmail partner organizations offboard <id>
|
|
405
|
+
shipmail partner credential-grants list
|
|
406
|
+
shipmail partner credential-grants consume <grant-id> [--name "Marketstead webmail"] [--expires-at 2026-10-01T00:00:00Z] [--allowed-cidr 203.0.113.0/24]
|
|
402
407
|
shipmail partner usage
|
|
403
408
|
|
|
404
409
|
Booking page conferencing:
|
|
@@ -677,6 +682,32 @@ async function runMailboxes(client, parsed, out) {
|
|
|
677
682
|
);
|
|
678
683
|
return;
|
|
679
684
|
}
|
|
685
|
+
if (subcommand === "app-passwords") {
|
|
686
|
+
const command = requirePositional(parsed.positional, 2, "app-password command");
|
|
687
|
+
const mailboxId = requirePositional(parsed.positional, 3, "mailbox id");
|
|
688
|
+
if (command === "list") {
|
|
689
|
+
writeJson(out, await client.mailboxes.listAppPasswords(mailboxId));
|
|
690
|
+
return;
|
|
691
|
+
}
|
|
692
|
+
if (command === "create") {
|
|
693
|
+
const expiresAt = getString(parsed.options, "expires-at");
|
|
694
|
+
const allowedCidrs = getStringList(parsed.options, "allowed-cidr");
|
|
695
|
+
const params = {
|
|
696
|
+
name: getRequiredString(parsed.options, "name"),
|
|
697
|
+
...expiresAt ? { expires_at: expiresAt } : {},
|
|
698
|
+
...allowedCidrs.length > 0 ? { allowed_cidrs: allowedCidrs } : {}
|
|
699
|
+
};
|
|
700
|
+
writeJson(out, await client.mailboxes.createAppPassword(mailboxId, params));
|
|
701
|
+
return;
|
|
702
|
+
}
|
|
703
|
+
if (command === "revoke") {
|
|
704
|
+
const appPasswordId = requirePositional(parsed.positional, 4, "app password id");
|
|
705
|
+
await client.mailboxes.revokeAppPassword(mailboxId, appPasswordId);
|
|
706
|
+
writeJson(out, { ok: true, id: appPasswordId });
|
|
707
|
+
return;
|
|
708
|
+
}
|
|
709
|
+
throw new CliUsageError("Unknown mailboxes app-passwords command.");
|
|
710
|
+
}
|
|
680
711
|
if (subcommand === "folders") {
|
|
681
712
|
writeJson(
|
|
682
713
|
out,
|
|
@@ -1471,6 +1502,28 @@ async function runPartner(client, parsed, out) {
|
|
|
1471
1502
|
writeJson(out, await client.partner.usage());
|
|
1472
1503
|
return;
|
|
1473
1504
|
}
|
|
1505
|
+
if (group === "credential-grants") {
|
|
1506
|
+
const command2 = requirePositional(parsed.positional, 2, "credential grant command");
|
|
1507
|
+
if (command2 === "list") {
|
|
1508
|
+
writeJson(out, await client.partner.listMailboxCredentialGrants());
|
|
1509
|
+
return;
|
|
1510
|
+
}
|
|
1511
|
+
if (command2 !== "consume")
|
|
1512
|
+
throw new CliUsageError("Unknown partner credential-grants command.");
|
|
1513
|
+
const grantId = requirePositional(parsed.positional, 3, "credential grant id");
|
|
1514
|
+
const name = getString(parsed.options, "name");
|
|
1515
|
+
const expiresAt = getString(parsed.options, "expires-at");
|
|
1516
|
+
const allowedCidrs = getStringList(parsed.options, "allowed-cidr");
|
|
1517
|
+
writeJson(
|
|
1518
|
+
out,
|
|
1519
|
+
await client.partner.consumeMailboxCredentialGrant(grantId, {
|
|
1520
|
+
...name ? { name } : {},
|
|
1521
|
+
...expiresAt ? { expires_at: expiresAt } : {},
|
|
1522
|
+
...allowedCidrs.length > 0 ? { allowed_cidrs: allowedCidrs } : {}
|
|
1523
|
+
})
|
|
1524
|
+
);
|
|
1525
|
+
return;
|
|
1526
|
+
}
|
|
1474
1527
|
if (group !== "organizations") throw new CliUsageError("Unknown partner command.");
|
|
1475
1528
|
const command = parsed.positional[2];
|
|
1476
1529
|
if (command === "list") {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "shipmail-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.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.
|
|
44
|
+
"shipmail": "0.2.0"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"tsup": "^8.4.0",
|