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

import { ChatLockTypeSchema } from "../chat_lock_type";

export const UnlockPrivateRequestSchema = z
  .object({
    messageId: z.string().min(1).optional(),
    lockType: ChatLockTypeSchema.optional(),
    clientLockId: z.string().min(1).optional(),
  })
  .refine((value) => value.messageId || value.lockType, {
    message: "messageId or lockType is required",
  });

export type UnlockPrivateRequestInput = z.input<
  typeof UnlockPrivateRequestSchema
>;
export type UnlockPrivateRequestData = z.output<
  typeof UnlockPrivateRequestSchema
>;
