cognee_http_server/dto/
activity.rs1use serde::Serialize;
9use utoipa::ToSchema;
10use uuid::Uuid;
11
12#[derive(Debug, Clone, Serialize, ToSchema)]
17#[serde(rename_all = "snake_case")]
18pub struct PipelineRunListItemDTO {
19 pub id: Uuid,
20 pub pipeline_name: String,
21 pub status: Option<String>,
23 pub dataset_id: Option<Uuid>,
24 pub dataset_name: Option<String>,
25 pub owner_id: Option<Uuid>,
26 pub owner_email: Option<String>,
27 pub created_at: Option<String>,
29 pub pipeline_run_id: Option<Uuid>,
30}
31
32#[derive(Debug, Clone, Serialize, ToSchema)]
37#[serde(rename_all = "snake_case")]
38pub struct TraceSummaryDTO {
39 pub trace_id: String,
40 pub root_name: Option<String>,
41 pub duration_ms: f64,
42 pub span_count: usize,
43 pub status: Option<String>,
45 pub spans: Vec<RecordedSpanDTO>,
46}
47
48#[derive(Debug, Clone, Serialize, ToSchema)]
50#[serde(rename_all = "snake_case")]
51pub struct RecordedSpanDTO {
52 pub name: String,
53 pub trace_id: String,
54 pub span_id: String,
55 pub parent_span_id: Option<String>,
56 pub start_time_ns: u64,
57 pub end_time_ns: u64,
58 pub duration_ms: f64,
59 pub status: String,
62 pub attributes: serde_json::Map<String, serde_json::Value>,
63}
64
65#[derive(Debug, Clone, Serialize, ToSchema)]
67#[serde(rename_all = "snake_case")]
68pub struct TenantUserDTO {
69 pub id: Uuid,
70 pub email: String,
71 pub is_superuser: bool,
72 pub created_at: Option<String>,
73}
74
75#[derive(Debug, Clone, Serialize, ToSchema)]
79#[serde(rename_all = "snake_case")]
80pub struct AgentDTO {
81 pub id: Uuid,
82 pub email: String,
83 pub agent_type: String,
84 pub agent_short_id: String,
85 pub is_agent: bool,
86 pub is_default: bool,
87 pub status: String,
89 pub api_key_count: u64,
90 pub created_at: Option<String>,
91}
92
93#[derive(Debug, Clone, Serialize, ToSchema)]
98#[serde(rename_all = "snake_case")]
99pub struct SpansErrorEnvelopeDTO {
100 pub error: String,
101}