// SPDX-License-Identifier: MIT import { listAppGrants } from "../../graph/app.ts"; import { getGraphClientFromPublicConfig } from "./shared.ts"; import type { CommandValues } from "./types.ts"; 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(values: CommandValues): Promise { if (!values["app-id"]) { throw new Error("--app-id is required for list-app-grants"); } const { client } = await getGraphClientFromPublicConfig(); return listAppGrants(client, values["app-id"]); }