mirror of
https://github.com/kmc7468/arkvault.git
synced 2026-11-04 08:10:28 +09:00
/api/file/upload, /api/file/[id], /api/file/[id]/download Endpoint 구현
This commit is contained in:
1 parent
034593804f
commit
a62d44038a
21 files changed
+298
-11
No files matched your search
@@ -0,0 +1,22 @@
|
||||
import { z } from "zod";
|
||||
|
||||
export const fileInfoResponse = z.object({
|
||||
createdAt: z.date(),
|
||||
mekVersion: z.number().int().positive(),
|
||||
dek: z.string().base64().nonempty(),
|
||||
contentIv: z.string().base64().nonempty(),
|
||||
name: z.string().base64().nonempty(),
|
||||
nameIv: z.string().base64().nonempty(),
|
||||
});
|
||||
export type FileInfoResponse = z.infer<typeof fileInfoResponse>;
|
||||
|
||||
export const fileUploadRequest = z.object({
|
||||
parentId: z.union([z.enum(["root"]), z.number().int().positive()]),
|
||||
mekVersion: z.number().int().positive(),
|
||||
dek: z.string().base64().nonempty(),
|
||||
contentHash: z.string().base64().nonempty(),
|
||||
contentIv: z.string().base64().nonempty(),
|
||||
name: z.string().base64().nonempty(),
|
||||
nameIv: z.string().base64().nonempty(),
|
||||
});
|
||||
export type FileUploadRequest = z.infer<typeof fileUploadRequest>;
|
||||
@@ -1,4 +1,5 @@
|
||||
export * from "./auth";
|
||||
export * from "./client";
|
||||
export * from "./directory";
|
||||
export * from "./file";
|
||||
export * from "./mek";
|
||||
Reference in new issue
Block a user