@stewardhq/cli 0.9.0 → 0.11.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 -32
  2. package/dist/bin.js +734 -77
  3. package/package.json +5 -5
package/README.md CHANGED
@@ -20,7 +20,7 @@ ESM, Node ≥ 22. Its only runtime dependency is `@stewardhq/sdk`.
20
20
  | `steward meters get <ref> [--periods <n>] [--json]` | `GET /v1/accounts/:ref/meters`: per meter the open period, usage, credit, balance, standing and estimated overage; `--periods` adds the most recent closed periods |
21
21
  | `steward events send <ref> <name> [--meta k=v]… [--external-id <id>] [--timestamp <iso>] [--json]` | A single event via `POST /v1/events/ingest` (for local trials); when `externalId` is omitted one is generated and printed. Exits 1 on a rejected event |
22
22
  | `steward settings get` | `GET /v1/admin/settings` |
23
- | `steward settings set [--app-url] [--privacy-url] [--terms-url] [--branding <json>] [--default-locale tr\|en] [--checkout-ttl <min>] [--portal-ttl <min>] [--extra-return-origins a,b] [--emails <json>] [--billing-payment-due-days <1-60>] [--billing-min-invoice-minor <n>] [--billing-allow-multiple-subscriptions true\|false] [--metering-charge-mode off\|dry_run\|live] [--metering-late-grace-minutes <0-1440>] [--events-retention-days <45-400>]` | `PATCH /v1/admin/settings`; an empty value clears the field (billing, metering and events flags: restores the default) |
23
+ | `steward settings set [--app-url] [--privacy-url] [--terms-url] [--branding <json>] [--default-locale tr\|en] [--display-time-zone <iana>] [--default-country <XX>] [--checkout-ttl <min>] [--portal-ttl <min>] [--extra-return-origins a,b] [--emails <json>] [--billing-payment-due-days <1-60>] [--billing-min-invoice-minor <n>] [--billing-allow-multiple-subscriptions true\|false] [--metering-charge-mode off\|dry_run\|live] [--metering-late-grace-minutes <0-1440>] [--events-retention-days <45-400>] [--tax-provider price\|none] [--tax-exemption-reason-en <text>] [--tax-exemption-reason-tr <text>] [--consumer-markets <XX,YY>]` | `PATCH /v1/admin/settings`; an empty value clears the field (billing, metering, events and tax flags: restores the default) |
24
24
  | `steward endpoints list [--json]` | Endpoints and their last delivery |
25
25
  | `steward endpoints add --url <url> --out <file> [--event-types a,b] [--description <text>] [--force]` | Generates the secret locally and writes it only to `--out` |
26
26
  | `steward endpoints rotate <id> --out <file> [--force]` | New secret to `--out`; the product transitions with `new,old` |
@@ -34,13 +34,16 @@ ESM, Node ≥ 22. Its only runtime dependency is `@stewardhq/sdk`.
34
34
  | `steward credits adjust <ref> <meter> --units=<n> --reason <text>` | A credit ledger entry; negative units = adjustment |
35
35
  | `steward events redeliver <eventId>…` | Requeues every delivery of webhook events (admin) |
36
36
  | `steward bank-transfers list [--status pending\|expired] [--rate <rate>]` / `steward bank-transfers record <code> --amount <minor> --currency <CUR> --received-at <iso> --bank-ref <ref> [--rate <rate>] […] [--yes]` / `steward bank-transfers fx-report [--from <iso>] [--to <iso>] [--json\|--csv]` | Bank transfer reconciliation; recording asks for confirmation. `--rate`: a transfer in another currency than the item's, at the exchange rate you enter (`list --rate` previews the expected amounts); `fx-report`: those payments for the accountant |
37
+ | `steward invoices list [--status draft\|issued\|void\|all] [--payment-status <status>] [--limit <n>] [--json]` / `steward invoices issue <id> --number <number> [--external-ref <ref>] [--issued-at <iso>] [--document <file.pdf>] [--yes]` | `GET /v1/admin/invoices`: the invoices not cut in the external system yet (`draft`, the default), oldest first; `POST /v1/invoices/:id/issue`: writes the external invoice number and marks the invoice issued (once; asks for confirmation, the customer is emailed) |
38
+ | `steward grants list [--plan <code>] [--subscription none\|live\|any] [--limit <n>] [--after <grant id>] [--json]` | `GET /v1/admin/grants`: the product's active grants (not revoked, started, not ended), one line per grant, with the account and its live subscriptions. `--subscription none`: accounts with no live subscription, e.g. granted a plan but paying for nothing; `--plan`: one plan's grants (an unknown code is refused). A cut list names the next `--after` on stderr |
39
+ | `steward tax thresholds list [--json]` / `steward tax thresholds set <code> --scope <scope> --currency <CUR> [--amount-minor <n>] [--transactions <n>] [--country <XX>] [--region <XX>] [--home-country <XX>] [--period calendar_year\|rolling_12_months] [--warn-at-bps <n>] [--fx-rate <CUR>=<rate>]… [--note <text>]` / `steward tax thresholds delete <code>` / `steward tax sales [--from <iso>] [--to <iso>] [--json\|--csv]` | Tax registration thresholds (`/v1/admin/tax/thresholds`; none ship, the accountant defines them; `set` replaces one whole, audited) with each one's counted sales, share and status; `sales`: paid sales per month, buyer country, region, kind, currency and tax treatment (`GET /v1/admin/sales`) |
37
40
 
