@apideck/unify 0.26.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 (142) 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/ledgeraccount.d.ts +9 -9
  43. package/models/components/ledgeraccount.d.ts.map +1 -1
  44. package/models/components/ledgeraccount.js +19 -15
  45. package/models/components/ledgeraccount.js.map +1 -1
  46. package/models/components/ledgeraccountsfilter.d.ts +61 -0
  47. package/models/components/ledgeraccountsfilter.d.ts.map +1 -1
  48. package/models/components/ledgeraccountsfilter.js +33 -1
  49. package/models/components/ledgeraccountsfilter.js.map +1 -1
  50. package/models/components/supplier.d.ts +10 -0
  51. package/models/components/supplier.d.ts.map +1 -1
  52. package/models/components/supplier.js +4 -0
  53. package/models/components/supplier.js.map +1 -1
  54. package/models/errors/apierror.d.ts.map +1 -1
  55. package/models/errors/apierror.js +8 -2
  56. package/models/errors/apierror.js.map +1 -1
  57. package/models/errors/badrequestresponse.js +1 -1
  58. package/models/errors/badrequestresponse.js.map +1 -1
  59. package/models/errors/notfoundresponse.js +1 -1
  60. package/models/errors/notfoundresponse.js.map +1 -1
  61. package/models/errors/paymentrequiredresponse.js +1 -1
  62. package/models/errors/paymentrequiredresponse.js.map +1 -1
  63. package/models/errors/unauthorizedresponse.js +1 -1
  64. package/models/errors/unauthorizedresponse.js.map +1 -1
  65. package/models/errors/unprocessableresponse.js +1 -1
  66. package/models/errors/unprocessableresponse.js.map +1 -1
  67. package/models/operations/crmcompaniesadd.d.ts +2 -2
  68. package/models/operations/crmcompaniesadd.d.ts.map +1 -1
  69. package/models/operations/crmcompaniesadd.js +4 -4
  70. package/models/operations/crmcompaniesadd.js.map +1 -1
  71. package/models/operations/crmcompaniesupdate.d.ts +2 -2
  72. package/models/operations/crmcompaniesupdate.d.ts.map +1 -1
  73. package/models/operations/crmcompaniesupdate.js +4 -4
  74. package/models/operations/crmcompaniesupdate.js.map +1 -1
  75. package/package.json +1 -1
  76. package/src/__tests__/activities.test.ts +360 -9
  77. package/src/__tests__/apideckcompanies.test.ts +373 -9
  78. package/src/__tests__/apideckdepartments.test.ts +181 -9
  79. package/src/__tests__/applicants.test.ts +473 -9
  80. package/src/__tests__/applications.test.ts +189 -9
  81. package/src/__tests__/billpayments.test.ts +367 -9
  82. package/src/__tests__/bills.test.ts +500 -9
  83. package/src/__tests__/collectionticketcomments.test.ts +183 -7
  84. package/src/__tests__/collectiontickets.test.ts +191 -7
  85. package/src/__tests__/companies.test.ts +538 -9
  86. package/src/__tests__/connections.test.ts +409 -5
  87. package/src/__tests__/connectionsettings.test.ts +410 -5
  88. package/src/__tests__/contacts.test.ts +466 -9
  89. package/src/__tests__/creditnotes.test.ts +758 -87
  90. package/src/__tests__/customers.test.ts +513 -9
  91. package/src/__tests__/customobjects.test.ts +150 -9
  92. package/src/__tests__/customobjectschemas.test.ts +321 -9
  93. package/src/__tests__/departments.test.ts +173 -9
  94. package/src/__tests__/drivegroups.test.ts +181 -9
  95. package/src/__tests__/drives.test.ts +179 -9
  96. package/src/__tests__/employees.test.ts +829 -94
  97. package/src/__tests__/expenses.test.ts +332 -9
  98. package/src/__tests__/files.test.ts +106 -5
  99. package/src/__tests__/folders.test.ts +296 -13
  100. package/src/__tests__/invoiceitems.test.ts +272 -9
  101. package/src/__tests__/invoices.test.ts +673 -67
  102. package/src/__tests__/journalentries.test.ts +490 -8
  103. package/src/__tests__/leads.test.ts +446 -9
  104. package/src/__tests__/ledgeraccounts.test.ts +237 -8
  105. package/src/__tests__/locations.test.ts +298 -9
  106. package/src/__tests__/messages.test.ts +195 -9
  107. package/src/__tests__/notes.test.ts +191 -9
  108. package/src/__tests__/opportunities.test.ts +218 -9
  109. package/src/__tests__/payments.test.ts +312 -9
  110. package/src/__tests__/pipelines.test.ts +194 -9
  111. package/src/__tests__/purchaseorders.test.ts +773 -104
  112. package/src/__tests__/sharedlinks.test.ts +183 -9
  113. package/src/__tests__/subsidiaries.test.ts +183 -9
  114. package/src/__tests__/suppliers.test.ts +505 -9
  115. package/src/__tests__/taxrates.test.ts +232 -9
  116. package/src/__tests__/timeoffrequests.test.ts +210 -9
  117. package/src/__tests__/trackingcategories.test.ts +187 -7
  118. package/src/__tests__/uploadsessions.test.ts +78 -5
  119. package/src/__tests__/users.test.ts +356 -9
  120. package/src/funcs/crmCompaniesCreate.ts +1 -1
  121. package/src/funcs/crmCompaniesUpdate.ts +1 -1
  122. package/src/lib/config.ts +4 -4
  123. package/src/models/components/bankaccount.ts +7 -0
  124. package/src/models/components/bankaccount1.ts +207 -0
  125. package/src/models/components/{company.ts → company1.ts} +131 -128
  126. package/src/models/components/companyinfo.ts +9 -0
  127. package/src/models/components/getcompaniesresponse.ts +9 -9
  128. package/src/models/components/getcompanyresponse.ts +9 -9
  129. package/src/models/components/index.ts +2 -1
  130. package/src/models/components/ledgeraccount.ts +25 -19
  131. package/src/models/components/ledgeraccountsfilter.ts +49 -0
  132. package/src/models/components/supplier.ts +14 -0
  133. package/src/models/errors/apierror.ts +8 -2
  134. package/src/models/errors/badrequestresponse.ts +1 -1
  135. package/src/models/errors/notfoundresponse.ts +1 -1
  136. package/src/models/errors/paymentrequiredresponse.ts +1 -1
  137. package/src/models/errors/unauthorizedresponse.ts +1 -1
  138. package/src/models/errors/unprocessableresponse.ts +1 -1
  139. package/src/models/operations/crmcompaniesadd.ts +6 -6
  140. package/src/models/operations/crmcompaniesupdate.ts +6 -6
  141. package/models/components/company.d.ts.map +0 -1
  142. 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
 
