/**
 * 聊天历史响应
 * 
 */
import { z } from "zod";

import {
  arrayOrEmpty,
  booleanOrFalse,
  numberOrZero,
} from "../../nullable-defaults";
import { ChatMessageSchema } from "../chat_message";

export const ChatHistoryResponseSchema = z.object({
  messages: arrayOrEmpty(ChatMessageSchema),
  total: numberOrZero,
  limit: numberOrZero,
  offset: numberOrZero,
  isVip: booleanOrFalse,
  privateFreeLimit: numberOrZero,
  privateUsedToday: numberOrZero,
  privateCanViewFree: booleanOrFalse,
});

export type ChatHistoryResponseInput = z.input<typeof ChatHistoryResponseSchema>;
export type ChatHistoryResponseData = z.output<typeof ChatHistoryResponseSchema>;
