@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,72 +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("Sessions Vault Sessions Create", async () => {
10
- const testHttpClient = createTestHTTPClient("vault.sessionsCreate");
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.vault.sessions.create({
19
- consumerId: "test-consumer",
20
- appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
21
- session: {
22
- consumerMetadata: {
23
- accountName: "SpaceX",
24
- userName: "Elon Musk",
25
- email: "elon@musk.com",
26
- image: "https://www.spacex.com/static/images/share.jpg",
27
- },
28
- redirectUri: "https://mysaas.com/dashboard",
29
- settings: {
30
- unifiedApis: [
31
- "crm",
32
- ],
33
- },
34
- theme: {
35
- favicon: "https://res.cloudinary.com/apideck/icons/intercom",
36
- logo: "https://res.cloudinary.com/apideck/icons/intercom",
37
- primaryColor: "#286efa",
38
- sidepanelBackgroundColor: "#286efa",
39
- sidepanelTextColor: "#FFFFFF",
40
- vaultName: "Intercom",
41
- privacyUrl: "https://compliance.apideck.com/privacy-policy",
42
- termsUrl:
43
- "https://www.termsfeed.com/terms-conditions/957c85c1b089ae9e3219c83eff65377e",
44
- },
45
- customConsumerSettings: {
46
- "feature_flag_1": true,
47
- "tax_rates": [
48
- {
49
- "id": "6",
50
- "label": "6%",
51
- },
52
- {
53
- "id": "21",
54
- "label": "21%",
55
- },
56
- ],
57
- },
58
- },
59
- });
60
- expect(result.httpMeta.response.status).toBe(200);
61
- expect(result.createSessionResponse).toBeDefined();
62
- expect(result.createSessionResponse).toEqual({
63
- statusCode: 200,
64
- status: "OK",
65
- data: {
66
- sessionUri:
67
- "http://vault.apideck.com/session/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjb25zdW1lcl9pZCI6InRlc3RfdXNlcl9pZCIsImFwcGxpY2F0aW9uX2lkIj",
68
- sessionToken:
69
- "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjb25zdW1lcl9pZCI6InRlc3RfdXNlcl9pZCIsImFwcGxpY2F0aW9uX2lkIj",
70
- },
71
- });
72
- });
@@ -1,511 +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("Sharedlinks File Storage Shared Links All", async () => {
10
- const testHttpClient = createTestHTTPClient("fileStorage.sharedLinksAll");
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.fileStorage.sharedLinks.list({
19
- consumerId: "test-consumer",
20
- appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
21
- serviceId: "salesforce",
22
- passThrough: {
23
- "search": "San Francisco",
24
- },
25
- fields: "id,updated_at",
26
- });
27
- expect(result.httpMeta.response.status).toBe(200);
28
- expect(result.getSharedLinksResponse).toBeDefined();
29
- expect(result.getSharedLinksResponse).toEqual({
30
- statusCode: 200,
31
- status: "OK",
32
- service: "dropbox",
33
- resource: "Shared Links",
34
- operation: "all",
35
- data: [
36
- {
37
- url: "https://www.box.com/s/vspke7y05sb214wjokpk",
38
- downloadUrl:
39
- "https://www.box.com/shared/static/rh935iit6ewrmw0unyul.jpeg",
40
- target: {
41
- id: "12345",
42
- name: "sample.jpg",
43
- type: "file",
44
- },
45
- scope: "company",
46
- expiresAt: new Date("2022-09-30T07:43:32.000Z"),
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
- url: "https://www.box.com/s/vspke7y05sb214wjokpk",
96
- downloadUrl:
97
- "https://www.box.com/shared/static/rh935iit6ewrmw0unyul.jpeg",
98
- target: {
99
- id: "12345",
100
- name: "sample.jpg",
101
- type: "file",
102
- },
103
- scope: "company",
104
- expiresAt: new Date("2022-09-30T07:43:32.000Z"),
105
- updatedAt: new Date("2020-09-30T07:43:32.000Z"),
106
- createdAt: new Date("2020-09-30T07:43:32.000Z"),
107
- passThrough: [
108
- {
109
- serviceId: "<id>",
110
- extendPaths: [
111
- {
112
- path: "$.nested.property",
113
- value: {
114
- "TaxClassificationRef": {
115
- "value": "EUC-99990201-V1-00020000",
116
- },
117
- },
118
- },
119
- ],
120
- },
121
- ],
122
- },
123
- {
124
- url: "https://www.box.com/s/vspke7y05sb214wjokpk",
125
- downloadUrl:
126
- "https://www.box.com/shared/static/rh935iit6ewrmw0unyul.jpeg",
127
- target: {
128
- id: "12345",
129
- name: "sample.jpg",
130
- type: "file",
131
- },
132
- scope: "company",
133
- expiresAt: new Date("2022-09-30T07:43:32.000Z"),
134
- updatedAt: new Date("2020-09-30T07:43:32.000Z"),
135
- createdAt: new Date("2020-09-30T07:43:32.000Z"),
136
- passThrough: [
137
- {
138
- serviceId: "<id>",
139
- extendPaths: [
140
- {
141
- path: "$.nested.property",
142
- value: {
143
- "TaxClassificationRef": {
144
- "value": "EUC-99990201-V1-00020000",
145
- },
146
- },
147
- },
148
- {
149
- path: "$.nested.property",
150
- value: {
151
- "TaxClassificationRef": {
152
- "value": "EUC-99990201-V1-00020000",
153
- },
154
- },
155
- },
156
- ],
157
- },
158
- {
159
- serviceId: "<id>",
160
- extendPaths: [
161
- {
162
- path: "$.nested.property",
163
- value: {
164
- "TaxClassificationRef": {
165
- "value": "EUC-99990201-V1-00020000",
166
- },
167
- },
168
- },
169
- ],
170
- },
171
- ],
172
- },
173
- ],
174
- meta: {
175
- itemsOnPage: 50,
176
- cursors: {
177
- previous: "em9oby1jcm06OnBhZ2U6OjE=",
178
- current: "em9oby1jcm06OnBhZ2U6OjI=",
179
- next: "em9oby1jcm06OnBhZ2U6OjM=",
180
- },
181
- },
182
- links: {
183
- previous:
184
- "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjE%3D",
185
- current: "https://unify.apideck.com/crm/companies",
186
- next:
187
- "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjM",
188
- },
189
- });
190
- });
191
-
192
- test("Sharedlinks File Storage Shared Links Add", async () => {
193
- const testHttpClient = createTestHTTPClient("fileStorage.sharedLinksAdd");
194
-
195
- const apideck = new Apideck({
196
- serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
197
- httpClient: testHttpClient,
198
- apiKey: process.env["APIDECK_API_KEY"] ?? "value",
199
- });
200
-
201
- const result = await apideck.fileStorage.sharedLinks.create({
202
- consumerId: "test-consumer",
203
- appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
204
- serviceId: "salesforce",
205
- sharedLink: {
206
- downloadUrl:
207
- "https://www.box.com/shared/static/rh935iit6ewrmw0unyul.jpeg",
208
- targetId: "<id>",
209
- scope: "company",
210
- passThrough: [
211
- {
212
- serviceId: "<id>",
213
- extendPaths: [
214
- {
215
- path: "$.nested.property",
216
- value: {
217
- "TaxClassificationRef": {
218
- "value": "EUC-99990201-V1-00020000",
219
- },
220
- },
221
- },
222
- {
223
- path: "$.nested.property",
224
- value: {
225
- "TaxClassificationRef": {
226
- "value": "EUC-99990201-V1-00020000",
227
- },
228
- },
229
- },
230
- ],
231
- },
232
- {
233
- serviceId: "<id>",
234
- extendPaths: [
235
- {
236
- path: "$.nested.property",
237
- value: {
238
- "TaxClassificationRef": {
239
- "value": "EUC-99990201-V1-00020000",
240
- },
241
- },
242
- },
243
- {
244
- path: "$.nested.property",
245
- value: {
246
- "TaxClassificationRef": {
247
- "value": "EUC-99990201-V1-00020000",
248
- },
249
- },
250
- },
251
- ],
252
- },
253
- ],
254
- },
255
- });
256
- expect(result.httpMeta.response.status).toBe(201);
257
- expect(result.createSharedLinkResponse).toBeDefined();
258
- expect(result.createSharedLinkResponse).toEqual({
259
- statusCode: 200,
260
- status: "OK",
261
- service: "dropbox",
262
- resource: "Shared Links",
263
- operation: "add",
264
- data: {
265
- id: "12345",
266
- },
267
- });
268
- });
269
-
270
- test("Sharedlinks File Storage Shared Links One", async () => {
271
- const testHttpClient = createTestHTTPClient("fileStorage.sharedLinksOne");
272
-
273
- const apideck = new Apideck({
274
- serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
275
- httpClient: testHttpClient,
276
- apiKey: process.env["APIDECK_API_KEY"] ?? "value",
277
- });
278
-
279
- const result = await apideck.fileStorage.sharedLinks.get({
280
- id: "<id>",
281
- consumerId: "test-consumer",
282
- appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
283
- serviceId: "salesforce",
284
- fields: "id,updated_at",
285
- });
286
- expect(result.httpMeta.response.status).toBe(200);
287
- expect(result.getSharedLinkResponse).toBeDefined();
288
- expect(result.getSharedLinkResponse).toEqual({
289
- statusCode: 200,
290
- status: "OK",
291
- service: "dropbox",
292
- resource: "Shared Links",
293
- operation: "one",
294
- data: {
295
- url: "https://www.box.com/s/vspke7y05sb214wjokpk",
296
- downloadUrl:
297
- "https://www.box.com/shared/static/rh935iit6ewrmw0unyul.jpeg",
298
- target: {
299
- id: "12345",
300
- name: "sample.jpg",
301
- type: "file",
302
- },
303
- scope: "company",
304
- expiresAt: new Date("2022-09-30T07:43:32.000Z"),
305
- updatedAt: new Date("2020-09-30T07:43:32.000Z"),
306
- createdAt: new Date("2020-09-30T07:43:32.000Z"),
307
- passThrough: [
308
- {
309
- serviceId: "<id>",
310
- extendPaths: [
311
- {
312
- path: "$.nested.property",
313
- value: {
314
- "TaxClassificationRef": {
315
- "value": "EUC-99990201-V1-00020000",
316
- },
317
- },
318
- },
319
- {
320
- path: "$.nested.property",
321
- value: {
322
- "TaxClassificationRef": {
323
- "value": "EUC-99990201-V1-00020000",
324
- },
325
- },
326
- },
327
- ],
328
- },
329
- {
330
- serviceId: "<id>",
331
- extendPaths: [
332
- {
333
- path: "$.nested.property",
334
- value: {
335
- "TaxClassificationRef": {
336
- "value": "EUC-99990201-V1-00020000",
337
- },
338
- },
339
- },
340
- {
341
- path: "$.nested.property",
342
- value: {
343
- "TaxClassificationRef": {
344
- "value": "EUC-99990201-V1-00020000",
345
- },
346
- },
347
- },
348
- ],
349
- },
350
- {
351
- serviceId: "<id>",
352
- extendPaths: [
353
- {
354
- path: "$.nested.property",
355
- value: {
356
- "TaxClassificationRef": {
357
- "value": "EUC-99990201-V1-00020000",
358
- },
359
- },
360
- },
361
- {
362
- path: "$.nested.property",
363
- value: {
364
- "TaxClassificationRef": {
365
- "value": "EUC-99990201-V1-00020000",
366
- },
367
- },
368
- },
369
- ],
370
- },
371
- ],
372
- },
373
- });
374
- });
375
-
376
- test("Sharedlinks File Storage Shared Links Update", async () => {
377
- const testHttpClient = createTestHTTPClient("fileStorage.sharedLinksUpdate");
378
-
379
- const apideck = new Apideck({
380
- serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
381
- httpClient: testHttpClient,
382
- apiKey: process.env["APIDECK_API_KEY"] ?? "value",
383
- });
384
-
385
- const result = await apideck.fileStorage.sharedLinks.update({
386
- id: "<id>",
387
- consumerId: "test-consumer",
388
- appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
389
- serviceId: "salesforce",
390
- sharedLink: {
391
- downloadUrl:
392
- "https://www.box.com/shared/static/rh935iit6ewrmw0unyul.jpeg",
393
- targetId: "<id>",
394
- scope: "company",
395
- passThrough: [
396
- {
397
- serviceId: "<id>",
398
- extendPaths: [
399
- {
400
- path: "$.nested.property",
401
- value: {
402
- "TaxClassificationRef": {
403
- "value": "EUC-99990201-V1-00020000",
404
- },
405
- },
406
- },
407
- {
408
- path: "$.nested.property",
409
- value: {
410
- "TaxClassificationRef": {
411
- "value": "EUC-99990201-V1-00020000",
412
- },
413
- },
414
- },
415
- ],
416
- },
417
- {
418
- serviceId: "<id>",
419
- extendPaths: [
420
- {
421
- path: "$.nested.property",
422
- value: {
423
- "TaxClassificationRef": {
424
- "value": "EUC-99990201-V1-00020000",
425
- },
426
- },
427
- },
428
- {
429
- path: "$.nested.property",
430
- value: {
431
- "TaxClassificationRef": {
432
- "value": "EUC-99990201-V1-00020000",
433
- },
434
- },
435
- },
436
- ],
437
- },
438
- {
439
- serviceId: "<id>",
440
- extendPaths: [
441
- {
442
- path: "$.nested.property",
443
- value: {
444
- "TaxClassificationRef": {
445
- "value": "EUC-99990201-V1-00020000",
446
- },
447
- },
448
- },
449
- {
450
- path: "$.nested.property",
451
- value: {
452
- "TaxClassificationRef": {
453
- "value": "EUC-99990201-V1-00020000",
454
- },
455
- },
456
- },
457
- {
458
- path: "$.nested.property",
459
- value: {
460
- "TaxClassificationRef": {
461
- "value": "EUC-99990201-V1-00020000",
462
- },
463
- },
464
- },
465
- ],
466
- },
467
- ],
468
- },
469
- });
470
- expect(result.httpMeta.response.status).toBe(200);
471
- expect(result.updateSharedLinkResponse).toBeDefined();
472
- expect(result.updateSharedLinkResponse).toEqual({
473
- statusCode: 200,
474
- status: "OK",
475
- service: "dropbox",
476
- resource: "Shared Links",
477
- operation: "update",
478
- data: {
479
- id: "12345",
480
- },
481
- });
482
- });
483
-
484
- test("Sharedlinks File Storage Shared Links Delete", async () => {
485
- const testHttpClient = createTestHTTPClient("fileStorage.sharedLinksDelete");
486
-
487
- const apideck = new Apideck({
488
- serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
489
- httpClient: testHttpClient,
490
- apiKey: process.env["APIDECK_API_KEY"] ?? "value",
491
- });
492
-
493
- const result = await apideck.fileStorage.sharedLinks.delete({
494
- id: "<id>",
495
- consumerId: "test-consumer",
496
- appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
497
- serviceId: "salesforce",
498
- });
499
- expect(result.httpMeta.response.status).toBe(200);
500
- expect(result.deleteSharedLinkResponse).toBeDefined();
501
- expect(result.deleteSharedLinkResponse).toEqual({
502
- statusCode: 200,
503
- status: "OK",
504
- service: "dropbox",
505
- resource: "Shared Links",
506
- operation: "delete",
507
- data: {
508
- id: "12345",
509
- },
510
- });
511
- });
@@ -1,41 +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("Stores Ecommerce Stores One", async () => {
10
- const testHttpClient = createTestHTTPClient("ecommerce.storesOne");
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.ecommerce.stores.get({
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.getStoreResponse).toBeDefined();
26
- expect(result.getStoreResponse).toEqual({
27
- statusCode: 200,
28
- status: "OK",
29
- service: "shopify",
30
- resource: "stores",
31
- operation: "one",
32
- data: {
33
- id: "12345",
34
- name: "My Store",
35
- storeUrl: "https://mybrand.com/shop",
36
- adminUrl: "https://mybrand.com/admin",
37
- createdAt: new Date("2020-09-30T07:43:32.000Z"),
38
- updatedAt: new Date("2020-09-30T07:43:32.000Z"),
39
- },
40
- });
41
- });