xero-node 4.19.0 → 4.20.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/README.md +1 -1
  2. package/dist/gen/api/accountingApi.d.ts +15 -1
  3. package/dist/gen/api/accountingApi.js +65 -2
  4. package/dist/gen/api/accountingApi.js.map +1 -1
  5. package/dist/gen/api/appStoreApi.d.ts +1 -1
  6. package/dist/gen/api/appStoreApi.js +2 -2
  7. package/dist/gen/api/assetApi.d.ts +1 -1
  8. package/dist/gen/api/assetApi.js +2 -2
  9. package/dist/gen/api/bankfeedsApi.d.ts +1 -1
  10. package/dist/gen/api/bankfeedsApi.js +2 -2
  11. package/dist/gen/api/filesApi.d.ts +1 -1
  12. package/dist/gen/api/filesApi.js +2 -2
  13. package/dist/gen/api/financeApi.d.ts +1 -1
  14. package/dist/gen/api/financeApi.js +2 -2
  15. package/dist/gen/api/payrollAUApi.d.ts +1 -1
  16. package/dist/gen/api/payrollAUApi.js +2 -2
  17. package/dist/gen/api/payrollNZApi.d.ts +1 -1
  18. package/dist/gen/api/payrollNZApi.js +2 -2
  19. package/dist/gen/api/payrollUKApi.d.ts +1 -1
  20. package/dist/gen/api/payrollUKApi.js +2 -2
  21. package/dist/gen/api/projectApi.d.ts +1 -1
  22. package/dist/gen/api/projectApi.js +2 -2
  23. package/dist/gen/model/accounting/organisation.d.ts +4 -1
  24. package/dist/gen/model/accounting/organisation.js +3 -0
  25. package/dist/gen/model/accounting/organisation.js.map +1 -1
  26. package/dist/gen/model/accounting/taxRate.d.ts +8 -1
  27. package/dist/gen/model/accounting/taxRate.js +7 -0
  28. package/dist/gen/model/accounting/taxRate.js.map +1 -1
  29. package/dist/gen/model/accounting/taxType.d.ts +8 -1
  30. package/dist/gen/model/accounting/taxType.js +7 -0
  31. package/dist/gen/model/accounting/taxType.js.map +1 -1
  32. package/dist/gen/model/appstore/product.d.ts +9 -4
  33. package/dist/gen/model/appstore/product.js +8 -2
  34. package/dist/gen/model/appstore/product.js.map +1 -1
  35. package/dist/gen/model/appstore/subscriptionItem.d.ts +4 -0
  36. package/dist/gen/model/appstore/subscriptionItem.js +5 -0
  37. package/dist/gen/model/appstore/subscriptionItem.js.map +1 -1
  38. package/dist/gen/model/finance/bankTransactionResponse.d.ts +1 -1
  39. package/dist/gen/model/finance/bankTransactionResponse.js +1 -1
  40. package/dist/gen/model/finance/bankTransactionResponse.js.map +1 -1
  41. package/dist/gen/model/finance/paymentResponse.d.ts +1 -1
  42. package/dist/gen/model/finance/paymentResponse.js +1 -1
  43. package/dist/gen/model/finance/paymentResponse.js.map +1 -1
  44. package/dist/gen/model/finance/statementLineResponse.d.ts +2 -2
  45. package/dist/gen/model/finance/statementLineResponse.js +2 -2
  46. package/dist/gen/model/finance/statementLineResponse.js.map +1 -1
  47. package/dist/gen/model/finance/statementResponse.d.ts +11 -3
  48. package/dist/gen/model/finance/statementResponse.js +12 -2
  49. package/dist/gen/model/finance/statementResponse.js.map +1 -1
  50. package/dist/gen/model/payroll-uk/employment.d.ts +7 -2
  51. package/dist/gen/model/payroll-uk/employment.js +6 -1
  52. package/dist/gen/model/payroll-uk/employment.js.map +1 -1
  53. package/package.json +1 -1
package/README.md CHANGED
@@ -48,7 +48,7 @@ Sample apps can get you started quickly with simple auth flows and advanced usag
48
48
  | --- | --- | --- |
