@apideck/unify 0.27.0 → 0.28.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 (192) hide show
  1. package/README.md +5 -5
  2. package/docs/sdks/categories/README.md +12 -0
  3. package/docs/sdks/companies/README.md +4 -4
  4. package/examples/README.md +26 -0
  5. package/examples/accountingTaxRatesList.example.ts +41 -0
  6. package/examples/package-lock.json +613 -0
  7. package/examples/package.json +18 -0
  8. package/funcs/accountingCategoriesGet.d.ts.map +1 -1
  9. package/funcs/accountingCategoriesGet.js +4 -2
  10. package/funcs/accountingCategoriesGet.js.map +1 -1
  11. package/funcs/accountingCategoriesList.d.ts.map +1 -1
  12. package/funcs/accountingCategoriesList.js +4 -2
  13. package/funcs/accountingCategoriesList.js.map +1 -1
  14. package/funcs/crmCompaniesCreate.js +1 -1
  15. package/funcs/crmCompaniesCreate.js.map +1 -1
  16. package/funcs/crmCompaniesUpdate.js +1 -1
  17. package/funcs/crmCompaniesUpdate.js.map +1 -1
  18. package/jsr.json +1 -1
  19. package/lib/config.d.ts +4 -4
  20. package/lib/config.js +4 -4
  21. package/models/components/balancesheetfilter.d.ts +5 -0
  22. package/models/components/balancesheetfilter.d.ts.map +1 -1
  23. package/models/components/balancesheetfilter.js +4 -0
  24. package/models/components/balancesheetfilter.js.map +1 -1
  25. package/models/components/bankaccount.d.ts +5 -0
  26. package/models/components/bankaccount.d.ts.map +1 -1
  27. package/models/components/bankaccount.js +2 -0
  28. package/models/components/bankaccount.js.map +1 -1
  29. package/models/components/bankaccount1.d.ts +123 -0
  30. package/models/components/bankaccount1.d.ts.map +1 -0
  31. package/models/components/bankaccount1.js +128 -0
  32. package/models/components/bankaccount1.js.map +1 -0
  33. package/models/components/categoriesfilter.d.ts +67 -0
  34. package/models/components/categoriesfilter.d.ts.map +1 -0
  35. package/models/components/categoriesfilter.js +82 -0
  36. package/models/components/categoriesfilter.js.map +1 -0
  37. package/models/components/category.d.ts +39 -0
  38. package/models/components/category.d.ts.map +1 -1
  39. package/models/components/category.js +26 -1
  40. package/models/components/category.js.map +1 -1
  41. package/models/components/{company.d.ts → company1.d.ts} +32 -32
  42. package/models/components/company1.d.ts.map +1 -0
  43. package/models/components/{company.js → company1.js} +37 -37
  44. package/models/components/company1.js.map +1 -0
  45. package/models/components/companyinfo.d.ts +5 -0
  46. package/models/components/companyinfo.d.ts.map +1 -1
  47. package/models/components/companyinfo.js +4 -0
  48. package/models/components/companyinfo.js.map +1 -1
  49. package/models/components/connection.d.ts +13 -13
  50. package/models/components/connection.d.ts.map +1 -1
  51. package/models/components/connection.js +16 -17
  52. package/models/components/connection.js.map +1 -1
  53. package/models/components/customfield.d.ts +37 -38
  54. package/models/components/customfield.d.ts.map +1 -1
  55. package/models/components/customfield.js +25 -54
  56. package/models/components/customfield.js.map +1 -1
  57. package/models/components/getcompaniesresponse.d.ts +3 -3
  58. package/models/components/getcompaniesresponse.d.ts.map +1 -1
  59. package/models/components/getcompaniesresponse.js +3 -3
  60. package/models/components/getcompaniesresponse.js.map +1 -1
  61. package/models/components/getcompanyresponse.d.ts +3 -3
  62. package/models/components/getcompanyresponse.d.ts.map +1 -1
  63. package/models/components/getcompanyresponse.js +3 -3
  64. package/models/components/getcompanyresponse.js.map +1 -1
  65. package/models/components/index.d.ts +3 -1
  66. package/models/components/index.d.ts.map +1 -1
  67. package/models/components/index.js +3 -1
  68. package/models/components/index.js.map +1 -1
  69. package/models/components/invoicelineitem.d.ts +10 -0
  70. package/models/components/invoicelineitem.d.ts.map +1 -1
  71. package/models/components/invoicelineitem.js +8 -0
  72. package/models/components/invoicelineitem.js.map +1 -1
  73. package/models/components/profitandlossfilter.d.ts +5 -0
  74. package/models/components/profitandlossfilter.d.ts.map +1 -1
  75. package/models/components/profitandlossfilter.js +4 -0
  76. package/models/components/profitandlossfilter.js.map +1 -1
  77. package/models/components/simpleformfieldoption.d.ts +13 -13
  78. package/models/components/simpleformfieldoption.d.ts.map +1 -1
  79. package/models/components/simpleformfieldoption.js +16 -16
  80. package/models/components/simpleformfieldoption.js.map +1 -1
  81. package/models/components/supplier.d.ts +10 -0
  82. package/models/components/supplier.d.ts.map +1 -1
  83. package/models/components/supplier.js +4 -0
  84. package/models/components/supplier.js.map +1 -1
  85. package/models/errors/apierror.d.ts.map +1 -1
  86. package/models/errors/apierror.js +8 -2
  87. package/models/errors/apierror.js.map +1 -1
  88. package/models/errors/badrequestresponse.js +1 -1
  89. package/models/errors/badrequestresponse.js.map +1 -1
  90. package/models/errors/notfoundresponse.js +1 -1
  91. package/models/errors/notfoundresponse.js.map +1 -1
  92. package/models/errors/paymentrequiredresponse.js +1 -1
  93. package/models/errors/paymentrequiredresponse.js.map +1 -1
  94. package/models/errors/unauthorizedresponse.js +1 -1
  95. package/models/errors/unauthorizedresponse.js.map +1 -1
  96. package/models/errors/unprocessableresponse.js +1 -1
  97. package/models/errors/unprocessableresponse.js.map +1 -1
  98. package/models/operations/accountingcategoriesall.d.ts +5 -0
  99. package/models/operations/accountingcategoriesall.d.ts.map +1 -1
  100. package/models/operations/accountingcategoriesall.js +2 -0
  101. package/models/operations/accountingcategoriesall.js.map +1 -1
  102. package/models/operations/accountingcategoriesone.d.ts +5 -0
  103. package/models/operations/accountingcategoriesone.d.ts.map +1 -1
  104. package/models/operations/accountingcategoriesone.js +2 -0
  105. package/models/operations/accountingcategoriesone.js.map +1 -1
  106. package/models/operations/crmcompaniesadd.d.ts +2 -2
  107. package/models/operations/crmcompaniesadd.d.ts.map +1 -1
  108. package/models/operations/crmcompaniesadd.js +4 -4
  109. package/models/operations/crmcompaniesadd.js.map +1 -1
  110. package/models/operations/crmcompaniesupdate.d.ts +2 -2
  111. package/models/operations/crmcompaniesupdate.d.ts.map +1 -1
  112. package/models/operations/crmcompaniesupdate.js +4 -4
  113. package/models/operations/crmcompaniesupdate.js.map +1 -1
  114. package/package.json +2 -2
  115. package/src/__tests__/activities.test.ts +364 -13
  116. package/src/__tests__/apideckcompanies.test.ts +373 -9
  117. package/src/__tests__/apideckdepartments.test.ts +181 -9
  118. package/src/__tests__/applicants.test.ts +473 -9
  119. package/src/__tests__/applications.test.ts +189 -9
  120. package/src/__tests__/bankfeedaccounts.test.ts +4 -4
  121. package/src/__tests__/billpayments.test.ts +378 -20
  122. package/src/__tests__/bills.test.ts +500 -9
  123. package/src/__tests__/collectionticketcomments.test.ts +183 -7
  124. package/src/__tests__/collectiontickets.test.ts +191 -7
  125. package/src/__tests__/companies.test.ts +607 -78
  126. package/src/__tests__/connections.test.ts +409 -5
  127. package/src/__tests__/connectionsettings.test.ts +410 -5
  128. package/src/__tests__/contacts.test.ts +470 -13
  129. package/src/__tests__/creditnotes.test.ts +819 -148
  130. package/src/__tests__/customers.test.ts +517 -13
  131. package/src/__tests__/customobjects.test.ts +150 -9
  132. package/src/__tests__/customobjectschemas.test.ts +321 -9
  133. package/src/__tests__/departments.test.ts +173 -9
  134. package/src/__tests__/drivegroups.test.ts +181 -9
  135. package/src/__tests__/drives.test.ts +179 -9
  136. package/src/__tests__/employees.test.ts +829 -94
  137. package/src/__tests__/expenses.test.ts +338 -15
  138. package/src/__tests__/files.test.ts +106 -5
  139. package/src/__tests__/folders.test.ts +296 -13
  140. package/src/__tests__/invoiceitems.test.ts +272 -9
  141. package/src/__tests__/invoices.test.ts +695 -89
  142. package/src/__tests__/journalentries.test.ts +490 -8
  143. package/src/__tests__/leads.test.ts +450 -13
  144. package/src/__tests__/ledgeraccounts.test.ts +248 -19
  145. package/src/__tests__/locations.test.ts +298 -9
  146. package/src/__tests__/messages.test.ts +195 -9
  147. package/src/__tests__/notes.test.ts +191 -9
  148. package/src/__tests__/opportunities.test.ts +218 -9
  149. package/src/__tests__/payments.test.ts +323 -20
  150. package/src/__tests__/pipelines.test.ts +194 -9
  151. package/src/__tests__/purchaseorders.test.ts +847 -178
  152. package/src/__tests__/sharedlinks.test.ts +183 -9
  153. package/src/__tests__/subsidiaries.test.ts +183 -9
  154. package/src/__tests__/suppliers.test.ts +509 -13
  155. package/src/__tests__/taxrates.test.ts +235 -12
  156. package/src/__tests__/timeoffrequests.test.ts +210 -9
  157. package/src/__tests__/trackingcategories.test.ts +187 -7
  158. package/src/__tests__/uploadsessions.test.ts +78 -5
  159. package/src/__tests__/users.test.ts +356 -9
  160. package/src/funcs/accountingCategoriesGet.ts +15 -5
  161. package/src/funcs/accountingCategoriesList.ts +17 -7
  162. package/src/funcs/crmCompaniesCreate.ts +1 -1
  163. package/src/funcs/crmCompaniesUpdate.ts +1 -1
  164. package/src/lib/config.ts +4 -4
  165. package/src/models/components/balancesheetfilter.ts +9 -0
  166. package/src/models/components/bankaccount.ts +7 -0
  167. package/src/models/components/bankaccount1.ts +207 -0
  168. package/src/models/components/categoriesfilter.ts +104 -0
  169. package/src/models/components/category.ts +39 -0
  170. package/src/models/components/{company.ts → company1.ts} +131 -128
  171. package/src/models/components/companyinfo.ts +9 -0
  172. package/src/models/components/connection.ts +27 -20
  173. package/src/models/components/customfield.ts +51 -83
  174. package/src/models/components/getcompaniesresponse.ts +9 -9
  175. package/src/models/components/getcompanyresponse.ts +9 -9
  176. package/src/models/components/index.ts +3 -1
  177. package/src/models/components/invoicelineitem.ts +18 -0
  178. package/src/models/components/profitandlossfilter.ts +9 -0
  179. package/src/models/components/simpleformfieldoption.ts +21 -18
  180. package/src/models/components/supplier.ts +14 -0
  181. package/src/models/errors/apierror.ts +8 -2
  182. package/src/models/errors/badrequestresponse.ts +1 -1
  183. package/src/models/errors/notfoundresponse.ts +1 -1
  184. package/src/models/errors/paymentrequiredresponse.ts +1 -1
  185. package/src/models/errors/unauthorizedresponse.ts +1 -1
  186. package/src/models/errors/unprocessableresponse.ts +1 -1
  187. package/src/models/operations/accountingcategoriesall.ts +7 -0
  188. package/src/models/operations/accountingcategoriesone.ts +7 -0
  189. package/src/models/operations/crmcompaniesadd.ts +6 -6
  190. package/src/models/operations/crmcompaniesupdate.ts +6 -6
  191. package/models/components/company.d.ts.map +0 -1
  192. package/models/components/company.js.map +0 -1
