lemmy-js-client 0.17.0-rc.13 → 0.17.0-rc.16

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 CHANGED
@@ -19,371 +19,445 @@ export declare class LemmyHttp {
19
19
  });
20
20
  /**
21
21
  * Gets the site, and your user data.
22
+ *
22
23
  * `HTTP.GET /site`
23
24
  */
24
25
  getSite(form: GetSite): Promise<GetSiteResponse>;
25
26
  /**
26
27
  * Create your site.
28
+ *
27
29
  * `HTTP.POST /site`
28
30
  */
29
31
  createSite(form: CreateSite): Promise<SiteResponse>;
30
32
  /**
31
33
  * Edit your site.
34
+ *
32
35
  * `HTTP.PUT /site`
33
36
  */
34
37
  editSite(form: EditSite): Promise<SiteResponse>;
35
38
  /**
36
39
  * Leave the Site admins.
40
+ *
37
41
  * `HTTP.POST /user/leave_admin`
38
42
  */
39
43
  leaveAdmin(form: LeaveAdmin): Promise<GetSiteResponse>;
40
44
  /**
41
45
  * Get your site configuration.
46
+ *
42
47
  * `HTTP.GET /site/config`
43
48
  */
44
49
  getSiteConfig(form: GetSiteConfig): Promise<GetSiteConfigResponse>;
45
50
  /**
46
51
  * Save your site config.
52
+ *
47
53
  * `HTTP.PUT /site/config`
48
54
  */
49
55
  saveSiteConfig(form: SaveSiteConfig): Promise<GetSiteConfigResponse>;
50
56
  /**
51
57
  * Get the modlog.
58
+ *
52
59
  * `HTTP.GET /modlog`
53
60
  */
54
61
  getModlog(form: GetModlog): Promise<GetModlogResponse>;
55
62
  /**
56
63
  * Search lemmy.
64
+ *
57
65
  * `HTTP.GET /search`
58
66
  */
59
67
  search(form: Search): Promise<SearchResponse>;
60
68
  /**
61
69
  * Fetch a non-local / federated object.
70
+ *
62
71
  * `HTTP.GET /resolve_object`
63
72
  */
64
73
  resolveObject(form: ResolveObject): Promise<ResolveObjectResponse>;
65
74
  /**
66
75
  * Create a new community.
76
+ *
67
77
  * `HTTP.POST /community`
68
78
  */
69
79
  createCommunity(form: CreateCommunity): Promise<CommunityResponse>;
70
80
  /**
71
81
  * Get / fetch a community.
82
+ *
72
83
  * `HTTP.GET /community`
73
84
  */
74
85
  getCommunity(form: GetCommunity): Promise<GetCommunityResponse>;
75
86
  /**
76
87
  * Edit a community.
88
+ *
77
89
  * `HTTP.PUT /community`
78
90
  */
79
91
  editCommunity(form: EditCommunity): Promise<CommunityResponse>;
80
92
  /**
81
93
  * List communities, with various filters.
94
+ *
82
95
  * `HTTP.GET /community/list`
83
96
  */
84
97
  listCommunities(form: ListCommunities): Promise<ListCommunitiesResponse>;
85
98
  /**
86
99
  * Follow / subscribe to a community.
100
+ *
87
101
  * `HTTP.POST /community/follow`
88
102
  */
89
103
  followCommunity(form: FollowCommunity): Promise<CommunityResponse>;
90
104
  /**
91
105
  * Block a community.
106
+ *
92
107
  * `HTTP.POST /community/block`
93
108
  */
94
109
  blockCommunity(form: BlockCommunity): Promise<BlockCommunityResponse>;
95
110
  /**
96
111
  * Delete a community.
112
+ *
97
113
  * `HTTP.POST /community/delete`
98
114
  */
99
115
  deleteCommunity(form: DeleteCommunity): Promise<CommunityResponse>;
100
116
  /**
101
117
  * A moderator remove for a community.
118
+ *
102
119
  * `HTTP.POST /community/remove`
103
120
  */
104
121
  removeCommunity(form: RemoveCommunity): Promise<CommunityResponse>;
105
122
  /**
106
123
  * Transfer your community to an existing moderator.
124
+ *
107
125
  * `HTTP.POST /community/transfer`
108
126
  */
109
127
  transferCommunity(form: TransferCommunity): Promise<GetCommunityResponse>;
110
128
  /**
111
129
  * Ban a user from a community.
130
+ *
112
131
  * `HTTP.POST /community/ban_user`
113
132
  */
