feat(chat): sync multi-role backend APIs
This commit is contained in:
@@ -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>;
|
||||
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user