import type { Store } from '../db/store.ts'; import type { AuthDirectory, EventHandler, EventHandlerCtx, EventSchemaOverride, HttpRouteDef, RequestReplyDef, ViewDef } from '../types.ts'; export declare const hasRight: (store: Store, user: string, code: string) => boolean; type FixedRights = ReadonlyMap; export interface AuthBackingOptions { userOf(ctx: EventHandlerCtx): string; passwords: Map; fixedRights?: FixedRights; } export declare const changePasswordRoute: HttpRouteDef; /** * auth's events, request servers and views, for the platform preset to merge. */ export declare function authBacking({ userOf, passwords, fixedRights }: AuthBackingOptions): { eventHandlers: { [x: string]: EventHandler; }; eventSchemas: Record; requestReplies: Record; views: { USER_PROFILE_NAMES: ViewDef; }; directory: AuthDirectory; }; export {};