xero-node 4.34.0 → 4.36.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.
Files changed (56) hide show
  1. package/dist/gen/api/accountingApi.d.ts +245 -100
  2. package/dist/gen/api/accountingApi.js +506 -101
  3. package/dist/gen/api/accountingApi.js.map +1 -1
  4. package/dist/gen/api/appStoreApi.d.ts +5 -3
  5. package/dist/gen/api/appStoreApi.js +8 -4
  6. package/dist/gen/api/appStoreApi.js.map +1 -1
  7. package/dist/gen/api/assetApi.d.ts +5 -3
  8. package/dist/gen/api/assetApi.js +8 -4
  9. package/dist/gen/api/assetApi.js.map +1 -1
  10. package/dist/gen/api/bankfeedsApi.d.ts +7 -4
  11. package/dist/gen/api/bankfeedsApi.js +11 -5
  12. package/dist/gen/api/bankfeedsApi.js.map +1 -1
  13. package/dist/gen/api/filesApi.d.ts +13 -7
  14. package/dist/gen/api/filesApi.js +20 -8
  15. package/dist/gen/api/filesApi.js.map +1 -1
  16. package/dist/gen/api/financeApi.d.ts +1 -1
  17. package/dist/gen/api/financeApi.js +2 -2
  18. package/dist/gen/api/payrollAUApi.d.ts +74 -14
  19. package/dist/gen/api/payrollAUApi.js +242 -15
  20. package/dist/gen/api/payrollAUApi.js.map +1 -1
  21. package/dist/gen/api/payrollNZApi.d.ts +59 -30
  22. package/dist/gen/api/payrollNZApi.js +89 -31
  23. package/dist/gen/api/payrollNZApi.js.map +1 -1
  24. package/dist/gen/api/payrollUKApi.d.ts +55 -28
  25. package/dist/gen/api/payrollUKApi.js +83 -29
  26. package/dist/gen/api/payrollUKApi.js.map +1 -1
  27. package/dist/gen/api/projectApi.d.ts +15 -8
  28. package/dist/gen/api/projectApi.js +23 -9
  29. package/dist/gen/api/projectApi.js.map +1 -1
  30. package/dist/gen/model/accounting/accountType.d.ts +1 -5
  31. package/dist/gen/model/accounting/accountType.js +0 -4
  32. package/dist/gen/model/accounting/accountType.js.map +1 -1
  33. package/dist/gen/model/accounting/allocation.d.ts +8 -0
  34. package/dist/gen/model/accounting/allocation.js +10 -0
  35. package/dist/gen/model/accounting/allocation.js.map +1 -1
  36. package/dist/gen/model/accounting/contact.d.ts +0 -4
  37. package/dist/gen/model/accounting/contact.js +0 -5
  38. package/dist/gen/model/accounting/contact.js.map +1 -1
  39. package/dist/gen/model/accounting/models.js +1 -0
  40. package/dist/gen/model/accounting/models.js.map +1 -1
  41. package/dist/gen/model/accounting/taxRate.d.ts +6 -1
  42. package/dist/gen/model/accounting/taxRate.js +5 -0
  43. package/dist/gen/model/accounting/taxRate.js.map +1 -1
  44. package/dist/gen/model/accounting/taxType.d.ts +11 -1
  45. package/dist/gen/model/accounting/taxType.js +10 -0
  46. package/dist/gen/model/accounting/taxType.js.map +1 -1
  47. package/dist/gen/model/accounting/tenNinetyNineContact.d.ts +23 -0
  48. package/dist/gen/model/accounting/tenNinetyNineContact.js +28 -0
  49. package/dist/gen/model/accounting/tenNinetyNineContact.js.map +1 -1
  50. package/dist/gen/model/finance/problemType.d.ts +2 -1
  51. package/dist/gen/model/finance/problemType.js +1 -0
  52. package/dist/gen/model/finance/problemType.js.map +1 -1
  53. package/dist/gen/model/payroll-au/leavePeriodStatus.d.ts +3 -1
  54. package/dist/gen/model/payroll-au/leavePeriodStatus.js +2 -0
  55. package/dist/gen/model/payroll-au/leavePeriodStatus.js.map +1 -1
  56. package/package.json +1 -1
@@ -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.37.0
6
+ * The version of the OpenAPI document: 2.40.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.34.0' };
37
+ this.defaultHeaders = { 'user-agent': 'xero-node-4.36.0' };
38
38
  this._useQuerystring = false;
39
39
  this.binaryHeaders = {};
