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