114
133
  banFromCommunity(form: BanFromCommunity): Promise<BanFromCommunityResponse>;
115
134
  /**
116
135
  * Add a moderator to your community.
136
+ *
117
137
  * `HTTP.POST /community/mod`
118
138
  */
119
139
  addModToCommunity(form: AddModToCommunity): Promise<AddModToCommunityResponse>;
120
140
  /**
121
141
  * Create a post.
142
+ *
122
143
  * `HTTP.POST /post`
123
144
  */
124
145
  createPost(form: CreatePost): Promise<PostResponse>;
125
146
  /**
126
147
  * Get / fetch a post.
148
+ *
127
149
  * `HTTP.GET /post`
128
150
  */
129
151
  getPost(form: GetPost): Promise<GetPostResponse>;
130
152
  /**
131
153
  * Edit a post.
154
+ *
132
155
  * `HTTP.PUT /post`
133
156
  */
134
157
  editPost(form: EditPost): Promise<PostResponse>;
135
158
  /**
136
159
  * Delete a post.
160
+ *
137
161
  * `HTTP.POST /post/delete`
138
162
  */
139
163
  deletePost(form: DeletePost): Promise<PostResponse>;
140
164
  /**
141
165
  * A moderator remove for a post.
166
+ *
142
167
  * `HTTP.POST /post/remove`
143
168
  */
144
169
  removePost(form: RemovePost): Promise<PostResponse>;
145
170
  /**
146
171
  * Mark a post as read.
172
+ *
147
173
  * `HTTP.POST /post/mark_as_read`
148
174
  */
149
175
  markPostAsRead(form: MarkPostAsRead): Promise<PostResponse>;
150
176
  /**
151
177
  * A moderator can lock a post ( IE disable new comments ).
178
+ *
152
179
  * `HTTP.POST /post/lock`
153
180
  */
154
181
  lockPost(form: LockPost): Promise<PostResponse>;
155
182
  /**
156
183
  * A moderator can sticky a post ( IE stick it to the top of a community ).
184
+ *
157
185
  * `HTTP.POST /post/sticky`
158
186
  */
159
187
  stickyPost(form: StickyPost): Promise<PostResponse>;
160
188
  /**
161
189
  * Get / fetch posts, with various filters.
190
+ *
162
191
  * `HTTP.GET /post/list`
163
192
  */
164
193
  getPosts(form: GetPosts): Promise<GetPostsResponse>;
165
194
  /**
166
195
  * Like / vote on a post.
196
+ *
167
197
  * `HTTP.POST /post/like`
168
198
  */
169
199
  likePost(form: CreatePostLike): Promise<PostResponse>;
170
200
  /**
171
201
  * Save a post.
202
+ *
172
203
  * `HTTP.PUT /post/save`
173
204
  */
174
205
  savePost(form: SavePost): Promise<PostResponse>;
175
206
  /**
176
207
  * Report a post.
208
+ *
177
209
  * `HTTP.POST /post/report`
178
210
  */
179
211
  createPostReport(form: CreatePostReport): Promise<PostReportResponse>;
180
212
  /**
181
213
  * Resolve a post report. Only a mod can do this.
214
+ *
182
215
  * `HTTP.PUT /post/report/resolve`
183
216
  */
184
217
  resolvePostReport(form: ResolvePostReport): Promise<PostReportResponse>;
185
218
  /**
186
219
  * List post reports.
220
+ *
187
221
  * `HTTP.GET /post/report/list`
188
222
  */
189
223
  listPostReports(form: ListPostReports): Promise<ListPostReportsResponse>;
190
224
  /**
191
225
  * Fetch metadata for any given site.
226
+ *
192
227
  * `HTTP.GET /post/site_metadata`
193
228
  */
194
229
  getSiteMetadata(form: GetSiteMetadata): Promise<GetSiteMetadataResponse>;
195
230
  /**
196
231
  * Create a comment.
232
+ *
197
233
  * `HTTP.POST /comment`
198
234
  */
199
235
  createComment(form: CreateComment): Promise<CommentResponse>;
200
236
  /**
201
237
  * Edit a comment.
238
+ *
202
239
  * `HTTP.PUT /comment`
203
240
  */
204
241
  editComment(form: EditComment): Promise<CommentResponse>;
205
242
  /**
206
243
  * Delete a comment.
244
+ *
207
245
  * `HTTP.POST /comment/delete`
208
246
  */