40
40
  this.authentications = {
@@ -75,8 +75,9 @@ class PayrollUkApi {
75
75
  * @summary Approves a specific timesheet
76
76
  * @param xeroTenantId Xero identifier for Tenant
77
77
  * @param timesheetID Identifier for the timesheet
78
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
78
79
  */
79
- approveTimesheet(xeroTenantId, timesheetID, options = { headers: {} }) {
80
+ approveTimesheet(xeroTenantId, timesheetID, idempotencyKey, options = { headers: {} }) {
80
81
  return __awaiter(this, void 0, void 0, function* () {
81
82
  const localVarPath = this.basePath + '/Timesheets/{TimesheetID}/Approve'
82
83
  .replace('{' + 'TimesheetID' + '}', encodeURIComponent(String(timesheetID)));
@@ -92,6 +93,7 @@ class PayrollUkApi {
92
93
  throw new Error('Required parameter timesheetID was null or undefined when calling approveTimesheet.');
93
94
  }
94
95
  localVarHeaderParams['Xero-Tenant-Id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
96
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
95
97
  Object.assign(localVarHeaderParams, options.headers);
96
98
  let localVarUseFormData = false;
97
99
  let localVarRequestOptions = {
@@ -138,8 +140,9 @@ class PayrollUkApi {
138
140
  * @summary Creates a new employee benefit
139
141
  * @param xeroTenantId Xero identifier for Tenant
140
142
  * @param benefit
143
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
141
144
  */
142
- createBenefit(xeroTenantId, benefit, options = { headers: {} }) {
145
+ createBenefit(xeroTenantId, benefit, idempotencyKey, options = { headers: {} }) {
143
146
  return __awaiter(this, void 0, void 0, function* () {
144
147
  const localVarPath = this.basePath + '/Benefits';
145
148
  let localVarQueryParameters = {};
@@ -154,6 +157,7 @@ class PayrollUkApi {
154
157
  throw new Error('Required parameter benefit was null or undefined when calling createBenefit.');
155
158
  }
156
159
  localVarHeaderParams['Xero-Tenant-Id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
160
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
157
161
  Object.assign(localVarHeaderParams, options.headers);
158
162
  let localVarUseFormData = false;
159
163
  let localVarRequestOptions = {
@@ -201,8 +205,9 @@ class PayrollUkApi {
201
205
  * @summary Creates a new deduction
202
206
  * @param xeroTenantId Xero identifier for Tenant
203
207
  * @param deduction
208
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
204
209
  */
205
- createDeduction(xeroTenantId, deduction, options = { headers: {} }) {
210
+ createDeduction(xeroTenantId, deduction, idempotencyKey, options = { headers: {} }) {
206
211
  return __awaiter(this, void 0, void 0, function* () {
207
212
  const localVarPath = this.basePath + '/Deductions';
208
213
  let localVarQueryParameters = {};
@@ -217,6 +222,7 @@ class PayrollUkApi {
217
222
  throw new Error('Required parameter deduction was null or undefined when calling createDeduction.');
218
223
  }
219
224
  localVarHeaderParams['Xero-Tenant-Id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
225
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
220
226
  Object.assign(localVarHeaderParams, options.headers);
221
227
  let localVarUseFormData = false;
222
228
  let localVarRequestOptions = {
@@ -264,8 +270,9 @@ class PayrollUkApi {
264
270
  * @summary Creates a new earnings rate
265
271
  * @param xeroTenantId Xero identifier for Tenant
266
272
  * @param earningsRate
273
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
267
274
  */
268
- createEarningsRate(xeroTenantId, earningsRate, options = { headers: {} }) {
275
+ createEarningsRate(xeroTenantId, earningsRate, idempotencyKey, options = { headers: {} }) {
269
276
  return __awaiter(this, void 0, void 0, function* () {
270
277
  const localVarPath = this.basePath + '/EarningsRates';
271
278
  let localVarQueryParameters = {};
@@ -280,6 +287,7 @@ class PayrollUkApi {
280
287
  throw new Error('Required parameter earningsRate was null or undefined when calling createEarningsRate.');
281
288
  }
282
289
  localVarHeaderParams['Xero-Tenant-Id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
290
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
283
291
  Object.assign(localVarHeaderParams, options.headers);
284
292
  let localVarUseFormData = false;
285
293
  let localVarRequestOptions = {
@@ -327,8 +335,9 @@ class PayrollUkApi {
327
335
  * @summary Creates employees
328
336
  * @param xeroTenantId Xero identifier for Tenant
329
337
  * @param employee
338
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
330
339
  */
331
- createEmployee(xeroTenantId, employee, options = { headers: {} }) {
340
+ createEmployee(xeroTenantId, employee, idempotencyKey, options = { headers: {} }) {
332
341
  return __awaiter(this, void 0, void 0, function* () {
333
342
  const localVarPath = this.basePath + '/Employees';
334
343
  let localVarQueryParameters = {};
@@ -343,6 +352,7 @@ class PayrollUkApi {
343
352
  throw new Error('Required parameter employee was null or undefined when calling createEmployee.');
344
353
  }
345
354
  localVarHeaderParams['Xero-Tenant-Id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
355
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
346
356
  Object.assign(localVarHeaderParams, options.headers);
347
357
  let localVarUseFormData = false;
348
358
  let localVarRequestOptions = {
@@ -391,8 +401,9 @@ class PayrollUkApi {
391
401
  * @param xeroTenantId Xero identifier for Tenant
392
402
  * @param employeeID Employee id for single object
393
403
  * @param earningsTemplate
404
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
394
405
  */
395
- createEmployeeEarningsTemplate(xeroTenantId, employeeID, earningsTemplate, options = { headers: {} }) {
406
+ createEmployeeEarningsTemplate(xeroTenantId, employeeID, earningsTemplate, idempotencyKey, options = { headers: {} }) {
396
407
  return __awaiter(this, void 0, void 0, function* () {
397
408
  const localVarPath = this.basePath + '/Employees/{EmployeeID}/PayTemplates/earnings'
398
409
  .replace('{' + 'EmployeeID' + '}', encodeURIComponent(String(employeeID)));
@@ -412,6 +423,7 @@ class PayrollUkApi {
412
423
  throw new Error('Required parameter earningsTemplate was null or undefined when calling createEmployeeEarningsTemplate.');
413
424
  }
414
425
  localVarHeaderParams['Xero-Tenant-Id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
426
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
415
427
  Object.assign(localVarHeaderParams, options.headers);
416
428
  let localVarUseFormData = false;
417
429
  let localVarRequestOptions = {
@@ -460,8 +472,9 @@ class PayrollUkApi {
460
472
  * @param xeroTenantId Xero identifier for Tenant
461
473
  * @param employeeID Employee id for single object
462
474
  * @param employeeLeave
475
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
463
476
  */
464
- createEmployeeLeave(xeroTenantId, employeeID, employeeLeave, options = { headers: {} }) {
477
+ createEmployeeLeave(xeroTenantId, employeeID, employeeLeave, idempotencyKey, options = { headers: {} }) {
465
478
  return __awaiter(this, void 0, void 0, function* () {
466
479
  const localVarPath = this.basePath + '/Employees/{EmployeeID}/Leave'
467
480
  .replace('{' + 'EmployeeID' + '}', encodeURIComponent(String(employeeID)));
@@ -481,6 +494,7 @@ class PayrollUkApi {
481
494
  throw new Error('Required parameter employeeLeave was null or undefined when calling createEmployeeLeave.');
482
495
  }
483
496
  localVarHeaderParams['Xero-Tenant-Id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
497
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
484
498
  Object.assign(localVarHeaderParams, options.headers);
485
499
  let localVarUseFormData = false;
486
500
  let localVarRequestOptions = {
@@ -529,8 +543,9 @@ class PayrollUkApi {
529
543
  * @param xeroTenantId Xero identifier for Tenant
530
544
  * @param employeeID Employee id for single object
531
545
  * @param employeeLeaveType
546
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
532
547
  */
533
- createEmployeeLeaveType(xeroTenantId, employeeID, employeeLeaveType, options = { headers: {} }) {
548
+ createEmployeeLeaveType(xeroTenantId, employeeID, employeeLeaveType, idempotencyKey, options = { headers: {} }) {
534
549
  return __awaiter(this, void 0, void 0, function* () {
535
550
  const localVarPath = this.basePath + '/Employees/{EmployeeID}/LeaveTypes'
536
551
  .replace('{' + 'EmployeeID' + '}', encodeURIComponent(String(employeeID)));
@@ -550,6 +565,7 @@ class PayrollUkApi {
550
565
  throw new Error('Required parameter employeeLeaveType was null or undefined when calling createEmployeeLeaveType.');
551
566
  }
552
567
  localVarHeaderParams['Xero-Tenant-Id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
568
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
553
569
  Object.assign(localVarHeaderParams, options.headers);
554
570
  let localVarUseFormData = false;
555
571
  let localVarRequestOptions = {
@@ -598,8 +614,9 @@ class PayrollUkApi {
598
614
  * @param xeroTenantId Xero identifier for Tenant
599
615
  * @param employeeID Employee id for single object
600
616
  * @param employeeOpeningBalances
617
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
601
618
  */
602
- createEmployeeOpeningBalances(xeroTenantId, employeeID, employeeOpeningBalances, options = { headers: {} }) {
619
+ createEmployeeOpeningBalances(xeroTenantId, employeeID, employeeOpeningBalances, idempotencyKey, options = { headers: {} }) {
603
620
  return __awaiter(this, void 0, void 0, function* () {
604
621
  const localVarPath = this.basePath + '/Employees/{EmployeeID}/ukopeningbalances'
605
622
  .replace('{' + 'EmployeeID' + '}', encodeURIComponent(String(employeeID)));
@@ -619,6 +636,7 @@ class PayrollUkApi {
619
636
  throw new Error('Required parameter employeeOpeningBalances was null or undefined when calling createEmployeeOpeningBalances.');
620
637
  }
621
638
  localVarHeaderParams['Xero-Tenant-Id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
639
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
622
640
  Object.assign(localVarHeaderParams, options.headers);
623
641
  let localVarUseFormData = false;
624
642
  let localVarRequestOptions = {
@@ -667,8 +685,9 @@ class PayrollUkApi {
667
685
  * @param xeroTenantId Xero identifier for Tenant
668
686
  * @param employeeID Employee id for single object
669
687
  * @param paymentMethod
688
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
670
689
  */
671
- createEmployeePaymentMethod(xeroTenantId, employeeID, paymentMethod, options = { headers: {} }) {
690
+ createEmployeePaymentMethod(xeroTenantId, employeeID, paymentMethod, idempotencyKey, options = { headers: {} }) {
672
691
  return __awaiter(this, void 0, void 0, function* () {
673
692
  const localVarPath = this.basePath + '/Employees/{EmployeeID}/PaymentMethods'
674
693
  .replace('{' + 'EmployeeID' + '}', encodeURIComponent(String(employeeID)));
@@ -688,6 +707,7 @@ class PayrollUkApi {
688
707
  throw new Error('Required parameter paymentMethod was null or undefined when calling createEmployeePaymentMethod.');
689
708
  }
690
709
  localVarHeaderParams['Xero-Tenant-Id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
710
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
691
711
  Object.assign(localVarHeaderParams, options.headers);
692
712
  let localVarUseFormData = false;
693
713
  let localVarRequestOptions = {
@@ -736,8 +756,9 @@ class PayrollUkApi {
736
756
  * @param xeroTenantId Xero identifier for Tenant
737
757
  * @param employeeID Employee id for single object
738
758
  * @param salaryAndWage
759
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
739
760
  */
740
- createEmployeeSalaryAndWage(xeroTenantId, employeeID, salaryAndWage, options = { headers: {} }) {
761
+ createEmployeeSalaryAndWage(xeroTenantId, employeeID, salaryAndWage, idempotencyKey, options = { headers: {} }) {
741
762
  return __awaiter(this, void 0, void 0, function* () {
742
763
  const localVarPath = this.basePath + '/Employees/{EmployeeID}/SalaryAndWages'
743
764
  .replace('{' + 'EmployeeID' + '}', encodeURIComponent(String(employeeID)));
@@ -757,6 +778,7 @@ class PayrollUkApi {
757
778
  throw new Error('Required parameter salaryAndWage was null or undefined when calling createEmployeeSalaryAndWage.');
758
779
  }
759
780
  localVarHeaderParams['Xero-Tenant-Id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
781
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
760
782
  Object.assign(localVarHeaderParams, options.headers);
761
783
  let localVarUseFormData = false;
762
784
  let localVarRequestOptions = {
@@ -804,8 +826,9 @@ class PayrollUkApi {
804
826
  * @summary Creates statutory sick leave records
805
827
  * @param xeroTenantId Xero identifier for Tenant
806
828
  * @param employeeStatutorySickLeave
829
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
807
830
  */
808
- createEmployeeStatutorySickLeave(xeroTenantId, employeeStatutorySickLeave, options = { headers: {} }) {
831
+ createEmployeeStatutorySickLeave(xeroTenantId, employeeStatutorySickLeave, idempotencyKey, options = { headers: {} }) {
809
832
  return __awaiter(this, void 0, void 0, function* () {
810
833
  const localVarPath = this.basePath + '/StatutoryLeaves/Sick';
811
834
  let localVarQueryParameters = {};
@@ -820,6 +843,7 @@ class PayrollUkApi {
820
843
  throw new Error('Required parameter employeeStatutorySickLeave was null or undefined when calling createEmployeeStatutorySickLeave.');
821
844
  }
822
845
  localVarHeaderParams['Xero-Tenant-Id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
846
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
823
847
  Object.assign(localVarHeaderParams, options.headers);
824
848
  let localVarUseFormData = false;
825
849
  let localVarRequestOptions = {
@@ -868,8 +892,9 @@ class PayrollUkApi {
868
892
  * @param xeroTenantId Xero identifier for Tenant
869
893
  * @param employeeID Employee id for single object
870
894
  * @param employment
895
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
871
896
  */
872
- createEmployment(xeroTenantId, employeeID, employment, options = { headers: {} }) {
897
+ createEmployment(xeroTenantId, employeeID, employment, idempotencyKey, options = { headers: {} }) {
873
898
  return __awaiter(this, void 0, void 0, function* () {
874
899
  const localVarPath = this.basePath + '/Employees/{EmployeeID}/Employment'
875
900
  .replace('{' + 'EmployeeID' + '}', encodeURIComponent(String(employeeID)));
@@ -889,6 +914,7 @@ class PayrollUkApi {
889
914
  throw new Error('Required parameter employment was null or undefined when calling createEmployment.');
890
915
  }
891
916
  localVarHeaderParams['Xero-Tenant-Id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
917
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
892
918
  Object.assign(localVarHeaderParams, options.headers);
893
919
  let localVarUseFormData = false;
894
920
  let localVarRequestOptions = {
@@ -936,8 +962,9 @@ class PayrollUkApi {
936
962
  * @summary Creates a new leave type
937
963
  * @param xeroTenantId Xero identifier for Tenant
938
964
  * @param leaveType
965
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
939
966
  */
940
- createLeaveType(xeroTenantId, leaveType, options = { headers: {} }) {
967
+ createLeaveType(xeroTenantId, leaveType, idempotencyKey, options = { headers: {} }) {
941
968
  return __awaiter(this, void 0, void 0, function* () {
942
969
  const localVarPath = this.basePath + '/LeaveTypes';
943
970
  let localVarQueryParameters = {};
@@ -952,6 +979,7 @@ class PayrollUkApi {
952
979
  throw new Error('Required parameter leaveType was null or undefined when calling createLeaveType.');
953
980
  }
954
981
  localVarHeaderParams['Xero-Tenant-Id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
982
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
955
983
  Object.assign(localVarHeaderParams, options.headers);
956
984
  let localVarUseFormData = false;
957
985
  let localVarRequestOptions = {
@@ -1000,8 +1028,9 @@ class PayrollUkApi {
1000
1028
  * @param xeroTenantId Xero identifier for Tenant
1001
1029
  * @param employeeID Employee id for single object
1002
1030
  * @param earningsTemplate
1031
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
1003
1032
  */
1004
- createMultipleEmployeeEarningsTemplate(xeroTenantId, employeeID, earningsTemplate, options = { headers: {} }) {
1033
+ createMultipleEmployeeEarningsTemplate(xeroTenantId, employeeID, earningsTemplate, idempotencyKey, options = { headers: {} }) {
1005
1034
  return __awaiter(this, void 0, void 0, function* () {
1006
1035
  const localVarPath = this.basePath + '/Employees/{EmployeeID}/paytemplateearnings'
1007
1036
  .replace('{' + 'EmployeeID' + '}', encodeURIComponent(String(employeeID)));
@@ -1021,6 +1050,7 @@ class PayrollUkApi {
1021
1050
  throw new Error('Required parameter earningsTemplate was null or undefined when calling createMultipleEmployeeEarningsTemplate.');
1022
1051
  }
1023
1052
  localVarHeaderParams['Xero-Tenant-Id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
1053
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
1024
1054
  Object.assign(localVarHeaderParams, options.headers);
1025
1055
  let localVarUseFormData = false;
1026
1056
  let localVarRequestOptions = {
@@ -1068,8 +1098,9 @@ class PayrollUkApi {
1068
1098
  * @summary Creates a new payrun calendar
1069
1099
  * @param xeroTenantId Xero identifier for Tenant
1070
1100
  * @param payRunCalendar
1101
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
1071
1102
  */
1072
- createPayRunCalendar(xeroTenantId, payRunCalendar, options = { headers: {} }) {
1103
+ createPayRunCalendar(xeroTenantId, payRunCalendar, idempotencyKey, options = { headers: {} }) {
1073
1104
  return __awaiter(this, void 0, void 0, function* () {
1074
1105
  const localVarPath = this.basePath + '/PayRunCalendars';
1075
1106
  let localVarQueryParameters = {};
@@ -1084,6 +1115,7 @@ class PayrollUkApi {
1084
1115
  throw new Error('Required parameter payRunCalendar was null or undefined when calling createPayRunCalendar.');
1085
1116
  }
1086
1117
  localVarHeaderParams['Xero-Tenant-Id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
1118
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
1087
1119
  Object.assign(localVarHeaderParams, options.headers);
1088
1120
  let localVarUseFormData = false;
1089
1121
  let localVarRequestOptions = {
@@ -1131,8 +1163,9 @@ class PayrollUkApi {
1131
1163
  * @summary Creates a new reimbursement
1132
1164
  * @param xeroTenantId Xero identifier for Tenant
1133
1165
  * @param reimbursement
1166
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
1134
1167
  */
1135
- createReimbursement(xeroTenantId, reimbursement, options = { headers: {} }) {
1168
+ createReimbursement(xeroTenantId, reimbursement, idempotencyKey, options = { headers: {} }) {
1136
1169
  return __awaiter(this, void 0, void 0, function* () {
1137
1170
  const localVarPath = this.basePath + '/Reimbursements';
1138
1171
  let localVarQueryParameters = {};
@@ -1147,6 +1180,7 @@ class PayrollUkApi {
1147
1180
  throw new Error('Required parameter reimbursement was null or undefined when calling createReimbursement.');
1148
1181
  }
1149
1182
  localVarHeaderParams['Xero-Tenant-Id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
1183
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
1150
1184
  Object.assign(localVarHeaderParams, options.headers);
1151
1185
  let localVarUseFormData = false;
1152
1186
  let localVarRequestOptions = {
@@ -1194,8 +1228,9 @@ class PayrollUkApi {
1194
1228
  * @summary Creates a new timesheet
1195
1229
  * @param xeroTenantId Xero identifier for Tenant
1196
1230
  * @param timesheet
1231
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
1197
1232
  */
1198
- createTimesheet(xeroTenantId, timesheet, options = { headers: {} }) {
1233
+ createTimesheet(xeroTenantId, timesheet, idempotencyKey, options = { headers: {} }) {
1199
1234
  return __awaiter(this, void 0, void 0, function* () {
1200
1235
  const localVarPath = this.basePath + '/Timesheets';
1201
1236
  let localVarQueryParameters = {};
@@ -1210,6 +1245,7 @@ class PayrollUkApi {
1210
1245
  throw new Error('Required parameter timesheet was null or undefined when calling createTimesheet.');
1211
1246
  }
1212
1247
  localVarHeaderParams['Xero-Tenant-Id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
1248
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
1213
1249
  Object.assign(localVarHeaderParams, options.headers);
1214
1250
  let localVarUseFormData = false;
1215
1251
  let localVarRequestOptions = {
@@ -1258,8 +1294,9 @@ class PayrollUkApi {
1258
1294
  * @param xeroTenantId Xero identifier for Tenant
1259
1295
  * @param timesheetID Identifier for the timesheet
1260
1296
  * @param timesheetLine
1297
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
1261
1298
  */
1262
- createTimesheetLine(xeroTenantId, timesheetID, timesheetLine, options = { headers: {} }) {
1299
+ createTimesheetLine(xeroTenantId, timesheetID, timesheetLine, idempotencyKey, options = { headers: {} }) {
1263
1300
  return __awaiter(this, void 0, void 0, function* () {
1264
1301
  const localVarPath = this.basePath + '/Timesheets/{TimesheetID}/Lines'
1265
1302
  .replace('{' + 'TimesheetID' + '}', encodeURIComponent(String(timesheetID)));
@@ -1279,6 +1316,7 @@ class PayrollUkApi {
1279
1316
  throw new Error('Required parameter timesheetLine was null or undefined when calling createTimesheetLine.');
1280
1317
  }
1281
1318
  localVarHeaderParams['Xero-Tenant-Id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
1319
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
1282
1320
  Object.assign(localVarHeaderParams, options.headers);
1283
1321
  let localVarUseFormData = false;
1284
1322
  let localVarRequestOptions = {
@@ -4097,8 +4135,9 @@ class PayrollUkApi {
4097
4135
  * @summary Reverts a specific timesheet to draft
4098
4136
  * @param xeroTenantId Xero identifier for Tenant
4099
4137
  * @param timesheetID Identifier for the timesheet
4138
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
4100
4139
  */
4101
- revertTimesheet(xeroTenantId, timesheetID, options = { headers: {} }) {
4140
+ revertTimesheet(xeroTenantId, timesheetID, idempotencyKey, options = { headers: {} }) {
4102
4141
  return __awaiter(this, void 0, void 0, function* () {
4103
4142
  const localVarPath = this.basePath + '/Timesheets/{TimesheetID}/RevertToDraft'
4104
4143
  .replace('{' + 'TimesheetID' + '}', encodeURIComponent(String(timesheetID)));
@@ -4114,6 +4153,7 @@ class PayrollUkApi {
4114
4153
  throw new Error('Required parameter timesheetID was null or undefined when calling revertTimesheet.');
4115
4154
  }
4116
4155
  localVarHeaderParams['Xero-Tenant-Id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
4156
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
4117
4157
  Object.assign(localVarHeaderParams, options.headers);
4118
4158
  let localVarUseFormData = false;
4119
4159
  let localVarRequestOptions = {
@@ -4161,8 +4201,9 @@ class PayrollUkApi {
4161
4201
  * @param xeroTenantId Xero identifier for Tenant
4162
4202
  * @param employeeID Employee id for single object
4163
4203
  * @param employee
4204
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
4164
4205
  */
4165
- updateEmployee(xeroTenantId, employeeID, employee, options = { headers: {} }) {
4206
+ updateEmployee(xeroTenantId, employeeID, employee, idempotencyKey, options = { headers: {} }) {
4166
4207
  return __awaiter(this, void 0, void 0, function* () {
4167
4208
  const localVarPath = this.basePath + '/Employees/{EmployeeID}'
4168
4209
  .replace('{' + 'EmployeeID' + '}', encodeURIComponent(String(employeeID)));
@@ -4182,6 +4223,7 @@ class PayrollUkApi {
4182
4223
  throw new Error('Required parameter employee was null or undefined when calling updateEmployee.');
4183
4224
  }
4184
4225
  localVarHeaderParams['Xero-Tenant-Id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
4226
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
4185
4227
  Object.assign(localVarHeaderParams, options.headers);
4186
4228
  let localVarUseFormData = false;
4187
4229
  let localVarRequestOptions = {
@@ -4231,8 +4273,9 @@ class PayrollUkApi {
4231
4273
  * @param employeeID Employee id for single object
4232
4274
  * @param payTemplateEarningID Id for single pay template earnings object
4233
4275
  * @param earningsTemplate
4276
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
4234
4277
  */
4235
- updateEmployeeEarningsTemplate(xeroTenantId, employeeID, payTemplateEarningID, earningsTemplate, options = { headers: {} }) {
4278
+ updateEmployeeEarningsTemplate(xeroTenantId, employeeID, payTemplateEarningID, earningsTemplate, idempotencyKey, options = { headers: {} }) {
4236
4279
  return __awaiter(this, void 0, void 0, function* () {
4237
4280
  const localVarPath = this.basePath + '/Employees/{EmployeeID}/PayTemplates/earnings/{PayTemplateEarningID}'
4238
4281
  .replace('{' + 'EmployeeID' + '}', encodeURIComponent(String(employeeID)))
@@ -4257,6 +4300,7 @@ class PayrollUkApi {
4257
4300
  throw new Error('Required parameter earningsTemplate was null or undefined when calling updateEmployeeEarningsTemplate.');
4258
4301
  }
4259
4302
  localVarHeaderParams['Xero-Tenant-Id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
4303
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
4260
4304
  Object.assign(localVarHeaderParams, options.headers);
4261
4305
  let localVarUseFormData = false;
4262
4306
  let localVarRequestOptions = {
@@ -4306,8 +4350,9 @@ class PayrollUkApi {
4306
4350
  * @param employeeID Employee id for single object
4307
4351
  * @param leaveID Leave id for single object
4308
4352
  * @param employeeLeave
4353
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
4309
4354
  */
4310
- updateEmployeeLeave(xeroTenantId, employeeID, leaveID, employeeLeave, options = { headers: {} }) {
4355
+ updateEmployeeLeave(xeroTenantId, employeeID, leaveID, employeeLeave, idempotencyKey, options = { headers: {} }) {
4311
4356
  return __awaiter(this, void 0, void 0, function* () {
4312
4357
  const localVarPath = this.basePath + '/Employees/{EmployeeID}/Leave/{LeaveID}'
4313
4358
  .replace('{' + 'EmployeeID' + '}', encodeURIComponent(String(employeeID)))
@@ -4332,6 +4377,7 @@ class PayrollUkApi {
4332
4377
  throw new Error('Required parameter employeeLeave was null or undefined when calling updateEmployeeLeave.');
4333
4378
  }
4334
4379
  localVarHeaderParams['Xero-Tenant-Id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
4380
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
4335
4381
  Object.assign(localVarHeaderParams, options.headers);
4336
4382
  let localVarUseFormData = false;
4337
4383
  let localVarRequestOptions = {
@@ -4380,8 +4426,9 @@ class PayrollUkApi {
4380
4426
  * @param xeroTenantId Xero identifier for Tenant
4381
4427
  * @param employeeID Employee id for single object
4382
4428
  * @param employeeOpeningBalances
4429
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
4383
4430
  */
4384
- updateEmployeeOpeningBalances(xeroTenantId, employeeID, employeeOpeningBalances, options = { headers: {} }) {
4431
+ updateEmployeeOpeningBalances(xeroTenantId, employeeID, employeeOpeningBalances, idempotencyKey, options = { headers: {} }) {
4385
4432
  return __awaiter(this, void 0, void 0, function* () {
4386
4433
  const localVarPath = this.basePath + '/Employees/{EmployeeID}/ukopeningbalances'
4387
4434
  .replace('{' + 'EmployeeID' + '}', encodeURIComponent(String(employeeID)));
@@ -4401,6 +4448,7 @@ class PayrollUkApi {
4401
4448
  throw new Error('Required parameter employeeOpeningBalances was null or undefined when calling updateEmployeeOpeningBalances.');
4402
4449
  }
4403
4450
  localVarHeaderParams['Xero-Tenant-Id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
4451
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
4404
4452
  Object.assign(localVarHeaderParams, options.headers);
4405
4453
  let localVarUseFormData = false;
4406
4454
  let localVarRequestOptions = {
@@ -4450,8 +4498,9 @@ class PayrollUkApi {
4450
4498
  * @param employeeID Employee id for single object
4451
4499
  * @param salaryAndWagesID Id for single pay template earnings object
4452
4500
  * @param salaryAndWage
4501
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
4453
4502
  */
4454
- updateEmployeeSalaryAndWage(xeroTenantId, employeeID, salaryAndWagesID, salaryAndWage, options = { headers: {} }) {
4503
+ updateEmployeeSalaryAndWage(xeroTenantId, employeeID, salaryAndWagesID, salaryAndWage, idempotencyKey, options = { headers: {} }) {
4455
4504
  return __awaiter(this, void 0, void 0, function* () {
4456
4505
  const localVarPath = this.basePath + '/Employees/{EmployeeID}/SalaryAndWages/{SalaryAndWagesID}'
4457
4506
  .replace('{' + 'EmployeeID' + '}', encodeURIComponent(String(employeeID)))
@@ -4476,6 +4525,7 @@ class PayrollUkApi {
4476
4525
  throw new Error('Required parameter salaryAndWage was null or undefined when calling updateEmployeeSalaryAndWage.');
4477
4526
  }
4478
4527
  localVarHeaderParams['Xero-Tenant-Id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
4528
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
4479
4529
  Object.assign(localVarHeaderParams, options.headers);
4480
4530
  let localVarUseFormData = false;
4481
4531
  let localVarRequestOptions = {
@@ -4524,8 +4574,9 @@ class PayrollUkApi {
4524
4574
  * @param xeroTenantId Xero identifier for Tenant
4525
4575
  * @param payRunID Identifier for the pay run
4526
4576
  * @param payRun
4577
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
4527
4578
  */
4528
- updatePayRun(xeroTenantId, payRunID, payRun, options = { headers: {} }) {
4579
+ updatePayRun(xeroTenantId, payRunID, payRun, idempotencyKey, options = { headers: {} }) {
4529
4580
  return __awaiter(this, void 0, void 0, function* () {
4530
4581
  const localVarPath = this.basePath + '/PayRuns/{PayRunID}'
4531
4582
  .replace('{' + 'PayRunID' + '}', encodeURIComponent(String(payRunID)));
@@ -4545,6 +4596,7 @@ class PayrollUkApi {
4545
4596
  throw new Error('Required parameter payRun was null or undefined when calling updatePayRun.');
4546
4597
  }
4547
4598
  localVarHeaderParams['Xero-Tenant-Id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
4599
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
4548
4600
  Object.assign(localVarHeaderParams, options.headers);
4549
4601
  let localVarUseFormData = false;
4550
4602
  let localVarRequestOptions = {
@@ -4594,8 +4646,9 @@ class PayrollUkApi {
4594
4646
  * @param timesheetID Identifier for the timesheet
4595
4647
  * @param timesheetLineID Identifier for the timesheet line
4596
4648
  * @param timesheetLine
4649
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
4597
4650
  */
4598
- updateTimesheetLine(xeroTenantId, timesheetID, timesheetLineID, timesheetLine, options = { headers: {} }) {
4651
+ updateTimesheetLine(xeroTenantId, timesheetID, timesheetLineID, timesheetLine, idempotencyKey, options = { headers: {} }) {
4599
4652
  return __awaiter(this, void 0, void 0, function* () {
4600
4653
  const localVarPath = this.basePath + '/Timesheets/{TimesheetID}/Lines/{TimesheetLineID}'
4601
4654
  .replace('{' + 'TimesheetID' + '}', encodeURIComponent(String(timesheetID)))
@@ -4620,6 +4673,7 @@ class PayrollUkApi {
4620
4673
  throw new Error('Required parameter timesheetLine was null or undefined when calling updateTimesheetLine.');
4621
4674
  }
4622
4675
  localVarHeaderParams['Xero-Tenant-Id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
4676
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
4623
4677
  Object.assign(localVarHeaderParams, options.headers);
4624
4678
  let localVarUseFormData = false;
4625
4679
  let localVarRequestOptions = {