relay_knowledge/api/operations/
graph_maintenance.rs1use serde::{Deserialize, Serialize};
2
3use crate::{
4 api::ApiMetadata,
5 domain::{CodeRepositoryTotals, IndexKind, IndexStatus},
6 storage::{GraphInspection, IndexCursor, IndexRefreshDiagnostics},
7};
8
9#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
11pub struct GraphInspectionRequest {
12 #[serde(skip_serializing_if = "Option::is_none")]
13 pub source_scope: Option<String>,
14}
15
16#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
18pub struct GraphInspectionResponse {
19 pub metadata: ApiMetadata,
20 pub graph: GraphInspection,
21 pub repository_code_totals: CodeRepositoryTotals,
22}
23
24#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
26pub struct IndexRefreshRequest {
27 #[serde(default)]
28 pub kinds: Vec<IndexKind>,
29}
30
31#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
33pub struct IndexRefreshResponse {
34 pub metadata: ApiMetadata,
35 pub indexes: Vec<IndexStatus>,
36 pub index_cursors: Vec<IndexCursor>,
37 pub diagnostics: IndexRefreshDiagnostics,
38}