lemmy-js-client 0.17.0-rc.4 → 0.17.0-rc.42
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 +178 -14
- package/dist/http.js +296 -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 +47 -45
- package/dist/interfaces/api/comment.js +349 -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 +132 -102
- package/dist/interfaces/api/person.js +910 -0
- package/dist/interfaces/api/post.d.ts +71 -54
- package/dist/interfaces/api/post.js +453 -0
- package/dist/interfaces/api/site.d.ts +125 -98
- package/dist/interfaces/api/site.js +963 -0
- package/dist/interfaces/index.js +5 -1
- package/dist/interfaces/others.d.ts +101 -93
- package/dist/interfaces/others.js +162 -59
- package/dist/interfaces/source.d.ts +112 -77
- package/dist/interfaces/source.js +809 -0
- package/dist/interfaces/views.d.ts +80 -40
- package/dist/interfaces/views.js +599 -0
- package/dist/utils.d.ts +9 -0
- package/dist/utils.js +18 -0
- package/dist/websocket.d.ts +33 -14
- package/dist/websocket.js +49 -19
- 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, 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
|
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:
|
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;
|
28
31
|
counts: SiteAggregates;
|
29
32
|
}
|
30
|
-
export
|
33
|
+
export declare class PrivateMessageView {
|
31
34
|
private_message: PrivateMessage;
|
32
35
|
creator: PersonSafe;
|
33
36
|
recipient: PersonSafe;
|
34
37
|
}
|
35
|
-
export
|
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:
|
44
|
+
subscribed: SubscribedType;
|
42
45
|
saved: boolean;
|
43
46
|
read: boolean;
|
44
47
|
creator_blocked: boolean;
|
45
|
-
my_vote
|
48
|
+
my_vote: Option<number>;
|
49
|
+
unread_comments: number;
|
46
50
|
}
|
47
|
-
export
|
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
|
58
|
+
my_vote: Option<number>;
|
55
59
|
counts: PostAggregates;
|
56
|
-
resolver
|
60
|
+
resolver: Option<PersonSafe>;
|
57
61
|
}
|
58
|
-
export
|
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:
|
69
|
+
subscribed: SubscribedType;
|
67
70
|
saved: boolean;
|
68
71
|
creator_blocked: boolean;
|
69
|
-
my_vote
|
72
|
+
my_vote: Option<number>;
|
70
73
|
}
|
71
|
-
export
|
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
|
81
|
-
resolver
|
97
|
+
my_vote: Option<number>;
|
98
|
+
resolver: Option<PersonSafe>;
|
82
99
|
}
|
83
|
-
export
|
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
|
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
|
112
|
+
export declare class ModAddView {
|
96
113
|
mod_add: ModAdd;
|
97
114
|
moderator: PersonSafe;
|
98
115
|
modded_person: PersonSafe;
|
99
116
|
}
|
100
|
-
export
|
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
|
123
|
+
export declare class ModBanView {
|
107
124
|
mod_ban: ModBan;
|
108
125
|
moderator: PersonSafe;
|
109
126
|
banned_person: PersonSafe;
|
110
127
|
}
|
111
|
-
export
|
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
|
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
|
142
|
+
export declare class ModRemoveCommunityView {
|
126
143
|
mod_remove_community: ModRemoveCommunity;
|
127
144
|
moderator: PersonSafe;
|
128
145
|
community: CommunitySafe;
|
129
146
|
}
|
130
|
-
export
|
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
|
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
|
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
|
181
|
+
export declare class CommunityBlockView {
|
147
182
|
person: PersonSafe;
|
148
183
|
community: CommunitySafe;
|
149
184
|
}
|
150
|
-
export
|
185
|
+
export declare class CommunityModeratorView {
|
151
186
|
community: CommunitySafe;
|
152
187
|
moderator: PersonSafe;
|
153
188
|
}
|
154
|
-
export
|
189
|
+
export declare class CommunityPersonBanView {
|
155
190
|
community: CommunitySafe;
|
156
191
|
person: PersonSafe;
|
157
192
|
}
|
158
|
-
export
|
193
|
+
export declare class PersonBlockView {
|
159
194
|
person: PersonSafe;
|
160
195
|
target: PersonSafe;
|
161
196
|
}
|
162
|
-
export
|
197
|
+
export declare class CommunityView {
|
163
198
|
community: CommunitySafe;
|
164
|
-
subscribed:
|
199
|
+
subscribed: SubscribedType;
|
165
200
|
blocked: boolean;
|
166
201
|
counts: CommunityAggregates;
|
167
202
|
}
|
168
|
-
export
|
203
|
+
export declare class RegistrationApplicationView {
|
169
204
|
registration_application: RegistrationApplication;
|
170
205
|
creator_local_user: LocalUserSettings;
|
171
206
|
creator: PersonSafe;
|
172
|
-
admin
|
207
|
+
admin: Option<PersonSafe>;
|
208
|
+
}
|
209
|
+
export interface CommentNode {
|
210
|
+
comment_view: CommentView | PersonMentionView | CommentReplyView;
|
211
|
+
children: CommentNode[];
|
212
|
+
depth: number;
|
173
213
|
}
|