@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
 
@@ -237,10 +237,88 @@ test("Messages Sms Messages All", async () => {
237
237
  });
238
238
  });
239
239
 
240
- it.skip("Messages Sms Messages Add", async () => {
241
- assert.fail(
242
- "incomplete test found please make sure to address the following errors: [`workflow step sms.messagesAdd.test referencing operation sms.messagesAdd with expression in requestBody with type not currently supported`, `workflow step sms.messagesAdd.test referencing operation sms.messagesAdd with expression in requestBody with type not currently supported`, `workflow step sms.messagesAdd.test referencing operation sms.messagesAdd with expression in requestBody with type not currently supported`, `workflow step sms.messagesAdd.test referencing operation sms.messagesAdd with expression in requestBody with type not currently supported`]",
243
- );
240
+ test("Messages Sms Messages Add", async () => {
241
+ const testHttpClient = createTestHTTPClient("sms.messagesAdd");
242
+
243
+ const apideck = new Apideck({
244
+ serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
245
+ httpClient: testHttpClient,
246
+ apiKey: process.env["APIDECK_API_KEY"] ?? "value",
247
+ });
248
+
249
+ const result = await apideck.sms.messages.create({
250
+ consumerId: "test-consumer",
251
+ appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
252
+ serviceId: "salesforce",
253
+ message: {
254
+ from: "+15017122661",
255
+ to: "+15017122662",
256
+ subject: "Picture",
257
+ body: "Hi! How are you doing?",
258
+ type: "sms",
259
+ scheduledAt: new Date("2020-09-30T07:43:32.000Z"),
260
+ webhookUrl:
261
+ "https://unify.apideck.com/webhook/webhooks/eyz329dkffdl4949/x/sms",
262
+ reference: "CUST001",
263
+ messagingServiceId: "123456",
264
+ passThrough: [
265
+ {
266
+ serviceId: "<id>",
267
+ extendPaths: [
268
+ {
269
+ path: "$.nested.property",
270
+ value: {
271
+ "TaxClassificationRef": {
272
+ "value": "EUC-99990201-V1-00020000",
273
+ },
274
+ },
275
+ },
276
+ {
277
+ path: "$.nested.property",
278
+ value: {
279
+ "TaxClassificationRef": {
280
+ "value": "EUC-99990201-V1-00020000",
281
+ },
282
+ },
283
+ },
284
+ ],
285
+ },
286
+ {
287
+ serviceId: "<id>",
288
+ extendPaths: [
289
+ {
290
+ path: "$.nested.property",
291
+ value: {
292
+ "TaxClassificationRef": {
293
+ "value": "EUC-99990201-V1-00020000",
294
+ },
295
+ },
296
+ },
297
+ {
298
+ path: "$.nested.property",
299
+ value: {
300
+ "TaxClassificationRef": {
301
+ "value": "EUC-99990201-V1-00020000",
302
+ },
303
+ },
304
+ },
305
+ ],
306
+ },
307
+ ],
308
+ },
309
+ });
310
+ expect(result.httpMeta.response.status).toBe(201);
311
+ expect(result.createMessageResponse).toBeDefined();
312
+ expect(result.createMessageResponse).toEqual({
313
+ statusCode: 200,
314
+ status: "OK",
315
+ service: "twilio",
316
+ resource: "Messages",
317
+ operation: "add",
318
+ data: {
319
+ id: "12345",
320
+ },
321
+ });
244
322
  });
245
323
 
246
324
  test("Messages Sms Messages One", async () => {
@@ -366,10 +444,118 @@ test("Messages Sms Messages One", async () => {
366
444
  });
367
445
  });
368
446
 
369
- it.skip("Messages Sms Messages Update", async () => {
370
- assert.fail(
371
- "incomplete test found please make sure to address the following errors: [`workflow step sms.messagesUpdate.test referencing operation sms.messagesUpdate with expression in requestBody with type not currently supported`, `workflow step sms.messagesUpdate.test referencing operation sms.messagesUpdate with expression in requestBody with type not currently supported`, `workflow step sms.messagesUpdate.test referencing operation sms.messagesUpdate with expression in requestBody with type not currently supported`, `workflow step sms.messagesUpdate.test referencing operation sms.messagesUpdate with expression in requestBody with type not currently supported`, `workflow step sms.messagesUpdate.test referencing operation sms.messagesUpdate with expression in requestBody with type not currently supported`, `workflow step sms.messagesUpdate.test referencing operation sms.messagesUpdate with expression in requestBody with type not currently supported`, `workflow step sms.messagesUpdate.test referencing operation sms.messagesUpdate with expression in requestBody with type not currently supported`]",
372
- );
447
+ test("Messages Sms Messages Update", async () => {
448
+ const testHttpClient = createTestHTTPClient("sms.messagesUpdate");
449
+
450
+ const apideck = new Apideck({
451
+ serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
452
+ httpClient: testHttpClient,
453
+ apiKey: process.env["APIDECK_API_KEY"] ?? "value",
454
+ });
455
+
456
+ const result = await apideck.sms.messages.update({
457
+ id: "<id>",
458
+ consumerId: "test-consumer",
459
+ appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
460
+ serviceId: "salesforce",
461
+ message: {
462
+ from: "+15017122661",
463
+ to: "+15017122662",
464
+ subject: "Picture",
465
+ body: "Hi! How are you doing?",
466
+ type: "sms",
467
+ scheduledAt: new Date("2020-09-30T07:43:32.000Z"),
468
+ webhookUrl:
469
+ "https://unify.apideck.com/webhook/webhooks/eyz329dkffdl4949/x/sms",
470
+ reference: "CUST001",
471
+ messagingServiceId: "123456",
472
+ passThrough: [
473
+ {
474
+ serviceId: "<id>",
475
+ extendPaths: [
476
+ {
477
+ path: "$.nested.property",
478
+ value: {
479
+ "TaxClassificationRef": {
480
+ "value": "EUC-99990201-V1-00020000",
481
+ },
482
+ },
483
+ },
484
+ {
485
+ path: "$.nested.property",
486
+ value: {
487
+ "TaxClassificationRef": {
488
+ "value": "EUC-99990201-V1-00020000",
489
+ },
490
+ },
491
+ },
492
+ ],
493
+ },
494
+ {
495
+ serviceId: "<id>",
496
+ extendPaths: [
497
+ {
498
+ path: "$.nested.property",
499
+ value: {
500
+ "TaxClassificationRef": {
501
+ "value": "EUC-99990201-V1-00020000",
502
+ },
503
+ },
504
+ },
505
+ {
506
+ path: "$.nested.property",
507
+ value: {
508
+ "TaxClassificationRef": {
509
+ "value": "EUC-99990201-V1-00020000",
510
+ },
511
+ },
512
+ },
513
+ ],
514
+ },
515
+ {
516
+ serviceId: "<id>",
517
+ extendPaths: [
518
+ {
519
+ path: "$.nested.property",
520
+ value: {
521
+ "TaxClassificationRef": {
522
+ "value": "EUC-99990201-V1-00020000",
523
+ },
524
+ },
525
+ },
526
+ {
527
+ path: "$.nested.property",
528
+ value: {
529
+ "TaxClassificationRef": {
530
+ "value": "EUC-99990201-V1-00020000",
531
+ },
532
+ },
533
+ },
534
+ {
535
+ path: "$.nested.property",
536
+ value: {
537
+ "TaxClassificationRef": {
538
+ "value": "EUC-99990201-V1-00020000",
539
+ },
540
+ },
541
+ },
542
+ ],
543
+ },
544
+ ],
545
+ },
546
+ });
547
+ expect(result.httpMeta.response.status).toBe(200);
548
+ expect(result.updateMessageResponse).toBeDefined();
549
+ expect(result.updateMessageResponse).toEqual({
550
+ statusCode: 200,
551
+ status: "OK",
552
+ service: "twilio",
553
+ resource: "Messages",
554
+ operation: "update",
555
+ data: {
556
+ id: "12345",
557
+ },
558
+ });
373
559
  });
374
560
 
375
561
  test("Messages Sms Messages 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
 
@@ -192,10 +192,86 @@ test("Notes Crm Notes All", async () => {
192
192
  });
193
193
  });
194
194
 
195
- it.skip("Notes Crm Notes Add", async () => {
196
- assert.fail(
197
- "incomplete test found please make sure to address the following errors: [`workflow step crm.notesAdd.test referencing operation crm.notesAdd with expression in requestBody with type not currently supported`, `workflow step crm.notesAdd.test referencing operation crm.notesAdd with expression in requestBody with type not currently supported`, `workflow step crm.notesAdd.test referencing operation crm.notesAdd with expression in requestBody with type not currently supported`, `workflow step crm.notesAdd.test referencing operation crm.notesAdd with expression in requestBody with type not currently supported`]",
198
- );
195
+ test("Notes Crm Notes Add", async () => {
196
+ const testHttpClient = createTestHTTPClient("crm.notesAdd");
197
+
198
+ const apideck = new Apideck({
199
+ serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
200
+ httpClient: testHttpClient,
201
+ apiKey: process.env["APIDECK_API_KEY"] ?? "value",
202
+ });
203
+
204
+ const result = await apideck.crm.notes.create({
205
+ consumerId: "test-consumer",
206
+ appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
207
+ serviceId: "salesforce",
208
+ note: {
209
+ title: "Meeting Notes",
210
+ content: "Office hours are 9AM-6PM",
211
+ ownerId: "12345",
212
+ contactId: "12345",
213
+ companyId: "12345",
214
+ opportunityId: "12345",
215
+ leadId: "12345",
216
+ active: true,
217
+ passThrough: [
218
+ {
219
+ serviceId: "<id>",
220
+ extendPaths: [
221
+ {
222
+ path: "$.nested.property",
223
+ value: {
224
+ "TaxClassificationRef": {
225
+ "value": "EUC-99990201-V1-00020000",
226
+ },
227
+ },
228
+ },
229
+ {
230
+ path: "$.nested.property",
231
+ value: {
232
+ "TaxClassificationRef": {
233
+ "value": "EUC-99990201-V1-00020000",
234
+ },
235
+ },
236
+ },
237
+ ],
238
+ },
239
+ {
240
+ serviceId: "<id>",
241
+ extendPaths: [
242
+ {
243
+ path: "$.nested.property",
244
+ value: {
245
+ "TaxClassificationRef": {
246
+ "value": "EUC-99990201-V1-00020000",
247
+ },
248
+ },
249
+ },
250
+ {
251
+ path: "$.nested.property",
252
+ value: {
253
+ "TaxClassificationRef": {
254
+ "value": "EUC-99990201-V1-00020000",
255
+ },
256
+ },
257
+ },
258
+ ],
259
+ },
260
+ ],
261
+ },
262
+ });
263
+ expect(result.httpMeta.response.status).toBe(201);
264
+ expect(result.createNoteResponse).toBeDefined();
265
+ expect(result.createNoteResponse).toEqual({
266
+ statusCode: 200,
267
+ status: "OK",
268
+ service: "zoho-crm",
269
+ resource: "notes",
270
+ operation: "add",
271
+ data: {
272
+ id: "12345",
273
+ },
274
+ });
199
275
  });
200
276
 
201
277
  test("Notes Crm Notes One", async () => {
@@ -305,10 +381,116 @@ test("Notes Crm Notes One", async () => {
305
381
  });
306
382
  });
307
383
 
308
- it.skip("Notes Crm Notes Update", async () => {
309
- assert.fail(
310
- "incomplete test found please make sure to address the following errors: [`workflow step crm.notesUpdate.test referencing operation crm.notesUpdate with expression in requestBody with type not currently supported`, `workflow step crm.notesUpdate.test referencing operation crm.notesUpdate with expression in requestBody with type not currently supported`, `workflow step crm.notesUpdate.test referencing operation crm.notesUpdate with expression in requestBody with type not currently supported`, `workflow step crm.notesUpdate.test referencing operation crm.notesUpdate with expression in requestBody with type not currently supported`, `workflow step crm.notesUpdate.test referencing operation crm.notesUpdate with expression in requestBody with type not currently supported`, `workflow step crm.notesUpdate.test referencing operation crm.notesUpdate with expression in requestBody with type not currently supported`, `workflow step crm.notesUpdate.test referencing operation crm.notesUpdate with expression in requestBody with type not currently supported`]",
311
- );
384
+ test("Notes Crm Notes Update", async () => {
385
+ const testHttpClient = createTestHTTPClient("crm.notesUpdate");
386
+
387
+ const apideck = new Apideck({
388
+ serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
389
+ httpClient: testHttpClient,
390
+ apiKey: process.env["APIDECK_API_KEY"] ?? "value",
391
+ });
392
+
393
+ const result = await apideck.crm.notes.update({
394
+ id: "<id>",
395
+ consumerId: "test-consumer",
396
+ appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
397
+ serviceId: "salesforce",
398
+ note: {
399
+ title: "Meeting Notes",
400
+ content: "Office hours are 9AM-6PM",
401
+ ownerId: "12345",
402
+ contactId: "12345",
403
+ companyId: "12345",
404
+ opportunityId: "12345",
405
+ leadId: "12345",
406
+ active: true,
407
+ passThrough: [
408
+ {
409
+ serviceId: "<id>",
410
+ extendPaths: [
411
+ {
412
+ path: "$.nested.property",
413
+ value: {
414
+ "TaxClassificationRef": {
415
+ "value": "EUC-99990201-V1-00020000",
416
+ },
417
+ },
418
+ },
419
+ {
420
+ path: "$.nested.property",
421
+ value: {
422
+ "TaxClassificationRef": {
423
+ "value": "EUC-99990201-V1-00020000",
424
+ },
425
+ },
426
+ },
427
+ ],
428
+ },
429
+ {
430
+ serviceId: "<id>",
431
+ extendPaths: [
432
+ {
433
+ path: "$.nested.property",
434
+ value: {
435
+ "TaxClassificationRef": {
436
+ "value": "EUC-99990201-V1-00020000",
437
+ },
438
+ },
439
+ },
440
+ {
441
+ path: "$.nested.property",
442
+ value: {
443
+ "TaxClassificationRef": {
444
+ "value": "EUC-99990201-V1-00020000",
445
+ },
446
+ },
447
+ },
448
+ ],
449
+ },
450
+ {
451
+ serviceId: "<id>",
452
+ extendPaths: [
453
+ {
454
+ path: "$.nested.property",
455
+ value: {
456
+ "TaxClassificationRef": {
457
+ "value": "EUC-99990201-V1-00020000",
458
+ },
459
+ },
460
+ },
461
+ {
462
+ path: "$.nested.property",
463
+ value: {
464
+ "TaxClassificationRef": {
465
+ "value": "EUC-99990201-V1-00020000",
466
+ },
467
+ },
468
+ },
469
+ {
470
+ path: "$.nested.property",
471
+ value: {
472
+ "TaxClassificationRef": {
473
+ "value": "EUC-99990201-V1-00020000",
474
+ },
475
+ },
476
+ },
477
+ ],
478
+ },
479
+ ],
480
+ },
481
+ });
482
+ expect(result.httpMeta.response.status).toBe(200);
483
+ expect(result.updateNoteResponse).toBeDefined();
484
+ expect(result.updateNoteResponse).toEqual({
485
+ statusCode: 200,
486
+ status: "OK",
487
+ service: "zoho-crm",
488
+ resource: "notes",
489
+ operation: "update",
490
+ data: {
491
+ id: "12345",
492
+ },
493
+ });
312
494
  });
313
495
 
314
496
  test("Notes Crm Notes 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 { RFCDate } from "../types/index.js";
8
8
  import { createTestHTTPClient } from "./testclient.js";
@@ -318,10 +318,95 @@ test("Opportunities Crm Opportunities All", async () => {
318
318
  });
319
319
  });
320
320
 
321
- it.skip("Opportunities Crm Opportunities Add", async () => {
322
- assert.fail(
323
- "incomplete test found please make sure to address the following errors: [`workflow step crm.opportunitiesAdd.test referencing operation crm.opportunitiesAdd with expression in requestBody with type not currently supported`]",
324
- );
321
+ test("Opportunities Crm Opportunities Add", async () => {
322
+ const testHttpClient = createTestHTTPClient("crm.opportunitiesAdd");
323
+
324
+ const apideck = new Apideck({
325
+ serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
326
+ httpClient: testHttpClient,
327
+ apiKey: process.env["APIDECK_API_KEY"] ?? "value",
328
+ });
329
+
330
+ const result = await apideck.crm.opportunities.create({
331
+ consumerId: "test-consumer",
332
+ appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
333
+ serviceId: "salesforce",
334
+ opportunity: {
335
+ title: "New Rocket",
336
+ primaryContactId: "12345",
337
+ description:
338
+ "Opportunities are created for People and Companies that are interested in buying your products or services. Create Opportunities for People and Companies to move them through one of your Pipelines.",
339
+ type: "Existing Customer - Upgrade",
340
+ monetaryAmount: 75000,
341
+ currency: "USD",
342
+ winProbability: 40,
343
+ closeDate: new RFCDate("2020-10-30"),
344
+ lossReasonId: "12345",
345
+ lossReason: "No budget",
346
+ wonReasonId: "12345",
347
+ wonReason: "Best pitch",
348
+ pipelineId: "12345",
349
+ pipelineStageId: "12345",
350
+ sourceId: "12345",
351
+ leadId: "12345",
352
+ leadSource: "Website",
353
+ contactId: "12345",
354
+ contactIds: [
355
+ "12345",
356
+ ],
357
+ companyId: "12345",
358
+ companyName: "Copper",
359
+ ownerId: "12345",
360
+ priority: "None",
361
+ status: "Open",
362
+ statusId: "12345",
363
+ tags: [
364
+ "New",
365
+ ],
366
+ customFields: [
367
+ {
368
+ id: "2389328923893298",
369
+ name: "employee_level",
370
+ description: "Employee Level",
371
+ value: {},
372
+ },
373
+ {
374
+ id: "2389328923893298",
375
+ name: "employee_level",
376
+ description: "Employee Level",
377
+ value: true,
378
+ },
379
+ ],
380
+ stageLastChangedAt: new Date("2020-09-30T07:43:32.000Z"),
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
+ },
395
+ ],
396
+ },
397
+ });
398
+ expect(result.httpMeta.response.status).toBe(201);
399
+ expect(result.createOpportunityResponse).toBeDefined();
400
+ expect(result.createOpportunityResponse).toEqual({
401
+ statusCode: 200,
402
+ status: "OK",
403
+ service: "zoho-crm",
404
+ resource: "opportunities",
405
+ operation: "add",
406
+ data: {
407
+ id: "12345",
408
+ },
409
+ });
325
410
  });
326
411
 
327
412
  test("Opportunities Crm Opportunities One", async () => {
@@ -474,10 +559,134 @@ test("Opportunities Crm Opportunities One", async () => {
474
559
  });
475
560
  });
476
561
 
477
- it.skip("Opportunities Crm Opportunities Update", async () => {
478
- assert.fail(
479
- "incomplete test found please make sure to address the following errors: [`workflow step crm.opportunitiesUpdate.test referencing operation crm.opportunitiesUpdate with expression in requestBody with type not currently supported`, `workflow step crm.opportunitiesUpdate.test referencing operation crm.opportunitiesUpdate with expression in requestBody with type not currently supported`, `workflow step crm.opportunitiesUpdate.test referencing operation crm.opportunitiesUpdate with expression in requestBody with type not currently supported`, `workflow step crm.opportunitiesUpdate.test referencing operation crm.opportunitiesUpdate with expression in requestBody with type not currently supported`]",
480
- );
562
+ test("Opportunities Crm Opportunities Update", async () => {
563
+ const testHttpClient = createTestHTTPClient("crm.opportunitiesUpdate");
564
+
565
+ const apideck = new Apideck({
566
+ serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
567
+ httpClient: testHttpClient,
568
+ apiKey: process.env["APIDECK_API_KEY"] ?? "value",
569
+ });
570
+
571
+ const result = await apideck.crm.opportunities.update({
572
+ id: "<id>",
573
+ consumerId: "test-consumer",
574
+ appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
575
+ serviceId: "salesforce",
576
+ opportunity: {
577
+ title: "New Rocket",
578
+ primaryContactId: "12345",
579
+ description:
580
+ "Opportunities are created for People and Companies that are interested in buying your products or services. Create Opportunities for People and Companies to move them through one of your Pipelines.",
581
+ type: "Existing Customer - Upgrade",
582
+ monetaryAmount: 75000,
583
+ currency: "USD",
584
+ winProbability: 40,
585
+ closeDate: new RFCDate("2020-10-30"),
586
+ lossReasonId: "12345",
587
+ lossReason: "No budget",
588
+ wonReasonId: "12345",
589
+ wonReason: "Best pitch",
590
+ pipelineId: "12345",
591
+ pipelineStageId: "12345",
592
+ sourceId: "12345",
593
+ leadId: "12345",
594
+ leadSource: "Website",
595
+ contactId: "12345",
596
+ contactIds: [
597
+ "12345",
598
+ ],
599
+ companyId: "12345",
600
+ companyName: "Copper",
601
+ ownerId: "12345",
602
+ priority: "None",
603
+ status: "Open",
604
+ statusId: "12345",
605
+ tags: [
606
+ "New",
607
+ ],
608
+ customFields: [
609
+ {
610
+ id: "2389328923893298",
611
+ name: "employee_level",
612
+ description: "Employee Level",
613
+ value: {},
614
+ },
615
+ {
616
+ id: "2389328923893298",
617
+ name: "employee_level",
618
+ description: "Employee Level",
619
+ value: true,
620
+ },
621
+ {
622
+ id: "2389328923893298",
623
+ name: "employee_level",
624
+ description: "Employee Level",
625
+ value: [
626
+ {},
627
+ {},
628
+ ],
629
+ },
630
+ ],
631
+ stageLastChangedAt: new Date("2020-09-30T07:43:32.000Z"),
632
+ passThrough: [
633
+ {
634
+ serviceId: "<id>",
635
+ extendPaths: [
636
+ {
637
+ path: "$.nested.property",
638
+ value: {
639
+ "TaxClassificationRef": {
640
+ "value": "EUC-99990201-V1-00020000",
641
+ },
642
+ },
643
+ },
644
+ {
645
+ path: "$.nested.property",
646
+ value: {
647
+ "TaxClassificationRef": {
648
+ "value": "EUC-99990201-V1-00020000",
649
+ },
650
+ },
651
+ },
652
+ {
653
+ path: "$.nested.property",
654
+ value: {
655
+ "TaxClassificationRef": {
656
+ "value": "EUC-99990201-V1-00020000",
657
+ },
658
+ },
659
+ },
660
+ ],
661
+ },
662
+ {
663
+ serviceId: "<id>",
664
+ extendPaths: [
665
+ {
666
+ path: "$.nested.property",
667
+ value: {
668
+ "TaxClassificationRef": {
669
+ "value": "EUC-99990201-V1-00020000",
670
+ },
671
+ },
672
+ },
673
+ ],
674
+ },
675
+ ],
676
+ },
677
+ });
678
+ expect(result.httpMeta.response.status).toBe(200);
679
+ expect(result.updateOpportunityResponse).toBeDefined();
680
+ expect(result.updateOpportunityResponse).toEqual({
681
+ statusCode: 200,
682
+ status: "OK",
683
+ service: "zoho-crm",
684
+ resource: "companies",
685
+ operation: "update",
686
+ data: {
687
+ id: "12345",
688
+ },
689
+ });
481
690
  });
482
691
 
483
692
  test("Opportunities Crm Opportunities Delete", async () => {