@tulip-systems/drive-local 0.11.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/LICENSE +662 -0
  2. package/dist/client.d.mts +12 -0
  3. package/dist/client.mjs +12 -0
  4. package/dist/database/drizzle/lib/adapter.d.mts +310 -0
  5. package/dist/database/drizzle/lib/adapter.mjs +520 -0
  6. package/dist/database/drizzle/lib/compilers.d.mts +395 -0
  7. package/dist/database/drizzle/lib/compilers.mjs +21 -0
  8. package/dist/database/drizzle/lib/schema.d.mts +61 -0
  9. package/dist/drizzle.d.mts +4 -0
  10. package/dist/drizzle.mjs +3 -0
  11. package/dist/index.d.mts +8 -0
  12. package/dist/index.mjs +8 -0
  13. package/dist/root/components/command-file-update.d.mts +11 -0
  14. package/dist/root/components/command-file-update.mjs +44 -0
  15. package/dist/root/components/command-file-upload.d.mts +5 -0
  16. package/dist/root/components/command-file-upload.mjs +31 -0
  17. package/dist/root/components/command-folder-create.d.mts +11 -0
  18. package/dist/root/components/command-folder-create.mjs +50 -0
  19. package/dist/root/components/command-folder-update.d.mts +11 -0
  20. package/dist/root/components/command-folder-update.mjs +44 -0
  21. package/dist/root/components/content.client.d.mts +5 -0
  22. package/dist/root/components/content.client.mjs +5 -0
  23. package/dist/root/components/navigation.client.d.mts +11 -0
  24. package/dist/root/components/navigation.client.mjs +12 -0
  25. package/dist/root/components/provider.client.d.mts +16 -0
  26. package/dist/root/components/provider.client.mjs +65 -0
  27. package/dist/root/components/upload-zone-context.client.d.mts +36 -0
  28. package/dist/root/components/upload-zone-context.client.mjs +19 -0
  29. package/dist/root/components/upload-zone.client.d.mts +16 -0
  30. package/dist/root/components/upload-zone.client.mjs +147 -0
  31. package/dist/root/components/view.client.d.mts +20 -0
  32. package/dist/root/components/view.client.mjs +86 -0
  33. package/dist/root/config/columns-data.d.mts +6 -0
  34. package/dist/root/config/columns-data.mjs +62 -0
  35. package/dist/root/config/filters.d.mts +404 -0
  36. package/dist/root/config/filters.mjs +122 -0
  37. package/dist/root/config/sorting.d.mts +38 -0
  38. package/dist/root/config/sorting.mjs +26 -0
  39. package/dist/root/lib/constants.d.mts +12 -0
  40. package/dist/root/lib/constants.mjs +27 -0
  41. package/dist/root/lib/database/contracts.d.mts +112 -0
  42. package/dist/root/lib/database/filters.d.mts +28 -0
  43. package/dist/root/lib/database/filters.mjs +73 -0
  44. package/dist/root/lib/helpers.d.mts +33 -0
  45. package/dist/root/lib/helpers.mjs +78 -0
  46. package/dist/root/lib/route-handler.server.d.mts +36 -0
  47. package/dist/root/lib/route-handler.server.mjs +111 -0
  48. package/dist/root/lib/router.server.d.mts +819 -0
  49. package/dist/root/lib/router.server.mjs +87 -0
  50. package/dist/root/lib/search-params.d.mts +15 -0
  51. package/dist/root/lib/search-params.mjs +6 -0
  52. package/dist/root/lib/service.server.d.mts +522 -0
  53. package/dist/root/lib/service.server.mjs +613 -0
  54. package/dist/root/lib/upload.client.d.mts +60 -0
  55. package/dist/root/lib/upload.client.mjs +97 -0
  56. package/dist/root/lib/validators.d.mts +710 -0
  57. package/dist/root/lib/validators.mjs +116 -0
  58. package/dist/server.d.mts +5 -0
  59. package/dist/server.mjs +4 -0
  60. package/package.json +83 -0
  61. package/styles.css +1 -0
