@apideck/unify 0.39.7 → 0.40.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 (102) 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/lib/config.js.map +1 -1
  5. package/lib/encodings.d.ts +1 -0
  6. package/lib/encodings.d.ts.map +1 -1
  7. package/lib/encodings.js +7 -0
  8. package/lib/encodings.js.map +1 -1
  9. package/package.json +2 -6
  10. package/src/lib/config.ts +4 -4
  11. package/src/lib/encodings.ts +9 -0
  12. package/src/__tests__/activities.test.ts +0 -1141
  13. package/src/__tests__/agedcreditors.test.ts +0 -280
  14. package/src/__tests__/ageddebtors.test.ts +0 -280
  15. package/src/__tests__/apideckcompanies.test.ts +0 -1082
  16. package/src/__tests__/apideckcustomers.test.ts +0 -364
  17. package/src/__tests__/apideckdepartments.test.ts +0 -497
  18. package/src/__tests__/apiresources.test.ts +0 -62
  19. package/src/__tests__/apis.test.ts +0 -216
  20. package/src/__tests__/applicants.test.ts +0 -1445
  21. package/src/__tests__/applications.test.ts +0 -515
  22. package/src/__tests__/assertions.ts +0 -13
  23. package/src/__tests__/attachments.test.ts +0 -371
  24. package/src/__tests__/balancesheet.test.ts +0 -453
  25. package/src/__tests__/bankaccounts.test.ts +0 -324
  26. package/src/__tests__/bankfeedaccounts.test.ts +0 -343
  27. package/src/__tests__/bankfeedstatements.test.ts +0 -408
  28. package/src/__tests__/billpayments.test.ts +0 -1031
  29. package/src/__tests__/bills.test.ts +0 -1630
  30. package/src/__tests__/categories.test.ts +0 -127
  31. package/src/__tests__/collections.test.ts +0 -120
  32. package/src/__tests__/collectiontags.test.ts +0 -68
  33. package/src/__tests__/collectionticketcomments.test.ts +0 -501
  34. package/src/__tests__/collectiontickets.test.ts +0 -627
  35. package/src/__tests__/collectionusers.test.ts +0 -126
  36. package/src/__tests__/companies.test.ts +0 -1642
  37. package/src/__tests__/companyinfo.test.ts +0 -219
  38. package/src/__tests__/connectionconsent.test.ts +0 -89
  39. package/src/__tests__/connectionconsents.test.ts +0 -31
  40. package/src/__tests__/connectioncustommappings.test.ts +0 -69
  41. package/src/__tests__/connections.test.ts +0 -2127
  42. package/src/__tests__/connectionsettings.test.ts +0 -687
  43. package/src/__tests__/connectordocs.test.ts +0 -29
  44. package/src/__tests__/connectors.test.ts +0 -753
  45. package/src/__tests__/consumerrequestcounts.test.ts +0 -42
  46. package/src/__tests__/consumers.test.ts +0 -523
  47. package/src/__tests__/contacts.test.ts +0 -1421
  48. package/src/__tests__/createcallback.test.ts +0 -36
  49. package/src/__tests__/creditnotes.test.ts +0 -2040
  50. package/src/__tests__/customers.test.ts +0 -1600
  51. package/src/__tests__/customfields.test.ts +0 -52
  52. package/src/__tests__/custommappings.test.ts +0 -65
  53. package/src/__tests__/customobjects.test.ts +0 -408
  54. package/src/__tests__/customobjectschemas.test.ts +0 -734
  55. package/src/__tests__/departments.test.ts +0 -529
  56. package/src/__tests__/drivegroups.test.ts +0 -496
  57. package/src/__tests__/drives.test.ts +0 -487
  58. package/src/__tests__/employeepayrolls.test.ts +0 -491
  59. package/src/__tests__/employees.test.ts +0 -2968
  60. package/src/__tests__/employeeschedules.test.ts +0 -457
  61. package/src/__tests__/eventlogs.test.ts +0 -158
  62. package/src/__tests__/expensecategories.test.ts +0 -324
  63. package/src/__tests__/expensereports.test.ts +0 -634
  64. package/src/__tests__/expenses.test.ts +0 -867
  65. package/src/__tests__/files.test.ts +0 -506
  66. package/src/__tests__/files.ts +0 -56
  67. package/src/__tests__/folders.test.ts +0 -390
  68. package/src/__tests__/invoiceitems.test.ts +0 -855
  69. package/src/__tests__/invoices.test.ts +0 -2173
  70. package/src/__tests__/jobs.test.ts +0 -1150
  71. package/src/__tests__/journalentries.test.ts +0 -1542
  72. package/src/__tests__/leads.test.ts +0 -1341
  73. package/src/__tests__/ledgeraccounts.test.ts +0 -829
  74. package/src/__tests__/locations.test.ts +0 -856
  75. package/src/__tests__/logs.test.ts +0 -137
  76. package/src/__tests__/messages.test.ts +0 -588
  77. package/src/__tests__/notes.test.ts +0 -523
  78. package/src/__tests__/opportunities.test.ts +0 -718
  79. package/src/__tests__/orders.test.ts +0 -854
  80. package/src/__tests__/payments.test.ts +0 -867
  81. package/src/__tests__/payrolls.test.ts +0 -485
  82. package/src/__tests__/pipelines.test.ts +0 -574
  83. package/src/__tests__/products.test.ts +0 -509
  84. package/src/__tests__/profitandloss.test.ts +0 -223
  85. package/src/__tests__/projects.test.ts +0 -480
  86. package/src/__tests__/proxy.test.ts +0 -41
  87. package/src/__tests__/purchaseorders.test.ts +0 -2139
  88. package/src/__tests__/quotes.test.ts +0 -678
  89. package/src/__tests__/refunds.test.ts +0 -812
  90. package/src/__tests__/sessions.test.ts +0 -72
  91. package/src/__tests__/sharedlinks.test.ts +0 -511
  92. package/src/__tests__/stores.test.ts +0 -41
  93. package/src/__tests__/subsidiaries.test.ts +0 -496
  94. package/src/__tests__/suppliers.test.ts +0 -1574
  95. package/src/__tests__/taxrates.test.ts +0 -701
  96. package/src/__tests__/testclient.ts +0 -48
  97. package/src/__tests__/timeoffrequests.test.ts +0 -588
  98. package/src/__tests__/trackingcategories.test.ts +0 -515
  99. package/src/__tests__/uploadsessions.test.ts +0 -221
  100. package/src/__tests__/users.test.ts +0 -1020
  101. package/src/__tests__/validateconnection.test.ts +0 -34
  102. package/src/__tests__/webhooks.test.ts +0 -254
