@apideck/unify 0.23.0 → 0.23.1

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 (93) hide show
  1. package/jsr.json +1 -1
  2. package/lib/config.d.ts +3 -3
  3. package/lib/config.js +3 -3
  4. package/models/components/note.d.ts +5 -0
  5. package/models/components/note.d.ts.map +1 -1
  6. package/models/components/note.js +4 -0
  7. package/models/components/note.js.map +1 -1
  8. package/models/components/noteinput.d.ts +5 -0
  9. package/models/components/noteinput.d.ts.map +1 -1
  10. package/models/components/noteinput.js +4 -0
  11. package/models/components/noteinput.js.map +1 -1
  12. package/package.json +5 -1
  13. package/src/__tests__/activities.test.ts +783 -0
  14. package/src/__tests__/agedcreditors.test.ts +279 -0
  15. package/src/__tests__/ageddebtors.test.ts +279 -0
  16. package/src/__tests__/apideckcompanies.test.ts +712 -0
  17. package/src/__tests__/apideckcustomers.test.ts +360 -0
  18. package/src/__tests__/apideckdepartments.test.ts +319 -0
  19. package/src/__tests__/apiresources.test.ts +61 -0
  20. package/src/__tests__/apis.test.ts +214 -0
  21. package/src/__tests__/applicants.test.ts +976 -0
  22. package/src/__tests__/applications.test.ts +329 -0
  23. package/src/__tests__/assertions.ts +13 -0
  24. package/src/__tests__/attachments.test.ts +363 -0
  25. package/src/__tests__/balancesheet.test.ts +451 -0
  26. package/src/__tests__/billpayments.test.ts +666 -0
  27. package/src/__tests__/bills.test.ts +1133 -0
  28. package/src/__tests__/collections.test.ts +115 -0
  29. package/src/__tests__/collectiontags.test.ts +66 -0
  30. package/src/__tests__/collectionticketcomments.test.ts +318 -0
  31. package/src/__tests__/collectiontickets.test.ts +436 -0
  32. package/src/__tests__/collectionusers.test.ts +122 -0
  33. package/src/__tests__/companies.test.ts +1059 -0
  34. package/src/__tests__/companyinfo.test.ts +218 -0
  35. package/src/__tests__/connectioncustommappings.test.ts +67 -0
  36. package/src/__tests__/connections.test.ts +1713 -0
  37. package/src/__tests__/connectionsettings.test.ts +280 -0
  38. package/src/__tests__/connectordocs.test.ts +28 -0
  39. package/src/__tests__/connectors.test.ts +751 -0
  40. package/src/__tests__/consumerrequestcounts.test.ts +41 -0
  41. package/src/__tests__/consumers.test.ts +517 -0
  42. package/src/__tests__/contacts.test.ts +957 -0
  43. package/src/__tests__/createcallback.test.ts +34 -0
  44. package/src/__tests__/creditnotes.test.ts +1362 -0
  45. package/src/__tests__/customers.test.ts +1089 -0
  46. package/src/__tests__/customfields.test.ts +50 -0
  47. package/src/__tests__/custommappings.test.ts +63 -0
  48. package/src/__tests__/departments.test.ts +359 -0
  49. package/src/__tests__/drivegroups.test.ts +318 -0
  50. package/src/__tests__/drives.test.ts +311 -0
  51. package/src/__tests__/employeepayrolls.test.ts +487 -0
  52. package/src/__tests__/employees.test.ts +1682 -0
  53. package/src/__tests__/employeeschedules.test.ts +456 -0
  54. package/src/__tests__/eventlogs.test.ts +157 -0
  55. package/src/__tests__/expenses.test.ts +566 -0
  56. package/src/__tests__/files.test.ts +392 -0
  57. package/src/__tests__/files.ts +56 -0
  58. package/src/__tests__/folders.test.ts +103 -0
  59. package/src/__tests__/invoiceitems.test.ts +586 -0
  60. package/src/__tests__/invoices.test.ts +1561 -0
  61. package/src/__tests__/jobs.test.ts +837 -0
  62. package/src/__tests__/journalentries.test.ts +1053 -0
  63. package/src/__tests__/leads.test.ts +897 -0
  64. package/src/__tests__/ledgeraccounts.test.ts +594 -0
  65. package/src/__tests__/locations.test.ts +561 -0
  66. package/src/__tests__/logs.test.ts +135 -0
  67. package/src/__tests__/messages.test.ts +396 -0
  68. package/src/__tests__/mockserver/README.md +52 -0
  69. package/src/__tests__/notes.test.ts +335 -0
  70. package/src/__tests__/opportunities.test.ts +503 -0
  71. package/src/__tests__/orders.test.ts +849 -0
  72. package/src/__tests__/payments.test.ts +557 -0
  73. package/src/__tests__/payrolls.test.ts +481 -0
  74. package/src/__tests__/pipelines.test.ts +383 -0
  75. package/src/__tests__/products.test.ts +505 -0
  76. package/src/__tests__/profitandloss.test.ts +221 -0
  77. package/src/__tests__/purchaseorders.test.ts +1464 -0
  78. package/src/__tests__/sessions.test.ts +70 -0
  79. package/src/__tests__/sharedlinks.test.ts +331 -0
  80. package/src/__tests__/stores.test.ts +39 -0
  81. package/src/__tests__/subsidiaries.test.ts +316 -0
  82. package/src/__tests__/suppliers.test.ts +1071 -0
  83. package/src/__tests__/taxrates.test.ts +472 -0
  84. package/src/__tests__/testclient.ts +48 -0
  85. package/src/__tests__/timeoffrequests.test.ts +381 -0
  86. package/src/__tests__/trackingcategories.test.ts +329 -0
  87. package/src/__tests__/uploadsessions.test.ts +142 -0
  88. package/src/__tests__/users.test.ts +667 -0
  89. package/src/__tests__/validateconnection.test.ts +32 -0
  90. package/src/__tests__/webhooks.test.ts +248 -0
  91. package/src/lib/config.ts +3 -3
  92. package/src/models/components/note.ts +9 -0
  93. package/src/models/components/noteinput.ts +9 -0
