// ⚠️ GENERATED FILE – do not edit directly. Edit the canonical source in skills/atlassian/shared/scripts/ and run `pnpm run sync:pi`. import type { CommandOutput, OutputFormat } from "./types.js"; /** * Produce the standard dry-run response payload for write operations. * * Use this when `--dry-run` is passed to skip the actual API call and * echo the pending request back to the caller. * * @example * if (input.dryRun) return dryRunResponse(request); */ export function dryRunResponse(data: T): CommandOutput { return { ok: true, dryRun: true, data }; } /** * Resolve the `--format` CLI option to a typed OutputFormat. * * Returns `"text"` only for the exact string `"text"`; * all other values (including `undefined`) fall back to `"json"`. */ export function resolveFormat(format: string | undefined): OutputFormat { return format === "text" ? "text" : "json"; }