@@ -1,515 +0,0 @@
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("Trackingcategories Accounting Tracking Categories All", async () => {
10
- const testHttpClient = createTestHTTPClient(
11
- "accounting.trackingCategoriesAll",
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.accounting.trackingCategories.list({
21
- consumerId: "test-consumer",
22
- appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
23
- serviceId: "salesforce",
24
- passThrough: {
25
- "search": "San Francisco",
26
- },
27
- fields: "id,updated_at",
28
- });
29
- expect(result.httpMeta.response.status).toBe(200);
30
- expect(result.getTrackingCategoriesResponse).toBeDefined();
31
- expect(result.getTrackingCategoriesResponse).toEqual({
32
- statusCode: 200,
33
- status: "OK",
34
- service: "quickbooks",
35
- resource: "tracking-categories",
36
- operation: "all",
37
- data: [
38
- {
39
- id: "12345",
40
- parentId: "12345",
41
- name: "Department",
42
- code: "100",
43
- status: "active",
44
- rowVersion: "1-12345",
45
- updatedBy: "12345",
46
- createdBy: "12345",
47
- updatedAt: new Date("2020-09-30T07:43:32.000Z"),
48
- createdAt: new Date("2020-09-30T07:43:32.000Z"),
49
- passThrough: [
50
- {
51
- serviceId: "<id>",
52
- extendPaths: [
53
- {
54
- path: "$.nested.property",
55
- value: {
56
- "TaxClassificationRef": {
57
- "value": "EUC-99990201-V1-00020000",
58
- },
59
- },
60
- },
61
- {
62
- path: "$.nested.property",
63
- value: {
64
- "TaxClassificationRef": {
65
- "value": "EUC-99990201-V1-00020000",
66
- },
67
- },
68
- },
69
- {
70
- path: "$.nested.property",
71
- value: {
72
- "TaxClassificationRef": {
73
- "value": "EUC-99990201-V1-00020000",
74
- },
75
- },
76
- },
77
- ],
78
- },
79
- {
80
- serviceId: "<id>",
81
- extendPaths: [
82
- {
83
- path: "$.nested.property",
84
- value: {
85
- "TaxClassificationRef": {
86
- "value": "EUC-99990201-V1-00020000",
87
- },
88
- },
89
- },
90
- ],
91
- },
92
- ],
93
- },
94
- {
95
- id: "12345",
96
- parentId: "12345",
97
- name: "Department",
98
- code: "100",
99
- status: "active",
100
- rowVersion: "1-12345",
101
- updatedBy: "12345",
102
- createdBy: "12345",
103
- updatedAt: new Date("2020-09-30T07:43:32.000Z"),
104
- createdAt: new Date("2020-09-30T07:43:32.000Z"),
105
- passThrough: [
106
- {
107
- serviceId: "<id>",
108
- extendPaths: [
109
- {
110
- path: "$.nested.property",
111
- value: {
112
- "TaxClassificationRef": {
113
- "value": "EUC-99990201-V1-00020000",
114
- },
115
- },
116
- },
117
- ],
118
- },
119
- ],
120
- },
121
- {
122
- id: "12345",
123
- parentId: "12345",
124
- name: "Department",
125
- code: "100",
126
- status: "active",
127
- rowVersion: "1-12345",
128
- updatedBy: "12345",
129
- createdBy: "12345",
130
- updatedAt: new Date("2020-09-30T07:43:32.000Z"),
131
- createdAt: new Date("2020-09-30T07:43:32.000Z"),
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
- path: "$.nested.property",
146
- value: {
147
- "TaxClassificationRef": {
148
- "value": "EUC-99990201-V1-00020000",
149
- },
150
- },
151
- },
152
- ],
153
- },
154
- {
155
- serviceId: "<id>",
156
- extendPaths: [
157
- {
158
- path: "$.nested.property",
159
- value: {
160
- "TaxClassificationRef": {
161
- "value": "EUC-99990201-V1-00020000",
162
- },
163
- },
164
- },
165
- ],
166
- },
167
- ],
168
- },
169
- ],
170
- meta: {
171
- itemsOnPage: 50,
172
- cursors: {
173
- previous: "em9oby1jcm06OnBhZ2U6OjE=",
174
- current: "em9oby1jcm06OnBhZ2U6OjI=",
175
- next: "em9oby1jcm06OnBhZ2U6OjM=",
176
- },
177
- },
178
- links: {
179
- previous:
180
- "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjE%3D",
181
- current: "https://unify.apideck.com/crm/companies",
182
- next:
183
- "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjM",
184
- },
185
- });
186
- });
187
-
188
- test("Trackingcategories Accounting Tracking Categories Add", async () => {
189
- const testHttpClient = createTestHTTPClient(
190
- "accounting.trackingCategoriesAdd",
191
- );
192
-
193
- const apideck = new Apideck({
194
- serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
195
- httpClient: testHttpClient,
196
- apiKey: process.env["APIDECK_API_KEY"] ?? "value",
197
- });
198
-
199
- const result = await apideck.accounting.trackingCategories.create({
200
- consumerId: "test-consumer",
201
- appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
202
- serviceId: "salesforce",
203
- trackingCategory: {
204
- parentId: "12345",
205
- name: "Department",
206
- code: "100",
207
- status: "active",
208
- rowVersion: "1-12345",
209
- passThrough: [
210
- {
211
- serviceId: "<id>",
212
- extendPaths: [
213
- {
214
- path: "$.nested.property",
215
- value: {
216
- "TaxClassificationRef": {
217
- "value": "EUC-99990201-V1-00020000",
218
- },
219
- },
220
- },
221
- {
222
- path: "$.nested.property",
223
- value: {
224
- "TaxClassificationRef": {
225
- "value": "EUC-99990201-V1-00020000",
226
- },
227
- },
228
- },
229
- ],
230
- },
231
- {
232
- serviceId: "<id>",
233
- extendPaths: [
234
- {
235
- path: "$.nested.property",
236
- value: {
237
- "TaxClassificationRef": {
238
- "value": "EUC-99990201-V1-00020000",
239
- },
240
- },
241
- },
242
- {
243
- path: "$.nested.property",
244
- value: {
245
- "TaxClassificationRef": {
246
- "value": "EUC-99990201-V1-00020000",
247
- },
248
- },
249
- },
250
- ],
251
- },
252
- ],
253
- },
254
- });
255
- expect(result.httpMeta.response.status).toBe(201);
256
- expect(result.createTrackingCategoryResponse).toBeDefined();
257
- expect(result.createTrackingCategoryResponse).toEqual({
258
- statusCode: 200,
259
- status: "OK",
260
- service: "quickbooks",
261
- resource: "tracking-categories",
262
- operation: "add",
263
- data: {
264
- id: "12345",
265
- },
266
- });
267
- });
268
-
269
- test("Trackingcategories Accounting Tracking Categories One", async () => {
270
- const testHttpClient = createTestHTTPClient(
271
- "accounting.trackingCategoriesOne",
272
- );
273
-
274
- const apideck = new Apideck({
275
- serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
276
- httpClient: testHttpClient,
277
- apiKey: process.env["APIDECK_API_KEY"] ?? "value",
278
- });
279
-
280
- const result = await apideck.accounting.trackingCategories.get({
281
- id: "<id>",
282
- consumerId: "test-consumer",
283
- appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
284
- serviceId: "salesforce",
285
- fields: "id,updated_at",
286
- });
287
- expect(result.httpMeta.response.status).toBe(200);
288
- expect(result.getTrackingCategoryResponse).toBeDefined();
289
- expect(result.getTrackingCategoryResponse).toEqual({
290
- statusCode: 200,
291
- status: "OK",
292
- service: "xero",
293
- resource: "tracking-categories",
294
- operation: "one",
295
- data: {
296
- id: "12345",
297
- parentId: "12345",
298
- name: "Department",
299
- code: "100",
300
- status: "active",
301
- rowVersion: "1-12345",
302
- updatedBy: "12345",
303
- createdBy: "12345",
304
- updatedAt: new Date("2020-09-30T07:43:32.000Z"),
305
- createdAt: new Date("2020-09-30T07:43:32.000Z"),
306
- passThrough: [
307
- {
308
- serviceId: "<id>",
309
- extendPaths: [
310
- {
311
- path: "$.nested.property",
312
- value: {
313
- "TaxClassificationRef": {
314
- "value": "EUC-99990201-V1-00020000",
315
- },
316
- },
317
- },
318
- {
319
- path: "$.nested.property",
320
- value: {
321
- "TaxClassificationRef": {
322
- "value": "EUC-99990201-V1-00020000",
323
- },
324
- },
325
- },
326
- ],
327
- },
328
- {
329
- serviceId: "<id>",
330
- extendPaths: [
331
- {
332
- path: "$.nested.property",
333
- value: {
334
- "TaxClassificationRef": {
335
- "value": "EUC-99990201-V1-00020000",
336
- },
337
- },
338
- },
339
- {
340
- path: "$.nested.property",
341
- value: {
342
- "TaxClassificationRef": {
343
- "value": "EUC-99990201-V1-00020000",
344
- },
345
- },
346
- },
347
- ],
348
- },
349
- {
350
- serviceId: "<id>",
351
- extendPaths: [
352
- {
353
- path: "$.nested.property",
354
- value: {
355
- "TaxClassificationRef": {
356
- "value": "EUC-99990201-V1-00020000",
357
- },
358
- },
359
- },
360
- {
361
- path: "$.nested.property",
362
- value: {
363
- "TaxClassificationRef": {
364
- "value": "EUC-99990201-V1-00020000",
365
- },
366
- },
367
- },
368
- ],
369
- },
370
- ],
371
- },
372
- });
373
- });
374
-
375
- test("Trackingcategories Accounting Tracking Categories Update", async () => {
376
- const testHttpClient = createTestHTTPClient(
377
- "accounting.trackingCategoriesUpdate",
378
- );
379
-
380
- const apideck = new Apideck({
381
- serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
382
- httpClient: testHttpClient,
383
- apiKey: process.env["APIDECK_API_KEY"] ?? "value",
384
- });
385
-
386
- const result = await apideck.accounting.trackingCategories.update({
387
- id: "<id>",
388
- consumerId: "test-consumer",
389
- appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
390
- serviceId: "salesforce",
391
- trackingCategory: {
392
- parentId: "12345",
393
- name: "Department",
394
- code: "100",
395
- status: "active",
396
- rowVersion: "1-12345",
397
- passThrough: [
398
- {
399
- serviceId: "<id>",
400
- extendPaths: [
401
- {
402
- path: "$.nested.property",
403
- value: {
404
- "TaxClassificationRef": {
405
- "value": "EUC-99990201-V1-00020000",
406
- },
407
- },
408
- },
409
- {
410
- path: "$.nested.property",
411
- value: {
412
- "TaxClassificationRef": {
413
- "value": "EUC-99990201-V1-00020000",
414
- },
415
- },
416
- },
417
- ],
418
- },
419
- {
420
- serviceId: "<id>",
421
- extendPaths: [
422
- {
423
- path: "$.nested.property",
424
- value: {
425
- "TaxClassificationRef": {
426
- "value": "EUC-99990201-V1-00020000",
427
- },
428
- },
429
- },
430
- {
431
- path: "$.nested.property",
432
- value: {
433
- "TaxClassificationRef": {
434
- "value": "EUC-99990201-V1-00020000",
435
- },
436
- },
437
- },
438
- ],
439
- },
440
- {
441
- serviceId: "<id>",
442
- extendPaths: [
443
- {
444
- path: "$.nested.property",
445
- value: {
446
- "TaxClassificationRef": {
447
- "value": "EUC-99990201-V1-00020000",
448
- },
449
- },
450
- },
451
- {
452
- path: "$.nested.property",
453
- value: {
454
- "TaxClassificationRef": {
455
- "value": "EUC-99990201-V1-00020000",
456
- },
457
- },
458
- },
459
- {
460
- path: "$.nested.property",
461
- value: {
462
- "TaxClassificationRef": {
463
- "value": "EUC-99990201-V1-00020000",
464
- },
465
- },
466
- },
467
- ],
468
- },
469
- ],
470
- },
471
- });
472
- expect(result.httpMeta.response.status).toBe(200);
473
- expect(result.updateTrackingCategoryResponse).toBeDefined();
474
- expect(result.updateTrackingCategoryResponse).toEqual({
475
- statusCode: 200,
476
- status: "OK",
477
- service: "quickbooks",
478
- resource: "tracking-categories",
479
- operation: "update",
480
- data: {
481
- id: "12345",
482
- },
483
- });
484
- });
485
-
486
- test("Trackingcategories Accounting Tracking Categories Delete", async () => {
487
- const testHttpClient = createTestHTTPClient(
488
- "accounting.trackingCategoriesDelete",
489
- );
490
-
491
- const apideck = new Apideck({
492
- serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
493
- httpClient: testHttpClient,
494
- apiKey: process.env["APIDECK_API_KEY"] ?? "value",
495
- });
496
-
497
- const result = await apideck.accounting.trackingCategories.delete({
498
- id: "<id>",
499
- consumerId: "test-consumer",
500
- appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
501
- serviceId: "salesforce",
502
- });
503
- expect(result.httpMeta.response.status).toBe(200);
504
- expect(result.deleteTrackingCategoryResponse).toBeDefined();
505
- expect(result.deleteTrackingCategoryResponse).toEqual({
506
- statusCode: 200,
507
- status: "OK",
508
- service: "quickbooks",
509
- resource: "tracking-categories",
510
- operation: "delete",
511
- data: {
512
- id: "12345",
513
- },
514
- });
515
- });