added encryption
This commit is contained in:
@@ -84,12 +84,20 @@ export async function updateUserProfile(
|
||||
// ENTRY ENDPOINTS
|
||||
// ============================================
|
||||
|
||||
export interface EncryptionMetadata {
|
||||
encrypted: boolean
|
||||
ciphertext?: string // Base64-encoded encrypted content
|
||||
nonce?: string // Base64-encoded nonce
|
||||
algorithm?: string // e.g., "XSalsa20-Poly1305"
|
||||
}
|
||||
|
||||
export interface JournalEntryCreate {
|
||||
title: string
|
||||
content: string
|
||||
title?: string // Optional if encrypted
|
||||
content?: string // Optional if encrypted
|
||||
mood?: string
|
||||
tags?: string[]
|
||||
isPublic?: boolean
|
||||
encryption?: EncryptionMetadata
|
||||
}
|
||||
|
||||
export interface JournalEntry extends JournalEntryCreate {
|
||||
@@ -97,6 +105,8 @@ export interface JournalEntry extends JournalEntryCreate {
|
||||
userId: string
|
||||
createdAt: string
|
||||
updatedAt: string
|
||||
entryDate?: string
|
||||
encryption?: EncryptionMetadata
|
||||
}
|
||||
|
||||
export async function createEntry(
|
||||
|
||||
Reference in New Issue
Block a user