xero-node 4.21.0 → 4.22.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 +46 -1
- package/dist/gen/api/accountingApi.js +205 -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 +1 -1
- package/dist/gen/api/projectApi.js +2 -2
- package/dist/gen/model/accounting/repeatingInvoice.d.ts +17 -1
- package/dist/gen/model/accounting/repeatingInvoice.js +20 -0
- package/dist/gen/model/accounting/repeatingInvoice.js.map +1 -1
- package/dist/gen/model/payroll-au/earningsType.d.ts +3 -1
- package/dist/gen/model/payroll-au/earningsType.js +2 -0
- package/dist/gen/model/payroll-au/earningsType.js.map +1 -1
- package/package.json +1 -1
|
@@ -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.
|
|
5
|
+
* The version of the OpenAPI document: 2.24.0
|
|
6
6
|
* Contact: api@xero.com
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -873,6 +873,21 @@ export declare class AccountingApi {
|
|
|
873
873
|
response: http.IncomingMessage;
|
|
874
874
|
body: HistoryRecords;
|
|
875
875
|
}>;
|
|
876
|
+
/**
|
|
877
|
+
*
|
|
878
|
+
* @summary Creates one or more repeating invoice templates
|
|
879
|
+
* @param xeroTenantId Xero identifier for Tenant
|
|
880
|
+
* @param repeatingInvoices RepeatingInvoices with an array of repeating invoice objects in body of request
|
|
881
|
+
* @param summarizeErrors If false return 200 OK and mix of successfully created objects and any with validation errors
|
|
882
|
+
*/
|
|
883
|
+
createRepeatingInvoices(xeroTenantId: string, repeatingInvoices: RepeatingInvoices, summarizeErrors?: boolean, options?: {
|
|
884
|
+
headers: {
|
|
885
|
+
[name: string]: string;
|
|
886
|
+
};
|
|
887
|
+
}): Promise<{
|
|
888
|
+
response: http.IncomingMessage;
|
|
889
|
+
body: RepeatingInvoices;
|
|
890
|
+
}>;
|
|
876
891
|
/**
|
|
877
892
|
*
|
|
878
893
|
* @summary Creates one or more tax rates
|
|
@@ -3385,6 +3400,21 @@ export declare class AccountingApi {
|
|
|
3385
3400
|
response: http.IncomingMessage;
|
|
3386
3401
|
body: Quotes;
|
|
3387
3402
|
}>;
|
|
3403
|
+
/**
|
|
3404
|
+
*
|
|
3405
|
+
* @summary Creates or deletes one or more repeating invoice templates
|
|
3406
|
+
* @param xeroTenantId Xero identifier for Tenant
|
|
3407
|
+
* @param repeatingInvoices RepeatingInvoices with an array of repeating invoice objects in body of request
|
|
3408
|
+
* @param summarizeErrors If false return 200 OK and mix of successfully created objects and any with validation errors
|
|
3409
|
+
*/
|
|
3410
|
+
updateOrCreateRepeatingInvoices(xeroTenantId: string, repeatingInvoices: RepeatingInvoices, summarizeErrors?: boolean, options?: {
|
|
3411
|
+
headers: {
|
|
3412
|
+
[name: string]: string;
|
|
3413
|
+
};
|
|
3414
|
+
}): Promise<{
|
|
3415
|
+
response: http.IncomingMessage;
|
|
3416
|
+
body: RepeatingInvoices;
|
|
3417
|
+
}>;
|
|
3388
3418
|
/**
|
|
3389
3419
|
*
|
|
3390
3420
|
* @summary Updates a specific purchase order
|
|
@@ -3479,6 +3509,21 @@ export declare class AccountingApi {
|
|
|
3479
3509
|
response: http.IncomingMessage;
|
|
3480
3510
|
body: Attachments;
|
|
3481
3511
|
}>;
|
|
3512
|
+
/**
|
|
3513
|
+
*
|
|
3514
|
+
* @summary Deletes a specific repeating invoice template
|
|
3515
|
+
* @param xeroTenantId Xero identifier for Tenant
|
|
3516
|
+
* @param repeatingInvoiceID Unique identifier for a Repeating Invoice
|
|
3517
|
+
* @param repeatingInvoices
|
|
3518
|
+
*/
|
|
3519
|
+
updateRepeatingInvoice(xeroTenantId: string, repeatingInvoiceID: string, repeatingInvoices: RepeatingInvoices, options?: {
|
|
3520
|
+
headers: {
|
|
3521
|
+
[name: string]: string;
|
|
3522
|
+
};
|
|
3523
|
+
}): Promise<{
|
|
3524
|
+
response: http.IncomingMessage;
|
|
3525
|
+
body: RepeatingInvoices;
|
|
3526
|
+
}>;
|
|
3482
3527
|
/**
|
|
3483
3528
|
*
|
|
3484
3529
|
* @summary Updates a specific attachment from a specific repeating invoices by file name
|
|
@@ -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.
|
|
6
|
+
* The version of the OpenAPI document: 2.24.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 AccountingApiApiKeys;
|
|
|
34
34
|
class AccountingApi {
|
|
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.22.0' };
|
|
38
38
|
this._useQuerystring = false;
|
|
39
39
|
this.binaryHeaders = {};
|
|
40
40
|
this.authentications = {
|
|
@@ -3950,6 +3950,73 @@ class AccountingApi {
|
|
|
3950
3950
|
});
|
|
3951
3951
|
});
|
|
3952
3952
|
}
|
|
3953
|
+
/**
|
|
3954
|
+
*
|
|
3955
|
+
* @summary Creates one or more repeating invoice templates
|
|
3956
|
+
* @param xeroTenantId Xero identifier for Tenant
|
|
3957
|
+
* @param repeatingInvoices RepeatingInvoices with an array of repeating invoice objects in body of request
|
|
3958
|
+
* @param summarizeErrors If false return 200 OK and mix of successfully created objects and any with validation errors
|
|
3959
|
+
*/
|
|
3960
|
+
createRepeatingInvoices(xeroTenantId, repeatingInvoices, summarizeErrors, options = { headers: {} }) {
|
|
3961
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
3962
|
+
const localVarPath = this.basePath + '/RepeatingInvoices';
|
|
3963
|
+
let localVarQueryParameters = {};
|
|
3964
|
+
let localVarHeaderParams = Object.assign({}, this.defaultHeaders);
|
|
3965
|
+
let localVarFormParams = {};
|
|
3966
|
+
// verify required parameter 'xeroTenantId' is not null or undefined
|
|
3967
|
+
if (xeroTenantId === null || xeroTenantId === undefined) {
|
|
3968
|
+
throw new Error('Required parameter xeroTenantId was null or undefined when calling createRepeatingInvoices.');
|
|
3969
|
+
}
|
|
3970
|
+
// verify required parameter 'repeatingInvoices' is not null or undefined
|
|
3971
|
+
if (repeatingInvoices === null || repeatingInvoices === undefined) {
|
|
3972
|
+
throw new Error('Required parameter repeatingInvoices was null or undefined when calling createRepeatingInvoices.');
|
|
3973
|
+
}
|
|
3974
|
+
if (summarizeErrors !== undefined) {
|
|
3975
|
+
localVarQueryParameters['summarizeErrors'] = models_1.ObjectSerializer.serialize(summarizeErrors, "boolean");
|
|
3976
|
+
}
|
|
3977
|
+
localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
|
|
3978
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
3979
|
+
let localVarUseFormData = false;
|
|
3980
|
+
let localVarRequestOptions = {
|
|
3981
|
+
method: 'PUT',
|
|
3982
|
+
qs: localVarQueryParameters,
|
|
3983
|
+
headers: localVarHeaderParams,
|
|
3984
|
+
uri: localVarPath,
|
|
3985
|
+
useQuerystring: this._useQuerystring,
|
|
3986
|
+
json: true,
|
|
3987
|
+
body: models_1.ObjectSerializer.serialize(repeatingInvoices, "RepeatingInvoices")
|
|
3988
|
+
};
|
|
3989
|
+
let authenticationPromise = Promise.resolve();
|
|
3990
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.OAuth2.applyToRequest(localVarRequestOptions));
|
|
3991
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
3992
|
+
return authenticationPromise.then(() => {
|
|
3993
|
+
if (Object.keys(localVarFormParams).length) {
|
|
3994
|
+
if (localVarUseFormData) {
|
|
3995
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
3996
|
+
}
|
|
3997
|
+
else {
|
|
3998
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
3999
|
+
}
|
|
4000
|
+
}
|
|
4001
|
+
return new Promise((resolve, reject) => {
|
|
4002
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
4003
|
+
if (error) {
|
|
4004
|
+
reject(error);
|
|
4005
|
+
}
|
|
4006
|
+
else {
|
|
4007
|
+
body = models_1.ObjectSerializer.deserialize(body, "RepeatingInvoices");
|
|
4008
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
4009
|
+
resolve({ response: response, body: body });
|
|
4010
|
+
}
|
|
4011
|
+
else {
|
|
4012
|
+
reject({ response: response, body: body });
|
|
4013
|
+
}
|
|
4014
|
+
}
|
|
4015
|
+
});
|
|
4016
|
+
});
|
|
4017
|
+
});
|
|
4018
|
+
});
|
|
4019
|
+
}
|
|
3953
4020
|
/**
|
|
3954
4021
|
*
|
|
3955
4022
|
* @summary Creates one or more tax rates
|
|
@@ -15411,6 +15478,73 @@ class AccountingApi {
|
|
|
15411
15478
|
});
|
|
15412
15479
|
});
|
|
15413
15480
|
}
|
|
15481
|
+
/**
|
|
15482
|
+
*
|
|
15483
|
+
* @summary Creates or deletes one or more repeating invoice templates
|
|
15484
|
+
* @param xeroTenantId Xero identifier for Tenant
|
|
15485
|
+
* @param repeatingInvoices RepeatingInvoices with an array of repeating invoice objects in body of request
|
|
15486
|
+
* @param summarizeErrors If false return 200 OK and mix of successfully created objects and any with validation errors
|
|
15487
|
+
*/
|
|
15488
|
+
updateOrCreateRepeatingInvoices(xeroTenantId, repeatingInvoices, summarizeErrors, options = { headers: {} }) {
|
|
15489
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
15490
|
+
const localVarPath = this.basePath + '/RepeatingInvoices';
|
|
15491
|
+
let localVarQueryParameters = {};
|
|
15492
|
+
let localVarHeaderParams = Object.assign({}, this.defaultHeaders);
|
|
15493
|
+
let localVarFormParams = {};
|
|
15494
|
+
// verify required parameter 'xeroTenantId' is not null or undefined
|
|
15495
|
+
if (xeroTenantId === null || xeroTenantId === undefined) {
|
|
15496
|
+
throw new Error('Required parameter xeroTenantId was null or undefined when calling updateOrCreateRepeatingInvoices.');
|
|
15497
|
+
}
|
|
15498
|
+
// verify required parameter 'repeatingInvoices' is not null or undefined
|
|
15499
|
+
if (repeatingInvoices === null || repeatingInvoices === undefined) {
|
|
15500
|
+
throw new Error('Required parameter repeatingInvoices was null or undefined when calling updateOrCreateRepeatingInvoices.');
|
|
15501
|
+
}
|
|
15502
|
+
if (summarizeErrors !== undefined) {
|
|
15503
|
+
localVarQueryParameters['summarizeErrors'] = models_1.ObjectSerializer.serialize(summarizeErrors, "boolean");
|
|
15504
|
+
}
|
|
15505
|
+
localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
|
|
15506
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
15507
|
+
let localVarUseFormData = false;
|
|
15508
|
+
let localVarRequestOptions = {
|
|
15509
|
+
method: 'POST',
|
|
15510
|
+
qs: localVarQueryParameters,
|
|
15511
|
+
headers: localVarHeaderParams,
|
|
15512
|
+
uri: localVarPath,
|
|
15513
|
+
useQuerystring: this._useQuerystring,
|
|
15514
|
+
json: true,
|
|
15515
|
+
body: models_1.ObjectSerializer.serialize(repeatingInvoices, "RepeatingInvoices")
|
|
15516
|
+
};
|
|
15517
|
+
let authenticationPromise = Promise.resolve();
|
|
15518
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.OAuth2.applyToRequest(localVarRequestOptions));
|
|
15519
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
15520
|
+
return authenticationPromise.then(() => {
|
|
15521
|
+
if (Object.keys(localVarFormParams).length) {
|
|
15522
|
+
if (localVarUseFormData) {
|
|
15523
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
15524
|
+
}
|
|
15525
|
+
else {
|
|
15526
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
15527
|
+
}
|
|
15528
|
+
}
|
|
15529
|
+
return new Promise((resolve, reject) => {
|
|
15530
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
15531
|
+
if (error) {
|
|
15532
|
+
reject(error);
|
|
15533
|
+
}
|
|
15534
|
+
else {
|
|
15535
|
+
body = models_1.ObjectSerializer.deserialize(body, "RepeatingInvoices");
|
|
15536
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
15537
|
+
resolve({ response: response, body: body });
|
|
15538
|
+
}
|
|
15539
|
+
else {
|
|
15540
|
+
reject({ response: response, body: body });
|
|
15541
|
+
}
|
|
15542
|
+
}
|
|
15543
|
+
});
|
|
15544
|
+
});
|
|
15545
|
+
});
|
|
15546
|
+
});
|
|
15547
|
+
}
|
|
15414
15548
|
/**
|
|
15415
15549
|
*
|
|
15416
15550
|
* @summary Updates a specific purchase order
|
|
@@ -15919,6 +16053,75 @@ class AccountingApi {
|
|
|
15919
16053
|
});
|
|
15920
16054
|
});
|
|
15921
16055
|
}
|
|
16056
|
+
/**
|
|
16057
|
+
*
|
|
16058
|
+
* @summary Deletes a specific repeating invoice template
|
|
16059
|
+
* @param xeroTenantId Xero identifier for Tenant
|
|
16060
|
+
* @param repeatingInvoiceID Unique identifier for a Repeating Invoice
|
|
16061
|
+
* @param repeatingInvoices
|
|
16062
|
+
*/
|
|
16063
|
+
updateRepeatingInvoice(xeroTenantId, repeatingInvoiceID, repeatingInvoices, options = { headers: {} }) {
|
|
16064
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
16065
|
+
const localVarPath = this.basePath + '/RepeatingInvoices/{RepeatingInvoiceID}'
|
|
16066
|
+
.replace('{' + 'RepeatingInvoiceID' + '}', encodeURIComponent(String(repeatingInvoiceID)));
|
|
16067
|
+
let localVarQueryParameters = {};
|
|
16068
|
+
let localVarHeaderParams = Object.assign({}, this.defaultHeaders);
|
|
16069
|
+
let localVarFormParams = {};
|
|
16070
|
+
// verify required parameter 'xeroTenantId' is not null or undefined
|
|
16071
|
+
if (xeroTenantId === null || xeroTenantId === undefined) {
|
|
16072
|
+
throw new Error('Required parameter xeroTenantId was null or undefined when calling updateRepeatingInvoice.');
|
|
16073
|
+
}
|
|
16074
|
+
// verify required parameter 'repeatingInvoiceID' is not null or undefined
|
|
16075
|
+
if (repeatingInvoiceID === null || repeatingInvoiceID === undefined) {
|
|
16076
|
+
throw new Error('Required parameter repeatingInvoiceID was null or undefined when calling updateRepeatingInvoice.');
|
|
16077
|
+
}
|
|
16078
|
+
// verify required parameter 'repeatingInvoices' is not null or undefined
|
|
16079
|
+
if (repeatingInvoices === null || repeatingInvoices === undefined) {
|
|
16080
|
+
throw new Error('Required parameter repeatingInvoices was null or undefined when calling updateRepeatingInvoice.');
|
|
16081
|
+
}
|
|
16082
|
+
localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
|
|
16083
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
16084
|
+
let localVarUseFormData = false;
|
|
16085
|
+
let localVarRequestOptions = {
|
|
16086
|
+
method: 'POST',
|
|
16087
|
+
qs: localVarQueryParameters,
|
|
16088
|
+
headers: localVarHeaderParams,
|
|
16089
|
+
uri: localVarPath,
|
|
16090
|
+
useQuerystring: this._useQuerystring,
|
|
16091
|
+
json: true,
|
|
16092
|
+
body: models_1.ObjectSerializer.serialize(repeatingInvoices, "RepeatingInvoices")
|
|
16093
|
+
};
|
|
16094
|
+
let authenticationPromise = Promise.resolve();
|
|
16095
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.OAuth2.applyToRequest(localVarRequestOptions));
|
|
16096
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
16097
|
+
return authenticationPromise.then(() => {
|
|
16098
|
+
if (Object.keys(localVarFormParams).length) {
|
|
16099
|
+
if (localVarUseFormData) {
|
|
16100
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
16101
|
+
}
|
|
16102
|
+
else {
|
|
16103
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
16104
|
+
}
|
|
16105
|
+
}
|
|
16106
|
+
return new Promise((resolve, reject) => {
|
|
16107
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
16108
|
+
if (error) {
|
|
16109
|
+
reject(error);
|
|
16110
|
+
}
|
|
16111
|
+
else {
|
|
16112
|
+
body = models_1.ObjectSerializer.deserialize(body, "RepeatingInvoices");
|
|
16113
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
16114
|
+
resolve({ response: response, body: body });
|
|
16115
|
+
}
|
|
16116
|
+
else {
|
|
16117
|
+
reject({ response: response, body: body });
|
|
16118
|
+
}
|
|
16119
|
+
}
|
|
16120
|
+
});
|
|
16121
|
+
});
|
|
16122
|
+
});
|
|
16123
|
+
});
|
|
16124
|
+
}
|
|
15922
16125
|
/**
|
|
15923
16126
|
*
|
|
15924
16127
|
* @summary Updates a specific attachment from a specific repeating invoices by file name
|