feagi_api/v1/
snapshot_dtos.rs1use serde::{Deserialize, Serialize};
9use std::collections::HashMap;
10use utoipa::ToSchema;
11
12#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
14pub struct SnapshotCreateRequest {
15 #[serde(skip_serializing_if = "Option::is_none")]
16 pub name: Option<String>,
17
18 #[serde(skip_serializing_if = "Option::is_none")]
19 pub description: Option<String>,
20
21 #[serde(skip_serializing_if = "Option::is_none")]
22 pub metadata: Option<HashMap<String, serde_json::Value>>,
23}
24
25#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
27pub struct SnapshotCreateResponse {
28 pub snapshot_id: String,
29 pub success: bool,
30 pub message: String,
31}
32
33#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
35pub struct SnapshotRestoreRequest {
36 pub snapshot_id: String,
37}
38
39#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
41pub struct SnapshotListResponse {
42 pub snapshots: Vec<SnapshotInfo>,
43}
44
45#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
47pub struct SnapshotInfo {
48 pub snapshot_id: String,
49 pub name: String,
50 pub created_at: String,
51 #[serde(skip_serializing_if = "Option::is_none")]
52 pub description: Option<String>,
53}
54
55#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
57pub struct SnapshotArtifactResponse {
58 pub artifact: HashMap<String, serde_json::Value>,
59}
60
61#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
63pub struct SnapshotCompareRequest {
64 pub snapshot_id_1: String,
65 pub snapshot_id_2: String,
66}
67
68#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
70pub struct SnapshotCompareResponse {
71 pub diff: HashMap<String, serde_json::Value>,
72}
73
74#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
76pub struct SnapshotUploadRequest {
77 pub data: HashMap<String, serde_json::Value>,
78}
79
80#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
82pub struct SnapshotUploadResponse {
83 pub snapshot_id: String,
84 pub success: bool,
85}
86
87#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
89pub struct SnapshotSuccessResponse {
90 pub message: String,
91 pub success: bool,
92}