/**
 * 游客登录响应
 * 
 */
import { z } from "zod";

import { booleanOrTrue, numberOr, schemaOrNull } from "../../nullable-defaults";
import { UserSchema } from "../../user/user";

export const GuestLoginResponseSchema = z.object({
  token: z.string(),
  deviceId: z.string(),
  userId: z.string(),
  isDeviceUser: booleanOrTrue,
  expiresIn: numberOr(2592000),
  user: schemaOrNull(UserSchema),
});

export type GuestLoginResponseInput = z.input<typeof GuestLoginResponseSchema>;
export type GuestLoginResponseData = z.output<typeof GuestLoginResponseSchema>;
