import { type IAdminForth, type IHttpServer, AdminForthResource, ITranslateFunction, IAdminForthRestAPI, HttpExtra } from "../types/Back.js"; import { RateLimiter } from './utils.js'; import { ActionCheckSource, AdminUser, AllowedActionsResolved } from "../types/Common.js"; export declare function rejectApiRawFilters(filters: any): { error: string; } | undefined; export declare function interpretResource(adminUser: AdminUser, resource: AdminForthResource, meta: any, source: ActionCheckSource, adminforth: IAdminForth): Promise<{ allowedActions: AllowedActionsResolved; }>; export default class AdminForthRestAPI implements IAdminForthRestAPI { adminforth: IAdminForth; loginRateLimiters: RateLimiter[]; constructor(adminforth: IAdminForth); private getAdminUserFromRequest; private normalizeJsonColumns; /** * Runs beforeLoginAttempt hooks. Returns error to answer with, or null if login attempt is allowed to proceed. */ processBeforeLoginAttempt(username: string, extra: HttpExtra, tr: ITranslateFunction): Promise<{ error: string; } | null>; processLoginCallbacks(adminUser: AdminUser, toReturn: { redirectTo?: string; allowedLogin: boolean; error?: string; }, response: any, extra: HttpExtra, sessionDuration?: string): Promise; /** * Runs beforeLogout hooks. Hooks can't block logout, they are called for cleanup and logging only. */ processBeforeLogout(adminUser: AdminUser | null, extra: HttpExtra, tr: ITranslateFunction): Promise; checkAbortSignal(abortSignal: AbortSignal): boolean; registerEndpoints(server: IHttpServer): void; } //# sourceMappingURL=restApi.d.ts.map