import { type WorkflowTaskOptions } from "./shared.js"; export interface WorkflowApplyOptions extends WorkflowTaskOptions { /** Item GUID or content-tree path to attach the workflow to. Required. */ item: string; /** * Workflow GUID, content-tree path, or display/item name. Required. * Same resolution as `runWorkflowGet`: GUID → direct, path → * lookup, free text → name match against `listWorkflowDefinitions`. */ workflow: string; /** * Override the state to land on. Defaults to the workflow's * `__Initial state`. Pass either a state GUID or a state name (e.g. * "Draft") to start the item somewhere other than initial. */ state?: string; /** Plan-only — don't issue the field write. */ whatIf?: boolean; /** Per-invocation write gate override. */ allowWrite?: boolean; } export type WorkflowApplyStatus = "applied" | "what-if" | "failed" | "skipped-already-attached" | "skipped-workflow-not-found" | "skipped-state-not-found"; export interface WorkflowApplyResult { itemId: string | null; path: string | null; workflowItemId: string | null; workflowName: string | null; stateItemId: string | null; stateName: string | null; status: WorkflowApplyStatus; message?: string; } /** * Attach a workflow to an item — sets the item's `__Workflow` and * `__Workflow state` fields directly via `updateItem`. Bypasses the * workflow engine; no submit/validation actions fire. * * Useful when content was authored before the workflow existed, or * when an item was orphaned by a workflow rename. For new items * created via recipe / CMS UX, attach the workflow via Standard * Values (`__Default workflow` field) on the template instead. * * The `workflow` ref accepts any of: workflow GUID, content-tree path, * or display/item name (resolved against `listWorkflowDefinitions`). * Same resolver as `workflow_inspect verb=get`. */ export declare const runWorkflowApply: (options: WorkflowApplyOptions) => Promise;