@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 { RFCDate } from "../types/index.js";
8
8
  import { createTestHTTPClient } from "./testclient.js";
@@ -720,10 +720,293 @@ test("Companies Crm Companies All", async () => {
720
720
  });
721
721
  });
722
722
 
723
- it.skip("Companies Crm Companies Add", async () => {
724
- assert.fail(
725
- "incomplete test found please make sure to address the following errors: [`workflow step crm.companiesAdd.test referencing operation crm.companiesAdd with expression in requestBody with type not currently supported`, `workflow step crm.companiesAdd.test referencing operation crm.companiesAdd with expression in requestBody with type not currently supported`, `workflow step crm.companiesAdd.test referencing operation crm.companiesAdd with expression in requestBody with type not currently supported`, `workflow step crm.companiesAdd.test referencing operation crm.companiesAdd with expression in requestBody with type not currently supported`, `workflow step crm.companiesAdd.test referencing operation crm.companiesAdd with expression in requestBody with type not currently supported`, `workflow step crm.companiesAdd.test referencing operation crm.companiesAdd with expression in requestBody with type not currently supported`, `workflow step crm.companiesAdd.test referencing operation crm.companiesAdd with expression in requestBody with type not currently supported`, `workflow step crm.companiesAdd.test referencing operation crm.companiesAdd with expression in requestBody with type not currently supported`]",
726
- );
723
+ test("Companies Crm Companies Add", async () => {
724
+ const testHttpClient = createTestHTTPClient("crm.companiesAdd");
725
+
726
+ const apideck = new Apideck({
727
+ serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
728
+ httpClient: testHttpClient,
729
+ apiKey: process.env["APIDECK_API_KEY"] ?? "value",
730
+ });
731
+
732
+ const result = await apideck.crm.companies.create({
733
+ consumerId: "test-consumer",
734
+ appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
735
+ serviceId: "salesforce",
736
+ company1: {
737
+ name: "SpaceX",
738
+ ownerId: "12345",
739
+ image: "https://www.spacex.com/static/images/share.jpg",
740
+ description:
741
+ "Space Exploration Technologies Corp. is an American aerospace manufacturer, space transportation services and communications company headquartered in Hawthorne, California.",
742
+ vatNumber: "BE0689615164",
743
+ currency: "USD",
744
+ status: "Open",
745
+ fax: "+12129876543",
746
+ annualRevenue: "+$35m",
747
+ numberOfEmployees: "500-1000",
748
+ industry: "Apparel",
749
+ ownership: "Public",
750
+ salesTaxNumber: "12456EN",
751
+ payeeNumber: "78932EN",
752
+ abnOrTfn: "46 115 614 695",
753
+ abnBranch: "123",
754
+ acn: "XXX XXX XXX",
755
+ firstName: "Elon",
756
+ lastName: "Musk",
757
+ bankAccounts: [
758
+ {
759
+ bankName: "Monzo",
760
+ accountNumber: "123465",
761
+ accountName: "SPACEX LLC",
762
+ accountType: "credit_card",
763
+ iban: "CH2989144532982975332",
764
+ bic: "AUDSCHGGXXX",
765
+ routingNumber: "012345678",
766
+ bsbNumber: "062-001",
767
+ branchIdentifier: "001",
768
+ bankCode: "BNH",
769
+ currency: "USD",
770
+ },
771
+ {
772
+ bankName: "Monzo",
773
+ accountNumber: "123465",
774
+ accountName: "SPACEX LLC",
775
+ accountType: "credit_card",
776
+ iban: "CH2989144532982975332",
777
+ bic: "AUDSCHGGXXX",
778
+ routingNumber: "012345678",
779
+ bsbNumber: "062-001",
780
+ branchIdentifier: "001",
781
+ bankCode: "BNH",
782
+ currency: "USD",
783
+ },
784
+ ],
785
+ websites: [
786
+ {
787
+ id: "12345",
788
+ url: "http://example.com",
789
+ type: "primary",
790
+ },
791
+ {
792
+ id: "12345",
793
+ url: "http://example.com",
794
+ type: "primary",
795
+ },
796
+ ],
797
+ addresses: [
798
+ {
799
+ id: "123",
800
+ type: "primary",
801
+ string: "25 Spring Street, Blackburn, VIC 3130",
802
+ name: "HQ US",
803
+ line1: "Main street",
804
+ line2: "apt #",
805
+ line3: "Suite #",
806
+ line4: "delivery instructions",
807
+ streetNumber: "25",
808
+ city: "San Francisco",
809
+ state: "CA",
810
+ postalCode: "94104",
811
+ country: "US",
812
+ latitude: "40.759211",
813
+ longitude: "-73.984638",
814
+ county: "Santa Clara",
815
+ contactName: "Elon Musk",
816
+ salutation: "Mr",
817
+ phoneNumber: "111-111-1111",
818
+ fax: "122-111-1111",
819
+ email: "elon@musk.com",
820
+ website: "https://elonmusk.com",
821
+ notes: "Address notes or delivery instructions.",
822
+ rowVersion: "1-12345",
823
+ },
824
+ {
825
+ id: "123",
826
+ type: "primary",
827
+ string: "25 Spring Street, Blackburn, VIC 3130",
828
+ name: "HQ US",
829
+ line1: "Main street",
830
+ line2: "apt #",
831
+ line3: "Suite #",
832
+ line4: "delivery instructions",
833
+ streetNumber: "25",
834
+ city: "San Francisco",
835
+ state: "CA",
836
+ postalCode: "94104",
837
+ country: "US",
838
+ latitude: "40.759211",
839
+ longitude: "-73.984638",
840
+ county: "Santa Clara",
841
+ contactName: "Elon Musk",
842
+ salutation: "Mr",
843
+ phoneNumber: "111-111-1111",
844
+ fax: "122-111-1111",
845
+ email: "elon@musk.com",
846
+ website: "https://elonmusk.com",
847
+ notes: "Address notes or delivery instructions.",
848
+ rowVersion: "1-12345",
849
+ },
850
+ ],
851
+ socialLinks: [
852
+ {
853
+ id: "12345",
854
+ url: "https://www.twitter.com/apideck",
855
+ type: "twitter",
856
+ },
857
+ ],
858
+ phoneNumbers: [
859
+ {
860
+ id: "12345",
861
+ countryCode: "1",
862
+ areaCode: "323",
863
+ number: "111-111-1111",
864
+ extension: "105",
865
+ type: "primary",
866
+ },
867
+ ],
868
+ emails: [
869
+ {
870
+ id: "123",
871
+ email: "elon@musk.com",
872
+ type: "primary",
873
+ },
874
+ {
875
+ id: "123",
876
+ email: "elon@musk.com",
877
+ type: "primary",
878
+ },
879
+ {
880
+ id: "123",
881
+ email: "elon@musk.com",
882
+ type: "primary",
883
+ },
884
+ ],
885
+ rowType: {
886
+ id: "12345",
887
+ name: "Customer Account",
888
+ },
889
+ customFields: [
890
+ {
891
+ id: "2389328923893298",
892
+ name: "employee_level",
893
+ description: "Employee Level",
894
+ value: "Uses Salesforce and Marketo",
895
+ },
896
+ {
897
+ id: "2389328923893298",
898
+ name: "employee_level",
899
+ description: "Employee Level",
900
+ value: 10,
901
+ },
902
+ {
903
+ id: "2389328923893298",
904
+ name: "employee_level",
905
+ description: "Employee Level",
906
+ value: "Uses Salesforce and Marketo",
907
+ },
908
+ ],
909
+ tags: [
910
+ "New",
911
+ ],
912
+ readOnly: false,
913
+ salutation: "Mr",
914
+ birthday: new RFCDate("2000-08-12"),
915
+ passThrough: [
916
+ {
917
+ serviceId: "<id>",
918
+ extendPaths: [
919
+ {
920
+ path: "$.nested.property",
921
+ value: {
922
+ "TaxClassificationRef": {
923
+ "value": "EUC-99990201-V1-00020000",
924
+ },
925
+ },
926
+ },
927
+ {
928
+ path: "$.nested.property",
929
+ value: {
930
+ "TaxClassificationRef": {
931
+ "value": "EUC-99990201-V1-00020000",
932
+ },
933
+ },
934
+ },
935
+ {
936
+ path: "$.nested.property",
937
+ value: {
938
+ "TaxClassificationRef": {
939
+ "value": "EUC-99990201-V1-00020000",
940
+ },
941
+ },
942
+ },
943
+ ],
944
+ },
945
+ {
946
+ serviceId: "<id>",
947
+ extendPaths: [
948
+ {
949
+ path: "$.nested.property",
950
+ value: {
951
+ "TaxClassificationRef": {
952
+ "value": "EUC-99990201-V1-00020000",
953
+ },
954
+ },
955
+ },
956
+ {
957
+ path: "$.nested.property",
958
+ value: {
959
+ "TaxClassificationRef": {
960
+ "value": "EUC-99990201-V1-00020000",
961
+ },
962
+ },
963
+ },
964
+ ],
965
+ },
966
+ {
967
+ serviceId: "<id>",
968
+ extendPaths: [
969
+ {
970
+ path: "$.nested.property",
971
+ value: {
972
+ "TaxClassificationRef": {
973
+ "value": "EUC-99990201-V1-00020000",
974
+ },
975
+ },
976
+ },
977
+ {
978
+ path: "$.nested.property",
979
+ value: {
980
+ "TaxClassificationRef": {
981
+ "value": "EUC-99990201-V1-00020000",
982
+ },
983
+ },
984
+ },
985
+ {
986
+ path: "$.nested.property",
987
+ value: {
988
+ "TaxClassificationRef": {
989
+ "value": "EUC-99990201-V1-00020000",
990
+ },
991
+ },
992
+ },
993
+ ],
994
+ },
995
+ ],
996
+ },
997
+ });
998
+ expect(result.httpMeta.response.status).toBe(201);
999
+ expect(result.createCompanyResponse).toBeDefined();
1000
+ expect(result.createCompanyResponse).toEqual({
1001
+ statusCode: 200,
1002
+ status: "OK",
1003
+ service: "zoho-crm",
1004
+ resource: "companies",
1005
+ operation: "add",
1006
+ data: {
1007
+ id: "12345",
1008
+ },
1009
+ });
727
1010
  });
728
1011
 
729
1012
  test("Companies Crm Companies One", async () => {
@@ -1030,10 +1313,256 @@ test("Companies Crm Companies One", async () => {
1030
1313
  });
1031
1314
  });
1032
1315
 
1033
- it.skip("Companies Crm Companies Update", async () => {
1034
- assert.fail(
1035
- "incomplete test found please make sure to address the following errors: [`workflow step crm.companiesUpdate.test referencing operation crm.companiesUpdate with expression in requestBody with type not currently supported`]",
1036
- );
1316
+ test("Companies Crm Companies Update", async () => {
1317
+ const testHttpClient = createTestHTTPClient("crm.companiesUpdate");
1318
+
1319
+ const apideck = new Apideck({
1320
+ serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
1321
+ httpClient: testHttpClient,
1322
+ apiKey: process.env["APIDECK_API_KEY"] ?? "value",
1323
+ });
1324
+
1325
+ const result = await apideck.crm.companies.update({
1326
+ id: "<id>",
1327
+ consumerId: "test-consumer",
1328
+ appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
1329
+ serviceId: "salesforce",
1330
+ company1: {
1331
+ name: "SpaceX",
1332
+ ownerId: "12345",
1333
+ image: "https://www.spacex.com/static/images/share.jpg",
1334
+ description:
1335
+ "Space Exploration Technologies Corp. is an American aerospace manufacturer, space transportation services and communications company headquartered in Hawthorne, California.",
1336
+ vatNumber: "BE0689615164",
1337
+ currency: "USD",
1338
+ status: "Open",
1339
+ fax: "+12129876543",
1340
+ annualRevenue: "+$35m",
1341
+ numberOfEmployees: "500-1000",
1342
+ industry: "Apparel",
1343
+ ownership: "Public",
1344
+ salesTaxNumber: "12456EN",
1345
+ payeeNumber: "78932EN",
1346
+ abnOrTfn: "46 115 614 695",
1347
+ abnBranch: "123",
1348
+ acn: "XXX XXX XXX",
1349
+ firstName: "Elon",
1350
+ lastName: "Musk",
1351
+ bankAccounts: [
1352
+ {
1353
+ bankName: "Monzo",
1354
+ accountNumber: "123465",
1355
+ accountName: "SPACEX LLC",
1356
+ accountType: "credit_card",
1357
+ iban: "CH2989144532982975332",
1358
+ bic: "AUDSCHGGXXX",
1359
+ routingNumber: "012345678",
1360
+ bsbNumber: "062-001",
1361
+ branchIdentifier: "001",
1362
+ bankCode: "BNH",
1363
+ currency: "USD",
1364
+ },
1365
+ {
1366
+ bankName: "Monzo",
1367
+ accountNumber: "123465",
1368
+ accountName: "SPACEX LLC",
1369
+ accountType: "credit_card",
1370
+ iban: "CH2989144532982975332",
1371
+ bic: "AUDSCHGGXXX",
1372
+ routingNumber: "012345678",
1373
+ bsbNumber: "062-001",
1374
+ branchIdentifier: "001",
1375
+ bankCode: "BNH",
1376
+ currency: "USD",
1377
+ },
1378
+ {
1379
+ bankName: "Monzo",
1380
+ accountNumber: "123465",
1381
+ accountName: "SPACEX LLC",
1382
+ accountType: "credit_card",
1383
+ iban: "CH2989144532982975332",
1384
+ bic: "AUDSCHGGXXX",
1385
+ routingNumber: "012345678",
1386
+ bsbNumber: "062-001",
1387
+ branchIdentifier: "001",
1388
+ bankCode: "BNH",
1389
+ currency: "USD",
1390
+ },
1391
+ ],
1392
+ websites: [
1393
+ {
1394
+ id: "12345",
1395
+ url: "http://example.com",
1396
+ type: "primary",
1397
+ },
1398
+ {
1399
+ id: "12345",
1400
+ url: "http://example.com",
1401
+ type: "primary",
1402
+ },
1403
+ ],
1404
+ addresses: [
1405
+ {
1406
+ id: "123",
1407
+ type: "primary",
1408
+ string: "25 Spring Street, Blackburn, VIC 3130",
1409
+ name: "HQ US",
1410
+ line1: "Main street",
1411
+ line2: "apt #",
1412
+ line3: "Suite #",
1413
+ line4: "delivery instructions",
1414
+ streetNumber: "25",
1415
+ city: "San Francisco",
1416
+ state: "CA",
1417
+ postalCode: "94104",
1418
+ country: "US",
1419
+ latitude: "40.759211",
1420
+ longitude: "-73.984638",
1421
+ county: "Santa Clara",
1422
+ contactName: "Elon Musk",
1423
+ salutation: "Mr",
1424
+ phoneNumber: "111-111-1111",
1425
+ fax: "122-111-1111",
1426
+ email: "elon@musk.com",
1427
+ website: "https://elonmusk.com",
1428
+ notes: "Address notes or delivery instructions.",
1429
+ rowVersion: "1-12345",
1430
+ },
1431
+ {
1432
+ id: "123",
1433
+ type: "primary",
1434
+ string: "25 Spring Street, Blackburn, VIC 3130",
1435
+ name: "HQ US",
1436
+ line1: "Main street",
1437
+ line2: "apt #",
1438
+ line3: "Suite #",
1439
+ line4: "delivery instructions",
1440
+ streetNumber: "25",
1441
+ city: "San Francisco",
1442
+ state: "CA",
1443
+ postalCode: "94104",
1444
+ country: "US",
1445
+ latitude: "40.759211",
1446
+ longitude: "-73.984638",
1447
+ county: "Santa Clara",
1448
+ contactName: "Elon Musk",
1449
+ salutation: "Mr",
1450
+ phoneNumber: "111-111-1111",
1451
+ fax: "122-111-1111",
1452
+ email: "elon@musk.com",
1453
+ website: "https://elonmusk.com",
1454
+ notes: "Address notes or delivery instructions.",
1455
+ rowVersion: "1-12345",
1456
+ },
1457
+ ],
1458
+ socialLinks: [
1459
+ {
1460
+ id: "12345",
1461
+ url: "https://www.twitter.com/apideck",
1462
+ type: "twitter",
1463
+ },
1464
+ {
1465
+ id: "12345",
1466
+ url: "https://www.twitter.com/apideck",
1467
+ type: "twitter",
1468
+ },
1469
+ {
1470
+ id: "12345",
1471
+ url: "https://www.twitter.com/apideck",
1472
+ type: "twitter",
1473
+ },
1474
+ ],
1475
+ phoneNumbers: [
1476
+ {
1477
+ id: "12345",
1478
+ countryCode: "1",
1479
+ areaCode: "323",
1480
+ number: "111-111-1111",
1481
+ extension: "105",
1482
+ type: "primary",
1483
+ },
1484
+ {
1485
+ id: "12345",
1486
+ countryCode: "1",
1487
+ areaCode: "323",
1488
+ number: "111-111-1111",
1489
+ extension: "105",
1490
+ type: "primary",
1491
+ },
1492
+ ],
1493
+ emails: [
1494
+ {
1495
+ id: "123",
1496
+ email: "elon@musk.com",
1497
+ type: "primary",
1498
+ },
1499
+ {
1500
+ id: "123",
1501
+ email: "elon@musk.com",
1502
+ type: "primary",
1503
+ },
1504
+ ],
1505
+ rowType: {
1506
+ id: "12345",
1507
+ name: "Customer Account",
1508
+ },
1509
+ customFields: [
1510
+ {
1511
+ id: "2389328923893298",
1512
+ name: "employee_level",
1513
+ description: "Employee Level",
1514
+ value: "Uses Salesforce and Marketo",
1515
+ },
1516
+ {
1517
+ id: "2389328923893298",
1518
+ name: "employee_level",
1519
+ description: "Employee Level",
1520
+ value: [
1521
+ {},
1522
+ ],
1523
+ },
1524
+ {
1525
+ id: "2389328923893298",
1526
+ name: "employee_level",
1527
+ description: "Employee Level",
1528
+ value: 10,
1529
+ },
1530
+ ],
1531
+ tags: [
1532
+ "New",
1533
+ ],
1534
+ readOnly: false,
1535
+ salutation: "Mr",
1536
+ birthday: new RFCDate("2000-08-12"),
1537
+ passThrough: [
1538
+ {
1539
+ serviceId: "<id>",
1540
+ extendPaths: [
1541
+ {
1542
+ path: "$.nested.property",
1543
+ value: {
1544
+ "TaxClassificationRef": {
1545
+ "value": "EUC-99990201-V1-00020000",
1546
+ },
1547
+ },
1548
+ },
1549
+ ],
1550
+ },
1551
+ ],
1552
+ },
1553
+ });
1554
+ expect(result.httpMeta.response.status).toBe(200);
1555
+ expect(result.updateCompanyResponse).toBeDefined();
1556
+ expect(result.updateCompanyResponse).toEqual({
1557
+ statusCode: 200,
1558
+ status: "OK",
1559
+ service: "zoho-crm",
1560
+ resource: "companies",
1561
+ operation: "update",
1562
+ data: {
1563
+ id: "12345",
1564
+ },
1565
+ });
1037
1566
  });
1038
1567
 
1039
1568
  test("Companies Crm Companies Delete", async () => {