import { Model } from 'sequelize-typescript';
import { MMyUserFormattable, MUser, MUserDefault, MUserFormattable, MUserNotifSettingChannelDefault, MUserWithNotificationSetting } from '../../types/models';
import { AttributesOnly } from '../../../shared/typescript-utils';
import { MyUser, UserRight } from '../../../shared/models';
import { User } from '../../../shared/models/users';
import { UserAdminFlag } from '../../../shared/models/users/user-flag.model';
import { NSFWPolicyType } from '../../../shared/models/videos/nsfw-policy.type';
import { AccountModel } from '../account/account';
import { OAuthTokenModel } from '../oauth/oauth-token';
import { VideoImportModel } from '../video/video-import';
import { UserNotificationSettingModel } from './user-notification-setting';
export declare class UserModel extends Model<Partial<AttributesOnly<UserModel>>> {
    password: string;
    username: string;
    email: string;
    pendingEmail: string;
    emailVerified: boolean;
    nsfwPolicy: NSFWPolicyType;
    p2pEnabled: boolean;
    videosHistoryEnabled: boolean;
    autoPlayVideo: boolean;
    autoPlayNextVideo: boolean;
    autoPlayNextVideoPlaylist: boolean;
    videoLanguages: string[];
    adminFlags?: UserAdminFlag;
    blocked: boolean;
    blockedReason: string;
    role: number;
    videoQuota: number;
    videoQuotaDaily: number;
    theme: string;
    noInstanceConfigWarningModal: boolean;
    noWelcomeModal: boolean;
    noAccountSetupWarningModal: boolean;
    pluginAuth: string;
    feedToken: string;
    lastLoginDate: Date;
    otpSecret: string;
    createdAt: Date;
    updatedAt: Date;
    Account: AccountModel;
    NotificationSetting: UserNotificationSettingModel;
    VideoImports: VideoImportModel[];
    OAuthTokens: OAuthTokenModel[];
    static cryptPasswordIfNeeded(instance: UserModel): Promise<any>;
    static removeTokenCache(instance: UserModel): void;
    static countTotal(): Promise<number>;
    static listForAdminApi(parameters: {
        start: number;
        count: number;
        sort: string;
        search?: string;
        blocked?: boolean;
    }): Promise<{
        total: number;
        data: UserModel[];
    }>;
    static listWithRight(right: UserRight): Promise<MUserDefault[]>;
    static listUserSubscribersOf(actorId: number): Promise<MUserWithNotificationSetting[]>;
    static listByUsernames(usernames: string[]): Promise<MUserDefault[]>;
    static loadById(id: number): Promise<MUser>;
    static loadByIdFull(id: number): Promise<MUserDefault>;
    static loadByIdWithChannels(id: number, withStats?: boolean): Promise<MUserDefault>;
    static loadByUsername(username: string): Promise<MUserDefault>;
    static loadForMeAPI(id: number): Promise<MUserNotifSettingChannelDefault>;
    static loadByEmail(email: string): Promise<MUserDefault>;
    static loadByUsernameOrEmail(username: string, email?: string): Promise<MUserDefault>;
    static loadByVideoId(videoId: number): Promise<MUserDefault>;
    static loadByVideoImportId(videoImportId: number): Promise<MUserDefault>;
    static loadByChannelActorId(videoChannelActorId: number): Promise<MUserDefault>;
    static loadByAccountActorId(accountActorId: number): Promise<MUserDefault>;
    static loadByLiveId(liveId: number): Promise<MUser>;
    static generateUserQuotaBaseSQL(options: {
        whereUserId: '$userId' | '"UserModel"."id"';
        withSelect: boolean;
        daily: boolean;
    }): string;
    static getTotalRawQuery(query: string, userId: number): Promise<number>;
    static getStats(): Promise<{
        totalUsers: number;
        totalDailyActiveUsers: number;
        totalWeeklyActiveUsers: number;
        totalMonthlyActiveUsers: number;
        totalHalfYearActiveUsers: number;
    }>;
    static autoComplete(search: string): Promise<string[]>;
    hasRight(right: UserRight): boolean;
    hasAdminFlag(flag: UserAdminFlag): number;
    isPasswordMatch(password: string): Promise<boolean>;
    toFormattedJSON(this: MUserFormattable, parameters?: {
        withAdminFlags?: boolean;
    }): User;
    toMeFormattedJSON(this: MMyUserFormattable): MyUser;
}
//# sourceMappingURL=user.d.ts.map