/**
 * 私密消息解锁响应
 */
import { z } from "zod";

export const UnlockPrivateReasonSchema = z.enum([
  "ok",
  "quota_exceeded",
  "not_private",
  "not_found",
]);

export const UnlockPrivateResponseSchema = z.object({
  unlocked: z.boolean(),
  content: z.string().nullable(),
  showUpgrade: z.boolean().default(false),
  paywallTriggered: z.boolean().default(false),
  privateFreeLimit: z.number().default(0),
  privateUsedToday: z.number().default(0),
  reason: UnlockPrivateReasonSchema,
});

export type UnlockPrivateReason = z.output<typeof UnlockPrivateReasonSchema>;
export type UnlockPrivateResponseInput = z.input<
  typeof UnlockPrivateResponseSchema
>;
export type UnlockPrivateResponseData = z.output<
  typeof UnlockPrivateResponseSchema
>;
