#![forbid(unsafe_code)]
#![deny(missing_docs)]
mod context;
mod definition;
mod error;
mod identity;
mod journal;
mod outcome;
mod plan;
mod state;
mod step;
pub use context::SagaContext;
pub use definition::{
CancelMode, Compensation, ResolutionMode, ResolutionSpec, StepDefinition, TimeoutPolicy,
WorkflowDefinition,
};
pub use error::{
ContractResult, ContractViolation, CODE_COUNTER_OVERFLOW, CODE_COUNTER_ZERO,
CODE_DEFINITION_BUDGET_ZERO, CODE_DEFINITION_DUPLICATE_STEP, CODE_DEFINITION_EMPTY,
CODE_DEFINITION_MODE_CONFLICT, CODE_DEFINITION_PIVOT_NOT_LAST,
CODE_DEFINITION_RESOLUTION_MISSING, CODE_IDENTIFIER_CHARSET, CODE_IDENTIFIER_EMPTY,
CODE_IDENTIFIER_TOO_LONG, CODE_IDENTIFIER_UNTRIMMED, CODE_PLAN_DUPLICATE_STEP,
CODE_PLAN_MISSING_STEP, CODE_PLAN_SUCCEEDED_PIVOT, CODE_PLAN_UNKNOWN_STEP,
CODE_PLAN_UNSETTLED_STEP, CODE_TRANSITION_FORWARD_AFTER_COMPENSATION, CODE_TRANSITION_ILLEGAL,
};
pub use identity::{
AttemptNo, BusinessKey, CommandId, DefinitionVersion, EffectId, SagaId, ServiceIdentity,
StepName, StepPhase, TenantId, WorkflowName,
};
pub use journal::{
StepAttemptStatus, StepCancelStatus, StepCompensationStatus, StepResolutionStatus, TriggerKind,
};
pub use outcome::{
CancelOutcome, CancelResult, CompensationOutcome, CompensationResult, SagaExecutionError,
SagaOutcome, SagaResult, TerminalForwardOutcome,
};
pub use plan::{
freeze_compensation_plan, CompensationEntry, CompensationPlan, StepForwardStatus,
StepJournalEntry,
};
pub use state::{check_transition, ControlState, Direction, SagaStatus, TransitionGuard};
pub use step::{SagaCancelStep, SagaResolveStep, SagaStep};