mirror of
https://github.com/hanzo-fi/payments.git
synced 2026-10-30 20:31:20 +00:00
* feat(api): EN-1023 expose connector capabilities on v3
Add `GET /v3/connectors/capabilities` (full catalog, ETag-cached for the
stateless console) and `GET /v3/connectors/{connectorID}/capabilities`,
and inline a `capabilities` field on each row of `v3ListConnectors` so
platform-ui can gate per-connector submenus (Accounts/Payments/Transfers)
on what the underlying plugin actually supports.
Capability owns its JSON wire encoding (MarshalJSON/UnmarshalJSON) so
the format stays aligned with the DB Value/Scan representation.
Co-authored-by: Cursor <[email protected]>
* fix(api): EN-1023 address CodeRabbit review
- Replace `new(value)` with the local-variable `&v` pattern used elsewhere
in v3 for `api.BaseResponse.Data`.
- Service: drop the registry error from the 404 translation, honouring
the comment's non-leak intent.
- List handler: normalise the storage provider through `ToV3Provider`
before looking up capabilities so legacy v2 rows (`"STRIPE"`, etc.) hit
the registry's lowercase keys; test now exercises that path.
- Registry: clone capability slices in `GetAllCapabilities` so callers
can't mutate plugin registrations through the returned map.
- E2E: wait for the uninstall workflow via the shared helper and assert a
concrete capability instead of just non-nil.
Co-authored-by: Cursor <[email protected]>
---------
Co-authored-by: Cursor <[email protected]>
2.1 KiB
2.1 KiB
V3GetConnectorCapabilitiesResponse
Fields
| Field | Type | Required | Description |
|---|---|---|---|
HTTPMeta |
components.HTTPMetadata | ✔️ | N/A |
V3ConnectorCapabilityResponse |
*components.V3ConnectorCapabilityResponse | ➖ | OK |
V3ErrorResponse |
*components.V3ErrorResponse | ➖ | Error |