EndpointAdmin class Endpoint

Inheritance

Constructors

EndpointAdmin(EndpointCaller caller)

Properties

caller → EndpointCaller
Holds a reference to the caller class.
finalinherited
client ↔ ServerpodClientShared
Reference to the client.
latefinalinherited
hashCode → int
The hash code for this object.
no setterinherited
name → String
The name of the endpoint this reference is connected to.
no setteroverride
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

access() → Future<AdminAccessInfo>
What the signed-in user may do; never refused, so the dashboard can explain a missing role.
activity(String resourceKey, int days) → Future<List<AdminActivityPoint>>
Rows added per day over the last days days, by the resource's chart column, for the overview.
changeCurrentUserPassword(String currentPassword, String newPassword) → Future<bool>
create(String resourceKey, Map<String, String> data) → Future<Map<String, String>>
currentUserProfile() → Future<Map<String, String>>
delete(String resourceKey, String id) → Future<bool>
deleteMany(String resourceKey, List<String> ids) → Future<AdminActionResult>
Deletes the rows with ids, in one query unless the table deletes rows its own way, and records each; rows that cannot be deleted are counted in the message.
deleteView(int id) → Future<bool>
Deletes the signed-in user's saved view id; false when they have no such view.
exportRows(String resourceKey, AdminQuery query, int maxRows) → Future<List<Map<String, String>>>
Every row matching query (its search, filters and order) up to maxRows, for exports, in one query.
find(String resourceKey, String id) → Future<Map<String, dynamic>?>
futureCallHistory() → Future<List<Map<String, String>>>
history(String? resourceKey, String? recordId, int offset, int limit) → Future<AdminLogPage>
The change history, newest first: everything, one resource's, or one row's when recordId is given too.
importRows(String resourceKey, List<Map<String, String>> rows) → Future<AdminImportResult>
Imports rows as a spreadsheet does: rows without a primary key are created (in one query unless the table creates rows its own way) and rows with one update theirs (read in one query and saved in one query unless the table saves rows its own way), all in one request.
list(String resourceKey) → Future<List<Map<String, String>>>
listPage(String resourceKey, int offset, int limit) → Future<List<Map<String, String>>>
matchingIds(String resourceKey, AdminQuery query, int maxRows) → Future<List<String>>
The primary keys of the rows matching query up to maxRows, to select them all, in one query reading only the keys.
metrics() → Future<List<AdminMetricValue>>
Key numbers for the overview the user may see; a metric that fails shows "—".
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
overview(int days) → Future<List<AdminTableSummary>>
Every table the user may see with its number of rows and the rows it gained on each of the last days days: the overview in one request and two queries.
query(String resourceKey, AdminQuery query) → Future<AdminPage>
One page of resourceKey's rows: filtered, searched and sorted in the database when possible, with the total number of matching rows.
The rows of every table the user may see that point at the row id of resourceKey through a foreign key: up to limit of each, with how many there are, in one request. columns gives, by table, the columns to return (all the user may see when not given).
resources() → Future<List<AdminResource>>
The tables the user may see, each saying whether they may create, edit and delete rows.
runAction(String resourceKey, String name, List<String> ids) → Future<AdminActionResult>
Runs the custom action name (registered with actions:) on the rows with ids, and records it in each row's history.
savedViews(String resourceKey) → Future<List<AdminSavedView>>
The signed-in user's saved views of resourceKey, by name.
saveView(String resourceKey, String name, AdminQuery query, List<String>? columns) → Future<AdminSavedView>
Saves query's search, sort and filters and the shown columns (null for the table's defaults) as the signed-in user's view name of resourceKey, replacing their view of that name. Paging is not saved.
toString() → String
A string representation of this object.
inherited
update(String resourceKey, Map<String, String> data) → Future<Map<String, String>>
updateCurrentUserProfile(String userName, String fullName) → Future<Map<String, String>>
updateMany(String resourceKey, List<String> ids, Map<String, String> values) → Future<AdminActionResult>
Sets values (column name to text, as the edit form sends them) on every row with ids, through the same validation as a single edit: the rows are read in one query and saved in one query unless the table saves rows its own way.

Operators

operator ==(Object other) → bool
The equality operator.
inherited