lemmy-js-client 0.17.0-rc.4 → 0.17.0-rc.40
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 +127 -98
- package/dist/interfaces/api/site.js +985 -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 +113 -77
- package/dist/interfaces/source.js +809 -0
- package/dist/interfaces/views.d.ts +79 -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,75 @@ 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>;
|
46
49
|
}
|
47
|
-
export
|
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
|
57
|
+
my_vote: Option<number>;
|
55
58
|
counts: PostAggregates;
|
56
|
-
resolver
|
59
|
+
resolver: Option<PersonSafe>;
|
57
60
|
}
|
58
|
-
export
|
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:
|
68
|
+
subscribed: SubscribedType;
|
67
69
|
saved: boolean;
|
68
70
|
creator_blocked: boolean;
|
69
|
-
my_vote
|
71
|
+
my_vote: Option<number>;
|
70
72
|
}
|
71
|
-
export
|
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
|
81
|
-
resolver
|
96
|
+
my_vote: Option<number>;
|
97
|
+
resolver: Option<PersonSafe>;
|
82
98
|
}
|
83
|
-
export
|
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
|
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
|
111
|
+
export declare class ModAddView {
|
96
112
|
mod_add: ModAdd;
|
97
113
|
moderator: PersonSafe;
|
98
114
|
modded_person: PersonSafe;
|
99
115
|
}
|
100
|
-
export
|
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
|
122
|
+
export declare class ModBanView {
|
107
123
|
mod_ban: ModBan;
|
108
124
|
moderator: PersonSafe;
|
109
125
|
banned_person: PersonSafe;
|
110
126
|
}
|
111
|
-
export
|
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
|
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
|
141
|
+
export declare class ModRemoveCommunityView {
|
126
142
|
mod_remove_community: ModRemoveCommunity;
|
127
143
|
moderator: PersonSafe;
|
128
144
|
community: CommunitySafe;
|
129
145
|
}
|
130
|
-
export
|
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
|
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
|
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
|
180
|
+
export declare class CommunityBlockView {
|
147
181
|
person: PersonSafe;
|
148
182
|
community: CommunitySafe;
|
149
183
|
}
|
150
|
-
export
|
184
|
+
export declare class CommunityModeratorView {
|
151
185
|
community: CommunitySafe;
|
152
186
|
moderator: PersonSafe;
|
153
187
|
}
|
154
|
-
export
|
188
|
+
export declare class CommunityPersonBanView {
|
155
189
|
community: CommunitySafe;
|
156
190
|
person: PersonSafe;
|
157
191
|
}
|
158
|
-
export
|
192
|
+
export declare class PersonBlockView {
|
159
193
|
person: PersonSafe;
|
160
194
|
target: PersonSafe;
|
161
195
|
}
|
162
|
-
export
|
196
|
+
export declare class CommunityView {
|
163
197
|
community: CommunitySafe;
|
164
|
-
subscribed:
|
198
|
+
subscribed: SubscribedType;
|
165
199
|
blocked: boolean;
|
166
200
|
counts: CommunityAggregates;
|
167
201
|
}
|
168
|
-
export
|
202
|
+
export declare class RegistrationApplicationView {
|
169
203
|
registration_application: RegistrationApplication;
|
170
204
|
creator_local_user: LocalUserSettings;
|
171
205
|
creator: PersonSafe;
|
172
|
-
admin
|
206
|
+
admin: Option<PersonSafe>;
|
207
|
+
}
|
208
|
+
export interface CommentNode {
|
209
|
+
comment_view: CommentView | PersonMentionView | CommentReplyView;
|
210
|
+
children: CommentNode[];
|
211
|
+
depth: number;
|
173
212
|
}
|