@apideck/unify 0.27.0 → 0.28.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 (132) hide show
  1. package/README.md +5 -5
  2. package/docs/sdks/companies/README.md +4 -4
  3. package/examples/README.md +26 -0
  4. package/examples/accountingTaxRatesList.example.ts +41 -0
  5. package/examples/package-lock.json +613 -0
  6. package/examples/package.json +18 -0
  7. package/funcs/crmCompaniesCreate.js +1 -1
  8. package/funcs/crmCompaniesCreate.js.map +1 -1
  9. package/funcs/crmCompaniesUpdate.js +1 -1
  10. package/funcs/crmCompaniesUpdate.js.map +1 -1
  11. package/jsr.json +1 -1
  12. package/lib/config.d.ts +4 -4
  13. package/lib/config.js +4 -4
  14. package/models/components/bankaccount.d.ts +5 -0
  15. package/models/components/bankaccount.d.ts.map +1 -1
  16. package/models/components/bankaccount.js +2 -0
  17. package/models/components/bankaccount.js.map +1 -1
  18. package/models/components/bankaccount1.d.ts +123 -0
  19. package/models/components/bankaccount1.d.ts.map +1 -0
  20. package/models/components/bankaccount1.js +128 -0
  21. package/models/components/bankaccount1.js.map +1 -0
  22. package/models/components/{company.d.ts → company1.d.ts} +32 -32
  23. package/models/components/company1.d.ts.map +1 -0
  24. package/models/components/{company.js → company1.js} +37 -37
  25. package/models/components/company1.js.map +1 -0
  26. package/models/components/companyinfo.d.ts +5 -0
  27. package/models/components/companyinfo.d.ts.map +1 -1
  28. package/models/components/companyinfo.js +4 -0
  29. package/models/components/companyinfo.js.map +1 -1
  30. package/models/components/getcompaniesresponse.d.ts +3 -3
  31. package/models/components/getcompaniesresponse.d.ts.map +1 -1
  32. package/models/components/getcompaniesresponse.js +3 -3
  33. package/models/components/getcompaniesresponse.js.map +1 -1
  34. package/models/components/getcompanyresponse.d.ts +3 -3
  35. package/models/components/getcompanyresponse.d.ts.map +1 -1
  36. package/models/components/getcompanyresponse.js +3 -3
  37. package/models/components/getcompanyresponse.js.map +1 -1
  38. package/models/components/index.d.ts +2 -1
  39. package/models/components/index.d.ts.map +1 -1
  40. package/models/components/index.js +2 -1
  41. package/models/components/index.js.map +1 -1
  42. package/models/components/supplier.d.ts +10 -0
  43. package/models/components/supplier.d.ts.map +1 -1
  44. package/models/components/supplier.js +4 -0
  45. package/models/components/supplier.js.map +1 -1
  46. package/models/errors/apierror.d.ts.map +1 -1
  47. package/models/errors/apierror.js +8 -2
  48. package/models/errors/apierror.js.map +1 -1
  49. package/models/errors/badrequestresponse.js +1 -1
  50. package/models/errors/badrequestresponse.js.map +1 -1
  51. package/models/errors/notfoundresponse.js +1 -1
  52. package/models/errors/notfoundresponse.js.map +1 -1
  53. package/models/errors/paymentrequiredresponse.js +1 -1
  54. package/models/errors/paymentrequiredresponse.js.map +1 -1
  55. package/models/errors/unauthorizedresponse.js +1 -1
  56. package/models/errors/unauthorizedresponse.js.map +1 -1
  57. package/models/errors/unprocessableresponse.js +1 -1
  58. package/models/errors/unprocessableresponse.js.map +1 -1
  59. package/models/operations/crmcompaniesadd.d.ts +2 -2
  60. package/models/operations/crmcompaniesadd.d.ts.map +1 -1
  61. package/models/operations/crmcompaniesadd.js +4 -4
  62. package/models/operations/crmcompaniesadd.js.map +1 -1
  63. package/models/operations/crmcompaniesupdate.d.ts +2 -2
  64. package/models/operations/crmcompaniesupdate.d.ts.map +1 -1
  65. package/models/operations/crmcompaniesupdate.js +4 -4
  66. package/models/operations/crmcompaniesupdate.js.map +1 -1
  67. package/package.json +1 -1
  68. package/src/__tests__/activities.test.ts +360 -9
  69. package/src/__tests__/apideckcompanies.test.ts +373 -9
  70. package/src/__tests__/apideckdepartments.test.ts +181 -9
  71. package/src/__tests__/applicants.test.ts +473 -9
  72. package/src/__tests__/applications.test.ts +189 -9
  73. package/src/__tests__/billpayments.test.ts +367 -9
  74. package/src/__tests__/bills.test.ts +500 -9
  75. package/src/__tests__/collectionticketcomments.test.ts +183 -7
  76. package/src/__tests__/collectiontickets.test.ts +191 -7
  77. package/src/__tests__/companies.test.ts +538 -9
  78. package/src/__tests__/connections.test.ts +409 -5
  79. package/src/__tests__/connectionsettings.test.ts +410 -5
  80. package/src/__tests__/contacts.test.ts +466 -9
  81. package/src/__tests__/creditnotes.test.ts +758 -87
  82. package/src/__tests__/customers.test.ts +513 -9
  83. package/src/__tests__/customobjects.test.ts +150 -9
  84. package/src/__tests__/customobjectschemas.test.ts +321 -9
  85. package/src/__tests__/departments.test.ts +173 -9
  86. package/src/__tests__/drivegroups.test.ts +181 -9
  87. package/src/__tests__/drives.test.ts +179 -9
  88. package/src/__tests__/employees.test.ts +829 -94
  89. package/src/__tests__/expenses.test.ts +332 -9
  90. package/src/__tests__/files.test.ts +106 -5
  91. package/src/__tests__/folders.test.ts +296 -13
  92. package/src/__tests__/invoiceitems.test.ts +272 -9
  93. package/src/__tests__/invoices.test.ts +673 -67
  94. package/src/__tests__/journalentries.test.ts +490 -8
  95. package/src/__tests__/leads.test.ts +446 -9
  96. package/src/__tests__/ledgeraccounts.test.ts +237 -8
  97. package/src/__tests__/locations.test.ts +298 -9
  98. package/src/__tests__/messages.test.ts +195 -9
  99. package/src/__tests__/notes.test.ts +191 -9
  100. package/src/__tests__/opportunities.test.ts +218 -9
  101. package/src/__tests__/payments.test.ts +312 -9
  102. package/src/__tests__/pipelines.test.ts +194 -9
  103. package/src/__tests__/purchaseorders.test.ts +773 -104
  104. package/src/__tests__/sharedlinks.test.ts +183 -9
  105. package/src/__tests__/subsidiaries.test.ts +183 -9
  106. package/src/__tests__/suppliers.test.ts +505 -9
  107. package/src/__tests__/taxrates.test.ts +232 -9
  108. package/src/__tests__/timeoffrequests.test.ts +210 -9
  109. package/src/__tests__/trackingcategories.test.ts +187 -7
  110. package/src/__tests__/uploadsessions.test.ts +78 -5
  111. package/src/__tests__/users.test.ts +356 -9
  112. package/src/funcs/crmCompaniesCreate.ts +1 -1
  113. package/src/funcs/crmCompaniesUpdate.ts +1 -1
  114. package/src/lib/config.ts +4 -4
  115. package/src/models/components/bankaccount.ts +7 -0
  116. package/src/models/components/bankaccount1.ts +207 -0
  117. package/src/models/components/{company.ts → company1.ts} +131 -128
  118. package/src/models/components/companyinfo.ts +9 -0
  119. package/src/models/components/getcompaniesresponse.ts +9 -9
  120. package/src/models/components/getcompanyresponse.ts +9 -9
  121. package/src/models/components/index.ts +2 -1
  122. package/src/models/components/supplier.ts +14 -0
  123. package/src/models/errors/apierror.ts +8 -2
  124. package/src/models/errors/badrequestresponse.ts +1 -1
  125. package/src/models/errors/notfoundresponse.ts +1 -1
  126. package/src/models/errors/paymentrequiredresponse.ts +1 -1
  127. package/src/models/errors/unauthorizedresponse.ts +1 -1
  128. package/src/models/errors/unprocessableresponse.ts +1 -1
  129. package/src/models/operations/crmcompaniesadd.ts +6 -6
  130. package/src/models/operations/crmcompaniesupdate.ts +6 -6
  131. package/models/components/company.d.ts.map +0 -1
  132. 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
 
