fix(account): rename ReservedBalance.amounts to availableAmounts - #176
Merged
Merged
Conversation
Each entry in `bankData.reservedBalances` is returned by the API with an `availableAmounts` array — see the `ReservedBalance` schema in https://api.pluggy.ai/oas3.json, where it is a required property. The SDK typed it as `amounts`, and since the client does no key remapping the field always read as `undefined` at runtime, making reserved balances look empty. Type-level this is a breaking rename, but no working consumer code can be relying on `amounts`: it was never present in an API response. Adds unit coverage for the reserved-balance shape. The fixture is typed as `Account` so renaming the field back is a compile error — note this only surfaces under `tsc`, as `isolatedModules: true` makes ts-jest transpile without type-checking.
cernadasjuan
approved these changes
Jul 22, 2026
pluggy-github-app Bot
pushed a commit
that referenced
this pull request
Jul 22, 2026
# [0.90.0](v0.89.0...v0.90.0) (2026-07-22) ### Bug Fixes * **account:** rename ReservedBalance.amounts to availableAmounts ([#176](#176)) ([a763c24](a763c24)) * **deps:** patch undici, js-yaml and brace-expansion advisories ([#177](#177)) ([85ececd](85ececd)) ### Features * **cc:** adding cc bill dates ([#175](#175)) ([1a60c64](1a60c64))
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.
Summary
availableAmountsfor each entry inbankData.reservedBalances— see theReservedBalanceschema in https://api.pluggy.ai/oas3.json, where it is a required property. The SDK typed it asamounts.undefinedat runtime and reserved balances ("caixinhas") rendered empty for anyone using the SDK types.This is a breaking rename at the type level, but no working consumer code can depend on
amounts— it was never present in an API response. Released as a patch on that basis.The same field name is wrong in
pluggy-javaandpluggy-net; fixes for those are opened separately.Test plan
pnpm test— 56/56 passpnpm buildcleanpnpm exec eslint .cleanAccount-typed fixture producesTS2353/TS2339undertsc. Note this does not surface inpnpm test, sinceisolatedModules: truemakes ts-jest transpile without type-checking.