import { LogInstance } from 'larvitutils'; import { UserLib } from './index'; export type UserBaseOptions = { userInstance: UserLib; log: LogInstance; uuid: string; username: string; inactive?: boolean; passwordIsFalse: boolean; created?: Date; updated?: Date; fields?: Record; }; export declare class UserBase { private userInstance; private log; uuid: string; username: string; inactive?: boolean; passwordIsFalse: boolean; created?: Date; updated?: Date; fields: Record; constructor(options: UserBaseOptions); /** * Add a field with value * * @param {string} name - * @param {string} value - * @returns {Promise} - */ addField(name: string, value: string | string[]): Promise; /** * Adds one or more fields with values to the user object. Does not overwrite existing values. It is possible to add the same value multiple times * * @param {object} fields - field name as key, field values as array to that key - ex: {'role': ['admin','user']} * @returns {Promise} - */ addFields(fields: Record): Promise; /** * Replace all fields * IMPORTANT!!! Will clear all data not given in the fields parameter * * @param {object} fields - field name as key, field values as array to that key - ex: {'role': ['admin','user']} * @returns {Promise} - */ replaceFields(fields: Record): Promise; rm(): Promise; /** * Remove a field from this user * * @param {string} name - * @returns {Promise} - */ rmField(name: string): Promise; setPassword(newPassword: string): Promise; setUsername(newUsername: string): Promise; setInactive(inactive: boolean): Promise; } //# sourceMappingURL=userBase.d.ts.map