@@ -2,7 +2,7 @@
2
2
  * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
3
  */
4
4
 
5
- import { assert, expect, it, test } from "vitest";
5
+ import { expect, test } from "vitest";
6
6
  import { Apideck } from "../index.js";
7
7
  import { createTestHTTPClient } from "./testclient.js";
8
8
 
@@ -275,9 +275,9 @@ test("Taxrates Accounting Tax Rates All", async () => {
275
275
  id: "2389328923893298",
276
276
  name: "employee_level",
277
277
  description: "Employee Level",
278
- value: [
279
- {},
280
- ],
278
+ value: {
279
+ "0": {},
280
+ },
281
281
  },
282
282
  {
283
283
  id: "2389328923893298",
@@ -306,10 +306,109 @@ test("Taxrates Accounting Tax Rates All", async () => {
306
306
  });
307
307
  });
308
308
 
309
- it.skip("Taxrates Accounting Tax Rates Add", async () => {
310
- assert.fail(
311
- "incomplete test found please make sure to address the following errors: [`workflow step accounting.taxRatesAdd.test referencing operation accounting.taxRatesAdd with expression in requestBody with type not currently supported`, `workflow step accounting.taxRatesAdd.test referencing operation accounting.taxRatesAdd with expression in requestBody with type not currently supported`, `workflow step accounting.taxRatesAdd.test referencing operation accounting.taxRatesAdd with expression in requestBody with type not currently supported`]",
312
- );
309
+ test("Taxrates Accounting Tax Rates Add", async () => {
310
+ const testHttpClient = createTestHTTPClient("accounting.taxRatesAdd");
311
+
312
+ const apideck = new Apideck({
313
+ serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
314
+ httpClient: testHttpClient,
315
+ apiKey: process.env["APIDECK_API_KEY"] ?? "value",
316
+ });
317
+
318
+ const result = await apideck.accounting.taxRates.create({
319
+ consumerId: "test-consumer",
320
+ appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
321
+ serviceId: "salesforce",
322
+ taxRate: {
323
+ id: "1234",
324
+ name: "GST on Purchases",
325
+ code: "ABN",
326
+ description: "Reduced rate GST Purchases",
327
+ effectiveTaxRate: 10,
328
+ totalTaxRate: 10,
329
+ taxPayableAccountId: "123456",
330
+ taxRemittedAccountId: "123456",
331
+ components: [
332
+ {
333
+ id: "10",
334
+ name: "GST",
335
+ rate: 10,
336
+ compound: true,
337
+ },
338
+ {
339
+ id: "10",
340
+ name: "GST",
341
+ rate: 10,
342
+ compound: true,
343
+ },
344
+ ],
345
+ type: "NONE",
346
+ reportTaxType: "NONE",
347
+ originalTaxRateId: "12345",
348
+ status: "active",
349
+ rowVersion: "1-12345",
350
+ passThrough: [
351
+ {
352
+ serviceId: "<id>",
353
+ extendPaths: [
354
+ {
355
+ path: "$.nested.property",
356
+ value: {
357
+ "TaxClassificationRef": {
358
+ "value": "EUC-99990201-V1-00020000",
359
+ },
360
+ },
361
+ },
362
+ {
363
+ path: "$.nested.property",
364
+ value: {
365
+ "TaxClassificationRef": {
366
+ "value": "EUC-99990201-V1-00020000",
367
+ },
368
+ },
369
+ },
370
+ ],
371
+ },
372
+ {
373
+ serviceId: "<id>",
374
+ extendPaths: [
375
+ {
376
+ path: "$.nested.property",
377
+ value: {
378
+ "TaxClassificationRef": {
379
+ "value": "EUC-99990201-V1-00020000",
380
+ },
381
+ },
382
+ },
383
+ ],
384
+ },
385
+ ],
386
+ customFields: [
387
+ {
388
+ id: "2389328923893298",
389
+ name: "employee_level",
390
+ description: "Employee Level",
391
+ value: {
392
+ "0": "<value>",
393
+ "1": "<value>",
394
+ "2": "<value>",
395
+ },
396
+ },
397
+ ],
398
+ },
399
+ });
400
+ expect(result.httpMeta.response.status).toBe(201);
401
+ expect(result.createTaxRateResponse).toBeDefined();
402
+ expect(result.createTaxRateResponse).toEqual({
403
+ statusCode: 200,
404
+ status: "OK",
405
+ service: "xero",
406
+ resource: "tax-rates",
407
+ operation: "add",
408
+ data: {
409
+ id: "12345",
410
+ },
411
+ });
313
412
  });
314
413
 
315
414
  test("Taxrates Accounting Tax Rates One", async () => {
@@ -442,10 +541,134 @@ test("Taxrates Accounting Tax Rates One", async () => {
442
541
  });
443
542
  });
444
543
 
445
- it.skip("Taxrates Accounting Tax Rates Update", async () => {
446
- assert.fail(
447
- "incomplete test found please make sure to address the following errors: [`workflow step accounting.taxRatesUpdate.test referencing operation accounting.taxRatesUpdate with expression in requestBody with type not currently supported`, `workflow step accounting.taxRatesUpdate.test referencing operation accounting.taxRatesUpdate with expression in requestBody with type not currently supported`, `workflow step accounting.taxRatesUpdate.test referencing operation accounting.taxRatesUpdate with expression in requestBody with type not currently supported`, `workflow step accounting.taxRatesUpdate.test referencing operation accounting.taxRatesUpdate with expression in requestBody with type not currently supported`, `workflow step accounting.taxRatesUpdate.test referencing operation accounting.taxRatesUpdate with expression in requestBody with type not currently supported`]",
448
- );
544
+ test("Taxrates Accounting Tax Rates Update", async () => {
545
+ const testHttpClient = createTestHTTPClient("accounting.taxRatesUpdate");
546
+
547
+ const apideck = new Apideck({
548
+ serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
549
+ httpClient: testHttpClient,
550
+ apiKey: process.env["APIDECK_API_KEY"] ?? "value",
551
+ });
552
+
553
+ const result = await apideck.accounting.taxRates.update({
554
+ id: "<id>",
555
+ consumerId: "test-consumer",
556
+ appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
557
+ serviceId: "salesforce",
558
+ taxRate: {
559
+ id: "1234",
560
+ name: "GST on Purchases",
561
+ code: "ABN",
562
+ description: "Reduced rate GST Purchases",
563
+ effectiveTaxRate: 10,
564
+ totalTaxRate: 10,
565
+ taxPayableAccountId: "123456",
566
+ taxRemittedAccountId: "123456",
567
+ components: [
568
+ {
569
+ id: "10",
570
+ name: "GST",
571
+ rate: 10,
572
+ compound: true,
573
+ },
574
+ {
575
+ id: "10",
576
+ name: "GST",
577
+ rate: 10,
578
+ compound: true,
579
+ },
580
+ {
581
+ id: "10",
582
+ name: "GST",
583
+ rate: 10,
584
+ compound: true,
585
+ },
586
+ ],
587
+ type: "NONE",
588
+ reportTaxType: "NONE",
589
+ originalTaxRateId: "12345",
590
+ status: "active",
591
+ rowVersion: "1-12345",
592
+ passThrough: [
593
+ {
594
+ serviceId: "<id>",
595
+ extendPaths: [
596
+ {
597
+ path: "$.nested.property",
598
+ value: {
599
+ "TaxClassificationRef": {
600
+ "value": "EUC-99990201-V1-00020000",
601
+ },
602
+ },
603
+ },
604
+ {
605
+ path: "$.nested.property",
606
+ value: {
607
+ "TaxClassificationRef": {
608
+ "value": "EUC-99990201-V1-00020000",
609
+ },
610
+ },
611
+ },
612
+ ],
613
+ },
614
+ {
615
+ serviceId: "<id>",
616
+ extendPaths: [
617
+ {
618
+ path: "$.nested.property",
619
+ value: {
620
+ "TaxClassificationRef": {
621
+ "value": "EUC-99990201-V1-00020000",
622
+ },
623
+ },
624
+ },
625
+ {
626
+ path: "$.nested.property",
627
+ value: {
628
+ "TaxClassificationRef": {
629
+ "value": "EUC-99990201-V1-00020000",
630
+ },
631
+ },
632
+ },
633
+ {
634
+ path: "$.nested.property",
635
+ value: {
636
+ "TaxClassificationRef": {
637
+ "value": "EUC-99990201-V1-00020000",
638
+ },
639
+ },
640
+ },
641
+ ],
642
+ },
643
+ ],
644
+ customFields: [
645
+ {
646
+ id: "2389328923893298",
647
+ name: "employee_level",
648
+ description: "Employee Level",
649
+ value: true,
650
+ },
651
+ {
652
+ id: "2389328923893298",
653
+ name: "employee_level",
654
+ description: "Employee Level",
655
+ value: {},
656
+ },
657
+ ],
658
+ },
659
+ });
660
+ expect(result.httpMeta.response.status).toBe(200);
661
+ expect(result.updateTaxRateResponse).toBeDefined();
662
+ expect(result.updateTaxRateResponse).toEqual({
663
+ statusCode: 200,
664
+ status: "OK",
665
+ service: "xero",
666
+ resource: "tax-rates",
667
+ operation: "update",
668
+ data: {
669
+ id: "12345",
670
+ },
671
+ });
449
672
  });
450
673
 
451
674
  test("Taxrates Accounting Tax Rates Delete", async () => {
@@ -2,7 +2,7 @@
2
2
  * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
3
  */
4
4
 
5
- import { assert, expect, it, test } from "vitest";
5
+ import { expect, test } from "vitest";
6
6
  import { Apideck } from "../index.js";
7
7
  import { createTestHTTPClient } from "./testclient.js";
8
8
 
@@ -227,10 +227,95 @@ test("Timeoffrequests Hris Time Off Requests All", async () => {
227
227
  });
228
228
  });
229
229
 
230
- it.skip("Timeoffrequests Hris Time Off Requests Add", async () => {
231
- assert.fail(
232
- "incomplete test found please make sure to address the following errors: [`workflow step hris.timeOffRequestsAdd.test referencing operation hris.timeOffRequestsAdd with expression in requestBody with type not currently supported`, `workflow step hris.timeOffRequestsAdd.test referencing operation hris.timeOffRequestsAdd with expression in requestBody with type not currently supported`, `workflow step hris.timeOffRequestsAdd.test referencing operation hris.timeOffRequestsAdd with expression in requestBody with type not currently supported`, `workflow step hris.timeOffRequestsAdd.test referencing operation hris.timeOffRequestsAdd with expression in requestBody with type not currently supported`]",
233
- );
230
+ test("Timeoffrequests Hris Time Off Requests Add", async () => {
231
+ const testHttpClient = createTestHTTPClient("hris.timeOffRequestsAdd");
232
+
233
+ const apideck = new Apideck({
234
+ serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
235
+ httpClient: testHttpClient,
236
+ apiKey: process.env["APIDECK_API_KEY"] ?? "value",
237
+ });
238
+
239
+ const result = await apideck.hris.timeOffRequests.create({
240
+ consumerId: "test-consumer",
241
+ appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
242
+ serviceId: "salesforce",
243
+ timeOffRequest: {
244
+ employeeId: "12345",
245
+ policyId: "12345",
246
+ status: "approved",
247
+ description: "Enjoying some sun.",
248
+ startDate: "2022-04-01",
249
+ endDate: "2022-04-01",
250
+ requestDate: "2022-03-21",
251
+ requestType: "vacation",
252
+ approvalDate: "2022-03-21",
253
+ units: "hours",
254
+ amount: 3.5,
255
+ dayPart: "morning",
256
+ notes: {
257
+ employee: "Relaxing on the beach for a few hours.",
258
+ manager: "Enjoy!",
259
+ },
260
+ passThrough: [
261
+ {
262
+ serviceId: "<id>",
263
+ extendPaths: [
264
+ {
265
+ path: "$.nested.property",
266
+ value: {
267
+ "TaxClassificationRef": {
268
+ "value": "EUC-99990201-V1-00020000",
269
+ },
270
+ },
271
+ },
272
+ {
273
+ path: "$.nested.property",
274
+ value: {
275
+ "TaxClassificationRef": {
276
+ "value": "EUC-99990201-V1-00020000",
277
+ },
278
+ },
279
+ },
280
+ ],
281
+ },
282
+ {
283
+ serviceId: "<id>",
284
+ extendPaths: [
285
+ {
286
+ path: "$.nested.property",
287
+ value: {
288
+ "TaxClassificationRef": {
289
+ "value": "EUC-99990201-V1-00020000",
290
+ },
291
+ },
292
+ },
293
+ {
294
+ path: "$.nested.property",
295
+ value: {
296
+ "TaxClassificationRef": {
297
+ "value": "EUC-99990201-V1-00020000",
298
+ },
299
+ },
300
+ },
301
+ ],
302
+ },
303
+ ],
304
+ policyType: "sick",
305
+ },
306
+ });
307
+ expect(result.httpMeta.response.status).toBe(201);
308
+ expect(result.createTimeOffRequestResponse).toBeDefined();
309
+ expect(result.createTimeOffRequestResponse).toEqual({
310
+ statusCode: 200,
311
+ status: "OK",
312
+ service: "bamboohr",
313
+ resource: "time-off-requests",
314
+ operation: "add",
315
+ data: {
316
+ id: "12345",
317
+ },
318
+ });
234
319
  });
235
320
 
236
321
  test("Timeoffrequests Hris Time Off Requests One", async () => {
@@ -350,10 +435,126 @@ test("Timeoffrequests Hris Time Off Requests One", async () => {
350
435
  });
351
436
  });
352
437
 
353
- it.skip("Timeoffrequests Hris Time Off Requests Update", async () => {
354
- assert.fail(
355
- "incomplete test found please make sure to address the following errors: [`workflow step hris.timeOffRequestsUpdate.test referencing operation hris.timeOffRequestsUpdate with expression in requestBody with type not currently supported`, `workflow step hris.timeOffRequestsUpdate.test referencing operation hris.timeOffRequestsUpdate with expression in requestBody with type not currently supported`, `workflow step hris.timeOffRequestsUpdate.test referencing operation hris.timeOffRequestsUpdate with expression in requestBody with type not currently supported`, `workflow step hris.timeOffRequestsUpdate.test referencing operation hris.timeOffRequestsUpdate with expression in requestBody with type not currently supported`, `workflow step hris.timeOffRequestsUpdate.test referencing operation hris.timeOffRequestsUpdate with expression in requestBody with type not currently supported`, `workflow step hris.timeOffRequestsUpdate.test referencing operation hris.timeOffRequestsUpdate with expression in requestBody with type not currently supported`, `workflow step hris.timeOffRequestsUpdate.test referencing operation hris.timeOffRequestsUpdate with expression in requestBody with type not currently supported`]",
356
- );
438
+ test("Timeoffrequests Hris Time Off Requests Update", async () => {
439
+ const testHttpClient = createTestHTTPClient("hris.timeOffRequestsUpdate");
440
+
441
+ const apideck = new Apideck({
442
+ serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
443
+ httpClient: testHttpClient,
444
+ apiKey: process.env["APIDECK_API_KEY"] ?? "value",
445
+ });
446
+
447
+ const result = await apideck.hris.timeOffRequests.update({
448
+ id: "<id>",
449
+ consumerId: "test-consumer",
450
+ appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
451
+ serviceId: "salesforce",
452
+ employeeId: "<id>",
453
+ timeOffRequest: {
454
+ employeeId: "12345",
455
+ policyId: "12345",
456
+ status: "approved",
457
+ description: "Enjoying some sun.",
458
+ startDate: "2022-04-01",
459
+ endDate: "2022-04-01",
460
+ requestDate: "2022-03-21",
461
+ requestType: "vacation",
462
+ approvalDate: "2022-03-21",
463
+ units: "hours",
464
+ amount: 3.5,
465
+ dayPart: "morning",
466
+ notes: {
467
+ employee: "Relaxing on the beach for a few hours.",
468
+ manager: "Enjoy!",
469
+ },
470
+ passThrough: [
471
+ {
472
+ serviceId: "<id>",
473
+ extendPaths: [
474
+ {
475
+ path: "$.nested.property",
476
+ value: {
477
+ "TaxClassificationRef": {
478
+ "value": "EUC-99990201-V1-00020000",
479
+ },
480
+ },
481
+ },
482
+ {
483
+ path: "$.nested.property",
484
+ value: {
485
+ "TaxClassificationRef": {
486
+ "value": "EUC-99990201-V1-00020000",
487
+ },
488
+ },
489
+ },
490
+ ],
491
+ },
492
+ {
493
+ serviceId: "<id>",
494
+ extendPaths: [
495
+ {
496
+ path: "$.nested.property",
497
+ value: {
498
+ "TaxClassificationRef": {
499
+ "value": "EUC-99990201-V1-00020000",
500
+ },
501
+ },
502
+ },
503
+ {
504
+ path: "$.nested.property",
505
+ value: {
506
+ "TaxClassificationRef": {
507
+ "value": "EUC-99990201-V1-00020000",
508
+ },
509
+ },
510
+ },
511
+ ],
512
+ },
513
+ {
514
+ serviceId: "<id>",
515
+ extendPaths: [
516
+ {
517
+ path: "$.nested.property",
518
+ value: {
519
+ "TaxClassificationRef": {
520
+ "value": "EUC-99990201-V1-00020000",
521
+ },
522
+ },
523
+ },
524
+ {
525
+ path: "$.nested.property",
526
+ value: {
527
+ "TaxClassificationRef": {
528
+ "value": "EUC-99990201-V1-00020000",
529
+ },
530
+ },
531
+ },
532
+ {
533
+ path: "$.nested.property",
534
+ value: {
535
+ "TaxClassificationRef": {
536
+ "value": "EUC-99990201-V1-00020000",
537
+ },
538
+ },
539
+ },
540
+ ],
541
+ },
542
+ ],
543
+ policyType: "sick",
544
+ },
545
+ });
546
+ expect(result.httpMeta.response.status).toBe(200);
547
+ expect(result.updateTimeOffRequestResponse).toBeDefined();
548
+ expect(result.updateTimeOffRequestResponse).toEqual({
549
+ statusCode: 200,
550
+ status: "OK",
551
+ service: "bamboohr",
552
+ resource: "time-off-requests",
553
+ operation: "update",
554
+ data: {
555
+ id: "12345",
556
+ },
557
+ });
357
558
  });
358
559
 
359
560
  test("Timeoffrequests Hris Time Off Requests Delete", async () => {