lemmy-js-client 0.17.0-rc.5 → 0.17.0-rc.51

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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, LocalSite, LocalSiteRateLimit, LocalUserSettings, ModAdd, ModAddCommunity, ModBan, ModBanFromCommunity, ModLockPost, ModRemoveComment, ModRemoveCommunity, ModRemovePost, ModStickyPost, ModTransferCommunity, PersonMention, PersonSafe, Post, PostReport, PrivateMessage, PrivateMessageReport, 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,78 @@ 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;
31
+ local_site: LocalSite;
32
+ local_site_rate_limit: LocalSiteRateLimit;
28
33
  counts: SiteAggregates;
29
34
  }
30
- export interface PrivateMessageView {
35
+ export declare class PrivateMessageView {
31
36
  private_message: PrivateMessage;
32
37
  creator: PersonSafe;
33
38
  recipient: PersonSafe;
34
39
  }
35
- export interface PostView {
40
+ export declare class PostView {
36
41
  post: Post;
37
42
  creator: PersonSafe;
38
43
  community: CommunitySafe;
39
44
  creator_banned_from_community: boolean;
40
45
  counts: PostAggregates;
41
- subscribed: boolean;
46
+ subscribed: SubscribedType;
42
47
  saved: boolean;
43
48
  read: boolean;
44
49
  creator_blocked: boolean;
45
- my_vote?: number;
50
+ my_vote: Option<number>;
51
+ unread_comments: number;
46
52
  }
47
- export interface PostReportView {
53
+ export declare class PostReportView {
48
54
  post_report: PostReport;
49
55
  post: Post;
50
56
  community: CommunitySafe;
51
57
  creator: PersonSafe;
52
58
  post_creator: PersonSafe;
53
59
  creator_banned_from_community: boolean;
54
- my_vote?: number;
60
+ my_vote: Option<number>;
55
61
  counts: PostAggregates;
56
- resolver?: PersonSafe;
62
+ resolver: Option<PersonSafe>;
57
63
  }
58
- export interface CommentView {
64
+ export declare class CommentView {
59
65
  comment: Comment;
60
66
  creator: PersonSafe;
61
- recipient?: PersonSafe;
62
67
  post: Post;
63
68
  community: CommunitySafe;
64
69
  counts: CommentAggregates;
65
70
  creator_banned_from_community: boolean;
66
- subscribed: boolean;
71
+ subscribed: SubscribedType;
67
72
  saved: boolean;
68
73
  creator_blocked: boolean;
69
- my_vote?: number;
74
+ my_vote: Option<number>;
70
75
  }
71
- export interface CommentReportView {
76
+ export declare class CommentReplyView {
77
+ comment_reply: CommentReply;
78
+ comment: Comment;
79
+ creator: PersonSafe;
80
+ post: Post;
81
+ community: CommunitySafe;
82
+ recipient: PersonSafe;
83
+ counts: CommentAggregates;
84
+ creator_banned_from_community: boolean;
85
+ subscribed: SubscribedType;
86
+ saved: boolean;
87
+ creator_blocked: boolean;
88
+ my_vote: Option<number>;
89
+ }
90
+ export declare class CommentReportView {
72
91
  comment_report: CommentReport;
73
92
  comment: Comment;
74
93
  post: Post;
@@ -77,97 +96,127 @@ export interface CommentReportView {
77
96
  comment_creator: PersonSafe;
78
97
  counts: CommentAggregates;
79
98
  creator_banned_from_community: boolean;
80
- my_vote?: number;
81
- resolver?: PersonSafe;
99
+ my_vote: Option<number>;
100
+ resolver: Option<PersonSafe>;
82
101
  }
83
- export interface ModAddCommunityView {
102
+ export declare class ModAddCommunityView {
84
103
  mod_add_community: ModAddCommunity;
85
- moderator: PersonSafe;
104
+ moderator: Option<PersonSafe>;
86
105
  community: CommunitySafe;
87
106
  modded_person: PersonSafe;
88
107
  }
89
- export interface ModTransferCommunityView {
108
+ export declare class ModTransferCommunityView {
90
109
  mod_transfer_community: ModTransferCommunity;
91
- moderator: PersonSafe;
110
+ moderator: Option<PersonSafe>;
92
111
  community: CommunitySafe;
93
112
  modded_person: PersonSafe;
94
113
  }
95
- export interface ModAddView {
114
+ export declare class ModAddView {
96
115
  mod_add: ModAdd;
97
- moderator: PersonSafe;
116
+ moderator: Option<PersonSafe>;
98
117
  modded_person: PersonSafe;
99
118
  }
100
- export interface ModBanFromCommunityView {
119
+ export declare class ModBanFromCommunityView {
101
120
  mod_ban_from_community: ModBanFromCommunity;
102
- moderator: PersonSafe;
121
+ moderator: Option<PersonSafe>;
103
122
  community: CommunitySafe;
104
123
  banned_person: PersonSafe;
105
124
  }
106
- export interface ModBanView {
125
+ export declare class ModBanView {
107
126
  mod_ban: ModBan;
108
- moderator: PersonSafe;
127
+ moderator: Option<PersonSafe>;
109
128
  banned_person: PersonSafe;
110
129
  }
111
- export interface ModLockPostView {
130
+ export declare class ModLockPostView {
112
131
  mod_lock_post: ModLockPost;
113
- moderator: PersonSafe;
132
+ moderator: Option<PersonSafe>;
114
133
  post: Post;
115
134
  community: CommunitySafe;
116
135
  }
117
- export interface ModRemoveCommentView {
136
+ export declare class ModRemoveCommentView {
118
137
  mod_remove_comment: ModRemoveComment;
119
- moderator: PersonSafe;
138
+ moderator: Option<PersonSafe>;
120
139
  comment: Comment;
121
140
  commenter: PersonSafe;
122
141
  post: Post;
123
142
  community: CommunitySafe;
124
143
  }
125
- export interface ModRemoveCommunityView {
144
+ export declare class ModRemoveCommunityView {
126
145
  mod_remove_community: ModRemoveCommunity;
127
- moderator: PersonSafe;
146
+ moderator: Option<PersonSafe>;
128
147
  community: CommunitySafe;
129
148
  }
130
- export interface ModRemovePostView {
149
+ export declare class ModRemovePostView {
131
150
  mod_remove_post: ModRemovePost;
132
- moderator: PersonSafe;
151
+ moderator: Option<PersonSafe>;
133
152
  post: Post;
134
153
  community: CommunitySafe;
135
154
  }
136
- export interface ModStickyPostView {
155
+ export declare class ModStickyPostView {
137
156
  mod_sticky_post: ModStickyPost;
138
- moderator: PersonSafe;
157
+ moderator: Option<PersonSafe>;
139
158
  post: Post;
140
159
  community: CommunitySafe;
141
160
  }
142
- export interface CommunityFollowerView {
161
+ export declare class AdminPurgeCommunityView {
162
+ admin_purge_community: AdminPurgeCommunity;
163
+ admin: Option<PersonSafe>;
164
+ }
165
+ export declare class AdminPurgePersonView {
166
+ admin_purge_person: AdminPurgePerson;
167
+ admin: Option<PersonSafe>;
168
+ }
169
+ export declare class AdminPurgePostView {
170
+ admin_purge_post: AdminPurgePost;
171
+ admin: Option<PersonSafe>;
172
+ community: CommunitySafe;
173
+ }
174
+ export declare class AdminPurgeCommentView {
175
+ admin_purge_comment: AdminPurgeComment;
176
+ admin: Option<PersonSafe>;
177
+ post: Post;
178
+ }
179
+ export declare class CommunityFollowerView {
143
180
  community: CommunitySafe;
144
181
  follower: PersonSafe;
145
182
  }
146
- export interface CommunityBlockView {
183
+ export declare class CommunityBlockView {
147
184
  person: PersonSafe;
148
185
  community: CommunitySafe;
149
186
  }
150
- export interface CommunityModeratorView {
187
+ export declare class CommunityModeratorView {
151
188
  community: CommunitySafe;
152
189
  moderator: PersonSafe;
153
190
  }
154
- export interface CommunityPersonBanView {
191
+ export declare class CommunityPersonBanView {
155
192
  community: CommunitySafe;
156
193
  person: PersonSafe;
157
194
  }
158
- export interface PersonBlockView {
195
+ export declare class PersonBlockView {
159
196
  person: PersonSafe;
160
197
  target: PersonSafe;
161
198
  }
162
- export interface CommunityView {
199
+ export declare class CommunityView {
163
200
  community: CommunitySafe;
164
- subscribed: boolean;
201
+ subscribed: SubscribedType;
165
202
  blocked: boolean;
166
203
  counts: CommunityAggregates;
167
204
  }
168
- export interface RegistrationApplicationView {
205
+ export declare class RegistrationApplicationView {
169
206
  registration_application: RegistrationApplication;
170
207
  creator_local_user: LocalUserSettings;
171
208
  creator: PersonSafe;
172
- admin?: PersonSafe;
209
+ admin: Option<PersonSafe>;
210
+ }
211
+ export interface CommentNode {
212
+ comment_view: CommentView | PersonMentionView | CommentReplyView;
213
+ children: CommentNode[];
214
+ depth: number;
215
+ }
216
+ export declare class PrivateMessageReportView {
217
+ private_message_report: PrivateMessageReport;
218
+ private_message: PrivateMessage;
219
+ private_message_creator: PersonSafe;
220
+ creator: PersonSafe;
221
+ resolver: Option<PersonSafe>;
173
222
  }