mzrs-sdk 0.1.21

High-level Rust SDK for Mezon platform
Documentation
//! High-level Rust SDK for the Mezon platform.
//!
//! This crate wraps [`mzrs_core`] with ergonomic APIs:
//!
//! - **[`MzrsClient`]** + **[`MzrsClientBuilder`]** -- connect, authenticate,
//!   and interact with Mezon.
//! - **[`ClanHandle`]** / **[`ChannelHandle`]** -- scoped handles that carry
//!   context so you don't repeat IDs.
//! - **[`MessageBuilder`]** -- fluent message builder with `.send().await`.
//! - **[`RichText`]** -- text with bold, italic, code, links, mentions.
//! - **[`Embed`]** -- rich cards with fields, images, and footers.
//! - **[`ActionRow`]** -- interactive buttons and selects.
//! - **[`content`]** -- parse incoming messages (text, mentions, attachments).
//!
//! # Quick start
//!
//! ```rust,ignore
//! use mzrs_sdk::MzrsClient;
//!
//! let client = MzrsClient::builder()
//!     .bot_id("my-bot")
//!     .token("secret")
//!     .build()?;
//!
//! client.login().await?;
//! client.connect().await?;
//!
//! let channel = client.channel("clan_id", "channel_id");
//! channel.send_text("Hello from mzrs-sdk!").await?;
//! ```

pub mod builders;
pub mod client;
pub mod content;
pub mod error;
pub mod handles;
pub mod types;
pub mod upload;

// ── Re-exports: SDK types ───────────────────────────────────────────

pub use client::{
    DeleteMessageRequest, JoinChatRequest, LeaveChatRequest, MzrsClient, MzrsClientBuilder,
    ReactMessageRequest, SendMessageRequest, UpdateMessageRequest,
};
pub use error::SdkError;
pub use handles::{ChannelHandle, ClanHandle};
pub use types::{ChannelType, MessageCode, StreamMode};
pub use upload::AttachmentSource;

// ── Re-exports: builders ────────────────────────────────────────────

pub use builders::components::{ActionRow, ButtonStyle, ComponentType, SelectOption};
pub use builders::embed::{Embed, EmbedAuthor, EmbedField, EmbedFooter, EmbedImage};
pub use builders::message::{MessageBuilder, MessageContent, PreparedContent};
pub use builders::rich_text::RichText;

// ── Re-exports: key types from lower layers ─────────────────────────

pub use mzrs_core::{ClientRuntime, CoreError, Event, Session};
pub use mzrs_proto::{api, realtime};