Skip to content

4.4.1

Compare
Choose a tag to compare
@SerKnight SerKnight released this 27 Feb 23:47
· 368 commits to master since this release
e4e2f49

"version": "4.4.1"

NOTE *

This will be a breaking change for how the auth flow and token helpers functions are consumed. As this repo stabilizes from our Oauth2 migration you can expect breaking changes only on major Semver releases.. However, due to community feedback we have simplified the naming conventions of the xeroClient functions and vastly improved our documentation.

Please reference the current version of the readme for a better understanding of the changes and usage.

Jumping past vsn 4.3.0 to indicate the breaking changes without having to increment a major release as well as leaving room for development on the previous client configuration

Had significant community feedback that the documentation and initial auth was too complex.. This refactor is a simplification of the xeroClient.ts naming and an expansion of functionality around the non-generated SDK code.

Breaking Changes:

  • setAccessTokenFromRedirectUri renamed as apiCallback
  • buildClient() remove from constructor, and those responsibilities were moved to an initializer function which must be called once the XeroClient is constructed due to some asyncronous setup required by the openid-client:
    • Example:
       const xero = new XeroClient({...config})
       xero.initialize()
  • Added a disconnect() function
  • Added a updateTenants() function which populates the tenant's organisation details behind during the authentication process and greatly reduces the complexity of showing org details by eliminating the need for developers to make additional calls the the /organisation endpoint for each connected tenant
  • Added types for XeroAccessToken and XeroIdToken to show usable data that the access & id tokens may contain.