import { Schema } from "mongoose"; import { EnumMap, IJson, IDocument, IObject, IInstance, IModel, IAction, IActionTypes, ISettings, MiscInfo } from "@onebro/oba-common"; export declare enum CnDUserProfileStatuses { N = "New", S = "Saved", Y = "Sent", Z = "Seen/Read", A = "Accepted", D = "Declined", R = "Revised", E = "Expired", C = "Cancelled" } export declare type CnDUserProfileStatus = keyof typeof CnDUserProfileStatuses; export declare enum CnDRoles { G = "GUEST", U = "USER", A = "ADMIN", S = "SUPER", SA = "SYSADMIN" } export declare type CnDRole = keyof typeof CnDRoles; export declare type CnDExperienceLevel = "novice" | "beginner" | "intermediate" | "advanced" | "expert"; export declare type CnDUserProfileConfig = { username: string; role: CnDRole; settings: ISettings<"location" | "cookies">; img?: string; }; export declare type CnDUserProfileType = IObject & CnDUserProfileConfig & { bio: string; motto: string; socials?: MiscInfo; stats?: MiscInfo; expYrs?: number; expLvl?: CnDExperienceLevel; rating?: number; followers?: CnDUserProfile[]; following?: CnDUserProfile[]; }; export interface CnDUserProfileDocument extends IDocument, CnDUserProfileType { lang: string; } export interface CnDUserProfile extends IInstance, CnDUserProfileDocument { following: CnDUserProfile[]; followers: CnDUserProfile[]; preview(): CnDUserProfilePreview; follow(o: any): Promise; unfollow(o: any): Promise; rate(o: any): Promise; invite(o: any): Promise; respond(o: any): Promise; } export interface CnDUserProfileModel extends IModel { } export declare type CnDUSerProfilePublicKeys = "username" | "bio" | "motto" | "expYrs" | "expLvl" | "rating" | "settings" | "img" | "socials" | "lang"; export declare type CnDUSerProfilePublicData = Pick; export declare type CnDUserProfilePreview = Pick & { role: CnDRoles; }; export declare type CnDUserProfileJson = IJson & CnDUSerProfilePublicData & { role: CnDRoles; memberSince: Date; followers: CnDUserProfilePreview[]; following: CnDUserProfilePreview[]; }; export declare type CnDUserProfileModelMap = { CnDUserProfile: CnDUserProfileModel; }; export declare type CnDUserProfileInstanceMap = { profile: CnDUserProfile; }; export declare type CnDUserProfileSchemaMap = { profile: Schema; }; export declare type CnDUserProfileActionTypes = IActionTypes | "fetchByUsername$"; export declare type CnDUserProfileActions = EnumMap; export declare type CnDUserProfileUpdateFollowersOrFollowing = Partial<{ addFollowers?: string[]; removeFollowers?: string[]; addFollowing?: string[]; removeFollowing?: string[]; }>;