//! ATProto XRPC endpoints for the labeler protocol. use std::sync::Arc; use axum::{ extract::{ ws::{Message, WebSocket, WebSocketUpgrade}, Query, State, }, response::Response, Json, }; use futures::StreamExt; use serde::{Deserialize, Serialize}; use tokio::sync::broadcast; use tokio_stream::wrappers::BroadcastStream; use tracing::error; use crate::db::LabelDb; use crate::labels::Label; use crate::state::{AppError, AppState}; // --- types --- #[derive(Debug, Deserialize)] #[serde(rename_all = "camelCase")] pub struct QueryLabelsParams { pub uri_patterns: String, // comma-separated pub sources: Option, pub cursor: Option, pub limit: Option, } #[derive(Debug, Serialize)] pub struct QueryLabelsResponse { pub cursor: Option, pub labels: Vec