import 'reflect-metadata'; export interface ActionOptions { blocking?: boolean; inputType?: TInput; outputType?: TOutput; } /** * @Action Decorator * * A decorator that marks a class method as an action handler in a StatefulWorkflow. * Actions represent discrete operations that can modify the workflow's state in a * controlled and traceable manner. * * @typeParam TAction - The type of action this handler processes * @typeParam TReturn - The return type of the action handler * * @example * ```typescript * class MyWorkflow extends StatefulWorkflow { * @Action() * protected async addItem(action: AddItemAction): Promise { * // Handle adding item * return newItem; * } * } * ``` * * Features: * - Type-safe action handling with action-specific payloads * - Automatic action tracking and state management * - Integration with workflow state updates * - Support for async operations * * Common Use Cases: * 1. CRUD operations on workflow entities * 2. State transitions * 3. Complex business logic that needs to modify workflow state * 4. Operations that need to be tracked or logged * * Notes: * - Action methods should be protected or private * - Actions should be idempotent when possible * - Actions can interact with other workflow components like Properties and ManagedPaths * - Actions can trigger state updates that propagate to persistent storage * * @see StatefulWorkflow * @see Property * @see ManagedPaths */ export declare function Action(options?: ActionOptions): (target: any, propertyKey: string) => void;