UNPKG

@replyke/core

Version:

Replyke: Build interactive apps with social features like comments, votes, feeds, user lists, notifications, and more.

43 lines (42 loc) 1.26 kB
import { File } from "./File"; export type UserRole = "admin" | "moderator" | "visitor"; export type UserFull = { id: string; projectId: string; foreignId: string | null; role: UserRole; email: string | null; name: string | null; username: string | null; avatar: string | null; avatarFileId: string | null; bannerFileId: string | null; avatarFile?: File | null; bannerFile?: File | null; bio: string | null; birthdate: Date | null; location: { type: "Point"; coordinates: [number, number]; } | null; metadata: Record<string, any>; secureMetadata: Record<string, any>; reputation: number; isVerified: boolean; isActive: boolean; lastActive: Date; createdAt: Date; updatedAt: Date; }; export type AuthUser = Omit<UserFull, "secureMetadata"> & { suspensions: { reason: string | null; startDate: Date; endDate: Date | null; }[]; authMethods: string[]; }; export type User = Omit<UserFull, "email" | "secureMetadata" | "isVerified" | "isActive" | "lastActive" | "updatedAt">; export type UserInclude = "files"; export type UserIncludeArray = UserInclude[]; export type UserIncludeParam = string | UserIncludeArray;