import type { WorkflowCommandSummary, WorkflowDefinitionDetail } from "../api/client.js"; import { type WorkflowTaskOptions } from "./shared.js"; export interface WorkflowInspectOptions extends WorkflowTaskOptions { /** * One of: * - Sitecore item GUID (with or without braces/hyphens) * - content-tree path (starts with `/sitecore/`) * - workflow display name or item name (free-form text) * * When given free-form text, the inspect task walks the workflow * definition list and matches case-insensitively against `name` or * `displayName`. Useful for `scai content workflow get "Blog Article Approval"`. */ item: string; } /** * Result shape depends on what the ref resolved to: * * - `kind: "item"` — the ref pointed at an item under workflow. * Includes the item's state + available transitions. * - `kind: "definition"` — the ref pointed at a Workflow item. * Includes the workflow's full structure (states, commands, * actions, validations). * * `null` is returned (without error) when no workflow can be located * for the ref. */ export type WorkflowInspectResult = { kind: "item"; item: WorkflowInspectItemResult; } | { kind: "definition"; definition: WorkflowDefinitionDetail; }; export interface WorkflowInspectItemResult { itemId: string; path: string | null; workflow: { workflowId: string; workflowName: string | null; }; state: { stateId: string | null; stateName: string | null; final: boolean; }; availableCommands: WorkflowCommandSummary[]; } /** * Inspect either a Sitecore workflow definition OR an item under * workflow, depending on what the ref resolves to. * * - Ref looks like a workflow item path / GUID / name → definition view. * Walks the workflow's state + command + action tree. * - Ref looks like a content item under workflow → item view. * Current state + available transitions. * * Returns `null` (without error) if neither shape resolves. */ export declare const runWorkflowGet: (options: WorkflowInspectOptions) => Promise;