@apideck/unify 0.40.0 → 0.41.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 (96) hide show
  1. package/jsr.json +1 -1
  2. package/lib/config.d.ts +4 -4
  3. package/lib/config.js +4 -4
  4. package/package.json +6 -2
  5. package/src/__tests__/activities.test.ts +1141 -0
  6. package/src/__tests__/agedcreditors.test.ts +280 -0
  7. package/src/__tests__/ageddebtors.test.ts +280 -0
  8. package/src/__tests__/apideckcompanies.test.ts +1082 -0
  9. package/src/__tests__/apideckcustomers.test.ts +364 -0
  10. package/src/__tests__/apideckdepartments.test.ts +497 -0
  11. package/src/__tests__/apiresources.test.ts +62 -0
  12. package/src/__tests__/apis.test.ts +216 -0
  13. package/src/__tests__/applicants.test.ts +1445 -0
  14. package/src/__tests__/applications.test.ts +515 -0
  15. package/src/__tests__/assertions.ts +13 -0
  16. package/src/__tests__/attachments.test.ts +371 -0
  17. package/src/__tests__/balancesheet.test.ts +453 -0
  18. package/src/__tests__/bankaccounts.test.ts +324 -0
  19. package/src/__tests__/bankfeedaccounts.test.ts +343 -0
  20. package/src/__tests__/bankfeedstatements.test.ts +408 -0
  21. package/src/__tests__/billpayments.test.ts +1031 -0
  22. package/src/__tests__/bills.test.ts +1630 -0
  23. package/src/__tests__/categories.test.ts +127 -0
  24. package/src/__tests__/collections.test.ts +120 -0
  25. package/src/__tests__/collectiontags.test.ts +68 -0
  26. package/src/__tests__/collectionticketcomments.test.ts +501 -0
  27. package/src/__tests__/collectiontickets.test.ts +627 -0
  28. package/src/__tests__/collectionusers.test.ts +126 -0
  29. package/src/__tests__/companies.test.ts +1642 -0
  30. package/src/__tests__/companyinfo.test.ts +219 -0
  31. package/src/__tests__/connectionconsent.test.ts +89 -0
  32. package/src/__tests__/connectionconsents.test.ts +31 -0
  33. package/src/__tests__/connectioncustommappings.test.ts +69 -0
  34. package/src/__tests__/connections.test.ts +2127 -0
  35. package/src/__tests__/connectionsettings.test.ts +687 -0
  36. package/src/__tests__/connectordocs.test.ts +29 -0
  37. package/src/__tests__/connectors.test.ts +753 -0
  38. package/src/__tests__/consumerrequestcounts.test.ts +42 -0
  39. package/src/__tests__/consumers.test.ts +523 -0
  40. package/src/__tests__/contacts.test.ts +1421 -0
  41. package/src/__tests__/createcallback.test.ts +36 -0
  42. package/src/__tests__/creditnotes.test.ts +2040 -0
  43. package/src/__tests__/customers.test.ts +1600 -0
  44. package/src/__tests__/customfields.test.ts +52 -0
  45. package/src/__tests__/custommappings.test.ts +65 -0
  46. package/src/__tests__/customobjects.test.ts +408 -0
  47. package/src/__tests__/customobjectschemas.test.ts +734 -0
  48. package/src/__tests__/departments.test.ts +529 -0
  49. package/src/__tests__/drivegroups.test.ts +496 -0
  50. package/src/__tests__/drives.test.ts +487 -0
  51. package/src/__tests__/employeepayrolls.test.ts +491 -0
  52. package/src/__tests__/employees.test.ts +2968 -0
  53. package/src/__tests__/employeeschedules.test.ts +457 -0
  54. package/src/__tests__/eventlogs.test.ts +158 -0
  55. package/src/__tests__/expensecategories.test.ts +324 -0
  56. package/src/__tests__/expensereports.test.ts +634 -0
  57. package/src/__tests__/expenses.test.ts +867 -0
  58. package/src/__tests__/files.test.ts +506 -0
  59. package/src/__tests__/files.ts +56 -0
  60. package/src/__tests__/folders.test.ts +390 -0
  61. package/src/__tests__/invoiceitems.test.ts +855 -0
  62. package/src/__tests__/invoices.test.ts +2173 -0
  63. package/src/__tests__/jobs.test.ts +1150 -0
  64. package/src/__tests__/journalentries.test.ts +1542 -0
  65. package/src/__tests__/leads.test.ts +1341 -0
  66. package/src/__tests__/ledgeraccounts.test.ts +829 -0
  67. package/src/__tests__/locations.test.ts +856 -0
  68. package/src/__tests__/logs.test.ts +137 -0
  69. package/src/__tests__/messages.test.ts +588 -0
  70. package/src/__tests__/notes.test.ts +523 -0
  71. package/src/__tests__/opportunities.test.ts +718 -0
  72. package/src/__tests__/orders.test.ts +854 -0
  73. package/src/__tests__/payments.test.ts +867 -0
  74. package/src/__tests__/payrolls.test.ts +485 -0
  75. package/src/__tests__/pipelines.test.ts +574 -0
  76. package/src/__tests__/products.test.ts +509 -0
  77. package/src/__tests__/profitandloss.test.ts +223 -0
  78. package/src/__tests__/projects.test.ts +480 -0
  79. package/src/__tests__/proxy.test.ts +41 -0
  80. package/src/__tests__/purchaseorders.test.ts +2139 -0
  81. package/src/__tests__/quotes.test.ts +678 -0
  82. package/src/__tests__/refunds.test.ts +812 -0
  83. package/src/__tests__/sessions.test.ts +72 -0
  84. package/src/__tests__/sharedlinks.test.ts +511 -0
  85. package/src/__tests__/stores.test.ts +41 -0
  86. package/src/__tests__/subsidiaries.test.ts +496 -0
  87. package/src/__tests__/suppliers.test.ts +1574 -0
  88. package/src/__tests__/taxrates.test.ts +701 -0
  89. package/src/__tests__/testclient.ts +48 -0
  90. package/src/__tests__/timeoffrequests.test.ts +588 -0
  91. package/src/__tests__/trackingcategories.test.ts +515 -0
  92. package/src/__tests__/uploadsessions.test.ts +221 -0
  93. package/src/__tests__/users.test.ts +1020 -0
  94. package/src/__tests__/validateconnection.test.ts +34 -0
  95. package/src/__tests__/webhooks.test.ts +254 -0
  96. package/src/lib/config.ts +4 -4
