glues_core/proxy/
request.rs

1use crate::types::{DirectoryId, NoteId};
2use serde::{Deserialize, Serialize};
3
4#[derive(Serialize, Deserialize, Debug)]
5#[serde(tag = "method", content = "data")]
6pub enum ProxyRequest {
7    RootId,
8    FetchDirectory {
9        directory_id: DirectoryId,
10    },
11    FetchDirectories {
12        parent_id: DirectoryId,
13    },
14    AddDirectory {
15        parent_id: DirectoryId,
16        name: String,
17    },
18    RemoveDirectory {
19        directory_id: DirectoryId,
20    },
21    MoveDirectory {
22        directory_id: DirectoryId,
23        parent_id: DirectoryId,
24    },
25    RenameDirectory {
26        directory_id: DirectoryId,
27        name: String,
28    },
29    FetchNotes {
30        directory_id: DirectoryId,
31    },
32    FetchNoteContent {
33        note_id: NoteId,
34    },
35    AddNote {
36        directory_id: DirectoryId,
37        name: String,
38    },
39    RemoveNote {
40        note_id: NoteId,
41    },
42    RenameNote {
43        note_id: NoteId,
44        name: String,
45    },
46    UpdateNoteContent {
47        note_id: NoteId,
48        content: String,
49    },
50    MoveNote {
51        note_id: NoteId,
52        directory_id: DirectoryId,
53    },
54    Log {
55        category: String,
56        message: String,
57    },
58}