refactor(data): replace schema classes with readonly models
This commit is contained in:
@@ -4,18 +4,19 @@
|
||||
* 聚合聊天远程操作、身份隔离的本地历史,以及媒体缓存能力。
|
||||
*/
|
||||
|
||||
import type { Result } from "@/utils/result";
|
||||
import type {
|
||||
ChatHistoryResponse,
|
||||
ChatImageData,
|
||||
ChatLockDetailData,
|
||||
ChatLockType,
|
||||
ChatMediaKind,
|
||||
ChatMessage,
|
||||
ChatSendResponse,
|
||||
UnlockHistoryResponse,
|
||||
UnlockPrivateResponse,
|
||||
} from "@/data/schemas/chat";
|
||||
import type { ChatLockDetailData } from "@/data/schemas/chat";
|
||||
import type { ChatImageData, ChatLockType } from "@/data/schemas/chat";
|
||||
import type { LocalChatMediaRow } from "@/data/storage/chat";
|
||||
import type { Result } from "@/utils/result";
|
||||
|
||||
export interface ChatMediaLookupInput {
|
||||
characterId: string;
|
||||
@@ -84,7 +85,9 @@ export interface IChatRepository {
|
||||
): Promise<Result<void>>;
|
||||
|
||||
/** 读取所有本地消息,按 dbId 升序。 */
|
||||
getLocalMessages(cacheIdentity?: string): Promise<Result<ChatMessage[]>>;
|
||||
getLocalMessages(
|
||||
cacheIdentity?: string,
|
||||
): Promise<Result<readonly ChatMessage[]>>;
|
||||
|
||||
/** 清空本地消息。 */
|
||||
clearLocalMessages(cacheIdentity?: string): Promise<Result<void>>;
|
||||
|
||||
Reference in New Issue
Block a user