fix: expose Payroll AU v2 API client - #819
Open
ryanduguid wants to merge 2 commits into
Open
Conversation
ryanduguid
marked this pull request as ready for review
August 18, 2026 15:06
apiClients was a fourth parallel list, alongside the constructor assignments, the field declarations and the generated APIS export, with nothing keeping them in step. A client added to the constructor but missed here was silently skipped by setAccessToken(), leaving every call on it returning 401. The list is now derived from the clients built in the constructor, filtered against xero.APIS, so wiring a client is enough to have it receive the token. Adds a test that walks xero.APIS and asserts each generated client actually holds the access token. It fails on divergence: dropping financeApi from the old hand-maintained array leaves its accessToken empty while every other test still passes.
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.
What changed
PayrollAuV2ApiXeroClientaspayrollAUV2ApiWhy
The generated Payroll AU v2 class exists, but it is omitted from the public API barrel and
XeroClient. Consumers therefore cannot use it through the supported client surface, and token refreshes do not reach it.Generator follow-up
src/gen/api/apis.tsis generated code. This patch is a narrow interim SDK correction; the owning generator/template should add Payroll AU v2 to its API registry so the fix survives regeneration.Validation
npm cinpm run buildnpm test -- --runInBand— 17 tests passedgit diff --check