/**
 * 私密消息解锁响应
 */
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(),
  paywallTriggered: z.boolean(),
  privateFreeLimit: z.number(),
  privateUsedToday: z.number(),
  reason: UnlockPrivateReasonSchema,
});

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