24 lines
757 B
TypeScript
24 lines
757 B
TypeScript
import type { CorpConfig } from "../../core/config/types.js";
|
|
import type { createSealClient } from "../../core/http/factory.js";
|
|
import { runTool } from "../helpers.js";
|
|
import { numberOption, ruleVersionContextOptions, stringOption } from "../parser.js";
|
|
import { outputOptions } from "../printer.js";
|
|
import type { ParsedArgs } from "../types.js";
|
|
|
|
export async function handleContextCommand(
|
|
client: Awaited<ReturnType<typeof createSealClient>>,
|
|
corp: CorpConfig,
|
|
args: ParsedArgs
|
|
) {
|
|
await runTool(
|
|
"seal_approval_context_get",
|
|
client,
|
|
corp,
|
|
{
|
|
documentLimit: numberOption(args.options.documentLimit),
|
|
...ruleVersionContextOptions(stringOption(args.options.ruleVersion))
|
|
},
|
|
outputOptions(args.options)
|
|
);
|
|
}
|