Skip to content

feat: migrate receivers → customers in CLI - #12

Closed
alvseven wants to merge 8 commits into
mainfrom
alves/migrate-receivers-to-customers
Closed

feat: migrate receivers → customers in CLI#12
alvseven wants to merge 8 commits into
mainfrom
alves/migrate-receivers-to-customers

Conversation

@alvseven

Copy link
Copy Markdown
Contributor

Summary

  • Renames all receivers commands to customers (customers list/get/create/update/delete)
  • Adds customers limits, customers limits_increase_requests, customers create_limit_increase
  • Switches bank_accounts, blockchain_wallets, virtual_accounts to use --customer-id instead of --receiver-id
  • Fixes customer limits path to /limits/customers/{id} (was wrong /customers/{id}/limits)
  • Fixes limit increase requests path to /customers/{id}/limit-increase
  • Updates schema.ts resource name and field names

Test plan

  • bun run typecheck clean
  • blindpay customers list works
  • blindpay customers limits <id> returns limits
  • blindpay bank_accounts list --customer-id <id> works

alvseven added 5 commits June 16, 2026 01:15
- rename all receiver commands to customer (listCustomers, createCustomer, etc.)
- update API paths from /receivers to /customers
- rename command group from 'receivers' to 'customers'
- update all user-facing labels and descriptions
- Rename all exported functions: getReceiver→getCustomer, createReceiver→createCustomer, updateReceiver→updateCustomer, deleteReceiver→deleteCustomer, getReceiverLimits→getCustomerLimits, getReceiverLimitsIncreaseRequests→getCustomerLimitIncreaseRequests
- Rename option param receiverId→customerId across all sub-resource functions (bank-accounts, blockchain-wallets, virtual-accounts, offramp-wallets, wallets)
- Add create_limit_increase subcommand under customers
- Restore missing functions removed in prior commit: createCustomerLimitIncrease, listWallets, getWallet, getWalletBalance, createWallet, deleteWallet, listTransfers, getTransfer, createTransfer, trackTransfer, createTransferQuote, getInstanceFees, initiateTos, uploadFile
- Update all --receiver-id flags to --customer-id across bank_accounts, blockchain_wallets, virtual_accounts, offramp_wallets, wallets commands
- Update schema.ts: receivers→customers resource, receiver_id→customer_id field names
- Fix initiateTos to send customer_id body key instead of receiver_id
@alvseven
alvseven force-pushed the alves/migrate-receivers-to-customers branch from b9ed77a to fa38efb Compare June 16, 2026 04:20
alvseven added 3 commits June 16, 2026 22:04
The receivers→customers rename over-renamed the Terms-of-Service body FK to
customer_id, but the /tos endpoint still expects receiver_id — node and the
Swift SDK both send receiver_id there, and the changelog lists only
payins/payouts as accepting both names. Keep the clean --customer-id flag but
map it to receiver_id on the wire; update the test assertion to match.
The receivers→customers rename changed the resource path and name but NOT the
ID prefix — customer IDs are still re_(nanoid) per the changelog
(https://www.blindpay.com/changelog/2026-06-04-customers-rename). Replace the
incorrect cu_ example IDs (cu_xyz/cu_1/cu_new) with re_ in the resource tests.
The SEPA bank-account create only wired up 3 of node's 9 sepa_beneficiary_*
fields (iban, bic, legal-name), leaving the required address_line_1, city,
postal_code and country — plus optional address_line_2 and
state_province_region — unreachable from the CLI. Add the missing flags + body
mapping and a test covering the full field set (mirrors blindpay-node #50).
@alvseven

Copy link
Copy Markdown
Contributor Author

Closing as superseded. The receivers→customers rename already landed on main via the api-sync PR #11, so this branch (cut from old main) now conflicts and would duplicate/regress that work. The remaining gaps — SEPA support and the cu_→re_ ID-prefix fix — are in the new PR off current main.

@alvseven alvseven closed this Jun 17, 2026
@ericviana
ericviana deleted the alves/migrate-receivers-to-customers branch July 27, 2026 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant