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.
- package/dist/http.d.ts +196 -14
- package/dist/http.js +332 -98
- package/dist/index.d.ts +1 -0
- package/dist/index.js +6 -1
- package/dist/interfaces/aggregates.d.ts +1 -0
- package/dist/interfaces/api/comment.d.ts +54 -46
- package/dist/interfaces/api/comment.js +393 -0
- package/dist/interfaces/api/community.d.ts +56 -48
- package/dist/interfaces/api/community.js +433 -0
- package/dist/interfaces/api/index.js +5 -1
- package/dist/interfaces/api/person.d.ts +159 -102
- package/dist/interfaces/api/person.js +1004 -0
- package/dist/interfaces/api/post.d.ts +73 -54
- package/dist/interfaces/api/post.js +475 -0
- package/dist/interfaces/api/site.d.ts +182 -99
- package/dist/interfaces/api/site.js +1555 -0
- package/dist/interfaces/index.js +5 -1
- package/dist/interfaces/others.d.ts +122 -90
- package/dist/interfaces/others.js +187 -59
- package/dist/interfaces/source.d.ts +178 -83
- package/dist/interfaces/source.js +899 -0
- package/dist/interfaces/views.d.ts +99 -50
- package/dist/interfaces/views.js +761 -0
- package/dist/utils.d.ts +9 -0
- package/dist/utils.js +18 -0
- package/dist/websocket.d.ts +43 -12
- package/dist/websocket.js +64 -16
- package/package.json +17 -14
@@ -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 {
|
3
|
-
|
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
|
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:
|
19
|
+
subscribed: SubscribedType;
|
17
20
|
saved: boolean;
|
18
21
|
creator_blocked: boolean;
|
19
|
-
my_vote
|
22
|
+
my_vote: Option<number>;
|
20
23
|
}
|
21
|
-
export
|
24
|
+
export declare class LocalUserSettingsView {
|
22
25
|
local_user: LocalUserSettings;
|
23
26
|
person: PersonSafe;
|
24
27
|
counts: PersonAggregates;
|
25
28
|
}
|
26
|
-
export
|
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
|
35
|
+
export declare class PrivateMessageView {
|
31
36
|
private_message: PrivateMessage;
|
32
37
|
creator: PersonSafe;
|
33
38
|
recipient: PersonSafe;
|
34
39
|
}
|
35
|
-
export
|
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:
|
46
|
+
subscribed: SubscribedType;
|
42
47
|
saved: boolean;
|
43
48
|
read: boolean;
|
44
49
|
creator_blocked: boolean;
|
45
|
-
my_vote
|
50
|
+
my_vote: Option<number>;
|
51
|
+
unread_comments: number;
|
46
52
|
}
|
47
|
-
export
|
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
|
60
|
+
my_vote: Option<number>;
|
55
61
|
counts: PostAggregates;
|
56
|
-
resolver
|
62
|
+
resolver: Option<PersonSafe>;
|
57
63
|
}
|
58
|
-
export
|
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:
|
71
|
+
subscribed: SubscribedType;
|
67
72
|
saved: boolean;
|
68
73
|
creator_blocked: boolean;
|
69
|
-
my_vote
|
74
|
+
my_vote: Option<number>;
|
70
75
|
}
|
71
|
-
export
|
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
|
81
|
-
resolver
|
99
|
+
my_vote: Option<number>;
|
100
|
+
resolver: Option<PersonSafe>;
|
82
101
|
}
|
83
|
-
export
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
183
|
+
export declare class CommunityBlockView {
|
147
184
|
person: PersonSafe;
|
148
185
|
community: CommunitySafe;
|
149
186
|
}
|
150
|
-
export
|
187
|
+
export declare class CommunityModeratorView {
|
151
188
|
community: CommunitySafe;
|
152
189
|
moderator: PersonSafe;
|
153
190
|
}
|
154
|
-
export
|
191
|
+
export declare class CommunityPersonBanView {
|
155
192
|
community: CommunitySafe;
|
156
193
|
person: PersonSafe;
|
157
194
|
}
|
158
|
-
export
|
195
|
+
export declare class PersonBlockView {
|
159
196
|
person: PersonSafe;
|
160
197
|
target: PersonSafe;
|
161
198
|
}
|
162
|
-
export
|
199
|
+
export declare class CommunityView {
|
163
200
|
community: CommunitySafe;
|
164
|
-
subscribed:
|
201
|
+
subscribed: SubscribedType;
|
165
202
|
blocked: boolean;
|
166
203
|
counts: CommunityAggregates;
|
167
204
|
}
|
168
|
-
export
|
205
|
+
export declare class RegistrationApplicationView {
|
169
206
|
registration_application: RegistrationApplication;
|
170
207
|
creator_local_user: LocalUserSettings;
|
171
208
|
creator: PersonSafe;
|
172
|
-
admin
|
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
|
}
|