mod ack;
mod bus;
mod cdn;
mod circuit_breaker;
mod config;
mod dedup;
mod envelope;
mod error;
pub mod event;
pub mod http;
mod metrics;
mod pagination;
mod reconnect;
pub mod rooms;
mod search;
mod security;
mod seq;
mod token;

use crate::event::UserInfo;
pub use ack::{AckRequest, AckResponse, AckStatus, AckTracker, MessageAck};
pub use bus::ChannelBus;
pub use cdn::{CdnManager, CdnStoredFile};
pub use circuit_breaker::{CircuitBreaker, CircuitBreakerError};
pub use config::ChannelBusConfig;
pub use dedup::DeduplicationManager;
pub use envelope::ChannelEnvelope;
pub use error::{ChannelError, ChannelResult};
pub use metrics::ChannelMetrics;
pub use pagination::{
    MessageItem, MessagePage, MessagePagination, PaginationDirection,
    PaginationParams,
};
pub use reconnect::{ClientState, MissedMessage, ReconnectManager};
pub use search::{SearchEngine, SearchHit, SearchQuery, SearchResult};
pub use security::{CsrfProtection, RateLimiter};
pub use seq::SeqAllocator;
pub use token::{
    ChannelAccessToken, ChannelTokenApply, ChannelTokenContext, TOKEN_TTL_SECS,
};

use uuid::Uuid;

lazy_static::lazy_static! {
    pub static ref REDPADA: UserInfo = UserInfo {
        id: Uuid::nil(),
        username: "RedPanda".to_string(),
        display_name: "RedPanda".to_string(),
        avatar_url: "".to_string(),
    };
}
