mirror of
https://github.com/kmc7468/arkvault.git
synced 2026-02-03 23:56:53 +00:00
33 lines
835 B
TypeScript
33 lines
835 B
TypeScript
import type { Generated } from "kysely";
|
|
import type { Ciphertext } from "./utils";
|
|
|
|
interface UploadSessionTable {
|
|
id: string;
|
|
type: "file" | "thumbnail";
|
|
user_id: number;
|
|
path: string;
|
|
total_chunks: number;
|
|
uploaded_chunks: Generated<number[]>;
|
|
expires_at: Date;
|
|
|
|
// For file uploads
|
|
parent_id: number | null;
|
|
master_encryption_key_version: number | null;
|
|
encrypted_data_encryption_key: string | null; // Base64
|
|
data_encryption_key_version: Date | null;
|
|
hmac_secret_key_version: number | null;
|
|
content_type: string | null;
|
|
encrypted_name: Ciphertext | null;
|
|
encrypted_created_at: Ciphertext | null;
|
|
encrypted_last_modified_at: Ciphertext | null;
|
|
|
|
// For thumbnail uploads
|
|
file_id: number | null;
|
|
}
|
|
|
|
declare module "./index" {
|
|
interface Database {
|
|
upload_session: UploadSessionTable;
|
|
}
|
|
}
|