import { User, Role } from "@openiap/openflow-api";
export declare class DBHelper {
    static FindByUsername(username: string, jwt?: string): Promise<User>;
    static FindById(_id: string, jwt?: string): Promise<User>;
    static FindByUsernameOrId(username: string, id: string): Promise<User>;
    static FindByUsernameOrFederationid(username: string): Promise<User>;
    static GetRoles(_id: string, ident: number): Promise<Role[]>;
    static DecorateWithRoles(user: User): Promise<void>;
    static FindRoleByName(name: string): Promise<Role>;
    static FindRoleByNameOrId(name: string, id: string): Promise<Role>;
    static Save(item: User | Role, jwt: string): Promise<void>;
    static EnsureRole(jwt: string, name: string, id: string): Promise<Role>;
    static ensureUser(jwt: string, name: string, username: string, id: string, password: string): Promise<User>;
}
