fix(chat): update unlock response contract

This commit is contained in:
2026-06-30 18:15:39 +08:00
parent bfc2c3cc1e
commit 5f94105bc6
7 changed files with 130 additions and 30 deletions
@@ -20,6 +20,7 @@ import type {
UnlockHistoryResponse,
UnlockPrivateResponse,
} from "@/data/dto/chat";
import type { ChatLockDetailData } from "@/data/schemas/chat";
import type { LocalChatMediaRow } from "@/data/storage/chat";
export interface ChatMediaLookupInput {
@@ -41,18 +42,17 @@ export interface IChatRepository {
/** 获取聊天历史,分页参数默认 limit=50, offset=0。 */
getHistory(limit?: number, offset?: number): Promise<Result<ChatHistoryResponse>>;
//TODO remove
/** 解锁私密消息。 */
/** 解锁单条历史付费 / 私密消息。 */
unlockPrivateMessage(messageId: string): Promise<Result<UnlockPrivateResponse>>;
/** 一键解锁历史锁定消息。 */
unlockHistory(): Promise<Result<UnlockHistoryResponse>>;
//TODO remove
/** 把本地缓存中的私密消息标记为已解锁。 */
/** 把本地缓存中的单条锁定消息标记为已解锁。 */
markPrivateMessageUnlockedInLocal(
messageId: string,
content: string,
lockDetail?: ChatLockDetailData,
): Promise<Result<void>>;
/** 把一条消息写入本地存储。 */