@letterstory/cli 0.120.0 → 0.120.1
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/lib/cli.mjs +2 -2
- package/lib/commands/admin.mjs +4 -1
- package/package.json +1 -1
package/lib/cli.mjs
CHANGED
|
@@ -60,7 +60,7 @@ import {
|
|
|
60
60
|
} from "./commands.mjs";
|
|
61
61
|
|
|
62
62
|
// Keep in sync with cli/package.json.
|
|
63
|
-
export const VERSION = "0.120.
|
|
63
|
+
export const VERSION = "0.120.1";
|
|
64
64
|
|
|
65
65
|
// Flags that never take a value. Listing them explicitly means `deploy get --json <id>`
|
|
66
66
|
// can't accidentally swallow the id as --json's value. Every `type: "bool"` flag (and its
|
|
@@ -769,7 +769,7 @@ Admin (STAFF key — --staff-key / LETTERSTORY_STAFF_API_KEY; acts before an org
|
|
|
769
769
|
| import <file.csv> [--vendor Concentrate] [--area A] [--ledger-key K] [--dry-run]
|
|
770
770
|
| import <file.csv> [--vendor Concentrate] [--area A] [--keep-ledger-key] [--dry-run]
|
|
771
771
|
| usage <events.json> per-call costs as kernels/lettertrace push them
|
|
772
|
-
| remove <entry-id> | services | service <slug> [--owner …] [--monthly N|none] [--renewal D]
|
|
772
|
+
| remove <entry-id> | services | service <slug> [--owner …] [--monthly N|none] [--renewal D] [--units N|none]
|
|
773
773
|
Where Letter's money goes (spending.letter.dev):
|
|
774
774
|
totals, run rate, area/vendor/provider/model/
|
|
775
775
|
key/operation/org breakdowns, every number's
|
package/lib/commands/admin.mjs
CHANGED
|
@@ -4156,11 +4156,14 @@ async function cmdAdminSpend(ctx) {
|
|
|
4156
4156
|
renewal_date: flagStr(flags.renewal),
|
|
4157
4157
|
notes: flagStr(flags.notes),
|
|
4158
4158
|
billing_source: oneOf(flags, "billing", ["api", "invoice", "unknown"]),
|
|
4159
|
+
units_purchased: flags.units === "none" ? undefined : flagNum(flags.units),
|
|
4160
|
+
unit_label: flagStr(flags["unit-label"]),
|
|
4159
4161
|
});
|
|
4160
4162
|
if (flags.monthly === "none") update.monthly_cost_usd = null;
|
|
4163
|
+
if (flags.units === "none") update.units_purchased = null;
|
|
4161
4164
|
if (!slug || Object.keys(update).length === 0) {
|
|
4162
4165
|
throw new CliError(
|
|
4163
|
-
'Usage: admin spend service <slug> [--owner "Steve"] [--plan "Pro"] [--monthly 20|none] [--renewal 2026-11-01] [--notes "…"] [--billing api|invoice|unknown]'
|
|
4166
|
+
'Usage: admin spend service <slug> [--owner "Steve"] [--plan "Pro"] [--monthly 20|none] [--renewal 2026-11-01] [--notes "…"] [--billing api|invoice|unknown] [--units 30|none] [--unit-label "mailbox slots"]'
|
|
4164
4167
|
);
|
|
4165
4168
|
}
|
|
4166
4169
|
const result = await staffRequest(ctx, "PATCH", `${SPEND}/services/${encodeURIComponent(slug)}`, update);
|