feat!: complete receiver->customer rename (wave 2) + wire-contract CI check - #64
Open
ericviana wants to merge 1 commit into
Open
feat!: complete receiver->customer rename (wave 2) + wire-contract CI check#64ericviana wants to merge 1 commit into
ericviana wants to merge 1 commit into
Conversation
Contributor
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
…re contract check Wave-2 breaking release (5.0.0): the remaining receiver_* field renames, removal of the receiver.* webhook events and legacy surface, and a mechanical contract-check in CI that validates every SDK-declared wire key and the webhook enum against the committed public spec snapshot (.api-sync/spec-snapshot.json). Held until blindpay-v2 #1799 reaches production; the branch history was rebuilt as this single commit so the snapshot only ever contains the public filtered spec. Claude-Session: https://claude.ai/code/session_01F1stiNzuNtJXoXtiW9ZCbs
ericviana
force-pushed
the
eric/customers-wave-2
branch
from
July 27, 2026 22:45
6a3376b to
8c69c1d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Held PR — do not merge
This PR is breaking against the API deployed today. It only becomes correct once
blindpay-v2 #1799 reaches production. Labeled
hold-until-1799-deploy; the orchestratormerges after a production probe confirms the cutover.
What breaks
Wave 1 (already shipped, v4.1.0/v4.1.1) aligned the SDK with what production serves
today and added
customer.*webhook events pluscustomer_idlist filters, whileexplicitly leaving the remaining
receiver_*field renames for later because thedeployed API didn't accept them yet. This PR does that remaining work, matching the
target spec (post-#1799).
Migration table
receiver_idcustomer_idPayout,Payin,Transfer,Owner,ListPayinsInput/ListPayoutsInput, terms-of-serviceinitiate(), Stellar/EVM/Solana payout+payin create responsesreceiver_local_amountcustomer_local_amountPayoutreceiver_wallet_addresscustomer_wallet_addressTransfer,CreateTransferQuoteInputreceiver_networkcustomer_networkTransfer,CreateTransferQuoteInputreceiver_tokencustomer_tokenTransfer,CreateTransferQuoteInputreceiver_invite_redirect_urlcustomer_invite_redirect_urlUpdateInstanceInputAlso:
Owner.receiver_idis removed. Wave 1 made it transitional (bothreceiver_id?and
customer_id?optional); the target spec'sCustomerOut.owners[]items have norequiredarray at all, soOwner.customer_idstays optional andreceiver_idisdropped.
receiver.new/receiver.update/receiver.deleteremoved fromWebhookEvents.They were marked
@deprecatedin wave 1 (still firing); they stop firing at the samecutover, and the target spec's
WebhookEndpointIn.eventsenum no longer lists them.api-keysresource removed (blindpay.instances.apiKeysand its types) — API Keys isdeliberately absent from the public API reference, so it doesn't belong in the SDK.
receiversresource remained to remove (wave 1 already renamed it tocustomers).Intentionally unchanged
receiver_amount(singular) — the receiving-side amount on quotes/payins/payouts/transfers — keeps its name everywhere. Verified: still present, unrenamed, in every
file touched.
currency_typestill accepts"sender"/"receiver".re_-prefixed IDs are never rewritten (only the field names pointing at themchange, never the ID values themselves).
otc_only_supported_for_sender_without_cover_fees_and_receiver_with_cover_feesslug isn't modeled by this SDK (no error-code enum here), so there's nothing to
preserve — noted for completeness.
Contract check (new CI gate)
Added
scripts/contract-check.mjs(dependency-free,node scripts/contract-check.mjs/bun run contract-check) and wired it into CI as its own job (contract-check.yaml,parallel to lint). It checks the committed spec snapshot
(
.api-sync/spec-snapshot.json, copied from the target spec) against every SDK typedeclaration under
src/resources/**andtypes/index.d.ts:parameter) name anywhere in the snapshot. This is exactly the bug class from wave 2:
a renamed field left behind. Verified locally by reverting one rename
(
Payout.customer_idback toreceiver_id) — the check fails with the exactfile:line:field. Restored, and it's green again.
WebhookEventsunion doesn't model (mapped explicitly againstWebhookEndpointIn.events).(expected: lots of internal/ops-only and provider-specific fields this SDK
intentionally doesn't surface).
.api-sync/contract-check-allowlist.jsonholds 22 entries for genuine pre-existingdivergences the check surfaced that are unrelated to this rename and out of scope here
(stale
tracking_partner_fee, legacybilling_feevsbilling_fee_amount, partner-feeevm_wallet_address/stellar_wallet_addressthat no longer exist on the spec, a coupleof bank-account field-name mismatches, and one camelCase path-only parameter). Each entry
has a reason and an owner; none of them touch a wave-2 field.
Versioning
Major bump:
5.0.0(breaking field renames). Bumpedpackage.jsondirectly, matchingthis repo's convention (the publish workflow reads
package.json's version and skipsif already published — no separate
changeset versionstep). Added.changeset/customers-wave-2.mdfor the changelog.Verification
Ran this repo's actual CI commands locally, in the order
lint.yaml/type-checking.yaml/tests.yamlrun them, plus the new contract-check job:https://claude.ai/code/session_01F1stiNzuNtJXoXtiW9ZCbs