@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,627 @@
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("Collectiontickets Issue Tracking Collection Tickets All", async () => {
10
+ const testHttpClient = createTestHTTPClient(
11
+ "issueTracking.collectionTicketsAll",
12
+ );
13
+
14
+ const apideck = new Apideck({
15
+ serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
16
+ httpClient: testHttpClient,
17
+ apiKey: process.env["APIDECK_API_KEY"] ?? "value",
18
+ });
19
+
20
+ const result = await apideck.issueTracking.collectionTickets.list({
21
+ consumerId: "test-consumer",
22
+ appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
23
+ serviceId: "salesforce",
24
+ collectionId: "apideck-io",
25
+ sort: {
26
+ by: "created_at",
27
+ direction: "desc",
28
+ },
29
+ filter: {
30
+ status: [
31
+ "open",
32
+ ],
33
+ },
34
+ passThrough: {
35
+ "search": "San Francisco",
36
+ },
37
+ fields: "id,updated_at",
38
+ });
39
+ expect(result.httpMeta.response.status).toBe(200);
40
+ expect(result.getTicketsResponse).toBeDefined();
41
+ expect(result.getTicketsResponse).toEqual({
42
+ statusCode: 200,
43
+ status: "OK",
44
+ service: "jira",
45
+ resource: "Tickets",
46
+ operation: "all",
47
+ data: [
48
+ {
49
+ id: "12345",
50
+ parentId: "12345",
51
+ collectionId: "12345",
52
+ type: "Technical",
53
+ subject: "Technical Support Request",
54
+ description: "I am facing issues with my internet connection",
55
+ status: "open",
56
+ priority: "high",
57
+ assignees: [
58
+ {
59
+ id: "12345",
60
+ username: "Cocoa",
61
+ },
62
+ {
63
+ id: "12345",
64
+ username: "Cocoa",
65
+ },
66
+ ],
67
+ updatedAt: new Date("2020-09-30T07:43:32.000Z"),
68
+ createdAt: new Date("2020-09-30T07:43:32.000Z"),
69
+ createdBy: "12345",
70
+ dueDate: new Date("2020-09-30T07:43:32.000Z"),
71
+ completedAt: new Date("2020-09-30T07:43:32.000Z"),
72
+ tags: [
73
+ {
74
+ id: "12345",
75
+ name: "User Experience",
76
+ },
77
+ {
78
+ id: "12345",
79
+ name: "User Experience",
80
+ },
81
+ {
82
+ id: "12345",
83
+ name: "User Experience",
84
+ },
85
+ ],
86
+ passThrough: [
87
+ {
88
+ serviceId: "<id>",
89
+ extendPaths: [
90
+ {
91
+ path: "$.nested.property",
92
+ value: {
93
+ "TaxClassificationRef": {
94
+ "value": "EUC-99990201-V1-00020000",
95
+ },
96
+ },
97
+ },
98
+ ],
99
+ },
100
+ ],
101
+ },
102
+ {
103
+ id: "12345",
104
+ parentId: "12345",
105
+ collectionId: "12345",
106
+ type: "Technical",
107
+ subject: "Technical Support Request",
108
+ description: "I am facing issues with my internet connection",
109
+ status: "open",
110
+ priority: "high",
111
+ assignees: [
112
+ {
113
+ id: "12345",
114
+ username: "Cocoa",
115
+ },
116
+ ],
117
+ updatedAt: new Date("2020-09-30T07:43:32.000Z"),
118
+ createdAt: new Date("2020-09-30T07:43:32.000Z"),
119
+ createdBy: "12345",
120
+ dueDate: new Date("2020-09-30T07:43:32.000Z"),
121
+ completedAt: new Date("2020-09-30T07:43:32.000Z"),
122
+ tags: [
123
+ {
124
+ id: "12345",
125
+ name: "User Experience",
126
+ },
127
+ {
128
+ id: "12345",
129
+ name: "User Experience",
130
+ },
131
+ ],
132
+ passThrough: [
133
+ {
134
+ serviceId: "<id>",
135
+ extendPaths: [
136
+ {
137
+ path: "$.nested.property",
138
+ value: {
139
+ "TaxClassificationRef": {
140
+ "value": "EUC-99990201-V1-00020000",
141
+ },
142
+ },
143
+ },
144
+ ],
145
+ },
146
+ {
147
+ serviceId: "<id>",
148
+ extendPaths: [
149
+ {
150
+ path: "$.nested.property",
151
+ value: {
152
+ "TaxClassificationRef": {
153
+ "value": "EUC-99990201-V1-00020000",
154
+ },
155
+ },
156
+ },
157
+ {
158
+ path: "$.nested.property",
159
+ value: {
160
+ "TaxClassificationRef": {
161
+ "value": "EUC-99990201-V1-00020000",
162
+ },
163
+ },
164
+ },
165
+ {
166
+ path: "$.nested.property",
167
+ value: {
168
+ "TaxClassificationRef": {
169
+ "value": "EUC-99990201-V1-00020000",
170
+ },
171
+ },
172
+ },
173
+ ],
174
+ },
175
+ ],
176
+ },
177
+ {
178
+ id: "12345",
179
+ parentId: "12345",
180
+ collectionId: "12345",
181
+ type: "Technical",
182
+ subject: "Technical Support Request",
183
+ description: "I am facing issues with my internet connection",
184
+ status: "open",
185
+ priority: "high",
186
+ assignees: [
187
+ {
188
+ id: "12345",
189
+ username: "Cocoa",
190
+ },
191
+ ],
192
+ updatedAt: new Date("2020-09-30T07:43:32.000Z"),
193
+ createdAt: new Date("2020-09-30T07:43:32.000Z"),
194
+ createdBy: "12345",
195
+ dueDate: new Date("2020-09-30T07:43:32.000Z"),
196
+ completedAt: new Date("2020-09-30T07:43:32.000Z"),
197
+ tags: [
198
+ {
199
+ id: "12345",
200
+ name: "User Experience",
201
+ },
202
+ ],
203
+ passThrough: [
204
+ {
205
+ serviceId: "<id>",
206
+ extendPaths: [
207
+ {
208
+ path: "$.nested.property",
209
+ value: {
210
+ "TaxClassificationRef": {
211
+ "value": "EUC-99990201-V1-00020000",
212
+ },
213
+ },
214
+ },
215
+ {
216
+ path: "$.nested.property",
217
+ value: {
218
+ "TaxClassificationRef": {
219
+ "value": "EUC-99990201-V1-00020000",
220
+ },
221
+ },
222
+ },
223
+ ],
224
+ },
225
+ {
226
+ serviceId: "<id>",
227
+ extendPaths: [
228
+ {
229
+ path: "$.nested.property",
230
+ value: {
231
+ "TaxClassificationRef": {
232
+ "value": "EUC-99990201-V1-00020000",
233
+ },
234
+ },
235
+ },
236
+ {
237
+ path: "$.nested.property",
238
+ value: {
239
+ "TaxClassificationRef": {
240
+ "value": "EUC-99990201-V1-00020000",
241
+ },
242
+ },
243
+ },
244
+ ],
245
+ },
246
+ {
247
+ serviceId: "<id>",
248
+ extendPaths: [
249
+ {
250
+ path: "$.nested.property",
251
+ value: {
252
+ "TaxClassificationRef": {
253
+ "value": "EUC-99990201-V1-00020000",
254
+ },
255
+ },
256
+ },
257
+ ],
258
+ },
259
+ ],
260
+ },
261
+ ],
262
+ meta: {
263
+ itemsOnPage: 50,
264
+ cursors: {
265
+ previous: "em9oby1jcm06OnBhZ2U6OjE=",
266
+ current: "em9oby1jcm06OnBhZ2U6OjI=",
267
+ next: "em9oby1jcm06OnBhZ2U6OjM=",
268
+ },
269
+ },
270
+ links: {
271
+ previous:
272
+ "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjE%3D",
273
+ current: "https://unify.apideck.com/crm/companies",
274
+ next:
275
+ "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjM",
276
+ },
277
+ });
278
+ });
279
+
280
+ test("Collectiontickets Issue Tracking Collection Tickets Add", async () => {
281
+ const testHttpClient = createTestHTTPClient(
282
+ "issueTracking.collectionTicketsAdd",
283
+ );
284
+
285
+ const apideck = new Apideck({
286
+ serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
287
+ httpClient: testHttpClient,
288
+ apiKey: process.env["APIDECK_API_KEY"] ?? "value",
289
+ });
290
+
291
+ const result = await apideck.issueTracking.collectionTickets.create({
292
+ consumerId: "test-consumer",
293
+ appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
294
+ serviceId: "salesforce",
295
+ collectionId: "apideck-io",
296
+ ticket: {
297
+ parentId: "12345",
298
+ type: "Technical",
299
+ subject: "Technical Support Request",
300
+ description: "I am facing issues with my internet connection",
301
+ status: "open",
302
+ priority: "high",
303
+ assignees: [
304
+ {
305
+ id: "12345",
306
+ },
307
+ {
308
+ id: "12345",
309
+ },
310
+ ],
311
+ dueDate: new Date("2020-09-30T07:43:32.000Z"),
312
+ tags: [
313
+ {
314
+ id: "12345",
315
+ },
316
+ {
317
+ id: "12345",
318
+ },
319
+ ],
320
+ passThrough: [
321
+ {
322
+ serviceId: "<id>",
323
+ extendPaths: [
324
+ {
325
+ path: "$.nested.property",
326
+ value: {
327
+ "TaxClassificationRef": {
328
+ "value": "EUC-99990201-V1-00020000",
329
+ },
330
+ },
331
+ },
332
+ ],
333
+ },
334
+ {
335
+ serviceId: "<id>",
336
+ extendPaths: [
337
+ {
338
+ path: "$.nested.property",
339
+ value: {
340
+ "TaxClassificationRef": {
341
+ "value": "EUC-99990201-V1-00020000",
342
+ },
343
+ },
344
+ },
345
+ ],
346
+ },
347
+ ],
348
+ },
349
+ });
350
+ expect(result.httpMeta.response.status).toBe(201);
351
+ expect(result.createTicketResponse).toBeDefined();
352
+ expect(result.createTicketResponse).toEqual({
353
+ statusCode: 200,
354
+ status: "OK",
355
+ service: "jira",
356
+ resource: "Tickets",
357
+ operation: "add",
358
+ data: {
359
+ id: "12345",
360
+ },
361
+ });
362
+ });
363
+
364
+ test("Collectiontickets Issue Tracking Collection Tickets One", async () => {
365
+ const testHttpClient = createTestHTTPClient(
366
+ "issueTracking.collectionTicketsOne",
367
+ );
368
+
369
+ const apideck = new Apideck({
370
+ serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
371
+ httpClient: testHttpClient,
372
+ apiKey: process.env["APIDECK_API_KEY"] ?? "value",
373
+ });
374
+
375
+ const result = await apideck.issueTracking.collectionTickets.get({
376
+ ticketId: "<id>",
377
+ consumerId: "test-consumer",
378
+ appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
379
+ serviceId: "salesforce",
380
+ collectionId: "apideck-io",
381
+ fields: "id,updated_at",
382
+ });
383
+ expect(result.httpMeta.response.status).toBe(200);
384
+ expect(result.getTicketResponse).toBeDefined();
385
+ expect(result.getTicketResponse).toEqual({
386
+ statusCode: 200,
387
+ status: "OK",
388
+ service: "sage-hr",
389
+ resource: "Tickets",
390
+ operation: "one",
391
+ data: {
392
+ id: "12345",
393
+ parentId: "12345",
394
+ collectionId: "12345",
395
+ type: "Technical",
396
+ subject: "Technical Support Request",
397
+ description: "I am facing issues with my internet connection",
398
+ status: "open",
399
+ priority: "high",
400
+ assignees: [
401
+ {
402
+ id: "12345",
403
+ username: "Cocoa",
404
+ },
405
+ {
406
+ id: "12345",
407
+ username: "Cocoa",
408
+ },
409
+ {
410
+ id: "12345",
411
+ username: "Cocoa",
412
+ },
413
+ ],
414
+ updatedAt: new Date("2020-09-30T07:43:32.000Z"),
415
+ createdAt: new Date("2020-09-30T07:43:32.000Z"),
416
+ createdBy: "12345",
417
+ dueDate: new Date("2020-09-30T07:43:32.000Z"),
418
+ completedAt: new Date("2020-09-30T07:43:32.000Z"),
419
+ tags: [
420
+ {
421
+ id: "12345",
422
+ name: "User Experience",
423
+ },
424
+ {
425
+ id: "12345",
426
+ name: "User Experience",
427
+ },
428
+ ],
429
+ passThrough: [
430
+ {
431
+ serviceId: "<id>",
432
+ extendPaths: [
433
+ {
434
+ path: "$.nested.property",
435
+ value: {
436
+ "TaxClassificationRef": {
437
+ "value": "EUC-99990201-V1-00020000",
438
+ },
439
+ },
440
+ },
441
+ {
442
+ path: "$.nested.property",
443
+ value: {
444
+ "TaxClassificationRef": {
445
+ "value": "EUC-99990201-V1-00020000",
446
+ },
447
+ },
448
+ },
449
+ ],
450
+ },
451
+ {
452
+ serviceId: "<id>",
453
+ extendPaths: [
454
+ {
455
+ path: "$.nested.property",
456
+ value: {
457
+ "TaxClassificationRef": {
458
+ "value": "EUC-99990201-V1-00020000",
459
+ },
460
+ },
461
+ },
462
+ {
463
+ path: "$.nested.property",
464
+ value: {
465
+ "TaxClassificationRef": {
466
+ "value": "EUC-99990201-V1-00020000",
467
+ },
468
+ },
469
+ },
470
+ {
471
+ path: "$.nested.property",
472
+ value: {
473
+ "TaxClassificationRef": {
474
+ "value": "EUC-99990201-V1-00020000",
475
+ },
476
+ },
477
+ },
478
+ ],
479
+ },
480
+ ],
481
+ },
482
+ });
483
+ });
484
+
485
+ test("Collectiontickets Issue Tracking Collection Tickets Update", async () => {
486
+ const testHttpClient = createTestHTTPClient(
487
+ "issueTracking.collectionTicketsUpdate",
488
+ );
489
+
490
+ const apideck = new Apideck({
491
+ serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
492
+ httpClient: testHttpClient,
493
+ apiKey: process.env["APIDECK_API_KEY"] ?? "value",
494
+ });
495
+
496
+ const result = await apideck.issueTracking.collectionTickets.update({
497
+ ticketId: "<id>",
498
+ consumerId: "test-consumer",
499
+ appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
500
+ serviceId: "salesforce",
501
+ collectionId: "apideck-io",
502
+ ticket: {
503
+ parentId: "12345",
504
+ type: "Technical",
505
+ subject: "Technical Support Request",
506
+ description: "I am facing issues with my internet connection",
507
+ status: "open",
508
+ priority: "high",
509
+ assignees: [
510
+ {
511
+ id: "12345",
512
+ },
513
+ {
514
+ id: "12345",
515
+ },
516
+ {
517
+ id: "12345",
518
+ },
519
+ ],
520
+ dueDate: new Date("2020-09-30T07:43:32.000Z"),
521
+ tags: [
522
+ {
523
+ id: "12345",
524
+ },
525
+ {
526
+ id: "12345",
527
+ },
528
+ ],
529
+ passThrough: [
530
+ {
531
+ serviceId: "<id>",
532
+ extendPaths: [
533
+ {
534
+ path: "$.nested.property",
535
+ value: {
536
+ "TaxClassificationRef": {
537
+ "value": "EUC-99990201-V1-00020000",
538
+ },
539
+ },
540
+ },
541
+ {
542
+ path: "$.nested.property",
543
+ value: {
544
+ "TaxClassificationRef": {
545
+ "value": "EUC-99990201-V1-00020000",
546
+ },
547
+ },
548
+ },
549
+ {
550
+ path: "$.nested.property",
551
+ value: {
552
+ "TaxClassificationRef": {
553
+ "value": "EUC-99990201-V1-00020000",
554
+ },
555
+ },
556
+ },
557
+ ],
558
+ },
559
+ {
560
+ serviceId: "<id>",
561
+ extendPaths: [
562
+ {
563
+ path: "$.nested.property",
564
+ value: {
565
+ "TaxClassificationRef": {
566
+ "value": "EUC-99990201-V1-00020000",
567
+ },
568
+ },
569
+ },
570
+ {
571
+ path: "$.nested.property",
572
+ value: {
573
+ "TaxClassificationRef": {
574
+ "value": "EUC-99990201-V1-00020000",
575
+ },
576
+ },
577
+ },
578
+ ],
579
+ },
580
+ ],
581
+ },
582
+ });
583
+ expect(result.httpMeta.response.status).toBe(200);
584
+ expect(result.updateTicketResponse).toBeDefined();
585
+ expect(result.updateTicketResponse).toEqual({
586
+ statusCode: 200,
587
+ status: "OK",
588
+ service: "github",
589
+ resource: "Tickets",
590
+ operation: "update",
591
+ data: {
592
+ id: "12345",
593
+ },
594
+ });
595
+ });
596
+
597
+ test("Collectiontickets Issue Tracking Collection Tickets Delete", async () => {
598
+ const testHttpClient = createTestHTTPClient(
599
+ "issueTracking.collectionTicketsDelete",
600
+ );
601
+
602
+ const apideck = new Apideck({
603
+ serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
604
+ httpClient: testHttpClient,
605
+ apiKey: process.env["APIDECK_API_KEY"] ?? "value",
606
+ });
607
+
608
+ const result = await apideck.issueTracking.collectionTickets.delete({
609
+ ticketId: "<id>",
610
+ consumerId: "test-consumer",
611
+ appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
612
+ serviceId: "salesforce",
613
+ collectionId: "apideck-io",
614
+ });
615
+ expect(result.httpMeta.response.status).toBe(200);
616
+ expect(result.deleteTicketResponse).toBeDefined();
617
+ expect(result.deleteTicketResponse).toEqual({
618
+ statusCode: 200,
619
+ status: "OK",
620
+ service: "jira",
621
+ resource: "Tickets",
622
+ operation: "add",
623
+ data: {
624
+ id: "12345",
625
+ },
626
+ });
627
+ });