feat: add customers resource, deprecate receivers (v3.11.0) - #54
Merged
Conversation
Copies receivers into a new customers resource targeting the /v1/instances/{id}/customers
API surface. Method signatures match receivers; types are renamed (Receiver -> Customer,
receiver_id -> customer_id where applicable). The receivers resource is now marked
@deprecated with a JSDoc link to the migration changelog and will be removed in v4.0.0.
https://www.blindpay.com/changelog/2026-06-04-customers-rename
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. |
…ivers - src/index.ts: customers is now the canonical 'export *', only the receiver-specific names (createReceiversResource + Receiver* types) remain as explicit named exports. The long inline comment about collision avoidance is gone; the structure speaks for itself. - customers/index.ts: ListCustomersInput filter fields renamed customer_id/customer_name (was receiver_id/receiver_name). The list() method translates them to the wire-level names because the API's filter schema still uses receiver_*; drop the translation once the API accepts customer_* directly. - receivers/index.ts: every exported type and every method on the resource carries its own @deprecated JSDoc so IDEs strike through blindpay.receivers.<method>() at the method call, not just at the factory call.
Drop 'export' keyword from receivers/index.ts collision types (Owner, KycType, FraudWarning, IndividualWith*, CreateXxxResponse, etc.) so src/index.ts can do 'export * from "./resources/receivers"' like every other module. The types remain available inside receivers/ as internal aliases; users now get the customer-shape versions from 'export * from "./resources/customers"' as the canonical surface. Receivers' test inlines the shapes for the few response types it mocked via the (no-longer-exported) imports — those tests are deleted in v4.0.0 anyway. @deprecated JSDoc is still attached to every receiver method and to the exported receiver-specific types (createReceiversResource, ListReceiversInput, GetReceiver*, UpdateReceiverInput, DeleteReceiverInput).
…ic types ListReceiversInput, ListReceiversResponse, GetReceiverInput, GetReceiverResponse, UpdateReceiverInput, DeleteReceiverInput, GetReceiverLimitsInput, GetReceiverLimitsResponse — these are still exported via 'export * from "./resources/receivers"' so they need the deprecation banner so IDEs strike them through in type positions, not just function calls.
…orts Reverts the receivers-side type-export stripping: every exported type on receivers/index.ts keeps its @deprecated JSDoc and full 'export type'. The receivers test goes back to importing those types from '.' (no inline shape hacks). The collision side is moved to customers/index.ts: the shared-name types (Owner, KycType, FraudWarning, IndividualWith*, CreateXxxInput/ Response, GetLimitIncreaseRequestsInput/Response, RequestLimitIncrease*, ProofOfAddressDocType, IdentificationDocument, AmlStatus, AmlHits, LimitIncreaseRequestStatus, LimitIncreaseRequestSupportingDocumentType) are now Customer-prefixed (CustomerOwner, CreateCustomerIndividual..., GetCustomerLimitIncreaseRequests..., etc.). v4.0.0 deletes receivers and the Customer prefix can be stripped at that point for clean naming. src/index.ts is now uniformly 'export *' across every resource module.
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.
https://www.blindpay.com/changelog/2026-06-04-customers-rename