UNPKG

7.46 kBMarkdownView Raw
1# Change Log
2
3## "version": "4.4.3"
4Change functionality of `updateTenants()` function to sort connections so the most recent connection / active tenant is index 0
5
6## "version": "4.4.2"
7Add functionality for attachments on Quotes
8
9## "version": "4.4.1"
10Bug fix for issue [371](https://github.com/XeroAPI/xero-node/issues/371) - import name matches capitalization
11
12## "version": "4.4.0"
13> 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
14
15#### 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.
16
17Breaking Changes:
18* `setAccessTokenFromRedirectUri` renamed as `apiCallback`
19* `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](https://github.com/panva/node-openid-client):
20 * Example:
21 ```js
22 const xero = new XeroClient({...config})
23 xero.initialize()
24 ```
25* Added a `disconnect()` function
26* 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
27* Added types for XeroAccessToken and XeroIdToken to show usable data that the access & id tokens may contain.
28
29---
30## "version": "4.2.0"
31* Added Singapore TaxRates and ReportTaxRates
32* getInvoiceAsPdf and getCreditNoteAsPdf
33 * removed "contentType" param as it's unnecessary
34 * changed response content type from application/octet-stream to application/pdf because it will alway return a pdf.
35
36* Update createEmployees
37 * add summarizeErrors param
38
39* Remove createEmployee method (singular - as this path/method)
40* /Employees POST is needed for updateOrCreateEmployees
41
42* Add updateOrCreateEmployees method
43 * with summarizeErrors param
44
45* Update createManualJournals
46 * add summarizeErrors param
47
48* Remove createManualJournal method (singular - as this path/method)
49* /ManualJournals POST is needed for updateOrCreateManualJournals
50
51* Add updateOrCreateManualJournals method
52 * with summarizeErrors param
53
54* Remove createOverpaymentAllocation method
55
56* Add createOverpaymentAllocations method
57 * with summarizeErrors param
58
59* Add createPrepaymentAllocations method
60 * with summarizeErrors param
61
62* Add missing attributes of Employee object
63* StatusAttributeString
64* ValidationErrors array
65
66* Add missing attributes of Invoice object
67* Warnings array
68
69* Add missing attributes of ManualJournal object
70* StatusAttributeString
71
72---
73## "version": "4.1.7"
74* Fixed file uploads.. Image data was being force encoded in JSON.. Using mime type now
75* emailInvoice and functions with an empty response need `json: true` to succeed when its a 204 response
76* adds some additional types and optionalitities to ceratin functions
77---
78## "version": "4.1.5"
79
80* Relaxes required types for certain objects & parameters
81---
82## "version": "4.1.4"
83
84* Adds Quotes CRUD 🥳
85* Remove a duplicate Enum
86* Improved docs for `unitdp`
87* Fix filters and where clause where we expect an array. Serializes to api as a comma sep. string
88* Fix bug form 4.1.3 that was serializing all Array[any] when we just wanted Array[strings]
89---
90## "version": "4.1.2"
91
92* Adds OAuth 2 Gateway to fix #https://github.com/XeroAPI/xero-node/issues/328 so that we can get Quotes
93** NOTE
94* getQuotes only endpoint supported, but rest of CRUD actions coming soon!
95* emailInvoice supported
96
97* Adds Fix for serializer for the numerous dates returned by XeroAPI to fix #https://github.com/XeroAPI/xero-node/issues/323
98
99Possible raw date formats
100`"Date": "2009-03-29",`
101`"DateString": "2016-12-16T00:00:00",`
102`"DateUTCString": "2018-02-28T21:02:11",`
103`"createdDateUtc": "2020-01-08T17:26:30.5778680",`
104MS Format ( this was main problem date )
105`"FullyPaidOnDate": "\/Date(1481846400000+0000)\/",`
106
107ref: https://developer.xero.com/documentation/api/requests-and-responses
108
109---
110## "version": "4.1.1"
111
112* Adds OAuth 2 Gateway to fix #https://github.com/XeroAPI/xero-node/issues/328 so that we can get Quotes
113** NOTE
114* getQuotes only endpoint supported, but rest of CRUD actions coming soon!
115
116* Adds Fix for serializer for the numerous dates returned by XeroAPI to fix #https://github.com/XeroAPI/xero-node/issues/323
117
118Possible raw date formats
119`"Date": "2009-03-29",`
120`"DateString": "2016-12-16T00:00:00",`
121`"DateUTCString": "2018-02-28T21:02:11",`
122`"createdDateUtc": "2020-01-08T17:26:30.5778680",`
123MS Format ( this was main problem date )
124`"FullyPaidOnDate": "\/Date(1481846400000+0000)\/",`
125
126ref: https://developer.xero.com/documentation/api/requests-and-responses
127
128---
129## "version": "4.1.0"
130
131Naming 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.
132
133Semver naming -> MAJOR.MINOR.PATCH
134
135While this is not a backwards compatible change, we are opting to bounce this to 4.1.0 as the current sdk is relatively new and is getting to a more stable palce.
136
137ex:
138`createContact` -> `updateOrCreateContacts`
139`createBankTransaction` -> `updateOrCreateBankTransactions`
140
141This will enable the ability for our SDK's to both batch create/update from a single endpoint based on the payload..
142
143Refer to the generated type files to see the newly expected format of each function.
144
145Remove singular create methods
146* createItem
147* createContact
148* createBankTransaction
149* createInvoice
150* createPurchaseOrder
151
152Add createOrUpdate bulk methods
153* updateOrCreateItems
154* updateOrCreateContacts
155* updateOrCreateBankTransactions
156* updateOrCreateInvoices
157* createPurchaseOrders
158
159* Add summarizeError to bulk create and updateOrCreate methods
160
161* Add missing Enums from
162- taxRates
163
164* Fix datatype for DiscountRate from string to number on lineItem model
165
166* Add object IDs to ValidationError element array
167
168* Add statusAttributeString to Contact model
169
170---
171## "version": "4.0.7"
172
1731) Persists client in the constructor so you can access `openIdClient` without having to call `buildConsentUrl()`
174Fixes: https://github.com/XeroAPI/xero-node/issues/317
175
1762) Needed to pass in the check object which compares the initial params with what is coming back from callback
177Fixes: https://github.com/XeroAPI/xero-node/issues/304
178```javascript
179async setAccessTokenFromRedirectUri(url: string) {
180 const params = this.openIdClient.callbackParams(url)
181 const check = {...params}
182 this.tokenSet = await this.openIdClient.callback(this.config.redirectUris[0], params, check);
183 this.setAccessTokenForAllApis();
184
185 await this.fetchConnectedTenantIds();
186}
187```
188
1893) Leverages openId's callbackParam fn() to simplify K,V object creation
190`const params = this.openIdClient.callbackParams(url)`
191
1924) clean up constructor and set default values for token and tenants
\No newline at end of file