1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
//! Zart HTTP API — optional Axum server for external interaction with durable executions.
//!
//! # Endpoints
//!
//! ```text
//! GET /api/v1/executions — List executions
//! POST /api/v1/executions — Start a new execution
//! GET /api/v1/executions/:execution_id — Get execution status
//! POST /api/v1/executions/:execution_id/cancel — Cancel an execution
//! GET /api/v1/executions/:execution_id/wait — Long-poll until completion
//! GET /api/v1/stats — Aggregate execution counts by status
//! POST /api/v1/events/:execution_id/:event_name — Deliver an event
//! GET /healthz — Liveness probe
//! GET /readyz — Readiness probe
//! GET /metrics — Prometheus metrics
//!
//! GET /admin/v1/executions/:id/detail — Full execution detail with steps & attempts
//! POST /admin/v1/executions/:id/retry-step — Retry a dead step
//! POST /admin/v1/executions/:id/restart — Restart an execution
//! POST /admin/v1/executions/:id/rerun — Selective step rerun
//! GET /admin/v1/executions/:id/runs — List runs for an execution
//! POST /admin/v1/pause — Create a pause rule
//! GET /admin/v1/pause — List pause rules
//! POST /admin/v1/pause/:rule_id — Resume (soft-delete) a pause rule
//! DELETE /admin/v1/pause/:rule_id — Delete a pause rule
//! ```
//!
//! # Usage
//!
//! ```rust,no_run
//! use zart_api::ApiServer;
//! use zart::{DurableScheduler, TaskRegistry, into_durable_api};
//! use std::sync::Arc;
//!
//! # async fn example() {
//! // let scheduler = Arc::new(/* PostgresScheduler */);
//! // let durable = into_durable_api(DurableScheduler::new(scheduler));
//! // ApiServer::new("0.0.0.0:8080", durable).serve().await.unwrap();
//! # }
//! ```
pub use admin_router;
pub use ApiServer;
pub use ;