Skip to content

Releases: XeroAPI/xero-node

4.4.1

27 Feb 23:47
e4e2f49
Compare
Choose a tag to compare

"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.

4.2.0

21 Feb 20:18
f81eb91
Compare
Choose a tag to compare

"version": "4.2.0"

  • Added Singapore TaxRates and ReportTaxRates

  • getInvoiceAsPdf and getCreditNoteAsPdf

    • removed "contentType" param as it's unnecessary
    • changed response content type from application/octet-stream to application/pdf because it will alway return a pdf.
  • Update createEmployees

    • add summarizeErrors param
  • Remove createEmployee method (singular - as this path/method)

  • /Employees POST is needed for updateOrCreateEmployees

  • Add updateOrCreateEmployees method

    • with summarizeErrors param
  • Update createManualJournals

    • add summarizeErrors param
  • Remove createManualJournal method (singular - as this path/method)

  • /ManualJournals POST is needed for updateOrCreateManualJournals

  • Add updateOrCreateManualJournals method

    • with summarizeErrors param
  • Remove createOverpaymentAllocation method

  • Add createOverpaymentAllocations method

    • with summarizeErrors param
  • Add createPrepaymentAllocations method

    • with summarizeErrors param
  • Add missing attributes of Employee object

  • StatusAttributeString

  • ValidationErrors array

  • Add missing attributes of Invoice object

  • Warnings array

  • Add missing attributes of ManualJournal object

  • StatusAttributeString

4.1.7

10 Feb 21:00
671a9da
Compare
Choose a tag to compare

"version": "4.1.7"

  • Fixed file uploads.. Image data was being force encoded in JSON.. Using mime type now
  • emailInvoice and functions with an empty response need json: true to succeed when its a 204 response
  • adds some additional types and optionalitities to ceratin functions

4.1.5

04 Feb 21:17
a2dd97c
Compare
Choose a tag to compare

"version": "4.1.5"

  • Relaxes required types for certain objects & parameters

4.1.4

31 Jan 00:51
802c1e7
Compare
Choose a tag to compare
  • Adds Quotes CRUD 🥳
  • Remove a duplicate Enum
  • Improved docs for unitdp
  • Fix filters and where clause where we expect an array. Serializes to api as a comma sep. string

4.1.2

23 Jan 00:33
6c40fa5
Compare
Choose a tag to compare

"version": "4.1.2"

  • Adds OAuth 2 Gateway to fix ##328 so that we can get Quotes
    ** NOTE

  • getQuotes only endpoint supported, but rest of CRUD actions coming soon!

  • emailInvoice supported

  • Adds Fix for serializer for the numerous dates returned by XeroAPI to fix ##323

Possible raw date formats
"Date": "2009-03-29",
"DateString": "2016-12-16T00:00:00",
"DateUTCString": "2018-02-28T21:02:11",
"createdDateUtc": "2020-01-08T17:26:30.5778680",
MS Format ( this was main problem date )
"FullyPaidOnDate": "\/Date(1481846400000+0000)\/",

ref: https://developer.xero.com/documentation/api/requests-and-responses

"version": "4.1.1"

  • Had a bug fix in #337 where the types were not being compiled

4.1.0

22 Jan 00:17
Compare
Choose a tag to compare

Naming Conventions updated - Open API spec only allows us to to single PUT/POST in our generated SDKS - refactoring to enable the supported endpoints. This is a larger change that will enable the generated SDK's to be encompass the full features of the raw API, but does require some painful re-naming.

Semver naming -> MAJOR.MINOR.PATCH

While this is not a backwards compatible (minor) change, we are opting to bounce this to 4.1.0 in lui of a major as the current SDK is relatively new and is getting to a more stable place

ex:
createContact -> updateOrCreateContacts
createBankTransaction -> updateOrCreateBankTransactions

This will enable the ability for our SDK's to both batch create/update from a single endpoint based on the payload..

Refer to the generated type files to see the newly expected format of each function. The sample app also has updated examples on each function change: https://github.com/XeroAPI/xero-node-oauth2-app

Remove singular create methods

  • createItem
  • createContact
  • createBankTransaction
  • createInvoice
  • createPurchaseOrder

Add createOrUpdate bulk methods

  • updateOrCreateItems

  • updateOrCreateContacts

  • updateOrCreateBankTransactions

  • updateOrCreateInvoices

  • createPurchaseOrders

  • Add summarizeError to bulk create and updateOrCreate methods

  • Add missing Enums from

  • taxRates
  • Fix datatype for DiscountRate from string to number on lineItem model

  • Add object IDs to ValidationError element array

  • Add statusAttributeString to Contact model

4.0.7

21 Jan 16:18
6240855
Compare
Choose a tag to compare

Remove Dist folder

Pass in "check" param into OpenIdClient to check the state on callback.

CreditNote

  • HasError - boolean
    TaxRate
  • ReportType enum
    EXEMPTCAPITAL

Fixed bulk create for methods

  • banktransactions
  • contacts
  • creditnotes
  • employees
  • invoices
    -items
  • linkedtransactions
  • overpayment (allocations)
  • manualjournals
  • purchaseorders

v4.0.4

11 Dec 21:55
Compare
Choose a tag to compare

First release after merge ouath2 branch to master and move v3.x to oauth1 branch

v3.1.2

05 Dec 00:53
Compare
Choose a tag to compare

merge PR #274