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