@@ -0,0 +1,819 @@
1
+ import { z as z$1 } from "zod";
2
+ import { InferContractRouterInputs, InferContractRouterOutputs } from "@orpc/contract";
3
+ //#region src/root/lib/router.server.d.ts
4
+ /**
5
+ * Local Drive router contract defines the input and output schemas for local drive-related procedures.
6
+ */
7
+ declare const localDriveRouterContract: {
8
+ /**
9
+ * Get node with children
10
+ */
11
+ getNodeWithChildren: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z$1.ZodObject<{
12
+ id: z$1.ZodString;
13
+ namespace: z$1.ZodString;
14
+ }, z$1.core.$strip>, z$1.ZodNullable<z$1.ZodObject<{
15
+ id: z$1.ZodString;
16
+ createdAt: z$1.ZodDate;
17
+ updatedAt: z$1.ZodDate;
18
+ name: z$1.ZodString;
19
+ namespace: z$1.ZodString;
20
+ type: z$1.ZodEnum<{
21
+ folder: "folder";
22
+ file: "file";
23
+ }>;
24
+ subtype: z$1.ZodEnum<{
25
+ image: "image";
26
+ document: "document";
27
+ spreadsheet: "spreadsheet";
28
+ video: "video";
29
+ audio: "audio";
30
+ archive: "archive";
31
+ other: "other";
32
+ }>;
33
+ size: z$1.ZodNullable<z$1.ZodNumber>;
34
+ contentType: z$1.ZodNullable<z$1.ZodString>;
35
+ readonly: z$1.ZodBoolean;
36
+ hidden: z$1.ZodBoolean;
37
+ archivedAt: z$1.ZodNullable<z$1.ZodDate>;
38
+ parentId: z$1.ZodNullable<z$1.ZodString>;
39
+ links: z$1.ZodObject<{
40
+ view: z$1.ZodNullable<z$1.ZodString>;
41
+ download: z$1.ZodNullable<z$1.ZodString>;
42
+ preview: z$1.ZodNullable<z$1.ZodString>;
43
+ thumbnail: z$1.ZodNullable<z$1.ZodString>;
44
+ }, z$1.core.$strip>;
45
+ availability: z$1.ZodEnum<{
46
+ ready: "ready";
47
+ pending: "pending";
48
+ failed: "failed";
49
+ }>;
50
+ provider: z$1.ZodLiteral<"local">;
51
+ assetId: z$1.ZodNullable<z$1.ZodString>;
52
+ children: z$1.ZodArray<z$1.ZodObject<{
53
+ id: z$1.ZodString;
54
+ createdAt: z$1.ZodDate;
55
+ updatedAt: z$1.ZodDate;
56
+ name: z$1.ZodString;
57
+ namespace: z$1.ZodString;
58
+ type: z$1.ZodEnum<{
59
+ folder: "folder";
60
+ file: "file";
61
+ }>;
62
+ subtype: z$1.ZodEnum<{
63
+ image: "image";
64
+ document: "document";
65
+ spreadsheet: "spreadsheet";
66
+ video: "video";
67
+ audio: "audio";
68
+ archive: "archive";
69
+ other: "other";
70
+ }>;
71
+ size: z$1.ZodNullable<z$1.ZodNumber>;
72
+ contentType: z$1.ZodNullable<z$1.ZodString>;
73
+ readonly: z$1.ZodBoolean;
74
+ hidden: z$1.ZodBoolean;
75
+ archivedAt: z$1.ZodNullable<z$1.ZodDate>;
76
+ parentId: z$1.ZodNullable<z$1.ZodString>;
77
+ links: z$1.ZodObject<{
78
+ view: z$1.ZodNullable<z$1.ZodString>;
79
+ download: z$1.ZodNullable<z$1.ZodString>;
80
+ preview: z$1.ZodNullable<z$1.ZodString>;
81
+ thumbnail: z$1.ZodNullable<z$1.ZodString>;
82
+ }, z$1.core.$strip>;
83
+ availability: z$1.ZodEnum<{
84
+ ready: "ready";
85
+ pending: "pending";
86
+ failed: "failed";
87
+ }>;
88
+ provider: z$1.ZodLiteral<"local">;
89
+ assetId: z$1.ZodNullable<z$1.ZodString>;
90
+ }, z$1.core.$strip>>;
91
+ }, z$1.core.$strip>>, Record<never, never>, Record<never, never>>;
92
+ /**
93
+ * Get folders by parent id
94
+ */
95
+ getNodesByParentId: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z$1.ZodObject<{
96
+ filters: z$1.ZodObject<{
97
+ search: z$1.ZodOptional<z$1.ZodString>;
98
+ types: z$1.ZodOptional<z$1.ZodArray<z$1.ZodEnum<{
99
+ readonly folder: "folder";
100
+ readonly file: "file";
101
+ }>>>;
102
+ contentTypes: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
103
+ nodeIds: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
104
+ assetIds: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
105
+ namespace: z$1.ZodOptional<z$1.ZodString>;
106
+ parentId: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodString>>;
107
+ subtypes: z$1.ZodOptional<z$1.ZodArray<z$1.ZodEnum<{
108
+ readonly image: "image";
109
+ readonly document: "document";
110
+ readonly spreadsheet: "spreadsheet";
111
+ readonly video: "video";
112
+ readonly audio: "audio";
113
+ readonly archive: "archive";
114
+ readonly other: "other";
115
+ }>>>;
116
+ isArchived: z$1.ZodOptional<z$1.ZodBoolean>;
117
+ hidden: z$1.ZodOptional<z$1.ZodBoolean>;
118
+ }, z$1.core.$strip>;
119
+ sorts: z$1.ZodDefault<z$1.ZodOptional<z$1.ZodType<import("@tulip-systems/query").SortInput<"name" | "createdAt" | "updatedAt">[], unknown, z$1.core.$ZodTypeInternals<import("@tulip-systems/query").SortInput<"name" | "createdAt" | "updatedAt">[], unknown>>>>;
120
+ }, z$1.core.$strip>, z$1.ZodArray<z$1.ZodObject<{
121
+ id: z$1.ZodString;
122
+ createdAt: z$1.ZodDate;
123
+ updatedAt: z$1.ZodDate;
124
+ name: z$1.ZodString;
125
+ namespace: z$1.ZodString;
126
+ type: z$1.ZodEnum<{
127
+ folder: "folder";
128
+ file: "file";
129
+ }>;
130
+ subtype: z$1.ZodEnum<{
131
+ image: "image";
132
+ document: "document";
133
+ spreadsheet: "spreadsheet";
134
+ video: "video";
135
+ audio: "audio";
136
+ archive: "archive";
137
+ other: "other";
138
+ }>;
139
+ size: z$1.ZodNullable<z$1.ZodNumber>;
140
+ contentType: z$1.ZodNullable<z$1.ZodString>;
141
+ readonly: z$1.ZodBoolean;
142
+ hidden: z$1.ZodBoolean;
143
+ archivedAt: z$1.ZodNullable<z$1.ZodDate>;
144
+ parentId: z$1.ZodNullable<z$1.ZodString>;
145
+ links: z$1.ZodObject<{
146
+ view: z$1.ZodNullable<z$1.ZodString>;
147
+ download: z$1.ZodNullable<z$1.ZodString>;
148
+ preview: z$1.ZodNullable<z$1.ZodString>;
149
+ thumbnail: z$1.ZodNullable<z$1.ZodString>;
150
+ }, z$1.core.$strip>;
151
+ availability: z$1.ZodEnum<{
152
+ ready: "ready";
153
+ pending: "pending";
154
+ failed: "failed";
155
+ }>;
156
+ provider: z$1.ZodLiteral<"local">;
157
+ assetId: z$1.ZodNullable<z$1.ZodString>;
158
+ }, z$1.core.$strip>>, Record<never, never>, Record<never, never>>;
159
+ /**
160
+ * List tree nodes with pagination and search.
161
+ */
162
+ listTree: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z$1.ZodObject<{
163
+ pagination: z$1.ZodObject<{
164
+ page: z$1.ZodPipe<z$1.ZodDefault<z$1.ZodOptional<z$1.ZodCoercedNumber<unknown>>>, z$1.ZodTransform<number, number>>;
165
+ limit: z$1.ZodPipe<z$1.ZodDefault<z$1.ZodOptional<z$1.ZodCoercedNumber<unknown>>>, z$1.ZodTransform<number, number>>;
166
+ }, z$1.core.$strip>;
167
+ filters: z$1.ZodObject<{
168
+ search: z$1.ZodOptional<z$1.ZodString>;
169
+ types: z$1.ZodOptional<z$1.ZodArray<z$1.ZodEnum<{
170
+ readonly folder: "folder";
171
+ readonly file: "file";
172
+ }>>>;
173
+ contentTypes: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
174
+ nodeIds: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
175
+ assetIds: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
176
+ namespace: z$1.ZodOptional<z$1.ZodString>;
177
+ parentId: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodString>>;
178
+ subtypes: z$1.ZodOptional<z$1.ZodArray<z$1.ZodEnum<{
179
+ readonly image: "image";
180
+ readonly document: "document";
181
+ readonly spreadsheet: "spreadsheet";
182
+ readonly video: "video";
183
+ readonly audio: "audio";
184
+ readonly archive: "archive";
185
+ readonly other: "other";
186
+ }>>>;
187
+ isArchived: z$1.ZodOptional<z$1.ZodBoolean>;
188
+ hidden: z$1.ZodOptional<z$1.ZodBoolean>;
189
+ }, z$1.core.$strip>;
190
+ sorts: z$1.ZodDefault<z$1.ZodOptional<z$1.ZodType<import("@tulip-systems/query").SortInput<"name" | "createdAt" | "updatedAt">[], unknown, z$1.core.$ZodTypeInternals<import("@tulip-systems/query").SortInput<"name" | "createdAt" | "updatedAt">[], unknown>>>>;
191
+ }, z$1.core.$strip>, z$1.ZodObject<{
192
+ data: z$1.ZodArray<z$1.ZodObject<{
193
+ id: z$1.ZodString;
194
+ createdAt: z$1.ZodDate;
195
+ updatedAt: z$1.ZodDate;
196
+ name: z$1.ZodString;
197
+ namespace: z$1.ZodString;
198
+ type: z$1.ZodEnum<{
199
+ folder: "folder";
200
+ file: "file";
201
+ }>;
202
+ subtype: z$1.ZodEnum<{
203
+ image: "image";
204
+ document: "document";
205
+ spreadsheet: "spreadsheet";
206
+ video: "video";
207
+ audio: "audio";
208
+ archive: "archive";
209
+ other: "other";
210
+ }>;
211
+ size: z$1.ZodNullable<z$1.ZodNumber>;
212
+ contentType: z$1.ZodNullable<z$1.ZodString>;
213
+ readonly: z$1.ZodBoolean;
214
+ hidden: z$1.ZodBoolean;
215
+ archivedAt: z$1.ZodNullable<z$1.ZodDate>;
216
+ parentId: z$1.ZodNullable<z$1.ZodString>;
217
+ links: z$1.ZodObject<{
218
+ view: z$1.ZodNullable<z$1.ZodString>;
219
+ download: z$1.ZodNullable<z$1.ZodString>;
220
+ preview: z$1.ZodNullable<z$1.ZodString>;
221
+ thumbnail: z$1.ZodNullable<z$1.ZodString>;
222
+ }, z$1.core.$strip>;
223
+ availability: z$1.ZodEnum<{
224
+ ready: "ready";
225
+ pending: "pending";
226
+ failed: "failed";
227
+ }>;
228
+ provider: z$1.ZodLiteral<"local">;
229
+ assetId: z$1.ZodNullable<z$1.ZodString>;
230
+ asset: z$1.ZodNullable<z$1.ZodObject<{
231
+ id: z$1.ZodUUID;
232
+ createdAt: z$1.ZodDate;
233
+ updatedAt: z$1.ZodDate;
234
+ provider: z$1.ZodEnum<{
235
+ s3: "s3";
236
+ }>;
237
+ bucket: z$1.ZodString;
238
+ key: z$1.ZodString;
239
+ status: z$1.ZodEnum<{
240
+ pending: "pending";
241
+ ready: "ready";
242
+ error: "error";
243
+ }>;
244
+ visibility: z$1.ZodEnum<{
245
+ private: "private";
246
+ public: "public";
247
+ }>;
248
+ size: z$1.ZodNullable<z$1.ZodNumber>;
249
+ contentType: z$1.ZodNullable<z$1.ZodString>;
250
+ uploadId: z$1.ZodUUID;
251
+ name: z$1.ZodNullable<z$1.ZodString>;
252
+ metadata: z$1.ZodNullable<z$1.ZodRecord<z$1.ZodString, z$1.ZodUnknown>>;
253
+ etag: z$1.ZodNullable<z$1.ZodString>;
254
+ uploadedAt: z$1.ZodDate;
255
+ deletedAt: z$1.ZodNullable<z$1.ZodDate>;
256
+ }, z$1.core.$strip>>;
257
+ }, z$1.core.$strip>>;
258
+ pagination: z$1.ZodObject<{
259
+ total: z$1.ZodNumber;
260
+ totalPages: z$1.ZodNumber;
261
+ limit: z$1.ZodNumber;
262
+ hasNextPage: z$1.ZodBoolean;
263
+ hasPreviousPage: z$1.ZodBoolean;
264
+ page: z$1.ZodNumber;
265
+ nextPage: z$1.ZodNullable<z$1.ZodNumber>;
266
+ previousPage: z$1.ZodNullable<z$1.ZodNumber>;
267
+ }, z$1.core.$strip>;
268
+ }, z$1.core.$strip>, Record<never, never>, Record<never, never>>;
269
+ /**
270
+ * List flat nodes with pagination and search.
271
+ */
272
+ listFlat: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z$1.ZodObject<{
273
+ pagination: z$1.ZodObject<{
274
+ page: z$1.ZodPipe<z$1.ZodDefault<z$1.ZodOptional<z$1.ZodCoercedNumber<unknown>>>, z$1.ZodTransform<number, number>>;
275
+ limit: z$1.ZodPipe<z$1.ZodDefault<z$1.ZodOptional<z$1.ZodCoercedNumber<unknown>>>, z$1.ZodTransform<number, number>>;
276
+ }, z$1.core.$strip>;
277
+ filters: z$1.ZodObject<{
278
+ search: z$1.ZodOptional<z$1.ZodString>;
279
+ types: z$1.ZodOptional<z$1.ZodArray<z$1.ZodEnum<{
280
+ readonly folder: "folder";
281
+ readonly file: "file";
282
+ }>>>;
283
+ contentTypes: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
284
+ nodeIds: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
285
+ assetIds: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
286
+ namespace: z$1.ZodOptional<z$1.ZodString>;
287
+ parentId: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodString>>;
288
+ subtypes: z$1.ZodOptional<z$1.ZodArray<z$1.ZodEnum<{
289
+ readonly image: "image";
290
+ readonly document: "document";
291
+ readonly spreadsheet: "spreadsheet";
292
+ readonly video: "video";
293
+ readonly audio: "audio";
294
+ readonly archive: "archive";
295
+ readonly other: "other";
296
+ }>>>;
297
+ isArchived: z$1.ZodOptional<z$1.ZodBoolean>;
298
+ hidden: z$1.ZodOptional<z$1.ZodBoolean>;
299
+ }, z$1.core.$strip>;
300
+ sorts: z$1.ZodDefault<z$1.ZodOptional<z$1.ZodType<import("@tulip-systems/query").SortInput<"name" | "createdAt" | "updatedAt">[], unknown, z$1.core.$ZodTypeInternals<import("@tulip-systems/query").SortInput<"name" | "createdAt" | "updatedAt">[], unknown>>>>;
301
+ }, z$1.core.$strip>, z$1.ZodObject<{
302
+ data: z$1.ZodArray<z$1.ZodObject<{
303
+ id: z$1.ZodString;
304
+ createdAt: z$1.ZodDate;
305
+ updatedAt: z$1.ZodDate;
306
+ name: z$1.ZodString;
307
+ namespace: z$1.ZodString;
308
+ type: z$1.ZodEnum<{
309
+ folder: "folder";
310
+ file: "file";
311
+ }>;
312
+ subtype: z$1.ZodEnum<{
313
+ image: "image";
314
+ document: "document";
315
+ spreadsheet: "spreadsheet";
316
+ video: "video";
317
+ audio: "audio";
318
+ archive: "archive";
319
+ other: "other";
320
+ }>;
321
+ size: z$1.ZodNullable<z$1.ZodNumber>;
322
+ contentType: z$1.ZodNullable<z$1.ZodString>;
323
+ readonly: z$1.ZodBoolean;
324
+ hidden: z$1.ZodBoolean;
325
+ archivedAt: z$1.ZodNullable<z$1.ZodDate>;
326
+ parentId: z$1.ZodNullable<z$1.ZodString>;
327
+ links: z$1.ZodObject<{
328
+ view: z$1.ZodNullable<z$1.ZodString>;
329
+ download: z$1.ZodNullable<z$1.ZodString>;
330
+ preview: z$1.ZodNullable<z$1.ZodString>;
331
+ thumbnail: z$1.ZodNullable<z$1.ZodString>;
332
+ }, z$1.core.$strip>;
333
+ availability: z$1.ZodEnum<{
334
+ ready: "ready";
335
+ pending: "pending";
336
+ failed: "failed";
337
+ }>;
338
+ provider: z$1.ZodLiteral<"local">;
339
+ assetId: z$1.ZodNullable<z$1.ZodString>;
340
+ asset: z$1.ZodNullable<z$1.ZodObject<{
341
+ id: z$1.ZodUUID;
342
+ createdAt: z$1.ZodDate;
343
+ updatedAt: z$1.ZodDate;
344
+ provider: z$1.ZodEnum<{
345
+ s3: "s3";
346
+ }>;
347
+ bucket: z$1.ZodString;
348
+ key: z$1.ZodString;
349
+ status: z$1.ZodEnum<{
350
+ pending: "pending";
351
+ ready: "ready";
352
+ error: "error";
353
+ }>;
354
+ visibility: z$1.ZodEnum<{
355
+ private: "private";
356
+ public: "public";
357
+ }>;
358
+ size: z$1.ZodNullable<z$1.ZodNumber>;
359
+ contentType: z$1.ZodNullable<z$1.ZodString>;
360
+ uploadId: z$1.ZodUUID;
361
+ name: z$1.ZodNullable<z$1.ZodString>;
362
+ metadata: z$1.ZodNullable<z$1.ZodRecord<z$1.ZodString, z$1.ZodUnknown>>;
363
+ etag: z$1.ZodNullable<z$1.ZodString>;
364
+ uploadedAt: z$1.ZodDate;
365
+ deletedAt: z$1.ZodNullable<z$1.ZodDate>;
366
+ }, z$1.core.$strip>>;
367
+ }, z$1.core.$strip>>;
368
+ pagination: z$1.ZodObject<{
369
+ total: z$1.ZodNumber;
370
+ totalPages: z$1.ZodNumber;
371
+ limit: z$1.ZodNumber;
372
+ hasNextPage: z$1.ZodBoolean;
373
+ hasPreviousPage: z$1.ZodBoolean;
374
+ page: z$1.ZodNumber;
375
+ nextPage: z$1.ZodNullable<z$1.ZodNumber>;
376
+ previousPage: z$1.ZodNullable<z$1.ZodNumber>;
377
+ }, z$1.core.$strip>;
378
+ }, z$1.core.$strip>, Record<never, never>, Record<never, never>>;
379
+ /**
380
+ * Get parents of a folder
381
+ */
382
+ getFolderParents: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z$1.ZodObject<{
383
+ id: z$1.ZodNullable<z$1.ZodString>;
384
+ namespace: z$1.ZodString;
385
+ }, z$1.core.$strip>, z$1.ZodArray<z$1.ZodObject<{
386
+ id: z$1.ZodString;
387
+ name: z$1.ZodString;
388
+ parentId: z$1.ZodNullable<z$1.ZodString>;
389
+ depth: z$1.ZodNumber;
390
+ }, z$1.core.$strip>>, Record<never, never>, Record<never, never>>;
391
+ /**
392
+ * Get url for opening a file
393
+ */
394
+ getURL: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z$1.ZodObject<{
395
+ disposition: z$1.ZodDefault<z$1.ZodOptional<z$1.ZodEnum<{
396
+ inline: "inline";
397
+ attachment: "attachment";
398
+ }>>>;
399
+ variant: z$1.ZodDefault<z$1.ZodOptional<z$1.ZodEnum<{
400
+ [x: `preview-${number}`]: `preview-${number}`;
401
+ main: "main";
402
+ }>>>;
403
+ id: z$1.ZodString;
404
+ }, z$1.core.$strip>, z$1.ZodNullable<z$1.ZodString>, Record<never, never>, Record<never, never>>;
405
+ /**
406
+ * Create a direct upload intent for a file
407
+ */
408
+ presignUpload: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z$1.ZodObject<{
409
+ name: z$1.ZodString;
410
+ namespace: z$1.ZodString;
411
+ parentId: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodString>>;
412
+ contentType: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodString>>;
413
+ size: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodNumber>>;
414
+ hidden: z$1.ZodOptional<z$1.ZodBoolean>;
415
+ readonly: z$1.ZodOptional<z$1.ZodBoolean>;
416
+ uploadId: z$1.ZodOptional<z$1.ZodUUID>;
417
+ visibility: z$1.ZodDefault<z$1.ZodOptional<z$1.ZodEnum<{
418
+ private: "private";
419
+ public: "public";
420
+ }>>>;
421
+ }, z$1.core.$strip>, z$1.ZodObject<{
422
+ uploadId: z$1.ZodString;
423
+ presignedUrl: z$1.ZodString;
424
+ node: z$1.ZodObject<{
425
+ id: z$1.ZodString;
426
+ createdAt: z$1.ZodDate;
427
+ updatedAt: z$1.ZodDate;
428
+ name: z$1.ZodString;
429
+ namespace: z$1.ZodString;
430
+ subtype: z$1.ZodEnum<{
431
+ image: "image";
432
+ document: "document";
433
+ spreadsheet: "spreadsheet";
434
+ video: "video";
435
+ audio: "audio";
436
+ archive: "archive";
437
+ other: "other";
438
+ }>;
439
+ size: z$1.ZodNullable<z$1.ZodNumber>;
440
+ contentType: z$1.ZodNullable<z$1.ZodString>;
441
+ readonly: z$1.ZodBoolean;
442
+ hidden: z$1.ZodBoolean;
443
+ archivedAt: z$1.ZodNullable<z$1.ZodDate>;
444
+ parentId: z$1.ZodNullable<z$1.ZodString>;
445
+ links: z$1.ZodObject<{
446
+ view: z$1.ZodNullable<z$1.ZodString>;
447
+ download: z$1.ZodNullable<z$1.ZodString>;
448
+ preview: z$1.ZodNullable<z$1.ZodString>;
449
+ thumbnail: z$1.ZodNullable<z$1.ZodString>;
450
+ }, z$1.core.$strip>;
451
+ availability: z$1.ZodEnum<{
452
+ ready: "ready";
453
+ pending: "pending";
454
+ failed: "failed";
455
+ }>;
456
+ provider: z$1.ZodLiteral<"local">;
457
+ assetId: z$1.ZodNullable<z$1.ZodString>;
458
+ type: z$1.ZodLiteral<"file">;
459
+ }, z$1.core.$strip>;
460
+ asset: z$1.ZodObject<{
461
+ id: z$1.ZodUUID;
462
+ createdAt: z$1.ZodDate;
463
+ updatedAt: z$1.ZodDate;
464
+ provider: z$1.ZodEnum<{
465
+ s3: "s3";
466
+ }>;
467
+ bucket: z$1.ZodString;
468
+ key: z$1.ZodString;
469
+ status: z$1.ZodEnum<{
470
+ pending: "pending";
471
+ ready: "ready";
472
+ error: "error";
473
+ }>;
474
+ visibility: z$1.ZodEnum<{
475
+ private: "private";
476
+ public: "public";
477
+ }>;
478
+ size: z$1.ZodNullable<z$1.ZodNumber>;
479
+ contentType: z$1.ZodNullable<z$1.ZodString>;
480
+ uploadId: z$1.ZodUUID;
481
+ name: z$1.ZodNullable<z$1.ZodString>;
482
+ metadata: z$1.ZodNullable<z$1.ZodRecord<z$1.ZodString, z$1.ZodUnknown>>;
483
+ etag: z$1.ZodNullable<z$1.ZodString>;
484
+ uploadedAt: z$1.ZodDate;
485
+ deletedAt: z$1.ZodNullable<z$1.ZodDate>;
486
+ }, z$1.core.$strip>;
487
+ }, z$1.core.$strip>, Record<never, never>, Record<never, never>>;
488
+ /**
489
+ * Confirm a direct upload intent
490
+ */
491
+ confirmUpload: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z$1.ZodObject<{
492
+ uploadId: z$1.ZodString;
493
+ }, z$1.core.$strip>, z$1.ZodObject<{
494
+ id: z$1.ZodString;
495
+ createdAt: z$1.ZodDate;
496
+ updatedAt: z$1.ZodDate;
497
+ name: z$1.ZodString;
498
+ namespace: z$1.ZodString;
499
+ subtype: z$1.ZodEnum<{
500
+ image: "image";
501
+ document: "document";
502
+ spreadsheet: "spreadsheet";
503
+ video: "video";
504
+ audio: "audio";
505
+ archive: "archive";
506
+ other: "other";
507
+ }>;
508
+ size: z$1.ZodNullable<z$1.ZodNumber>;
509
+ contentType: z$1.ZodNullable<z$1.ZodString>;
510
+ readonly: z$1.ZodBoolean;
511
+ hidden: z$1.ZodBoolean;
512
+ archivedAt: z$1.ZodNullable<z$1.ZodDate>;
513
+ parentId: z$1.ZodNullable<z$1.ZodString>;
514
+ links: z$1.ZodObject<{
515
+ view: z$1.ZodNullable<z$1.ZodString>;
516
+ download: z$1.ZodNullable<z$1.ZodString>;
517
+ preview: z$1.ZodNullable<z$1.ZodString>;
518
+ thumbnail: z$1.ZodNullable<z$1.ZodString>;
519
+ }, z$1.core.$strip>;
520
+ availability: z$1.ZodEnum<{
521
+ ready: "ready";
522
+ pending: "pending";
523
+ failed: "failed";
524
+ }>;
525
+ provider: z$1.ZodLiteral<"local">;
526
+ assetId: z$1.ZodNullable<z$1.ZodString>;
527
+ type: z$1.ZodLiteral<"file">;
528
+ }, z$1.core.$strip>, Record<never, never>, Record<never, never>>;
529
+ /**
530
+ * Create a folder
531
+ */
532
+ createFolder: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z$1.ZodObject<{
533
+ name: z$1.ZodString;
534
+ namespace: z$1.ZodString;
535
+ parentId: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodString>>;
536
+ hidden: z$1.ZodOptional<z$1.ZodBoolean>;
537
+ readonly: z$1.ZodOptional<z$1.ZodBoolean>;
538
+ }, z$1.core.$strip>, z$1.ZodObject<{
539
+ id: z$1.ZodString;
540
+ createdAt: z$1.ZodDate;
541
+ updatedAt: z$1.ZodDate;
542
+ name: z$1.ZodString;
543
+ namespace: z$1.ZodString;
544
+ type: z$1.ZodEnum<{
545
+ folder: "folder";
546
+ file: "file";
547
+ }>;
548
+ subtype: z$1.ZodEnum<{
549
+ image: "image";
550
+ document: "document";
551
+ spreadsheet: "spreadsheet";
552
+ video: "video";
553
+ audio: "audio";
554
+ archive: "archive";
555
+ other: "other";
556
+ }>;
557
+ size: z$1.ZodNullable<z$1.ZodNumber>;
558
+ contentType: z$1.ZodNullable<z$1.ZodString>;
559
+ readonly: z$1.ZodBoolean;
560
+ hidden: z$1.ZodBoolean;
561
+ archivedAt: z$1.ZodNullable<z$1.ZodDate>;
562
+ parentId: z$1.ZodNullable<z$1.ZodString>;
563
+ links: z$1.ZodObject<{
564
+ view: z$1.ZodNullable<z$1.ZodString>;
565
+ download: z$1.ZodNullable<z$1.ZodString>;
566
+ preview: z$1.ZodNullable<z$1.ZodString>;
567
+ thumbnail: z$1.ZodNullable<z$1.ZodString>;
568
+ }, z$1.core.$strip>;
569
+ availability: z$1.ZodEnum<{
570
+ ready: "ready";
571
+ pending: "pending";
572
+ failed: "failed";
573
+ }>;
574
+ provider: z$1.ZodLiteral<"local">;
575
+ assetId: z$1.ZodNullable<z$1.ZodString>;
576
+ }, z$1.core.$strip>, Record<never, never>, Record<never, never>>;
577
+ /**
578
+ * Update node
579
+ */
580
+ updateNode: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z$1.ZodObject<{
581
+ id: z$1.ZodString;
582
+ data: z$1.ZodObject<{
583
+ name: z$1.ZodOptional<z$1.ZodString>;
584
+ parentId: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodString>>;
585
+ hidden: z$1.ZodOptional<z$1.ZodBoolean>;
586
+ readonly: z$1.ZodOptional<z$1.ZodBoolean>;
587
+ archivedAt: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodDate>>;
588
+ }, z$1.core.$strip>;
589
+ }, z$1.core.$strip>, z$1.ZodObject<{
590
+ id: z$1.ZodString;
591
+ createdAt: z$1.ZodDate;
592
+ updatedAt: z$1.ZodDate;
593
+ name: z$1.ZodString;
594
+ namespace: z$1.ZodString;
595
+ type: z$1.ZodEnum<{
596
+ folder: "folder";
597
+ file: "file";
598
+ }>;
599
+ subtype: z$1.ZodEnum<{
600
+ image: "image";
601
+ document: "document";
602
+ spreadsheet: "spreadsheet";
603
+ video: "video";
604
+ audio: "audio";
605
+ archive: "archive";
606
+ other: "other";
607
+ }>;
608
+ size: z$1.ZodNullable<z$1.ZodNumber>;
609
+ contentType: z$1.ZodNullable<z$1.ZodString>;
610
+ readonly: z$1.ZodBoolean;
611
+ hidden: z$1.ZodBoolean;
612
+ archivedAt: z$1.ZodNullable<z$1.ZodDate>;
613
+ parentId: z$1.ZodNullable<z$1.ZodString>;
614
+ links: z$1.ZodObject<{
615
+ view: z$1.ZodNullable<z$1.ZodString>;
616
+ download: z$1.ZodNullable<z$1.ZodString>;
617
+ preview: z$1.ZodNullable<z$1.ZodString>;
618
+ thumbnail: z$1.ZodNullable<z$1.ZodString>;
619
+ }, z$1.core.$strip>;
620
+ availability: z$1.ZodEnum<{
621
+ ready: "ready";
622
+ pending: "pending";
623
+ failed: "failed";
624
+ }>;
625
+ provider: z$1.ZodLiteral<"local">;
626
+ assetId: z$1.ZodNullable<z$1.ZodString>;
627
+ }, z$1.core.$strip>, Record<never, never>, Record<never, never>>;
628
+ /**
629
+ * Set readonly
630
+ */
631
+ setReadonly: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z$1.ZodObject<{
632
+ ids: z$1.ZodArray<z$1.ZodString>;
633
+ readonly: z$1.ZodBoolean;
634
+ }, z$1.core.$strip>, z$1.ZodArray<z$1.ZodObject<{
635
+ id: z$1.ZodString;
636
+ createdAt: z$1.ZodDate;
637
+ updatedAt: z$1.ZodDate;
638
+ name: z$1.ZodString;
639
+ namespace: z$1.ZodString;
640
+ type: z$1.ZodEnum<{
641
+ folder: "folder";
642
+ file: "file";
643
+ }>;
644
+ subtype: z$1.ZodEnum<{
645
+ image: "image";
646
+ document: "document";
647
+ spreadsheet: "spreadsheet";
648
+ video: "video";
649
+ audio: "audio";
650
+ archive: "archive";
651
+ other: "other";
652
+ }>;
653
+ size: z$1.ZodNullable<z$1.ZodNumber>;
654
+ contentType: z$1.ZodNullable<z$1.ZodString>;
655
+ readonly: z$1.ZodBoolean;
656
+ hidden: z$1.ZodBoolean;
657
+ archivedAt: z$1.ZodNullable<z$1.ZodDate>;
658
+ parentId: z$1.ZodNullable<z$1.ZodString>;
659
+ links: z$1.ZodObject<{
660
+ view: z$1.ZodNullable<z$1.ZodString>;
661
+ download: z$1.ZodNullable<z$1.ZodString>;
662
+ preview: z$1.ZodNullable<z$1.ZodString>;
663
+ thumbnail: z$1.ZodNullable<z$1.ZodString>;
664
+ }, z$1.core.$strip>;
665
+ availability: z$1.ZodEnum<{
666
+ ready: "ready";
667
+ pending: "pending";
668
+ failed: "failed";
669
+ }>;
670
+ provider: z$1.ZodLiteral<"local">;
671
+ assetId: z$1.ZodNullable<z$1.ZodString>;
672
+ }, z$1.core.$strip>>, Record<never, never>, Record<never, never>>;
673
+ /**
674
+ * Move node
675
+ */
676
+ moveNode: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z$1.ZodObject<{
677
+ id: z$1.ZodString;
678
+ parentId: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodString>>;
679
+ }, z$1.core.$strip>, z$1.ZodObject<{
680
+ id: z$1.ZodString;
681
+ createdAt: z$1.ZodDate;
682
+ updatedAt: z$1.ZodDate;
683
+ name: z$1.ZodString;
684
+ namespace: z$1.ZodString;
685
+ type: z$1.ZodEnum<{
686
+ folder: "folder";
687
+ file: "file";
688
+ }>;
689
+ subtype: z$1.ZodEnum<{
690
+ image: "image";
691
+ document: "document";
692
+ spreadsheet: "spreadsheet";
693
+ video: "video";
694
+ audio: "audio";
695
+ archive: "archive";
696
+ other: "other";
697
+ }>;
698
+ size: z$1.ZodNullable<z$1.ZodNumber>;
699
+ contentType: z$1.ZodNullable<z$1.ZodString>;
700
+ readonly: z$1.ZodBoolean;
701
+ hidden: z$1.ZodBoolean;
702
+ archivedAt: z$1.ZodNullable<z$1.ZodDate>;
703
+ parentId: z$1.ZodNullable<z$1.ZodString>;
704
+ links: z$1.ZodObject<{
705
+ view: z$1.ZodNullable<z$1.ZodString>;
706
+ download: z$1.ZodNullable<z$1.ZodString>;
707
+ preview: z$1.ZodNullable<z$1.ZodString>;
708
+ thumbnail: z$1.ZodNullable<z$1.ZodString>;
709
+ }, z$1.core.$strip>;
710
+ availability: z$1.ZodEnum<{
711
+ ready: "ready";
712
+ pending: "pending";
713
+ failed: "failed";
714
+ }>;
715
+ provider: z$1.ZodLiteral<"local">;
716
+ assetId: z$1.ZodNullable<z$1.ZodString>;
717
+ }, z$1.core.$strip>, Record<never, never>, Record<never, never>>;
718
+ /**
719
+ * Archive nodes
720
+ */
721
+ archiveNodes: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z$1.ZodObject<{
722
+ ids: z$1.ZodArray<z$1.ZodString>;
723
+ }, z$1.core.$strip>, z$1.ZodArray<z$1.ZodObject<{
724
+ id: z$1.ZodString;
725
+ createdAt: z$1.ZodDate;
726
+ updatedAt: z$1.ZodDate;
727
+ name: z$1.ZodString;
728
+ namespace: z$1.ZodString;
729
+ type: z$1.ZodEnum<{
730
+ folder: "folder";
731
+ file: "file";
732
+ }>;
733
+ subtype: z$1.ZodEnum<{
734
+ image: "image";
735
+ document: "document";
736
+ spreadsheet: "spreadsheet";
737
+ video: "video";
738
+ audio: "audio";
739
+ archive: "archive";
740
+ other: "other";
741
+ }>;
742
+ size: z$1.ZodNullable<z$1.ZodNumber>;
743
+ contentType: z$1.ZodNullable<z$1.ZodString>;
744
+ readonly: z$1.ZodBoolean;
745
+ hidden: z$1.ZodBoolean;
746
+ archivedAt: z$1.ZodNullable<z$1.ZodDate>;
747
+ parentId: z$1.ZodNullable<z$1.ZodString>;
748
+ links: z$1.ZodObject<{
749
+ view: z$1.ZodNullable<z$1.ZodString>;
750
+ download: z$1.ZodNullable<z$1.ZodString>;
751
+ preview: z$1.ZodNullable<z$1.ZodString>;
752
+ thumbnail: z$1.ZodNullable<z$1.ZodString>;
753
+ }, z$1.core.$strip>;
754
+ availability: z$1.ZodEnum<{
755
+ ready: "ready";
756
+ pending: "pending";
757
+ failed: "failed";
758
+ }>;
759
+ provider: z$1.ZodLiteral<"local">;
760
+ assetId: z$1.ZodNullable<z$1.ZodString>;
761
+ }, z$1.core.$strip>>, Record<never, never>, Record<never, never>>;
762
+ /**
763
+ * Restore nodes
764
+ */
765
+ restoreNodes: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z$1.ZodObject<{
766
+ ids: z$1.ZodArray<z$1.ZodString>;
767
+ }, z$1.core.$strip>, z$1.ZodArray<z$1.ZodObject<{
768
+ id: z$1.ZodString;
769
+ createdAt: z$1.ZodDate;
770
+ updatedAt: z$1.ZodDate;
771
+ name: z$1.ZodString;
772
+ namespace: z$1.ZodString;
773
+ type: z$1.ZodEnum<{
774
+ folder: "folder";
775
+ file: "file";
776
+ }>;
777
+ subtype: z$1.ZodEnum<{
778
+ image: "image";
779
+ document: "document";
780
+ spreadsheet: "spreadsheet";
781
+ video: "video";
782
+ audio: "audio";
783
+ archive: "archive";
784
+ other: "other";
785
+ }>;
786
+ size: z$1.ZodNullable<z$1.ZodNumber>;
787
+ contentType: z$1.ZodNullable<z$1.ZodString>;
788
+ readonly: z$1.ZodBoolean;
789
+ hidden: z$1.ZodBoolean;
790
+ archivedAt: z$1.ZodNullable<z$1.ZodDate>;
791
+ parentId: z$1.ZodNullable<z$1.ZodString>;
792
+ links: z$1.ZodObject<{
793
+ view: z$1.ZodNullable<z$1.ZodString>;
794
+ download: z$1.ZodNullable<z$1.ZodString>;
795
+ preview: z$1.ZodNullable<z$1.ZodString>;
796
+ thumbnail: z$1.ZodNullable<z$1.ZodString>;
797
+ }, z$1.core.$strip>;
798
+ availability: z$1.ZodEnum<{
799
+ ready: "ready";
800
+ pending: "pending";
801
+ failed: "failed";
802
+ }>;
803
+ provider: z$1.ZodLiteral<"local">;
804
+ assetId: z$1.ZodNullable<z$1.ZodString>;
805
+ }, z$1.core.$strip>>, Record<never, never>, Record<never, never>>;
806
+ /**
807
+ * Delete nodes
808
+ */
809
+ deleteNodes: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z$1.ZodObject<{
810
+ ids: z$1.ZodArray<z$1.ZodString>;
811
+ }, z$1.core.$strip>, z$1.ZodVoid, Record<never, never>, Record<never, never>>;
812
+ };
813
+ type LocalDriveRouterContractInputs = InferContractRouterInputs<typeof localDriveRouterContract>;
814
+ type LocalDriveRouterContractOutputs = InferContractRouterOutputs<typeof localDriveRouterContract>;
815
+ /**
816
+ * Create Drive base procedures
817
+ */
818
+ //#endregion
819
+ export { LocalDriveRouterContractInputs, LocalDriveRouterContractOutputs, localDriveRouterContract };