/** * This Source Code is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * Copyright (c) Infonomic Company Limited */ import type { AbilityRegistry } from '@byline/auth'; import { type Command } from '../../lib/create-command.js'; import type { AdminStore } from '../../store.js'; import type { GetRoleAbilitiesRequest, GetRoleAbilitiesResponse, ListRegisteredAbilitiesRequest, ListRegisteredAbilitiesResponse, SetRoleAbilitiesRequest, SetRoleAbilitiesResponse, WhoHasAbilityRequest, WhoHasAbilityResponse } from './schemas.js'; /** * Transport-agnostic commands for the admin-permissions inspector. * * Built through `createCommand`, which folds the four standard steps * (validate → assert admin actor + ability → invoke service → validate * output) into one declaration. All inspector reads gate on * `admin.permissions.read`; the write gates on `admin.permissions.update`. * * Deps include the `AbilityRegistry` alongside the `AdminStore` because * the inspector reads the registered abilities directly from the * registry (no DB). The webapp threads `bylineCore.abilities` in. */ export interface AdminPermissionsCommandDeps { store: AdminStore; abilities: AbilityRegistry; } export declare const listRegisteredAbilitiesCommand: Command; export declare const whoHasAbilityCommand: Command; export declare const getRoleAbilitiesCommand: Command; export declare const setRoleAbilitiesCommand: Command;