Skip to main content

Back

Classes​

ClassDescription
AggregatesHelper to build aggregation rules for use with resource().aggregate()
Filters-
GroupByHelper to build grouping rules for use with resource().aggregate()
Sorts-

Interfaces​

InterfaceDescription
AdminForthActionInput-
AdminForthBulkAction-
AdminForthConfig-
AdminForthConfigCustomization-
AdminForthForeignResource-
AdminForthInputConfigMain configuration object for AdminForth
AdminForthResourceResource describes one table or collection in database. AdminForth generates set of pages for 'list', 'show', 'edit', 'create', 'filter' operations for each resource.
AdminForthResourceColumn-
AdminForthResourceColumnInput-
AdminForthResourceInput-
HttpExtra-
IAdminForth-
IAdminForthAndOrFilter-
IAdminForthApiValidationError-
IAdminForthApiValidationResult-
IAdminForthAuth-
IAdminForthAuthenticatedEndpointHandlerInput-
IAdminForthAuthenticatedEndpointOptions-
IAdminForthDataSourceConnector-
IAdminForthDataSourceConnectorBaseInterface that exposes methods to interact with AdminForth in standard way
IAdminForthDataSourceConnectorConstructor-
IAdminForthEndpointHandlerInput-
IAdminForthEndpointOptionsBase-
IAdminForthExpressRouteSchema-
IAdminForthHttpResponse-
IAdminForthNoAuthEndpointOptions-
IAdminForthPlugin-
IAdminForthRestAPI-
IAdminForthSingleFilter-
IAdminForthSort-
IAdminUserExpressRequest-
IAggregationRule-
ICodeInjector-
IConfigValidator-
IExpressHttpServerImplement this interface to create custom HTTP server adapter for AdminForth.
IGroupByDateTrunc-
IGroupByField-
IHttpServerImplement this interface to create custom HTTP server adapter for AdminForth.
IOpenApiRegistry-
IOperationalResource-
IRegisteredApiSchema-
IScopedOperationalResourceResource API bound to an authenticated admin user by IOperationalResource.asUser. Every operation enforces the resource ACL and the column access rules, and runs the resource lifecycle hooks.
ISystemOperationalResourceResource writes returned by IOperationalResource.asSystem. Same error contract as IScopedOperationalResource: create and update resolve to { ok: false, error }, delete throws on a hook rejection and resolves to false when the record did not exist.
ITranslateExpressRequest-
ITranslateFunction-
IWebSocketBroker-
IWebSocketClient-
OperationalResourceContextOptions-
OperationalResourceSystemOptions-
PluginsCommonOptions-
ResourceOptions-
ResourceOptionsInputGeneral options for resource.

Type Aliases​

Type AliasDescription
AdminForthDataSourceData source describes database connection which will be used to fetch data for resources. Each resource should use one data source.
AdminForthExpressSchemaInput-
AdminForthMenuContributionProvider-
AdminUserAuthorizationResultResult of IAdminForthAuth.authorizeByCookies. Statuses are separated because caller decides how to answer: authenticated endpoints answer 401 on any non-ok status except verifyFailed (which is a server side problem and must not logout user), while noAuth endpoints just treat caller as anonymous.
AdminUserAuthorizeFunctionAllow to make extra authorization
AfterCreateSaveFunction-
AfterDataSourceResponseFunctionModify response to change how data is returned after fetching from database. Return ok: false and error: string to stop execution and show error message to user. Return ok: true to continue execution.
AfterDeleteSaveFunctionModify record to change how data is saved to database. Return ok: false and error: string to stop execution and show error message to user. Return ok: true to continue execution.
AfterEditSaveFunction-
AfterLoginFailedFunctionCalled after password login attempt failed, right before AdminForth answers with 401. Not called for attempts blocked by auth.rateLimit. Useful to log failed attempts or to notify user about bruteforce of their account.
AfterSessionCreatedFunctionCalled right after auth cookie with new session was issued, no matter which login method issued it (password login, OAuth, passkey, two-factor confirmation or any plugin which calls auth.setAuthCookie). Useful to persist sessions to revoke them later, or to log logins.
AgentResourceMeta-
AgentToolMeta-
AllowedActions-
AllowedActionsInputObject which describes allowed actions for user.
AllowedActionValueDefines whether user has access to an action, can statically be Boolean or function which returns Boolean or string with error message
BackendOnlyInput-
BeforeCreateSaveFunction-
BeforeDataSourceRequestFunctionModify query to change how data is fetched from database. Return ok: false and error: string to stop execution and show error message to user. Return ok: true to continue execution.
BeforeDeleteSaveFunctionModify record to change how data is saved to database. Return ok: false and error: string to stop execution and show error message to user. Return ok: true to continue execution.
BeforeEditSaveFunction-
BeforeLoginAttemptFunctionAllows to reject login attempt before AdminForth checks credentials in the database. Called on every call of login endpoint, even if username does not exist or password is wrong, so it is a right place for captcha and other anti-bruteforce checks: user gets the same response regardless of whether credentials were correct.
BeforeLoginConfirmationFunctionAllow to get user data before login confirmation, will triger when user try to login.
BeforeLogoutFunctionCalled when user logs out, before AdminForth removes auth cookie. Useful for cleanup of things issued for the session (e.g. revoking tokens on external identity provider, removing custom cookies set by plugins) or for logging logout event.
CreateResourceRecordParamsParameters for IAdminForth.createResourceRecord.
CreateResourceRecordResultResult of IAdminForth.createResourceRecord.
DeleteResourceRecordParamsParameters for IAdminForth.deleteResourceRecord.
DeleteResourceRecordResultResult of IAdminForth.deleteResourceRecord.
ExpressErrorCallbackFunctionCallback called when an unhandled error is thrown inside an AdminForth API endpoint handler. Useful to report errors to external services (e.g. Sentry) or to do custom logging. Thrown errors / rejections from this callback are caught and logged, they do not affect the response.
FDataFilter-
FDataSort-
IAdminForthEndpointOptions-
IGroupByRule-
LoginFailureReasonWhy password login attempt failed: - rejected: one of auth.beforeLoginAttempt hooks rejected the attempt, credentials were not checked - user_not_found: there is no user with such username - invalid_password: user exists, but password is wrong
OperationalResourceUserOptions-
PeriodString-
PeriodUnit-
RateLimitString-
ShowIn-
ShowInInputObject which describes on what pages should column be displayed on.
UpdateResourceRecordParamsParameters for IAdminForth.updateResourceRecord.
UpdateResourceRecordResultResult of IAdminForth.updateResourceRecord.

Variables​

VariableDescription
PERIOD_UNITS-