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

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,75 @@ 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>;
46
49
  }
47
- export interface PostReportView {
50
+ export declare class PostReportView {
48
51
  post_report: PostReport;
49
52
  post: Post;
50
53
  community: CommunitySafe;
51
54
  creator: PersonSafe;
52
55
  post_creator: PersonSafe;
53
56
  creator_banned_from_community: boolean;
54
- my_vote?: number;
57
+ my_vote: Option<number>;
55
58
  counts: PostAggregates;
56
- resolver?: PersonSafe;
59
+ resolver: Option<PersonSafe>;
57
60
  }
58
- export interface CommentView {
61
+ export declare class CommentView {
59
62
  comment: Comment;
60
63
  creator: PersonSafe;
61
- recipient?: PersonSafe;
62
64
  post: Post;
63
65
  community: CommunitySafe;
64
66
  counts: CommentAggregates;
65
67
  creator_banned_from_community: boolean;
66
- subscribed: boolean;
68
+ subscribed: SubscribedType;
67
69
  saved: boolean;
68
70
  creator_blocked: boolean;
69
- my_vote?: number;
71
+ my_vote: Option<number>;
70
72
  }
71
- export interface CommentReportView {
73
+ export declare class CommentReplyView {
74
+ comment_reply: CommentReply;
75
+ comment: Comment;
76
+ creator: PersonSafe;
77
+ post: Post;
78
+ community: CommunitySafe;
79
+ recipient: PersonSafe;
80
+ counts: CommentAggregates;
81
+ creator_banned_from_community: boolean;
82
+ subscribed: SubscribedType;
83
+ saved: boolean;
84
+ creator_blocked: boolean;
85
+ my_vote: Option<number>;
86
+ }
87
+ export declare class CommentReportView {
72
88
  comment_report: CommentReport;
73
89
  comment: Comment;
74
90
  post: Post;
@@ -77,44 +93,44 @@ export interface CommentReportView {
77
93
  comment_creator: PersonSafe;
78
94
  counts: CommentAggregates;
79
95
  creator_banned_from_community: boolean;
80
- my_vote?: number;
81
- resolver?: PersonSafe;
96
+ my_vote: Option<number>;
97
+ resolver: Option<PersonSafe>;
82
98
  }
83
- export interface ModAddCommunityView {
99
+ export declare class ModAddCommunityView {
84
100
  mod_add_community: ModAddCommunity;
85
101
  moderator: PersonSafe;
86
102
  community: CommunitySafe;
87
103
  modded_person: PersonSafe;
88
104
  }
89
- export interface ModTransferCommunityView {
105
+ export declare class ModTransferCommunityView {
90
106
  mod_transfer_community: ModTransferCommunity;
91
107
  moderator: PersonSafe;
92
108
  community: CommunitySafe;
93
109
  modded_person: PersonSafe;
94
110
  }
95
- export interface ModAddView {
111
+ export declare class ModAddView {
96
112
  mod_add: ModAdd;
97
113
  moderator: PersonSafe;
98
114
  modded_person: PersonSafe;
99
115
  }
100
- export interface ModBanFromCommunityView {
116
+ export declare class ModBanFromCommunityView {
101
117
  mod_ban_from_community: ModBanFromCommunity;
102
118
  moderator: PersonSafe;
103
119
  community: CommunitySafe;
104
120
  banned_person: PersonSafe;
105
121
  }
106
- export interface ModBanView {
122
+ export declare class ModBanView {
107
123
  mod_ban: ModBan;
108
124
  moderator: PersonSafe;
109
125
  banned_person: PersonSafe;
110
126
  }
111
- export interface ModLockPostView {
127
+ export declare class ModLockPostView {
112
128
  mod_lock_post: ModLockPost;
113
129
  moderator: PersonSafe;
114
130
  post: Post;
115
131
  community: CommunitySafe;
116
132
  }
117
- export interface ModRemoveCommentView {
133
+ export declare class ModRemoveCommentView {
118
134
  mod_remove_comment: ModRemoveComment;
119
135
  moderator: PersonSafe;
120
136
  comment: Comment;
@@ -122,52 +138,75 @@ export interface ModRemoveCommentView {
122
138
  post: Post;
123
139
  community: CommunitySafe;
124
140
  }
125
- export interface ModRemoveCommunityView {
141
+ export declare class ModRemoveCommunityView {
126
142
  mod_remove_community: ModRemoveCommunity;
127
143
  moderator: PersonSafe;
128
144
  community: CommunitySafe;
129
145
  }
130
- export interface ModRemovePostView {
146
+ export declare class ModRemovePostView {
131
147
  mod_remove_post: ModRemovePost;
132
148
  moderator: PersonSafe;
133
149
  post: Post;
134
150
  community: CommunitySafe;
135
151
  }
136
- export interface ModStickyPostView {
152
+ export declare class ModStickyPostView {
137
153
  mod_sticky_post: ModStickyPost;
138
154
  moderator: PersonSafe;
139
155
  post: Post;
140
156
  community: CommunitySafe;
141
157
  }
142
- export interface CommunityFollowerView {
158
+ export declare class AdminPurgeCommunityView {
159
+ admin_purge_community: AdminPurgeCommunity;
160
+ admin: PersonSafe;
161
+ }
162
+ export declare class AdminPurgePersonView {
163
+ admin_purge_person: AdminPurgePerson;
164
+ admin: PersonSafe;
165
+ }
166
+ export declare class AdminPurgePostView {
167
+ admin_purge_post: AdminPurgePost;
168
+ admin: PersonSafe;
169
+ community: CommunitySafe;
170
+ }
171
+ export declare class AdminPurgeCommentView {
172
+ admin_purge_comment: AdminPurgeComment;
173
+ admin: PersonSafe;
174
+ post: Post;
175
+ }
176
+ export declare class CommunityFollowerView {
143
177
  community: CommunitySafe;
144
178
  follower: PersonSafe;
145
179
  }
146
- export interface CommunityBlockView {
180
+ export declare class CommunityBlockView {
147
181
  person: PersonSafe;
148
182
  community: CommunitySafe;
149
183
  }
150
- export interface CommunityModeratorView {
184
+ export declare class CommunityModeratorView {
151
185
  community: CommunitySafe;
152
186
  moderator: PersonSafe;
153
187
  }
154
- export interface CommunityPersonBanView {
188
+ export declare class CommunityPersonBanView {
155
189
  community: CommunitySafe;
156
190
  person: PersonSafe;
157
191
  }
158
- export interface PersonBlockView {
192
+ export declare class PersonBlockView {
159
193
  person: PersonSafe;
160
194
  target: PersonSafe;
161
195
  }
162
- export interface CommunityView {
196
+ export declare class CommunityView {
163
197
  community: CommunitySafe;
164
- subscribed: boolean;
198
+ subscribed: SubscribedType;
165
199
  blocked: boolean;
166
200
  counts: CommunityAggregates;
167
201
  }
168
- export interface RegistrationApplicationView {
202
+ export declare class RegistrationApplicationView {
169
203
  registration_application: RegistrationApplication;
170
204
  creator_local_user: LocalUserSettings;
171
205
  creator: PersonSafe;
172
- admin?: PersonSafe;
206
+ admin: Option<PersonSafe>;
207
+ }
208
+ export interface CommentNode {
209
+ comment_view: CommentView | PersonMentionView | CommentReplyView;
210
+ children: CommentNode[];
211
+ depth: number;
173
212
  }