feat(chat): add promotional external entry flow

This commit is contained in:
2026-07-13 12:43:18 +08:00
parent e5ee9940ca
commit 3752b3b729
44 changed files with 1623 additions and 190 deletions
@@ -21,6 +21,7 @@ import type {
UnlockPrivateResponse,
} from "@/data/dto/chat";
import type { ChatLockDetailData } from "@/data/schemas/chat";
import type { ChatImageData, ChatLockType } from "@/data/schemas/chat";
import type { LocalChatMediaRow } from "@/data/storage/chat";
export interface ChatMediaLookupInput {
@@ -35,9 +36,16 @@ export interface CacheRemoteChatMediaInput extends ChatMediaLookupInput {
export interface UnlockedPrivateMessageLocalPatch {
lockDetail?: ChatLockDetailData;
audioUrl?: string | null;
image?: ChatImageData;
content?: string;
}
export interface UnlockPrivateMessageInput {
messageId?: string;
lockType?: ChatLockType;
clientLockId?: string;
}
export interface IChatRepository {
/** 发送一条消息。 */
sendMessage(
@@ -49,7 +57,9 @@ export interface IChatRepository {
getHistory(limit?: number, offset?: number): Promise<Result<ChatHistoryResponse>>;
/** 解锁单条历史付费 / 私密消息。 */
unlockPrivateMessage(messageId: string): Promise<Result<UnlockPrivateResponse>>;
unlockPrivateMessage(
input: UnlockPrivateMessageInput,
): Promise<Result<UnlockPrivateResponse>>;
/** 一键解锁历史锁定消息。 */
unlockHistory(): Promise<Result<UnlockHistoryResponse>>;