Contains methods relating to Administrator entities.
(ctx: RequestContext, options?: ListQueryOptions<Administrator>, relations?: RelationPaths<Administrator>) => Promise<PaginatedList<Administrator>>Get a paginated list of Administrators.
(ctx: RequestContext, administratorId: ID, relations?: RelationPaths<Administrator>) => Promise<Administrator | undefined>Get an Administrator by id.
(ctx: RequestContext, userId: ID, relations?: RelationPaths<Administrator>) => Promise<Administrator | undefined>Get an Administrator based on the User id.
(ctx: RequestContext, relations?: RelationPaths<Administrator>) => Promise<Administrator | undefined>v3.6.4Resolves the Administrator to be credited as the actor of the current request when
recording an audit trail, e.g. the administrator of a HistoryEntry.
For a regular session this is the Administrator of the active User, exactly as returned by
AdministratorService.findOneByUserId.
An API-Key session authenticates as the synthetic "API-Key user" created alongside the key,
which has no Administrator of its own. For those sessions we fall back to the Administrator
of the ApiKey's owner, so that actions performed with the key are attributed to the
Administrator who created it. The owner is not required to be an Administrator — it may be a
Customer's User — in which case undefined is returned and the entry stays unattributed.
This is deliberately kept separate from AdministratorService.findOneByUserId, which
answers the literal question "which Administrator belongs to this User id?".
Never use this method to make authorization decisions. The Administrator it returns is not the authenticated principal of the request, and their permissions do not apply to it.
(ctx: RequestContext, input: CreateAdministratorInput) => Promise<Administrator>Create a new Administrator.
(ctx: RequestContext, input: UpdateAdministratorInput) => Promise<Administrator>Update an existing Administrator.
(ctx: RequestContext, administratorId: ID, roleId: ID) => Promise<Administrator>Assigns a Role to the Administrator's User entity.
(ctx: RequestContext, id: ID) => Soft deletes an Administrator (sets the deletedAt field).