groundmail-cli 0.44.0 → 0.45.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 (2) hide show
  1. package/dist/cli.js +11 -2
  2. package/package.json +2 -2
package/dist/cli.js CHANGED
@@ -2090,7 +2090,7 @@ async function runListKeysCommandWithClient(args, env = process.env) {
2090
2090
  }
2091
2091
 
2092
2092
  // package.json
2093
- var version = "0.44.0";
2093
+ var version = "0.45.0";
2094
2094
 
2095
2095
  // src/help.ts
2096
2096
  var USAGE_LINES = [
@@ -2124,6 +2124,7 @@ var USAGE_LINES = [
2124
2124
  " groundmail mailboxes create [--local-part signup-bot] [--domain agents.example.com] [--display-name \u2026] [--external-id \u2026] [--tenant <tenant>] [--retention-days 7] [--spam-threshold 5] [--metadata JSON] [--forward-from <mailbox>] [--json] a real address your agent reads and sends from; no --domain: a hosted address, which can only reply; --forward-from: a hosted mailbox this one replaces",
2125
2125
  " groundmail mailboxes list [--tenant <tenant>] [--limit 25] [--cursor \u2026] [--json]",
2126
2126
  " groundmail mailboxes get <mailbox> [--json]",
2127
+ " groundmail mailboxes update <mailbox> --send-as support@example.com send as an address on a verified domain (none removes it)",
2127
2128
  " groundmail mailboxes delete <mailbox> --yes the mailbox and all its mail; a hosted address is never given out again",
2128
2129
  " groundmail mailboxes forward <mailbox> --to <new mailbox> --yes move a hosted address to a mailbox on your own domain, for 30 days; it can't send meanwhile",
2129
2130
  " groundmail mailboxes threads <mailbox> [--label \u2026] [--participant \u2026] [--unread] [--archived] [--since <iso>] [--include-held] [--limit 25] [--cursor \u2026] [--json]",
@@ -5161,6 +5162,7 @@ async function runTestInboxCommand(subcommand, args, env = process.env) {
5161
5162
 
5162
5163
  // src/commands/mailboxes/mailboxes.ts
5163
5164
  var VALUE_FLAGS6 = [
5165
+ "--send-as",
5164
5166
  "--api-key",
5165
5167
  "--base-url",
5166
5168
  "--workspace",
@@ -5349,7 +5351,7 @@ async function createInstant(args) {
5349
5351
  }
5350
5352
  }
5351
5353
  async function runMailboxesCommand(subcommand, argv, env = process.env) {
5352
- if (!subcommand || !["create", "owner", "verify", "list", "get", "delete", "forward", "threads", "read", "wait", "send", "reply"].includes(subcommand)) {
5354
+ if (!subcommand || !["create", "owner", "verify", "list", "get", "update", "delete", "forward", "threads", "read", "wait", "send", "reply"].includes(subcommand)) {
5353
5355
  return { exitCode: 1, error: USAGE3 };
5354
5356
  }
5355
5357
  const parsed = parseArgs(argv, { values: VALUE_FLAGS6, booleans: BOOLEAN_FLAGS });
@@ -5403,6 +5405,13 @@ async function runMailboxesCommand(subcommand, argv, env = process.env) {
5403
5405
  print({ mailbox: found }, () => formatMailbox(found));
5404
5406
  return { exitCode: 0 };
5405
5407
  }
5408
+ if (subcommand === "update") {
5409
+ const value = args.values["--send-as"];
5410
+ if (value === void 0) return { exitCode: 1, error: "Nothing to change. Usage: groundmail mailboxes update <mailbox> --send-as support@example.com (or --send-as none)" };
5411
+ const updated = await client2.mailboxes.update(ref, { send_as: value === "none" ? null : value });
5412
+ print({ mailbox: updated }, () => `Sends as ${updated.send_as ?? updated.address}`);
5413
+ return { exitCode: 0 };
5414
+ }
5406
5415
  if (subcommand === "delete") {
5407
5416
  if (!on("--yes")) {
5408
5417
  return { exitCode: 1, error: "This deletes the mailbox and all its mail. Add --yes to confirm." };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "groundmail-cli",
3
- "version": "0.44.0",
3
+ "version": "0.45.0",
4
4
  "description": "Groundmail CLI — send transactional email from the terminal",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -38,7 +38,7 @@
38
38
  "prepublishOnly": "npm run build"
39
39
  },
40
40
  "dependencies": {
41
- "groundmail": "0.46.0"
41
+ "groundmail": "0.47.0"
42
42
  },
43
43
  "devDependencies": {
44
44
  "tsup": "^8.5.0",