Skip to content

feat: add customers resource, deprecate receivers (v3.11.0) - #54

Merged
alvseven merged 5 commits into
mainfrom
alves/customers-resource
Jun 5, 2026
Merged

feat: add customers resource, deprecate receivers (v3.11.0)#54
alvseven merged 5 commits into
mainfrom
alves/customers-resource

Conversation

@alvseven

@alvseven alvseven commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

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
@BernardoSM

BernardoSM commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues
Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

alvseven added 4 commits June 5, 2026 14:27
…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.
@alvseven
alvseven merged commit f76dd37 into main Jun 5, 2026
9 checks passed
@ericviana
ericviana deleted the alves/customers-resource branch July 27, 2026 15:22
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.

2 participants