feat(chat): sync multi-role backend APIs

This commit is contained in:
2026-07-20 11:29:54 +08:00
parent 16b5c16e76
commit b6fdc912ae
84 changed files with 1488 additions and 439 deletions
@@ -0,0 +1,21 @@
import { z } from "zod";
import { arrayOrEmpty } from "../../nullable-defaults";
import { ChatMessageSchema } from "../chat_message";
export const ChatPreviewItemSchema = z
.object({
characterId: z.string().min(1),
message: ChatMessageSchema.nullable().default(null),
})
.readonly();
export const ChatPreviewsResponseSchema = z
.object({
items: arrayOrEmpty(ChatPreviewItemSchema),
})
.readonly();
export type ChatPreviewItem = z.output<typeof ChatPreviewItemSchema>;
export type ChatPreviewsResponseInput = z.input<typeof ChatPreviewsResponseSchema>;
export type ChatPreviewsResponse = z.output<typeof ChatPreviewsResponseSchema>;
+1
View File
@@ -3,6 +3,7 @@
*/
export * from "./chat_history_response";
export * from "./chat_previews_response";
export * from "./chat_send_response";
export * from "./unlock_history_response";
export * from "./unlock_private_response";