@meistrari/vault-http-client 2.3.6 → 2.3.10

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.
package/dist/index.d.cts CHANGED
@@ -1,3922 +1,7 @@
1
- import * as _zodios_core from '@zodios/core';
2
1
  import { ZodiosOptions } from '@zodios/core';
3
- import * as zod from 'zod';
4
- import { z } from 'zod';
5
2
 
6
- declare function createApiClient(baseUrl: string, options?: ZodiosOptions): _zodios_core.ZodiosInstance<[{
7
- method: "get";
8
- path: "/_/files";
9
- description: "Get a list of files.";
10
- requestFormat: "json";
11
- parameters: [{
12
- name: "workspaceId";
13
- type: "Query";
14
- schema: z.ZodString;
15
- }, {
16
- name: "includeDeleted";
17
- type: "Query";
18
- schema: z.ZodDefault<z.ZodOptional<z.ZodEnum<["true", "false"]>>>;
19
- }, {
20
- name: "limit";
21
- type: "Query";
22
- schema: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
23
- }, {
24
- name: "offset";
25
- type: "Query";
26
- schema: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
27
- }, {
28
- name: "orderByField";
29
- type: "Query";
30
- schema: z.ZodOptional<z.ZodEnum<["id", "createdAt", "deletedAt"]>>;
31
- }, {
32
- name: "orderByDirection";
33
- type: "Query";
34
- schema: z.ZodOptional<z.ZodEnum<["asc", "desc"]>>;
35
- }, {
36
- name: "search";
37
- type: "Query";
38
- schema: z.ZodOptional<z.ZodString>;
39
- }];
40
- response: z.ZodObject<{
41
- files: z.ZodArray<z.ZodObject<{
42
- id: z.ZodString;
43
- originalFileName: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
44
- size: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodNull]>>;
45
- createdAt: z.ZodString;
46
- createdBy: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
47
- deletedAt: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
48
- }, "strip", z.ZodTypeAny, {
49
- id: string;
50
- createdAt: string;
51
- size?: number | null | undefined;
52
- createdBy?: string | null | undefined;
53
- deletedAt?: string | null | undefined;
54
- originalFileName?: string | null | undefined;
55
- }, {
56
- id: string;
57
- createdAt: string;
58
- size?: number | null | undefined;
59
- createdBy?: string | null | undefined;
60
- deletedAt?: string | null | undefined;
61
- originalFileName?: string | null | undefined;
62
- }>, "many">;
63
- count: z.ZodNumber;
64
- pages: z.ZodNumber;
65
- }, "strip", z.ZodTypeAny, {
66
- files: {
67
- id: string;
68
- createdAt: string;
69
- size?: number | null | undefined;
70
- createdBy?: string | null | undefined;
71
- deletedAt?: string | null | undefined;
72
- originalFileName?: string | null | undefined;
73
- }[];
74
- count: number;
75
- pages: number;
76
- }, {
77
- files: {
78
- id: string;
79
- createdAt: string;
80
- size?: number | null | undefined;
81
- createdBy?: string | null | undefined;
82
- deletedAt?: string | null | undefined;
83
- originalFileName?: string | null | undefined;
84
- }[];
85
- count: number;
86
- pages: number;
87
- }>;
88
- }, {
89
- method: "post";
90
- path: "/_/files";
91
- description: "Create a file and get a pre-signed upload URL.\n\nThe &#x60;sha256&#x60; body param is used as the file&#x27;s primary key. If not provided, a random UUID will be generated.\n\nThe &#x60;filename&#x60; parameter is deprecated. Use the &#x60;originalFileName&#x60; parameter in the request body instead. Either way, the information about the file name is stored in the &#x60;metadata.originalFileName&#x60; field.\n\nThe returned &#x60;uploadUrl&#x60; is valid for 1 hour by default. You can change the expiration time by passing the &#x60;expiresIn&#x60; query parameter.\n";
92
- requestFormat: "json";
93
- parameters: [{
94
- name: "body";
95
- type: "Body";
96
- schema: z.ZodObject<{
97
- fileName: z.ZodString;
98
- sha256sum: z.ZodOptional<z.ZodString>;
99
- size: z.ZodOptional<z.ZodNumber>;
100
- mimeType: z.ZodOptional<z.ZodString>;
101
- createdBy: z.ZodOptional<z.ZodString>;
102
- }, "strip", z.ZodTypeAny, {
103
- fileName: string;
104
- sha256sum?: string | undefined;
105
- size?: number | undefined;
106
- mimeType?: string | undefined;
107
- createdBy?: string | undefined;
108
- }, {
109
- fileName: string;
110
- sha256sum?: string | undefined;
111
- size?: number | undefined;
112
- mimeType?: string | undefined;
113
- createdBy?: string | undefined;
114
- }>;
115
- }, {
116
- name: "expiresIn";
117
- type: "Query";
118
- schema: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
119
- }, {
120
- name: "workspaceId";
121
- type: "Query";
122
- schema: z.ZodString;
123
- }];
124
- response: z.ZodUnion<[z.ZodObject<{
125
- id: z.ZodString;
126
- uploadUrl: z.ZodString;
127
- expiresAt: z.ZodString;
128
- metadata: z.ZodObject<{
129
- id: z.ZodString;
130
- path: z.ZodString;
131
- workspaceId: z.ZodString;
132
- originalFileName: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
133
- mimeType: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
134
- size: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodNull]>>;
135
- legacyKey: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
136
- bucketName: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
137
- encryptionKey: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
138
- createdBy: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
139
- createdAt: z.ZodString;
140
- deletedAt: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
141
- }, "strip", z.ZodTypeAny, {
142
- path: string;
143
- workspaceId: string;
144
- id: string;
145
- createdAt: string;
146
- bucketName?: string | null | undefined;
147
- size?: number | null | undefined;
148
- mimeType?: string | null | undefined;
149
- createdBy?: string | null | undefined;
150
- deletedAt?: string | null | undefined;
151
- originalFileName?: string | null | undefined;
152
- legacyKey?: string | null | undefined;
153
- encryptionKey?: string | null | undefined;
154
- }, {
155
- path: string;
156
- workspaceId: string;
157
- id: string;
158
- createdAt: string;
159
- bucketName?: string | null | undefined;
160
- size?: number | null | undefined;
161
- mimeType?: string | null | undefined;
162
- createdBy?: string | null | undefined;
163
- deletedAt?: string | null | undefined;
164
- originalFileName?: string | null | undefined;
165
- legacyKey?: string | null | undefined;
166
- encryptionKey?: string | null | undefined;
167
- }>;
168
- }, "strip", z.ZodTypeAny, {
169
- id: string;
170
- uploadUrl: string;
171
- expiresAt: string;
172
- metadata: {
173
- path: string;
174
- workspaceId: string;
175
- id: string;
176
- createdAt: string;
177
- bucketName?: string | null | undefined;
178
- size?: number | null | undefined;
179
- mimeType?: string | null | undefined;
180
- createdBy?: string | null | undefined;
181
- deletedAt?: string | null | undefined;
182
- originalFileName?: string | null | undefined;
183
- legacyKey?: string | null | undefined;
184
- encryptionKey?: string | null | undefined;
185
- };
186
- }, {
187
- id: string;
188
- uploadUrl: string;
189
- expiresAt: string;
190
- metadata: {
191
- path: string;
192
- workspaceId: string;
193
- id: string;
194
- createdAt: string;
195
- bucketName?: string | null | undefined;
196
- size?: number | null | undefined;
197
- mimeType?: string | null | undefined;
198
- createdBy?: string | null | undefined;
199
- deletedAt?: string | null | undefined;
200
- originalFileName?: string | null | undefined;
201
- legacyKey?: string | null | undefined;
202
- encryptionKey?: string | null | undefined;
203
- };
204
- }>, z.ZodObject<{
205
- url: z.ZodString;
206
- expiresAt: z.ZodString;
207
- }, "strip", z.ZodTypeAny, {
208
- expiresAt: string;
209
- url: string;
210
- }, {
211
- expiresAt: string;
212
- url: string;
213
- }>]>;
214
- }, {
215
- method: "get";
216
- path: "/_/files/:fileId";
217
- description: "Get a pre-signed download URL for a file.";
218
- requestFormat: "json";
219
- parameters: [{
220
- name: "expiresIn";
221
- type: "Query";
222
- schema: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
223
- }, {
224
- name: "workspaceId";
225
- type: "Query";
226
- schema: z.ZodString;
227
- }, {
228
- name: "fileId";
229
- type: "Path";
230
- schema: z.ZodString;
231
- }];
232
- response: z.ZodObject<{
233
- url: z.ZodString;
234
- expiresAt: z.ZodString;
235
- metadata: z.ZodUnion<[z.ZodObject<{
236
- id: z.ZodString;
237
- path: z.ZodString;
238
- workspaceId: z.ZodString;
239
- originalFileName: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
240
- mimeType: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
241
- size: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodNull]>>;
242
- legacyKey: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
243
- bucketName: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
244
- encryptionKey: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
245
- createdBy: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
246
- createdAt: z.ZodString;
247
- deletedAt: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
248
- }, "strip", z.ZodTypeAny, {
249
- path: string;
250
- workspaceId: string;
251
- id: string;
252
- createdAt: string;
253
- bucketName?: string | null | undefined;
254
- size?: number | null | undefined;
255
- mimeType?: string | null | undefined;
256
- createdBy?: string | null | undefined;
257
- deletedAt?: string | null | undefined;
258
- originalFileName?: string | null | undefined;
259
- legacyKey?: string | null | undefined;
260
- encryptionKey?: string | null | undefined;
261
- }, {
262
- path: string;
263
- workspaceId: string;
264
- id: string;
265
- createdAt: string;
266
- bucketName?: string | null | undefined;
267
- size?: number | null | undefined;
268
- mimeType?: string | null | undefined;
269
- createdBy?: string | null | undefined;
270
- deletedAt?: string | null | undefined;
271
- originalFileName?: string | null | undefined;
272
- legacyKey?: string | null | undefined;
273
- encryptionKey?: string | null | undefined;
274
- }>, z.ZodNull]>;
275
- }, "strip", z.ZodTypeAny, {
276
- expiresAt: string;
277
- metadata: {
278
- path: string;
279
- workspaceId: string;
280
- id: string;
281
- createdAt: string;
282
- bucketName?: string | null | undefined;
283
- size?: number | null | undefined;
284
- mimeType?: string | null | undefined;
285
- createdBy?: string | null | undefined;
286
- deletedAt?: string | null | undefined;
287
- originalFileName?: string | null | undefined;
288
- legacyKey?: string | null | undefined;
289
- encryptionKey?: string | null | undefined;
290
- } | null;
291
- url: string;
292
- }, {
293
- expiresAt: string;
294
- metadata: {
295
- path: string;
296
- workspaceId: string;
297
- id: string;
298
- createdAt: string;
299
- bucketName?: string | null | undefined;
300
- size?: number | null | undefined;
301
- mimeType?: string | null | undefined;
302
- createdBy?: string | null | undefined;
303
- deletedAt?: string | null | undefined;
304
- originalFileName?: string | null | undefined;
305
- legacyKey?: string | null | undefined;
306
- encryptionKey?: string | null | undefined;
307
- } | null;
308
- url: string;
309
- }>;
310
- errors: [{
311
- status: 404;
312
- description: string;
313
- schema: z.ZodVoid;
314
- }];
315
- }, {
316
- method: "post";
317
- path: "/_/files/:fileId/copy";
318
- description: "Copy a file from one workspace to another.";
319
- requestFormat: "json";
320
- parameters: [{
321
- name: "sourceWorkspaceId";
322
- type: "Query";
323
- schema: z.ZodString;
324
- }, {
325
- name: "destinationWorkspaceId";
326
- type: "Query";
327
- schema: z.ZodString;
328
- }, {
329
- name: "fileId";
330
- type: "Path";
331
- schema: z.ZodString;
332
- }];
333
- response: z.ZodObject<{
334
- id: z.ZodString;
335
- path: z.ZodString;
336
- workspaceId: z.ZodString;
337
- originalFileName: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
338
- mimeType: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
339
- size: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodNull]>>;
340
- legacyKey: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
341
- bucketName: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
342
- encryptionKey: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
343
- createdBy: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
344
- createdAt: z.ZodString;
345
- deletedAt: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
346
- }, "strip", z.ZodTypeAny, {
347
- path: string;
348
- workspaceId: string;
349
- id: string;
350
- createdAt: string;
351
- bucketName?: string | null | undefined;
352
- size?: number | null | undefined;
353
- mimeType?: string | null | undefined;
354
- createdBy?: string | null | undefined;
355
- deletedAt?: string | null | undefined;
356
- originalFileName?: string | null | undefined;
357
- legacyKey?: string | null | undefined;
358
- encryptionKey?: string | null | undefined;
359
- }, {
360
- path: string;
361
- workspaceId: string;
362
- id: string;
363
- createdAt: string;
364
- bucketName?: string | null | undefined;
365
- size?: number | null | undefined;
366
- mimeType?: string | null | undefined;
367
- createdBy?: string | null | undefined;
368
- deletedAt?: string | null | undefined;
369
- originalFileName?: string | null | undefined;
370
- legacyKey?: string | null | undefined;
371
- encryptionKey?: string | null | undefined;
372
- }>;
373
- errors: [{
374
- status: 404;
375
- description: string;
376
- schema: z.ZodVoid;
377
- }, {
378
- status: 409;
379
- description: string;
380
- schema: z.ZodVoid;
381
- }];
382
- }, {
383
- method: "put";
384
- path: "/_/files/:id";
385
- description: "Get a pre-signed upload URL for a file.";
386
- requestFormat: "json";
387
- parameters: [{
388
- name: "expiresIn";
389
- type: "Query";
390
- schema: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
391
- }, {
392
- name: "workspaceId";
393
- type: "Query";
394
- schema: z.ZodString;
395
- }, {
396
- name: "id";
397
- type: "Path";
398
- schema: z.ZodString;
399
- }];
400
- response: z.ZodUnion<[z.ZodObject<{
401
- id: z.ZodString;
402
- uploadUrl: z.ZodString;
403
- expiresAt: z.ZodString;
404
- metadata: z.ZodObject<{
405
- id: z.ZodString;
406
- path: z.ZodString;
407
- workspaceId: z.ZodString;
408
- originalFileName: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
409
- mimeType: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
410
- size: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodNull]>>;
411
- legacyKey: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
412
- bucketName: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
413
- encryptionKey: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
414
- createdBy: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
415
- createdAt: z.ZodString;
416
- deletedAt: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
417
- }, "strip", z.ZodTypeAny, {
418
- path: string;
419
- workspaceId: string;
420
- id: string;
421
- createdAt: string;
422
- bucketName?: string | null | undefined;
423
- size?: number | null | undefined;
424
- mimeType?: string | null | undefined;
425
- createdBy?: string | null | undefined;
426
- deletedAt?: string | null | undefined;
427
- originalFileName?: string | null | undefined;
428
- legacyKey?: string | null | undefined;
429
- encryptionKey?: string | null | undefined;
430
- }, {
431
- path: string;
432
- workspaceId: string;
433
- id: string;
434
- createdAt: string;
435
- bucketName?: string | null | undefined;
436
- size?: number | null | undefined;
437
- mimeType?: string | null | undefined;
438
- createdBy?: string | null | undefined;
439
- deletedAt?: string | null | undefined;
440
- originalFileName?: string | null | undefined;
441
- legacyKey?: string | null | undefined;
442
- encryptionKey?: string | null | undefined;
443
- }>;
444
- }, "strip", z.ZodTypeAny, {
445
- id: string;
446
- uploadUrl: string;
447
- expiresAt: string;
448
- metadata: {
449
- path: string;
450
- workspaceId: string;
451
- id: string;
452
- createdAt: string;
453
- bucketName?: string | null | undefined;
454
- size?: number | null | undefined;
455
- mimeType?: string | null | undefined;
456
- createdBy?: string | null | undefined;
457
- deletedAt?: string | null | undefined;
458
- originalFileName?: string | null | undefined;
459
- legacyKey?: string | null | undefined;
460
- encryptionKey?: string | null | undefined;
461
- };
462
- }, {
463
- id: string;
464
- uploadUrl: string;
465
- expiresAt: string;
466
- metadata: {
467
- path: string;
468
- workspaceId: string;
469
- id: string;
470
- createdAt: string;
471
- bucketName?: string | null | undefined;
472
- size?: number | null | undefined;
473
- mimeType?: string | null | undefined;
474
- createdBy?: string | null | undefined;
475
- deletedAt?: string | null | undefined;
476
- originalFileName?: string | null | undefined;
477
- legacyKey?: string | null | undefined;
478
- encryptionKey?: string | null | undefined;
479
- };
480
- }>, z.ZodObject<{
481
- url: z.ZodString;
482
- expiresAt: z.ZodString;
483
- }, "strip", z.ZodTypeAny, {
484
- expiresAt: string;
485
- url: string;
486
- }, {
487
- expiresAt: string;
488
- url: string;
489
- }>]>;
490
- }, {
491
- method: "delete";
492
- path: "/_/files/:id";
493
- description: "Delete a file.";
494
- requestFormat: "json";
495
- parameters: [{
496
- name: "workspaceId";
497
- type: "Query";
498
- schema: z.ZodString;
499
- }, {
500
- name: "id";
501
- type: "Path";
502
- schema: z.ZodString;
503
- }];
504
- response: z.ZodVoid;
505
- }, {
506
- method: "get";
507
- path: "/_/files/:id/metadata";
508
- description: "Get the metadata for a file.";
509
- requestFormat: "json";
510
- parameters: [{
511
- name: "workspaceId";
512
- type: "Query";
513
- schema: z.ZodString;
514
- }, {
515
- name: "id";
516
- type: "Path";
517
- schema: z.ZodString;
518
- }];
519
- response: z.ZodObject<{
520
- id: z.ZodString;
521
- path: z.ZodString;
522
- workspaceId: z.ZodString;
523
- originalFileName: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
524
- mimeType: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
525
- size: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodNull]>>;
526
- legacyKey: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
527
- bucketName: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
528
- encryptionKey: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
529
- createdBy: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
530
- createdAt: z.ZodString;
531
- deletedAt: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
532
- }, "strip", z.ZodTypeAny, {
533
- path: string;
534
- workspaceId: string;
535
- id: string;
536
- createdAt: string;
537
- bucketName?: string | null | undefined;
538
- size?: number | null | undefined;
539
- mimeType?: string | null | undefined;
540
- createdBy?: string | null | undefined;
541
- deletedAt?: string | null | undefined;
542
- originalFileName?: string | null | undefined;
543
- legacyKey?: string | null | undefined;
544
- encryptionKey?: string | null | undefined;
545
- }, {
546
- path: string;
547
- workspaceId: string;
548
- id: string;
549
- createdAt: string;
550
- bucketName?: string | null | undefined;
551
- size?: number | null | undefined;
552
- mimeType?: string | null | undefined;
553
- createdBy?: string | null | undefined;
554
- deletedAt?: string | null | undefined;
555
- originalFileName?: string | null | undefined;
556
- legacyKey?: string | null | undefined;
557
- encryptionKey?: string | null | undefined;
558
- }>;
559
- errors: [{
560
- status: 404;
561
- description: string;
562
- schema: z.ZodVoid;
563
- }];
564
- }, {
565
- method: "get";
566
- path: "/_/files/by-workspace";
567
- description: "List workspaces and their file counts";
568
- requestFormat: "json";
569
- response: z.ZodArray<z.ZodObject<{
570
- workspaceId: z.ZodString;
571
- files: z.ZodNumber;
572
- permalinks: z.ZodNumber;
573
- hasCustomSettings: z.ZodBoolean;
574
- }, "strip", z.ZodTypeAny, {
575
- files: number;
576
- workspaceId: string;
577
- permalinks: number;
578
- hasCustomSettings: boolean;
579
- }, {
580
- files: number;
581
- workspaceId: string;
582
- permalinks: number;
583
- hasCustomSettings: boolean;
584
- }>, "many">;
585
- }, {
586
- method: "get";
587
- path: "/_/files/count";
588
- description: "Get the total count of active files across all workspaces";
589
- requestFormat: "json";
590
- response: z.ZodObject<{
591
- count: z.ZodNumber;
592
- }, "strip", z.ZodTypeAny, {
593
- count: number;
594
- }, {
595
- count: number;
596
- }>;
597
- }, {
598
- method: "get";
599
- path: "/_/files/inspect";
600
- description: "Inspect files by file ID across all workspaces.";
601
- requestFormat: "json";
602
- parameters: [{
603
- name: "fileId";
604
- type: "Query";
605
- schema: z.ZodString;
606
- }, {
607
- name: "includeDeleted";
608
- type: "Query";
609
- schema: z.ZodDefault<z.ZodOptional<z.ZodEnum<["true", "false"]>>>;
610
- }, {
611
- name: "limit";
612
- type: "Query";
613
- schema: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
614
- }, {
615
- name: "offset";
616
- type: "Query";
617
- schema: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
618
- }];
619
- response: z.ZodObject<{
620
- files: z.ZodArray<z.ZodObject<{
621
- id: z.ZodString;
622
- path: z.ZodString;
623
- workspaceId: z.ZodString;
624
- originalFileName: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
625
- mimeType: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
626
- size: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodNull]>>;
627
- legacyKey: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
628
- bucketName: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
629
- encryptionKey: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
630
- createdBy: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
631
- createdAt: z.ZodString;
632
- deletedAt: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
633
- }, "strip", z.ZodTypeAny, {
634
- path: string;
635
- workspaceId: string;
636
- id: string;
637
- createdAt: string;
638
- bucketName?: string | null | undefined;
639
- size?: number | null | undefined;
640
- mimeType?: string | null | undefined;
641
- createdBy?: string | null | undefined;
642
- deletedAt?: string | null | undefined;
643
- originalFileName?: string | null | undefined;
644
- legacyKey?: string | null | undefined;
645
- encryptionKey?: string | null | undefined;
646
- }, {
647
- path: string;
648
- workspaceId: string;
649
- id: string;
650
- createdAt: string;
651
- bucketName?: string | null | undefined;
652
- size?: number | null | undefined;
653
- mimeType?: string | null | undefined;
654
- createdBy?: string | null | undefined;
655
- deletedAt?: string | null | undefined;
656
- originalFileName?: string | null | undefined;
657
- legacyKey?: string | null | undefined;
658
- encryptionKey?: string | null | undefined;
659
- }>, "many">;
660
- count: z.ZodNumber;
661
- pages: z.ZodNumber;
662
- }, "strip", z.ZodTypeAny, {
663
- files: {
664
- path: string;
665
- workspaceId: string;
666
- id: string;
667
- createdAt: string;
668
- bucketName?: string | null | undefined;
669
- size?: number | null | undefined;
670
- mimeType?: string | null | undefined;
671
- createdBy?: string | null | undefined;
672
- deletedAt?: string | null | undefined;
673
- originalFileName?: string | null | undefined;
674
- legacyKey?: string | null | undefined;
675
- encryptionKey?: string | null | undefined;
676
- }[];
677
- count: number;
678
- pages: number;
679
- }, {
680
- files: {
681
- path: string;
682
- workspaceId: string;
683
- id: string;
684
- createdAt: string;
685
- bucketName?: string | null | undefined;
686
- size?: number | null | undefined;
687
- mimeType?: string | null | undefined;
688
- createdBy?: string | null | undefined;
689
- deletedAt?: string | null | undefined;
690
- originalFileName?: string | null | undefined;
691
- legacyKey?: string | null | undefined;
692
- encryptionKey?: string | null | undefined;
693
- }[];
694
- count: number;
695
- pages: number;
696
- }>;
697
- }, {
698
- method: "put";
699
- path: "/_/workspaces/:workspaceId/settings";
700
- description: "Defines settings for a workspace.";
701
- requestFormat: "json";
702
- parameters: [{
703
- name: "body";
704
- type: "Body";
705
- schema: z.ZodObject<{
706
- bucketName: z.ZodString;
707
- keyArns: z.ZodArray<z.ZodString, "many">;
708
- defaultS3LinkTtl: z.ZodNumber;
709
- }, "strip", z.ZodTypeAny, {
710
- bucketName: string;
711
- keyArns: string[];
712
- defaultS3LinkTtl: number;
713
- }, {
714
- bucketName: string;
715
- keyArns: string[];
716
- defaultS3LinkTtl: number;
717
- }>;
718
- }, {
719
- name: "workspaceId";
720
- type: "Path";
721
- schema: z.ZodString;
722
- }];
723
- response: z.ZodVoid;
724
- errors: [{
725
- status: 401;
726
- description: string;
727
- schema: z.ZodVoid;
728
- }];
729
- }, {
730
- method: "get";
731
- path: "/_/workspaces/:workspaceId/settings";
732
- description: "Gets settings for a workspace.";
733
- requestFormat: "json";
734
- parameters: [{
735
- name: "workspaceId";
736
- type: "Path";
737
- schema: z.ZodString;
738
- }];
739
- response: z.ZodObject<{
740
- bucketName: z.ZodString;
741
- keyArns: z.ZodArray<z.ZodString, "many">;
742
- defaultS3LinkTtl: z.ZodNumber;
743
- }, "strip", z.ZodTypeAny, {
744
- bucketName: string;
745
- keyArns: string[];
746
- defaultS3LinkTtl: number;
747
- }, {
748
- bucketName: string;
749
- keyArns: string[];
750
- defaultS3LinkTtl: number;
751
- }>;
752
- }, {
753
- method: "get";
754
- path: "/files/:fileId";
755
- description: "Get a pre-signed download URL for a file.";
756
- requestFormat: "json";
757
- parameters: [{
758
- name: "fileId";
759
- type: "Path";
760
- schema: z.ZodString;
761
- }];
762
- response: z.ZodObject<{
763
- url: z.ZodString;
764
- expiresAt: z.ZodString;
765
- metadata: z.ZodUnion<[z.ZodObject<{
766
- id: z.ZodString;
767
- path: z.ZodString;
768
- workspaceId: z.ZodString;
769
- originalFileName: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
770
- mimeType: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
771
- size: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodNull]>>;
772
- legacyKey: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
773
- bucketName: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
774
- encryptionKey: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
775
- createdBy: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
776
- createdAt: z.ZodString;
777
- deletedAt: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
778
- }, "strip", z.ZodTypeAny, {
779
- path: string;
780
- workspaceId: string;
781
- id: string;
782
- createdAt: string;
783
- bucketName?: string | null | undefined;
784
- size?: number | null | undefined;
785
- mimeType?: string | null | undefined;
786
- createdBy?: string | null | undefined;
787
- deletedAt?: string | null | undefined;
788
- originalFileName?: string | null | undefined;
789
- legacyKey?: string | null | undefined;
790
- encryptionKey?: string | null | undefined;
791
- }, {
792
- path: string;
793
- workspaceId: string;
794
- id: string;
795
- createdAt: string;
796
- bucketName?: string | null | undefined;
797
- size?: number | null | undefined;
798
- mimeType?: string | null | undefined;
799
- createdBy?: string | null | undefined;
800
- deletedAt?: string | null | undefined;
801
- originalFileName?: string | null | undefined;
802
- legacyKey?: string | null | undefined;
803
- encryptionKey?: string | null | undefined;
804
- }>, z.ZodNull]>;
805
- }, "strip", z.ZodTypeAny, {
806
- expiresAt: string;
807
- metadata: {
808
- path: string;
809
- workspaceId: string;
810
- id: string;
811
- createdAt: string;
812
- bucketName?: string | null | undefined;
813
- size?: number | null | undefined;
814
- mimeType?: string | null | undefined;
815
- createdBy?: string | null | undefined;
816
- deletedAt?: string | null | undefined;
817
- originalFileName?: string | null | undefined;
818
- legacyKey?: string | null | undefined;
819
- encryptionKey?: string | null | undefined;
820
- } | null;
821
- url: string;
822
- }, {
823
- expiresAt: string;
824
- metadata: {
825
- path: string;
826
- workspaceId: string;
827
- id: string;
828
- createdAt: string;
829
- bucketName?: string | null | undefined;
830
- size?: number | null | undefined;
831
- mimeType?: string | null | undefined;
832
- createdBy?: string | null | undefined;
833
- deletedAt?: string | null | undefined;
834
- originalFileName?: string | null | undefined;
835
- legacyKey?: string | null | undefined;
836
- encryptionKey?: string | null | undefined;
837
- } | null;
838
- url: string;
839
- }>;
840
- errors: [{
841
- status: 404;
842
- description: string;
843
- schema: z.ZodVoid;
844
- }];
845
- }, {
846
- method: "post";
847
- path: "/files/:fileId/permalinks";
848
- description: "Create a public, direct, and optionally expiring download link for a file.\n\nThe returned permalink ID should be used with the &#x60;/permalinks/:permalinkId&#x60; endpoint to download the file via a 302 redirect.\n";
849
- requestFormat: "json";
850
- parameters: [{
851
- name: "body";
852
- type: "Body";
853
- schema: z.ZodObject<{
854
- expiresAt: z.ZodOptional<z.ZodString>;
855
- }, "strip", z.ZodTypeAny, {
856
- expiresAt?: string | undefined;
857
- }, {
858
- expiresAt?: string | undefined;
859
- }>;
860
- }, {
861
- name: "fileId";
862
- type: "Path";
863
- schema: z.ZodString;
864
- }];
865
- response: z.ZodObject<{
866
- id: z.ZodString;
867
- fileId: z.ZodString;
868
- workspaceId: z.ZodString;
869
- createdAt: z.ZodString;
870
- expiresAt: z.ZodUnion<[z.ZodString, z.ZodNull]>;
871
- createdBy: z.ZodUnion<[z.ZodString, z.ZodNull]>;
872
- }, "strip", z.ZodTypeAny, {
873
- createdBy: string | null;
874
- workspaceId: string;
875
- id: string;
876
- createdAt: string;
877
- expiresAt: string | null;
878
- fileId: string;
879
- }, {
880
- createdBy: string | null;
881
- workspaceId: string;
882
- id: string;
883
- createdAt: string;
884
- expiresAt: string | null;
885
- fileId: string;
886
- }>;
887
- }, {
888
- method: "get";
889
- path: "/files/:fileId/permalinks";
890
- description: "Get all permalinks for a file.";
891
- requestFormat: "json";
892
- parameters: [{
893
- name: "fileId";
894
- type: "Path";
895
- schema: z.ZodString;
896
- }];
897
- response: z.ZodArray<z.ZodObject<{
898
- id: z.ZodString;
899
- fileId: z.ZodString;
900
- workspaceId: z.ZodString;
901
- createdAt: z.ZodString;
902
- expiresAt: z.ZodUnion<[z.ZodString, z.ZodNull]>;
903
- createdBy: z.ZodUnion<[z.ZodString, z.ZodNull]>;
904
- }, "strip", z.ZodTypeAny, {
905
- createdBy: string | null;
906
- workspaceId: string;
907
- id: string;
908
- createdAt: string;
909
- expiresAt: string | null;
910
- fileId: string;
911
- }, {
912
- createdBy: string | null;
913
- workspaceId: string;
914
- id: string;
915
- createdAt: string;
916
- expiresAt: string | null;
917
- fileId: string;
918
- }>, "many">;
919
- }, {
920
- method: "post";
921
- path: "/files/:filename";
922
- description: "Create a file and get a pre-signed upload URL.\n\nThe &#x60;sha256&#x60; body param is used as the file&#x27;s primary key. If not provided, a random UUID will be generated.\n\nThe &#x60;filename&#x60; parameter is deprecated. Use the &#x60;originalFileName&#x60; parameter in the request body instead. Either way, the information about the file name is stored in the &#x60;metadata.originalFileName&#x60; field.\n\nThe returned &#x60;uploadUrl&#x60; is valid for 1 hour by default. You can change the expiration time by passing the &#x60;expiresIn&#x60; query parameter.\n";
923
- requestFormat: "json";
924
- parameters: [{
925
- name: "body";
926
- type: "Body";
927
- schema: z.ZodObject<{
928
- fileName: z.ZodOptional<z.ZodString>;
929
- sha256sum: z.ZodOptional<z.ZodString>;
930
- size: z.ZodOptional<z.ZodNumber>;
931
- mimeType: z.ZodOptional<z.ZodString>;
932
- createdBy: z.ZodOptional<z.ZodString>;
933
- }, "strip", z.ZodTypeAny, {
934
- fileName?: string | undefined;
935
- sha256sum?: string | undefined;
936
- size?: number | undefined;
937
- mimeType?: string | undefined;
938
- createdBy?: string | undefined;
939
- }, {
940
- fileName?: string | undefined;
941
- sha256sum?: string | undefined;
942
- size?: number | undefined;
943
- mimeType?: string | undefined;
944
- createdBy?: string | undefined;
945
- }>;
946
- }, {
947
- name: "expiresIn";
948
- type: "Query";
949
- schema: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
950
- }, {
951
- name: "filename";
952
- type: "Path";
953
- schema: z.ZodString;
954
- }];
955
- response: z.ZodUnion<[z.ZodObject<{
956
- id: z.ZodString;
957
- uploadUrl: z.ZodString;
958
- expiresAt: z.ZodString;
959
- metadata: z.ZodObject<{
960
- id: z.ZodString;
961
- path: z.ZodString;
962
- workspaceId: z.ZodString;
963
- originalFileName: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
964
- mimeType: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
965
- size: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodNull]>>;
966
- legacyKey: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
967
- bucketName: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
968
- encryptionKey: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
969
- createdBy: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
970
- createdAt: z.ZodString;
971
- deletedAt: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
972
- }, "strip", z.ZodTypeAny, {
973
- path: string;
974
- workspaceId: string;
975
- id: string;
976
- createdAt: string;
977
- bucketName?: string | null | undefined;
978
- size?: number | null | undefined;
979
- mimeType?: string | null | undefined;
980
- createdBy?: string | null | undefined;
981
- deletedAt?: string | null | undefined;
982
- originalFileName?: string | null | undefined;
983
- legacyKey?: string | null | undefined;
984
- encryptionKey?: string | null | undefined;
985
- }, {
986
- path: string;
987
- workspaceId: string;
988
- id: string;
989
- createdAt: string;
990
- bucketName?: string | null | undefined;
991
- size?: number | null | undefined;
992
- mimeType?: string | null | undefined;
993
- createdBy?: string | null | undefined;
994
- deletedAt?: string | null | undefined;
995
- originalFileName?: string | null | undefined;
996
- legacyKey?: string | null | undefined;
997
- encryptionKey?: string | null | undefined;
998
- }>;
999
- }, "strip", z.ZodTypeAny, {
1000
- id: string;
1001
- uploadUrl: string;
1002
- expiresAt: string;
1003
- metadata: {
1004
- path: string;
1005
- workspaceId: string;
1006
- id: string;
1007
- createdAt: string;
1008
- bucketName?: string | null | undefined;
1009
- size?: number | null | undefined;
1010
- mimeType?: string | null | undefined;
1011
- createdBy?: string | null | undefined;
1012
- deletedAt?: string | null | undefined;
1013
- originalFileName?: string | null | undefined;
1014
- legacyKey?: string | null | undefined;
1015
- encryptionKey?: string | null | undefined;
1016
- };
1017
- }, {
1018
- id: string;
1019
- uploadUrl: string;
1020
- expiresAt: string;
1021
- metadata: {
1022
- path: string;
1023
- workspaceId: string;
1024
- id: string;
1025
- createdAt: string;
1026
- bucketName?: string | null | undefined;
1027
- size?: number | null | undefined;
1028
- mimeType?: string | null | undefined;
1029
- createdBy?: string | null | undefined;
1030
- deletedAt?: string | null | undefined;
1031
- originalFileName?: string | null | undefined;
1032
- legacyKey?: string | null | undefined;
1033
- encryptionKey?: string | null | undefined;
1034
- };
1035
- }>, z.ZodObject<{
1036
- url: z.ZodString;
1037
- expiresAt: z.ZodString;
1038
- }, "strip", z.ZodTypeAny, {
1039
- expiresAt: string;
1040
- url: string;
1041
- }, {
1042
- expiresAt: string;
1043
- url: string;
1044
- }>]>;
1045
- }, {
1046
- method: "put";
1047
- path: "/files/:id";
1048
- description: "Create a file and get a pre-signed upload URL.";
1049
- requestFormat: "json";
1050
- parameters: [{
1051
- name: "expiresIn";
1052
- type: "Query";
1053
- schema: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
1054
- }, {
1055
- name: "id";
1056
- type: "Path";
1057
- schema: z.ZodString;
1058
- }];
1059
- response: z.ZodUnion<[z.ZodObject<{
1060
- id: z.ZodString;
1061
- uploadUrl: z.ZodString;
1062
- expiresAt: z.ZodString;
1063
- metadata: z.ZodObject<{
1064
- id: z.ZodString;
1065
- path: z.ZodString;
1066
- workspaceId: z.ZodString;
1067
- originalFileName: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
1068
- mimeType: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
1069
- size: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodNull]>>;
1070
- legacyKey: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
1071
- bucketName: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
1072
- encryptionKey: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
1073
- createdBy: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
1074
- createdAt: z.ZodString;
1075
- deletedAt: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
1076
- }, "strip", z.ZodTypeAny, {
1077
- path: string;
1078
- workspaceId: string;
1079
- id: string;
1080
- createdAt: string;
1081
- bucketName?: string | null | undefined;
1082
- size?: number | null | undefined;
1083
- mimeType?: string | null | undefined;
1084
- createdBy?: string | null | undefined;
1085
- deletedAt?: string | null | undefined;
1086
- originalFileName?: string | null | undefined;
1087
- legacyKey?: string | null | undefined;
1088
- encryptionKey?: string | null | undefined;
1089
- }, {
1090
- path: string;
1091
- workspaceId: string;
1092
- id: string;
1093
- createdAt: string;
1094
- bucketName?: string | null | undefined;
1095
- size?: number | null | undefined;
1096
- mimeType?: string | null | undefined;
1097
- createdBy?: string | null | undefined;
1098
- deletedAt?: string | null | undefined;
1099
- originalFileName?: string | null | undefined;
1100
- legacyKey?: string | null | undefined;
1101
- encryptionKey?: string | null | undefined;
1102
- }>;
1103
- }, "strip", z.ZodTypeAny, {
1104
- id: string;
1105
- uploadUrl: string;
1106
- expiresAt: string;
1107
- metadata: {
1108
- path: string;
1109
- workspaceId: string;
1110
- id: string;
1111
- createdAt: string;
1112
- bucketName?: string | null | undefined;
1113
- size?: number | null | undefined;
1114
- mimeType?: string | null | undefined;
1115
- createdBy?: string | null | undefined;
1116
- deletedAt?: string | null | undefined;
1117
- originalFileName?: string | null | undefined;
1118
- legacyKey?: string | null | undefined;
1119
- encryptionKey?: string | null | undefined;
1120
- };
1121
- }, {
1122
- id: string;
1123
- uploadUrl: string;
1124
- expiresAt: string;
1125
- metadata: {
1126
- path: string;
1127
- workspaceId: string;
1128
- id: string;
1129
- createdAt: string;
1130
- bucketName?: string | null | undefined;
1131
- size?: number | null | undefined;
1132
- mimeType?: string | null | undefined;
1133
- createdBy?: string | null | undefined;
1134
- deletedAt?: string | null | undefined;
1135
- originalFileName?: string | null | undefined;
1136
- legacyKey?: string | null | undefined;
1137
- encryptionKey?: string | null | undefined;
1138
- };
1139
- }>, z.ZodObject<{
1140
- url: z.ZodString;
1141
- expiresAt: z.ZodString;
1142
- }, "strip", z.ZodTypeAny, {
1143
- expiresAt: string;
1144
- url: string;
1145
- }, {
1146
- expiresAt: string;
1147
- url: string;
1148
- }>]>;
1149
- }, {
1150
- method: "delete";
1151
- path: "/files/:id";
1152
- description: "Delete a file.";
1153
- requestFormat: "json";
1154
- parameters: [{
1155
- name: "id";
1156
- type: "Path";
1157
- schema: z.ZodString;
1158
- }];
1159
- response: z.ZodVoid;
1160
- }, {
1161
- method: "get";
1162
- path: "/files/:id/metadata";
1163
- description: "Get the metadata for a file.";
1164
- requestFormat: "json";
1165
- parameters: [{
1166
- name: "id";
1167
- type: "Path";
1168
- schema: z.ZodString;
1169
- }];
1170
- response: z.ZodObject<{
1171
- id: z.ZodString;
1172
- path: z.ZodString;
1173
- workspaceId: z.ZodString;
1174
- originalFileName: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
1175
- mimeType: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
1176
- size: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodNull]>>;
1177
- legacyKey: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
1178
- bucketName: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
1179
- encryptionKey: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
1180
- createdBy: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
1181
- createdAt: z.ZodString;
1182
- deletedAt: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
1183
- }, "strip", z.ZodTypeAny, {
1184
- path: string;
1185
- workspaceId: string;
1186
- id: string;
1187
- createdAt: string;
1188
- bucketName?: string | null | undefined;
1189
- size?: number | null | undefined;
1190
- mimeType?: string | null | undefined;
1191
- createdBy?: string | null | undefined;
1192
- deletedAt?: string | null | undefined;
1193
- originalFileName?: string | null | undefined;
1194
- legacyKey?: string | null | undefined;
1195
- encryptionKey?: string | null | undefined;
1196
- }, {
1197
- path: string;
1198
- workspaceId: string;
1199
- id: string;
1200
- createdAt: string;
1201
- bucketName?: string | null | undefined;
1202
- size?: number | null | undefined;
1203
- mimeType?: string | null | undefined;
1204
- createdBy?: string | null | undefined;
1205
- deletedAt?: string | null | undefined;
1206
- originalFileName?: string | null | undefined;
1207
- legacyKey?: string | null | undefined;
1208
- encryptionKey?: string | null | undefined;
1209
- }>;
1210
- errors: [{
1211
- status: 404;
1212
- description: string;
1213
- schema: z.ZodVoid;
1214
- }];
1215
- }, {
1216
- method: "post";
1217
- path: "/files/bulk";
1218
- description: "Create multiple files in bulk and get pre-signed upload URLs.";
1219
- requestFormat: "json";
1220
- parameters: [{
1221
- name: "body";
1222
- type: "Body";
1223
- schema: z.ZodUnion<[z.ZodArray<z.ZodObject<{
1224
- fileName: z.ZodString;
1225
- sha256sum: z.ZodOptional<z.ZodString>;
1226
- size: z.ZodOptional<z.ZodNumber>;
1227
- mimeType: z.ZodOptional<z.ZodString>;
1228
- createdBy: z.ZodOptional<z.ZodString>;
1229
- }, "strip", z.ZodTypeAny, {
1230
- fileName: string;
1231
- sha256sum?: string | undefined;
1232
- size?: number | undefined;
1233
- mimeType?: string | undefined;
1234
- createdBy?: string | undefined;
1235
- }, {
1236
- fileName: string;
1237
- sha256sum?: string | undefined;
1238
- size?: number | undefined;
1239
- mimeType?: string | undefined;
1240
- createdBy?: string | undefined;
1241
- }>, "many">, z.ZodObject<{
1242
- files: z.ZodArray<z.ZodString, "many">;
1243
- }, "strip", z.ZodTypeAny, {
1244
- files: string[];
1245
- }, {
1246
- files: string[];
1247
- }>]>;
1248
- }];
1249
- response: z.ZodUnion<[z.ZodArray<z.ZodObject<{
1250
- id: z.ZodString;
1251
- path: z.ZodString;
1252
- workspaceId: z.ZodString;
1253
- originalFileName: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
1254
- mimeType: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
1255
- size: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodNull]>>;
1256
- legacyKey: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
1257
- bucketName: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
1258
- encryptionKey: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
1259
- createdBy: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
1260
- createdAt: z.ZodString;
1261
- deletedAt: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
1262
- }, "strip", z.ZodTypeAny, {
1263
- path: string;
1264
- workspaceId: string;
1265
- id: string;
1266
- createdAt: string;
1267
- bucketName?: string | null | undefined;
1268
- size?: number | null | undefined;
1269
- mimeType?: string | null | undefined;
1270
- createdBy?: string | null | undefined;
1271
- deletedAt?: string | null | undefined;
1272
- originalFileName?: string | null | undefined;
1273
- legacyKey?: string | null | undefined;
1274
- encryptionKey?: string | null | undefined;
1275
- }, {
1276
- path: string;
1277
- workspaceId: string;
1278
- id: string;
1279
- createdAt: string;
1280
- bucketName?: string | null | undefined;
1281
- size?: number | null | undefined;
1282
- mimeType?: string | null | undefined;
1283
- createdBy?: string | null | undefined;
1284
- deletedAt?: string | null | undefined;
1285
- originalFileName?: string | null | undefined;
1286
- legacyKey?: string | null | undefined;
1287
- encryptionKey?: string | null | undefined;
1288
- }>, "many">, z.ZodObject<{
1289
- files: z.ZodArray<z.ZodObject<{
1290
- id: z.ZodString;
1291
- path: z.ZodString;
1292
- workspaceId: z.ZodString;
1293
- originalFileName: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
1294
- mimeType: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
1295
- size: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodNull]>>;
1296
- legacyKey: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
1297
- bucketName: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
1298
- encryptionKey: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
1299
- createdBy: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
1300
- createdAt: z.ZodString;
1301
- deletedAt: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
1302
- }, "strip", z.ZodTypeAny, {
1303
- path: string;
1304
- workspaceId: string;
1305
- id: string;
1306
- createdAt: string;
1307
- bucketName?: string | null | undefined;
1308
- size?: number | null | undefined;
1309
- mimeType?: string | null | undefined;
1310
- createdBy?: string | null | undefined;
1311
- deletedAt?: string | null | undefined;
1312
- originalFileName?: string | null | undefined;
1313
- legacyKey?: string | null | undefined;
1314
- encryptionKey?: string | null | undefined;
1315
- }, {
1316
- path: string;
1317
- workspaceId: string;
1318
- id: string;
1319
- createdAt: string;
1320
- bucketName?: string | null | undefined;
1321
- size?: number | null | undefined;
1322
- mimeType?: string | null | undefined;
1323
- createdBy?: string | null | undefined;
1324
- deletedAt?: string | null | undefined;
1325
- originalFileName?: string | null | undefined;
1326
- legacyKey?: string | null | undefined;
1327
- encryptionKey?: string | null | undefined;
1328
- }>, "many">;
1329
- }, "strip", z.ZodTypeAny, {
1330
- files: {
1331
- path: string;
1332
- workspaceId: string;
1333
- id: string;
1334
- createdAt: string;
1335
- bucketName?: string | null | undefined;
1336
- size?: number | null | undefined;
1337
- mimeType?: string | null | undefined;
1338
- createdBy?: string | null | undefined;
1339
- deletedAt?: string | null | undefined;
1340
- originalFileName?: string | null | undefined;
1341
- legacyKey?: string | null | undefined;
1342
- encryptionKey?: string | null | undefined;
1343
- }[];
1344
- }, {
1345
- files: {
1346
- path: string;
1347
- workspaceId: string;
1348
- id: string;
1349
- createdAt: string;
1350
- bucketName?: string | null | undefined;
1351
- size?: number | null | undefined;
1352
- mimeType?: string | null | undefined;
1353
- createdBy?: string | null | undefined;
1354
- deletedAt?: string | null | undefined;
1355
- originalFileName?: string | null | undefined;
1356
- legacyKey?: string | null | undefined;
1357
- encryptionKey?: string | null | undefined;
1358
- }[];
1359
- }>]>;
1360
- }, {
1361
- method: "get";
1362
- path: "/permalinks/:permalinkId";
1363
- description: "Download a file via a permalink.\n\nMake sure to follow redirects to the actual file download URL.\n";
1364
- requestFormat: "json";
1365
- parameters: [{
1366
- name: "permalinkId";
1367
- type: "Path";
1368
- schema: z.ZodString;
1369
- }];
1370
- response: z.ZodVoid;
1371
- errors: [{
1372
- status: 302;
1373
- description: string;
1374
- schema: z.ZodVoid;
1375
- }, {
1376
- status: 404;
1377
- description: string;
1378
- schema: z.ZodVoid;
1379
- }];
1380
- }, {
1381
- method: "delete";
1382
- path: "/permalinks/:permalinkId";
1383
- description: "Delete a permalink.";
1384
- requestFormat: "json";
1385
- parameters: [{
1386
- name: "permalinkId";
1387
- type: "Path";
1388
- schema: z.ZodString;
1389
- }];
1390
- response: z.ZodVoid;
1391
- }, {
1392
- method: "get";
1393
- path: "/permalinks/:permalinkId/metadata";
1394
- description: "Get the metadata for a permalink.";
1395
- requestFormat: "json";
1396
- parameters: [{
1397
- name: "permalinkId";
1398
- type: "Path";
1399
- schema: z.ZodString;
1400
- }];
1401
- response: z.ZodObject<{
1402
- id: z.ZodString;
1403
- fileId: z.ZodString;
1404
- workspaceId: z.ZodString;
1405
- createdAt: z.ZodString;
1406
- expiresAt: z.ZodUnion<[z.ZodString, z.ZodNull]>;
1407
- createdBy: z.ZodUnion<[z.ZodString, z.ZodNull]>;
1408
- }, "strip", z.ZodTypeAny, {
1409
- createdBy: string | null;
1410
- workspaceId: string;
1411
- id: string;
1412
- createdAt: string;
1413
- expiresAt: string | null;
1414
- fileId: string;
1415
- }, {
1416
- createdBy: string | null;
1417
- workspaceId: string;
1418
- id: string;
1419
- createdAt: string;
1420
- expiresAt: string | null;
1421
- fileId: string;
1422
- }>;
1423
- errors: [{
1424
- status: 404;
1425
- description: string;
1426
- schema: z.ZodVoid;
1427
- }];
1428
- }, {
1429
- method: "get";
1430
- path: "/v2/files/:fileId";
1431
- description: "Get a pre-signed download URL for a file.";
1432
- requestFormat: "json";
1433
- parameters: [{
1434
- name: "fileId";
1435
- type: "Path";
1436
- schema: z.ZodString;
1437
- }];
1438
- response: z.ZodObject<{
1439
- url: z.ZodString;
1440
- expiresAt: z.ZodString;
1441
- metadata: z.ZodUnion<[z.ZodObject<{
1442
- id: z.ZodString;
1443
- path: z.ZodString;
1444
- workspaceId: z.ZodString;
1445
- originalFileName: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
1446
- mimeType: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
1447
- size: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodNull]>>;
1448
- legacyKey: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
1449
- bucketName: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
1450
- encryptionKey: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
1451
- createdBy: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
1452
- createdAt: z.ZodString;
1453
- deletedAt: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
1454
- }, "strip", z.ZodTypeAny, {
1455
- path: string;
1456
- workspaceId: string;
1457
- id: string;
1458
- createdAt: string;
1459
- bucketName?: string | null | undefined;
1460
- size?: number | null | undefined;
1461
- mimeType?: string | null | undefined;
1462
- createdBy?: string | null | undefined;
1463
- deletedAt?: string | null | undefined;
1464
- originalFileName?: string | null | undefined;
1465
- legacyKey?: string | null | undefined;
1466
- encryptionKey?: string | null | undefined;
1467
- }, {
1468
- path: string;
1469
- workspaceId: string;
1470
- id: string;
1471
- createdAt: string;
1472
- bucketName?: string | null | undefined;
1473
- size?: number | null | undefined;
1474
- mimeType?: string | null | undefined;
1475
- createdBy?: string | null | undefined;
1476
- deletedAt?: string | null | undefined;
1477
- originalFileName?: string | null | undefined;
1478
- legacyKey?: string | null | undefined;
1479
- encryptionKey?: string | null | undefined;
1480
- }>, z.ZodNull]>;
1481
- }, "strip", z.ZodTypeAny, {
1482
- expiresAt: string;
1483
- metadata: {
1484
- path: string;
1485
- workspaceId: string;
1486
- id: string;
1487
- createdAt: string;
1488
- bucketName?: string | null | undefined;
1489
- size?: number | null | undefined;
1490
- mimeType?: string | null | undefined;
1491
- createdBy?: string | null | undefined;
1492
- deletedAt?: string | null | undefined;
1493
- originalFileName?: string | null | undefined;
1494
- legacyKey?: string | null | undefined;
1495
- encryptionKey?: string | null | undefined;
1496
- } | null;
1497
- url: string;
1498
- }, {
1499
- expiresAt: string;
1500
- metadata: {
1501
- path: string;
1502
- workspaceId: string;
1503
- id: string;
1504
- createdAt: string;
1505
- bucketName?: string | null | undefined;
1506
- size?: number | null | undefined;
1507
- mimeType?: string | null | undefined;
1508
- createdBy?: string | null | undefined;
1509
- deletedAt?: string | null | undefined;
1510
- originalFileName?: string | null | undefined;
1511
- legacyKey?: string | null | undefined;
1512
- encryptionKey?: string | null | undefined;
1513
- } | null;
1514
- url: string;
1515
- }>;
1516
- errors: [{
1517
- status: 404;
1518
- description: string;
1519
- schema: z.ZodVoid;
1520
- }];
1521
- }, {
1522
- method: "post";
1523
- path: "/v2/files/:filename";
1524
- description: "Create a file and get a pre-signed upload URL.\n\nThe &#x60;sha256&#x60; body param is used as the file&#x27;s primary key. If not provided, a random UUID will be generated.\n\nThe &#x60;filename&#x60; parameter is deprecated. Use the &#x60;originalFileName&#x60; parameter in the request body instead. Either way, the information about the file name is stored in the &#x60;metadata.originalFileName&#x60; field.\n\nThe returned &#x60;uploadUrl&#x60; is valid for 1 hour by default. You can change the expiration time by passing the &#x60;expiresIn&#x60; query parameter.\n";
1525
- requestFormat: "json";
1526
- parameters: [{
1527
- name: "body";
1528
- type: "Body";
1529
- schema: z.ZodObject<{
1530
- fileName: z.ZodOptional<z.ZodString>;
1531
- sha256sum: z.ZodOptional<z.ZodString>;
1532
- size: z.ZodOptional<z.ZodNumber>;
1533
- mimeType: z.ZodOptional<z.ZodString>;
1534
- createdBy: z.ZodOptional<z.ZodString>;
1535
- }, "strip", z.ZodTypeAny, {
1536
- fileName?: string | undefined;
1537
- sha256sum?: string | undefined;
1538
- size?: number | undefined;
1539
- mimeType?: string | undefined;
1540
- createdBy?: string | undefined;
1541
- }, {
1542
- fileName?: string | undefined;
1543
- sha256sum?: string | undefined;
1544
- size?: number | undefined;
1545
- mimeType?: string | undefined;
1546
- createdBy?: string | undefined;
1547
- }>;
1548
- }, {
1549
- name: "expiresIn";
1550
- type: "Query";
1551
- schema: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
1552
- }, {
1553
- name: "filename";
1554
- type: "Path";
1555
- schema: z.ZodString;
1556
- }];
1557
- response: z.ZodUnion<[z.ZodObject<{
1558
- id: z.ZodString;
1559
- uploadUrl: z.ZodString;
1560
- expiresAt: z.ZodString;
1561
- metadata: z.ZodObject<{
1562
- id: z.ZodString;
1563
- path: z.ZodString;
1564
- workspaceId: z.ZodString;
1565
- originalFileName: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
1566
- mimeType: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
1567
- size: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodNull]>>;
1568
- legacyKey: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
1569
- bucketName: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
1570
- encryptionKey: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
1571
- createdBy: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
1572
- createdAt: z.ZodString;
1573
- deletedAt: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
1574
- }, "strip", z.ZodTypeAny, {
1575
- path: string;
1576
- workspaceId: string;
1577
- id: string;
1578
- createdAt: string;
1579
- bucketName?: string | null | undefined;
1580
- size?: number | null | undefined;
1581
- mimeType?: string | null | undefined;
1582
- createdBy?: string | null | undefined;
1583
- deletedAt?: string | null | undefined;
1584
- originalFileName?: string | null | undefined;
1585
- legacyKey?: string | null | undefined;
1586
- encryptionKey?: string | null | undefined;
1587
- }, {
1588
- path: string;
1589
- workspaceId: string;
1590
- id: string;
1591
- createdAt: string;
1592
- bucketName?: string | null | undefined;
1593
- size?: number | null | undefined;
1594
- mimeType?: string | null | undefined;
1595
- createdBy?: string | null | undefined;
1596
- deletedAt?: string | null | undefined;
1597
- originalFileName?: string | null | undefined;
1598
- legacyKey?: string | null | undefined;
1599
- encryptionKey?: string | null | undefined;
1600
- }>;
1601
- }, "strip", z.ZodTypeAny, {
1602
- id: string;
1603
- uploadUrl: string;
1604
- expiresAt: string;
1605
- metadata: {
1606
- path: string;
1607
- workspaceId: string;
1608
- id: string;
1609
- createdAt: string;
1610
- bucketName?: string | null | undefined;
1611
- size?: number | null | undefined;
1612
- mimeType?: string | null | undefined;
1613
- createdBy?: string | null | undefined;
1614
- deletedAt?: string | null | undefined;
1615
- originalFileName?: string | null | undefined;
1616
- legacyKey?: string | null | undefined;
1617
- encryptionKey?: string | null | undefined;
1618
- };
1619
- }, {
1620
- id: string;
1621
- uploadUrl: string;
1622
- expiresAt: string;
1623
- metadata: {
1624
- path: string;
1625
- workspaceId: string;
1626
- id: string;
1627
- createdAt: string;
1628
- bucketName?: string | null | undefined;
1629
- size?: number | null | undefined;
1630
- mimeType?: string | null | undefined;
1631
- createdBy?: string | null | undefined;
1632
- deletedAt?: string | null | undefined;
1633
- originalFileName?: string | null | undefined;
1634
- legacyKey?: string | null | undefined;
1635
- encryptionKey?: string | null | undefined;
1636
- };
1637
- }>, z.ZodObject<{
1638
- url: z.ZodString;
1639
- expiresAt: z.ZodString;
1640
- }, "strip", z.ZodTypeAny, {
1641
- expiresAt: string;
1642
- url: string;
1643
- }, {
1644
- expiresAt: string;
1645
- url: string;
1646
- }>]>;
1647
- }, {
1648
- method: "put";
1649
- path: "/v2/files/:id";
1650
- description: "Create a file and get a pre-signed upload URL.";
1651
- requestFormat: "json";
1652
- parameters: [{
1653
- name: "expiresIn";
1654
- type: "Query";
1655
- schema: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
1656
- }, {
1657
- name: "id";
1658
- type: "Path";
1659
- schema: z.ZodString;
1660
- }];
1661
- response: z.ZodUnion<[z.ZodObject<{
1662
- id: z.ZodString;
1663
- uploadUrl: z.ZodString;
1664
- expiresAt: z.ZodString;
1665
- metadata: z.ZodObject<{
1666
- id: z.ZodString;
1667
- path: z.ZodString;
1668
- workspaceId: z.ZodString;
1669
- originalFileName: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
1670
- mimeType: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
1671
- size: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodNull]>>;
1672
- legacyKey: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
1673
- bucketName: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
1674
- encryptionKey: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
1675
- createdBy: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
1676
- createdAt: z.ZodString;
1677
- deletedAt: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
1678
- }, "strip", z.ZodTypeAny, {
1679
- path: string;
1680
- workspaceId: string;
1681
- id: string;
1682
- createdAt: string;
1683
- bucketName?: string | null | undefined;
1684
- size?: number | null | undefined;
1685
- mimeType?: string | null | undefined;
1686
- createdBy?: string | null | undefined;
1687
- deletedAt?: string | null | undefined;
1688
- originalFileName?: string | null | undefined;
1689
- legacyKey?: string | null | undefined;
1690
- encryptionKey?: string | null | undefined;
1691
- }, {
1692
- path: string;
1693
- workspaceId: string;
1694
- id: string;
1695
- createdAt: string;
1696
- bucketName?: string | null | undefined;
1697
- size?: number | null | undefined;
1698
- mimeType?: string | null | undefined;
1699
- createdBy?: string | null | undefined;
1700
- deletedAt?: string | null | undefined;
1701
- originalFileName?: string | null | undefined;
1702
- legacyKey?: string | null | undefined;
1703
- encryptionKey?: string | null | undefined;
1704
- }>;
1705
- }, "strip", z.ZodTypeAny, {
1706
- id: string;
1707
- uploadUrl: string;
1708
- expiresAt: string;
1709
- metadata: {
1710
- path: string;
1711
- workspaceId: string;
1712
- id: string;
1713
- createdAt: string;
1714
- bucketName?: string | null | undefined;
1715
- size?: number | null | undefined;
1716
- mimeType?: string | null | undefined;
1717
- createdBy?: string | null | undefined;
1718
- deletedAt?: string | null | undefined;
1719
- originalFileName?: string | null | undefined;
1720
- legacyKey?: string | null | undefined;
1721
- encryptionKey?: string | null | undefined;
1722
- };
1723
- }, {
1724
- id: string;
1725
- uploadUrl: string;
1726
- expiresAt: string;
1727
- metadata: {
1728
- path: string;
1729
- workspaceId: string;
1730
- id: string;
1731
- createdAt: string;
1732
- bucketName?: string | null | undefined;
1733
- size?: number | null | undefined;
1734
- mimeType?: string | null | undefined;
1735
- createdBy?: string | null | undefined;
1736
- deletedAt?: string | null | undefined;
1737
- originalFileName?: string | null | undefined;
1738
- legacyKey?: string | null | undefined;
1739
- encryptionKey?: string | null | undefined;
1740
- };
1741
- }>, z.ZodObject<{
1742
- url: z.ZodString;
1743
- expiresAt: z.ZodString;
1744
- }, "strip", z.ZodTypeAny, {
1745
- expiresAt: string;
1746
- url: string;
1747
- }, {
1748
- expiresAt: string;
1749
- url: string;
1750
- }>]>;
1751
- }, {
1752
- method: "delete";
1753
- path: "/v2/files/:id";
1754
- description: "Delete a file.";
1755
- requestFormat: "json";
1756
- parameters: [{
1757
- name: "id";
1758
- type: "Path";
1759
- schema: z.ZodString;
1760
- }];
1761
- response: z.ZodVoid;
1762
- }, {
1763
- method: "get";
1764
- path: "/v2/files/:id/metadata";
1765
- description: "Get the metadata for a file.";
1766
- requestFormat: "json";
1767
- parameters: [{
1768
- name: "id";
1769
- type: "Path";
1770
- schema: z.ZodString;
1771
- }];
1772
- response: z.ZodObject<{
1773
- id: z.ZodString;
1774
- path: z.ZodString;
1775
- workspaceId: z.ZodString;
1776
- originalFileName: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
1777
- mimeType: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
1778
- size: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodNull]>>;
1779
- legacyKey: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
1780
- bucketName: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
1781
- encryptionKey: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
1782
- createdBy: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
1783
- createdAt: z.ZodString;
1784
- deletedAt: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
1785
- }, "strip", z.ZodTypeAny, {
1786
- path: string;
1787
- workspaceId: string;
1788
- id: string;
1789
- createdAt: string;
1790
- bucketName?: string | null | undefined;
1791
- size?: number | null | undefined;
1792
- mimeType?: string | null | undefined;
1793
- createdBy?: string | null | undefined;
1794
- deletedAt?: string | null | undefined;
1795
- originalFileName?: string | null | undefined;
1796
- legacyKey?: string | null | undefined;
1797
- encryptionKey?: string | null | undefined;
1798
- }, {
1799
- path: string;
1800
- workspaceId: string;
1801
- id: string;
1802
- createdAt: string;
1803
- bucketName?: string | null | undefined;
1804
- size?: number | null | undefined;
1805
- mimeType?: string | null | undefined;
1806
- createdBy?: string | null | undefined;
1807
- deletedAt?: string | null | undefined;
1808
- originalFileName?: string | null | undefined;
1809
- legacyKey?: string | null | undefined;
1810
- encryptionKey?: string | null | undefined;
1811
- }>;
1812
- errors: [{
1813
- status: 404;
1814
- description: string;
1815
- schema: z.ZodVoid;
1816
- }];
1817
- }, {
1818
- method: "post";
1819
- path: "/v2/files/bulk";
1820
- description: "Create multiple files in bulk and get pre-signed upload URLs.";
1821
- requestFormat: "json";
1822
- parameters: [{
1823
- name: "body";
1824
- type: "Body";
1825
- schema: z.ZodUnion<[z.ZodArray<z.ZodObject<{
1826
- fileName: z.ZodString;
1827
- sha256sum: z.ZodOptional<z.ZodString>;
1828
- size: z.ZodOptional<z.ZodNumber>;
1829
- mimeType: z.ZodOptional<z.ZodString>;
1830
- createdBy: z.ZodOptional<z.ZodString>;
1831
- }, "strip", z.ZodTypeAny, {
1832
- fileName: string;
1833
- sha256sum?: string | undefined;
1834
- size?: number | undefined;
1835
- mimeType?: string | undefined;
1836
- createdBy?: string | undefined;
1837
- }, {
1838
- fileName: string;
1839
- sha256sum?: string | undefined;
1840
- size?: number | undefined;
1841
- mimeType?: string | undefined;
1842
- createdBy?: string | undefined;
1843
- }>, "many">, z.ZodObject<{
1844
- files: z.ZodArray<z.ZodString, "many">;
1845
- }, "strip", z.ZodTypeAny, {
1846
- files: string[];
1847
- }, {
1848
- files: string[];
1849
- }>]>;
1850
- }];
1851
- response: z.ZodUnion<[z.ZodArray<z.ZodObject<{
1852
- id: z.ZodString;
1853
- path: z.ZodString;
1854
- workspaceId: z.ZodString;
1855
- originalFileName: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
1856
- mimeType: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
1857
- size: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodNull]>>;
1858
- legacyKey: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
1859
- bucketName: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
1860
- encryptionKey: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
1861
- createdBy: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
1862
- createdAt: z.ZodString;
1863
- deletedAt: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
1864
- }, "strip", z.ZodTypeAny, {
1865
- path: string;
1866
- workspaceId: string;
1867
- id: string;
1868
- createdAt: string;
1869
- bucketName?: string | null | undefined;
1870
- size?: number | null | undefined;
1871
- mimeType?: string | null | undefined;
1872
- createdBy?: string | null | undefined;
1873
- deletedAt?: string | null | undefined;
1874
- originalFileName?: string | null | undefined;
1875
- legacyKey?: string | null | undefined;
1876
- encryptionKey?: string | null | undefined;
1877
- }, {
1878
- path: string;
1879
- workspaceId: string;
1880
- id: string;
1881
- createdAt: string;
1882
- bucketName?: string | null | undefined;
1883
- size?: number | null | undefined;
1884
- mimeType?: string | null | undefined;
1885
- createdBy?: string | null | undefined;
1886
- deletedAt?: string | null | undefined;
1887
- originalFileName?: string | null | undefined;
1888
- legacyKey?: string | null | undefined;
1889
- encryptionKey?: string | null | undefined;
1890
- }>, "many">, z.ZodObject<{
1891
- files: z.ZodArray<z.ZodObject<{
1892
- id: z.ZodString;
1893
- path: z.ZodString;
1894
- workspaceId: z.ZodString;
1895
- originalFileName: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
1896
- mimeType: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
1897
- size: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodNull]>>;
1898
- legacyKey: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
1899
- bucketName: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
1900
- encryptionKey: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
1901
- createdBy: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
1902
- createdAt: z.ZodString;
1903
- deletedAt: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
1904
- }, "strip", z.ZodTypeAny, {
1905
- path: string;
1906
- workspaceId: string;
1907
- id: string;
1908
- createdAt: string;
1909
- bucketName?: string | null | undefined;
1910
- size?: number | null | undefined;
1911
- mimeType?: string | null | undefined;
1912
- createdBy?: string | null | undefined;
1913
- deletedAt?: string | null | undefined;
1914
- originalFileName?: string | null | undefined;
1915
- legacyKey?: string | null | undefined;
1916
- encryptionKey?: string | null | undefined;
1917
- }, {
1918
- path: string;
1919
- workspaceId: string;
1920
- id: string;
1921
- createdAt: string;
1922
- bucketName?: string | null | undefined;
1923
- size?: number | null | undefined;
1924
- mimeType?: string | null | undefined;
1925
- createdBy?: string | null | undefined;
1926
- deletedAt?: string | null | undefined;
1927
- originalFileName?: string | null | undefined;
1928
- legacyKey?: string | null | undefined;
1929
- encryptionKey?: string | null | undefined;
1930
- }>, "many">;
1931
- }, "strip", z.ZodTypeAny, {
1932
- files: {
1933
- path: string;
1934
- workspaceId: string;
1935
- id: string;
1936
- createdAt: string;
1937
- bucketName?: string | null | undefined;
1938
- size?: number | null | undefined;
1939
- mimeType?: string | null | undefined;
1940
- createdBy?: string | null | undefined;
1941
- deletedAt?: string | null | undefined;
1942
- originalFileName?: string | null | undefined;
1943
- legacyKey?: string | null | undefined;
1944
- encryptionKey?: string | null | undefined;
1945
- }[];
1946
- }, {
1947
- files: {
1948
- path: string;
1949
- workspaceId: string;
1950
- id: string;
1951
- createdAt: string;
1952
- bucketName?: string | null | undefined;
1953
- size?: number | null | undefined;
1954
- mimeType?: string | null | undefined;
1955
- createdBy?: string | null | undefined;
1956
- deletedAt?: string | null | undefined;
1957
- originalFileName?: string | null | undefined;
1958
- legacyKey?: string | null | undefined;
1959
- encryptionKey?: string | null | undefined;
1960
- }[];
1961
- }>]>;
1962
- }]>;
3
+ declare function createApiClient(baseUrl: string, options?: ZodiosOptions): any;
1963
4
 
