import type { Audit } from '../../infra/audit/types.js'; export interface TransitionDef { readonly from: string; readonly to: string | readonly string[]; readonly guard?: (context: TransitionContext) => boolean | Promise; } export interface StateMachineConfig { readonly states: readonly string[]; readonly transitions: readonly TransitionDef[]; readonly initial?: string; readonly audit?: Audit; } export interface TransitionContext { readonly entityId: string; readonly entityType: string; readonly from: string; readonly to: string; readonly userId?: string; readonly metadata?: Record; } export interface TransitionResult { readonly from: string; readonly to: string; readonly entityId: string; } export interface StateMachine { validTargets(from: string): readonly string[]; hasTransition(from: string, to: string): boolean; canTransition(context: TransitionContext): Promise; transition(context: TransitionContext): Promise; readonly definition: StateMachineConfig; } //# sourceMappingURL=types.d.ts.map