@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("Applications Ats Applications All", async () => {
10
- const testHttpClient = createTestHTTPClient("ats.applicationsAll");
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.ats.applications.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.getApplicationsResponse).toBeDefined();
28
- expect(result.getApplicationsResponse).toEqual({
29
- statusCode: 200,
30
- status: "OK",
31
- service: "sap-successfactors",
32
- resource: "Applications",
33
- operation: "all",
34
- data: [
35
- {
36
- id: "12345",
37
- applicantId: "12345",
38
- jobId: "12345",
39
- status: "open",
40
- stage: {
41
- id: "12345",
42
- name: "12345",
43
- },
44
- updatedBy: "12345",
45
- createdBy: "12345",
46
- updatedAt: new Date("2020-09-30T07:43:32.000Z"),
47
- createdAt: new Date("2020-09-30T07:43:32.000Z"),
48
- passThrough: [
49
- {
50
- serviceId: "<id>",
51
- extendPaths: [
52
- {
53
- path: "$.nested.property",
54
- value: {
55
- "TaxClassificationRef": {
56
- "value": "EUC-99990201-V1-00020000",
57
- },
58
- },
59
- },
60
- {
61
- path: "$.nested.property",
62
- value: {
63
- "TaxClassificationRef": {
64
- "value": "EUC-99990201-V1-00020000",
65
- },
66
- },
67
- },
68
- {
69
- path: "$.nested.property",
70
- value: {
71
- "TaxClassificationRef": {
72
- "value": "EUC-99990201-V1-00020000",
73
- },
74
- },
75
- },
76
- ],
77
- },
78
- {
79
- serviceId: "<id>",
80
- extendPaths: [
81
- {
82
- path: "$.nested.property",
83
- value: {
84
- "TaxClassificationRef": {
85
- "value": "EUC-99990201-V1-00020000",
86
- },
87
- },
88
- },
89
- ],
90
- },
91
- ],
92
- },
93
- {
94
- id: "12345",
95
- applicantId: "12345",
96
- jobId: "12345",
97
- status: "open",
98
- stage: {
99
- id: "12345",
100
- name: "12345",
101
- },
102
- updatedBy: "12345",
103
- createdBy: "12345",
104
- updatedAt: new Date("2020-09-30T07:43:32.000Z"),
105
- createdAt: new Date("2020-09-30T07:43:32.000Z"),
106
- passThrough: [
107
- {
108
- serviceId: "<id>",
109
- extendPaths: [
110
- {
111
- path: "$.nested.property",
112
- value: {
113
- "TaxClassificationRef": {
114
- "value": "EUC-99990201-V1-00020000",
115
- },
116
- },
117
- },
118
- ],
119
- },
120
- ],
121
- },
122
- {
123
- id: "12345",
124
- applicantId: "12345",
125
- jobId: "12345",
126
- status: "open",
127
- stage: {
128
- id: "12345",
129
- name: "12345",
130
- },
131
- updatedBy: "12345",
132
- createdBy: "12345",
133
- updatedAt: new Date("2020-09-30T07:43:32.000Z"),
134
- createdAt: new Date("2020-09-30T07:43:32.000Z"),
135
- passThrough: [
136
- {
137
- serviceId: "<id>",
138
- extendPaths: [
139
- {
140
- path: "$.nested.property",
141
- value: {
142
- "TaxClassificationRef": {
143
- "value": "EUC-99990201-V1-00020000",
144
- },
145
- },
146
- },
147
- {
148
- path: "$.nested.property",
149
- value: {
150
- "TaxClassificationRef": {
151
- "value": "EUC-99990201-V1-00020000",
152
- },
153
- },
154
- },
155
- ],
156
- },
157
- {
158
- serviceId: "<id>",
159
- extendPaths: [
160
- {
161
- path: "$.nested.property",
162
- value: {
163
- "TaxClassificationRef": {
164
- "value": "EUC-99990201-V1-00020000",
165
- },
166
- },
167
- },
168
- ],
169
- },
170
- ],
171
- },
172
- ],
173
- meta: {
174
- itemsOnPage: 50,
175
- cursors: {
176
- previous: "em9oby1jcm06OnBhZ2U6OjE=",
177
- current: "em9oby1jcm06OnBhZ2U6OjI=",
178
- next: "em9oby1jcm06OnBhZ2U6OjM=",
179
- },
180
- },
181
- links: {
182
- previous:
183
- "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjE%3D",
184
- current: "https://unify.apideck.com/crm/companies",
185
- next:
186
- "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjM",
187
- },
188
- });
189
- });
190
-
191
- test("Applications Ats Applications Add", async () => {
192
- const testHttpClient = createTestHTTPClient("ats.applicationsAdd");
193
-
194
- const apideck = new Apideck({
195
- serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
196
- httpClient: testHttpClient,
197
- apiKey: process.env["APIDECK_API_KEY"] ?? "value",
198
- });
199
-
200
- const result = await apideck.ats.applications.create({
201
- consumerId: "test-consumer",
202
- appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
203
- serviceId: "salesforce",
204
- application: {
205
- applicantId: "12345",
206
- jobId: "12345",
207
- status: "open",
208
- stage: {
209
- id: "12345",
210
- name: "12345",
211
- },
212
- passThrough: [
213
- {
214
- serviceId: "<id>",
215
- extendPaths: [
216
- {
217
- path: "$.nested.property",
218
- value: {
219
- "TaxClassificationRef": {
220
- "value": "EUC-99990201-V1-00020000",
221
- },
222
- },
223
- },
224
- {
225
- path: "$.nested.property",
226
- value: {
227
- "TaxClassificationRef": {
228
- "value": "EUC-99990201-V1-00020000",
229
- },
230
- },
231
- },
232
- ],
233
- },
234
- {
235
- serviceId: "<id>",
236
- extendPaths: [
237
- {
238
- path: "$.nested.property",
239
- value: {
240
- "TaxClassificationRef": {
241
- "value": "EUC-99990201-V1-00020000",
242
- },
243
- },
244
- },
245
- {
246
- path: "$.nested.property",
247
- value: {
248
- "TaxClassificationRef": {
249
- "value": "EUC-99990201-V1-00020000",
250
- },
251
- },
252
- },
253
- ],
254
- },
255
- ],
256
- },
257
- });
258
- expect(result.httpMeta.response.status).toBe(201);
259
- expect(result.createApplicationResponse).toBeDefined();
260
- expect(result.createApplicationResponse).toEqual({
261
- statusCode: 200,
262
- status: "OK",
263
- service: "sap-successfactors",
264
- resource: "Applications",
265
- operation: "add",
266
- data: {
267
- id: "12345",
268
- },
269
- });
270
- });
271
-
272
- test("Applications Ats Applications One", async () => {
273
- const testHttpClient = createTestHTTPClient("ats.applicationsOne");
274
-
275
- const apideck = new Apideck({
276
- serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
277
- httpClient: testHttpClient,
278
- apiKey: process.env["APIDECK_API_KEY"] ?? "value",
279
- });
280
-
281
- const result = await apideck.ats.applications.get({
282
- id: "<id>",
283
- consumerId: "test-consumer",
284
- appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
285
- serviceId: "salesforce",
286
- });
287
- expect(result.httpMeta.response.status).toBe(200);
288
- expect(result.getApplicationResponse).toBeDefined();
289
- expect(result.getApplicationResponse).toEqual({
290
- statusCode: 200,
291
- status: "OK",
292
- service: "sap-successfactors",
293
- resource: "Applications",
294
- operation: "one",
295
- data: {
296
- id: "12345",
297
- applicantId: "12345",
298
- jobId: "12345",
299
- status: "open",
300
- stage: {
301
- id: "12345",
302
- name: "12345",
303
- },
304
- updatedBy: "12345",
305
- createdBy: "12345",
306
- updatedAt: new Date("2020-09-30T07:43:32.000Z"),
307
- createdAt: new Date("2020-09-30T07:43:32.000Z"),
308
- passThrough: [
309
- {
310
- serviceId: "<id>",
311
- extendPaths: [
312
- {
313
- path: "$.nested.property",
314
- value: {
315
- "TaxClassificationRef": {
316
- "value": "EUC-99990201-V1-00020000",
317
- },
318
- },
319
- },
320
- {
321
- path: "$.nested.property",
322
- value: {
323
- "TaxClassificationRef": {
324
- "value": "EUC-99990201-V1-00020000",
325
- },
326
- },
327
- },
328
- ],
329
- },
330
- {
331
- serviceId: "<id>",
332
- extendPaths: [
333
- {
334
- path: "$.nested.property",
335
- value: {
336
- "TaxClassificationRef": {
337
- "value": "EUC-99990201-V1-00020000",
338
- },
339
- },
340
- },
341
- {
342
- path: "$.nested.property",
343
- value: {
344
- "TaxClassificationRef": {
345
- "value": "EUC-99990201-V1-00020000",
346
- },
347
- },
348
- },
349
- ],
350
- },
351
- {
352
- serviceId: "<id>",
353
- extendPaths: [
354
- {
355
- path: "$.nested.property",
356
- value: {
357
- "TaxClassificationRef": {
358
- "value": "EUC-99990201-V1-00020000",
359
- },
360
- },
361
- },
362
- {
363
- path: "$.nested.property",
364
- value: {
365
- "TaxClassificationRef": {
366
- "value": "EUC-99990201-V1-00020000",
367
- },
368
- },
369
- },
370
- ],
371
- },
372
- ],
373
- },
374
- });
375
- });
376
-
377
- test("Applications Ats Applications Update", async () => {
378
- const testHttpClient = createTestHTTPClient("ats.applicationsUpdate");
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.ats.applications.update({
387
- id: "<id>",
388
- consumerId: "test-consumer",
389
- appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
390
- serviceId: "salesforce",
391
- application: {
392
- applicantId: "12345",
393
- jobId: "12345",
394
- status: "open",
395
- stage: {
396
- id: "12345",
397
- name: "12345",
398
- },
399
- passThrough: [
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
- serviceId: "<id>",
444
- extendPaths: [
445
- {
446
- path: "$.nested.property",
447
- value: {
448
- "TaxClassificationRef": {
449
- "value": "EUC-99990201-V1-00020000",
450
- },
451
- },
452
- },
453
- {
454
- path: "$.nested.property",
455
- value: {
456
- "TaxClassificationRef": {
457
- "value": "EUC-99990201-V1-00020000",
458
- },
459
- },
460
- },
461
- {
462
- path: "$.nested.property",
463
- value: {
464
- "TaxClassificationRef": {
465
- "value": "EUC-99990201-V1-00020000",
466
- },
467
- },
468
- },
469
- ],
470
- },
471
- ],
472
- },
473
- });
474
- expect(result.httpMeta.response.status).toBe(200);
475
- expect(result.updateApplicationResponse).toBeDefined();
476
- expect(result.updateApplicationResponse).toEqual({
477
- statusCode: 200,
478
- status: "OK",
479
- service: "sap-successfactors",
480
- resource: "Applications",
481
- operation: "update",
482
- data: {
483
- id: "12345",
484
- },
485
- });
486
- });
487
-
488
- test("Applications Ats Applications Delete", async () => {
489
- const testHttpClient = createTestHTTPClient("ats.applicationsDelete");
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.ats.applications.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.deleteApplicationResponse).toBeDefined();
505
- expect(result.deleteApplicationResponse).toEqual({
506
- statusCode: 200,
507
- status: "OK",
508
- service: "sap-successfactors",
509
- resource: "Applications",
510
- operation: "delete",
511
- data: {
512
- id: "12345",
513
- },
514
- });
515
- });
@@ -1,13 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import { fail } from "assert";
6
-
7
- export function assertDefined(value: any): any {
8
- if (value === undefined) {
9
- fail("value is undefined");
10
- }
11
-
12
- return value;
13
- }