209
247
  deleteComment(form: DeleteComment): Promise<CommentResponse>;
210
248
  /**
211
249
  * A moderator remove for a comment.
250
+ *
212
251
  * `HTTP.POST /comment/remove`
213
252
  */
214
253
  removeComment(form: RemoveComment): Promise<CommentResponse>;
215
254
  /**
216
255
  * Mark a comment as read.
256
+ *
217
257
  * `HTTP.POST /comment/mark_as_read`
218
258
  */
219
259
  markCommentAsRead(form: MarkCommentAsRead): Promise<CommentResponse>;
220
260
  /**
221
261
  * Like / vote on a comment.
262
+ *
222
263
  * `HTTP.POST /comment/like`
223
264
  */
224
265
  likeComment(form: CreateCommentLike): Promise<CommentResponse>;
225
266
  /**
226
267
  * Save a comment.
268
+ *
227
269
  * `HTTP.PUT /comment/save`
228
270
  */
229
271
  saveComment(form: SaveComment): Promise<CommentResponse>;
230
272
  /**
231
273
  * Get / fetch comments.
274
+ *
232
275
  * `HTTP.GET /comment/list`
233
276
  */
234
277
  getComments(form: GetComments): Promise<GetCommentsResponse>;
235
278
  /**
236
279
  * Report a comment.
280
+ *
237
281
  * `HTTP.POST /comment/report`
238
282
  */
239
283
  createCommentReport(form: CreateCommentReport): Promise<CommentReportResponse>;
240
284
  /**
241
285
  * Resolve a comment report. Only a mod can do this.
286
+ *
242
287
  * `HTTP.PUT /comment/report/resolve`
243
288
  */
244
289
  resolveCommentReport(form: ResolveCommentReport): Promise<CommentReportResponse>;
245
290
  /**
246
291
  * List comment reports.
292
+ *
247
293
  * `HTTP.GET /comment/report/list`
248
294
  */
249
295
  listCommentReports(form: ListCommentReports): Promise<ListCommentReportsResponse>;
250
296
  /**
251
297
  * Get / fetch private messages.
298
+ *
252
299
  * `HTTP.GET /private_message/list`
253
300
  */
254
301
  getPrivateMessages(form: GetPrivateMessages): Promise<PrivateMessagesResponse>;
255
302
  /**
256
303
  * Create a private message.
304
+ *
257
305
  * `HTTP.POST /private_message`
258
306
  */
259
307
  createPrivateMessage(form: CreatePrivateMessage): Promise<PrivateMessageResponse>;
260
308
  /**
261
309
  * Edit a private message.
310
+ *
262
311
  * `HTTP.PUT /private_message`
263
312
  */
264
313
  editPrivateMessage(form: EditPrivateMessage): Promise<PrivateMessageResponse>;
265
314
  /**
266
315
  * Delete a private message.
316
+ *
267
317
  * `HTTP.POST /private_message/delete`
268
318
  */
269
319
  deletePrivateMessage(form: DeletePrivateMessage): Promise<PrivateMessageResponse>;
270
320
  /**
271
321
  * Mark a private message as read.
322
+ *
272
323
  * `HTTP.POST /private_message/mark_as_read`
273
324
  */
274
325
  markPrivateMessageAsRead(form: MarkPrivateMessageAsRead): Promise<PrivateMessageResponse>;
275
326
  /**
276
327
  * Register a new user.
328
+ *
277
329
  * `HTTP.POST /user/register`
278
330
  */
279
331
  register(form: Register): Promise<LoginResponse>;
280
332
  /**
281
333
  * Log into lemmy.
334
+ *
282
335
  * `HTTP.POST /user/login`
283
336
  */
284
337
  login(form: Login): Promise<LoginResponse>;
285
338
  /**
286
339
  * Get the details for a person.
340
+ *
287
341
  * `HTTP.GET /user`
288
342
  */
289
343
  getPersonDetails(form: GetPersonDetails): Promise<GetPersonDetailsResponse>;
290
344
  /**
291
345
  * Get mentions for your user.
346
+ *
292
347
  * `HTTP.GET /user/mention`
293
348
  */
294
349
  getPersonMentions(form: GetPersonMentions): Promise<GetPersonMentionsResponse>;
295
350
  /**
296
351
  * Mark a person mention as read.
352
+ *
297
353
  * `HTTP.POST /user/mention/mark_as_read`
298
354
  */
299
355
  markPersonMentionAsRead(form: MarkPersonMentionAsRead): Promise<PersonMentionResponse>;
