mirror of
https://github.com/kmc7468/arkvault.git
synced 2026-02-04 08:06:56 +00:00
31 lines
822 B
TypeScript
31 lines
822 B
TypeScript
import type { Generated } from "kysely";
|
|
import type { Ciphertext } from "./utils";
|
|
|
|
export interface UploadSessionTable {
|
|
id: string;
|
|
type: "file" | "thumbnail" | "migration";
|
|
user_id: number;
|
|
path: string;
|
|
bitmap: Buffer;
|
|
total_chunks: number;
|
|
uploaded_chunks: Generated<number>;
|
|
expires_at: Date;
|
|
|
|
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;
|
|
file_id: number | null;
|
|
}
|
|
|
|
declare module "./index" {
|
|
interface Database {
|
|
upload_session: UploadSessionTable;
|
|
}
|
|
}
|