Skip to main content

deepstore_client/
streaming.rs

1//! Streaming support for DeepStore client
2
3use chrono::{DateTime, Utc};
4use serde::{Deserialize, Serialize};
5use serde_json::Value as JsonValue;
6
7/// Batch of documents from draft files
8#[derive(Debug, Clone, Serialize, Deserialize)]
9#[serde(rename_all = "camelCase")]
10pub struct DraftDocumentBatch {
11    /// Documents from the draft files
12    pub documents: Vec<JsonValue>,
13    /// Draft IDs that were fetched
14    #[serde(skip_serializing_if = "Option::is_none")]
15    pub draft_ids: Option<Vec<String>>,
16}
17
18/// Parameters for streaming logs
19#[derive(Debug, Clone)]
20pub struct StreamParams {
21    /// Database ID to stream from
22    pub database_id: String,
23    /// Start time for historical logs (defaults to now)
24    pub start_time: Option<DateTime<Utc>>,
25    /// Scopes to filter by (optional - usually from JWT)
26    pub scopes: Option<Vec<String>>,
27}