@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,392 @@
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 { DownloadAcceptEnum, ExportAcceptEnum } from "../sdk/files.js";
8
+ import { filesToByteArray, streamToByteArray } from "./files.js";
9
+ import { createTestHTTPClient } from "./testclient.js";
10
+
11
+ test("Files File Storage Files All", async () => {
12
+ const testHttpClient = createTestHTTPClient("fileStorage.filesAll");
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.fileStorage.files.list({
21
+ serviceId: "salesforce",
22
+ filter: {
23
+ driveId: "1234",
24
+ folderId: "root",
25
+ shared: true,
26
+ },
27
+ sort: {
28
+ by: "updated_at",
29
+ },
30
+ passThrough: {
31
+ "search": "San Francisco",
32
+ },
33
+ fields: "id,updated_at",
34
+ });
35
+ expect(result.httpMeta.response.status).toBe(200);
36
+ expect(result.getFilesResponse).toBeDefined();
37
+ expect(result.getFilesResponse).toEqual({
38
+ statusCode: 200,
39
+ status: "OK",
40
+ service: "google-drive",
41
+ resource: "files",
42
+ operation: "all",
43
+ data: [
44
+ {
45
+ id: "12345",
46
+ downstreamId: "12345",
47
+ name: "sample.jpg",
48
+ description: "A sample image",
49
+ type: "file",
50
+ path: "/Documents/sample.jpg",
51
+ mimeType: "image/jpeg",
52
+ size: 1810673,
53
+ owner: {
54
+ id: "12345",
55
+ email: "hello@apideck.com",
56
+ name: "Elon Musk",
57
+ },
58
+ parentFolders: [
59
+ {
60
+ id: "12345",
61
+ name: "Personal",
62
+ },
63
+ {
64
+ id: "12345",
65
+ name: "Personal",
66
+ },
67
+ ],
68
+ exportFormats: [
69
+ "application/pdf",
70
+ "application/vnd.oasis.opendocument.presentation",
71
+ "text/plain",
72
+ ],
73
+ updatedBy: "12345",
74
+ createdBy: "12345",
75
+ updatedAt: new Date("2020-09-30T07:43:32.000Z"),
76
+ createdAt: new Date("2020-09-30T07:43:32.000Z"),
77
+ },
78
+ {
79
+ id: "12345",
80
+ downstreamId: "12345",
81
+ name: "sample.jpg",
82
+ description: "A sample image",
83
+ type: "file",
84
+ path: "/Documents/sample.jpg",
85
+ mimeType: "image/jpeg",
86
+ size: 1810673,
87
+ owner: {
88
+ id: "12345",
89
+ email: "hello@apideck.com",
90
+ name: "Elon Musk",
91
+ },
92
+ parentFolders: [
93
+ {
94
+ id: "12345",
95
+ name: "Personal",
96
+ },
97
+ {
98
+ id: "12345",
99
+ name: "Personal",
100
+ },
101
+ {
102
+ id: "12345",
103
+ name: "Personal",
104
+ },
105
+ ],
106
+ exportFormats: [
107
+ "application/pdf",
108
+ "application/vnd.oasis.opendocument.presentation",
109
+ "text/plain",
110
+ ],
111
+ updatedBy: "12345",
112
+ createdBy: "12345",
113
+ updatedAt: new Date("2020-09-30T07:43:32.000Z"),
114
+ createdAt: new Date("2020-09-30T07:43:32.000Z"),
115
+ },
116
+ {
117
+ id: "12345",
118
+ downstreamId: "12345",
119
+ name: "sample.jpg",
120
+ description: "A sample image",
121
+ type: "file",
122
+ path: "/Documents/sample.jpg",
123
+ mimeType: "image/jpeg",
124
+ size: 1810673,
125
+ owner: {
126
+ id: "12345",
127
+ email: "hello@apideck.com",
128
+ name: "Elon Musk",
129
+ },
130
+ parentFolders: [
131
+ {
132
+ id: "12345",
133
+ name: "Personal",
134
+ },
135
+ ],
136
+ exportFormats: [
137
+ "application/pdf",
138
+ "application/vnd.oasis.opendocument.presentation",
139
+ "text/plain",
140
+ ],
141
+ updatedBy: "12345",
142
+ createdBy: "12345",
143
+ updatedAt: new Date("2020-09-30T07:43:32.000Z"),
144
+ createdAt: new Date("2020-09-30T07:43:32.000Z"),
145
+ },
146
+ ],
147
+ meta: {
148
+ itemsOnPage: 50,
149
+ cursors: {
150
+ previous: "em9oby1jcm06OnBhZ2U6OjE=",
151
+ current: "em9oby1jcm06OnBhZ2U6OjI=",
152
+ next: "em9oby1jcm06OnBhZ2U6OjM=",
153
+ },
154
+ },
155
+ links: {
156
+ previous:
157
+ "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjE%3D",
158
+ current: "https://unify.apideck.com/crm/companies",
159
+ next:
160
+ "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjM",
161
+ },
162
+ });
163
+ });
164
+
165
+ test("Files File Storage Files Search", async () => {
166
+ const testHttpClient = createTestHTTPClient("fileStorage.filesSearch");
167
+
168
+ const apideck = new Apideck({
169
+ serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
170
+ httpClient: testHttpClient,
171
+ apiKey: process.env["APIDECK_API_KEY"] ?? "value",
172
+ });
173
+
174
+ const result = await apideck.fileStorage.files.search({
175
+ serviceId: "salesforce",
176
+ passThrough: {
177
+ "search": "San Francisco",
178
+ },
179
+ fields: "id,updated_at",
180
+ filter: {
181
+ driveId: "1234",
182
+ folderId: "root",
183
+ shared: true,
184
+ },
185
+ filesSearch: {
186
+ query: "logo jpg",
187
+ },
188
+ });
189
+ expect(result.httpMeta.response.status).toBe(200);
190
+ expect(result.getFilesResponse).toBeDefined();
191
+ expect(result.getFilesResponse).toEqual({
192
+ statusCode: 200,
193
+ status: "OK",
194
+ service: "google-drive",
195
+ resource: "files",
196
+ operation: "all",
197
+ data: [
198
+ {
199
+ id: "12345",
200
+ downstreamId: "12345",
201
+ name: "sample.jpg",
202
+ description: "A sample image",
203
+ type: "file",
204
+ path: "/Documents/sample.jpg",
205
+ mimeType: "image/jpeg",
206
+ size: 1810673,
207
+ owner: {
208
+ id: "12345",
209
+ email: "hello@apideck.com",
210
+ name: "Elon Musk",
211
+ },
212
+ parentFolders: [
213
+ {
214
+ id: "12345",
215
+ name: "Personal",
216
+ },
217
+ {
218
+ id: "12345",
219
+ name: "Personal",
220
+ },
221
+ ],
222
+ exportFormats: [
223
+ "application/pdf",
224
+ "application/vnd.oasis.opendocument.presentation",
225
+ "text/plain",
226
+ ],
227
+ updatedBy: "12345",
228
+ createdBy: "12345",
229
+ updatedAt: new Date("2020-09-30T07:43:32.000Z"),
230
+ createdAt: new Date("2020-09-30T07:43:32.000Z"),
231
+ },
232
+ ],
233
+ meta: {
234
+ itemsOnPage: 50,
235
+ cursors: {
236
+ previous: "em9oby1jcm06OnBhZ2U6OjE=",
237
+ current: "em9oby1jcm06OnBhZ2U6OjI=",
238
+ next: "em9oby1jcm06OnBhZ2U6OjM=",
239
+ },
240
+ },
241
+ links: {
242
+ previous:
243
+ "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjE%3D",
244
+ current: "https://unify.apideck.com/crm/companies",
245
+ next:
246
+ "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjM",
247
+ },
248
+ });
249
+ });
250
+
251
+ test("Files File Storage Files One", async () => {
252
+ const testHttpClient = createTestHTTPClient("fileStorage.filesOne");
253
+
254
+ const apideck = new Apideck({
255
+ serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
256
+ httpClient: testHttpClient,
257
+ apiKey: process.env["APIDECK_API_KEY"] ?? "value",
258
+ });
259
+
260
+ const result = await apideck.fileStorage.files.get({
261
+ id: "<id>",
262
+ serviceId: "salesforce",
263
+ fields: "id,updated_at",
264
+ });
265
+ expect(result.httpMeta.response.status).toBe(200);
266
+ expect(result.getFileResponse).toBeDefined();
267
+ expect(result.getFileResponse).toEqual({
268
+ statusCode: 200,
269
+ status: "OK",
270
+ service: "google-drive",
271
+ resource: "files",
272
+ operation: "one",
273
+ data: {
274
+ id: "12345",
275
+ downstreamId: "12345",
276
+ name: "sample.jpg",
277
+ description: "A sample image",
278
+ type: "file",
279
+ path: "/Documents/sample.jpg",
280
+ mimeType: "image/jpeg",
281
+ size: 1810673,
282
+ owner: {
283
+ id: "12345",
284
+ email: "hello@apideck.com",
285
+ name: "Elon Musk",
286
+ },
287
+ parentFolders: [
288
+ {
289
+ id: "12345",
290
+ name: "Personal",
291
+ },
292
+ {
293
+ id: "12345",
294
+ name: "Personal",
295
+ },
296
+ {
297
+ id: "12345",
298
+ name: "Personal",
299
+ },
300
+ ],
301
+ exportFormats: [
302
+ "application/pdf",
303
+ "application/vnd.oasis.opendocument.presentation",
304
+ "text/plain",
305
+ ],
306
+ updatedBy: "12345",
307
+ createdBy: "12345",
308
+ updatedAt: new Date("2020-09-30T07:43:32.000Z"),
309
+ createdAt: new Date("2020-09-30T07:43:32.000Z"),
310
+ },
311
+ });
312
+ });
313
+
314
+ it.skip("Files File Storage Files Update", async () => {
315
+ assert.fail(
316
+ "incomplete test found please make sure to address the following errors: [`workflow step fileStorage.filesUpdate.test referencing operation fileStorage.filesUpdate with expression in requestBody with type not currently supported`, `workflow step fileStorage.filesUpdate.test referencing operation fileStorage.filesUpdate with expression in requestBody with type not currently supported`, `workflow step fileStorage.filesUpdate.test referencing operation fileStorage.filesUpdate with expression in requestBody with type not currently supported`, `workflow step fileStorage.filesUpdate.test referencing operation fileStorage.filesUpdate with expression in requestBody with type not currently supported`, `workflow step fileStorage.filesUpdate.test referencing operation fileStorage.filesUpdate with expression in requestBody with type not currently supported`, `workflow step fileStorage.filesUpdate.test referencing operation fileStorage.filesUpdate with expression in requestBody with type not currently supported`, `workflow step fileStorage.filesUpdate.test referencing operation fileStorage.filesUpdate with expression in requestBody with type not currently supported`]",
317
+ );
318
+ });
319
+
320
+ test("Files File Storage Files Delete", async () => {
321
+ const testHttpClient = createTestHTTPClient("fileStorage.filesDelete");
322
+
323
+ const apideck = new Apideck({
324
+ serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
325
+ httpClient: testHttpClient,
326
+ apiKey: process.env["APIDECK_API_KEY"] ?? "value",
327
+ });
328
+
329
+ const result = await apideck.fileStorage.files.delete({
330
+ id: "<id>",
331
+ serviceId: "salesforce",
332
+ });
333
+ expect(result.httpMeta.response.status).toBe(200);
334
+ expect(result.deleteFileResponse).toBeDefined();
335
+ expect(result.deleteFileResponse).toEqual({
336
+ statusCode: 200,
337
+ status: "OK",
338
+ service: "google-drive",
339
+ resource: "files",
340
+ operation: "delete",
341
+ data: {
342
+ id: "12345",
343
+ },
344
+ });
345
+ });
346
+
347
+ test("Files File Storage Files Download", async () => {
348
+ const testHttpClient = createTestHTTPClient("fileStorage.filesDownload");
349
+
350
+ const apideck = new Apideck({
351
+ serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
352
+ httpClient: testHttpClient,
353
+ apiKey: process.env["APIDECK_API_KEY"] ?? "value",
354
+ });
355
+
356
+ const result = await apideck.fileStorage.files.download({
357
+ id: "<id>",
358
+ serviceId: "salesforce",
359
+ fields: "id,updated_at",
360
+ }, {
361
+ acceptHeaderOverride: DownloadAcceptEnum.wildcardRootWildcard,
362
+ });
363
+ expect(result.httpMeta.response.status).toBe(200);
364
+ expect(result.getFileDownloadResponse).toBeDefined();
365
+ expect(
366
+ new Uint8Array(await streamToByteArray(result.getFileDownloadResponse)),
367
+ ).toEqual(await filesToByteArray(".speakeasy/testfiles/example.file"));
368
+ });
369
+
370
+ test("Files File Storage Files Export", async () => {
371
+ const testHttpClient = createTestHTTPClient("fileStorage.filesExport");
372
+
373
+ const apideck = new Apideck({
374
+ serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
375
+ httpClient: testHttpClient,
376
+ apiKey: process.env["APIDECK_API_KEY"] ?? "value",
377
+ });
378
+
379
+ const result = await apideck.fileStorage.files.export({
380
+ id: "<id>",
381
+ serviceId: "salesforce",
382
+ fields: "id,updated_at",
383
+ format: "pdf",
384
+ }, {
385
+ acceptHeaderOverride: ExportAcceptEnum.wildcardRootWildcard,
386
+ });
387
+ expect(result.httpMeta.response.status).toBe(200);
388
+ expect(result.getFileDownloadResponse).toBeDefined();
389
+ expect(
390
+ new Uint8Array(await streamToByteArray(result.getFileDownloadResponse)),
391
+ ).toEqual(await filesToByteArray(".speakeasy/testfiles/example.file"));
392
+ });
@@ -0,0 +1,56 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { createReadStream } from "node:fs";
6
+ import { readFile } from "node:fs/promises";
7
+ import { Readable } from "node:stream";
8
+
9
+ export function filesToStream(filePath: string): ReadableStream<Uint8Array> {
10
+ return Readable.toWeb(
11
+ createReadStream(filePath),
12
+ ) as unknown as ReadableStream<Uint8Array>;
13
+ }
14
+
15
+ export async function filesToByteArray(filePath: string): Promise<Uint8Array> {
16
+ return new Uint8Array(await readFile(filePath));
17
+ }
18
+
19
+ export async function filesToString(filePath: string): Promise<string> {
20
+ return readFile(filePath, "utf8");
21
+ }
22
+
23
+ export async function streamToByteArray(
24
+ stream?: ReadableStream<Uint8Array>,
25
+ ): Promise<Buffer> {
26
+ if (!stream) {
27
+ return Buffer.from("");
28
+ }
29
+
30
+ const chunks = [];
31
+ const reader = stream.getReader();
32
+
33
+ let done = false;
34
+ while (!done) {
35
+ const res = await reader.read();
36
+ done = res.done;
37
+ if (res.value) {
38
+ chunks.push(res.value);
39
+ }
40
+ }
41
+
42
+ return Buffer.concat(chunks);
43
+ }
44
+
45
+ export function bytesToStream(bytes: Uint8Array): ReadableStream<Uint8Array> {
46
+ return new ReadableStream({
47
+ start(controller) {
48
+ controller.enqueue(bytes);
49
+ },
50
+ pull(controller) {
51
+ controller.close();
52
+ },
53
+ cancel() {
54
+ },
55
+ });
56
+ }
@@ -0,0 +1,103 @@
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 { createTestHTTPClient } from "./testclient.js";
8
+
9
+ it.skip("Folders File Storage Folders Add", async () => {
10
+ assert.fail(
11
+ "incomplete test found please make sure to address the following errors: [`workflow step fileStorage.foldersAdd.test referencing operation fileStorage.foldersAdd with expression in requestBody with type not currently supported`, `workflow step fileStorage.foldersAdd.test referencing operation fileStorage.foldersAdd with expression in requestBody with type not currently supported`, `workflow step fileStorage.foldersAdd.test referencing operation fileStorage.foldersAdd with expression in requestBody with type not currently supported`, `workflow step fileStorage.foldersAdd.test referencing operation fileStorage.foldersAdd with expression in requestBody with type not currently supported`]",
12
+ );
13
+ });
14
+
15
+ test("Folders File Storage Folders One", async () => {
16
+ const testHttpClient = createTestHTTPClient("fileStorage.foldersOne");
17
+
18
+ const apideck = new Apideck({
19
+ serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
20
+ httpClient: testHttpClient,
21
+ apiKey: process.env["APIDECK_API_KEY"] ?? "value",
22
+ });
23
+
24
+ const result = await apideck.fileStorage.folders.get({
25
+ id: "<id>",
26
+ serviceId: "salesforce",
27
+ fields: "id,updated_at",
28
+ });
29
+ expect(result.httpMeta.response.status).toBe(200);
30
+ expect(result.getFolderResponse).toBeDefined();
31
+ expect(result.getFolderResponse).toEqual({
32
+ statusCode: 200,
33
+ status: "OK",
34
+ service: "undefined",
35
+ resource: "Folders",
36
+ operation: "one",
37
+ data: {
38
+ id: "12345",
39
+ name: "Documents",
40
+ description: "My Personal Documents",
41
+ path: "/Personal/Documents",
42
+ size: 1810673,
43
+ owner: {
44
+ id: "12345",
45
+ email: "hello@apideck.com",
46
+ name: "Elon Musk",
47
+ },
48
+ parentFolders: [
49
+ {
50
+ id: "12345",
51
+ name: "Personal",
52
+ },
53
+ {
54
+ id: "12345",
55
+ name: "Personal",
56
+ },
57
+ ],
58
+ updatedBy: "12345",
59
+ createdBy: "12345",
60
+ updatedAt: new Date("2020-09-30T07:43:32.000Z"),
61
+ createdAt: new Date("2020-09-30T07:43:32.000Z"),
62
+ },
63
+ });
64
+ });
65
+
66
+ it.skip("Folders File Storage Folders Update", async () => {
67
+ assert.fail(
68
+ "incomplete test found please make sure to address the following errors: [`workflow step fileStorage.foldersUpdate.test referencing operation fileStorage.foldersUpdate with expression in requestBody with type not currently supported`, `workflow step fileStorage.foldersUpdate.test referencing operation fileStorage.foldersUpdate with expression in requestBody with type not currently supported`, `workflow step fileStorage.foldersUpdate.test referencing operation fileStorage.foldersUpdate with expression in requestBody with type not currently supported`, `workflow step fileStorage.foldersUpdate.test referencing operation fileStorage.foldersUpdate with expression in requestBody with type not currently supported`, `workflow step fileStorage.foldersUpdate.test referencing operation fileStorage.foldersUpdate with expression in requestBody with type not currently supported`, `workflow step fileStorage.foldersUpdate.test referencing operation fileStorage.foldersUpdate with expression in requestBody with type not currently supported`, `workflow step fileStorage.foldersUpdate.test referencing operation fileStorage.foldersUpdate with expression in requestBody with type not currently supported`]",
69
+ );
70
+ });
71
+
72
+ test("Folders File Storage Folders Delete", async () => {
73
+ const testHttpClient = createTestHTTPClient("fileStorage.foldersDelete");
74
+
75
+ const apideck = new Apideck({
76
+ serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
77
+ httpClient: testHttpClient,
78
+ apiKey: process.env["APIDECK_API_KEY"] ?? "value",
79
+ });
80
+
81
+ const result = await apideck.fileStorage.folders.delete({
82
+ id: "<id>",
83
+ serviceId: "salesforce",
84
+ });
85
+ expect(result.httpMeta.response.status).toBe(200);
86
+ expect(result.deleteFolderResponse).toBeDefined();
87
+ expect(result.deleteFolderResponse).toEqual({
88
+ statusCode: 200,
89
+ status: "OK",
90
+ service: "undefined",
91
+ resource: "Folders",
92
+ operation: "delete",
93
+ data: {
94
+ id: "12345",
95
+ },
96
+ });
97
+ });
98
+
99
+ it.skip("Folders File Storage Folders Copy", async () => {
100
+ assert.fail(
101
+ "incomplete test found please make sure to address the following errors: [`workflow step fileStorage.foldersCopy.test referencing operation fileStorage.foldersCopy with expression in requestBody with type not currently supported`, `workflow step fileStorage.foldersCopy.test referencing operation fileStorage.foldersCopy with expression in requestBody with type not currently supported`, `workflow step fileStorage.foldersCopy.test referencing operation fileStorage.foldersCopy with expression in requestBody with type not currently supported`, `workflow step fileStorage.foldersCopy.test referencing operation fileStorage.foldersCopy with expression in requestBody with type not currently supported`, `workflow step fileStorage.foldersCopy.test referencing operation fileStorage.foldersCopy with expression in requestBody with type not currently supported`, `workflow step fileStorage.foldersCopy.test referencing operation fileStorage.foldersCopy with expression in requestBody with type not currently supported`, `workflow step fileStorage.foldersCopy.test referencing operation fileStorage.foldersCopy with expression in requestBody with type not currently supported`, `workflow step fileStorage.foldersCopy.test referencing operation fileStorage.foldersCopy with expression in requestBody with type not currently supported`]",
102
+ );
103
+ });