import { Result, Environment } from '../interpreter.js'; import { RbacPermissionFlag } from '../module.js'; import { UserInfo } from '../auth/interface.js'; import { ActiveSessionInfo } from '../auth/defs.js'; export declare const CoreAuthModuleName: string; declare const moduleDef: string; export default moduleDef; export declare function createUser(id: string, email: string, firstName: string, lastName: string, env: Environment): Promise; export declare function findUser(id: string, env: Environment): Promise; export declare function findUserByEmail(email: string, env: Environment): Promise; export declare function ensureUser(email: string, firstName: string, lastName: string, env: Environment): Promise; export declare function ensureUserSession(userId: string, token: string, env: Environment): Promise; export declare function createSession(id: string, userId: string, token: string, env: Environment): Promise; export declare function findSession(id: string, env: Environment): Promise; export declare function findUserSession(userId: string, env: Environment): Promise; export declare function removeSession(id: string, env: Environment): Promise; export declare function findRole(name: string, env: Environment): Promise; export declare function createRole(name: string, env: Environment): Promise; export declare function createPermission(id: string, roleName: string, resourceFqName: string, c: boolean | undefined, r: boolean | undefined, u: boolean | undefined, d: boolean | undefined, env: Environment): Promise; export declare function assignUserToRole(userId: string, roleName: string, env: Environment): Promise; export declare function findUserRoles(userId: string, env: Environment): Promise; export declare function userHasPermissions(userId: string, resourceFqName: string, perms: Set, env: Environment): Promise; type PermCheckForUser = (userId: string, resourceFqName: string, env: Environment) => Promise; export declare const canUserCreate: PermCheckForUser; export declare const canUserRead: PermCheckForUser; export declare const canUserUpdate: PermCheckForUser; export declare const canUserDelete: PermCheckForUser; export type UnautInfo = { opr: string; entity: string; }; export declare class UnauthorisedError extends Error { constructor(message?: string | UnautInfo, options?: ErrorOptions); } export declare function signUpUser(username: string, password: string, userData: object, env: Environment): Promise; export declare function loginUser(username: string, password: string, env: Environment): Promise; export declare function verifySession(token: string, env?: Environment): Promise; export declare function requireAuth(moduleName: string, eventName: string): boolean; //# sourceMappingURL=auth.d.ts.map