import { User, Role, Base, TokenUser } from "@openiap/openflow-api";
import { Span } from "@opentelemetry/api";
import { Observable } from '@opentelemetry/api-metrics';
import { WebSocketServerClient } from "./WebSocketServerClient";
import { Provider } from "./LoginProvider";
import { TokenRequest } from "./TokenRequest";
export declare class DBHelper {
    memoryCache: any;
    mongoCache: any;
    init(): Promise<void>;
    clearCache(reason: string): Promise<void>;
    DeleteKey(key: any): Promise<void>;
    item_cache: Observable;
    ensureotel(): void;
    FindById(_id: string, jwt: string, parent: Span): Promise<User>;
    GetProviders(parent: Span): Promise<Provider[]>;
    ClearProviders(): Promise<void>;
    FindRequestTokenID(key: string, parent: Span): Promise<TokenRequest>;
    AdddRequestTokenID(key: string, data: any, parent: Span): Promise<TokenRequest>;
    RemoveRequestTokenID(key: string, parent: Span): Promise<TokenRequest>;
    FindByAuthorization(authorization: string, jwt: string, parent: Span): Promise<User>;
    FindQueueById(_id: string, jwt: string, parent: Span): Promise<User>;
    FindQueueByName(name: string, jwt: string, parent: Span): Promise<User>;
    FindExchangeById(_id: string, jwt: string, parent: Span): Promise<User>;
    FindExchangeByName(name: string, jwt: string, parent: Span): Promise<User>;
    FindRoleById(_id: string, jwt: string, parent: Span): Promise<Role>;
    FindByUsername(username: string, jwt: string, parent: Span): Promise<User>;
    GetDisposableDomain(domain: string, parent: Span): Promise<Base>;
    FindByUsernameOrFederationid(username: string, issuer: string, parent: Span): Promise<User>;
    DecorateWithRoles<T extends TokenUser | User>(user: T, parent: Span): Promise<T>;
    FindRoleByName(name: string, jwt: string, parent: Span): Promise<Role>;
    Save(item: User | Role, jwt: string, parent: Span): Promise<void>;
    EnsureRole(jwt: string, name: string, id: string, parent: Span): Promise<Role>;
    EnsureUser(jwt: string, name: string, username: string, id: string, password: string, extraoptions: any, parent: Span): Promise<User>;
    EnsureNoderedRoles(user: TokenUser | User, jwt: string, force: boolean, parent: Span): Promise<void>;
    UpdateHeartbeat(cli: WebSocketServerClient): Promise<any>;
    GetIPBlockList(parent: Span): Promise<Base[]>;
    ClearIPBlockList(): Promise<void>;
}
