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-
ITranslateExpressRequest-
ITranslateFunction-
IWebSocketBroker-
IWebSocketClient-
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-
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.
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-
PeriodString-
PeriodUnit-
RateLimitString-
ShowIn-
ShowInInputObject which describes on what pages should column be displayed on.
ShowInLegacyInput-
ShowInModernInput-
UpdateResourceRecordParamsParameters for IAdminForth.updateResourceRecord.
UpdateResourceRecordResultResult of IAdminForth.updateResourceRecord.

Variables​

VariableDescription
PERIOD_UNITS-