@meistrari/vault-http-client 2.3.0

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