Spaces:
Runtime error
Runtime error
File size: 909 Bytes
fb38ec5 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | import { z } from "zod";
const FileUploadRequest = z.object({
file: z.any().describe("The file to upload (binary) or URL string to download from"),
path: z.string().optional().describe("Path to the file in the storage system"),
});
const FileDetails = z.object({
path: z.string().describe("Path to the file in the storage system"),
size: z.number().describe("Size of the file in bytes"),
lastModified: z.string().datetime().describe("Timestamp when the file was last updated"),
});
const MultipleFiles = z.object({
data: z.array(FileDetails).describe("Array of files for the current page"),
});
export type FileDetails = z.infer<typeof FileDetails>;
export type MultipleFiles = z.infer<typeof MultipleFiles>;
export type FileUploadRequest = z.infer<typeof FileUploadRequest>;
export const filesSchemas = {
FileUploadRequest,
FileDetails,
MultipleFiles,
};
export default filesSchemas;
|