49
49
  | [`starter-app`](https://github.com/XeroAPI/xero-node-oauth2-ts-starter) | Basic getting started code samples | <img src="https://i.imgur.com/k208KAv.png" alt="drawing" width="200"/>
50
50
  | [`full-app`](https://github.com/XeroAPI/xero-node-oauth2-app) | Complete app with more complex examples | <img src="https://i.imgur.com/TaMQvnp.png" alt="drawing" width="500"/>
51
- | [`custom-connections-starter`](https://github.com/XeroAPI/xero-node-custom-connections-starter) | Basic app showing Custom Connections - a Xero [premium option](https://developer.xero.com/documentation/oauth2/custom-connections) for building M2M integrations to a single org | <img src="https://i.imgur.com/HoQHLuq.png" alt="drawing" width="300"/>
51
+ | [`custom-connections-starter`](https://github.com/XeroAPI/xero-node-custom-connections-starter) | Basic app showing Custom Connections - a Xero [premium option](https://developer.xero.com/documentation/guides/oauth2/custom-connections) for building M2M integrations to a single org | <img src="https://i.imgur.com/HoQHLuq.png" alt="drawing" width="300"/>
52
52
  | [`xero-node-sso-app`](https://github.com/XeroAPI/xero-node-sso-app) | App showing Xero Single Sign On - as well as basic setup and usage of the Xero App Store `appStoreApi.getSubscription` endpoint | <img src="https://i.imgur.com/4NGowZz.png" alt="drawing" width="300"/>
53
53
  | [`xero-node-sso-form`](https://github.com/XeroAPI/xero-node-sso-form) | App showing Sign up with Xero to Lead | <img src="https://raw.githubusercontent.com/XeroAPI/xero-node-sso-form/main/public/images/ssu-demo-screenshot.png" alt="drawing" width="300"/>
54
54
 
@@ -2,7 +2,7 @@
2
2
  * Xero Accounting API
3
3
  * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
4
  *
5
- * The version of the OpenAPI document: 2.19.1
5
+ * The version of the OpenAPI document: 2.22.4
6
6
  * Contact: api@xero.com
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -1943,6 +1943,20 @@ export declare class AccountingApi {
1943
1943
  response: http.IncomingMessage;
1944
1944
  body: Journals;
1945
1945
  }>;
1946
+ /**
1947
+ *
1948
+ * @summary Retrieves a specific journal using a unique journal number.
1949
+ * @param xeroTenantId Xero identifier for Tenant
1950
+ * @param journalNumber Number of a Journal
1951
+ */
1952
+ getJournalByNumber(xeroTenantId: string, journalNumber: number, options?: {
1953
+ headers: {
1954
+ [name: string]: string;
1955
+ };
1956
+ }): Promise<{
1957
+ response: http.IncomingMessage;
1958
+ body: Journals;
1959
+ }>;
1946
1960
  /**
1947
1961
  *
1948
1962
  * @summary Retrieves journals
@@ -3,7 +3,7 @@
3
3
  * Xero Accounting API
4
4
  * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
5
  *
6
- * The version of the OpenAPI document: 2.19.1
6
+ * The version of the OpenAPI document: 2.22.4
7
7
  * Contact: api@xero.com
8
8
  *
9
9
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -34,7 +34,7 @@ var AccountingApiApiKeys;
34
34
  class AccountingApi {
35
35
  constructor(basePathOrUsername, password, basePath) {
36
36
  this._basePath = defaultBasePath;
37
- this.defaultHeaders = { 'user-agent': 'xero-node-4.19.0' };
37
+ this.defaultHeaders = { 'user-agent': 'xero-node-4.20.1' };
38
38
  this._useQuerystring = false;
39
39
  this.binaryHeaders = {};
40
40
  this.authentications = {
@@ -8760,6 +8760,69 @@ class AccountingApi {
8760
8760
  });
8761
8761
  });
8762
8762
  }
8763
+ /**
8764
+ *
8765
+ * @summary Retrieves a specific journal using a unique journal number.
8766
+ * @param xeroTenantId Xero identifier for Tenant
8767
+ * @param journalNumber Number of a Journal
8768
+ */
8769
+ getJournalByNumber(xeroTenantId, journalNumber, options = { headers: {} }) {
8770
+ return __awaiter(this, void 0, void 0, function* () {
8771
+ const localVarPath = this.basePath + '/Journals/{JournalNumber}'
8772
+ .replace('{' + 'JournalNumber' + '}', encodeURIComponent(String(journalNumber)));
8773
+ let localVarQueryParameters = {};
8774
+ let localVarHeaderParams = Object.assign({}, this.defaultHeaders);
8775
+ let localVarFormParams = {};
8776
+ // verify required parameter 'xeroTenantId' is not null or undefined
8777
+ if (xeroTenantId === null || xeroTenantId === undefined) {
8778
+ throw new Error('Required parameter xeroTenantId was null or undefined when calling getJournalByNumber.');
8779
+ }
8780
+ // verify required parameter 'journalNumber' is not null or undefined
8781
+ if (journalNumber === null || journalNumber === undefined) {
8782
+ throw new Error('Required parameter journalNumber was null or undefined when calling getJournalByNumber.');
8783
+ }
8784
+ localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
8785
+ Object.assign(localVarHeaderParams, options.headers);
8786
+ let localVarUseFormData = false;
8787
+ let localVarRequestOptions = {
8788
+ method: 'GET',
8789
+ qs: localVarQueryParameters,
8790
+ headers: localVarHeaderParams,
8791
+ uri: localVarPath,
8792
+ useQuerystring: this._useQuerystring,
8793
+ json: true,
8794
+ };
8795
+ let authenticationPromise = Promise.resolve();
8796
+ authenticationPromise = authenticationPromise.then(() => this.authentications.OAuth2.applyToRequest(localVarRequestOptions));
8797
+ authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
8798
+ return authenticationPromise.then(() => {
8799
+ if (Object.keys(localVarFormParams).length) {
8800
+ if (localVarUseFormData) {
8801
+ localVarRequestOptions.formData = localVarFormParams;
8802
+ }
8803
+ else {
8804
+ localVarRequestOptions.form = localVarFormParams;
8805
+ }
8806
+ }
8807
+ return new Promise((resolve, reject) => {
8808
+ localVarRequest(localVarRequestOptions, (error, response, body) => {
8809
+ if (error) {
8810
+ reject(error);
8811
+ }
8812
+ else {
8813
+ body = models_1.ObjectSerializer.deserialize(body, "Journals");
8814
+ if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
8815
+ resolve({ response: response, body: body });
8816
+ }
8817
+ else {
8818
+ reject({ response: response, body: body });
8819
+ }
8820
+ }
8821
+ });
8822
+ });
8823
+ });
8824
+ });
8825
+ }
8763
8826
  /**
8764
8827
  *
8765
8828
  * @summary Retrieves journals