// SPDX-License-Identifier: MIT import { listAppGrants } from "../../graph/app.ts"; import { getGraphClient } from "../../graph/index.ts"; type ListAppGrantsOptions = { appId?: string; }; export function usageListAppGrants(): string { return `Usage: sk-az-tools list-app-grants --app-id|-i [global options] Options: --app-id, -i Application (client) ID (required)`; } export async function runListAppGrantsCommand(options: ListAppGrantsOptions): Promise { if (!options.appId) { throw new Error("--app-id is required for list-app-grants"); } const client = await getGraphClient(); return listAppGrants(client, options.appId); }