import { Schema } from "mongoose"; import { EnumMap, IJson, IDocument, IObject, IInstance, IModel, IAction, IActionTypes, ISettings, MiscInfo } from "@onebro/oba-common"; export declare enum EnginamorUserProfileStatuses { N = "New", S = "Saved", Y = "Sent", Z = "Seen/Read", A = "Accepted", D = "Declined", R = "Revised", E = "Expired", C = "Cancelled" } export declare type EnginamorUserProfileStatus = keyof typeof EnginamorUserProfileStatuses; export declare enum EnginamorRoles { G = "GUEST", U = "USER", A = "ADMIN", S = "SUPER", SA = "SYSADMIN" } export declare type EnginamorRole = keyof typeof EnginamorRoles; export declare type EnginamorExperienceLevel = "novice" | "beginner" | "intermediate" | "advanced" | "expert"; export declare type EnginamorUserProfileConfig = { username: string; role: EnginamorRole; settings: ISettings<"location" | "cookies">; img?: string; }; export declare type EnginamorUserProfileType = IObject & EnginamorUserProfileConfig & { bio: string; motto: string; socials?: MiscInfo; stats?: MiscInfo; expYrs?: number; expLvl?: EnginamorExperienceLevel; rating?: number; followers?: EnginamorUserProfile[]; following?: EnginamorUserProfile[]; }; export interface EnginamorUserProfileDocument extends IDocument, EnginamorUserProfileType { lang: string; } export interface EnginamorUserProfile extends IInstance, EnginamorUserProfileDocument { following: EnginamorUserProfile[]; followers: EnginamorUserProfile[]; preview(): EnginamorUserProfilePreview; follow(o: any): Promise; unfollow(o: any): Promise; rate(o: any): Promise; invite(o: any): Promise; respond(o: any): Promise; } export interface EnginamorUserProfileModel extends IModel { } export declare type EnginamorUSerProfilePublicKeys = "username" | "bio" | "motto" | "expYrs" | "expLvl" | "rating" | "settings" | "img" | "socials" | "lang"; export declare type EnginamorUSerProfilePublicData = Pick; export declare type EnginamorUserProfilePreview = Pick & { role: EnginamorRoles; }; export declare type EnginamorUserProfileJson = IJson & EnginamorUSerProfilePublicData & { role: EnginamorRoles; memberSince: Date; followers: EnginamorUserProfilePreview[]; following: EnginamorUserProfilePreview[]; }; export declare type EnginamorUserProfileModelMap = { EnginamorUserProfile: EnginamorUserProfileModel; }; export declare type EnginamorUserProfileInstanceMap = { profile: EnginamorUserProfile; }; export declare type EnginamorUserProfileSchemaMap = { profile: Schema; }; export declare type EnginamorUserProfileActionTypes = IActionTypes | "fetchByUsername$"; export declare type EnginamorUserProfileActions = EnumMap; export declare type EnginamorUserProfileUpdateFollowersOrFollowing = Partial<{ addFollowers?: string[]; removeFollowers?: string[]; addFollowing?: string[]; removeFollowing?: string[]; }>;