@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,588 @@
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("Messages Sms Messages All", async () => {
10
+ const testHttpClient = createTestHTTPClient("sms.messagesAll");
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.sms.messages.list({
19
+ consumerId: "test-consumer",
20
+ appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
21
+ serviceId: "salesforce",
22
+ fields: "id,updated_at",
23
+ });
24
+ expect(result.httpMeta.response.status).toBe(200);
25
+ expect(result.getMessagesResponse).toBeDefined();
26
+ expect(result.getMessagesResponse).toEqual({
27
+ statusCode: 200,
28
+ status: "OK",
29
+ service: "twilio",
30
+ resource: "Messages",
31
+ operation: "all",
32
+ data: [
33
+ {
34
+ id: "12345",
35
+ from: "+15017122661",
36
+ to: "+15017122662",
37
+ subject: "Picture",
38
+ body: "Hi! How are you doing?",
39
+ type: "sms",
40
+ numberOfUnits: 1,
41
+ numberOfMediaFiles: 1,
42
+ direction: "outbound-api",
43
+ status: "sent",
44
+ scheduledAt: new Date("2020-09-30T07:43:32.000Z"),
45
+ sentAt: new Date("2020-09-30T07:43:32.000Z"),
46
+ webhookUrl:
47
+ "https://unify.apideck.com/webhook/webhooks/eyz329dkffdl4949/x/sms",
48
+ reference: "CUST001",
49
+ price: {
50
+ perUnit: "0.01",
51
+ totalAmount: "0.01",
52
+ currency: "USD",
53
+ },
54
+ error: {
55
+ code: "X1",
56
+ message: "Something went wrong",
57
+ },
58
+ messagingServiceId: "123456",
59
+ updatedBy: "12345",
60
+ createdBy: "12345",
61
+ updatedAt: new Date("2020-09-30T07:43:32.000Z"),
62
+ createdAt: new Date("2020-09-30T07:43:32.000Z"),
63
+ passThrough: [
64
+ {
65
+ serviceId: "<id>",
66
+ extendPaths: [
67
+ {
68
+ path: "$.nested.property",
69
+ value: {
70
+ "TaxClassificationRef": {
71
+ "value": "EUC-99990201-V1-00020000",
72
+ },
73
+ },
74
+ },
75
+ {
76
+ path: "$.nested.property",
77
+ value: {
78
+ "TaxClassificationRef": {
79
+ "value": "EUC-99990201-V1-00020000",
80
+ },
81
+ },
82
+ },
83
+ {
84
+ path: "$.nested.property",
85
+ value: {
86
+ "TaxClassificationRef": {
87
+ "value": "EUC-99990201-V1-00020000",
88
+ },
89
+ },
90
+ },
91
+ ],
92
+ },
93
+ {
94
+ serviceId: "<id>",
95
+ extendPaths: [
96
+ {
97
+ path: "$.nested.property",
98
+ value: {
99
+ "TaxClassificationRef": {
100
+ "value": "EUC-99990201-V1-00020000",
101
+ },
102
+ },
103
+ },
104
+ ],
105
+ },
106
+ ],
107
+ },
108
+ {
109
+ id: "12345",
110
+ from: "+15017122661",
111
+ to: "+15017122662",
112
+ subject: "Picture",
113
+ body: "Hi! How are you doing?",
114
+ type: "sms",
115
+ numberOfUnits: 1,
116
+ numberOfMediaFiles: 1,
117
+ direction: "outbound-api",
118
+ status: "sent",
119
+ scheduledAt: new Date("2020-09-30T07:43:32.000Z"),
120
+ sentAt: new Date("2020-09-30T07:43:32.000Z"),
121
+ webhookUrl:
122
+ "https://unify.apideck.com/webhook/webhooks/eyz329dkffdl4949/x/sms",
123
+ reference: "CUST001",
124
+ price: {
125
+ perUnit: "0.01",
126
+ totalAmount: "0.01",
127
+ currency: "USD",
128
+ },
129
+ error: {
130
+ code: "X1",
131
+ message: "Something went wrong",
132
+ },
133
+ messagingServiceId: "123456",
134
+ updatedBy: "12345",
135
+ createdBy: "12345",
136
+ updatedAt: new Date("2020-09-30T07:43:32.000Z"),
137
+ createdAt: new Date("2020-09-30T07:43:32.000Z"),
138
+ passThrough: [
139
+ {
140
+ serviceId: "<id>",
141
+ extendPaths: [
142
+ {
143
+ path: "$.nested.property",
144
+ value: {
145
+ "TaxClassificationRef": {
146
+ "value": "EUC-99990201-V1-00020000",
147
+ },
148
+ },
149
+ },
150
+ ],
151
+ },
152
+ ],
153
+ },
154
+ {
155
+ id: "12345",
156
+ from: "+15017122661",
157
+ to: "+15017122662",
158
+ subject: "Picture",
159
+ body: "Hi! How are you doing?",
160
+ type: "sms",
161
+ numberOfUnits: 1,
162
+ numberOfMediaFiles: 1,
163
+ direction: "outbound-api",
164
+ status: "sent",
165
+ scheduledAt: new Date("2020-09-30T07:43:32.000Z"),
166
+ sentAt: new Date("2020-09-30T07:43:32.000Z"),
167
+ webhookUrl:
168
+ "https://unify.apideck.com/webhook/webhooks/eyz329dkffdl4949/x/sms",
169
+ reference: "CUST001",
170
+ price: {
171
+ perUnit: "0.01",
172
+ totalAmount: "0.01",
173
+ currency: "USD",
174
+ },
175
+ error: {
176
+ code: "X1",
177
+ message: "Something went wrong",
178
+ },
179
+ messagingServiceId: "123456",
180
+ updatedBy: "12345",
181
+ createdBy: "12345",
182
+ updatedAt: new Date("2020-09-30T07:43:32.000Z"),
183
+ createdAt: new Date("2020-09-30T07:43:32.000Z"),
184
+ passThrough: [
185
+ {
186
+ serviceId: "<id>",
187
+ extendPaths: [
188
+ {
189
+ path: "$.nested.property",
190
+ value: {
191
+ "TaxClassificationRef": {
192
+ "value": "EUC-99990201-V1-00020000",
193
+ },
194
+ },
195
+ },
196
+ {
197
+ path: "$.nested.property",
198
+ value: {
199
+ "TaxClassificationRef": {
200
+ "value": "EUC-99990201-V1-00020000",
201
+ },
202
+ },
203
+ },
204
+ ],
205
+ },
206
+ {
207
+ serviceId: "<id>",
208
+ extendPaths: [
209
+ {
210
+ path: "$.nested.property",
211
+ value: {
212
+ "TaxClassificationRef": {
213
+ "value": "EUC-99990201-V1-00020000",
214
+ },
215
+ },
216
+ },
217
+ ],
218
+ },
219
+ ],
220
+ },
221
+ ],
222
+ meta: {
223
+ itemsOnPage: 50,
224
+ cursors: {
225
+ previous: "em9oby1jcm06OnBhZ2U6OjE=",
226
+ current: "em9oby1jcm06OnBhZ2U6OjI=",
227
+ next: "em9oby1jcm06OnBhZ2U6OjM=",
228
+ },
229
+ },
230
+ links: {
231
+ previous:
232
+ "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjE%3D",
233
+ current: "https://unify.apideck.com/crm/companies",
234
+ next:
235
+ "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjM",
236
+ },
237
+ });
238
+ });
239
+
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
+ });
322
+ });
323
+
324
+ test("Messages Sms Messages One", async () => {
325
+ const testHttpClient = createTestHTTPClient("sms.messagesOne");
326
+
327
+ const apideck = new Apideck({
328
+ serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
329
+ httpClient: testHttpClient,
330
+ apiKey: process.env["APIDECK_API_KEY"] ?? "value",
331
+ });
332
+
333
+ const result = await apideck.sms.messages.get({
334
+ id: "<id>",
335
+ consumerId: "test-consumer",
336
+ appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
337
+ serviceId: "salesforce",
338
+ fields: "id,updated_at",
339
+ });
340
+ expect(result.httpMeta.response.status).toBe(200);
341
+ expect(result.getMessageResponse).toBeDefined();
342
+ expect(result.getMessageResponse).toEqual({
343
+ statusCode: 200,
344
+ status: "OK",
345
+ service: "twilio",
346
+ resource: "Messages",
347
+ operation: "one",
348
+ data: {
349
+ id: "12345",
350
+ from: "+15017122661",
351
+ to: "+15017122662",
352
+ subject: "Picture",
353
+ body: "Hi! How are you doing?",
354
+ type: "sms",
355
+ numberOfUnits: 1,
356
+ numberOfMediaFiles: 1,
357
+ direction: "outbound-api",
358
+ status: "sent",
359
+ scheduledAt: new Date("2020-09-30T07:43:32.000Z"),
360
+ sentAt: new Date("2020-09-30T07:43:32.000Z"),
361
+ webhookUrl:
362
+ "https://unify.apideck.com/webhook/webhooks/eyz329dkffdl4949/x/sms",
363
+ reference: "CUST001",
364
+ price: {
365
+ perUnit: "0.01",
366
+ totalAmount: "0.01",
367
+ currency: "USD",
368
+ },
369
+ error: {
370
+ code: "X1",
371
+ message: "Something went wrong",
372
+ },
373
+ messagingServiceId: "123456",
374
+ updatedBy: "12345",
375
+ createdBy: "12345",
376
+ updatedAt: new Date("2020-09-30T07:43:32.000Z"),
377
+ createdAt: new Date("2020-09-30T07:43:32.000Z"),
378
+ passThrough: [
379
+ {
380
+ serviceId: "<id>",
381
+ extendPaths: [
382
+ {
383
+ path: "$.nested.property",
384
+ value: {
385
+ "TaxClassificationRef": {
386
+ "value": "EUC-99990201-V1-00020000",
387
+ },
388
+ },
389
+ },
390
+ {
391
+ path: "$.nested.property",
392
+ value: {
393
+ "TaxClassificationRef": {
394
+ "value": "EUC-99990201-V1-00020000",
395
+ },
396
+ },
397
+ },
398
+ ],
399
+ },
400
+ {
401
+ serviceId: "<id>",
402
+ extendPaths: [
403
+ {
404
+ path: "$.nested.property",
405
+ value: {
406
+ "TaxClassificationRef": {
407
+ "value": "EUC-99990201-V1-00020000",
408
+ },
409
+ },
410
+ },
411
+ {
412
+ path: "$.nested.property",
413
+ value: {
414
+ "TaxClassificationRef": {
415
+ "value": "EUC-99990201-V1-00020000",
416
+ },
417
+ },
418
+ },
419
+ ],
420
+ },
421
+ {
422
+ serviceId: "<id>",
423
+ extendPaths: [
424
+ {
425
+ path: "$.nested.property",
426
+ value: {
427
+ "TaxClassificationRef": {
428
+ "value": "EUC-99990201-V1-00020000",
429
+ },
430
+ },
431
+ },
432
+ {
433
+ path: "$.nested.property",
434
+ value: {
435
+ "TaxClassificationRef": {
436
+ "value": "EUC-99990201-V1-00020000",
437
+ },
438
+ },
439
+ },
440
+ ],
441
+ },
442
+ ],
443
+ },
444
+ });
445
+ });
446
+
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
+ });
559
+ });
560
+
561
+ test("Messages Sms Messages Delete", async () => {
562
+ const testHttpClient = createTestHTTPClient("sms.messagesDelete");
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.sms.messages.delete({
571
+ id: "<id>",
572
+ consumerId: "test-consumer",
573
+ appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
574
+ serviceId: "salesforce",
575
+ });
576
+ expect(result.httpMeta.response.status).toBe(200);
577
+ expect(result.deleteMessageResponse).toBeDefined();
578
+ expect(result.deleteMessageResponse).toEqual({
579
+ statusCode: 200,
580
+ status: "OK",
581
+ service: "twilio",
582
+ resource: "Messages",
583
+ operation: "delete",
584
+ data: {
585
+ id: "12345",
586
+ },
587
+ });
588
+ });