38
41
  Exit codes: 0 success, 1 error (or doctor not ready), 2 incorrect usage.
39
42
 
40
43
  ## Connection settings
41
44
 
42
45
  - Admin commands (`catalog`, `settings`, `endpoints`, `keys`, `dunning`, `reprice`, `credits`,
43
- `bank-transfers`, `meters recompute|close-periods`, `events redeliver`): `STEWARD_ADMIN_URL` +
46
+ `bank-transfers`, `invoices`, `meters recompute|close-periods`, `events redeliver`): `STEWARD_ADMIN_URL` +
44
47
  `STEWARD_ADMIN_API_KEY`. The URL is the address where your steward serves `/v1`, for example
45
48
  `https://billing.example.com`: its public address if the deployment exposes `/v1` there,
46
49
  otherwise an address inside its network. The key comes from the operator.
@@ -134,38 +137,22 @@ capability: an older steward would drop the key and offer the plan.
134
137
 
135
138
  Release: bump the version in `cli/package.json` and push the `cli-v<version>` tag
136
139
  (`.github/workflows/cli-publish.yml`); the `@stewardhq/sdk` version it depends on must already
137
- be published on npm. **The first version on npmjs is 0.5.0** (2026-09-21); 0.4.0 was not
138
- published.
139
-
140
- - **0.9.0** (`@stewardhq/sdk` 0.9, which adds `accounts.updateMetadata`):
141
- `steward accounts get`, `steward accounts metadata set` and `unset` (single metadata keys, merged
142
- by steward in one atomic write; requires the `account_metadata` capability). Also: the connection
143
- hint and the "could not reach steward" hint no longer name one deployment's host or assume a
144
- particular way of reaching steward (messages only).
145
- - **0.8.0** (`@stewardhq/sdk` 0.8, bank transfers in another currency, issue #55):
146
- `bank-transfers record --rate`, `bank-transfers list --rate [--currency]`,
147
- `bank-transfers fx-report [--from] [--to] [--json|--csv]`. Unlisted plans: `catalog push` shows
148
- the `plan listing` diff and requires the `unlisted_plans` capability for a plan with
149
- `listed: false`. Help, errors, `doctor` and `endpoints` output and the connection line are now
150
- in English (they were partly Turkish); flags, command names, JSON output and exit codes are
151
- unchanged.
152
- - **0.7.0** (`@stewardhq/sdk` 0.7, admin operations, issue #57): `steward keys`, `steward dunning`,
153
- `steward reprice`, `steward credits adjust`, `steward bank-transfers`, `steward meters recompute` and
154
- `close-periods`, `steward events redeliver`, `settings set --provider`. These replace the pod CLI
155
- commands of the same jobs. `doctor` lists the active API keys with age, last use and expiry; the
156
- connection hint names the public admin host.
157
- - **0.5.0** (`@stewardhq/sdk` 0.5, metering phase 2): `steward meters get`, `steward events
158
- send`; meter, credit and metered price diff in `catalog push` (a metered price change asks
159
- for confirmation; a catalog with meters is not pushed without the `meters` capability);
160
- `settings set --metering-charge-mode`, `--metering-late-grace-minutes`,
161
- `--events-retention-days`; the `metering` line in `doctor` plus the report's `events` and
162
- `overage` sections.
163
- - **0.4.0** (`@stewardhq/sdk` 0.4, billing core phase 1): benefit and price diff, price change
164
- confirmation, the `benefits` capability gate, `settings set --billing-*`; `steward dev`
165
- removed (breaking).
140
+ be published on npm. The notes of 0.4.0 to 0.10.0 are in
141
+ [this file at `cli-v0.10.0`](https://github.com/z9cloud/steward/blob/cli-v0.10.0/cli/README.md#versions).
142
+
143
+ - **0.11.0** (`@stewardhq/sdk` 0.11, which removes the contract names steward no longer produces):
144
+ `steward grants list` (the product's active grants and their accounts' live subscriptions; needs a steward with
145
+ `GET /v1/admin/grants`). `steward settings set --display-time-zone <iana>` (the zone of customer-facing dates;
146
+ `""` restores `Europe/Istanbul`). `steward tax thresholds list|set|delete` and `steward tax sales` (needs a steward
147
+ with `/v1/admin/tax/thresholds` and `/v1/admin/sales`); `steward settings set --tax-provider`,
148
+ `--tax-exemption-reason-en|-tr`, `--consumer-markets`. `steward settings set --default-country <XX>`,
149
+ `--billing-renewal-notice-intervals`, `--billing-renewal-notice-days`, `--billing-invoice-line-text iso|localized`,
150
+ `--seller`, `--withdrawal-waiver`, `--card-on-file`. `steward invoices list --from|--to` and `--csv` (the export
151
+ for an accounting system). `steward bank-transfers record --override-billing-currency`. `steward doctor` shows
152
+ the provider's webhook, automatic renewal and the legal settings.
166
153
 
167
154
  When packed, the `@stewardhq/sdk` dependency turns from `workspace:^` into the range of the
168
- SDK version current at that time (0.5.0 → `^0.5.0`).
155
+ SDK version current at that time (0.11.0 → `^0.11.0`).
169
156
 
170
157
  ## License
171
158