From ce29c0835b166442e0a70b9589e34fc460594230 Mon Sep 17 00:00:00 2001 From: Eric Viana Date: Mon, 27 Jul 2026 12:09:59 -0300 Subject: [PATCH] docs: fix stale receiver references in README and CLAUDE.md The receivers-to-customers command rename shipped a while ago (customers list/get/create/update/delete/limits/rfi_get/rfi_submit, --customer-id flags, /customers paths) but README.md and CLAUDE.md still documented the old receivers commands and flags. CLAUDE.md is fed directly to the automated api-sync Claude workflow as its pattern reference, so the stale receiver_* worked example risked teaching the sync job the wrong naming convention. No source changes: the CLI has been customers-only in code and tests for a while. The remaining receiver_* wire fields (transfer_quotes create, tos initiate) and receiver_amount/sender_amount stay untouched since the deployed API does not accept their customer_* equivalents yet. Version bump to 0.5.0 since this closes out the customers migration documentation gap. Claude-Session: https://claude.ai/code/session_01F1stiNzuNtJXoXtiW9ZCbs --- CLAUDE.md | 26 +++++++++++++------------- README.md | 33 ++++++++++++++++++--------------- package.json | 2 +- 3 files changed, 32 insertions(+), 29 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 726533d..492af15 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -63,7 +63,7 @@ src/ 1. Add an exported async function to `src/commands/resources.ts` (or a new module if it's a brand new resource). Naming pattern: - `` — `listReceivers`, `getPayout`, `createBankAccount`, + ``, e.g. `listCustomers`, `getPayout`, `createBankAccount`, `deleteWebhookEndpoint`. 2. Wire it in `src/index.ts` under the appropriate `program.command(...)` group. Keep groups together with a banner comment @@ -71,10 +71,10 @@ src/ 3. Add `--json` to any read-only command. Use `printResult(data, json, columns)` to render — pass meaningful columns for the default non-JSON output. -4. Path params (e.g. ``, ``) are positional or - `--receiver-id ` flags depending on whether they belong to the +4. Path params (e.g. ``, ``) are positional or + `--customer-id ` flags depending on whether they belong to the primary resource being acted on. Look at how existing commands handle - parent IDs (bank_accounts uses `--receiver-id`). + parent IDs (bank_accounts uses `--customer-id`). 5. Wrap all API calls with `try/catch` and route errors through `handleApiError(err, json)`. 6. Use `parseAmount(...)` (already in resources.ts) for any amount field @@ -86,9 +86,9 @@ src/ include an extra test for any non-trivial body shaping (e.g. cents-scaling, optional-field omission, network-path branching). **Place the test inside the existing `describe(...)` block that - matches the command's top-level CLI group.** A `receivers submit_rfi` - command's test goes inside `describe('Receivers', ...)` alongside - `lists receivers` / `fetches a receiver by id` — not in a new + matches the command's top-level CLI group.** A `customers rfi_submit` + command's test goes inside `describe('Customers', ...)` alongside + `lists customers` / `fetches a customer by id`, not in a new `describe('RFI', ...)`. Only create a new describe block when you are introducing a brand-new top-level group (e.g. the first `transfers` command). @@ -97,8 +97,8 @@ src/ | API path | Command | | ----------------------------------------------------- | -------------------------------- | -| `GET /v1/instances/{id}/receivers` | `blindpay receivers list` | -| `POST /v1/instances/{id}/receivers/{rid}/bank-accounts` | `blindpay bank_accounts create` | +| `GET /v1/instances/{id}/customers` | `blindpay customers list` | +| `POST /v1/instances/{id}/customers/{cid}/bank-accounts` | `blindpay bank_accounts create` | | `GET /v1/available/...` | `blindpay available rails` | Group names use `snake_case` (matching the API resource name with @@ -132,8 +132,8 @@ do **not** ship a command with an empty `{}` body and a TODO. Accept the body as a single `--body ` flag and parse it. Pattern: ```ts -export async function submitReceiverRfi( - receiverId: string, +export async function submitCustomerRfi( + customerId: string, options: { body: string; json: boolean }, ) { let body: Record @@ -145,7 +145,7 @@ export async function submitReceiverRfi( const ctx = resolveContext() const res = await apiPost<{ success: boolean }>( ctx, - `${instancePath(ctx)}/receivers/${receiverId}/rfi`, + `${instancePath(ctx)}/customers/${customerId}/rfi`, body, ) clack.log.success('RFI response submitted') @@ -156,7 +156,7 @@ export async function submitReceiverRfi( ``` The user constructs the body shape on the command line: -`blindpay receivers submit_rfi re_xyz --body '{"address":"..."}'`. +`blindpay customers rfi_submit re_xyz --body '{"address":"..."}'`. Use `--body` as the standard flag name for all dynamic-body endpoints. Don't pick a semantically-flavored name like `--response` or diff --git a/README.md b/README.md index abdc0bc..39fadc4 100644 --- a/README.md +++ b/README.md @@ -57,36 +57,39 @@ Every command supports `--help` for detailed usage and `--json` for machine-read | `blindpay instances update` | Update instance name or redirect URL | | `blindpay instances members list` | List instance members | -### Receivers +### Customers | Command | Description | |---|---| -| `blindpay receivers list` | List all receivers | -| `blindpay receivers get ` | Get a receiver by ID | -| `blindpay receivers create` | Create a new receiver | -| `blindpay receivers update ` | Update a receiver | -| `blindpay receivers delete ` | Delete a receiver | -| `blindpay receivers limits ` | Get receiver limits | -| `blindpay receivers limits_increase_requests ` | Get limits increase requests | +| `blindpay customers list` | List all customers | +| `blindpay customers get ` | Get a customer by ID | +| `blindpay customers create` | Create a new customer | +| `blindpay customers update ` | Update a customer | +| `blindpay customers delete ` | Delete a customer | +| `blindpay customers limits ` | Get customer limits | +| `blindpay customers limits_increase_requests ` | Get customer limit-increase requests | +| `blindpay customers create_limit_increase ` | Request a limit increase for a customer | +| `blindpay customers rfi_get ` | Get the open RFI for a customer | +| `blindpay customers rfi_submit ` | Submit an RFI response for a customer | ### Bank Accounts -Requires `--receiver-id` on every command. +Requires `--customer-id` on every command. | Command | Description | |---|---| -| `blindpay bank_accounts list` | List bank accounts for a receiver | +| `blindpay bank_accounts list` | List bank accounts for a customer | | `blindpay bank_accounts get ` | Get a bank account by ID | | `blindpay bank_accounts create` | Create a new bank account | | `blindpay bank_accounts delete ` | Delete a bank account | ### Blockchain Wallets -Requires `--receiver-id` on every command. +Requires `--customer-id` on every command. | Command | Description | |---|---| -| `blindpay blockchain_wallets list` | List blockchain wallets for a receiver | +| `blindpay blockchain_wallets list` | List blockchain wallets for a customer | | `blindpay blockchain_wallets get ` | Get a blockchain wallet by ID | | `blindpay blockchain_wallets create` | Create a new blockchain wallet | | `blindpay blockchain_wallets delete ` | Delete a blockchain wallet | @@ -113,18 +116,18 @@ Requires `--receiver-id` on every command. ### Virtual Accounts -Requires `--receiver-id` on every command. +Requires `--customer-id` on every command. | Command | Description | |---|---| -| `blindpay virtual_accounts list` | List virtual accounts for a receiver | +| `blindpay virtual_accounts list` | List virtual accounts for a customer | | `blindpay virtual_accounts create` | Create a virtual account | ### Offramp Wallets | Command | Description | |---|---| -| `blindpay offramp_wallets list` | List offramp wallets (`--receiver-id` + `--bank-account-id`) | +| `blindpay offramp_wallets list` | List offramp wallets (`--customer-id` + `--bank-account-id`) | ### Webhook Endpoints diff --git a/package.json b/package.json index 660a0e0..d86cbef 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@blindpay/cli", "type": "module", - "version": "0.4.0", + "version": "0.5.0", "description": "Blindpay CLI - manage receivers, bank accounts, payouts, payins, and more from the terminal", "license": "MIT", "author": "Blindpay (https://blindpay.com/)",