300
356
  /**
301
357
  * Get comment replies.
358
+ *
302
359
  * `HTTP.GET /user/replies`
303
360
  */
304
361
  getReplies(form: GetReplies): Promise<GetRepliesResponse>;
305
362
  /**
306
363
  * Ban a person from your site.
364
+ *
307
365
  * `HTTP.POST /user/ban`
308
366
  */
309
367
  banPerson(form: BanPerson): Promise<BanPersonResponse>;
310
368
  /**
311
369
  * Get a list of banned users
370
+ *
312
371
  * `HTTP.GET /user/banned`
313
372
  */
314
373
  getBannedPersons(form: GetBannedPersons): Promise<BannedPersonsResponse>;
315
374
  /**
316
375
  * Block a person.
376
+ *
317
377
  * `HTTP.POST /user/block`
318
378
  */
319
379
  blockPerson(form: BlockPerson): Promise<BlockPersonResponse>;
320
380
  /**
321
381
  * Fetch a Captcha.
382
+ *
322
383
  * `HTTP.GET /user/get_captcha`
323
384
  */
324
385
  getCaptcha(): Promise<GetCaptchaResponse>;
325
386
  /**
326
387
  * Delete your account.
388
+ *
327
389
  * `HTTP.POST /user/delete_account`
328
390
  */
329
391
  deleteAccount(form: DeleteAccount): Promise<DeleteAccountResponse>;
330
392
  /**
331
393
  * Reset your password.
394
+ *
332
395
  * `HTTP.POST /user/password_reset`
333
396
  */
334
397
  passwordReset(form: PasswordReset): Promise<PasswordResetResponse>;
335
398
  /**
336
399
  * Change your password from an email / token based reset.
400
+ *
337
401
  * `HTTP.POST /user/password_change`
338
402
  */
339
403
  passwordChange(form: PasswordChange): Promise<LoginResponse>;
340
404
  /**
341
405
  * Mark all replies as read.
406
+ *
342
407
  * `HTTP.POST /user/mark_all_as_read`
343
408
  */
344
409
  markAllAsRead(form: MarkAllAsRead): Promise<GetRepliesResponse>;
345
410
  /**
346
411
  * Save your user settings.
412
+ *
347
413
  * `HTTP.PUT /user/save_user_settings`
348
414
  */
349
415
  saveUserSettings(form: SaveUserSettings): Promise<LoginResponse>;
350
416
  /**
351
417
  * Change your user password.
418
+ *
352
419
  * `HTTP.PUT /user/change_password`
353
420
  */
354
421
  changePassword(form: ChangePassword): Promise<LoginResponse>;
355
422
  /**
356
423
  * Get counts for your reports
424
+ *
357
425
  * `HTTP.GET /user/report_count`
358
426
  */
359
427
  getReportCount(form: GetReportCount): Promise<GetReportCountResponse>;
360
428
  /**
361
429
  * Get your unread counts
430
+ *
362
431
  * `HTTP.GET /user/unread_count`
363
432
  */
364
433
  getUnreadCount(form: GetUnreadCount): Promise<GetUnreadCountResponse>;
365
434
  /**
366
435
  * Verify your email
436
+ *
367
437
  * `HTTP.POST /user/verify_email`
368
438
  */
369
439
  verifyEmail(form: VerifyEmail): Promise<VerifyEmailResponse>;
370
440
  /**
371
441
  * Add an admin to your site.
442
+ *
372
443
  * `HTTP.POST /admin/add`
373
444
  */
374
445
  addAdmin(form: AddAdmin): Promise<AddAdminResponse>;
375
446
  /**
376
447
  * Get the unread registration applications count.
448
+ *
377
449
  * `HTTP.GET /admin/registration_application/count`
378
450
  */
379
451
  getUnreadRegistrationApplicationCount(form: GetUnreadRegistrationApplicationCount): Promise<GetUnreadRegistrationApplicationCountResponse>;
380
452
  /**
381
453
  * List the registration applications.
454
+ *
382
455
  * `HTTP.GET /admin/registration_application/list`
383
456
  */
384
457
  listRegistrationApplications(form: ListRegistrationApplications): Promise<ListRegistrationApplicationsResponse>;
385
458
  /**
386
459
  * Approve a registration application
460
+ *
387
461
  * `HTTP.PUT /admin/registration_application/approve`
388
462
  */
389
463
  approveRegistrationApplication(form: ApproveRegistrationApplication): Promise<RegistrationApplicationResponse>;