1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
use std::collections::HashMap;
use serde::{Deserialize, Serialize};
mod annotations;
mod common;
mod entries_filter;
mod entry;
mod format;
mod new_entry;
mod patch_entry;
mod tags;
mod user;
pub(crate) use self::annotations::AnnotationRows;
pub use self::annotations::{Annotation, Annotations, NewAnnotation, Range};
pub use self::common::ID;
pub(crate) use self::entries_filter::RequestEntriesFilter;
pub use self::entries_filter::{EntriesFilter, SortBy, SortOrder};
pub(crate) use self::entry::{DeletedEntry, PaginatedEntries};
pub use self::entry::{Entries, EntriesPage, Entry};
pub use self::format::Format;
pub use self::new_entry::NewEntry;
pub use self::patch_entry::PatchEntry;
pub use self::tags::{DeletedTag, Tag, TagString, Tags};
pub use self::user::{NewlyRegisteredInfo, RegisterInfo, User};
#[derive(Deserialize, Debug)]
pub(crate) struct TokenInfo {
pub access_token: String,
pub expires_in: u32,
pub token_type: String,
pub scope: Option<String>,
pub refresh_token: String,
}
#[derive(Debug, Clone)]
pub struct Config {
pub client_id: String,
pub client_secret: String,
pub username: String,
pub password: String,
pub base_url: String,
}
pub type ExistsInfo = HashMap<String, Option<ID>>;
#[derive(Deserialize, Debug)]
pub(crate) struct ExistsResponse {
pub exists: Option<ID>,
}
#[derive(Serialize, Debug)]
pub(crate) struct Unit {}
pub(crate) static UNIT: &Unit = &Unit {};