1964
- declare function useVaultClient(vaultUrl: string, token: string): _zodios_core.ZodiosInstance<[{
1965
- method: "get";
1966
- path: "/_/files";
1967
- description: "Get a list of files.";
1968
- requestFormat: "json";
1969
- parameters: [{
1970
- name: "workspaceId";
1971
- type: "Query";
1972
- schema: zod.ZodString;
1973
- }, {
1974
- name: "includeDeleted";
1975
- type: "Query";
1976
- schema: zod.ZodDefault<zod.ZodOptional<zod.ZodEnum<["true", "false"]>>>;
1977
- }, {
1978
- name: "limit";
1979
- type: "Query";
1980
- schema: zod.ZodDefault<zod.ZodOptional<zod.ZodNumber>>;
1981
- }, {
1982
- name: "offset";
1983
- type: "Query";
1984
- schema: zod.ZodDefault<zod.ZodOptional<zod.ZodNumber>>;
1985
- }, {
1986
- name: "orderByField";
1987
- type: "Query";
1988
- schema: zod.ZodOptional<zod.ZodEnum<["id", "createdAt", "deletedAt"]>>;
1989
- }, {
1990
- name: "orderByDirection";
1991
- type: "Query";
1992
- schema: zod.ZodOptional<zod.ZodEnum<["asc", "desc"]>>;
1993
- }, {
1994
- name: "search";
1995
- type: "Query";
1996
- schema: zod.ZodOptional<zod.ZodString>;
1997
- }];
1998
- response: zod.ZodObject<{
1999
- files: zod.ZodArray<zod.ZodObject<{
2000
- id: zod.ZodString;
2001
- originalFileName: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
2002
- size: zod.ZodOptional<zod.ZodUnion<[zod.ZodNumber, zod.ZodNull]>>;
2003
- createdAt: zod.ZodString;
2004
- createdBy: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
2005
- deletedAt: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
2006
- }, "strip", zod.ZodTypeAny, {
2007
- id: string;
2008
- createdAt: string;
2009
- deletedAt?: string | null | undefined;
2010
- originalFileName?: string | null | undefined;
2011
- size?: number | null | undefined;
2012
- createdBy?: string | null | undefined;
2013
- }, {
2014
- id: string;
2015
- createdAt: string;
2016
- deletedAt?: string | null | undefined;
2017
- originalFileName?: string | null | undefined;
2018
- size?: number | null | undefined;
2019
- createdBy?: string | null | undefined;
2020
- }>, "many">;
2021
- count: zod.ZodNumber;
2022
- pages: zod.ZodNumber;
2023
- }, "strip", zod.ZodTypeAny, {
2024
- files: {
2025
- id: string;
2026
- createdAt: string;
2027
- deletedAt?: string | null | undefined;
2028
- originalFileName?: string | null | undefined;
2029
- size?: number | null | undefined;
2030
- createdBy?: string | null | undefined;
2031
- }[];
2032
- count: number;
2033
- pages: number;
2034
- }, {
2035
- files: {
2036
- id: string;
2037
- createdAt: string;
2038
- deletedAt?: string | null | undefined;
2039
- originalFileName?: string | null | undefined;
2040
- size?: number | null | undefined;
2041
- createdBy?: string | null | undefined;
2042
- }[];
2043
- count: number;
2044
- pages: number;
2045
- }>;
2046
- }, {
2047
- method: "post";
2048
- path: "/_/files";
2049
- description: "Create a file and get a pre-signed upload URL.\n\nThe &#x60;sha256&#x60; body param is used as the file&#x27;s primary key. If not provided, a random UUID will be generated.\n\nThe &#x60;filename&#x60; parameter is deprecated. Use the &#x60;originalFileName&#x60; parameter in the request body instead. Either way, the information about the file name is stored in the &#x60;metadata.originalFileName&#x60; field.\n\nThe returned &#x60;uploadUrl&#x60; is valid for 1 hour by default. You can change the expiration time by passing the &#x60;expiresIn&#x60; query parameter.\n";
2050
- requestFormat: "json";
2051
- parameters: [{
2052
- name: "body";
2053
- type: "Body";
2054
- schema: zod.ZodObject<{
2055
- fileName: zod.ZodString;
2056
- sha256sum: zod.ZodOptional<zod.ZodString>;
2057
- size: zod.ZodOptional<zod.ZodNumber>;
2058
- mimeType: zod.ZodOptional<zod.ZodString>;
2059
- createdBy: zod.ZodOptional<zod.ZodString>;
2060
- }, "strip", zod.ZodTypeAny, {
2061
- fileName: string;
2062
- size?: number | undefined;
2063
- createdBy?: string | undefined;
2064
- sha256sum?: string | undefined;
2065
- mimeType?: string | undefined;
2066
- }, {
2067
- fileName: string;
2068
- size?: number | undefined;
2069
- createdBy?: string | undefined;
2070
- sha256sum?: string | undefined;
2071
- mimeType?: string | undefined;
2072
- }>;
2073
- }, {
2074
- name: "expiresIn";
2075
- type: "Query";
2076
- schema: zod.ZodDefault<zod.ZodOptional<zod.ZodNumber>>;
2077
- }, {
2078
- name: "workspaceId";
2079
- type: "Query";
2080
- schema: zod.ZodString;
2081
- }];
2082
- response: zod.ZodUnion<[zod.ZodObject<{
2083
- id: zod.ZodString;
2084
- uploadUrl: zod.ZodString;
2085
- expiresAt: zod.ZodString;
2086
- metadata: zod.ZodObject<{
2087
- id: zod.ZodString;
2088
- path: zod.ZodString;
2089
- workspaceId: zod.ZodString;
2090
- originalFileName: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
2091
- mimeType: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
2092
- size: zod.ZodOptional<zod.ZodUnion<[zod.ZodNumber, zod.ZodNull]>>;
2093
- legacyKey: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
2094
- bucketName: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
2095
- encryptionKey: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
2096
- createdBy: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
2097
- createdAt: zod.ZodString;
2098
- deletedAt: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
2099
- }, "strip", zod.ZodTypeAny, {
2100
- path: string;
2101
- workspaceId: string;
2102
- id: string;
2103
- createdAt: string;
2104
- deletedAt?: string | null | undefined;
2105
- originalFileName?: string | null | undefined;
2106
- size?: number | null | undefined;
2107
- createdBy?: string | null | undefined;
2108
- mimeType?: string | null | undefined;
2109
- legacyKey?: string | null | undefined;
2110
- bucketName?: string | null | undefined;
2111
- encryptionKey?: string | null | undefined;
2112
- }, {
2113
- path: string;
2114
- workspaceId: string;
2115
- id: string;
2116
- createdAt: string;
2117
- deletedAt?: string | null | undefined;
2118
- originalFileName?: string | null | undefined;
2119
- size?: number | null | undefined;
2120
- createdBy?: string | null | undefined;
2121
- mimeType?: string | null | undefined;
2122
- legacyKey?: string | null | undefined;
2123
- bucketName?: string | null | undefined;
2124
- encryptionKey?: string | null | undefined;
2125
- }>;
2126
- }, "strip", zod.ZodTypeAny, {
2127
- id: string;
2128
- uploadUrl: string;
2129
- expiresAt: string;
2130
- metadata: {
2131
- path: string;
2132
- workspaceId: string;
2133
- id: string;
2134
- createdAt: string;
2135
- deletedAt?: string | null | undefined;
2136
- originalFileName?: string | null | undefined;
2137
- size?: number | null | undefined;
2138
- createdBy?: string | null | undefined;
2139
- mimeType?: string | null | undefined;
2140
- legacyKey?: string | null | undefined;
2141
- bucketName?: string | null | undefined;
2142
- encryptionKey?: string | null | undefined;
2143
- };
2144
- }, {
2145
- id: string;
2146
- uploadUrl: string;
2147
- expiresAt: string;
2148
- metadata: {
2149
- path: string;
2150
- workspaceId: string;
2151
- id: string;
2152
- createdAt: string;
2153
- deletedAt?: string | null | undefined;
2154
- originalFileName?: string | null | undefined;
2155
- size?: number | null | undefined;
2156
- createdBy?: string | null | undefined;
2157
- mimeType?: string | null | undefined;
2158
- legacyKey?: string | null | undefined;
2159
- bucketName?: string | null | undefined;
2160
- encryptionKey?: string | null | undefined;
2161
- };
2162
- }>, zod.ZodObject<{
2163
- url: zod.ZodString;
2164
- expiresAt: zod.ZodString;
2165
- }, "strip", zod.ZodTypeAny, {
2166
- expiresAt: string;
2167
- url: string;
2168
- }, {
2169
- expiresAt: string;
2170
- url: string;
2171
- }>]>;
2172
- }, {
2173
- method: "get";
2174
- path: "/_/files/:fileId";
2175
- description: "Get a pre-signed download URL for a file.";
2176
- requestFormat: "json";
2177
- parameters: [{
2178
- name: "expiresIn";
2179
- type: "Query";
2180
- schema: zod.ZodDefault<zod.ZodOptional<zod.ZodNumber>>;
2181
- }, {
2182
- name: "workspaceId";
2183
- type: "Query";
2184
- schema: zod.ZodString;
2185
- }, {
2186
- name: "fileId";
2187
- type: "Path";
2188
- schema: zod.ZodString;
2189
- }];
2190
- response: zod.ZodObject<{
2191
- url: zod.ZodString;
2192
- expiresAt: zod.ZodString;
2193
- metadata: zod.ZodUnion<[zod.ZodObject<{
2194
- id: zod.ZodString;
2195
- path: zod.ZodString;
2196
- workspaceId: zod.ZodString;
2197
- originalFileName: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
2198
- mimeType: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
2199
- size: zod.ZodOptional<zod.ZodUnion<[zod.ZodNumber, zod.ZodNull]>>;
2200
- legacyKey: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
2201
- bucketName: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
2202
- encryptionKey: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
2203
- createdBy: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
2204
- createdAt: zod.ZodString;
2205
- deletedAt: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
2206
- }, "strip", zod.ZodTypeAny, {
2207
- path: string;
2208
- workspaceId: string;
2209
- id: string;
2210
- createdAt: string;
2211
- deletedAt?: string | null | undefined;
2212
- originalFileName?: string | null | undefined;
2213
- size?: number | null | undefined;
2214
- createdBy?: string | null | undefined;
2215
- mimeType?: string | null | undefined;
2216
- legacyKey?: string | null | undefined;
2217
- bucketName?: string | null | undefined;
2218
- encryptionKey?: string | null | undefined;
2219
- }, {
2220
- path: string;
2221
- workspaceId: string;
2222
- id: string;
2223
- createdAt: string;
2224
- deletedAt?: string | null | undefined;
2225
- originalFileName?: string | null | undefined;
2226
- size?: number | null | undefined;
2227
- createdBy?: string | null | undefined;
2228
- mimeType?: string | null | undefined;
2229
- legacyKey?: string | null | undefined;
2230
- bucketName?: string | null | undefined;
2231
- encryptionKey?: string | null | undefined;
2232
- }>, zod.ZodNull]>;
2233
- }, "strip", zod.ZodTypeAny, {
2234
- expiresAt: string;
2235
- metadata: {
2236
- path: string;
2237
- workspaceId: string;
2238
- id: string;
2239
- createdAt: string;
2240
- deletedAt?: string | null | undefined;
2241
- originalFileName?: string | null | undefined;
2242
- size?: number | null | undefined;
2243
- createdBy?: string | null | undefined;
2244
- mimeType?: string | null | undefined;
2245
- legacyKey?: string | null | undefined;
2246
- bucketName?: string | null | undefined;
2247
- encryptionKey?: string | null | undefined;
2248
- } | null;
2249
- url: string;
2250
- }, {
2251
- expiresAt: string;
2252
- metadata: {
2253
- path: string;
2254
- workspaceId: string;
2255
- id: string;
2256
- createdAt: string;
2257
- deletedAt?: string | null | undefined;
2258
- originalFileName?: string | null | undefined;
2259
- size?: number | null | undefined;
2260
- createdBy?: string | null | undefined;
2261
- mimeType?: string | null | undefined;
2262
- legacyKey?: string | null | undefined;
2263
- bucketName?: string | null | undefined;
2264
- encryptionKey?: string | null | undefined;
2265
- } | null;
2266
- url: string;
2267
- }>;
2268
- errors: [{
2269
- status: 404;
2270
- description: string;
2271
- schema: zod.ZodVoid;
2272
- }];
2273
- }, {
2274
- method: "post";
2275
- path: "/_/files/:fileId/copy";
2276
- description: "Copy a file from one workspace to another.";
2277
- requestFormat: "json";
2278
- parameters: [{
2279
- name: "sourceWorkspaceId";
2280
- type: "Query";
2281
- schema: zod.ZodString;
2282
- }, {
2283
- name: "destinationWorkspaceId";
2284
- type: "Query";
2285
- schema: zod.ZodString;
2286
- }, {
2287
- name: "fileId";
2288
- type: "Path";
2289
- schema: zod.ZodString;
2290
- }];
2291
- response: zod.ZodObject<{
2292
- id: zod.ZodString;
2293
- path: zod.ZodString;
2294
- workspaceId: zod.ZodString;
2295
- originalFileName: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
2296
- mimeType: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
2297
- size: zod.ZodOptional<zod.ZodUnion<[zod.ZodNumber, zod.ZodNull]>>;
2298
- legacyKey: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
2299
- bucketName: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
2300
- encryptionKey: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
2301
- createdBy: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
2302
- createdAt: zod.ZodString;
2303
- deletedAt: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
2304
- }, "strip", zod.ZodTypeAny, {
2305
- path: string;
2306
- workspaceId: string;
2307
- id: string;
2308
- createdAt: string;
2309
- deletedAt?: string | null | undefined;
2310
- originalFileName?: string | null | undefined;
2311
- size?: number | null | undefined;
2312
- createdBy?: string | null | undefined;
2313
- mimeType?: string | null | undefined;
2314
- legacyKey?: string | null | undefined;
2315
- bucketName?: string | null | undefined;
2316
- encryptionKey?: string | null | undefined;
2317
- }, {
2318
- path: string;
2319
- workspaceId: string;
2320
- id: string;
2321
- createdAt: string;
2322
- deletedAt?: string | null | undefined;
2323
- originalFileName?: string | null | undefined;
2324
- size?: number | null | undefined;
2325
- createdBy?: string | null | undefined;
2326
- mimeType?: string | null | undefined;
2327
- legacyKey?: string | null | undefined;
2328
- bucketName?: string | null | undefined;
2329
- encryptionKey?: string | null | undefined;
2330
- }>;
2331
- errors: [{
2332
- status: 404;
2333
- description: string;
2334
- schema: zod.ZodVoid;
2335
- }, {
2336
- status: 409;
2337
- description: string;
2338
- schema: zod.ZodVoid;
2339
- }];
2340
- }, {
2341
- method: "put";
2342
- path: "/_/files/:id";
2343
- description: "Get a pre-signed upload URL for a file.";
2344
- requestFormat: "json";
2345
- parameters: [{
2346
- name: "expiresIn";
2347
- type: "Query";
2348
- schema: zod.ZodDefault<zod.ZodOptional<zod.ZodNumber>>;
2349
- }, {
2350
- name: "workspaceId";
2351
- type: "Query";
2352
- schema: zod.ZodString;
2353
- }, {
2354
- name: "id";
2355
- type: "Path";
2356
- schema: zod.ZodString;
2357
- }];
2358
- response: zod.ZodUnion<[zod.ZodObject<{
2359
- id: zod.ZodString;
2360
- uploadUrl: zod.ZodString;
2361
- expiresAt: zod.ZodString;
2362
- metadata: zod.ZodObject<{
2363
- id: zod.ZodString;
2364
- path: zod.ZodString;
2365
- workspaceId: zod.ZodString;
2366
- originalFileName: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
2367
- mimeType: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
2368
- size: zod.ZodOptional<zod.ZodUnion<[zod.ZodNumber, zod.ZodNull]>>;
2369
- legacyKey: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
2370
- bucketName: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
2371
- encryptionKey: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
2372
- createdBy: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
2373
- createdAt: zod.ZodString;
2374
- deletedAt: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
2375
- }, "strip", zod.ZodTypeAny, {
2376
- path: string;
2377
- workspaceId: string;
2378
- id: string;
2379
- createdAt: string;
2380
- deletedAt?: string | null | undefined;
2381
- originalFileName?: string | null | undefined;
2382
- size?: number | null | undefined;
2383
- createdBy?: string | null | undefined;
2384
- mimeType?: string | null | undefined;
2385
- legacyKey?: string | null | undefined;
2386
- bucketName?: string | null | undefined;
2387
- encryptionKey?: string | null | undefined;
2388
- }, {
2389
- path: string;
2390
- workspaceId: string;
2391
- id: string;
2392
- createdAt: string;
2393
- deletedAt?: string | null | undefined;
2394
- originalFileName?: string | null | undefined;
2395
- size?: number | null | undefined;
2396
- createdBy?: string | null | undefined;
2397
- mimeType?: string | null | undefined;
2398
- legacyKey?: string | null | undefined;
2399
- bucketName?: string | null | undefined;
2400
- encryptionKey?: string | null | undefined;
2401
- }>;
2402
- }, "strip", zod.ZodTypeAny, {
2403
- id: string;
2404
- uploadUrl: string;
2405
- expiresAt: string;
2406
- metadata: {
2407
- path: string;
2408
- workspaceId: string;
2409
- id: string;
2410
- createdAt: string;
2411
- deletedAt?: string | null | undefined;
2412
- originalFileName?: string | null | undefined;
2413
- size?: number | null | undefined;
2414
- createdBy?: string | null | undefined;
2415
- mimeType?: string | null | undefined;
2416
- legacyKey?: string | null | undefined;
2417
- bucketName?: string | null | undefined;
2418
- encryptionKey?: string | null | undefined;
2419
- };
2420
- }, {
2421
- id: string;
2422
- uploadUrl: string;
2423
- expiresAt: string;
2424
- metadata: {
2425
- path: string;
2426
- workspaceId: string;
2427
- id: string;
2428
- createdAt: string;
2429
- deletedAt?: string | null | undefined;
2430
- originalFileName?: string | null | undefined;
2431
- size?: number | null | undefined;
2432
- createdBy?: string | null | undefined;
2433
- mimeType?: string | null | undefined;
2434
- legacyKey?: string | null | undefined;
2435
- bucketName?: string | null | undefined;
2436
- encryptionKey?: string | null | undefined;
2437
- };
2438
- }>, zod.ZodObject<{
2439
- url: zod.ZodString;
2440
- expiresAt: zod.ZodString;
2441
- }, "strip", zod.ZodTypeAny, {
2442
- expiresAt: string;
2443
- url: string;
2444
- }, {
2445
- expiresAt: string;
2446
- url: string;
2447
- }>]>;
2448
- }, {
2449
- method: "delete";
2450
- path: "/_/files/:id";
2451
- description: "Delete a file.";
2452
- requestFormat: "json";
2453
- parameters: [{
2454
- name: "workspaceId";
2455
- type: "Query";
2456
- schema: zod.ZodString;
2457
- }, {
2458
- name: "id";
2459
- type: "Path";
2460
- schema: zod.ZodString;
2461
- }];
2462
- response: zod.ZodVoid;
2463
- }, {
2464
- method: "get";
2465
- path: "/_/files/:id/metadata";
2466
- description: "Get the metadata for a file.";
2467
- requestFormat: "json";
2468
- parameters: [{
2469
- name: "workspaceId";
2470
- type: "Query";
2471
- schema: zod.ZodString;
2472
- }, {
2473
- name: "id";
2474
- type: "Path";
2475
- schema: zod.ZodString;
2476
- }];
2477
- response: zod.ZodObject<{
2478
- id: zod.ZodString;
2479
- path: zod.ZodString;
2480
- workspaceId: zod.ZodString;
2481
- originalFileName: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
2482
- mimeType: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
2483
- size: zod.ZodOptional<zod.ZodUnion<[zod.ZodNumber, zod.ZodNull]>>;
2484
- legacyKey: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
2485
- bucketName: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
2486
- encryptionKey: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
2487
- createdBy: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
2488
- createdAt: zod.ZodString;
2489
- deletedAt: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
2490
- }, "strip", zod.ZodTypeAny, {
2491
- path: string;
2492
- workspaceId: string;
2493
- id: string;
2494
- createdAt: string;
2495
- deletedAt?: string | null | undefined;
2496
- originalFileName?: string | null | undefined;
2497
- size?: number | null | undefined;
2498
- createdBy?: string | null | undefined;
2499
- mimeType?: string | null | undefined;
2500
- legacyKey?: string | null | undefined;
2501
- bucketName?: string | null | undefined;
2502
- encryptionKey?: string | null | undefined;
2503
- }, {
2504
- path: string;
2505
- workspaceId: string;
2506
- id: string;
2507
- createdAt: string;
2508
- deletedAt?: string | null | undefined;
2509
- originalFileName?: string | null | undefined;
2510
- size?: number | null | undefined;
2511
- createdBy?: string | null | undefined;
2512
- mimeType?: string | null | undefined;
2513
- legacyKey?: string | null | undefined;
2514
- bucketName?: string | null | undefined;
2515
- encryptionKey?: string | null | undefined;
2516
- }>;
2517
- errors: [{
2518
- status: 404;
2519
- description: string;
2520
- schema: zod.ZodVoid;
2521
- }];
2522
- }, {
2523
- method: "get";
2524
- path: "/_/files/by-workspace";
2525
- description: "List workspaces and their file counts";
2526
- requestFormat: "json";
2527
- response: zod.ZodArray<zod.ZodObject<{
2528
- workspaceId: zod.ZodString;
2529
- files: zod.ZodNumber;
2530
- permalinks: zod.ZodNumber;
2531
- hasCustomSettings: zod.ZodBoolean;
2532
- }, "strip", zod.ZodTypeAny, {
2533
- workspaceId: string;
2534
- files: number;
2535
- permalinks: number;
2536
- hasCustomSettings: boolean;
2537
- }, {
2538
- workspaceId: string;
2539
- files: number;
2540
- permalinks: number;
2541
- hasCustomSettings: boolean;
2542
- }>, "many">;
2543
- }, {
2544
- method: "get";
2545
- path: "/_/files/count";
2546
- description: "Get the total count of active files across all workspaces";
2547
- requestFormat: "json";
2548
- response: zod.ZodObject<{
2549
- count: zod.ZodNumber;
2550
- }, "strip", zod.ZodTypeAny, {
2551
- count: number;
2552
- }, {
2553
- count: number;
2554
- }>;
2555
- }, {
2556
- method: "get";
2557
- path: "/_/files/inspect";
2558
- description: "Inspect files by file ID across all workspaces.";
2559
- requestFormat: "json";
2560
- parameters: [{
2561
- name: "fileId";
2562
- type: "Query";
2563
- schema: zod.ZodString;
2564
- }, {
2565
- name: "includeDeleted";
2566
- type: "Query";
2567
- schema: zod.ZodDefault<zod.ZodOptional<zod.ZodEnum<["true", "false"]>>>;
2568
- }, {
2569
- name: "limit";
2570
- type: "Query";
2571
- schema: zod.ZodDefault<zod.ZodOptional<zod.ZodNumber>>;
2572
- }, {
2573
- name: "offset";
2574
- type: "Query";
2575
- schema: zod.ZodDefault<zod.ZodOptional<zod.ZodNumber>>;
2576
- }];
2577
- response: zod.ZodObject<{
2578
- files: zod.ZodArray<zod.ZodObject<{
2579
- id: zod.ZodString;
2580
- path: zod.ZodString;
2581
- workspaceId: zod.ZodString;
2582
- originalFileName: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
2583
- mimeType: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
2584
- size: zod.ZodOptional<zod.ZodUnion<[zod.ZodNumber, zod.ZodNull]>>;
2585
- legacyKey: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
2586
- bucketName: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
2587
- encryptionKey: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
2588
- createdBy: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
2589
- createdAt: zod.ZodString;
2590
- deletedAt: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
2591
- }, "strip", zod.ZodTypeAny, {
2592
- path: string;
2593
- workspaceId: string;
2594
- id: string;
2595
- createdAt: string;
2596
- deletedAt?: string | null | undefined;
2597
- originalFileName?: string | null | undefined;
2598
- size?: number | null | undefined;
2599
- createdBy?: string | null | undefined;
2600
- mimeType?: string | null | undefined;
2601
- legacyKey?: string | null | undefined;
2602
- bucketName?: string | null | undefined;
2603
- encryptionKey?: string | null | undefined;
2604
- }, {
2605
- path: string;
2606
- workspaceId: string;
2607
- id: string;
2608
- createdAt: string;
2609
- deletedAt?: string | null | undefined;
2610
- originalFileName?: string | null | undefined;
2611
- size?: number | null | undefined;
2612
- createdBy?: string | null | undefined;
2613
- mimeType?: string | null | undefined;
2614
- legacyKey?: string | null | undefined;
2615
- bucketName?: string | null | undefined;
2616
- encryptionKey?: string | null | undefined;
2617
- }>, "many">;
2618
- count: zod.ZodNumber;
2619
- pages: zod.ZodNumber;
2620
- }, "strip", zod.ZodTypeAny, {
2621
- files: {
2622
- path: string;
2623
- workspaceId: string;
2624
- id: string;
2625
- createdAt: string;
2626
- deletedAt?: string | null | undefined;
2627
- originalFileName?: string | null | undefined;
2628
- size?: number | null | undefined;
2629
- createdBy?: string | null | undefined;
2630
- mimeType?: string | null | undefined;
2631
- legacyKey?: string | null | undefined;
2632
- bucketName?: string | null | undefined;
2633
- encryptionKey?: string | null | undefined;
2634
- }[];
2635
- count: number;
2636
- pages: number;
2637
- }, {
2638
- files: {
2639
- path: string;
2640
- workspaceId: string;
2641
- id: string;
2642
- createdAt: string;
2643
- deletedAt?: string | null | undefined;
2644
- originalFileName?: string | null | undefined;
2645
- size?: number | null | undefined;
2646
- createdBy?: string | null | undefined;
2647
- mimeType?: string | null | undefined;
2648
- legacyKey?: string | null | undefined;
2649
- bucketName?: string | null | undefined;
2650
- encryptionKey?: string | null | undefined;
2651
- }[];
2652
- count: number;
2653
- pages: number;
2654
- }>;
2655
- }, {
2656
- method: "put";
2657
- path: "/_/workspaces/:workspaceId/settings";
2658
- description: "Defines settings for a workspace.";
2659
- requestFormat: "json";
2660
- parameters: [{
2661
- name: "body";
2662
- type: "Body";
2663
- schema: zod.ZodObject<{
2664
- bucketName: zod.ZodString;
2665
- keyArns: zod.ZodArray<zod.ZodString, "many">;
2666
- defaultS3LinkTtl: zod.ZodNumber;
2667
- }, "strip", zod.ZodTypeAny, {
2668
- bucketName: string;
2669
- keyArns: string[];
2670
- defaultS3LinkTtl: number;
2671
- }, {
2672
- bucketName: string;
2673
- keyArns: string[];
2674
- defaultS3LinkTtl: number;
2675
- }>;
2676
- }, {
2677
- name: "workspaceId";
2678
- type: "Path";
2679
- schema: zod.ZodString;
2680
- }];
2681
- response: zod.ZodVoid;
2682
- errors: [{
2683
- status: 401;
2684
- description: string;
2685
- schema: zod.ZodVoid;
2686
- }];
2687
- }, {
2688
- method: "get";
2689
- path: "/_/workspaces/:workspaceId/settings";
2690
- description: "Gets settings for a workspace.";
2691
- requestFormat: "json";
2692
- parameters: [{
2693
- name: "workspaceId";
2694
- type: "Path";
2695
- schema: zod.ZodString;
2696
- }];
2697
- response: zod.ZodObject<{
2698
- bucketName: zod.ZodString;
2699
- keyArns: zod.ZodArray<zod.ZodString, "many">;
2700
- defaultS3LinkTtl: zod.ZodNumber;
2701
- }, "strip", zod.ZodTypeAny, {
2702
- bucketName: string;
2703
- keyArns: string[];
2704
- defaultS3LinkTtl: number;
2705
- }, {
2706
- bucketName: string;
2707
- keyArns: string[];
2708
- defaultS3LinkTtl: number;
2709
- }>;
2710
- }, {
2711
- method: "get";
2712
- path: "/files/:fileId";
2713
- description: "Get a pre-signed download URL for a file.";
2714
- requestFormat: "json";
2715
- parameters: [{
2716
- name: "fileId";
2717
- type: "Path";
2718
- schema: zod.ZodString;
2719
- }];
2720
- response: zod.ZodObject<{
2721
- url: zod.ZodString;
2722
- expiresAt: zod.ZodString;
2723
- metadata: zod.ZodUnion<[zod.ZodObject<{
2724
- id: zod.ZodString;
2725
- path: zod.ZodString;
2726
- workspaceId: zod.ZodString;
2727
- originalFileName: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
2728
- mimeType: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
2729
- size: zod.ZodOptional<zod.ZodUnion<[zod.ZodNumber, zod.ZodNull]>>;
2730
- legacyKey: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
2731
- bucketName: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
2732
- encryptionKey: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
2733
- createdBy: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
2734
- createdAt: zod.ZodString;
2735
- deletedAt: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
2736
- }, "strip", zod.ZodTypeAny, {
2737
- path: string;
2738
- workspaceId: string;
2739
- id: string;
2740
- createdAt: string;
2741
- deletedAt?: string | null | undefined;
2742
- originalFileName?: string | null | undefined;
2743
- size?: number | null | undefined;
2744
- createdBy?: string | null | undefined;
2745
- mimeType?: string | null | undefined;
2746
- legacyKey?: string | null | undefined;
2747
- bucketName?: string | null | undefined;
2748
- encryptionKey?: string | null | undefined;
2749
- }, {
2750
- path: string;
2751
- workspaceId: string;
2752
- id: string;
2753
- createdAt: string;
2754
- deletedAt?: string | null | undefined;
2755
- originalFileName?: string | null | undefined;
2756
- size?: number | null | undefined;
2757
- createdBy?: string | null | undefined;
2758
- mimeType?: string | null | undefined;
2759
- legacyKey?: string | null | undefined;
2760
- bucketName?: string | null | undefined;
2761
- encryptionKey?: string | null | undefined;
2762
- }>, zod.ZodNull]>;
2763
- }, "strip", zod.ZodTypeAny, {
2764
- expiresAt: string;
2765
- metadata: {
2766
- path: string;
2767
- workspaceId: string;
2768
- id: string;
2769
- createdAt: string;
2770
- deletedAt?: string | null | undefined;
2771
- originalFileName?: string | null | undefined;
2772
- size?: number | null | undefined;
2773
- createdBy?: string | null | undefined;
2774
- mimeType?: string | null | undefined;
2775
- legacyKey?: string | null | undefined;
2776
- bucketName?: string | null | undefined;
2777
- encryptionKey?: string | null | undefined;
2778
- } | null;
2779
- url: string;
2780
- }, {
2781
- expiresAt: string;
2782
- metadata: {
2783
- path: string;
2784
- workspaceId: string;
2785
- id: string;
2786
- createdAt: string;
2787
- deletedAt?: string | null | undefined;
2788
- originalFileName?: string | null | undefined;
2789
- size?: number | null | undefined;
2790
- createdBy?: string | null | undefined;
2791
- mimeType?: string | null | undefined;
2792
- legacyKey?: string | null | undefined;
2793
- bucketName?: string | null | undefined;
2794
- encryptionKey?: string | null | undefined;
2795
- } | null;
2796
- url: string;
2797
- }>;
2798
- errors: [{
2799
- status: 404;
2800
- description: string;
2801
- schema: zod.ZodVoid;
2802
- }];
2803
- }, {
2804
- method: "post";
2805
- path: "/files/:fileId/permalinks";
2806
- description: "Create a public, direct, and optionally expiring download link for a file.\n\nThe returned permalink ID should be used with the &#x60;/permalinks/:permalinkId&#x60; endpoint to download the file via a 302 redirect.\n";
2807
- requestFormat: "json";
2808
- parameters: [{
2809
- name: "body";
2810
- type: "Body";
2811
- schema: zod.ZodObject<{
2812
- expiresAt: zod.ZodOptional<zod.ZodString>;
2813
- }, "strip", zod.ZodTypeAny, {
2814
- expiresAt?: string | undefined;
2815
- }, {
2816
- expiresAt?: string | undefined;
2817
- }>;
2818
- }, {
2819
- name: "fileId";
2820
- type: "Path";
2821
- schema: zod.ZodString;
2822
- }];
2823
- response: zod.ZodObject<{
2824
- id: zod.ZodString;
2825
- fileId: zod.ZodString;
2826
- workspaceId: zod.ZodString;
2827
- createdAt: zod.ZodString;
2828
- expiresAt: zod.ZodUnion<[zod.ZodString, zod.ZodNull]>;
2829
- createdBy: zod.ZodUnion<[zod.ZodString, zod.ZodNull]>;
2830
- }, "strip", zod.ZodTypeAny, {
2831
- workspaceId: string;
2832
- id: string;
2833
- createdAt: string;
2834
- createdBy: string | null;
2835
- expiresAt: string | null;
2836
- fileId: string;
2837
- }, {
2838
- workspaceId: string;
2839
- id: string;
2840
- createdAt: string;
2841
- createdBy: string | null;
2842
- expiresAt: string | null;
2843
- fileId: string;
2844
- }>;
2845
- }, {
2846
- method: "get";
2847
- path: "/files/:fileId/permalinks";
2848
- description: "Get all permalinks for a file.";
2849
- requestFormat: "json";
2850
- parameters: [{
2851
- name: "fileId";
2852
- type: "Path";
2853
- schema: zod.ZodString;
2854
- }];
2855
- response: zod.ZodArray<zod.ZodObject<{
2856
- id: zod.ZodString;
2857
- fileId: zod.ZodString;
2858
- workspaceId: zod.ZodString;
2859
- createdAt: zod.ZodString;
2860
- expiresAt: zod.ZodUnion<[zod.ZodString, zod.ZodNull]>;
2861
- createdBy: zod.ZodUnion<[zod.ZodString, zod.ZodNull]>;
2862
- }, "strip", zod.ZodTypeAny, {
2863
- workspaceId: string;
2864
- id: string;
2865
- createdAt: string;
2866
- createdBy: string | null;
2867
- expiresAt: string | null;
2868
- fileId: string;
2869
- }, {
2870
- workspaceId: string;
2871
- id: string;
2872
- createdAt: string;
2873
- createdBy: string | null;
2874
- expiresAt: string | null;
2875
- fileId: string;
2876
- }>, "many">;
2877
- }, {
2878
- method: "post";
2879
- path: "/files/:filename";
2880
- description: "Create a file and get a pre-signed upload URL.\n\nThe &#x60;sha256&#x60; body param is used as the file&#x27;s primary key. If not provided, a random UUID will be generated.\n\nThe &#x60;filename&#x60; parameter is deprecated. Use the &#x60;originalFileName&#x60; parameter in the request body instead. Either way, the information about the file name is stored in the &#x60;metadata.originalFileName&#x60; field.\n\nThe returned &#x60;uploadUrl&#x60; is valid for 1 hour by default. You can change the expiration time by passing the &#x60;expiresIn&#x60; query parameter.\n";
2881
- requestFormat: "json";
2882
- parameters: [{
2883
- name: "body";
2884
- type: "Body";
2885
- schema: zod.ZodObject<{
2886
- fileName: zod.ZodOptional<zod.ZodString>;
2887
- sha256sum: zod.ZodOptional<zod.ZodString>;
2888
- size: zod.ZodOptional<zod.ZodNumber>;
2889
- mimeType: zod.ZodOptional<zod.ZodString>;
2890
- createdBy: zod.ZodOptional<zod.ZodString>;
2891
- }, "strip", zod.ZodTypeAny, {
2892
- size?: number | undefined;
2893
- createdBy?: string | undefined;
2894
- fileName?: string | undefined;
2895
- sha256sum?: string | undefined;
2896
- mimeType?: string | undefined;
2897
- }, {
2898
- size?: number | undefined;
2899
- createdBy?: string | undefined;
2900
- fileName?: string | undefined;
2901
- sha256sum?: string | undefined;
2902
- mimeType?: string | undefined;
2903
- }>;
2904
- }, {
2905
- name: "expiresIn";
2906
- type: "Query";
2907
- schema: zod.ZodDefault<zod.ZodOptional<zod.ZodNumber>>;
2908
- }, {
2909
- name: "filename";
2910
- type: "Path";
2911
- schema: zod.ZodString;
2912
- }];
2913
- response: zod.ZodUnion<[zod.ZodObject<{
2914
- id: zod.ZodString;
2915
- uploadUrl: zod.ZodString;
2916
- expiresAt: zod.ZodString;
2917
- metadata: zod.ZodObject<{
2918
- id: zod.ZodString;
2919
- path: zod.ZodString;
2920
- workspaceId: zod.ZodString;
2921
- originalFileName: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
2922
- mimeType: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
2923
- size: zod.ZodOptional<zod.ZodUnion<[zod.ZodNumber, zod.ZodNull]>>;
2924
- legacyKey: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
2925
- bucketName: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
2926
- encryptionKey: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
2927
- createdBy: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
2928
- createdAt: zod.ZodString;
2929
- deletedAt: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
2930
- }, "strip", zod.ZodTypeAny, {
2931
- path: string;
2932
- workspaceId: string;
2933
- id: string;
2934
- createdAt: string;
2935
- deletedAt?: string | null | undefined;
2936
- originalFileName?: string | null | undefined;
2937
- size?: number | null | undefined;
2938
- createdBy?: string | null | undefined;
2939
- mimeType?: string | null | undefined;
2940
- legacyKey?: string | null | undefined;
2941
- bucketName?: string | null | undefined;
2942
- encryptionKey?: string | null | undefined;
2943
- }, {
2944
- path: string;
2945
- workspaceId: string;
2946
- id: string;
2947
- createdAt: string;
2948
- deletedAt?: string | null | undefined;
2949
- originalFileName?: string | null | undefined;
2950
- size?: number | null | undefined;
2951
- createdBy?: string | null | undefined;
2952
- mimeType?: string | null | undefined;
2953
- legacyKey?: string | null | undefined;
2954
- bucketName?: string | null | undefined;
2955
- encryptionKey?: string | null | undefined;
2956
- }>;
2957
- }, "strip", zod.ZodTypeAny, {
2958
- id: string;
2959
- uploadUrl: string;
2960
- expiresAt: string;
2961
- metadata: {
2962
- path: string;
2963
- workspaceId: string;
2964
- id: string;
2965
- createdAt: string;
2966
- deletedAt?: string | null | undefined;
2967
- originalFileName?: string | null | undefined;
2968
- size?: number | null | undefined;
2969
- createdBy?: string | null | undefined;
2970
- mimeType?: string | null | undefined;
2971
- legacyKey?: string | null | undefined;
2972
- bucketName?: string | null | undefined;
2973
- encryptionKey?: string | null | undefined;
2974
- };
2975
- }, {
2976
- id: string;
2977
- uploadUrl: string;
2978
- expiresAt: string;
2979
- metadata: {
2980
- path: string;
2981
- workspaceId: string;
2982
- id: string;
2983
- createdAt: string;
2984
- deletedAt?: string | null | undefined;
2985
- originalFileName?: string | null | undefined;
2986
- size?: number | null | undefined;
2987
- createdBy?: string | null | undefined;
2988
- mimeType?: string | null | undefined;
2989
- legacyKey?: string | null | undefined;
2990
- bucketName?: string | null | undefined;
2991
- encryptionKey?: string | null | undefined;
2992
- };
2993
- }>, zod.ZodObject<{
2994
- url: zod.ZodString;
2995
- expiresAt: zod.ZodString;
2996
- }, "strip", zod.ZodTypeAny, {
2997
- expiresAt: string;
2998
- url: string;
2999
- }, {
3000
- expiresAt: string;
3001
- url: string;
3002
- }>]>;
3003
- }, {
3004
- method: "put";
3005
- path: "/files/:id";
3006
- description: "Create a file and get a pre-signed upload URL.";
3007
- requestFormat: "json";
3008
- parameters: [{
3009
- name: "expiresIn";
3010
- type: "Query";
3011
- schema: zod.ZodDefault<zod.ZodOptional<zod.ZodNumber>>;
3012
- }, {
3013
- name: "id";
3014
- type: "Path";
3015
- schema: zod.ZodString;
3016
- }];
3017
- response: zod.ZodUnion<[zod.ZodObject<{
3018
- id: zod.ZodString;
3019
- uploadUrl: zod.ZodString;
3020
- expiresAt: zod.ZodString;
3021
- metadata: zod.ZodObject<{
3022
- id: zod.ZodString;
3023
- path: zod.ZodString;
3024
- workspaceId: zod.ZodString;
3025
- originalFileName: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
3026
- mimeType: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
3027
- size: zod.ZodOptional<zod.ZodUnion<[zod.ZodNumber, zod.ZodNull]>>;
3028
- legacyKey: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
3029
- bucketName: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
3030
- encryptionKey: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
3031
- createdBy: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
3032
- createdAt: zod.ZodString;
3033
- deletedAt: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
3034
- }, "strip", zod.ZodTypeAny, {
3035
- path: string;
3036
- workspaceId: string;
3037
- id: string;
3038
- createdAt: string;
3039
- deletedAt?: string | null | undefined;
3040
- originalFileName?: string | null | undefined;
3041
- size?: number | null | undefined;
3042
- createdBy?: string | null | undefined;
3043
- mimeType?: string | null | undefined;
3044
- legacyKey?: string | null | undefined;
3045
- bucketName?: string | null | undefined;
3046
- encryptionKey?: string | null | undefined;
3047
- }, {
3048
- path: string;
3049
- workspaceId: string;
3050
- id: string;
3051
- createdAt: string;
3052
- deletedAt?: string | null | undefined;
3053
- originalFileName?: string | null | undefined;
3054
- size?: number | null | undefined;
3055
- createdBy?: string | null | undefined;
3056
- mimeType?: string | null | undefined;
3057
- legacyKey?: string | null | undefined;
3058
- bucketName?: string | null | undefined;
3059
- encryptionKey?: string | null | undefined;
3060
- }>;
3061
- }, "strip", zod.ZodTypeAny, {
3062
- id: string;
3063
- uploadUrl: string;
3064
- expiresAt: string;
3065
- metadata: {
3066
- path: string;
3067
- workspaceId: string;
3068
- id: string;
3069
- createdAt: string;
3070
- deletedAt?: string | null | undefined;
3071
- originalFileName?: string | null | undefined;
3072
- size?: number | null | undefined;
3073
- createdBy?: string | null | undefined;
3074
- mimeType?: string | null | undefined;
3075
- legacyKey?: string | null | undefined;
3076
- bucketName?: string | null | undefined;
3077
- encryptionKey?: string | null | undefined;
3078
- };
3079
- }, {
3080
- id: string;
3081
- uploadUrl: string;
3082
- expiresAt: string;
3083
- metadata: {
3084
- path: string;
3085
- workspaceId: string;
3086
- id: string;
3087
- createdAt: string;
3088
- deletedAt?: string | null | undefined;
3089
- originalFileName?: string | null | undefined;
3090
- size?: number | null | undefined;
3091
- createdBy?: string | null | undefined;
3092
- mimeType?: string | null | undefined;
3093
- legacyKey?: string | null | undefined;
3094
- bucketName?: string | null | undefined;
3095
- encryptionKey?: string | null | undefined;
3096
- };
3097
- }>, zod.ZodObject<{
3098
- url: zod.ZodString;
3099
- expiresAt: zod.ZodString;
3100
- }, "strip", zod.ZodTypeAny, {
3101
- expiresAt: string;
3102
- url: string;
3103
- }, {
3104
- expiresAt: string;
3105
- url: string;
3106
- }>]>;
3107
- }, {
3108
- method: "delete";
3109
- path: "/files/:id";
3110
- description: "Delete a file.";
3111
- requestFormat: "json";
3112
- parameters: [{
3113
- name: "id";
3114
- type: "Path";
3115
- schema: zod.ZodString;
3116
- }];
3117
- response: zod.ZodVoid;
3118
- }, {
3119
- method: "get";
3120
- path: "/files/:id/metadata";
3121
- description: "Get the metadata for a file.";
3122
- requestFormat: "json";
3123
- parameters: [{
3124
- name: "id";
3125
- type: "Path";
3126
- schema: zod.ZodString;
3127
- }];
3128
- response: zod.ZodObject<{
3129
- id: zod.ZodString;
3130
- path: zod.ZodString;
3131
- workspaceId: zod.ZodString;
3132
- originalFileName: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
3133
- mimeType: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
3134
- size: zod.ZodOptional<zod.ZodUnion<[zod.ZodNumber, zod.ZodNull]>>;
3135
- legacyKey: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
3136
- bucketName: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
3137
- encryptionKey: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
3138
- createdBy: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
3139
- createdAt: zod.ZodString;
3140
- deletedAt: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
3141
- }, "strip", zod.ZodTypeAny, {
3142
- path: string;
3143
- workspaceId: string;
3144
- id: string;
3145
- createdAt: string;
3146
- deletedAt?: string | null | undefined;
3147
- originalFileName?: string | null | undefined;
3148
- size?: number | null | undefined;
3149
- createdBy?: string | null | undefined;
3150
- mimeType?: string | null | undefined;
3151
- legacyKey?: string | null | undefined;
3152
- bucketName?: string | null | undefined;
3153
- encryptionKey?: string | null | undefined;
3154
- }, {
3155
- path: string;
3156
- workspaceId: string;
3157
- id: string;
3158
- createdAt: string;
3159
- deletedAt?: string | null | undefined;
3160
- originalFileName?: string | null | undefined;
3161
- size?: number | null | undefined;
3162
- createdBy?: string | null | undefined;
3163
- mimeType?: string | null | undefined;
3164
- legacyKey?: string | null | undefined;
3165
- bucketName?: string | null | undefined;
3166
- encryptionKey?: string | null | undefined;
3167
- }>;
3168
- errors: [{
3169
- status: 404;
3170
- description: string;
3171
- schema: zod.ZodVoid;
3172
- }];
3173
- }, {
3174
- method: "post";
3175
- path: "/files/bulk";
3176
- description: "Create multiple files in bulk and get pre-signed upload URLs.";
3177
- requestFormat: "json";
3178
- parameters: [{
3179
- name: "body";
3180
- type: "Body";
3181
- schema: zod.ZodUnion<[zod.ZodArray<zod.ZodObject<{
3182
- fileName: zod.ZodString;
3183
- sha256sum: zod.ZodOptional<zod.ZodString>;
3184
- size: zod.ZodOptional<zod.ZodNumber>;
3185
- mimeType: zod.ZodOptional<zod.ZodString>;
3186
- createdBy: zod.ZodOptional<zod.ZodString>;
3187
- }, "strip", zod.ZodTypeAny, {
3188
- fileName: string;
3189
- size?: number | undefined;
3190
- createdBy?: string | undefined;
3191
- sha256sum?: string | undefined;
3192
- mimeType?: string | undefined;
3193
- }, {
3194
- fileName: string;
3195
- size?: number | undefined;
3196
- createdBy?: string | undefined;
3197
- sha256sum?: string | undefined;
3198
- mimeType?: string | undefined;
3199
- }>, "many">, zod.ZodObject<{
3200
- files: zod.ZodArray<zod.ZodString, "many">;
3201
- }, "strip", zod.ZodTypeAny, {
3202
- files: string[];
3203
- }, {
3204
- files: string[];
3205
- }>]>;
3206
- }];
3207
- response: zod.ZodUnion<[zod.ZodArray<zod.ZodObject<{
3208
- id: zod.ZodString;
3209
- path: zod.ZodString;
3210
- workspaceId: zod.ZodString;
3211
- originalFileName: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
3212
- mimeType: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
3213
- size: zod.ZodOptional<zod.ZodUnion<[zod.ZodNumber, zod.ZodNull]>>;
3214
- legacyKey: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
3215
- bucketName: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
3216
- encryptionKey: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
3217
- createdBy: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
3218
- createdAt: zod.ZodString;
3219
- deletedAt: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
3220
- }, "strip", zod.ZodTypeAny, {
3221
- path: string;
3222
- workspaceId: string;
3223
- id: string;
3224
- createdAt: string;
3225
- deletedAt?: string | null | undefined;
3226
- originalFileName?: string | null | undefined;
3227
- size?: number | null | undefined;
3228
- createdBy?: string | null | undefined;
3229
- mimeType?: string | null | undefined;
3230
- legacyKey?: string | null | undefined;
3231
- bucketName?: string | null | undefined;
3232
- encryptionKey?: string | null | undefined;
3233
- }, {
3234
- path: string;
3235
- workspaceId: string;
3236
- id: string;
3237
- createdAt: string;
3238
- deletedAt?: string | null | undefined;
3239
- originalFileName?: string | null | undefined;
3240
- size?: number | null | undefined;
3241
- createdBy?: string | null | undefined;
3242
- mimeType?: string | null | undefined;
3243
- legacyKey?: string | null | undefined;
3244
- bucketName?: string | null | undefined;
3245
- encryptionKey?: string | null | undefined;
3246
- }>, "many">, zod.ZodObject<{
3247
- files: zod.ZodArray<zod.ZodObject<{
3248
- id: zod.ZodString;
3249
- path: zod.ZodString;
3250
- workspaceId: zod.ZodString;
3251
- originalFileName: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
3252
- mimeType: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
3253
- size: zod.ZodOptional<zod.ZodUnion<[zod.ZodNumber, zod.ZodNull]>>;
3254
- legacyKey: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
3255
- bucketName: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
3256
- encryptionKey: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
3257
- createdBy: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
3258
- createdAt: zod.ZodString;
3259
- deletedAt: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
3260
- }, "strip", zod.ZodTypeAny, {
3261
- path: string;
3262
- workspaceId: string;
3263
- id: string;
3264
- createdAt: string;
3265
- deletedAt?: string | null | undefined;
3266
- originalFileName?: string | null | undefined;
3267
- size?: number | null | undefined;
3268
- createdBy?: string | null | undefined;
3269
- mimeType?: string | null | undefined;
3270
- legacyKey?: string | null | undefined;
3271
- bucketName?: string | null | undefined;
3272
- encryptionKey?: string | null | undefined;
3273
- }, {
3274
- path: string;
3275
- workspaceId: string;
3276
- id: string;
3277
- createdAt: string;
3278
- deletedAt?: string | null | undefined;
3279
- originalFileName?: string | null | undefined;
3280
- size?: number | null | undefined;
3281
- createdBy?: string | null | undefined;
3282
- mimeType?: string | null | undefined;
3283
- legacyKey?: string | null | undefined;
3284
- bucketName?: string | null | undefined;
3285
- encryptionKey?: string | null | undefined;
3286
- }>, "many">;
3287
- }, "strip", zod.ZodTypeAny, {
3288
- files: {
3289
- path: string;
3290
- workspaceId: string;
3291
- id: string;
3292
- createdAt: string;
3293
- deletedAt?: string | null | undefined;
3294
- originalFileName?: string | null | undefined;
3295
- size?: number | null | undefined;
3296
- createdBy?: string | null | undefined;
3297
- mimeType?: string | null | undefined;
3298
- legacyKey?: string | null | undefined;
3299
- bucketName?: string | null | undefined;
3300
- encryptionKey?: string | null | undefined;
3301
- }[];
3302
- }, {
3303
- files: {
3304
- path: string;
3305
- workspaceId: string;
3306
- id: string;
3307
- createdAt: string;
3308
- deletedAt?: string | null | undefined;
3309
- originalFileName?: string | null | undefined;
3310
- size?: number | null | undefined;
3311
- createdBy?: string | null | undefined;
3312
- mimeType?: string | null | undefined;
3313
- legacyKey?: string | null | undefined;
3314
- bucketName?: string | null | undefined;
3315
- encryptionKey?: string | null | undefined;
3316
- }[];
3317
- }>]>;
3318
- }, {
3319
- method: "get";
3320
- path: "/permalinks/:permalinkId";
3321
- description: "Download a file via a permalink.\n\nMake sure to follow redirects to the actual file download URL.\n";
3322
- requestFormat: "json";
3323
- parameters: [{
3324
- name: "permalinkId";
3325
- type: "Path";
3326
- schema: zod.ZodString;
3327
- }];
3328
- response: zod.ZodVoid;
3329
- errors: [{
3330
- status: 302;
3331
- description: string;
3332
- schema: zod.ZodVoid;
3333
- }, {
3334
- status: 404;
3335
- description: string;
3336
- schema: zod.ZodVoid;
3337
- }];
3338
- }, {
3339
- method: "delete";
3340
- path: "/permalinks/:permalinkId";
3341
- description: "Delete a permalink.";
3342
- requestFormat: "json";
3343
- parameters: [{
3344
- name: "permalinkId";
3345
- type: "Path";
3346
- schema: zod.ZodString;
3347
- }];
3348
- response: zod.ZodVoid;
3349
- }, {
3350
- method: "get";
3351
- path: "/permalinks/:permalinkId/metadata";
3352
- description: "Get the metadata for a permalink.";
3353
- requestFormat: "json";
3354
- parameters: [{
3355
- name: "permalinkId";
3356
- type: "Path";
3357
- schema: zod.ZodString;
3358
- }];
3359
- response: zod.ZodObject<{
3360
- id: zod.ZodString;
3361
- fileId: zod.ZodString;
3362
- workspaceId: zod.ZodString;
3363
- createdAt: zod.ZodString;
3364
- expiresAt: zod.ZodUnion<[zod.ZodString, zod.ZodNull]>;
3365
- createdBy: zod.ZodUnion<[zod.ZodString, zod.ZodNull]>;
3366
- }, "strip", zod.ZodTypeAny, {
3367
- workspaceId: string;
3368
- id: string;
3369
- createdAt: string;
3370
- createdBy: string | null;
3371
- expiresAt: string | null;
3372
- fileId: string;
3373
- }, {
3374
- workspaceId: string;
3375
- id: string;
3376
- createdAt: string;
3377
- createdBy: string | null;
3378
- expiresAt: string | null;
3379
- fileId: string;
3380
- }>;
3381
- errors: [{
3382
- status: 404;
3383
- description: string;
3384
- schema: zod.ZodVoid;
3385
- }];
3386
- }, {
3387
- method: "get";
3388
- path: "/v2/files/:fileId";
3389
- description: "Get a pre-signed download URL for a file.";
3390
- requestFormat: "json";
3391
- parameters: [{
3392
- name: "fileId";
3393
- type: "Path";
3394
- schema: zod.ZodString;
3395
- }];
3396
- response: zod.ZodObject<{
3397
- url: zod.ZodString;
3398
- expiresAt: zod.ZodString;
3399
- metadata: zod.ZodUnion<[zod.ZodObject<{
3400
- id: zod.ZodString;
3401
- path: zod.ZodString;
3402
- workspaceId: zod.ZodString;
3403
- originalFileName: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
3404
- mimeType: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
3405
- size: zod.ZodOptional<zod.ZodUnion<[zod.ZodNumber, zod.ZodNull]>>;
3406
- legacyKey: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
3407
- bucketName: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
3408
- encryptionKey: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
3409
- createdBy: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
3410
- createdAt: zod.ZodString;
3411
- deletedAt: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
3412
- }, "strip", zod.ZodTypeAny, {
3413
- path: string;
3414
- workspaceId: string;
3415
- id: string;
3416
- createdAt: string;
3417
- deletedAt?: string | null | undefined;
3418
- originalFileName?: string | null | undefined;
3419
- size?: number | null | undefined;
3420
- createdBy?: string | null | undefined;
3421
- mimeType?: string | null | undefined;
3422
- legacyKey?: string | null | undefined;
3423
- bucketName?: string | null | undefined;
3424
- encryptionKey?: string | null | undefined;
3425
- }, {
3426
- path: string;
3427
- workspaceId: string;
3428
- id: string;
3429
- createdAt: string;
3430
- deletedAt?: string | null | undefined;
3431
- originalFileName?: string | null | undefined;
3432
- size?: number | null | undefined;
3433
- createdBy?: string | null | undefined;
3434
- mimeType?: string | null | undefined;
3435
- legacyKey?: string | null | undefined;
3436
- bucketName?: string | null | undefined;
3437
- encryptionKey?: string | null | undefined;
3438
- }>, zod.ZodNull]>;
3439
- }, "strip", zod.ZodTypeAny, {
3440
- expiresAt: string;
3441
- metadata: {
3442
- path: string;
3443
- workspaceId: string;
3444
- id: string;
3445
- createdAt: string;
3446
- deletedAt?: string | null | undefined;
3447
- originalFileName?: string | null | undefined;
3448
- size?: number | null | undefined;
3449
- createdBy?: string | null | undefined;
3450
- mimeType?: string | null | undefined;
3451
- legacyKey?: string | null | undefined;
3452
- bucketName?: string | null | undefined;
3453
- encryptionKey?: string | null | undefined;
3454
- } | null;
3455
- url: string;
3456
- }, {
3457
- expiresAt: string;
3458
- metadata: {
3459
- path: string;
3460
- workspaceId: string;
3461
- id: string;
3462
- createdAt: string;
3463
- deletedAt?: string | null | undefined;
3464
- originalFileName?: string | null | undefined;
3465
- size?: number | null | undefined;
3466
- createdBy?: string | null | undefined;
3467
- mimeType?: string | null | undefined;
3468
- legacyKey?: string | null | undefined;
3469
- bucketName?: string | null | undefined;
3470
- encryptionKey?: string | null | undefined;
3471
- } | null;
3472
- url: string;
3473
- }>;
3474
- errors: [{
3475
- status: 404;
3476
- description: string;
3477
- schema: zod.ZodVoid;
3478
- }];
3479
- }, {
3480
- method: "post";
3481
- path: "/v2/files/:filename";
3482
- description: "Create a file and get a pre-signed upload URL.\n\nThe &#x60;sha256&#x60; body param is used as the file&#x27;s primary key. If not provided, a random UUID will be generated.\n\nThe &#x60;filename&#x60; parameter is deprecated. Use the &#x60;originalFileName&#x60; parameter in the request body instead. Either way, the information about the file name is stored in the &#x60;metadata.originalFileName&#x60; field.\n\nThe returned &#x60;uploadUrl&#x60; is valid for 1 hour by default. You can change the expiration time by passing the &#x60;expiresIn&#x60; query parameter.\n";
3483
- requestFormat: "json";
3484
- parameters: [{
3485
- name: "body";
3486
- type: "Body";
3487
- schema: zod.ZodObject<{
3488
- fileName: zod.ZodOptional<zod.ZodString>;
3489
- sha256sum: zod.ZodOptional<zod.ZodString>;
3490
- size: zod.ZodOptional<zod.ZodNumber>;
3491
- mimeType: zod.ZodOptional<zod.ZodString>;
3492
- createdBy: zod.ZodOptional<zod.ZodString>;
3493
- }, "strip", zod.ZodTypeAny, {
3494
- size?: number | undefined;
3495
- createdBy?: string | undefined;
3496
- fileName?: string | undefined;
3497
- sha256sum?: string | undefined;
3498
- mimeType?: string | undefined;
3499
- }, {
3500
- size?: number | undefined;
3501
- createdBy?: string | undefined;
3502
- fileName?: string | undefined;
3503
- sha256sum?: string | undefined;
3504
- mimeType?: string | undefined;
3505
- }>;
3506
- }, {
3507
- name: "expiresIn";
3508
- type: "Query";
3509
- schema: zod.ZodDefault<zod.ZodOptional<zod.ZodNumber>>;
3510
- }, {
3511
- name: "filename";
3512
- type: "Path";
3513
- schema: zod.ZodString;
3514
- }];
3515
- response: zod.ZodUnion<[zod.ZodObject<{
3516
- id: zod.ZodString;
3517
- uploadUrl: zod.ZodString;
3518
- expiresAt: zod.ZodString;
3519
- metadata: zod.ZodObject<{
3520
- id: zod.ZodString;
3521
- path: zod.ZodString;
3522
- workspaceId: zod.ZodString;
3523
- originalFileName: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
3524
- mimeType: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
3525
- size: zod.ZodOptional<zod.ZodUnion<[zod.ZodNumber, zod.ZodNull]>>;
3526
- legacyKey: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
3527
- bucketName: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
3528
- encryptionKey: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
3529
- createdBy: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
3530
- createdAt: zod.ZodString;
3531
- deletedAt: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
3532
- }, "strip", zod.ZodTypeAny, {
3533
- path: string;
3534
- workspaceId: string;
3535
- id: string;
3536
- createdAt: string;
3537
- deletedAt?: string | null | undefined;
3538
- originalFileName?: string | null | undefined;
3539
- size?: number | null | undefined;
3540
- createdBy?: string | null | undefined;
3541
- mimeType?: string | null | undefined;
3542
- legacyKey?: string | null | undefined;
3543
- bucketName?: string | null | undefined;
3544
- encryptionKey?: string | null | undefined;
3545
- }, {
3546
- path: string;
3547
- workspaceId: string;
3548
- id: string;
3549
- createdAt: string;
3550
- deletedAt?: string | null | undefined;
3551
- originalFileName?: string | null | undefined;
3552
- size?: number | null | undefined;
3553
- createdBy?: string | null | undefined;
3554
- mimeType?: string | null | undefined;
3555
- legacyKey?: string | null | undefined;
3556
- bucketName?: string | null | undefined;
3557
- encryptionKey?: string | null | undefined;
3558
- }>;
3559
- }, "strip", zod.ZodTypeAny, {
3560
- id: string;
3561
- uploadUrl: string;
3562
- expiresAt: string;
3563
- metadata: {
3564
- path: string;
3565
- workspaceId: string;
3566
- id: string;
3567
- createdAt: string;
3568
- deletedAt?: string | null | undefined;
3569
- originalFileName?: string | null | undefined;
3570
- size?: number | null | undefined;
3571
- createdBy?: string | null | undefined;
3572
- mimeType?: string | null | undefined;
3573
- legacyKey?: string | null | undefined;
3574
- bucketName?: string | null | undefined;
3575
- encryptionKey?: string | null | undefined;
3576
- };
3577
- }, {
3578
- id: string;
3579
- uploadUrl: string;
3580
- expiresAt: string;
3581
- metadata: {
3582
- path: string;
3583
- workspaceId: string;
3584
- id: string;
3585
- createdAt: string;
3586
- deletedAt?: string | null | undefined;
3587
- originalFileName?: string | null | undefined;
3588
- size?: number | null | undefined;
3589
- createdBy?: string | null | undefined;
3590
- mimeType?: string | null | undefined;
3591
- legacyKey?: string | null | undefined;
3592
- bucketName?: string | null | undefined;
3593
- encryptionKey?: string | null | undefined;
3594
- };
3595
- }>, zod.ZodObject<{
3596
- url: zod.ZodString;
3597
- expiresAt: zod.ZodString;
3598
- }, "strip", zod.ZodTypeAny, {
3599
- expiresAt: string;
3600
- url: string;
3601
- }, {
3602
- expiresAt: string;
3603
- url: string;
3604
- }>]>;
3605
- }, {
3606
- method: "put";
3607
- path: "/v2/files/:id";
3608
- description: "Create a file and get a pre-signed upload URL.";
3609
- requestFormat: "json";
3610
- parameters: [{
3611
- name: "expiresIn";
3612
- type: "Query";
3613
- schema: zod.ZodDefault<zod.ZodOptional<zod.ZodNumber>>;
3614
- }, {
3615
- name: "id";
3616
- type: "Path";
3617
- schema: zod.ZodString;
3618
- }];
3619
- response: zod.ZodUnion<[zod.ZodObject<{
3620
- id: zod.ZodString;
3621
- uploadUrl: zod.ZodString;
3622
- expiresAt: zod.ZodString;
3623
- metadata: zod.ZodObject<{
3624
- id: zod.ZodString;
3625
- path: zod.ZodString;
3626
- workspaceId: zod.ZodString;
3627
- originalFileName: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
3628
- mimeType: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
3629
- size: zod.ZodOptional<zod.ZodUnion<[zod.ZodNumber, zod.ZodNull]>>;
3630
- legacyKey: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
3631
- bucketName: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
3632
- encryptionKey: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
3633
- createdBy: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
3634
- createdAt: zod.ZodString;
3635
- deletedAt: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
3636
- }, "strip", zod.ZodTypeAny, {
3637
- path: string;
3638
- workspaceId: string;
3639
- id: string;
3640
- createdAt: string;
3641
- deletedAt?: string | null | undefined;
3642
- originalFileName?: string | null | undefined;
3643
- size?: number | null | undefined;
3644
- createdBy?: string | null | undefined;
3645
- mimeType?: string | null | undefined;
3646
- legacyKey?: string | null | undefined;
3647
- bucketName?: string | null | undefined;
3648
- encryptionKey?: string | null | undefined;
3649
- }, {
3650
- path: string;
3651
- workspaceId: string;
3652
- id: string;
3653
- createdAt: string;
3654
- deletedAt?: string | null | undefined;
3655
- originalFileName?: string | null | undefined;
3656
- size?: number | null | undefined;
3657
- createdBy?: string | null | undefined;
3658
- mimeType?: string | null | undefined;
3659
- legacyKey?: string | null | undefined;
3660
- bucketName?: string | null | undefined;
3661
- encryptionKey?: string | null | undefined;
3662
- }>;
3663
- }, "strip", zod.ZodTypeAny, {
3664
- id: string;
3665
- uploadUrl: string;
3666
- expiresAt: string;
3667
- metadata: {
3668
- path: string;
3669
- workspaceId: string;
3670
- id: string;
3671
- createdAt: string;
3672
- deletedAt?: string | null | undefined;
3673
- originalFileName?: string | null | undefined;
3674
- size?: number | null | undefined;
3675
- createdBy?: string | null | undefined;
3676
- mimeType?: string | null | undefined;
3677
- legacyKey?: string | null | undefined;
3678
- bucketName?: string | null | undefined;
3679
- encryptionKey?: string | null | undefined;
3680
- };
3681
- }, {
3682
- id: string;
3683
- uploadUrl: string;
3684
- expiresAt: string;
3685
- metadata: {
3686
- path: string;
3687
- workspaceId: string;
3688
- id: string;
3689
- createdAt: string;
3690
- deletedAt?: string | null | undefined;
3691
- originalFileName?: string | null | undefined;
3692
- size?: number | null | undefined;
3693
- createdBy?: string | null | undefined;
3694
- mimeType?: string | null | undefined;
3695
- legacyKey?: string | null | undefined;
3696
- bucketName?: string | null | undefined;
3697
- encryptionKey?: string | null | undefined;
3698
- };
3699
- }>, zod.ZodObject<{
3700
- url: zod.ZodString;
3701
- expiresAt: zod.ZodString;
3702
- }, "strip", zod.ZodTypeAny, {
3703
- expiresAt: string;
3704
- url: string;
3705
- }, {
3706
- expiresAt: string;
3707
- url: string;
3708
- }>]>;
3709
- }, {
3710
- method: "delete";
3711
- path: "/v2/files/:id";
3712
- description: "Delete a file.";
3713
- requestFormat: "json";
3714
- parameters: [{
3715
- name: "id";
3716
- type: "Path";
3717
- schema: zod.ZodString;
3718
- }];
3719
- response: zod.ZodVoid;
3720
- }, {
3721
- method: "get";
3722
- path: "/v2/files/:id/metadata";
3723
- description: "Get the metadata for a file.";
3724
- requestFormat: "json";
3725
- parameters: [{
3726
- name: "id";
3727
- type: "Path";
3728
- schema: zod.ZodString;
3729
- }];
3730
- response: zod.ZodObject<{
3731
- id: zod.ZodString;
3732
- path: zod.ZodString;
3733
- workspaceId: zod.ZodString;
3734
- originalFileName: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
3735
- mimeType: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
3736
- size: zod.ZodOptional<zod.ZodUnion<[zod.ZodNumber, zod.ZodNull]>>;
3737
- legacyKey: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
3738
- bucketName: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
3739
- encryptionKey: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
3740
- createdBy: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
3741
- createdAt: zod.ZodString;
3742
- deletedAt: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
3743
- }, "strip", zod.ZodTypeAny, {
3744
- path: string;
3745
- workspaceId: string;
3746
- id: string;
3747
- createdAt: string;
3748
- deletedAt?: string | null | undefined;
3749
- originalFileName?: string | null | undefined;
3750
- size?: number | null | undefined;
3751
- createdBy?: string | null | undefined;
3752
- mimeType?: string | null | undefined;
3753
- legacyKey?: string | null | undefined;
3754
- bucketName?: string | null | undefined;
3755
- encryptionKey?: string | null | undefined;
3756
- }, {
3757
- path: string;
3758
- workspaceId: string;
3759
- id: string;
3760
- createdAt: string;
3761
- deletedAt?: string | null | undefined;
3762
- originalFileName?: string | null | undefined;
3763
- size?: number | null | undefined;
3764
- createdBy?: string | null | undefined;
3765
- mimeType?: string | null | undefined;
3766
- legacyKey?: string | null | undefined;
3767
- bucketName?: string | null | undefined;
3768
- encryptionKey?: string | null | undefined;
3769
- }>;
3770
- errors: [{
3771
- status: 404;
3772
- description: string;
3773
- schema: zod.ZodVoid;
3774
- }];
3775
- }, {
3776
- method: "post";
3777
- path: "/v2/files/bulk";
3778
- description: "Create multiple files in bulk and get pre-signed upload URLs.";
3779
- requestFormat: "json";
3780
- parameters: [{
3781
- name: "body";
3782
- type: "Body";
3783
- schema: zod.ZodUnion<[zod.ZodArray<zod.ZodObject<{
3784
- fileName: zod.ZodString;
3785
- sha256sum: zod.ZodOptional<zod.ZodString>;
3786
- size: zod.ZodOptional<zod.ZodNumber>;
3787
- mimeType: zod.ZodOptional<zod.ZodString>;
3788
- createdBy: zod.ZodOptional<zod.ZodString>;
3789
- }, "strip", zod.ZodTypeAny, {
3790
- fileName: string;
3791
- size?: number | undefined;
3792
- createdBy?: string | undefined;
3793
- sha256sum?: string | undefined;
3794
- mimeType?: string | undefined;
3795
- }, {
3796
- fileName: string;
3797
- size?: number | undefined;
3798
- createdBy?: string | undefined;
3799
- sha256sum?: string | undefined;
3800
- mimeType?: string | undefined;
3801
- }>, "many">, zod.ZodObject<{
3802
- files: zod.ZodArray<zod.ZodString, "many">;
3803
- }, "strip", zod.ZodTypeAny, {
3804
- files: string[];
3805
- }, {
3806
- files: string[];
3807
- }>]>;
3808
- }];
3809
- response: zod.ZodUnion<[zod.ZodArray<zod.ZodObject<{
3810
- id: zod.ZodString;
3811
- path: zod.ZodString;
3812
- workspaceId: zod.ZodString;
3813
- originalFileName: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
3814
- mimeType: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
3815
- size: zod.ZodOptional<zod.ZodUnion<[zod.ZodNumber, zod.ZodNull]>>;
3816
- legacyKey: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
3817
- bucketName: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
3818
- encryptionKey: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
3819
- createdBy: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
3820
- createdAt: zod.ZodString;
3821
- deletedAt: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
3822
- }, "strip", zod.ZodTypeAny, {
3823
- path: string;
3824
- workspaceId: string;
3825
- id: string;
3826
- createdAt: string;
3827
- deletedAt?: string | null | undefined;
3828
- originalFileName?: string | null | undefined;
3829
- size?: number | null | undefined;
3830
- createdBy?: string | null | undefined;
3831
- mimeType?: string | null | undefined;
3832
- legacyKey?: string | null | undefined;
3833
- bucketName?: string | null | undefined;
3834
- encryptionKey?: string | null | undefined;
3835
- }, {
3836
- path: string;
3837
- workspaceId: string;
3838
- id: string;
3839
- createdAt: string;
3840
- deletedAt?: string | null | undefined;
3841
- originalFileName?: string | null | undefined;
3842
- size?: number | null | undefined;
3843
- createdBy?: string | null | undefined;
3844
- mimeType?: string | null | undefined;
3845
- legacyKey?: string | null | undefined;
3846
- bucketName?: string | null | undefined;
3847
- encryptionKey?: string | null | undefined;
3848
- }>, "many">, zod.ZodObject<{
3849
- files: zod.ZodArray<zod.ZodObject<{
3850
- id: zod.ZodString;
3851
- path: zod.ZodString;
3852
- workspaceId: zod.ZodString;
3853
- originalFileName: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
3854
- mimeType: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
3855
- size: zod.ZodOptional<zod.ZodUnion<[zod.ZodNumber, zod.ZodNull]>>;
3856
- legacyKey: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
3857
- bucketName: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
3858
- encryptionKey: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
3859
- createdBy: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
3860
- createdAt: zod.ZodString;
3861
- deletedAt: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodNull]>>;
3862
- }, "strip", zod.ZodTypeAny, {
3863
- path: string;
3864
- workspaceId: string;
3865
- id: string;
3866
- createdAt: string;
3867
- deletedAt?: string | null | undefined;
3868
- originalFileName?: string | null | undefined;
3869
- size?: number | null | undefined;
3870
- createdBy?: string | null | undefined;
3871
- mimeType?: string | null | undefined;
3872
- legacyKey?: string | null | undefined;
3873
- bucketName?: string | null | undefined;
3874
- encryptionKey?: string | null | undefined;
3875
- }, {
3876
- path: string;
3877
- workspaceId: string;
3878
- id: string;
3879
- createdAt: string;
3880
- deletedAt?: string | null | undefined;
3881
- originalFileName?: string | null | undefined;
3882
- size?: number | null | undefined;
3883
- createdBy?: string | null | undefined;
3884
- mimeType?: string | null | undefined;
3885
- legacyKey?: string | null | undefined;
3886
- bucketName?: string | null | undefined;
3887
- encryptionKey?: string | null | undefined;
3888
- }>, "many">;
3889
- }, "strip", zod.ZodTypeAny, {
3890
- files: {
3891
- path: string;
3892
- workspaceId: string;
3893
- id: string;
3894
- createdAt: string;
3895
- deletedAt?: string | null | undefined;
3896
- originalFileName?: string | null | undefined;
3897
- size?: number | null | undefined;
3898
- createdBy?: string | null | undefined;
3899
- mimeType?: string | null | undefined;
3900
- legacyKey?: string | null | undefined;
3901
- bucketName?: string | null | undefined;
3902
- encryptionKey?: string | null | undefined;
3903
- }[];
3904
- }, {
3905
- files: {
3906
- path: string;
3907
- workspaceId: string;
3908
- id: string;
3909
- createdAt: string;
3910
- deletedAt?: string | null | undefined;
3911
- originalFileName?: string | null | undefined;
3912
- size?: number | null | undefined;
3913
- createdBy?: string | null | undefined;
3914
- mimeType?: string | null | undefined;
3915
- legacyKey?: string | null | undefined;
3916
- bucketName?: string | null | undefined;
3917
- encryptionKey?: string | null | undefined;
3918
- }[];
3919
- }>]>;
3920
- }]>;
5
+ declare function useVaultClient(vaultUrl: string, token: string): any;
3921
6
 
3922
7
  export { createApiClient, useVaultClient };