@@ -185,10 +185,85 @@ test("Trackingcategories Accounting Tracking Categories All", async () => {
185
185
  });
186
186
  });
187
187
 
188
- it.skip("Trackingcategories Accounting Tracking Categories Add", async () => {
189
- assert.fail(
190
- "incomplete test found please make sure to address the following errors: [`workflow step accounting.trackingCategoriesAdd.test referencing operation accounting.trackingCategoriesAdd with expression in requestBody with type not currently supported`, `workflow step accounting.trackingCategoriesAdd.test referencing operation accounting.trackingCategoriesAdd with expression in requestBody with type not currently supported`, `workflow step accounting.trackingCategoriesAdd.test referencing operation accounting.trackingCategoriesAdd with expression in requestBody with type not currently supported`, `workflow step accounting.trackingCategoriesAdd.test referencing operation accounting.trackingCategoriesAdd with expression in requestBody with type not currently supported`]",
188
+ test("Trackingcategories Accounting Tracking Categories Add", async () => {
189
+ const testHttpClient = createTestHTTPClient(
190
+ "accounting.trackingCategoriesAdd",
191
191
  );
192
+
193
+ const apideck = new Apideck({
194
+ serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
195
+ httpClient: testHttpClient,
196
+ apiKey: process.env["APIDECK_API_KEY"] ?? "value",
197
+ });
198
+
199
+ const result = await apideck.accounting.trackingCategories.create({
200
+ consumerId: "test-consumer",
201
+ appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
202
+ serviceId: "salesforce",
203
+ trackingCategory: {
204
+ parentId: "12345",
205
+ name: "Department",
206
+ code: "100",
207
+ status: "active",
208
+ rowVersion: "1-12345",
209
+ passThrough: [
210
+ {
211
+ serviceId: "<id>",
212
+ extendPaths: [
213
+ {
214
+ path: "$.nested.property",
215
+ value: {
216
+ "TaxClassificationRef": {
217
+ "value": "EUC-99990201-V1-00020000",
218
+ },
219
+ },
220
+ },
221
+ {
222
+ path: "$.nested.property",
223
+ value: {
224
+ "TaxClassificationRef": {
225
+ "value": "EUC-99990201-V1-00020000",
226
+ },
227
+ },
228
+ },
229
+ ],
230
+ },
231
+ {
232
+ serviceId: "<id>",
233
+ extendPaths: [
234
+ {
235
+ path: "$.nested.property",
236
+ value: {
237
+ "TaxClassificationRef": {
238
+ "value": "EUC-99990201-V1-00020000",
239
+ },
240
+ },
241
+ },
242
+ {
243
+ path: "$.nested.property",
244
+ value: {
245
+ "TaxClassificationRef": {
246
+ "value": "EUC-99990201-V1-00020000",
247
+ },
248
+ },
249
+ },
250
+ ],
251
+ },
252
+ ],
253
+ },
254
+ });
255
+ expect(result.httpMeta.response.status).toBe(201);
256
+ expect(result.createTrackingCategoryResponse).toBeDefined();
257
+ expect(result.createTrackingCategoryResponse).toEqual({
258
+ statusCode: 200,
259
+ status: "OK",
260
+ service: "quickbooks",
261
+ resource: "tracking-categories",
262
+ operation: "add",
263
+ data: {
264
+ id: "12345",
265
+ },
266
+ });
192
267
  });
193
268
 
194
269
  test("Trackingcategories Accounting Tracking Categories One", async () => {
@@ -297,10 +372,115 @@ test("Trackingcategories Accounting Tracking Categories One", async () => {
297
372
  });
298
373
  });
299
374
 
300
- it.skip("Trackingcategories Accounting Tracking Categories Update", async () => {
301
- assert.fail(
302
- "incomplete test found please make sure to address the following errors: [`workflow step accounting.trackingCategoriesUpdate.test referencing operation accounting.trackingCategoriesUpdate with expression in requestBody with type not currently supported`, `workflow step accounting.trackingCategoriesUpdate.test referencing operation accounting.trackingCategoriesUpdate with expression in requestBody with type not currently supported`, `workflow step accounting.trackingCategoriesUpdate.test referencing operation accounting.trackingCategoriesUpdate with expression in requestBody with type not currently supported`, `workflow step accounting.trackingCategoriesUpdate.test referencing operation accounting.trackingCategoriesUpdate with expression in requestBody with type not currently supported`, `workflow step accounting.trackingCategoriesUpdate.test referencing operation accounting.trackingCategoriesUpdate with expression in requestBody with type not currently supported`, `workflow step accounting.trackingCategoriesUpdate.test referencing operation accounting.trackingCategoriesUpdate with expression in requestBody with type not currently supported`, `workflow step accounting.trackingCategoriesUpdate.test referencing operation accounting.trackingCategoriesUpdate with expression in requestBody with type not currently supported`]",
375
+ test("Trackingcategories Accounting Tracking Categories Update", async () => {
376
+ const testHttpClient = createTestHTTPClient(
377
+ "accounting.trackingCategoriesUpdate",
303
378
  );
379
+
380
+ const apideck = new Apideck({
381
+ serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
382
+ httpClient: testHttpClient,
383
+ apiKey: process.env["APIDECK_API_KEY"] ?? "value",
384
+ });
385
+
386
+ const result = await apideck.accounting.trackingCategories.update({
387
+ id: "<id>",
388
+ consumerId: "test-consumer",
389
+ appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
390
+ serviceId: "salesforce",
391
+ trackingCategory: {
392
+ parentId: "12345",
393
+ name: "Department",
394
+ code: "100",
395
+ status: "active",
396
+ rowVersion: "1-12345",
397
+ passThrough: [
398
+ {
399
+ serviceId: "<id>",
400
+ extendPaths: [
401
+ {
402
+ path: "$.nested.property",
403
+ value: {
404
+ "TaxClassificationRef": {
405
+ "value": "EUC-99990201-V1-00020000",
406
+ },
407
+ },
408
+ },
409
+ {
410
+ path: "$.nested.property",
411
+ value: {
412
+ "TaxClassificationRef": {
413
+ "value": "EUC-99990201-V1-00020000",
414
+ },
415
+ },
416
+ },
417
+ ],
418
+ },
419
+ {
420
+ serviceId: "<id>",
421
+ extendPaths: [
422
+ {
423
+ path: "$.nested.property",
424
+ value: {
425
+ "TaxClassificationRef": {
426
+ "value": "EUC-99990201-V1-00020000",
427
+ },
428
+ },
429
+ },
430
+ {
431
+ path: "$.nested.property",
432
+ value: {
433
+ "TaxClassificationRef": {
434
+ "value": "EUC-99990201-V1-00020000",
435
+ },
436
+ },
437
+ },
438
+ ],
439
+ },
440
+ {
441
+ serviceId: "<id>",
442
+ extendPaths: [
443
+ {
444
+ path: "$.nested.property",
445
+ value: {
446
+ "TaxClassificationRef": {
447
+ "value": "EUC-99990201-V1-00020000",
448
+ },
449
+ },
450
+ },
451
+ {
452
+ path: "$.nested.property",
453
+ value: {
454
+ "TaxClassificationRef": {
455
+ "value": "EUC-99990201-V1-00020000",
456
+ },
457
+ },
458
+ },
459
+ {
460
+ path: "$.nested.property",
461
+ value: {
462
+ "TaxClassificationRef": {
463
+ "value": "EUC-99990201-V1-00020000",
464
+ },
465
+ },
466
+ },
467
+ ],
468
+ },
469
+ ],
470
+ },
471
+ });
472
+ expect(result.httpMeta.response.status).toBe(200);
473
+ expect(result.updateTrackingCategoryResponse).toBeDefined();
474
+ expect(result.updateTrackingCategoryResponse).toEqual({
475
+ statusCode: 200,
476
+ status: "OK",
477
+ service: "quickbooks",
478
+ resource: "tracking-categories",
479
+ operation: "update",
480
+ data: {
481
+ id: "12345",
482
+ },
483
+ });
304
484
  });
305
485
 
306
486
  test("Trackingcategories Accounting Tracking Categories Delete", async () => {
@@ -2,14 +2,87 @@
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
 
9
- it.skip("Uploadsessions File Storage Upload Sessions Add", async () => {
10
- assert.fail(
11
- "incomplete test found please make sure to address the following errors: [`workflow step fileStorage.uploadSessionsAdd.test referencing operation fileStorage.uploadSessionsAdd with expression in requestBody with type not currently supported`, `workflow step fileStorage.uploadSessionsAdd.test referencing operation fileStorage.uploadSessionsAdd with expression in requestBody with type not currently supported`, `workflow step fileStorage.uploadSessionsAdd.test referencing operation fileStorage.uploadSessionsAdd with expression in requestBody with type not currently supported`, `workflow step fileStorage.uploadSessionsAdd.test referencing operation fileStorage.uploadSessionsAdd with expression in requestBody with type not currently supported`]",
12
- );
9
+ test("Uploadsessions File Storage Upload Sessions Add", async () => {
10
+ const testHttpClient = createTestHTTPClient("fileStorage.uploadSessionsAdd");
11
+
12
+ const apideck = new Apideck({
13
+ httpClient: testHttpClient,
14
+ apiKey: process.env["APIDECK_API_KEY"] ?? "value",
15
+ });
16
+
17
+ const result = await apideck.fileStorage.uploadSessions.create({
18
+ consumerId: "test-consumer",
19
+ appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
20
+ serviceId: "salesforce",
21
+ createUploadSessionRequest: {
22
+ name: "Documents",
23
+ parentFolderId: "1234",
24
+ driveId: "1234",
25
+ size: 1810673,
26
+ passThrough: [
27
+ {
28
+ serviceId: "<id>",
29
+ extendPaths: [
30
+ {
31
+ path: "$.nested.property",
32
+ value: {
33
+ "TaxClassificationRef": {
34
+ "value": "EUC-99990201-V1-00020000",
35
+ },
36
+ },
37
+ },
38
+ {
39
+ path: "$.nested.property",
40
+ value: {
41
+ "TaxClassificationRef": {
42
+ "value": "EUC-99990201-V1-00020000",
43
+ },
44
+ },
45
+ },
46
+ ],
47
+ },
48
+ {
49
+ serviceId: "<id>",
50
+ extendPaths: [
51
+ {
52
+ path: "$.nested.property",
53
+ value: {
54
+ "TaxClassificationRef": {
55
+ "value": "EUC-99990201-V1-00020000",
56
+ },
57
+ },
58
+ },
59
+ {
60
+ path: "$.nested.property",
61
+ value: {
62
+ "TaxClassificationRef": {
63
+ "value": "EUC-99990201-V1-00020000",
64
+ },
65
+ },
66
+ },
67
+ ],
68
+ },
69
+ ],
70
+ },
71
+ }, {
72
+ serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
73
+ });
74
+ expect(result.httpMeta.response.status).toBe(201);
75
+ expect(result.createUploadSessionResponse).toBeDefined();
76
+ expect(result.createUploadSessionResponse).toEqual({
77
+ statusCode: 200,
78
+ status: "OK",
79
+ service: "dropbox",
80
+ resource: "UploadSessions",
81
+ operation: "one",
82
+ data: {
83
+ id: "12345",
84
+ },
85
+ });
13
86
  });
14
87
 
15
88
  test("Uploadsessions File Storage Upload Sessions One", 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
 
@@ -425,10 +425,141 @@ test("Users Crm Users All", async () => {
425
425
  });
426
426
  });
427
427
 
428
- it.skip("Users Crm Users Add", async () => {
429
- assert.fail(
430
- "incomplete test found please make sure to address the following errors: [`workflow step crm.usersAdd.test referencing operation crm.usersAdd with expression in requestBody with type not currently supported`]",
431
- );
428
+ test("Users Crm Users Add", async () => {
429
+ const testHttpClient = createTestHTTPClient("crm.usersAdd");
430
+
431
+ const apideck = new Apideck({
432
+ serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
433
+ httpClient: testHttpClient,
434
+ apiKey: process.env["APIDECK_API_KEY"] ?? "value",
435
+ });
436
+
437
+ const result = await apideck.crm.users.create({
438
+ consumerId: "test-consumer",
439
+ appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
440
+ serviceId: "salesforce",
441
+ user: {
442
+ parentId: "54321",
443
+ username: "masterofcoin",
444
+ firstName: "Elon",
445
+ lastName: "Musk",
446
+ title: "CEO",
447
+ division: "Europe",
448
+ companyName: "SpaceX",
449
+ employeeNumber: "123456-AB",
450
+ description: "A description",
451
+ image: "https://logo.clearbit.com/spacex.com?s=128",
452
+ language: "EN",
453
+ status: "active",
454
+ password: "supersecretpassword",
455
+ addresses: [
456
+ {
457
+ id: "123",
458
+ type: "primary",
459
+ string: "25 Spring Street, Blackburn, VIC 3130",
460
+ name: "HQ US",
461
+ line1: "Main street",
462
+ line2: "apt #",
463
+ line3: "Suite #",
464
+ line4: "delivery instructions",
465
+ streetNumber: "25",
466
+ city: "San Francisco",
467
+ state: "CA",
468
+ postalCode: "94104",
469
+ country: "US",
470
+ latitude: "40.759211",
471
+ longitude: "-73.984638",
472
+ county: "Santa Clara",
473
+ contactName: "Elon Musk",
474
+ salutation: "Mr",
475
+ phoneNumber: "111-111-1111",
476
+ fax: "122-111-1111",
477
+ email: "elon@musk.com",
478
+ website: "https://elonmusk.com",
479
+ notes: "Address notes or delivery instructions.",
480
+ rowVersion: "1-12345",
481
+ },
482
+ {
483
+ id: "123",
484
+ type: "primary",
485
+ string: "25 Spring Street, Blackburn, VIC 3130",
486
+ name: "HQ US",
487
+ line1: "Main street",
488
+ line2: "apt #",
489
+ line3: "Suite #",
490
+ line4: "delivery instructions",
491
+ streetNumber: "25",
492
+ city: "San Francisco",
493
+ state: "CA",
494
+ postalCode: "94104",
495
+ country: "US",
496
+ latitude: "40.759211",
497
+ longitude: "-73.984638",
498
+ county: "Santa Clara",
499
+ contactName: "Elon Musk",
500
+ salutation: "Mr",
501
+ phoneNumber: "111-111-1111",
502
+ fax: "122-111-1111",
503
+ email: "elon@musk.com",
504
+ website: "https://elonmusk.com",
505
+ notes: "Address notes or delivery instructions.",
506
+ rowVersion: "1-12345",
507
+ },
508
+ ],
509
+ phoneNumbers: [
510
+ {
511
+ id: "12345",
512
+ countryCode: "1",
513
+ areaCode: "323",
514
+ number: "111-111-1111",
515
+ extension: "105",
516
+ type: "primary",
517
+ },
518
+ {
519
+ id: "12345",
520
+ countryCode: "1",
521
+ areaCode: "323",
522
+ number: "111-111-1111",
523
+ extension: "105",
524
+ type: "primary",
525
+ },
526
+ ],
527
+ emails: [
528
+ {
529
+ id: "123",
530
+ email: "elon@musk.com",
531
+ type: "primary",
532
+ },
533
+ ],
534
+ passThrough: [
535
+ {
536
+ serviceId: "<id>",
537
+ extendPaths: [
538
+ {
539
+ path: "$.nested.property",
540
+ value: {
541
+ "TaxClassificationRef": {
542
+ "value": "EUC-99990201-V1-00020000",
543
+ },
544
+ },
545
+ },
546
+ ],
547
+ },
548
+ ],
549
+ },
550
+ });
551
+ expect(result.httpMeta.response.status).toBe(201);
552
+ expect(result.createUserResponse).toBeDefined();
553
+ expect(result.createUserResponse).toEqual({
554
+ statusCode: 200,
555
+ status: "OK",
556
+ service: "zoho-crm",
557
+ resource: "users",
558
+ operation: "add",
559
+ data: {
560
+ id: "12345",
561
+ },
562
+ });
432
563
  });
433
564
 
434
565
  test("Users Crm Users One", async () => {
@@ -637,10 +768,226 @@ test("Users Crm Users One", async () => {
637
768
  });
638
769
  });
639
770
 
640
- it.skip("Users Crm Users Update", async () => {
641
- assert.fail(
642
- "incomplete test found please make sure to address the following errors: [`workflow step crm.usersUpdate.test referencing operation crm.usersUpdate with expression in requestBody with type not currently supported`, `workflow step crm.usersUpdate.test referencing operation crm.usersUpdate with expression in requestBody with type not currently supported`, `workflow step crm.usersUpdate.test referencing operation crm.usersUpdate with expression in requestBody with type not currently supported`, `workflow step crm.usersUpdate.test referencing operation crm.usersUpdate with expression in requestBody with type not currently supported`, `workflow step crm.usersUpdate.test referencing operation crm.usersUpdate with expression in requestBody with type not currently supported`, `workflow step crm.usersUpdate.test referencing operation crm.usersUpdate with expression in requestBody with type not currently supported`, `workflow step crm.usersUpdate.test referencing operation crm.usersUpdate with expression in requestBody with type not currently supported`]",
643
- );
771
+ test("Users Crm Users Update", async () => {
772
+ const testHttpClient = createTestHTTPClient("crm.usersUpdate");
773
+
774
+ const apideck = new Apideck({
775
+ serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
776
+ httpClient: testHttpClient,
777
+ apiKey: process.env["APIDECK_API_KEY"] ?? "value",
778
+ });
779
+
780
+ const result = await apideck.crm.users.update({
781
+ id: "<id>",
782
+ consumerId: "test-consumer",
783
+ appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
784
+ serviceId: "salesforce",
785
+ user: {
786
+ parentId: "54321",
787
+ username: "masterofcoin",
788
+ firstName: "Elon",
789
+ lastName: "Musk",
790
+ title: "CEO",
791
+ division: "Europe",
792
+ companyName: "SpaceX",
793
+ employeeNumber: "123456-AB",
794
+ description: "A description",
795
+ image: "https://logo.clearbit.com/spacex.com?s=128",
796
+ language: "EN",
797
+ status: "active",
798
+ password: "supersecretpassword",
799
+ addresses: [
800
+ {
801
+ id: "123",
802
+ type: "primary",
803
+ string: "25 Spring Street, Blackburn, VIC 3130",
804
+ name: "HQ US",
805
+ line1: "Main street",
806
+ line2: "apt #",
807
+ line3: "Suite #",
808
+ line4: "delivery instructions",
809
+ streetNumber: "25",
810
+ city: "San Francisco",
811
+ state: "CA",
812
+ postalCode: "94104",
813
+ country: "US",
814
+ latitude: "40.759211",
815
+ longitude: "-73.984638",
816
+ county: "Santa Clara",
817
+ contactName: "Elon Musk",
818
+ salutation: "Mr",
819
+ phoneNumber: "111-111-1111",
820
+ fax: "122-111-1111",
821
+ email: "elon@musk.com",
822
+ website: "https://elonmusk.com",
823
+ notes: "Address notes or delivery instructions.",
824
+ rowVersion: "1-12345",
825
+ },
826
+ {
827
+ id: "123",
828
+ type: "primary",
829
+ string: "25 Spring Street, Blackburn, VIC 3130",
830
+ name: "HQ US",
831
+ line1: "Main street",
832
+ line2: "apt #",
833
+ line3: "Suite #",
834
+ line4: "delivery instructions",
835
+ streetNumber: "25",
836
+ city: "San Francisco",
837
+ state: "CA",
838
+ postalCode: "94104",
839
+ country: "US",
840
+ latitude: "40.759211",
841
+ longitude: "-73.984638",
842
+ county: "Santa Clara",
843
+ contactName: "Elon Musk",
844
+ salutation: "Mr",
845
+ phoneNumber: "111-111-1111",
846
+ fax: "122-111-1111",
847
+ email: "elon@musk.com",
848
+ website: "https://elonmusk.com",
849
+ notes: "Address notes or delivery instructions.",
850
+ rowVersion: "1-12345",
851
+ },
852
+ {
853
+ id: "123",
854
+ type: "primary",
855
+ string: "25 Spring Street, Blackburn, VIC 3130",
856
+ name: "HQ US",
857
+ line1: "Main street",
858
+ line2: "apt #",
859
+ line3: "Suite #",
860
+ line4: "delivery instructions",
861
+ streetNumber: "25",
862
+ city: "San Francisco",
863
+ state: "CA",
864
+ postalCode: "94104",
865
+ country: "US",
866
+ latitude: "40.759211",
867
+ longitude: "-73.984638",
868
+ county: "Santa Clara",
869
+ contactName: "Elon Musk",
870
+ salutation: "Mr",
871
+ phoneNumber: "111-111-1111",
872
+ fax: "122-111-1111",
873
+ email: "elon@musk.com",
874
+ website: "https://elonmusk.com",
875
+ notes: "Address notes or delivery instructions.",
876
+ rowVersion: "1-12345",
877
+ },
878
+ ],
879
+ phoneNumbers: [
880
+ {
881
+ id: "12345",
882
+ countryCode: "1",
883
+ areaCode: "323",
884
+ number: "111-111-1111",
885
+ extension: "105",
886
+ type: "primary",
887
+ },
888
+ {
889
+ id: "12345",
890
+ countryCode: "1",
891
+ areaCode: "323",
892
+ number: "111-111-1111",
893
+ extension: "105",
894
+ type: "primary",
895
+ },
896
+ ],
897
+ emails: [
898
+ {
899
+ id: "123",
900
+ email: "elon@musk.com",
901
+ type: "primary",
902
+ },
903
+ ],
904
+ passThrough: [
905
+ {
906
+ serviceId: "<id>",
907
+ extendPaths: [
908
+ {
909
+ path: "$.nested.property",
910
+ value: {
911
+ "TaxClassificationRef": {
912
+ "value": "EUC-99990201-V1-00020000",
913
+ },
914
+ },
915
+ },
916
+ {
917
+ path: "$.nested.property",
918
+ value: {
919
+ "TaxClassificationRef": {
920
+ "value": "EUC-99990201-V1-00020000",
921
+ },
922
+ },
923
+ },
924
+ ],
925
+ },
926
+ {
927
+ serviceId: "<id>",
928
+ extendPaths: [
929
+ {
930
+ path: "$.nested.property",
931
+ value: {
932
+ "TaxClassificationRef": {
933
+ "value": "EUC-99990201-V1-00020000",
934
+ },
935
+ },
936
+ },
937
+ {
938
+ path: "$.nested.property",
939
+ value: {
940
+ "TaxClassificationRef": {
941
+ "value": "EUC-99990201-V1-00020000",
942
+ },
943
+ },
944
+ },
945
+ ],
946
+ },
947
+ {
948
+ serviceId: "<id>",
949
+ extendPaths: [
950
+ {
951
+ path: "$.nested.property",
952
+ value: {
953
+ "TaxClassificationRef": {
954
+ "value": "EUC-99990201-V1-00020000",
955
+ },
956
+ },
957
+ },
958
+ {
959
+ path: "$.nested.property",
960
+ value: {
961
+ "TaxClassificationRef": {
962
+ "value": "EUC-99990201-V1-00020000",
963
+ },
964
+ },
965
+ },
966
+ {
967
+ path: "$.nested.property",
968
+ value: {
969
+ "TaxClassificationRef": {
970
+ "value": "EUC-99990201-V1-00020000",
971
+ },
972
+ },
973
+ },
974
+ ],
975
+ },
976
+ ],
977
+ },
978
+ });
979
+ expect(result.httpMeta.response.status).toBe(200);
980
+ expect(result.updateUserResponse).toBeDefined();
981
+ expect(result.updateUserResponse).toEqual({
982
+ statusCode: 200,
983
+ status: "OK",
984
+ service: "zoho-crm",
985
+ resource: "companies",
986
+ operation: "update",
987
+ data: {
988
+ id: "12345",
989
+ },
990
+ });
644
991
  });
645
992
 
646
993
  test("Users Crm Users Delete", async () => {