@@ -0,0 +1,586 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { assert, expect, it, test } from "vitest";
6
+ import { Apideck } from "../index.js";
7
+ import { RFCDate } from "../types/index.js";
8
+ import { createTestHTTPClient } from "./testclient.js";
9
+
10
+ test("Invoiceitems Accounting Invoice Items All", async () => {
11
+ const testHttpClient = createTestHTTPClient("accounting.invoiceItemsAll");
12
+
13
+ const apideck = new Apideck({
14
+ serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
15
+ httpClient: testHttpClient,
16
+ apiKey: process.env["APIDECK_API_KEY"] ?? "value",
17
+ });
18
+
19
+ const result = await apideck.accounting.invoiceItems.list({
20
+ serviceId: "salesforce",
21
+ filter: {
22
+ name: "Widgets Large",
23
+ type: "service",
24
+ },
25
+ sort: {
26
+ by: "updated_at",
27
+ },
28
+ passThrough: {
29
+ "search": "San Francisco",
30
+ },
31
+ fields: "id,updated_at",
32
+ });
33
+ expect(result.httpMeta.response.status).toBe(200);
34
+ expect(result.getInvoiceItemsResponse).toBeDefined();
35
+ expect(result.getInvoiceItemsResponse).toEqual({
36
+ statusCode: 200,
37
+ status: "OK",
38
+ service: "xero",
39
+ resource: "invoice-items",
40
+ operation: "all",
41
+ data: [
42
+ {
43
+ id: "123456",
44
+ name: "Model Y",
45
+ description:
46
+ "Model Y is a fully electric, mid-size SUV, with seating for up to seven, dual motor AWD and unparalleled protection.",
47
+ code: "120-C",
48
+ sold: true,
49
+ purchased: true,
50
+ tracked: true,
51
+ taxable: true,
52
+ inventoryDate: new RFCDate("2020-10-30"),
53
+ type: "inventory",
54
+ salesDetails: {
55
+ unitPrice: 27500.5,
56
+ unitOfMeasure: "pc.",
57
+ taxInclusive: true,
58
+ taxRate: {
59
+ id: "123456",
60
+ code: "N-T",
61
+ name: "GST on Purchases",
62
+ rate: 10,
63
+ },
64
+ },
65
+ purchaseDetails: {
66
+ unitPrice: 27500.5,
67
+ unitOfMeasure: "pc.",
68
+ taxInclusive: true,
69
+ taxRate: {
70
+ id: "123456",
71
+ code: "N-T",
72
+ name: "GST on Purchases",
73
+ rate: 10,
74
+ },
75
+ },
76
+ quantity: 1,
77
+ unitPrice: 27500.5,
78
+ assetAccount: {
79
+ id: "123456",
80
+ name: "Bank account",
81
+ nominalCode: "N091",
82
+ code: "453",
83
+ },
84
+ incomeAccount: {
85
+ id: "123456",
86
+ name: "Bank account",
87
+ nominalCode: "N091",
88
+ code: "453",
89
+ },
90
+ expenseAccount: {
91
+ id: "123456",
92
+ name: "Bank account",
93
+ nominalCode: "N091",
94
+ code: "453",
95
+ },
96
+ trackingCategories: [
97
+ {
98
+ id: "123456",
99
+ name: "New York",
100
+ },
101
+ {
102
+ id: "123456",
103
+ name: "New York",
104
+ },
105
+ ],
106
+ active: true,
107
+ departmentId: "12345",
108
+ locationId: "12345",
109
+ subsidiaryId: "12345",
110
+ taxScheduleId: "123456",
111
+ rowVersion: "1-12345",
112
+ updatedBy: "12345",
113
+ createdBy: "12345",
114
+ updatedAt: new Date("2020-09-30T07:43:32.000Z"),
115
+ createdAt: new Date("2020-09-30T07:43:32.000Z"),
116
+ passThrough: [
117
+ {
118
+ serviceId: "<id>",
119
+ extendPaths: [
120
+ {
121
+ path: "$.nested.property",
122
+ value: {
123
+ "TaxClassificationRef": {
124
+ "value": "EUC-99990201-V1-00020000",
125
+ },
126
+ },
127
+ },
128
+ ],
129
+ },
130
+ {
131
+ serviceId: "<id>",
132
+ extendPaths: [
133
+ {
134
+ path: "$.nested.property",
135
+ value: {
136
+ "TaxClassificationRef": {
137
+ "value": "EUC-99990201-V1-00020000",
138
+ },
139
+ },
140
+ },
141
+ ],
142
+ },
143
+ {
144
+ serviceId: "<id>",
145
+ extendPaths: [
146
+ {
147
+ path: "$.nested.property",
148
+ value: {
149
+ "TaxClassificationRef": {
150
+ "value": "EUC-99990201-V1-00020000",
151
+ },
152
+ },
153
+ },
154
+ ],
155
+ },
156
+ ],
157
+ },
158
+ {
159
+ id: "123456",
160
+ name: "Model Y",
161
+ description:
162
+ "Model Y is a fully electric, mid-size SUV, with seating for up to seven, dual motor AWD and unparalleled protection.",
163
+ code: "120-C",
164
+ sold: true,
165
+ purchased: true,
166
+ tracked: true,
167
+ taxable: true,
168
+ inventoryDate: new RFCDate("2020-10-30"),
169
+ type: "inventory",
170
+ salesDetails: {
171
+ unitPrice: 27500.5,
172
+ unitOfMeasure: "pc.",
173
+ taxInclusive: true,
174
+ taxRate: {
175
+ id: "123456",
176
+ code: "N-T",
177
+ name: "GST on Purchases",
178
+ rate: 10,
179
+ },
180
+ },
181
+ purchaseDetails: {
182
+ unitPrice: 27500.5,
183
+ unitOfMeasure: "pc.",
184
+ taxInclusive: true,
185
+ taxRate: {
186
+ id: "123456",
187
+ code: "N-T",
188
+ name: "GST on Purchases",
189
+ rate: 10,
190
+ },
191
+ },
192
+ quantity: 1,
193
+ unitPrice: 27500.5,
194
+ assetAccount: {
195
+ id: "123456",
196
+ name: "Bank account",
197
+ nominalCode: "N091",
198
+ code: "453",
199
+ },
200
+ incomeAccount: {
201
+ id: "123456",
202
+ name: "Bank account",
203
+ nominalCode: "N091",
204
+ code: "453",
205
+ },
206
+ expenseAccount: {
207
+ id: "123456",
208
+ name: "Bank account",
209
+ nominalCode: "N091",
210
+ code: "453",
211
+ },
212
+ trackingCategories: [
213
+ {
214
+ id: "123456",
215
+ name: "New York",
216
+ },
217
+ {
218
+ id: "123456",
219
+ name: "New York",
220
+ },
221
+ ],
222
+ active: true,
223
+ departmentId: "12345",
224
+ locationId: "12345",
225
+ subsidiaryId: "12345",
226
+ taxScheduleId: "123456",
227
+ rowVersion: "1-12345",
228
+ updatedBy: "12345",
229
+ createdBy: "12345",
230
+ updatedAt: new Date("2020-09-30T07:43:32.000Z"),
231
+ createdAt: new Date("2020-09-30T07:43:32.000Z"),
232
+ passThrough: [
233
+ {
234
+ serviceId: "<id>",
235
+ extendPaths: [
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
+ path: "$.nested.property",
259
+ value: {
260
+ "TaxClassificationRef": {
261
+ "value": "EUC-99990201-V1-00020000",
262
+ },
263
+ },
264
+ },
265
+ {
266
+ path: "$.nested.property",
267
+ value: {
268
+ "TaxClassificationRef": {
269
+ "value": "EUC-99990201-V1-00020000",
270
+ },
271
+ },
272
+ },
273
+ ],
274
+ },
275
+ ],
276
+ },
277
+ {
278
+ id: "123456",
279
+ name: "Model Y",
280
+ description:
281
+ "Model Y is a fully electric, mid-size SUV, with seating for up to seven, dual motor AWD and unparalleled protection.",
282
+ code: "120-C",
283
+ sold: true,
284
+ purchased: true,
285
+ tracked: true,
286
+ taxable: true,
287
+ inventoryDate: new RFCDate("2020-10-30"),
288
+ type: "inventory",
289
+ salesDetails: {
290
+ unitPrice: 27500.5,
291
+ unitOfMeasure: "pc.",
292
+ taxInclusive: true,
293
+ taxRate: {
294
+ id: "123456",
295
+ code: "N-T",
296
+ name: "GST on Purchases",
297
+ rate: 10,
298
+ },
299
+ },
300
+ purchaseDetails: {
301
+ unitPrice: 27500.5,
302
+ unitOfMeasure: "pc.",
303
+ taxInclusive: true,
304
+ taxRate: {
305
+ id: "123456",
306
+ code: "N-T",
307
+ name: "GST on Purchases",
308
+ rate: 10,
309
+ },
310
+ },
311
+ quantity: 1,
312
+ unitPrice: 27500.5,
313
+ assetAccount: {
314
+ id: "123456",
315
+ name: "Bank account",
316
+ nominalCode: "N091",
317
+ code: "453",
318
+ },
319
+ incomeAccount: {
320
+ id: "123456",
321
+ name: "Bank account",
322
+ nominalCode: "N091",
323
+ code: "453",
324
+ },
325
+ expenseAccount: {
326
+ id: "123456",
327
+ name: "Bank account",
328
+ nominalCode: "N091",
329
+ code: "453",
330
+ },
331
+ trackingCategories: [
332
+ {
333
+ id: "123456",
334
+ name: "New York",
335
+ },
336
+ ],
337
+ active: true,
338
+ departmentId: "12345",
339
+ locationId: "12345",
340
+ subsidiaryId: "12345",
341
+ taxScheduleId: "123456",
342
+ rowVersion: "1-12345",
343
+ updatedBy: "12345",
344
+ createdBy: "12345",
345
+ updatedAt: new Date("2020-09-30T07:43:32.000Z"),
346
+ createdAt: new Date("2020-09-30T07:43:32.000Z"),
347
+ passThrough: [
348
+ {
349
+ serviceId: "<id>",
350
+ extendPaths: [
351
+ {
352
+ path: "$.nested.property",
353
+ value: {
354
+ "TaxClassificationRef": {
355
+ "value": "EUC-99990201-V1-00020000",
356
+ },
357
+ },
358
+ },
359
+ {
360
+ path: "$.nested.property",
361
+ value: {
362
+ "TaxClassificationRef": {
363
+ "value": "EUC-99990201-V1-00020000",
364
+ },
365
+ },
366
+ },
367
+ {
368
+ path: "$.nested.property",
369
+ value: {
370
+ "TaxClassificationRef": {
371
+ "value": "EUC-99990201-V1-00020000",
372
+ },
373
+ },
374
+ },
375
+ ],
376
+ },
377
+ ],
378
+ },
379
+ ],
380
+ meta: {
381
+ itemsOnPage: 50,
382
+ cursors: {
383
+ previous: "em9oby1jcm06OnBhZ2U6OjE=",
384
+ current: "em9oby1jcm06OnBhZ2U6OjI=",
385
+ next: "em9oby1jcm06OnBhZ2U6OjM=",
386
+ },
387
+ },
388
+ links: {
389
+ previous:
390
+ "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjE%3D",
391
+ current: "https://unify.apideck.com/crm/companies",
392
+ next:
393
+ "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjM",
394
+ },
395
+ });
396
+ });
397
+
398
+ it.skip("Invoiceitems Accounting Invoice Items Add", async () => {
399
+ assert.fail(
400
+ "incomplete test found please make sure to address the following errors: [`workflow step accounting.invoiceItemsAdd.test referencing operation accounting.invoiceItemsAdd with expression in requestBody with type not currently supported`, `workflow step accounting.invoiceItemsAdd.test referencing operation accounting.invoiceItemsAdd with expression in requestBody with type not currently supported`, `workflow step accounting.invoiceItemsAdd.test referencing operation accounting.invoiceItemsAdd with expression in requestBody with type not currently supported`]",
401
+ );
402
+ });
403
+
404
+ test("Invoiceitems Accounting Invoice Items One", async () => {
405
+ const testHttpClient = createTestHTTPClient("accounting.invoiceItemsOne");
406
+
407
+ const apideck = new Apideck({
408
+ serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
409
+ httpClient: testHttpClient,
410
+ apiKey: process.env["APIDECK_API_KEY"] ?? "value",
411
+ });
412
+
413
+ const result = await apideck.accounting.invoiceItems.get({
414
+ id: "<id>",
415
+ serviceId: "salesforce",
416
+ fields: "id,updated_at",
417
+ filter: {
418
+ type: "service",
419
+ },
420
+ });
421
+ expect(result.httpMeta.response.status).toBe(200);
422
+ expect(result.getInvoiceItemResponse).toBeDefined();
423
+ expect(result.getInvoiceItemResponse).toEqual({
424
+ statusCode: 200,
425
+ status: "OK",
426
+ service: "xero",
427
+ resource: "invoice-items",
428
+ operation: "one",
429
+ data: {
430
+ id: "123456",
431
+ name: "Model Y",
432
+ description:
433
+ "Model Y is a fully electric, mid-size SUV, with seating for up to seven, dual motor AWD and unparalleled protection.",
434
+ code: "120-C",
435
+ sold: true,
436
+ purchased: true,
437
+ tracked: true,
438
+ taxable: true,
439
+ inventoryDate: new RFCDate("2020-10-30"),
440
+ type: "inventory",
441
+ salesDetails: {
442
+ unitPrice: 27500.5,
443
+ unitOfMeasure: "pc.",
444
+ taxInclusive: true,
445
+ taxRate: {
446
+ id: "123456",
447
+ code: "N-T",
448
+ name: "GST on Purchases",
449
+ rate: 10,
450
+ },
451
+ },
452
+ purchaseDetails: {
453
+ unitPrice: 27500.5,
454
+ unitOfMeasure: "pc.",
455
+ taxInclusive: true,
456
+ taxRate: {
457
+ id: "123456",
458
+ code: "N-T",
459
+ name: "GST on Purchases",
460
+ rate: 10,
461
+ },
462
+ },
463
+ quantity: 1,
464
+ unitPrice: 27500.5,
465
+ assetAccount: {
466
+ id: "123456",
467
+ name: "Bank account",
468
+ nominalCode: "N091",
469
+ code: "453",
470
+ },
471
+ incomeAccount: {
472
+ id: "123456",
473
+ name: "Bank account",
474
+ nominalCode: "N091",
475
+ code: "453",
476
+ },
477
+ expenseAccount: {
478
+ id: "123456",
479
+ name: "Bank account",
480
+ nominalCode: "N091",
481
+ code: "453",
482
+ },
483
+ trackingCategories: [
484
+ {
485
+ id: "123456",
486
+ name: "New York",
487
+ },
488
+ {
489
+ id: "123456",
490
+ name: "New York",
491
+ },
492
+ {
493
+ id: "123456",
494
+ name: "New York",
495
+ },
496
+ ],
497
+ active: true,
498
+ departmentId: "12345",
499
+ locationId: "12345",
500
+ subsidiaryId: "12345",
501
+ taxScheduleId: "123456",
502
+ rowVersion: "1-12345",
503
+ updatedBy: "12345",
504
+ createdBy: "12345",
505
+ updatedAt: new Date("2020-09-30T07:43:32.000Z"),
506
+ createdAt: new Date("2020-09-30T07:43:32.000Z"),
507
+ passThrough: [
508
+ {
509
+ serviceId: "<id>",
510
+ extendPaths: [
511
+ {
512
+ path: "$.nested.property",
513
+ value: {
514
+ "TaxClassificationRef": {
515
+ "value": "EUC-99990201-V1-00020000",
516
+ },
517
+ },
518
+ },
519
+ {
520
+ path: "$.nested.property",
521
+ value: {
522
+ "TaxClassificationRef": {
523
+ "value": "EUC-99990201-V1-00020000",
524
+ },
525
+ },
526
+ },
527
+ ],
528
+ },
529
+ {
530
+ serviceId: "<id>",
531
+ extendPaths: [
532
+ {
533
+ path: "$.nested.property",
534
+ value: {
535
+ "TaxClassificationRef": {
536
+ "value": "EUC-99990201-V1-00020000",
537
+ },
538
+ },
539
+ },
540
+ {
541
+ path: "$.nested.property",
542
+ value: {
543
+ "TaxClassificationRef": {
544
+ "value": "EUC-99990201-V1-00020000",
545
+ },
546
+ },
547
+ },
548
+ ],
549
+ },
550
+ ],
551
+ },
552
+ });
553
+ });
554
+
555
+ it.skip("Invoiceitems Accounting Invoice Items Update", async () => {
556
+ assert.fail(
557
+ "incomplete test found please make sure to address the following errors: [`workflow step accounting.invoiceItemsUpdate.test referencing operation accounting.invoiceItemsUpdate with expression in requestBody with type not currently supported`, `workflow step accounting.invoiceItemsUpdate.test referencing operation accounting.invoiceItemsUpdate with expression in requestBody with type not currently supported`, `workflow step accounting.invoiceItemsUpdate.test referencing operation accounting.invoiceItemsUpdate with expression in requestBody with type not currently supported`, `workflow step accounting.invoiceItemsUpdate.test referencing operation accounting.invoiceItemsUpdate with expression in requestBody with type not currently supported`, `workflow step accounting.invoiceItemsUpdate.test referencing operation accounting.invoiceItemsUpdate with expression in requestBody with type not currently supported`]",
558
+ );
559
+ });
560
+
561
+ test("Invoiceitems Accounting Invoice Items Delete", async () => {
562
+ const testHttpClient = createTestHTTPClient("accounting.invoiceItemsDelete");
563
+
564
+ const apideck = new Apideck({
565
+ serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
566
+ httpClient: testHttpClient,
567
+ apiKey: process.env["APIDECK_API_KEY"] ?? "value",
568
+ });
569
+
570
+ const result = await apideck.accounting.invoiceItems.delete({
571
+ id: "<id>",
572
+ serviceId: "salesforce",
573
+ });
574
+ expect(result.httpMeta.response.status).toBe(200);
575
+ expect(result.deleteTaxRateResponse).toBeDefined();
576
+ expect(result.deleteTaxRateResponse).toEqual({
577
+ statusCode: 200,
578
+ status: "OK",
579
+ service: "xero",
580
+ resource: "tax-rates",
581
+ operation: "delete",
582
+ data: {
583
+ id: "12345",
584
+ },
585
+ });
586
+ });