Skip to main content

Crate inline_sdk

Crate inline_sdk 

Source
Expand description

Thin Rust SDK for Inline.

This crate contains the reusable pieces for API calls, uploads, client metadata, and the realtime RPC transport. It deliberately stays lower-level than the future stateful inline-client crate: callers own cache and sync policy here.

The SDK follows normal Rust library logging practice: it emits diagnostics through the log facade and never initializes a logger. Parent applications decide whether to install env_logger, tracing-log, a platform logger, or no logger at all. SDK logs avoid bearer tokens, auth challenges, request and response bodies, local file paths, URL query strings, message text, and attachment contents. Public Debug implementations on token-bearing SDK types, URL-bearing builders/errors, and local-file upload inputs redact secret fields, credentials, query strings, and local paths for the same reason.

Public error enums are #[non_exhaustive] so the SDK can add more precise API and transport failures without a breaking release. Match specific variants when useful and keep a fallback arm for future variants.

use inline_sdk::{ApiClient, ClientIdentity};

let api = ApiClient::builder("https://api.inline.chat")
    .identity(ClientIdentity::try_new("my-agent", "0.1.0")?)
    .build()?;

Re-exports§

pub use api::ApiClient;
pub use api::ApiClientBuilder;
pub use api::ApiError;
pub use api::CreateLinearIssueInput;
pub use api::CreateLinearIssueResult;
pub use api::CreateNotionTaskInput;
pub use api::CreateNotionTaskResult;
pub use api::CreatePrivateChatResult;
pub use api::DEFAULT_API_TIMEOUT;
pub use api::PeerId;
pub use api::ReadMessagesInput;
pub use api::ReadMessagesResult;
pub use api::SendCodeResult;
pub use api::UploadFileInput;
pub use api::UploadFileResult;
pub use api::UploadFileType;
pub use api::UploadFileTypeParseError;
pub use api::UploadVideoMetadata;
pub use api::VerifyCodeResult;
pub use client_info::AuthMetadata;
pub use client_info::ClientIdentity;
pub use client_info::ClientIdentityError;
pub use realtime::DEFAULT_CONNECT_TIMEOUT;
pub use realtime::DEFAULT_RPC_TIMEOUT;
pub use realtime::RealtimeClient;
pub use realtime::RealtimeClientBuilder;
pub use realtime::RealtimeError;
pub use realtime::RpcRequest;

Modules§

api
HTTP API helpers for auth, uploads, and selected REST-style Inline endpoints.
client_info
Client identity and metadata helpers shared by HTTP and realtime clients.
prelude
Convenient imports for common SDK consumers.
proto
Protobuf-generated Inline protocol module.
realtime
Realtime WebSocket RPC transport for Inline protocol calls.