lemmy-js-client 0.17.0-rc.4 → 0.17.0-rc.42

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,10 +1,13 @@
1
+ import { Option } from "@sniptt/monads";
2
+ import "reflect-metadata";
1
3
  import { CommentAggregates, CommunityAggregates, PersonAggregates, PostAggregates, SiteAggregates } from "./aggregates";
2
- import { Comment, CommentReport, CommunitySafe, LocalUserSettings, ModAdd, ModAddCommunity, ModBan, ModBanFromCommunity, ModLockPost, ModRemoveComment, ModRemoveCommunity, ModRemovePost, ModStickyPost, ModTransferCommunity, PersonMention, PersonSafe, Post, PostReport, PrivateMessage, RegistrationApplication, Site } from "./source";
3
- export interface PersonViewSafe {
4
+ import { SubscribedType } from "./others";
5
+ import { AdminPurgeComment, AdminPurgeCommunity, AdminPurgePerson, AdminPurgePost, Comment, CommentReply, CommentReport, CommunitySafe, LocalUserSettings, ModAdd, ModAddCommunity, ModBan, ModBanFromCommunity, ModLockPost, ModRemoveComment, ModRemoveCommunity, ModRemovePost, ModStickyPost, ModTransferCommunity, PersonMention, PersonSafe, Post, PostReport, PrivateMessage, RegistrationApplication, Site } from "./source";
6
+ export declare class PersonViewSafe {
4
7
  person: PersonSafe;
5
8
  counts: PersonAggregates;
6
9
  }
7
- export interface PersonMentionView {
10
+ export declare class PersonMentionView {
8
11
  person_mention: PersonMention;
9
12
  comment: Comment;
10
13
  creator: PersonSafe;
@@ -13,62 +16,76 @@ export interface PersonMentionView {
13
16
  recipient: PersonSafe;
14
17
  counts: CommentAggregates;
15
18
  creator_banned_from_community: boolean;
16
- subscribed: boolean;
19
+ subscribed: SubscribedType;
17
20
  saved: boolean;
18
21
  creator_blocked: boolean;
19
- my_vote?: number;
22
+ my_vote: Option<number>;
20
23
  }
21
- export interface LocalUserSettingsView {
24
+ export declare class LocalUserSettingsView {
22
25
  local_user: LocalUserSettings;
23
26
  person: PersonSafe;
24
27
  counts: PersonAggregates;
25
28
  }
26
- export interface SiteView {
29
+ export declare class SiteView {
27
30
  site: Site;
28
31
  counts: SiteAggregates;
29
32
  }
30
- export interface PrivateMessageView {
33
+ export declare class PrivateMessageView {
31
34
  private_message: PrivateMessage;
32
35
  creator: PersonSafe;
33
36
  recipient: PersonSafe;
34
37
  }
35
- export interface PostView {
38
+ export declare class PostView {
36
39
  post: Post;
37
40
  creator: PersonSafe;
38
41
  community: CommunitySafe;
39
42
  creator_banned_from_community: boolean;
40
43
  counts: PostAggregates;
41
- subscribed: boolean;
44
+ subscribed: SubscribedType;
42
45
  saved: boolean;
43
46
  read: boolean;
44
47
  creator_blocked: boolean;
45
- my_vote?: number;
48
+ my_vote: Option<number>;
49
+ unread_comments: number;
46
50
  }
47
- export interface PostReportView {
51
+ export declare class PostReportView {
48
52
  post_report: PostReport;
49
53
  post: Post;
50
54
  community: CommunitySafe;
51
55
  creator: PersonSafe;
52
56
  post_creator: PersonSafe;
53
57
  creator_banned_from_community: boolean;
54
- my_vote?: number;
58
+ my_vote: Option<number>;
55
59
  counts: PostAggregates;
56
- resolver?: PersonSafe;
60
+ resolver: Option<PersonSafe>;
57
61
  }
58
- export interface CommentView {
62
+ export declare class CommentView {
59
63
  comment: Comment;
60
64
  creator: PersonSafe;
61
- recipient?: PersonSafe;
62
65
  post: Post;
63
66
  community: CommunitySafe;
64
67
  counts: CommentAggregates;
65
68
  creator_banned_from_community: boolean;
66
- subscribed: boolean;
69
+ subscribed: SubscribedType;
67
70
  saved: boolean;
68
71
  creator_blocked: boolean;
69
- my_vote?: number;
72
+ my_vote: Option<number>;
70
73
  }
71
- export interface CommentReportView {
74
+ export declare class CommentReplyView {
75
+ comment_reply: CommentReply;
76
+ comment: Comment;
77
+ creator: PersonSafe;
78
+ post: Post;
79
+ community: CommunitySafe;
80
+ recipient: PersonSafe;
81
+ counts: CommentAggregates;
82
+ creator_banned_from_community: boolean;
83
+ subscribed: SubscribedType;
84
+ saved: boolean;
85
+ creator_blocked: boolean;
86
+ my_vote: Option<number>;
87
+ }
88
+ export declare class CommentReportView {
72
89
  comment_report: CommentReport;
73
90
  comment: Comment;
74
91
  post: Post;
@@ -77,44 +94,44 @@ export interface CommentReportView {
77
94
  comment_creator: PersonSafe;
78
95
  counts: CommentAggregates;
79
96
  creator_banned_from_community: boolean;
80
- my_vote?: number;
81
- resolver?: PersonSafe;
97
+ my_vote: Option<number>;
98
+ resolver: Option<PersonSafe>;
82
99
  }
83
- export interface ModAddCommunityView {
100
+ export declare class ModAddCommunityView {
84
101
  mod_add_community: ModAddCommunity;
85
102
  moderator: PersonSafe;
86
103
  community: CommunitySafe;
87
104
  modded_person: PersonSafe;
88
105
  }
89
- export interface ModTransferCommunityView {
106
+ export declare class ModTransferCommunityView {
90
107
  mod_transfer_community: ModTransferCommunity;
91
108
  moderator: PersonSafe;
92
109
  community: CommunitySafe;
93
110
  modded_person: PersonSafe;
94
111
  }
95
- export interface ModAddView {
112
+ export declare class ModAddView {
96
113
  mod_add: ModAdd;
97
114
  moderator: PersonSafe;
98
115
  modded_person: PersonSafe;
99
116
  }
100
- export interface ModBanFromCommunityView {
117
+ export declare class ModBanFromCommunityView {
101
118
  mod_ban_from_community: ModBanFromCommunity;
102
119
  moderator: PersonSafe;
103
120
  community: CommunitySafe;
104
121
  banned_person: PersonSafe;
105
122
  }
106
- export interface ModBanView {
123
+ export declare class ModBanView {
107
124
  mod_ban: ModBan;
108
125
  moderator: PersonSafe;
109
126
  banned_person: PersonSafe;
110
127
  }
111
- export interface ModLockPostView {
128
+ export declare class ModLockPostView {
112
129
  mod_lock_post: ModLockPost;
113
130
  moderator: PersonSafe;
114
131
  post: Post;
115
132
  community: CommunitySafe;
116
133
  }
117
- export interface ModRemoveCommentView {
134
+ export declare class ModRemoveCommentView {
118
135
  mod_remove_comment: ModRemoveComment;
119
136
  moderator: PersonSafe;
120
137
  comment: Comment;
@@ -122,52 +139,75 @@ export interface ModRemoveCommentView {
122
139
  post: Post;
123
140
  community: CommunitySafe;
124
141
  }
125
- export interface ModRemoveCommunityView {
142
+ export declare class ModRemoveCommunityView {
126
143
  mod_remove_community: ModRemoveCommunity;
127
144
  moderator: PersonSafe;
128
145
  community: CommunitySafe;
129
146
  }
130
- export interface ModRemovePostView {
147
+ export declare class ModRemovePostView {
131
148
  mod_remove_post: ModRemovePost;
132
149
  moderator: PersonSafe;
133
150
  post: Post;
134
151
  community: CommunitySafe;
135
152
  }
136
- export interface ModStickyPostView {
153
+ export declare class ModStickyPostView {
137
154
  mod_sticky_post: ModStickyPost;
138
155
  moderator: PersonSafe;
139
156
  post: Post;
140
157
  community: CommunitySafe;
141
158
  }
142
- export interface CommunityFollowerView {
159
+ export declare class AdminPurgeCommunityView {
160
+ admin_purge_community: AdminPurgeCommunity;
161
+ admin: PersonSafe;
162
+ }
163
+ export declare class AdminPurgePersonView {
164
+ admin_purge_person: AdminPurgePerson;
165
+ admin: PersonSafe;
166
+ }
167
+ export declare class AdminPurgePostView {
168
+ admin_purge_post: AdminPurgePost;
169
+ admin: PersonSafe;
170
+ community: CommunitySafe;
171
+ }
172
+ export declare class AdminPurgeCommentView {
173
+ admin_purge_comment: AdminPurgeComment;
174
+ admin: PersonSafe;
175
+ post: Post;
176
+ }
177
+ export declare class CommunityFollowerView {
143
178
  community: CommunitySafe;
144
179
  follower: PersonSafe;
145
180
  }
146
- export interface CommunityBlockView {
181
+ export declare class CommunityBlockView {
147
182
  person: PersonSafe;
148
183
  community: CommunitySafe;
149
184
  }
150
- export interface CommunityModeratorView {
185
+ export declare class CommunityModeratorView {
151
186
  community: CommunitySafe;
152
187
  moderator: PersonSafe;
153
188
  }
154
- export interface CommunityPersonBanView {
189
+ export declare class CommunityPersonBanView {
155
190
  community: CommunitySafe;
156
191
  person: PersonSafe;
157
192
  }
158
- export interface PersonBlockView {
193
+ export declare class PersonBlockView {
159
194
  person: PersonSafe;
160
195
  target: PersonSafe;
161
196
  }
162
- export interface CommunityView {
197
+ export declare class CommunityView {
163
198
  community: CommunitySafe;
164
- subscribed: boolean;
199
+ subscribed: SubscribedType;
165
200
  blocked: boolean;
166
201
  counts: CommunityAggregates;
167
202
  }
168
- export interface RegistrationApplicationView {
203
+ export declare class RegistrationApplicationView {
169
204
  registration_application: RegistrationApplication;
170
205
  creator_local_user: LocalUserSettings;
171
206
  creator: PersonSafe;
172
- admin?: PersonSafe;
207
+ admin: Option<PersonSafe>;
208
+ }
209
+ export interface CommentNode {
210
+ comment_view: CommentView | PersonMentionView | CommentReplyView;
211
+ children: CommentNode[];
212
+ depth: number;
173
213
  }