@@ -455,10 +455,163 @@ test("Apideck Companies Hris Companies All", async () => {
455
455
  });
456
456
  });
457
457
 
458
- it.skip("Apideck Companies Hris Companies Add", async () => {
459
- assert.fail(
460
- "incomplete test found please make sure to address the following errors: [`workflow step hris.companiesAdd.test referencing operation hris.companiesAdd with expression in requestBody with type not currently supported`, `workflow step hris.companiesAdd.test referencing operation hris.companiesAdd with expression in requestBody with type not currently supported`, `workflow step hris.companiesAdd.test referencing operation hris.companiesAdd with expression in requestBody with type not currently supported`]",
461
- );
458
+ test("Apideck Companies Hris Companies Add", async () => {
459
+ const testHttpClient = createTestHTTPClient("hris.companiesAdd");
460
+
461
+ const apideck = new Apideck({
462
+ serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
463
+ httpClient: testHttpClient,
464
+ apiKey: process.env["APIDECK_API_KEY"] ?? "value",
465
+ });
466
+
467
+ const result = await apideck.hris.companies.create({
468
+ consumerId: "test-consumer",
469
+ appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
470
+ serviceId: "salesforce",
471
+ hrisCompany: {
472
+ legalName: "SpaceX",
473
+ displayName: "SpaceX",
474
+ subdomain: "company",
475
+ status: "active",
476
+ companyNumber: "123456-AB",
477
+ currency: "USD",
478
+ addresses: [
479
+ {
480
+ id: "123",
481
+ type: "primary",
482
+ string: "25 Spring Street, Blackburn, VIC 3130",
483
+ name: "HQ US",
484
+ line1: "Main street",
485
+ line2: "apt #",
486
+ line3: "Suite #",
487
+ line4: "delivery instructions",
488
+ streetNumber: "25",
489
+ city: "San Francisco",
490
+ state: "CA",
491
+ postalCode: "94104",
492
+ country: "US",
493
+ latitude: "40.759211",
494
+ longitude: "-73.984638",
495
+ county: "Santa Clara",
496
+ contactName: "Elon Musk",
497
+ salutation: "Mr",
498
+ phoneNumber: "111-111-1111",
499
+ fax: "122-111-1111",
500
+ email: "elon@musk.com",
501
+ website: "https://elonmusk.com",
502
+ notes: "Address notes or delivery instructions.",
503
+ rowVersion: "1-12345",
504
+ },
505
+ {
506
+ id: "123",
507
+ type: "primary",
508
+ string: "25 Spring Street, Blackburn, VIC 3130",
509
+ name: "HQ US",
510
+ line1: "Main street",
511
+ line2: "apt #",
512
+ line3: "Suite #",
513
+ line4: "delivery instructions",
514
+ streetNumber: "25",
515
+ city: "San Francisco",
516
+ state: "CA",
517
+ postalCode: "94104",
518
+ country: "US",
519
+ latitude: "40.759211",
520
+ longitude: "-73.984638",
521
+ county: "Santa Clara",
522
+ contactName: "Elon Musk",
523
+ salutation: "Mr",
524
+ phoneNumber: "111-111-1111",
525
+ fax: "122-111-1111",
526
+ email: "elon@musk.com",
527
+ website: "https://elonmusk.com",
528
+ notes: "Address notes or delivery instructions.",
529
+ rowVersion: "1-12345",
530
+ },
531
+ ],
532
+ phoneNumbers: [
533
+ {
534
+ id: "12345",
535
+ countryCode: "1",
536
+ areaCode: "323",
537
+ number: "111-111-1111",
538
+ extension: "105",
539
+ type: "primary",
540
+ },
541
+ {
542
+ id: "12345",
543
+ countryCode: "1",
544
+ areaCode: "323",
545
+ number: "111-111-1111",
546
+ extension: "105",
547
+ type: "primary",
548
+ },
549
+ ],
550
+ emails: [
551
+ {
552
+ id: "123",
553
+ email: "elon@musk.com",
554
+ type: "primary",
555
+ },
556
+ {
557
+ id: "123",
558
+ email: "elon@musk.com",
559
+ type: "primary",
560
+ },
561
+ ],
562
+ websites: [
563
+ {
564
+ id: "12345",
565
+ url: "http://example.com",
566
+ type: "primary",
567
+ },
568
+ ],
569
+ debtorId: "12345",
570
+ passThrough: [
571
+ {
572
+ serviceId: "<id>",
573
+ extendPaths: [
574
+ {
575
+ path: "$.nested.property",
576
+ value: {
577
+ "TaxClassificationRef": {
578
+ "value": "EUC-99990201-V1-00020000",
579
+ },
580
+ },
581
+ },
582
+ {
583
+ path: "$.nested.property",
584
+ value: {
585
+ "TaxClassificationRef": {
586
+ "value": "EUC-99990201-V1-00020000",
587
+ },
588
+ },
589
+ },
590
+ {
591
+ path: "$.nested.property",
592
+ value: {
593
+ "TaxClassificationRef": {
594
+ "value": "EUC-99990201-V1-00020000",
595
+ },
596
+ },
597
+ },
598
+ ],
599
+ },
600
+ ],
601
+ },
602
+ });
603
+ expect(result.httpMeta.response.status).toBe(201);
604
+ expect(result.createHrisCompanyResponse).toBeDefined();
605
+ expect(result.createHrisCompanyResponse).toEqual({
606
+ statusCode: 200,
607
+ status: "OK",
608
+ service: "undefined",
609
+ resource: "Companies",
610
+ operation: "add",
611
+ data: {
612
+ id: "12345",
613
+ },
614
+ });
462
615
  });
463
616
 
464
617
  test("Apideck Companies Hris Companies One", async () => {
@@ -682,10 +835,221 @@ test("Apideck Companies Hris Companies One", async () => {
682
835
  });
683
836
  });
684
837
 
685
- it.skip("Apideck Companies Hris Companies Update", async () => {
686
- assert.fail(
687
- "incomplete test found please make sure to address the following errors: [`workflow step hris.companiesUpdate.test referencing operation hris.companiesUpdate with expression in requestBody with type not currently supported`, `workflow step hris.companiesUpdate.test referencing operation hris.companiesUpdate with expression in requestBody with type not currently supported`, `workflow step hris.companiesUpdate.test referencing operation hris.companiesUpdate with expression in requestBody with type not currently supported`, `workflow step hris.companiesUpdate.test referencing operation hris.companiesUpdate with expression in requestBody with type not currently supported`, `workflow step hris.companiesUpdate.test referencing operation hris.companiesUpdate with expression in requestBody with type not currently supported`]",
688
- );
838
+ test("Apideck Companies Hris Companies Update", async () => {
839
+ const testHttpClient = createTestHTTPClient("hris.companiesUpdate");
840
+
841
+ const apideck = new Apideck({
842
+ serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
843
+ httpClient: testHttpClient,
844
+ apiKey: process.env["APIDECK_API_KEY"] ?? "value",
845
+ });
846
+
847
+ const result = await apideck.hris.companies.update({
848
+ id: "<id>",
849
+ consumerId: "test-consumer",
850
+ appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
851
+ serviceId: "salesforce",
852
+ hrisCompany: {
853
+ legalName: "SpaceX",
854
+ displayName: "SpaceX",
855
+ subdomain: "company",
856
+ status: "active",
857
+ companyNumber: "123456-AB",
858
+ currency: "USD",
859
+ addresses: [
860
+ {
861
+ id: "123",
862
+ type: "primary",
863
+ string: "25 Spring Street, Blackburn, VIC 3130",
864
+ name: "HQ US",
865
+ line1: "Main street",
866
+ line2: "apt #",
867
+ line3: "Suite #",
868
+ line4: "delivery instructions",
869
+ streetNumber: "25",
870
+ city: "San Francisco",
871
+ state: "CA",
872
+ postalCode: "94104",
873
+ country: "US",
874
+ latitude: "40.759211",
875
+ longitude: "-73.984638",
876
+ county: "Santa Clara",
877
+ contactName: "Elon Musk",
878
+ salutation: "Mr",
879
+ phoneNumber: "111-111-1111",
880
+ fax: "122-111-1111",
881
+ email: "elon@musk.com",
882
+ website: "https://elonmusk.com",
883
+ notes: "Address notes or delivery instructions.",
884
+ rowVersion: "1-12345",
885
+ },
886
+ {
887
+ id: "123",
888
+ type: "primary",
889
+ string: "25 Spring Street, Blackburn, VIC 3130",
890
+ name: "HQ US",
891
+ line1: "Main street",
892
+ line2: "apt #",
893
+ line3: "Suite #",
894
+ line4: "delivery instructions",
895
+ streetNumber: "25",
896
+ city: "San Francisco",
897
+ state: "CA",
898
+ postalCode: "94104",
899
+ country: "US",
900
+ latitude: "40.759211",
901
+ longitude: "-73.984638",
902
+ county: "Santa Clara",
903
+ contactName: "Elon Musk",
904
+ salutation: "Mr",
905
+ phoneNumber: "111-111-1111",
906
+ fax: "122-111-1111",
907
+ email: "elon@musk.com",
908
+ website: "https://elonmusk.com",
909
+ notes: "Address notes or delivery instructions.",
910
+ rowVersion: "1-12345",
911
+ },
912
+ {
913
+ id: "123",
914
+ type: "primary",
915
+ string: "25 Spring Street, Blackburn, VIC 3130",
916
+ name: "HQ US",
917
+ line1: "Main street",
918
+ line2: "apt #",
919
+ line3: "Suite #",
920
+ line4: "delivery instructions",
921
+ streetNumber: "25",
922
+ city: "San Francisco",
923
+ state: "CA",
924
+ postalCode: "94104",
925
+ country: "US",
926
+ latitude: "40.759211",
927
+ longitude: "-73.984638",
928
+ county: "Santa Clara",
929
+ contactName: "Elon Musk",
930
+ salutation: "Mr",
931
+ phoneNumber: "111-111-1111",
932
+ fax: "122-111-1111",
933
+ email: "elon@musk.com",
934
+ website: "https://elonmusk.com",
935
+ notes: "Address notes or delivery instructions.",
936
+ rowVersion: "1-12345",
937
+ },
938
+ ],
939
+ phoneNumbers: [
940
+ {
941
+ id: "12345",
942
+ countryCode: "1",
943
+ areaCode: "323",
944
+ number: "111-111-1111",
945
+ extension: "105",
946
+ type: "primary",
947
+ },
948
+ {
949
+ id: "12345",
950
+ countryCode: "1",
951
+ areaCode: "323",
952
+ number: "111-111-1111",
953
+ extension: "105",
954
+ type: "primary",
955
+ },
956
+ ],
957
+ emails: [
958
+ {
959
+ id: "123",
960
+ email: "elon@musk.com",
961
+ type: "primary",
962
+ },
963
+ {
964
+ id: "123",
965
+ email: "elon@musk.com",
966
+ type: "primary",
967
+ },
968
+ ],
969
+ websites: [
970
+ {
971
+ id: "12345",
972
+ url: "http://example.com",
973
+ type: "primary",
974
+ },
975
+ {
976
+ id: "12345",
977
+ url: "http://example.com",
978
+ type: "primary",
979
+ },
980
+ {
981
+ id: "12345",
982
+ url: "http://example.com",
983
+ type: "primary",
984
+ },
985
+ ],
986
+ debtorId: "12345",
987
+ passThrough: [
988
+ {
989
+ serviceId: "<id>",
990
+ extendPaths: [
991
+ {
992
+ path: "$.nested.property",
993
+ value: {
994
+ "TaxClassificationRef": {
995
+ "value": "EUC-99990201-V1-00020000",
996
+ },
997
+ },
998
+ },
999
+ {
1000
+ path: "$.nested.property",
1001
+ value: {
1002
+ "TaxClassificationRef": {
1003
+ "value": "EUC-99990201-V1-00020000",
1004
+ },
1005
+ },
1006
+ },
1007
+ ],
1008
+ },
1009
+ {
1010
+ serviceId: "<id>",
1011
+ extendPaths: [
1012
+ {
1013
+ path: "$.nested.property",
1014
+ value: {
1015
+ "TaxClassificationRef": {
1016
+ "value": "EUC-99990201-V1-00020000",
1017
+ },
1018
+ },
1019
+ },
1020
+ {
1021
+ path: "$.nested.property",
1022
+ value: {
1023
+ "TaxClassificationRef": {
1024
+ "value": "EUC-99990201-V1-00020000",
1025
+ },
1026
+ },
1027
+ },
1028
+ {
1029
+ path: "$.nested.property",
1030
+ value: {
1031
+ "TaxClassificationRef": {
1032
+ "value": "EUC-99990201-V1-00020000",
1033
+ },
1034
+ },
1035
+ },
1036
+ ],
1037
+ },
1038
+ ],
1039
+ },
1040
+ });
1041
+ expect(result.httpMeta.response.status).toBe(200);
1042
+ expect(result.updateHrisCompanyResponse).toBeDefined();
1043
+ expect(result.updateHrisCompanyResponse).toEqual({
1044
+ statusCode: 200,
1045
+ status: "OK",
1046
+ service: "undefined",
1047
+ resource: "Companies",
1048
+ operation: "update",
1049
+ data: {
1050
+ id: "12345",
1051
+ },
1052
+ });
689
1053
  });
690
1054
 
691
1055
  test("Apideck Companies Hris Companies 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
 
@@ -180,10 +180,81 @@ test("Apideck Departments Hris Departments All", async () => {
180
180
  });
181
181
  });
182
182
 
183
- it.skip("Apideck Departments Hris Departments Add", async () => {
184
- assert.fail(
185
- "incomplete test found please make sure to address the following errors: [`workflow step hris.departmentsAdd.test referencing operation hris.departmentsAdd with expression in requestBody with type not currently supported`, `workflow step hris.departmentsAdd.test referencing operation hris.departmentsAdd with expression in requestBody with type not currently supported`, `workflow step hris.departmentsAdd.test referencing operation hris.departmentsAdd with expression in requestBody with type not currently supported`, `workflow step hris.departmentsAdd.test referencing operation hris.departmentsAdd with expression in requestBody with type not currently supported`]",
186
- );
183
+ test("Apideck Departments Hris Departments Add", async () => {
184
+ const testHttpClient = createTestHTTPClient("hris.departmentsAdd");
185
+
186
+ const apideck = new Apideck({
187
+ serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
188
+ httpClient: testHttpClient,
189
+ apiKey: process.env["APIDECK_API_KEY"] ?? "value",
190
+ });
191
+
192
+ const result = await apideck.hris.departments.create({
193
+ consumerId: "test-consumer",
194
+ appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
195
+ serviceId: "salesforce",
196
+ department: {
197
+ name: "R&D",
198
+ code: "2",
199
+ description: "R&D",
200
+ passThrough: [
201
+ {
202
+ serviceId: "<id>",
203
+ extendPaths: [
204
+ {
205
+ path: "$.nested.property",
206
+ value: {
207
+ "TaxClassificationRef": {
208
+ "value": "EUC-99990201-V1-00020000",
209
+ },
210
+ },
211
+ },
212
+ {
213
+ path: "$.nested.property",
214
+ value: {
215
+ "TaxClassificationRef": {
216
+ "value": "EUC-99990201-V1-00020000",
217
+ },
218
+ },
219
+ },
220
+ ],
221
+ },
222
+ {
223
+ serviceId: "<id>",
224
+ extendPaths: [
225
+ {
226
+ path: "$.nested.property",
227
+ value: {
228
+ "TaxClassificationRef": {
229
+ "value": "EUC-99990201-V1-00020000",
230
+ },
231
+ },
232
+ },
233
+ {
234
+ path: "$.nested.property",
235
+ value: {
236
+ "TaxClassificationRef": {
237
+ "value": "EUC-99990201-V1-00020000",
238
+ },
239
+ },
240
+ },
241
+ ],
242
+ },
243
+ ],
244
+ },
245
+ });
246
+ expect(result.httpMeta.response.status).toBe(201);
247
+ expect(result.createDepartmentResponse).toBeDefined();
248
+ expect(result.createDepartmentResponse).toEqual({
249
+ statusCode: 200,
250
+ status: "OK",
251
+ service: "workday",
252
+ resource: "Departments",
253
+ operation: "add",
254
+ data: {
255
+ id: "12345",
256
+ },
257
+ });
187
258
  });
188
259
 
189
260
  test("Apideck Departments Hris Departments One", async () => {
@@ -289,10 +360,111 @@ test("Apideck Departments Hris Departments One", async () => {
289
360
  });
290
361
  });
291
362
 
292
- it.skip("Apideck Departments Hris Departments Update", async () => {
293
- assert.fail(
294
- "incomplete test found please make sure to address the following errors: [`workflow step hris.departmentsUpdate.test referencing operation hris.departmentsUpdate with expression in requestBody with type not currently supported`, `workflow step hris.departmentsUpdate.test referencing operation hris.departmentsUpdate with expression in requestBody with type not currently supported`, `workflow step hris.departmentsUpdate.test referencing operation hris.departmentsUpdate with expression in requestBody with type not currently supported`, `workflow step hris.departmentsUpdate.test referencing operation hris.departmentsUpdate with expression in requestBody with type not currently supported`, `workflow step hris.departmentsUpdate.test referencing operation hris.departmentsUpdate with expression in requestBody with type not currently supported`, `workflow step hris.departmentsUpdate.test referencing operation hris.departmentsUpdate with expression in requestBody with type not currently supported`, `workflow step hris.departmentsUpdate.test referencing operation hris.departmentsUpdate with expression in requestBody with type not currently supported`]",
295
- );
363
+ test("Apideck Departments Hris Departments Update", async () => {
364
+ const testHttpClient = createTestHTTPClient("hris.departmentsUpdate");
365
+
366
+ const apideck = new Apideck({
367
+ serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
368
+ httpClient: testHttpClient,
369
+ apiKey: process.env["APIDECK_API_KEY"] ?? "value",
370
+ });
371
+
372
+ const result = await apideck.hris.departments.update({
373
+ id: "<id>",
374
+ consumerId: "test-consumer",
375
+ appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
376
+ serviceId: "salesforce",
377
+ department: {
378
+ name: "R&D",
379
+ code: "2",
380
+ description: "R&D",
381
+ passThrough: [
382
+ {
383
+ serviceId: "<id>",
384
+ extendPaths: [
385
+ {
386
+ path: "$.nested.property",
387
+ value: {
388
+ "TaxClassificationRef": {
389
+ "value": "EUC-99990201-V1-00020000",
390
+ },
391
+ },
392
+ },
393
+ {
394
+ path: "$.nested.property",
395
+ value: {
396
+ "TaxClassificationRef": {
397
+ "value": "EUC-99990201-V1-00020000",
398
+ },
399
+ },
400
+ },
401
+ ],
402
+ },
403
+ {
404
+ serviceId: "<id>",
405
+ extendPaths: [
406
+ {
407
+ path: "$.nested.property",
408
+ value: {
409
+ "TaxClassificationRef": {
410
+ "value": "EUC-99990201-V1-00020000",
411
+ },
412
+ },
413
+ },
414
+ {
415
+ path: "$.nested.property",
416
+ value: {
417
+ "TaxClassificationRef": {
418
+ "value": "EUC-99990201-V1-00020000",
419
+ },
420
+ },
421
+ },
422
+ ],
423
+ },
424
+ {
425
+ serviceId: "<id>",
426
+ extendPaths: [
427
+ {
428
+ path: "$.nested.property",
429
+ value: {
430
+ "TaxClassificationRef": {
431
+ "value": "EUC-99990201-V1-00020000",
432
+ },
433
+ },
434
+ },
435
+ {
436
+ path: "$.nested.property",
437
+ value: {
438
+ "TaxClassificationRef": {
439
+ "value": "EUC-99990201-V1-00020000",
440
+ },
441
+ },
442
+ },
443
+ {
444
+ path: "$.nested.property",
445
+ value: {
446
+ "TaxClassificationRef": {
447
+ "value": "EUC-99990201-V1-00020000",
448
+ },
449
+ },
450
+ },
451
+ ],
452
+ },
453
+ ],
454
+ },
455
+ });
456
+ expect(result.httpMeta.response.status).toBe(200);
457
+ expect(result.updateDepartmentResponse).toBeDefined();
458
+ expect(result.updateDepartmentResponse).toEqual({
459
+ statusCode: 200,
460
+ status: "OK",
461
+ service: "workday",
462
+ resource: "Departments",
463
+ operation: "update",
464
+ data: {
465
+ id: "12345",
466
+ },
467
+ });
296
468
  });
297
469
 
298
470
  test("Apideck Departments Hris Departments Delete", async () => {