import { Conversation } from '@assetval/conversation'; import { Name } from '@assetval/name'; import mongoose, { HydratedDocument } from 'mongoose'; import { Task } from './Task.js'; import { z } from 'zod'; type EmployeeRoles = 'Admin' | 'I.T.' | 'Analyst' | 'Accounting' | 'Order Fulfillment' | 'Quality Assurance'; type VendorRoles = 'realtor' | 'tempRealtor'; type ClientRoles = 'client'; type AllRoles = EmployeeRoles | VendorRoles | ClientRoles; type UserWithRequiredFields = Omit, RequiredFields> & Required>; type RequiredFields = 'email' | 'name' | 'role' | 'profileStatus' | 'emailConfirmed' | 'email_lower' | 'password'; declare class User { name: Name; password?: string; email?: string; email_lower?: string; emailConfirmed: boolean; profileStatus?: 'FirstLogin' | 'Verified' | 'Employee' | 'New' | 'Basic' | 'Banned' | 'Declined' | 'Exp' | 'License' | 'Awaiting' | 'Deactivated' | 'Client' | 'New Password'; twoFactor: { enabled: boolean; hasBeenAuthenticated: boolean; }; imgDef: boolean; desc: string; birthday?: Date; gender: 'male' | 'female' | 'other' | 'undisclosed'; secondLanguage: 'None' | 'Spanish' | 'Portuguese' | 'Mandarin' | 'Cantonese' | 'Filipino' | 'German' | 'French' | 'Russian' | 'Hindi' | 'Yiddish'; groups: AllRoles; roleSwitching: boolean; hasMessages: boolean; availabilityStatus: boolean; accessLevel?: string; created: Date; updated: Date; inbox: Array; archived: Array; taskQueue: Array; lastLogin: Date; constructor(user?: Partial); /** These have to be kept in sync, so may as well make it a single setter */ set emails(email: string); get role(): string; } declare const UserSchema: mongoose.Schema & User & { _id: mongoose.Types.ObjectId; }, any>, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, User, mongoose.Document> & mongoose.FlatRecord & { _id: mongoose.Types.ObjectId; }>; declare const UserModel: mongoose.Model & User & { _id: mongoose.Types.ObjectId; }, any>; type UserDocument = HydratedDocument; declare const UserValidationSchema: z.ZodObject<{ name: z.ZodObject<{ first: z.ZodString; middle: z.ZodOptional; last: z.ZodString; nickname: z.ZodString; fullNameLegal: z.ZodOptional; }, "strip", z.ZodTypeAny, { first: string; last: string; nickname: string; middle?: string | undefined; fullNameLegal?: string | undefined; }, { first: string; last: string; nickname: string; middle?: string | undefined; fullNameLegal?: string | undefined; }>; password: z.ZodString; email: z.ZodString; email_lower: z.ZodString; phone: z.ZodString; phoneExt: z.ZodString; phoneNumber: z.ZodString; phoneType: z.ZodUnion<[z.ZodLiteral<"home">, z.ZodLiteral<"cell">, z.ZodLiteral<"brokerage">]>; profileStatus: z.ZodUnion<[z.ZodLiteral<"FirstLogin">, z.ZodLiteral<"Verified">, z.ZodLiteral<"Employee">, z.ZodLiteral<"New">, z.ZodLiteral<"Basic">, z.ZodLiteral<"Banned">, z.ZodLiteral<"Declined">, z.ZodLiteral<"Exp">, z.ZodLiteral<"License">, z.ZodLiteral<"Awaiting">, z.ZodLiteral<"Deactivated">, z.ZodLiteral<"Client">, z.ZodLiteral<"New Password">]>; twoFactor: z.ZodObject<{ enabled: z.ZodBoolean; hasBeenAuthenticated: z.ZodBoolean; }, "strip", z.ZodTypeAny, { enabled: boolean; hasBeenAuthenticated: boolean; }, { enabled: boolean; hasBeenAuthenticated: boolean; }>; availabilityStatus: z.ZodBoolean; imgDef: z.ZodBoolean; desc: z.ZodString; birthday: z.ZodString; gender: z.ZodUnion<[z.ZodLiteral<"male">, z.ZodLiteral<"female">, z.ZodLiteral<"other">, z.ZodLiteral<"undisclosed">]>; secondLanguage: z.ZodString; groups: z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"Admin">, z.ZodLiteral<"I.T.">, z.ZodLiteral<"Analyst">, z.ZodLiteral<"Accounting">, z.ZodLiteral<"Order Fulfillment">, z.ZodLiteral<"Quality Assurance">]>, z.ZodUnion<[z.ZodLiteral<"realtor">, z.ZodLiteral<"tempRealtor">]>, z.ZodLiteral<"client">]>; roleSwitching: z.ZodBoolean; hasMessages: z.ZodBoolean; emailConfirmed: z.ZodBoolean; accessLevel: z.ZodString; created: z.ZodDate; updated: z.ZodDate; lastLogin: z.ZodDate; inbox: z.ZodArray; }, "strip", z.ZodTypeAny, { _id: mongoose.Types.ObjectId; }, { _id: mongoose.Types.ObjectId; }>, "many">; archived: z.ZodArray; }, "strip", z.ZodTypeAny, { _id: mongoose.Types.ObjectId; }, { _id: mongoose.Types.ObjectId; }>, "many">; taskQueue: z.ZodArray; last: z.ZodString; nickname: z.ZodString; fullNameLegal: z.ZodOptional; }, "strip", z.ZodTypeAny, { first: string; last: string; nickname: string; middle?: string | undefined; fullNameLegal?: string | undefined; }, { first: string; last: string; nickname: string; middle?: string | undefined; fullNameLegal?: string | undefined; }>; hasImg: z.ZodBoolean; user: z.ZodType; }, "strip", z.ZodTypeAny, { name: { first: string; last: string; nickname: string; middle?: string | undefined; fullNameLegal?: string | undefined; }; hasImg: boolean; user: mongoose.Types.ObjectId; }, { name: { first: string; last: string; nickname: string; middle?: string | undefined; fullNameLegal?: string | undefined; }; hasImg: boolean; user: mongoose.Types.ObjectId; }>; timestamp: z.ZodDate; status: z.ZodObject<{ read: z.ZodBoolean; urgent: z.ZodBoolean; }, "strip", z.ZodTypeAny, { read: boolean; urgent: boolean; }, { read: boolean; urgent: boolean; }>; title: z.ZodString; description: z.ZodString; category: z.ZodString; url: z.ZodString; }, "strip", z.ZodTypeAny, { author: { name: { first: string; last: string; nickname: string; middle?: string | undefined; fullNameLegal?: string | undefined; }; hasImg: boolean; user: mongoose.Types.ObjectId; }; timestamp: Date; status: { read: boolean; urgent: boolean; }; title: string; description: string; category: string; url: string; }, { author: { name: { first: string; last: string; nickname: string; middle?: string | undefined; fullNameLegal?: string | undefined; }; hasImg: boolean; user: mongoose.Types.ObjectId; }; timestamp: Date; status: { read: boolean; urgent: boolean; }; title: string; description: string; category: string; url: string; }>, "many">; role: z.ZodUnion<[z.ZodLiteral<"I.T. / Dev Team Staff">, z.ZodLiteral<"Client">, z.ZodLiteral<"Vendor">, z.ZodLiteral<"Registering Vendor">, z.ZodLiteral<"AssetVal Employee">, z.ZodString]>; }, "strip", z.ZodTypeAny, { desc: string; name: { first: string; last: string; nickname: string; middle?: string | undefined; fullNameLegal?: string | undefined; }; email: string; role: string; profileStatus: "FirstLogin" | "Verified" | "Employee" | "New" | "Basic" | "Banned" | "Declined" | "Exp" | "License" | "Awaiting" | "Deactivated" | "Client" | "New Password"; emailConfirmed: boolean; email_lower: string; password: string; twoFactor: { enabled: boolean; hasBeenAuthenticated: boolean; }; imgDef: boolean; birthday: string; gender: "undisclosed" | "male" | "female" | "other"; secondLanguage: string; groups: "Admin" | "I.T." | "Analyst" | "Accounting" | "Order Fulfillment" | "Quality Assurance" | "realtor" | "tempRealtor" | "client"; roleSwitching: boolean; hasMessages: boolean; availabilityStatus: boolean; accessLevel: string; created: Date; updated: Date; inbox: { _id: mongoose.Types.ObjectId; }[]; archived: { _id: mongoose.Types.ObjectId; }[]; taskQueue: { author: { name: { first: string; last: string; nickname: string; middle?: string | undefined; fullNameLegal?: string | undefined; }; hasImg: boolean; user: mongoose.Types.ObjectId; }; timestamp: Date; status: { read: boolean; urgent: boolean; }; title: string; description: string; category: string; url: string; }[]; lastLogin: Date; phone: string; phoneExt: string; phoneNumber: string; phoneType: "home" | "cell" | "brokerage"; }, { desc: string; name: { first: string; last: string; nickname: string; middle?: string | undefined; fullNameLegal?: string | undefined; }; email: string; role: string; profileStatus: "FirstLogin" | "Verified" | "Employee" | "New" | "Basic" | "Banned" | "Declined" | "Exp" | "License" | "Awaiting" | "Deactivated" | "Client" | "New Password"; emailConfirmed: boolean; email_lower: string; password: string; twoFactor: { enabled: boolean; hasBeenAuthenticated: boolean; }; imgDef: boolean; birthday: string; gender: "undisclosed" | "male" | "female" | "other"; secondLanguage: string; groups: "Admin" | "I.T." | "Analyst" | "Accounting" | "Order Fulfillment" | "Quality Assurance" | "realtor" | "tempRealtor" | "client"; roleSwitching: boolean; hasMessages: boolean; availabilityStatus: boolean; accessLevel: string; created: Date; updated: Date; inbox: { _id: mongoose.Types.ObjectId; }[]; archived: { _id: mongoose.Types.ObjectId; }[]; taskQueue: { author: { name: { first: string; last: string; nickname: string; middle?: string | undefined; fullNameLegal?: string | undefined; }; hasImg: boolean; user: mongoose.Types.ObjectId; }; timestamp: Date; status: { read: boolean; urgent: boolean; }; title: string; description: string; category: string; url: string; }[]; lastLogin: Date; phone: string; phoneExt: string; phoneNumber: string; phoneType: "home" | "cell" | "brokerage"; }>; export { type AllRoles, type ClientRoles, type EmployeeRoles, User, type UserDocument, UserModel, UserSchema, UserValidationSchema, type UserWithRequiredFields, type VendorRoles };