@@ -0,0 +1,734 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { expect, test } from "vitest";
6
+ import { Apideck } from "../index.js";
7
+ import { createTestHTTPClient } from "./testclient.js";
8
+
9
+ test("Customobjectschemas Crm Custom Object Schemas All", async () => {
10
+ const testHttpClient = createTestHTTPClient("crm.customObjectSchemasAll");
11
+
12
+ const apideck = new Apideck({
13
+ serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
14
+ httpClient: testHttpClient,
15
+ apiKey: process.env["APIDECK_API_KEY"] ?? "value",
16
+ });
17
+
18
+ const result = await apideck.crm.customObjectSchemas.list({
19
+ consumerId: "test-consumer",
20
+ appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
21
+ serviceId: "salesforce",
22
+ passThrough: {
23
+ "search": "San Francisco",
24
+ },
25
+ });
26
+ expect(result.httpMeta.response.status).toBe(200);
27
+ expect(result.getCustomObjectSchemasResponse).toBeDefined();
28
+ expect(result.getCustomObjectSchemasResponse).toEqual({
29
+ statusCode: 200,
30
+ status: "OK",
31
+ service: "zoho-crm",
32
+ resource: "custom-object-schemas",
33
+ operation: "all",
34
+ data: [
35
+ {
36
+ id: "cos_12345",
37
+ name: "project",
38
+ description: "This schema defines a project custom object",
39
+ fields: [
40
+ {
41
+ id: "field_123",
42
+ name: "project_name",
43
+ description: "Name of the project",
44
+ type: "string",
45
+ required: true,
46
+ options: [
47
+ {
48
+ value: "option1",
49
+ label: "Option 1",
50
+ },
51
+ {
52
+ value: "option1",
53
+ label: "Option 1",
54
+ },
55
+ {
56
+ value: "option1",
57
+ label: "Option 1",
58
+ },
59
+ ],
60
+ defaultValue: "New Project",
61
+ },
62
+ {
63
+ id: "field_123",
64
+ name: "project_name",
65
+ description: "Name of the project",
66
+ type: "string",
67
+ required: true,
68
+ options: [
69
+ {
70
+ value: "option1",
71
+ label: "Option 1",
72
+ },
73
+ {
74
+ value: "option1",
75
+ label: "Option 1",
76
+ },
77
+ {
78
+ value: "option1",
79
+ label: "Option 1",
80
+ },
81
+ ],
82
+ defaultValue: "New Project",
83
+ },
84
+ ],
85
+ visible: true,
86
+ active: true,
87
+ createdBy: "12345",
88
+ updatedBy: "12345",
89
+ updatedAt: "2020-09-30T07:43:32.000Z",
90
+ createdAt: "2020-09-30T07:43:32.000Z",
91
+ passThrough: [
92
+ {
93
+ serviceId: "<id>",
94
+ extendPaths: [
95
+ {
96
+ path: "$.nested.property",
97
+ value: {
98
+ "TaxClassificationRef": {
99
+ "value": "EUC-99990201-V1-00020000",
100
+ },
101
+ },
102
+ },
103
+ ],
104
+ },
105
+ ],
106
+ },
107
+ {
108
+ id: "cos_12345",
109
+ name: "project",
110
+ description: "This schema defines a project custom object",
111
+ fields: [
112
+ {
113
+ id: "field_123",
114
+ name: "project_name",
115
+ description: "Name of the project",
116
+ type: "string",
117
+ required: true,
118
+ options: [
119
+ {
120
+ value: "option1",
121
+ label: "Option 1",
122
+ },
123
+ {
124
+ value: "option1",
125
+ label: "Option 1",
126
+ },
127
+ {
128
+ value: "option1",
129
+ label: "Option 1",
130
+ },
131
+ ],
132
+ defaultValue: "New Project",
133
+ },
134
+ {
135
+ id: "field_123",
136
+ name: "project_name",
137
+ description: "Name of the project",
138
+ type: "string",
139
+ required: true,
140
+ options: [
141
+ {
142
+ value: "option1",
143
+ label: "Option 1",
144
+ },
145
+ {
146
+ value: "option1",
147
+ label: "Option 1",
148
+ },
149
+ {
150
+ value: "option1",
151
+ label: "Option 1",
152
+ },
153
+ ],
154
+ defaultValue: "New Project",
155
+ },
156
+ ],
157
+ visible: true,
158
+ active: true,
159
+ createdBy: "12345",
160
+ updatedBy: "12345",
161
+ updatedAt: "2020-09-30T07:43:32.000Z",
162
+ createdAt: "2020-09-30T07:43:32.000Z",
163
+ passThrough: [
164
+ {
165
+ serviceId: "<id>",
166
+ extendPaths: [
167
+ {
168
+ path: "$.nested.property",
169
+ value: {
170
+ "TaxClassificationRef": {
171
+ "value": "EUC-99990201-V1-00020000",
172
+ },
173
+ },
174
+ },
175
+ ],
176
+ },
177
+ ],
178
+ },
179
+ {
180
+ id: "cos_12345",
181
+ name: "project",
182
+ description: "This schema defines a project custom object",
183
+ fields: [
184
+ {
185
+ id: "field_123",
186
+ name: "project_name",
187
+ description: "Name of the project",
188
+ type: "string",
189
+ required: true,
190
+ options: [
191
+ {
192
+ value: "option1",
193
+ label: "Option 1",
194
+ },
195
+ {
196
+ value: "option1",
197
+ label: "Option 1",
198
+ },
199
+ {
200
+ value: "option1",
201
+ label: "Option 1",
202
+ },
203
+ ],
204
+ defaultValue: "New Project",
205
+ },
206
+ {
207
+ id: "field_123",
208
+ name: "project_name",
209
+ description: "Name of the project",
210
+ type: "string",
211
+ required: true,
212
+ options: [
213
+ {
214
+ value: "option1",
215
+ label: "Option 1",
216
+ },
217
+ {
218
+ value: "option1",
219
+ label: "Option 1",
220
+ },
221
+ {
222
+ value: "option1",
223
+ label: "Option 1",
224
+ },
225
+ ],
226
+ defaultValue: "New Project",
227
+ },
228
+ ],
229
+ visible: true,
230
+ active: true,
231
+ createdBy: "12345",
232
+ updatedBy: "12345",
233
+ updatedAt: "2020-09-30T07:43:32.000Z",
234
+ createdAt: "2020-09-30T07:43:32.000Z",
235
+ passThrough: [
236
+ {
237
+ serviceId: "<id>",
238
+ extendPaths: [
239
+ {
240
+ path: "$.nested.property",
241
+ value: {
242
+ "TaxClassificationRef": {
243
+ "value": "EUC-99990201-V1-00020000",
244
+ },
245
+ },
246
+ },
247
+ ],
248
+ },
249
+ ],
250
+ },
251
+ ],
252
+ meta: {
253
+ itemsOnPage: 50,
254
+ cursors: {
255
+ previous: "em9oby1jcm06OnBhZ2U6OjE=",
256
+ current: "em9oby1jcm06OnBhZ2U6OjI=",
257
+ next: "em9oby1jcm06OnBhZ2U6OjM=",
258
+ },
259
+ },
260
+ links: {
261
+ previous:
262
+ "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjE%3D",
263
+ current: "https://unify.apideck.com/crm/companies",
264
+ next:
265
+ "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjM",
266
+ },
267
+ });
268
+ });
269
+
270
+ test("Customobjectschemas Crm Custom Object Schemas Add", async () => {
271
+ const testHttpClient = createTestHTTPClient("crm.customObjectSchemasAdd");
272
+
273
+ const apideck = new Apideck({
274
+ serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
275
+ httpClient: testHttpClient,
276
+ apiKey: process.env["APIDECK_API_KEY"] ?? "value",
277
+ });
278
+
279
+ const result = await apideck.crm.customObjectSchemas.create({
280
+ consumerId: "test-consumer",
281
+ appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
282
+ serviceId: "salesforce",
283
+ customObjectSchema: {
284
+ name: "project",
285
+ description: "This schema defines a project custom object",
286
+ fields: [
287
+ {
288
+ id: "field_123",
289
+ name: "project_name",
290
+ description: "Name of the project",
291
+ type: "string",
292
+ required: true,
293
+ options: [
294
+ {
295
+ value: "option1",
296
+ label: "Option 1",
297
+ },
298
+ ],
299
+ defaultValue: "New Project",
300
+ },
301
+ ],
302
+ visible: true,
303
+ active: true,
304
+ passThrough: [
305
+ {
306
+ serviceId: "<id>",
307
+ extendPaths: [
308
+ {
309
+ path: "$.nested.property",
310
+ value: {
311
+ "TaxClassificationRef": {
312
+ "value": "EUC-99990201-V1-00020000",
313
+ },
314
+ },
315
+ },
316
+ ],
317
+ },
318
+ {
319
+ serviceId: "<id>",
320
+ extendPaths: [
321
+ {
322
+ path: "$.nested.property",
323
+ value: {
324
+ "TaxClassificationRef": {
325
+ "value": "EUC-99990201-V1-00020000",
326
+ },
327
+ },
328
+ },
329
+ ],
330
+ },
331
+ ],
332
+ },
333
+ });
334
+ expect(result.httpMeta.response.status).toBe(201);
335
+ expect(result.createCustomObjectSchemaResponse).toBeDefined();
336
+ expect(result.createCustomObjectSchemaResponse).toEqual({
337
+ statusCode: 201,
338
+ status: "Created",
339
+ service: "zoho-crm",
340
+ resource: "custom-object-schemas",
341
+ operation: "add",
342
+ data: {
343
+ id: "cos_12345",
344
+ name: "project",
345
+ description: "This schema defines a project custom object",
346
+ fields: [
347
+ {
348
+ id: "field_123",
349
+ name: "project_name",
350
+ description: "Name of the project",
351
+ type: "string",
352
+ required: true,
353
+ options: [
354
+ {
355
+ value: "option1",
356
+ label: "Option 1",
357
+ },
358
+ ],
359
+ defaultValue: "New Project",
360
+ },
361
+ {
362
+ id: "field_123",
363
+ name: "project_name",
364
+ description: "Name of the project",
365
+ type: "string",
366
+ required: true,
367
+ options: [
368
+ {
369
+ value: "option1",
370
+ label: "Option 1",
371
+ },
372
+ ],
373
+ defaultValue: "New Project",
374
+ },
375
+ ],
376
+ visible: true,
377
+ active: true,
378
+ createdBy: "12345",
379
+ updatedBy: "12345",
380
+ updatedAt: "2020-09-30T07:43:32.000Z",
381
+ createdAt: "2020-09-30T07:43:32.000Z",
382
+ passThrough: [
383
+ {
384
+ serviceId: "<id>",
385
+ extendPaths: [
386
+ {
387
+ path: "$.nested.property",
388
+ value: {
389
+ "TaxClassificationRef": {
390
+ "value": "EUC-99990201-V1-00020000",
391
+ },
392
+ },
393
+ },
394
+ ],
395
+ },
396
+ {
397
+ serviceId: "<id>",
398
+ extendPaths: [
399
+ {
400
+ path: "$.nested.property",
401
+ value: {
402
+ "TaxClassificationRef": {
403
+ "value": "EUC-99990201-V1-00020000",
404
+ },
405
+ },
406
+ },
407
+ ],
408
+ },
409
+ ],
410
+ },
411
+ });
412
+ });
413
+
414
+ test("Customobjectschemas Crm Custom Object Schemas One", async () => {
415
+ const testHttpClient = createTestHTTPClient("crm.customObjectSchemasOne");
416
+
417
+ const apideck = new Apideck({
418
+ serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
419
+ httpClient: testHttpClient,
420
+ apiKey: process.env["APIDECK_API_KEY"] ?? "value",
421
+ });
422
+
423
+ const result = await apideck.crm.customObjectSchemas.get({
424
+ id: "<id>",
425
+ consumerId: "test-consumer",
426
+ appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
427
+ serviceId: "salesforce",
428
+ });
429
+ expect(result.httpMeta.response.status).toBe(200);
430
+ expect(result.getCustomObjectSchemaResponse).toBeDefined();
431
+ expect(result.getCustomObjectSchemaResponse).toEqual({
432
+ statusCode: 200,
433
+ status: "OK",
434
+ service: "zoho-crm",
435
+ resource: "custom-object-schemas",
436
+ operation: "one",
437
+ data: {
438
+ id: "cos_12345",
439
+ name: "project",
440
+ description: "This schema defines a project custom object",
441
+ fields: [
442
+ {
443
+ id: "field_123",
444
+ name: "project_name",
445
+ description: "Name of the project",
446
+ type: "string",
447
+ required: true,
448
+ options: [
449
+ {
450
+ value: "option1",
451
+ label: "Option 1",
452
+ },
453
+ ],
454
+ defaultValue: "New Project",
455
+ },
456
+ ],
457
+ visible: true,
458
+ active: true,
459
+ createdBy: "12345",
460
+ updatedBy: "12345",
461
+ updatedAt: "2020-09-30T07:43:32.000Z",
462
+ createdAt: "2020-09-30T07:43:32.000Z",
463
+ passThrough: [
464
+ {
465
+ serviceId: "<id>",
466
+ extendPaths: [
467
+ {
468
+ path: "$.nested.property",
469
+ value: {
470
+ "TaxClassificationRef": {
471
+ "value": "EUC-99990201-V1-00020000",
472
+ },
473
+ },
474
+ },
475
+ {
476
+ path: "$.nested.property",
477
+ value: {
478
+ "TaxClassificationRef": {
479
+ "value": "EUC-99990201-V1-00020000",
480
+ },
481
+ },
482
+ },
483
+ {
484
+ path: "$.nested.property",
485
+ value: {
486
+ "TaxClassificationRef": {
487
+ "value": "EUC-99990201-V1-00020000",
488
+ },
489
+ },
490
+ },
491
+ ],
492
+ },
493
+ {
494
+ serviceId: "<id>",
495
+ extendPaths: [
496
+ {
497
+ path: "$.nested.property",
498
+ value: {
499
+ "TaxClassificationRef": {
500
+ "value": "EUC-99990201-V1-00020000",
501
+ },
502
+ },
503
+ },
504
+ {
505
+ path: "$.nested.property",
506
+ value: {
507
+ "TaxClassificationRef": {
508
+ "value": "EUC-99990201-V1-00020000",
509
+ },
510
+ },
511
+ },
512
+ {
513
+ path: "$.nested.property",
514
+ value: {
515
+ "TaxClassificationRef": {
516
+ "value": "EUC-99990201-V1-00020000",
517
+ },
518
+ },
519
+ },
520
+ ],
521
+ },
522
+ ],
523
+ },
524
+ });
525
+ });
526
+
527
+ test("Customobjectschemas Crm Custom Object Schemas Update", async () => {
528
+ const testHttpClient = createTestHTTPClient("crm.customObjectSchemasUpdate");
529
+
530
+ const apideck = new Apideck({
531
+ serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
532
+ httpClient: testHttpClient,
533
+ apiKey: process.env["APIDECK_API_KEY"] ?? "value",
534
+ });
535
+
536
+ const result = await apideck.crm.customObjectSchemas.update({
537
+ id: "<id>",
538
+ consumerId: "test-consumer",
539
+ appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
540
+ serviceId: "salesforce",
541
+ customObjectSchema: {
542
+ name: "project",
543
+ description: "This schema defines a project custom object",
544
+ fields: [
545
+ {
546
+ id: "field_123",
547
+ name: "project_name",
548
+ description: "Name of the project",
549
+ type: "string",
550
+ required: true,
551
+ options: [
552
+ {
553
+ value: "option1",
554
+ label: "Option 1",
555
+ },
556
+ {
557
+ value: "option1",
558
+ label: "Option 1",
559
+ },
560
+ ],
561
+ defaultValue: "New Project",
562
+ },
563
+ {
564
+ id: "field_123",
565
+ name: "project_name",
566
+ description: "Name of the project",
567
+ type: "string",
568
+ required: true,
569
+ options: [
570
+ {
571
+ value: "option1",
572
+ label: "Option 1",
573
+ },
574
+ {
575
+ value: "option1",
576
+ label: "Option 1",
577
+ },
578
+ ],
579
+ defaultValue: "New Project",
580
+ },
581
+ {
582
+ id: "field_123",
583
+ name: "project_name",
584
+ description: "Name of the project",
585
+ type: "string",
586
+ required: true,
587
+ options: [
588
+ {
589
+ value: "option1",
590
+ label: "Option 1",
591
+ },
592
+ {
593
+ value: "option1",
594
+ label: "Option 1",
595
+ },
596
+ ],
597
+ defaultValue: "New Project",
598
+ },
599
+ ],
600
+ visible: true,
601
+ active: true,
602
+ passThrough: [
603
+ {
604
+ serviceId: "<id>",
605
+ extendPaths: [
606
+ {
607
+ path: "$.nested.property",
608
+ value: {
609
+ "TaxClassificationRef": {
610
+ "value": "EUC-99990201-V1-00020000",
611
+ },
612
+ },
613
+ },
614
+ {
615
+ path: "$.nested.property",
616
+ value: {
617
+ "TaxClassificationRef": {
618
+ "value": "EUC-99990201-V1-00020000",
619
+ },
620
+ },
621
+ },
622
+ {
623
+ path: "$.nested.property",
624
+ value: {
625
+ "TaxClassificationRef": {
626
+ "value": "EUC-99990201-V1-00020000",
627
+ },
628
+ },
629
+ },
630
+ ],
631
+ },
632
+ {
633
+ serviceId: "<id>",
634
+ extendPaths: [
635
+ {
636
+ path: "$.nested.property",
637
+ value: {
638
+ "TaxClassificationRef": {
639
+ "value": "EUC-99990201-V1-00020000",
640
+ },
641
+ },
642
+ },
643
+ {
644
+ path: "$.nested.property",
645
+ value: {
646
+ "TaxClassificationRef": {
647
+ "value": "EUC-99990201-V1-00020000",
648
+ },
649
+ },
650
+ },
651
+ {
652
+ path: "$.nested.property",
653
+ value: {
654
+ "TaxClassificationRef": {
655
+ "value": "EUC-99990201-V1-00020000",
656
+ },
657
+ },
658
+ },
659
+ ],
660
+ },
661
+ {
662
+ serviceId: "<id>",
663
+ extendPaths: [
664
+ {
665
+ path: "$.nested.property",
666
+ value: {
667
+ "TaxClassificationRef": {
668
+ "value": "EUC-99990201-V1-00020000",
669
+ },
670
+ },
671
+ },
672
+ {
673
+ path: "$.nested.property",
674
+ value: {
675
+ "TaxClassificationRef": {
676
+ "value": "EUC-99990201-V1-00020000",
677
+ },
678
+ },
679
+ },
680
+ {
681
+ path: "$.nested.property",
682
+ value: {
683
+ "TaxClassificationRef": {
684
+ "value": "EUC-99990201-V1-00020000",
685
+ },
686
+ },
687
+ },
688
+ ],
689
+ },
690
+ ],
691
+ },
692
+ });
693
+ expect(result.httpMeta.response.status).toBe(200);
694
+ expect(result.updateCustomObjectSchemaResponse).toBeDefined();
695
+ expect(result.updateCustomObjectSchemaResponse).toEqual({
696
+ statusCode: 200,
697
+ status: "OK",
698
+ service: "zoho-crm",
699
+ resource: "custom-object-schemas",
700
+ operation: "update",
701
+ data: {
702
+ id: "12345",
703
+ },
704
+ });
705
+ });
706
+
707
+ test("Customobjectschemas Crm Custom Object Schemas Delete", async () => {
708
+ const testHttpClient = createTestHTTPClient("crm.customObjectSchemasDelete");
709
+
710
+ const apideck = new Apideck({
711
+ serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
712
+ httpClient: testHttpClient,
713
+ apiKey: process.env["APIDECK_API_KEY"] ?? "value",
714
+ });
715
+
716
+ const result = await apideck.crm.customObjectSchemas.delete({
717
+ id: "<id>",
718
+ consumerId: "test-consumer",
719
+ appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
720
+ serviceId: "salesforce",
721
+ });
722
+ expect(result.httpMeta.response.status).toBe(200);
723
+ expect(result.deleteCustomObjectSchemaResponse).toBeDefined();
724
+ expect(result.deleteCustomObjectSchemaResponse).toEqual({
725
+ statusCode: 200,
726
+ status: "OK",
727
+ service: "zoho-crm",
728
+ resource: "custom-object-schemas",
729
+ operation: "delete",
730
+ data: {
731
+ id: "12345",
732
+ },
733
+ });
734
+ });