import { ObjectID } from 'bson'; import mongoose from 'mongoose'; import { UserLevel } from '../constants'; import { IRating } from './rating'; import { IServiceLocation } from './serviceLocation'; import { ITelephone } from './telephone'; export interface IUser { _id: ObjectID; externalUserId: string; externalProvider: string; username?: string; email?: string; name?: string; kycValidated?: number; kycToken?: string; kycApplicationId?: string; myReferralCode?: string; referrerCode?: string; plsBalance?: number; biography?: string; profilePicture?: string; level: UserLevel; rating: IRating; website?: string; phone?: ITelephone; address?: IServiceLocation; isTravelPlanner: boolean; travelPlanningPricePerDay: number; travelPlanningLocations: IServiceLocation[]; languages: string[]; whitelistedIcoAddresses: string[]; createdAt: Date; updatedAt: Date; __v?: number; } /** * We have this interface with just email because * an anonymous user can just add and email and call it a day * in that case we need to allow him to book trips */ export interface IUserWithEmail extends IUser { email: string; } export interface IAuthUser extends IUser { username: string; email: string; myReferralCode: string; level: Exclude; } export interface IUserDocument extends mongoose.Document, IUser { _id: ObjectID; } declare const user: mongoose.Schema; export default user; //# sourceMappingURL=user.d.ts.map