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