xero-node 4.19.1 → 4.21.0
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.
- package/dist/gen/api/accountingApi.d.ts +15 -1
- package/dist/gen/api/accountingApi.js +65 -2
- package/dist/gen/api/accountingApi.js.map +1 -1
- package/dist/gen/api/appStoreApi.d.ts +1 -1
- package/dist/gen/api/appStoreApi.js +2 -2
- package/dist/gen/api/assetApi.d.ts +1 -1
- package/dist/gen/api/assetApi.js +2 -2
- package/dist/gen/api/bankfeedsApi.d.ts +1 -1
- package/dist/gen/api/bankfeedsApi.js +2 -2
- package/dist/gen/api/filesApi.d.ts +1 -1
- package/dist/gen/api/filesApi.js +2 -2
- package/dist/gen/api/financeApi.d.ts +1 -1
- package/dist/gen/api/financeApi.js +2 -2
- package/dist/gen/api/payrollAUApi.d.ts +1 -1
- package/dist/gen/api/payrollAUApi.js +2 -2
- package/dist/gen/api/payrollNZApi.d.ts +1 -1
- package/dist/gen/api/payrollNZApi.js +2 -2
- package/dist/gen/api/payrollUKApi.d.ts +1 -1
- package/dist/gen/api/payrollUKApi.js +2 -2
- package/dist/gen/api/projectApi.d.ts +48 -1
- package/dist/gen/api/projectApi.js +212 -2
- package/dist/gen/api/projectApi.js.map +1 -1
- package/dist/gen/model/accounting/organisation.d.ts +2 -1
- package/dist/gen/model/accounting/organisation.js +1 -0
- package/dist/gen/model/accounting/organisation.js.map +1 -1
- package/dist/gen/model/accounting/taxRate.d.ts +9 -1
- package/dist/gen/model/accounting/taxRate.js +8 -0
- package/dist/gen/model/accounting/taxRate.js.map +1 -1
- package/dist/gen/model/accounting/taxType.d.ts +9 -1
- package/dist/gen/model/accounting/taxType.js +8 -0
- package/dist/gen/model/accounting/taxType.js.map +1 -1
- package/dist/gen/model/appstore/product.d.ts +9 -4
- package/dist/gen/model/appstore/product.js +8 -2
- package/dist/gen/model/appstore/product.js.map +1 -1
- package/dist/gen/model/appstore/subscriptionItem.d.ts +4 -0
- package/dist/gen/model/appstore/subscriptionItem.js +5 -0
- package/dist/gen/model/appstore/subscriptionItem.js.map +1 -1
- package/dist/gen/model/finance/statementResponse.d.ts +9 -1
- package/dist/gen/model/finance/statementResponse.js +10 -0
- package/dist/gen/model/finance/statementResponse.js.map +1 -1
- package/dist/gen/model/payroll-uk/employment.d.ts +7 -2
- package/dist/gen/model/payroll-uk/employment.js +6 -1
- package/dist/gen/model/payroll-uk/employment.js.map +1 -1
- package/dist/gen/model/projects/taskCreateOrUpdate.d.ts +1 -1
- package/package.json +1 -1
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Xero AppStore API
|
|
3
3
|
* These endpoints are for Xero Partners to interact with the App Store Billing platform
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document: 2.
|
|
5
|
+
* The version of the OpenAPI document: 2.23.0
|
|
6
6
|
* Contact: api@xero.com
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Xero AppStore API
|
|
4
4
|
* These endpoints are for Xero Partners to interact with the App Store Billing platform
|
|
5
5
|
*
|
|
6
|
-
* The version of the OpenAPI document: 2.
|
|
6
|
+
* The version of the OpenAPI document: 2.23.0
|
|
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 AppStoreApiApiKeys;
|
|
|
34
34
|
class AppStoreApi {
|
|
35
35
|
constructor(basePathOrUsername, password, basePath) {
|
|
36
36
|
this._basePath = defaultBasePath;
|
|
37
|
-
this.defaultHeaders = { 'user-agent': 'xero-node-4.
|
|
37
|
+
this.defaultHeaders = { 'user-agent': 'xero-node-4.21.0' };
|
|
38
38
|
this._useQuerystring = false;
|
|
39
39
|
this.binaryHeaders = {};
|
|
40
40
|
this.authentications = {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Xero Assets API
|
|
3
3
|
* The Assets API exposes fixed asset related functions of the Xero Accounting application and can be used for a variety of purposes such as creating assets, retrieving asset valuations etc.
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document: 2.
|
|
5
|
+
* The version of the OpenAPI document: 2.23.0
|
|
6
6
|
* Contact: api@xero.com
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
package/dist/gen/api/assetApi.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Xero Assets API
|
|
4
4
|
* The Assets API exposes fixed asset related functions of the Xero Accounting application and can be used for a variety of purposes such as creating assets, retrieving asset valuations etc.
|
|
5
5
|
*
|
|
6
|
-
* The version of the OpenAPI document: 2.
|
|
6
|
+
* The version of the OpenAPI document: 2.23.0
|
|
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 AssetApiApiKeys;
|
|
|
34
34
|
class AssetApi {
|
|
35
35
|
constructor(basePathOrUsername, password, basePath) {
|
|
36
36
|
this._basePath = defaultBasePath;
|
|
37
|
-
this.defaultHeaders = { 'user-agent': 'xero-node-4.
|
|
37
|
+
this.defaultHeaders = { 'user-agent': 'xero-node-4.21.0' };
|
|
38
38
|
this._useQuerystring = false;
|
|
39
39
|
this.binaryHeaders = {};
|
|
40
40
|
this.authentications = {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Xero Bank Feeds API
|
|
3
3
|
* The Bank Feeds API is a closed API that is only available to financial institutions that have an established financial services partnership with Xero. If you\'re an existing financial services partner that wants access, contact your local Partner Manager. If you\'re a financial institution who wants to provide bank feeds to your business customers, contact us to become a financial services partner.
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document: 2.
|
|
5
|
+
* The version of the OpenAPI document: 2.23.0
|
|
6
6
|
* Contact: api@xero.com
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Xero Bank Feeds API
|
|
4
4
|
* The Bank Feeds API is a closed API that is only available to financial institutions that have an established financial services partnership with Xero. If you\'re an existing financial services partner that wants access, contact your local Partner Manager. If you\'re a financial institution who wants to provide bank feeds to your business customers, contact us to become a financial services partner.
|
|
5
5
|
*
|
|
6
|
-
* The version of the OpenAPI document: 2.
|
|
6
|
+
* The version of the OpenAPI document: 2.23.0
|
|
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 BankFeedsApiApiKeys;
|
|
|
34
34
|
class BankFeedsApi {
|
|
35
35
|
constructor(basePathOrUsername, password, basePath) {
|
|
36
36
|
this._basePath = defaultBasePath;
|
|
37
|
-
this.defaultHeaders = { 'user-agent': 'xero-node-4.
|
|
37
|
+
this.defaultHeaders = { 'user-agent': 'xero-node-4.21.0' };
|
|
38
38
|
this._useQuerystring = false;
|
|
39
39
|
this.binaryHeaders = {};
|
|
40
40
|
this.authentications = {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Xero Files API
|
|
3
3
|
* These endpoints are specific to Xero Files API
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document: 2.
|
|
5
|
+
* The version of the OpenAPI document: 2.23.0
|
|
6
6
|
* Contact: api@xero.com
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
package/dist/gen/api/filesApi.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Xero Files API
|
|
4
4
|
* These endpoints are specific to Xero Files API
|
|
5
5
|
*
|
|
6
|
-
* The version of the OpenAPI document: 2.
|
|
6
|
+
* The version of the OpenAPI document: 2.23.0
|
|
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 FilesApiApiKeys;
|
|
|
34
34
|
class FilesApi {
|
|
35
35
|
constructor(basePathOrUsername, password, basePath) {
|
|
36
36
|
this._basePath = defaultBasePath;
|
|
37
|
-
this.defaultHeaders = { 'user-agent': 'xero-node-4.
|
|
37
|
+
this.defaultHeaders = { 'user-agent': 'xero-node-4.21.0' };
|
|
38
38
|
this._useQuerystring = false;
|
|
39
39
|
this.binaryHeaders = {};
|
|
40
40
|
this.authentications = {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Xero Finance API
|
|
3
3
|
* The Finance API is a collection of endpoints which customers can use in the course of a loan application, which may assist lenders to gain the confidence they need to provide capital.
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document: 2.
|
|
5
|
+
* The version of the OpenAPI document: 2.23.0
|
|
6
6
|
* Contact: api@xero.com
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Xero Finance API
|
|
4
4
|
* The Finance API is a collection of endpoints which customers can use in the course of a loan application, which may assist lenders to gain the confidence they need to provide capital.
|
|
5
5
|
*
|
|
6
|
-
* The version of the OpenAPI document: 2.
|
|
6
|
+
* The version of the OpenAPI document: 2.23.0
|
|
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 FinanceApiApiKeys;
|
|
|
34
34
|
class FinanceApi {
|
|
35
35
|
constructor(basePathOrUsername, password, basePath) {
|
|
36
36
|
this._basePath = defaultBasePath;
|
|
37
|
-
this.defaultHeaders = { 'user-agent': 'xero-node-4.
|
|
37
|
+
this.defaultHeaders = { 'user-agent': 'xero-node-4.21.0' };
|
|
38
38
|
this._useQuerystring = false;
|
|
39
39
|
this.binaryHeaders = {};
|
|
40
40
|
this.authentications = {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Xero Payroll AU API
|
|
3
3
|
* This is the Xero Payroll API for orgs in Australia region.
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document: 2.
|
|
5
|
+
* The version of the OpenAPI document: 2.23.0
|
|
6
6
|
* Contact: api@xero.com
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Xero Payroll AU API
|
|
4
4
|
* This is the Xero Payroll API for orgs in Australia region.
|
|
5
5
|
*
|
|
6
|
-
* The version of the OpenAPI document: 2.
|
|
6
|
+
* The version of the OpenAPI document: 2.23.0
|
|
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 PayrollAuApiApiKeys;
|
|
|
34
34
|
class PayrollAuApi {
|
|
35
35
|
constructor(basePathOrUsername, password, basePath) {
|
|
36
36
|
this._basePath = defaultBasePath;
|
|
37
|
-
this.defaultHeaders = { 'user-agent': 'xero-node-4.
|
|
37
|
+
this.defaultHeaders = { 'user-agent': 'xero-node-4.21.0' };
|
|
38
38
|
this._useQuerystring = false;
|
|
39
39
|
this.binaryHeaders = {};
|
|
40
40
|
this.authentications = {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Xero Payroll NZ
|
|
3
3
|
* This is the Xero Payroll API for orgs in the NZ region.
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document: 2.
|
|
5
|
+
* The version of the OpenAPI document: 2.23.0
|
|
6
6
|
* Contact: api@xero.com
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Xero Payroll NZ
|
|
4
4
|
* This is the Xero Payroll API for orgs in the NZ region.
|
|
5
5
|
*
|
|
6
|
-
* The version of the OpenAPI document: 2.
|
|
6
|
+
* The version of the OpenAPI document: 2.23.0
|
|
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 PayrollNzApiApiKeys;
|
|
|
34
34
|
class PayrollNzApi {
|
|
35
35
|
constructor(basePathOrUsername, password, basePath) {
|
|
36
36
|
this._basePath = defaultBasePath;
|
|
37
|
-
this.defaultHeaders = { 'user-agent': 'xero-node-4.
|
|
37
|
+
this.defaultHeaders = { 'user-agent': 'xero-node-4.21.0' };
|
|
38
38
|
this._useQuerystring = false;
|
|
39
39
|
this.binaryHeaders = {};
|
|
40
40
|
this.authentications = {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Xero Payroll UK
|
|
3
3
|
* This is the Xero Payroll API for orgs in the UK region.
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document: 2.
|
|
5
|
+
* The version of the OpenAPI document: 2.23.0
|
|
6
6
|
* Contact: api@xero.com
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Xero Payroll UK
|
|
4
4
|
* This is the Xero Payroll API for orgs in the UK region.
|
|
5
5
|
*
|
|
6
|
-
* The version of the OpenAPI document: 2.
|
|
6
|
+
* The version of the OpenAPI document: 2.23.0
|
|
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 PayrollUkApiApiKeys;
|
|
|
34
34
|
class PayrollUkApi {
|
|
35
35
|
constructor(basePathOrUsername, password, basePath) {
|
|
36
36
|
this._basePath = defaultBasePath;
|
|
37
|
-
this.defaultHeaders = { 'user-agent': 'xero-node-4.
|
|
37
|
+
this.defaultHeaders = { 'user-agent': 'xero-node-4.21.0' };
|
|
38
38
|
this._useQuerystring = false;
|
|
39
39
|
this.binaryHeaders = {};
|
|
40
40
|
this.authentications = {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Xero Projects API
|
|
3
3
|
* This is the Xero Projects API
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document: 2.
|
|
5
|
+
* The version of the OpenAPI document: 2.23.0
|
|
6
6
|
* Contact: api@xero.com
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -18,6 +18,7 @@ import { ProjectPatch } from '../model/projects/projectPatch';
|
|
|
18
18
|
import { ProjectUsers } from '../model/projects/projectUsers';
|
|
19
19
|
import { Projects } from '../model/projects/projects';
|
|
20
20
|
import { Task } from '../model/projects/task';
|
|
21
|
+
import { TaskCreateOrUpdate } from '../model/projects/taskCreateOrUpdate';
|
|
21
22
|
import { Tasks } from '../model/projects/tasks';
|
|
22
23
|
import { TimeEntries } from '../model/projects/timeEntries';
|
|
23
24
|
import { TimeEntry } from '../model/projects/timeEntry';
|
|
@@ -56,6 +57,21 @@ export declare class ProjectApi {
|
|
|
56
57
|
response: http.IncomingMessage;
|
|
57
58
|
body: Project;
|
|
58
59
|
}>;
|
|
60
|
+
/**
|
|
61
|
+
* Allows you to create a specific task
|
|
62
|
+
* @summary Allows you to create a task
|
|
63
|
+
* @param xeroTenantId Xero identifier for Tenant
|
|
64
|
+
* @param projectId You can create a task on a specified projectId
|
|
65
|
+
* @param taskCreateOrUpdate The task object you are creating
|
|
66
|
+
*/
|
|
67
|
+
createTask(xeroTenantId: string, projectId: string, taskCreateOrUpdate: TaskCreateOrUpdate, options?: {
|
|
68
|
+
headers: {
|
|
69
|
+
[name: string]: string;
|
|
70
|
+
};
|
|
71
|
+
}): Promise<{
|
|
72
|
+
response: http.IncomingMessage;
|
|
73
|
+
body?: any;
|
|
74
|
+
}>;
|
|
59
75
|
/**
|
|
60
76
|
* Allows you to create a specific task
|
|
61
77
|
* @summary Creates a time entry for a specific project
|
|
@@ -71,6 +87,21 @@ export declare class ProjectApi {
|
|
|
71
87
|
response: http.IncomingMessage;
|
|
72
88
|
body: TimeEntry;
|
|
73
89
|
}>;
|
|
90
|
+
/**
|
|
91
|
+
* Allows you to delete a specific task
|
|
92
|
+
* @summary Allows you to delete a task
|
|
93
|
+
* @param xeroTenantId Xero identifier for Tenant
|
|
94
|
+
* @param projectId You can specify an individual project by appending the projectId to the endpoint
|
|
95
|
+
* @param taskId You can specify an individual task by appending the id to the endpoint
|
|
96
|
+
*/
|
|
97
|
+
deleteTask(xeroTenantId: string, projectId: string, taskId: string, options?: {
|
|
98
|
+
headers: {
|
|
99
|
+
[name: string]: string;
|
|
100
|
+
};
|
|
101
|
+
}): Promise<{
|
|
102
|
+
response: http.IncomingMessage;
|
|
103
|
+
body?: any;
|
|
104
|
+
}>;
|
|
74
105
|
/**
|
|
75
106
|
* Allows you to delete a specific time entry
|
|
76
107
|
* @summary Deletes a time entry for a specific project
|
|
@@ -235,6 +266,22 @@ export declare class ProjectApi {
|
|
|
235
266
|
response: http.IncomingMessage;
|
|
236
267
|
body?: any;
|
|
237
268
|
}>;
|
|
269
|
+
/**
|
|
270
|
+
* Allows you to update a specific task
|
|
271
|
+
* @summary Allows you to update a task
|
|
272
|
+
* @param xeroTenantId Xero identifier for Tenant
|
|
273
|
+
* @param projectId You can specify an individual project by appending the projectId to the endpoint
|
|
274
|
+
* @param taskId You can specify an individual task by appending the id to the endpoint
|
|
275
|
+
* @param taskCreateOrUpdate The task object you are updating
|
|
276
|
+
*/
|
|
277
|
+
updateTask(xeroTenantId: string, projectId: string, taskId: string, taskCreateOrUpdate: TaskCreateOrUpdate, options?: {
|
|
278
|
+
headers: {
|
|
279
|
+
[name: string]: string;
|
|
280
|
+
};
|
|
281
|
+
}): Promise<{
|
|
282
|
+
response: http.IncomingMessage;
|
|
283
|
+
body?: any;
|
|
284
|
+
}>;
|
|
238
285
|
/**
|
|
239
286
|
* Allows you to update time entry in a project
|
|
240
287
|
* @summary Updates a time entry for a specific project
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Xero Projects API
|
|
4
4
|
* This is the Xero Projects API
|
|
5
5
|
*
|
|
6
|
-
* The version of the OpenAPI document: 2.
|
|
6
|
+
* The version of the OpenAPI document: 2.23.0
|
|
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 ProjectApiApiKeys;
|
|
|
34
34
|
class ProjectApi {
|
|
35
35
|
constructor(basePathOrUsername, password, basePath) {
|
|
36
36
|
this._basePath = defaultBasePath;
|
|
37
|
-
this.defaultHeaders = { 'user-agent': 'xero-node-4.
|
|
37
|
+
this.defaultHeaders = { 'user-agent': 'xero-node-4.21.0' };
|
|
38
38
|
this._useQuerystring = false;
|
|
39
39
|
this.binaryHeaders = {};
|
|
40
40
|
this.authentications = {
|
|
@@ -133,6 +133,74 @@ class ProjectApi {
|
|
|
133
133
|
});
|
|
134
134
|
});
|
|
135
135
|
}
|
|
136
|
+
/**
|
|
137
|
+
* Allows you to create a specific task
|
|
138
|
+
* @summary Allows you to create a task
|
|
139
|
+
* @param xeroTenantId Xero identifier for Tenant
|
|
140
|
+
* @param projectId You can create a task on a specified projectId
|
|
141
|
+
* @param taskCreateOrUpdate The task object you are creating
|
|
142
|
+
*/
|
|
143
|
+
createTask(xeroTenantId, projectId, taskCreateOrUpdate, options = { headers: {} }) {
|
|
144
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
145
|
+
const localVarPath = this.basePath + '/Projects/{projectId}/Tasks'
|
|
146
|
+
.replace('{' + 'projectId' + '}', encodeURIComponent(String(projectId)));
|
|
147
|
+
let localVarQueryParameters = {};
|
|
148
|
+
let localVarHeaderParams = Object.assign({}, this.defaultHeaders);
|
|
149
|
+
let localVarFormParams = {};
|
|
150
|
+
// verify required parameter 'xeroTenantId' is not null or undefined
|
|
151
|
+
if (xeroTenantId === null || xeroTenantId === undefined) {
|
|
152
|
+
throw new Error('Required parameter xeroTenantId was null or undefined when calling createTask.');
|
|
153
|
+
}
|
|
154
|
+
// verify required parameter 'projectId' is not null or undefined
|
|
155
|
+
if (projectId === null || projectId === undefined) {
|
|
156
|
+
throw new Error('Required parameter projectId was null or undefined when calling createTask.');
|
|
157
|
+
}
|
|
158
|
+
// verify required parameter 'taskCreateOrUpdate' is not null or undefined
|
|
159
|
+
if (taskCreateOrUpdate === null || taskCreateOrUpdate === undefined) {
|
|
160
|
+
throw new Error('Required parameter taskCreateOrUpdate was null or undefined when calling createTask.');
|
|
161
|
+
}
|
|
162
|
+
localVarHeaderParams['Xero-Tenant-Id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
|
|
163
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
164
|
+
let localVarUseFormData = false;
|
|
165
|
+
let localVarRequestOptions = {
|
|
166
|
+
method: 'POST',
|
|
167
|
+
qs: localVarQueryParameters,
|
|
168
|
+
headers: localVarHeaderParams,
|
|
169
|
+
uri: localVarPath,
|
|
170
|
+
useQuerystring: this._useQuerystring,
|
|
171
|
+
json: true,
|
|
172
|
+
body: models_1.ObjectSerializer.serialize(taskCreateOrUpdate, "TaskCreateOrUpdate")
|
|
173
|
+
};
|
|
174
|
+
let authenticationPromise = Promise.resolve();
|
|
175
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.OAuth2.applyToRequest(localVarRequestOptions));
|
|
176
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
177
|
+
return authenticationPromise.then(() => {
|
|
178
|
+
if (Object.keys(localVarFormParams).length) {
|
|
179
|
+
if (localVarUseFormData) {
|
|
180
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
181
|
+
}
|
|
182
|
+
else {
|
|
183
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
return new Promise((resolve, reject) => {
|
|
187
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
188
|
+
if (error) {
|
|
189
|
+
reject(error);
|
|
190
|
+
}
|
|
191
|
+
else {
|
|
192
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
193
|
+
resolve({ response: response, body: body });
|
|
194
|
+
}
|
|
195
|
+
else {
|
|
196
|
+
reject({ response: response, body: body });
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
});
|
|
200
|
+
});
|
|
201
|
+
});
|
|
202
|
+
});
|
|
203
|
+
}
|
|
136
204
|
/**
|
|
137
205
|
* Allows you to create a specific task
|
|
138
206
|
* @summary Creates a time entry for a specific project
|
|
@@ -202,6 +270,74 @@ class ProjectApi {
|
|
|
202
270
|
});
|
|
203
271
|
});
|
|
204
272
|
}
|
|
273
|
+
/**
|
|
274
|
+
* Allows you to delete a specific task
|
|
275
|
+
* @summary Allows you to delete a task
|
|
276
|
+
* @param xeroTenantId Xero identifier for Tenant
|
|
277
|
+
* @param projectId You can specify an individual project by appending the projectId to the endpoint
|
|
278
|
+
* @param taskId You can specify an individual task by appending the id to the endpoint
|
|
279
|
+
*/
|
|
280
|
+
deleteTask(xeroTenantId, projectId, taskId, options = { headers: {} }) {
|
|
281
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
282
|
+
const localVarPath = this.basePath + '/Projects/{projectId}/Tasks/{taskId}'
|
|
283
|
+
.replace('{' + 'projectId' + '}', encodeURIComponent(String(projectId)))
|
|
284
|
+
.replace('{' + 'taskId' + '}', encodeURIComponent(String(taskId)));
|
|
285
|
+
let localVarQueryParameters = {};
|
|
286
|
+
let localVarHeaderParams = Object.assign({}, this.defaultHeaders);
|
|
287
|
+
let localVarFormParams = {};
|
|
288
|
+
// verify required parameter 'xeroTenantId' is not null or undefined
|
|
289
|
+
if (xeroTenantId === null || xeroTenantId === undefined) {
|
|
290
|
+
throw new Error('Required parameter xeroTenantId was null or undefined when calling deleteTask.');
|
|
291
|
+
}
|
|
292
|
+
// verify required parameter 'projectId' is not null or undefined
|
|
293
|
+
if (projectId === null || projectId === undefined) {
|
|
294
|
+
throw new Error('Required parameter projectId was null or undefined when calling deleteTask.');
|
|
295
|
+
}
|
|
296
|
+
// verify required parameter 'taskId' is not null or undefined
|
|
297
|
+
if (taskId === null || taskId === undefined) {
|
|
298
|
+
throw new Error('Required parameter taskId was null or undefined when calling deleteTask.');
|
|
299
|
+
}
|
|
300
|
+
localVarHeaderParams['Xero-Tenant-Id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
|
|
301
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
302
|
+
let localVarUseFormData = false;
|
|
303
|
+
let localVarRequestOptions = {
|
|
304
|
+
method: 'DELETE',
|
|
305
|
+
qs: localVarQueryParameters,
|
|
306
|
+
headers: localVarHeaderParams,
|
|
307
|
+
uri: localVarPath,
|
|
308
|
+
useQuerystring: this._useQuerystring,
|
|
309
|
+
json: true,
|
|
310
|
+
};
|
|
311
|
+
let authenticationPromise = Promise.resolve();
|
|
312
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.OAuth2.applyToRequest(localVarRequestOptions));
|
|
313
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
314
|
+
return authenticationPromise.then(() => {
|
|
315
|
+
if (Object.keys(localVarFormParams).length) {
|
|
316
|
+
if (localVarUseFormData) {
|
|
317
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
318
|
+
}
|
|
319
|
+
else {
|
|
320
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
return new Promise((resolve, reject) => {
|
|
324
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
325
|
+
if (error) {
|
|
326
|
+
reject(error);
|
|
327
|
+
}
|
|
328
|
+
else {
|
|
329
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
330
|
+
resolve({ response: response, body: body });
|
|
331
|
+
}
|
|
332
|
+
else {
|
|
333
|
+
reject({ response: response, body: body });
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
});
|
|
337
|
+
});
|
|
338
|
+
});
|
|
339
|
+
});
|
|
340
|
+
}
|
|
205
341
|
/**
|
|
206
342
|
* Allows you to delete a specific time entry
|
|
207
343
|
* @summary Deletes a time entry for a specific project
|
|
@@ -931,6 +1067,80 @@ class ProjectApi {
|
|
|
931
1067
|
});
|
|
932
1068
|
});
|
|
933
1069
|
}
|
|
1070
|
+
/**
|
|
1071
|
+
* Allows you to update a specific task
|
|
1072
|
+
* @summary Allows you to update a task
|
|
1073
|
+
* @param xeroTenantId Xero identifier for Tenant
|
|
1074
|
+
* @param projectId You can specify an individual project by appending the projectId to the endpoint
|
|
1075
|
+
* @param taskId You can specify an individual task by appending the id to the endpoint
|
|
1076
|
+
* @param taskCreateOrUpdate The task object you are updating
|
|
1077
|
+
*/
|
|
1078
|
+
updateTask(xeroTenantId, projectId, taskId, taskCreateOrUpdate, options = { headers: {} }) {
|
|
1079
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1080
|
+
const localVarPath = this.basePath + '/Projects/{projectId}/Tasks/{taskId}'
|
|
1081
|
+
.replace('{' + 'projectId' + '}', encodeURIComponent(String(projectId)))
|
|
1082
|
+
.replace('{' + 'taskId' + '}', encodeURIComponent(String(taskId)));
|
|
1083
|
+
let localVarQueryParameters = {};
|
|
1084
|
+
let localVarHeaderParams = Object.assign({}, this.defaultHeaders);
|
|
1085
|
+
let localVarFormParams = {};
|
|
1086
|
+
// verify required parameter 'xeroTenantId' is not null or undefined
|
|
1087
|
+
if (xeroTenantId === null || xeroTenantId === undefined) {
|
|
1088
|
+
throw new Error('Required parameter xeroTenantId was null or undefined when calling updateTask.');
|
|
1089
|
+
}
|
|
1090
|
+
// verify required parameter 'projectId' is not null or undefined
|
|
1091
|
+
if (projectId === null || projectId === undefined) {
|
|
1092
|
+
throw new Error('Required parameter projectId was null or undefined when calling updateTask.');
|
|
1093
|
+
}
|
|
1094
|
+
// verify required parameter 'taskId' is not null or undefined
|
|
1095
|
+
if (taskId === null || taskId === undefined) {
|
|
1096
|
+
throw new Error('Required parameter taskId was null or undefined when calling updateTask.');
|
|
1097
|
+
}
|
|
1098
|
+
// verify required parameter 'taskCreateOrUpdate' is not null or undefined
|
|
1099
|
+
if (taskCreateOrUpdate === null || taskCreateOrUpdate === undefined) {
|
|
1100
|
+
throw new Error('Required parameter taskCreateOrUpdate was null or undefined when calling updateTask.');
|
|
1101
|
+
}
|
|
1102
|
+
localVarHeaderParams['Xero-Tenant-Id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
|
|
1103
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
1104
|
+
let localVarUseFormData = false;
|
|
1105
|
+
let localVarRequestOptions = {
|
|
1106
|
+
method: 'PUT',
|
|
1107
|
+
qs: localVarQueryParameters,
|
|
1108
|
+
headers: localVarHeaderParams,
|
|
1109
|
+
uri: localVarPath,
|
|
1110
|
+
useQuerystring: this._useQuerystring,
|
|
1111
|
+
json: true,
|
|
1112
|
+
body: models_1.ObjectSerializer.serialize(taskCreateOrUpdate, "TaskCreateOrUpdate")
|
|
1113
|
+
};
|
|
1114
|
+
let authenticationPromise = Promise.resolve();
|
|
1115
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.OAuth2.applyToRequest(localVarRequestOptions));
|
|
1116
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
1117
|
+
return authenticationPromise.then(() => {
|
|
1118
|
+
if (Object.keys(localVarFormParams).length) {
|
|
1119
|
+
if (localVarUseFormData) {
|
|
1120
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
1121
|
+
}
|
|
1122
|
+
else {
|
|
1123
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
1124
|
+
}
|
|
1125
|
+
}
|
|
1126
|
+
return new Promise((resolve, reject) => {
|
|
1127
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
1128
|
+
if (error) {
|
|
1129
|
+
reject(error);
|
|
1130
|
+
}
|
|
1131
|
+
else {
|
|
1132
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
1133
|
+
resolve({ response: response, body: body });
|
|
1134
|
+
}
|
|
1135
|
+
else {
|
|
1136
|
+
reject({ response: response, body: body });
|
|
1137
|
+
}
|
|
1138
|
+
}
|
|
1139
|
+
});
|
|
1140
|
+
});
|
|
1141
|
+
});
|
|
1142
|
+
});
|
|
1143
|
+
}
|
|
934
1144
|
/**
|
|
935
1145
|
* Allows you to update time entry in a project
|
|
936
1146
|
* @summary Updates a time entry for a specific project
|