//! # tapped
//!
//! A Rust wrapper for the `tap` ATProto sync utility.
//!
//! Tap simplifies ATProto sync by handling the firehose connection, verification,
//! backfill, and filtering. This crate provides an idiomatic async Rust interface
//! to tap's HTTP API and WebSocket event stream.
//!
//! ## Features
//!
//! - Connect to an existing tap instance or spawn one as a subprocess
//! - Strongly-typed configuration with builder pattern
//! - Async event streaming with automatic acknowledgment
//! - Full HTTP API coverage for repo management and statistics
//!
//! ## Example
//!
//! ```no_run
//! use tapped::{TapClient, TapConfig, Result};
//!
//! #[tokio::main]
//! async fn main() -> Result<()> {
//!     // Connect to an existing tap instance
//!     let client = TapClient::new("http://localhost:2480")?;
//!     
//!     // Check health
//!     client.health().await?;
//!     
//!     // Add repos to track
//!     client.add_repos(&["did:plc:example1234567890abc"]).await?;
//!     
//!     // Stream events
//!     let mut receiver = client.channel().await?;
//!     while let Ok(event) = receiver.recv().await {
//!         println!("Received event: {:?}", event);
//!         // Event is automatically acknowledged when dropped
//!     }
//!     
//!     Ok(())
//! }
//! ```

mod channel;
mod client;
mod config;
mod error;
mod handle;
mod process;
mod types;

pub use channel::{EventReceiver, ReceivedEvent};
pub use client::TapClient;
pub use config::{LogLevel, TapConfig, TapConfigBuilder};
pub use error::Error;
pub use handle::TapHandle;
pub use process::TapProcess;
pub use types::{
    AccountStatus, Cursors, DidDocument, Event, IdentityEvent, Record, RecordAction, RecordEvent,
    RepoInfo, RepoState, Service, VerificationMethod,
};

/// A specialised Result type for tapped operations.
pub type Result<T> = std::result::Result<T, Error>;
