@stewardhq/cli 0.6.0 → 0.7.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 +19 -4
  2. package/dist/bin.js +1018 -444
  3. package/package.json +2 -2
package/README.md CHANGED
@@ -23,15 +23,25 @@ ESM, Node ≥ 22. Its only runtime dependency is `@stewardhq/sdk`.
23
23
  | `steward endpoints add --url <url> --out <file> [--event-types a,b] [--description <text>] [--force]` | Generates the secret locally and writes it only to `--out` |
24
24
  | `steward endpoints rotate <id> --out <file> [--force]` | New secret to `--out`; the product transitions with `new,old` |
25
25
  | `steward endpoints deactivate <id>` | Not reversible |
26
+ | `steward keys list [--json]` | The product's API keys: prefix, scope, status (active, expired, revoked), expiry, last use |
27
+ | `steward keys create --name <n> --scope product\|checkout\|admin --out <file> [--expires-days <n> \| --no-expiry] [--force]` | Generates the key locally and writes it only to `--out`; steward stores its hash. An admin key always expires (default 90 days) |
28
+ | `steward keys revoke <prefix>` | A key cannot revoke itself (use another admin key) |
29
+ | `steward dunning get [--json]` / `steward dunning set <policy.json> [--yes]` | `GET/PUT /v1/admin/dunning-policy`; turning dry run off asks for confirmation |
30
+ | `steward reprice --plan <code> --notice-days <n> [--dry-run] [--yes] [--json]` | Moves a plan's subscribers to its current price and metered rates; always lists first (dry run), then asks for confirmation |
31
+ | `steward meters recompute <ref> [--meter <code>]` / `steward meters close-periods <ref> [--meter <code>] [--force]` | Metering repairs (admin) |
32
+ | `steward credits adjust <ref> <meter> --units=<n> --reason <text>` | A credit ledger entry; negative units = adjustment |
33
+ | `steward events redeliver <eventId>…` | Requeues every delivery of webhook events (admin) |
34
+ | `steward bank-transfers list [--status pending\|expired]` / `steward bank-transfers record <code> --amount <minor> --currency <CUR> --received-at <iso> --bank-ref <ref> […] [--yes]` | Bank transfer reconciliation; recording asks for confirmation |
26
35
 
27
36
  Exit codes: 0 success, 1 error (or doctor not ready), 2 incorrect usage.
28
37
 
29
38
  ## Connection settings
30
39
 
31
- - Admin commands (`catalog`, `settings`, `endpoints`): `STEWARD_ADMIN_URL` +
32
- `STEWARD_ADMIN_API_KEY`. In a cluster the admin endpoint is reached through a port-forward
33
- (e.g. `kubectl -n steward port-forward svc/steward 13002:80` → `http://localhost:13002`); the
34
- key comes from the operator.
40
+ - Admin commands (`catalog`, `settings`, `endpoints`, `keys`, `dunning`, `reprice`, `credits`,
41
+ `bank-transfers`, `meters recompute|close-periods`, `events redeliver`): `STEWARD_ADMIN_URL` +
42
+ `STEWARD_ADMIN_API_KEY`. The admin API is reachable through the public host once `/v1` is exposed;
43
+ otherwise through a port-forward (e.g. `kubectl -n steward port-forward svc/steward 13002:80` →
44
+ `http://localhost:13002`). The key comes from the operator.
35
45
  - `doctor`, `meters`, `events`: `STEWARD_URL` + `STEWARD_API_KEY`; if neither is set, the admin
36
46
  pair. A half pair (only the URL or only the key) does not fall back to the other pair — it
37
47
  fails with a clear error.
@@ -104,6 +114,11 @@ Release: bump the version in `cli/package.json` and push the `cli-v<version>` ta
104
114
  be published on npm. **The first version on npmjs is 0.5.0** (2026-09-21); 0.4.0 was not
105
115
  published.
106
116
 
117
+ - **0.7.0** (`@stewardhq/sdk` 0.7, admin operations, issue #57): `steward keys`, `steward dunning`,
118
+ `steward reprice`, `steward credits adjust`, `steward bank-transfers`, `steward meters recompute` and
119
+ `close-periods`, `steward events redeliver`, `settings set --provider`. These replace the pod CLI
120
+ commands of the same jobs. `doctor` lists the active API keys with age, last use and expiry; the
121
+ connection hint names the public admin host (`STEWARD_ADMIN_URL=https://billing.zone9.cloud`).
107
122
  - **0.5.0** (`@stewardhq/sdk` 0.5, metering phase 2): `steward meters get`, `steward events
108
123
  send`; meter, credit and metered price diff in `catalog push` (a metered price change asks
109
124
  for confirmation; a catalog with meters is not pushed without the `meters` capability);