11 use serde::{Deserialize, Serialize};
13 #[derive(Deserialize)]
14 pub struct ListCategories {}
17 pub struct ListCategoriesResponse {
18 pub categories: Vec<Category>,
21 #[derive(Deserialize, Debug)]
25 pub community_id: Option<i32>,
27 pub page: Option<i64>,
28 pub limit: Option<i64>,
29 pub auth: Option<String>,
32 #[derive(Serialize, Debug)]
33 pub struct SearchResponse {
35 pub comments: Vec<CommentView>,
36 pub posts: Vec<PostView>,
37 pub communities: Vec<CommunityView>,
38 pub users: Vec<UserView>,
41 #[derive(Deserialize)]
42 pub struct GetModlog {
43 pub mod_user_id: Option<i32>,
44 pub community_id: Option<i32>,
45 pub page: Option<i64>,
46 pub limit: Option<i64>,
50 pub struct GetModlogResponse {
51 pub removed_posts: Vec<ModRemovePostView>,
52 pub locked_posts: Vec<ModLockPostView>,
53 pub stickied_posts: Vec<ModStickyPostView>,
54 pub removed_comments: Vec<ModRemoveCommentView>,
55 pub removed_communities: Vec<ModRemoveCommunityView>,
56 pub banned_from_community: Vec<ModBanFromCommunityView>,
57 pub banned: Vec<ModBanView>,
58 pub added_to_community: Vec<ModAddCommunityView>,
59 pub added: Vec<ModAddView>,
62 #[derive(Deserialize)]
63 pub struct CreateSite {
65 pub description: Option<String>,
66 pub icon: Option<String>,
67 pub banner: Option<String>,
68 pub enable_downvotes: bool,
69 pub open_registration: bool,
70 pub enable_nsfw: bool,
74 #[derive(Deserialize)]
77 pub description: Option<String>,
78 pub icon: Option<String>,
79 pub banner: Option<String>,
80 pub enable_downvotes: bool,
81 pub open_registration: bool,
82 pub enable_nsfw: bool,
86 #[derive(Deserialize)]
88 pub auth: Option<String>,
91 #[derive(Serialize, Clone)]
92 pub struct SiteResponse {
97 pub struct GetSiteResponse {
98 pub site: Option<SiteView>,
99 pub admins: Vec<UserView>,
100 pub banned: Vec<UserView>,
103 pub my_user: Option<User_>,
104 pub federated_instances: Vec<String>,
107 #[derive(Deserialize)]
108 pub struct TransferSite {
113 #[derive(Deserialize)]
114 pub struct GetSiteConfig {
119 pub struct GetSiteConfigResponse {
120 pub config_hjson: String,
123 #[derive(Deserialize)]
124 pub struct SaveSiteConfig {
125 pub config_hjson: String,