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,14 +1,16 @@
|
|
1
|
-
|
1
|
+
import { Option } from "@sniptt/monads";
|
2
|
+
export declare class LocalUserSettings {
|
2
3
|
id: number;
|
3
4
|
person_id: number;
|
4
|
-
email
|
5
|
+
email: Option<string>;
|
5
6
|
show_nsfw: boolean;
|
6
7
|
theme: string;
|
7
8
|
default_sort_type: number;
|
8
9
|
default_listing_type: number;
|
9
|
-
|
10
|
+
interface_language: string;
|
10
11
|
show_avatars: boolean;
|
11
12
|
send_notifications_to_email: boolean;
|
13
|
+
validator_time: string;
|
12
14
|
show_bot_accounts: boolean;
|
13
15
|
show_scores: boolean;
|
14
16
|
show_read_posts: boolean;
|
@@ -16,51 +18,91 @@ export interface LocalUserSettings {
|
|
16
18
|
email_verified: boolean;
|
17
19
|
accepted_application: boolean;
|
18
20
|
}
|
19
|
-
export
|
21
|
+
export declare class PersonSafe {
|
20
22
|
id: number;
|
21
23
|
name: string;
|
22
|
-
display_name
|
23
|
-
avatar
|
24
|
+
display_name: Option<string>;
|
25
|
+
avatar: Option<string>;
|
24
26
|
banned: boolean;
|
25
27
|
published: string;
|
26
|
-
updated
|
28
|
+
updated: Option<string>;
|
27
29
|
actor_id: string;
|
28
|
-
bio
|
30
|
+
bio: Option<string>;
|
29
31
|
local: boolean;
|
30
|
-
banner
|
32
|
+
banner: Option<string>;
|
31
33
|
deleted: boolean;
|
32
34
|
inbox_url: string;
|
33
|
-
shared_inbox_url: string
|
34
|
-
matrix_user_id
|
35
|
+
shared_inbox_url: Option<string>;
|
36
|
+
matrix_user_id: Option<string>;
|
35
37
|
admin: boolean;
|
36
38
|
bot_account: boolean;
|
37
|
-
ban_expires
|
39
|
+
ban_expires: Option<string>;
|
40
|
+
instance_id: number;
|
38
41
|
}
|
39
|
-
export
|
42
|
+
export declare class Site {
|
40
43
|
id: number;
|
41
44
|
name: string;
|
42
|
-
sidebar
|
45
|
+
sidebar: Option<string>;
|
43
46
|
published: string;
|
44
|
-
updated
|
47
|
+
updated: Option<string>;
|
48
|
+
icon: Option<string>;
|
49
|
+
banner: Option<string>;
|
50
|
+
description: Option<string>;
|
51
|
+
actor_id: string;
|
52
|
+
last_refreshed_at: string;
|
53
|
+
inbox_url: string;
|
54
|
+
private_key: Option<string>;
|
55
|
+
public_key: string;
|
56
|
+
instance_id: number;
|
57
|
+
}
|
58
|
+
export declare class LocalSite {
|
59
|
+
id: number;
|
60
|
+
site_id: number;
|
61
|
+
site_setup: boolean;
|
45
62
|
enable_downvotes: boolean;
|
46
63
|
open_registration: boolean;
|
47
64
|
enable_nsfw: boolean;
|
48
|
-
icon?: string;
|
49
|
-
banner?: string;
|
50
|
-
description?: string;
|
51
65
|
community_creation_admin_only: boolean;
|
52
66
|
require_email_verification: boolean;
|
53
67
|
require_application: boolean;
|
54
|
-
application_question
|
68
|
+
application_question: Option<string>;
|
55
69
|
private_instance: boolean;
|
56
70
|
default_theme: string;
|
57
71
|
default_post_listing_type: string;
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
72
|
+
legal_information: Option<string>;
|
73
|
+
hide_modlog_mod_names: boolean;
|
74
|
+
application_email_admins: boolean;
|
75
|
+
slur_filter_regex: Option<string>;
|
76
|
+
actor_name_max_length: number;
|
77
|
+
federation_enabled: boolean;
|
78
|
+
federation_debug: boolean;
|
79
|
+
federation_strict_allowlist: boolean;
|
80
|
+
federation_http_fetch_retry_limit: number;
|
81
|
+
federation_worker_count: number;
|
82
|
+
captcha_enabled: boolean;
|
83
|
+
captcha_difficulty: string;
|
84
|
+
published: string;
|
85
|
+
updated: Option<string>;
|
62
86
|
}
|
63
|
-
export
|
87
|
+
export declare class LocalSiteRateLimit {
|
88
|
+
id: number;
|
89
|
+
local_site_id: number;
|
90
|
+
message: number;
|
91
|
+
message_per_second: number;
|
92
|
+
post: number;
|
93
|
+
post_per_second: number;
|
94
|
+
register: number;
|
95
|
+
register_per_second: number;
|
96
|
+
image: number;
|
97
|
+
image_per_second: number;
|
98
|
+
comment: number;
|
99
|
+
comment_per_second: number;
|
100
|
+
search: number;
|
101
|
+
search_per_second: number;
|
102
|
+
published: string;
|
103
|
+
updated: Option<string>;
|
104
|
+
}
|
105
|
+
export declare class PrivateMessage {
|
64
106
|
id: number;
|
65
107
|
creator_id: number;
|
66
108
|
recipient_id: number;
|
@@ -68,184 +110,237 @@ export interface PrivateMessage {
|
|
68
110
|
deleted: boolean;
|
69
111
|
read: boolean;
|
70
112
|
published: string;
|
71
|
-
updated
|
113
|
+
updated: Option<string>;
|
72
114
|
ap_id: string;
|
73
115
|
local: boolean;
|
74
116
|
}
|
75
|
-
export
|
117
|
+
export declare class PostReport {
|
76
118
|
id: number;
|
77
119
|
creator_id: number;
|
78
120
|
post_id: number;
|
79
121
|
original_post_name: string;
|
80
|
-
original_post_url
|
81
|
-
original_post_body
|
122
|
+
original_post_url: Option<string>;
|
123
|
+
original_post_body: Option<string>;
|
82
124
|
reason: string;
|
83
125
|
resolved: boolean;
|
84
|
-
resolver_id
|
126
|
+
resolver_id: Option<number>;
|
85
127
|
published: string;
|
86
|
-
updated
|
128
|
+
updated: Option<string>;
|
87
129
|
}
|
88
|
-
export
|
130
|
+
export declare class Post {
|
89
131
|
id: number;
|
90
132
|
name: string;
|
91
|
-
url
|
92
|
-
body
|
133
|
+
url: Option<string>;
|
134
|
+
body: Option<string>;
|
93
135
|
creator_id: number;
|
94
136
|
community_id: number;
|
95
137
|
removed: boolean;
|
96
138
|
locked: boolean;
|
97
139
|
published: string;
|
98
|
-
updated
|
140
|
+
updated: Option<string>;
|
99
141
|
deleted: boolean;
|
100
142
|
nsfw: boolean;
|
101
143
|
stickied: boolean;
|
102
|
-
embed_title
|
103
|
-
embed_description
|
104
|
-
|
105
|
-
thumbnail_url
|
144
|
+
embed_title: Option<string>;
|
145
|
+
embed_description: Option<string>;
|
146
|
+
embed_video_url: Option<string>;
|
147
|
+
thumbnail_url: Option<string>;
|
106
148
|
ap_id: string;
|
107
149
|
local: boolean;
|
150
|
+
language_id: number;
|
108
151
|
}
|
109
|
-
export
|
152
|
+
export declare class PasswordResetRequest {
|
110
153
|
id: number;
|
111
154
|
local_user_id: number;
|
112
155
|
token_encrypted: string;
|
113
156
|
published: string;
|
114
157
|
}
|
115
|
-
export
|
158
|
+
export declare class ModRemovePost {
|
116
159
|
id: number;
|
117
160
|
mod_person_id: number;
|
118
161
|
post_id: number;
|
119
|
-
reason
|
120
|
-
removed
|
162
|
+
reason: Option<string>;
|
163
|
+
removed: Option<boolean>;
|
121
164
|
when_: string;
|
122
165
|
}
|
123
|
-
export
|
166
|
+
export declare class ModLockPost {
|
124
167
|
id: number;
|
125
168
|
mod_person_id: number;
|
126
169
|
post_id: number;
|
127
|
-
locked
|
170
|
+
locked: Option<boolean>;
|
128
171
|
when_: string;
|
129
172
|
}
|
130
|
-
export
|
173
|
+
export declare class ModStickyPost {
|
131
174
|
id: number;
|
132
175
|
mod_person_id: number;
|
133
176
|
post_id: number;
|
134
|
-
stickied
|
177
|
+
stickied: Option<boolean>;
|
135
178
|
when_: string;
|
136
179
|
}
|
137
|
-
export
|
180
|
+
export declare class ModRemoveComment {
|
138
181
|
id: number;
|
139
182
|
mod_person_id: number;
|
140
183
|
comment_id: number;
|
141
|
-
reason
|
142
|
-
removed
|
184
|
+
reason: Option<string>;
|
185
|
+
removed: Option<boolean>;
|
143
186
|
when_: string;
|
144
187
|
}
|
145
|
-
export
|
188
|
+
export declare class ModRemoveCommunity {
|
146
189
|
id: number;
|
147
190
|
mod_person_id: number;
|
148
191
|
community_id: number;
|
149
|
-
reason
|
150
|
-
removed
|
151
|
-
expires
|
192
|
+
reason: Option<string>;
|
193
|
+
removed: Option<boolean>;
|
194
|
+
expires: Option<string>;
|
152
195
|
when_: string;
|
153
196
|
}
|
154
|
-
export
|
197
|
+
export declare class ModBanFromCommunity {
|
155
198
|
id: number;
|
156
199
|
mod_person_id: number;
|
157
200
|
other_person_id: number;
|
158
201
|
community_id: number;
|
159
|
-
reason
|
160
|
-
banned
|
161
|
-
expires
|
202
|
+
reason: Option<string>;
|
203
|
+
banned: Option<boolean>;
|
204
|
+
expires: Option<string>;
|
162
205
|
when_: string;
|
163
206
|
}
|
164
|
-
export
|
207
|
+
export declare class ModBan {
|
165
208
|
id: number;
|
166
209
|
mod_person_id: number;
|
167
210
|
other_person_id: number;
|
168
|
-
reason
|
169
|
-
banned
|
170
|
-
expires
|
211
|
+
reason: Option<string>;
|
212
|
+
banned: Option<boolean>;
|
213
|
+
expires: Option<string>;
|
171
214
|
when_: string;
|
172
215
|
}
|
173
|
-
export
|
216
|
+
export declare class ModAddCommunity {
|
174
217
|
id: number;
|
175
218
|
mod_person_id: number;
|
176
219
|
other_person_id: number;
|
177
220
|
community_id: number;
|
178
|
-
removed
|
221
|
+
removed: Option<boolean>;
|
179
222
|
when_: string;
|
180
223
|
}
|
181
|
-
export
|
224
|
+
export declare class ModTransferCommunity {
|
182
225
|
id: number;
|
183
226
|
mod_person_id: number;
|
184
227
|
other_person_id: number;
|
185
228
|
community_id: number;
|
186
|
-
removed
|
229
|
+
removed: Option<boolean>;
|
187
230
|
when_: string;
|
188
231
|
}
|
189
|
-
export
|
232
|
+
export declare class ModAdd {
|
190
233
|
id: number;
|
191
234
|
mod_person_id: number;
|
192
235
|
other_person_id: number;
|
193
|
-
removed
|
236
|
+
removed: Option<boolean>;
|
237
|
+
when_: string;
|
238
|
+
}
|
239
|
+
export declare class AdminPurgePerson {
|
240
|
+
id: number;
|
241
|
+
admin_person_id: number;
|
242
|
+
reason: Option<string>;
|
243
|
+
when_: string;
|
244
|
+
}
|
245
|
+
export declare class AdminPurgeCommunity {
|
246
|
+
id: number;
|
247
|
+
admin_person_id: number;
|
248
|
+
reason: Option<string>;
|
249
|
+
when_: string;
|
250
|
+
}
|
251
|
+
export declare class AdminPurgePost {
|
252
|
+
id: number;
|
253
|
+
admin_person_id: number;
|
254
|
+
community_id: number;
|
255
|
+
reason: Option<string>;
|
256
|
+
when_: string;
|
257
|
+
}
|
258
|
+
export declare class AdminPurgeComment {
|
259
|
+
id: number;
|
260
|
+
admin_person_id: number;
|
261
|
+
post_id: number;
|
262
|
+
reason: Option<string>;
|
194
263
|
when_: string;
|
195
264
|
}
|
196
|
-
export
|
265
|
+
export declare class CommunitySafe {
|
197
266
|
id: number;
|
198
267
|
name: string;
|
199
268
|
title: string;
|
200
|
-
description
|
269
|
+
description: Option<string>;
|
201
270
|
removed: boolean;
|
202
271
|
published: string;
|
203
|
-
updated
|
272
|
+
updated: Option<string>;
|
204
273
|
deleted: boolean;
|
205
274
|
nsfw: boolean;
|
206
275
|
actor_id: string;
|
207
276
|
local: boolean;
|
208
|
-
icon
|
209
|
-
banner
|
277
|
+
icon: Option<string>;
|
278
|
+
banner: Option<string>;
|
279
|
+
hidden: boolean;
|
210
280
|
posting_restricted_to_mods: boolean;
|
281
|
+
instance_id: number;
|
211
282
|
}
|
212
|
-
export
|
283
|
+
export declare class CommentReport {
|
213
284
|
id: number;
|
214
285
|
creator_id: number;
|
215
286
|
comment_id: number;
|
216
287
|
original_comment_text: string;
|
217
288
|
reason: string;
|
218
289
|
resolved: boolean;
|
219
|
-
resolver_id
|
290
|
+
resolver_id: Option<number>;
|
220
291
|
published: string;
|
221
|
-
updated
|
292
|
+
updated: Option<string>;
|
222
293
|
}
|
223
|
-
export
|
294
|
+
export declare class Comment {
|
224
295
|
id: number;
|
225
296
|
creator_id: number;
|
226
297
|
post_id: number;
|
227
|
-
parent_id?: number;
|
228
298
|
content: string;
|
229
299
|
removed: boolean;
|
230
|
-
read: boolean;
|
231
300
|
published: string;
|
232
|
-
updated
|
301
|
+
updated: Option<string>;
|
233
302
|
deleted: boolean;
|
234
303
|
ap_id: string;
|
235
304
|
local: boolean;
|
305
|
+
path: string;
|
306
|
+
distinguished: boolean;
|
307
|
+
language_id: number;
|
308
|
+
}
|
309
|
+
export declare class PersonMention {
|
310
|
+
id: number;
|
311
|
+
recipient_id: number;
|
312
|
+
comment_id: number;
|
313
|
+
read: boolean;
|
314
|
+
published: string;
|
236
315
|
}
|
237
|
-
export
|
316
|
+
export declare class CommentReply {
|
238
317
|
id: number;
|
239
318
|
recipient_id: number;
|
240
319
|
comment_id: number;
|
241
320
|
read: boolean;
|
242
321
|
published: string;
|
243
322
|
}
|
244
|
-
export
|
323
|
+
export declare class RegistrationApplication {
|
245
324
|
id: number;
|
246
325
|
local_user_id: number;
|
247
326
|
answer: string;
|
248
|
-
admin_id
|
249
|
-
deny_reason
|
327
|
+
admin_id: Option<number>;
|
328
|
+
deny_reason: Option<string>;
|
329
|
+
published: string;
|
330
|
+
}
|
331
|
+
export declare class Language {
|
332
|
+
id: number;
|
333
|
+
code: string;
|
334
|
+
name: string;
|
335
|
+
}
|
336
|
+
export declare class PrivateMessageReport {
|
337
|
+
id: number;
|
338
|
+
creator_id: number;
|
339
|
+
private_message_id: number;
|
340
|
+
original_pm_text: string;
|
341
|
+
reason: string;
|
342
|
+
resolved: boolean;
|
343
|
+
resolver_id: Option<number>;
|
250
344
|
published: string;
|
345
|
+
updated: Option<string>;
|
251
346
|
}
|