lemmy-js-client 0.20.0-private-community.6 → 0.20.0-private-community.9

Sign up to get free protection for your applications and to get access to all the features.
package/dist/http.d.ts CHANGED
@@ -154,6 +154,7 @@ import { GetCommunityPendingFollowsCountResponse } from "./types/GetCommunityPen
154
154
  import { ListCommunityPendingFollowsResponse } from "./types/ListCommunityPendingFollowsResponse";
155
155
  import { ListCommunityPendingFollows } from "./types/ListCommunityPendingFollows";
156
156
  import { CommunityId } from "./types/CommunityId";
157
+ type RequestOptions = Pick<RequestInit, "signal">;
157
158
  /**
158
159
  * Helps build lemmy HTTP requests.
159
160
  */
@@ -175,25 +176,25 @@ export declare class LemmyHttp {
175
176
  *
176
177
  * `HTTP.GET /site`
177
178
  */
178
- getSite(): Promise<GetSiteResponse>;
179
+ getSite(options?: RequestOptions): Promise<GetSiteResponse>;
179
180
  /**
180
181
  * Create your site.
181
182
  *
182
183
  * `HTTP.POST /site`
183
184
  */
184
- createSite(form: CreateSite): Promise<SiteResponse>;
185
+ createSite(form: CreateSite, options?: RequestOptions): Promise<SiteResponse>;
185
186
  /**
186
187
  * Edit your site.
187
188
  *
188
189
  * `HTTP.PUT /site`
189
190
  */
190
- editSite(form: EditSite): Promise<SiteResponse>;
191
+ editSite(form: EditSite, options?: RequestOptions): Promise<SiteResponse>;
191
192
  /**
192
193
  * Leave the Site admins.
193
194
  *
194
195
  * `HTTP.POST /user/leave_admin`
195
196
  */
196
- leaveAdmin(): Promise<GetSiteResponse>;
197
+ leaveAdmin(options?: RequestOptions): Promise<GetSiteResponse>;
197
198
  /**
198
199
  * Generate a TOTP / two-factor secret.
199
200
  *
@@ -201,44 +202,44 @@ export declare class LemmyHttp {
201
202
  *
202
203
  * `HTTP.POST /user/totp/generate`
203
204
  */
204
- generateTotpSecret(): Promise<GenerateTotpSecretResponse>;
205
+ generateTotpSecret(options?: RequestOptions): Promise<GenerateTotpSecretResponse>;
205
206
  /**
206
207
  * Export a backup of your user settings, including your saved content,
207
208
  * followed communities, and blocks.
208
209
  *
209
210
  * `HTTP.GET /user/export_settings`
210
211
  */
211
- exportSettings(): Promise<string>;
212
+ exportSettings(options?: RequestOptions): Promise<string>;
212
213
  /**
213
214
  * Import a backup of your user settings.
214
215
  *
215
216
  * `HTTP.POST /user/import_settings`
216
217
  */
217
- importSettings(form: any): Promise<SuccessResponse>;
218
+ importSettings(form: any, options?: RequestOptions): Promise<SuccessResponse>;
218
219
  /**
219
220
  * List login tokens for your user
220
221
  *
221
222
  * `HTTP.GET /user/list_logins`
222
223
  */
223
- listLogins(): Promise<LoginToken[]>;
224
+ listLogins(options?: RequestOptions): Promise<LoginToken[]>;
224
225
  /**
225
226
  * Returns an error message if your auth token is invalid
226
227
  *
227
228
  * `HTTP.GET /user/validate_auth`
228
229
  */
229
- validateAuth(): Promise<SuccessResponse>;
230
+ validateAuth(options?: RequestOptions): Promise<SuccessResponse>;
230
231
  /**
231
232
  * List all the media for your user
232
233
  *
233
234
  * `HTTP.GET /account/list_media`
234
235
  */
235
- listMedia(form?: ListMedia): Promise<ListMediaResponse>;
236
+ listMedia(form?: ListMedia, options?: RequestOptions): Promise<ListMediaResponse>;
236
237
  /**
237
238
  * List all the media known to your instance.
238
239
  *
239
240
  * `HTTP.GET /admin/list_all_media`
240
241
  */
241
- listAllMedia(form?: ListMedia): Promise<ListMediaResponse>;
242
+ listAllMedia(form?: ListMedia, options?: RequestOptions): Promise<ListMediaResponse>;
242
243
  /**
243
244
  * Enable / Disable TOTP / two-factor authentication.
244
245
  *
@@ -248,606 +249,606 @@ export declare class LemmyHttp {
248
249
  *
249
250
  * `HTTP.POST /user/totp/update`
250
251
  */
251
- updateTotp(form: UpdateTotp): Promise<UpdateTotpResponse>;
252
+ updateTotp(form: UpdateTotp, options?: RequestOptions): Promise<UpdateTotpResponse>;
252
253
  /**
253
254
  * Get the modlog.
254
255
  *
255
256
  * `HTTP.GET /modlog`
256
257
  */
257
- getModlog(form?: GetModlog): Promise<GetModlogResponse>;
258
+ getModlog(form?: GetModlog, options?: RequestOptions): Promise<GetModlogResponse>;
258
259
  /**
259
260
  * Search lemmy.
260
261
  *
261
262
  * `HTTP.GET /search`
262
263
  */
263
- search(form: Search): Promise<SearchResponse>;
264
+ search(form: Search, options?: RequestOptions): Promise<SearchResponse>;
264
265
  /**
265
266
  * Fetch a non-local / federated object.
266
267
  *
267
268
  * `HTTP.GET /resolve_object`
268
269
  */
269
- resolveObject(form: ResolveObject): Promise<ResolveObjectResponse>;
270
+ resolveObject(form: ResolveObject, options?: RequestOptions): Promise<ResolveObjectResponse>;
270
271
  /**
271
272
  * Create a new community.
272
273
  *
273
274
  * `HTTP.POST /community`
274
275
  */
275
- createCommunity(form: CreateCommunity): Promise<CommunityResponse>;
276
+ createCommunity(form: CreateCommunity, options?: RequestOptions): Promise<CommunityResponse>;
276
277
  /**
277
278
  * Get / fetch a community.
278
279
  *
279
280
  * `HTTP.GET /community`
280
281
  */
281
- getCommunity(form?: GetCommunity): Promise<GetCommunityResponse>;
282
+ getCommunity(form?: GetCommunity, options?: RequestOptions): Promise<GetCommunityResponse>;
282
283
  /**
283
284
  * Edit a community.
284
285
  *
285
286
  * `HTTP.PUT /community`
286
287
  */
287
- editCommunity(form: EditCommunity): Promise<CommunityResponse>;
288
+ editCommunity(form: EditCommunity, options?: RequestOptions): Promise<CommunityResponse>;
288
289
  /**
289
290
  * List communities, with various filters.
290
291
  *
291
292
  * `HTTP.GET /community/list`
292
293
  */
293
- listCommunities(form?: ListCommunities): Promise<ListCommunitiesResponse>;
294
+ listCommunities(form?: ListCommunities, options?: RequestOptions): Promise<ListCommunitiesResponse>;
294
295
  /**
295
296
  * Follow / subscribe to a community.
296
297
  *
297
298
  * `HTTP.POST /community/follow`
298
299
  */
299
- followCommunity(form: FollowCommunity): Promise<CommunityResponse>;
300
- getCommunityPendingFollowsCount(community_id: CommunityId): Promise<GetCommunityPendingFollowsCountResponse>;
301
- listCommunityPendingFollows(form: ListCommunityPendingFollows): Promise<ListCommunityPendingFollowsResponse>;
302
- approveCommunityPendingFollow(form: ApproveCommunityPendingFollower): Promise<SuccessResponse>;
300
+ followCommunity(form: FollowCommunity, options?: RequestOptions): Promise<CommunityResponse>;
301
+ getCommunityPendingFollowsCount(community_id: CommunityId, options?: RequestOptions): Promise<GetCommunityPendingFollowsCountResponse>;
302
+ listCommunityPendingFollows(form: ListCommunityPendingFollows, options?: RequestOptions): Promise<ListCommunityPendingFollowsResponse>;
303
+ approveCommunityPendingFollow(form: ApproveCommunityPendingFollower, options?: RequestOptions): Promise<SuccessResponse>;
303
304
  /**
304
305
  * Block a community.
305
306
  *
306
307
  * `HTTP.POST /community/block`
307
308
  */
308
- blockCommunity(form: BlockCommunity): Promise<BlockCommunityResponse>;
309
+ blockCommunity(form: BlockCommunity, options?: RequestOptions): Promise<BlockCommunityResponse>;
309
310
  /**
310
311
  * Delete a community.
311
312
  *
312
313
  * `HTTP.POST /community/delete`
313
314
  */
314
- deleteCommunity(form: DeleteCommunity): Promise<CommunityResponse>;
315
+ deleteCommunity(form: DeleteCommunity, options?: RequestOptions): Promise<CommunityResponse>;
315
316
  /**
316
317
  * Hide a community from public / "All" view. Admins only.
317
318
  *
318
319
  * `HTTP.PUT /community/hide`
319
320
  */
320
- hideCommunity(form: HideCommunity): Promise<SuccessResponse>;
321
+ hideCommunity(form: HideCommunity, options?: RequestOptions): Promise<SuccessResponse>;
321
322
  /**
322
323
  * A moderator remove for a community.
323
324
  *
324
325
  * `HTTP.POST /community/remove`
325
326
  */
326
- removeCommunity(form: RemoveCommunity): Promise<CommunityResponse>;
327
+ removeCommunity(form: RemoveCommunity, options?: RequestOptions): Promise<CommunityResponse>;
327
328
  /**
328
329
  * Transfer your community to an existing moderator.
329
330
  *
330
331
  * `HTTP.POST /community/transfer`
331
332
  */
332
- transferCommunity(form: TransferCommunity): Promise<GetCommunityResponse>;
333
+ transferCommunity(form: TransferCommunity, options?: RequestOptions): Promise<GetCommunityResponse>;
333
334
  /**
334
335
  * Ban a user from a community.
335
336
  *
336
337
  * `HTTP.POST /community/ban_user`
337
338
  */
338
- banFromCommunity(form: BanFromCommunity): Promise<BanFromCommunityResponse>;
339
+ banFromCommunity(form: BanFromCommunity, options?: RequestOptions): Promise<BanFromCommunityResponse>;
339
340
  /**
340
341
  * Add a moderator to your community.
341
342
  *
342
343
  * `HTTP.POST /community/mod`
343
344
  */
344
- addModToCommunity(form: AddModToCommunity): Promise<AddModToCommunityResponse>;
345
+ addModToCommunity(form: AddModToCommunity, options?: RequestOptions): Promise<AddModToCommunityResponse>;
345
346
  /**
346
347
  * Get a random community.
347
348
  *
348
349
  * `HTTP.GET /community/random`
349
350
  */
350
- getRandomCommunity(form: GetRandomCommunity): Promise<CommunityResponse>;
351
+ getRandomCommunity(form: GetRandomCommunity, options?: RequestOptions): Promise<CommunityResponse>;
351
352
  /**
352
353
  * Create a post.
353
354
  *
354
355
  * `HTTP.POST /post`
355
356
  */
356
- createPost(form: CreatePost): Promise<PostResponse>;
357
+ createPost(form: CreatePost, options?: RequestOptions): Promise<PostResponse>;
357
358
  /**
358
359
  * Get / fetch a post.
359
360
  *
360
361
  * `HTTP.GET /post`
361
362
  */
362
- getPost(form?: GetPost): Promise<GetPostResponse>;
363
+ getPost(form?: GetPost, options?: RequestOptions): Promise<GetPostResponse>;
363
364
  /**
364
365
  * Edit a post.
365
366
  *
366
367
  * `HTTP.PUT /post`
367
368
  */
368
- editPost(form: EditPost): Promise<PostResponse>;
369
+ editPost(form: EditPost, options?: RequestOptions): Promise<PostResponse>;
369
370
  /**
370
371
  * Delete a post.
371
372
  *
372
373
  * `HTTP.POST /post/delete`
373
374
  */
374
- deletePost(form: DeletePost): Promise<PostResponse>;
375
+ deletePost(form: DeletePost, options?: RequestOptions): Promise<PostResponse>;
375
376
  /**
376
377
  * A moderator remove for a post.
377
378
  *
378
379
  * `HTTP.POST /post/remove`
379
380
  */
380
- removePost(form: RemovePost): Promise<PostResponse>;
381
+ removePost(form: RemovePost, options?: RequestOptions): Promise<PostResponse>;
381
382
  /**
382
383
  * Mark a post as read.
383
384
  *
384
385
  * `HTTP.POST /post/mark_as_read`
385
386
  */
386
- markPostAsRead(form: MarkPostAsRead): Promise<SuccessResponse>;
387
+ markPostAsRead(form: MarkPostAsRead, options?: RequestOptions): Promise<SuccessResponse>;
387
388
  /**
388
389
  * Hide a post from list views.
389
390
  *
390
391
  * `HTTP.POST /post/hide`
391
392
  */
392
- hidePost(form: HidePost): Promise<SuccessResponse>;
393
+ hidePost(form: HidePost, options?: RequestOptions): Promise<SuccessResponse>;
393
394
  /**
394
395
  * A moderator can lock a post ( IE disable new comments ).
395
396
  *
396
397
  * `HTTP.POST /post/lock`
397
398
  */
398
- lockPost(form: LockPost): Promise<PostResponse>;
399
+ lockPost(form: LockPost, options?: RequestOptions): Promise<PostResponse>;
399
400
  /**
400
401
  * A moderator can feature a community post ( IE stick it to the top of a community ).
401
402
  *
402
403
  * `HTTP.POST /post/feature`
403
404
  */
404
- featurePost(form: FeaturePost): Promise<PostResponse>;
405
+ featurePost(form: FeaturePost, options?: RequestOptions): Promise<PostResponse>;
405
406
  /**
406
407
  * Get / fetch posts, with various filters.
407
408
  *
408
409
  * `HTTP.GET /post/list`
409
410
  */
410
- getPosts(form?: GetPosts): Promise<GetPostsResponse>;
411
+ getPosts(form?: GetPosts, options?: RequestOptions): Promise<GetPostsResponse>;
411
412
  /**
412
413
  * Like / vote on a post.
413
414
  *
414
415
  * `HTTP.POST /post/like`
415
416
  */
416
- likePost(form: CreatePostLike): Promise<PostResponse>;
417
+ likePost(form: CreatePostLike, options?: RequestOptions): Promise<PostResponse>;
417
418
  /**
418
419
  * List a post's likes. Admin-only.
419
420
  *
420
421
  * `HTTP.GET /post/like/list`
421
422
  */
422
- listPostLikes(form: ListPostLikes): Promise<ListPostLikesResponse>;
423
+ listPostLikes(form: ListPostLikes, options?: RequestOptions): Promise<ListPostLikesResponse>;
423
424
  /**
424
425
  * Save a post.
425
426
  *
426
427
  * `HTTP.PUT /post/save`
427
428
  */
428
- savePost(form: SavePost): Promise<PostResponse>;
429
+ savePost(form: SavePost, options?: RequestOptions): Promise<PostResponse>;
429
430
  /**
430
431
  * Report a post.
431
432
  *
432
433
  * `HTTP.POST /post/report`
433
434
  */
434
- createPostReport(form: CreatePostReport): Promise<PostReportResponse>;
435
+ createPostReport(form: CreatePostReport, options?: RequestOptions): Promise<PostReportResponse>;
435
436
  /**
436
437
  * Resolve a post report. Only a mod can do this.
437
438
  *
438
439
  * `HTTP.PUT /post/report/resolve`
439
440
  */
440
- resolvePostReport(form: ResolvePostReport): Promise<PostReportResponse>;
441
+ resolvePostReport(form: ResolvePostReport, options?: RequestOptions): Promise<PostReportResponse>;
441
442
  /**
442
443
  * List post reports.
443
444
  *
444
445
  * `HTTP.GET /post/report/list`
445
446
  */
446
- listPostReports(form: ListPostReports): Promise<ListPostReportsResponse>;
447
+ listPostReports(form: ListPostReports, options?: RequestOptions): Promise<ListPostReportsResponse>;
447
448
  /**
448
449
  * Fetch metadata for any given site.
449
450
  *
450
451
  * `HTTP.GET /post/site_metadata`
451
452
  */
452
- getSiteMetadata(form: GetSiteMetadata): Promise<GetSiteMetadataResponse>;
453
+ getSiteMetadata(form: GetSiteMetadata, options?: RequestOptions): Promise<GetSiteMetadataResponse>;
453
454
  /**
454
455
  * Create a comment.
455
456
  *
456
457
  * `HTTP.POST /comment`
457
458
  */
458
- createComment(form: CreateComment): Promise<CommentResponse>;
459
+ createComment(form: CreateComment, options?: RequestOptions): Promise<CommentResponse>;
459
460
  /**
460
461
  * Edit a comment.
461
462
  *
462
463
  * `HTTP.PUT /comment`
463
464
  */
464
- editComment(form: EditComment): Promise<CommentResponse>;
465
+ editComment(form: EditComment, options?: RequestOptions): Promise<CommentResponse>;
465
466
  /**
466
467
  * Delete a comment.
467
468
  *
468
469
  * `HTTP.POST /comment/delete`
469
470
  */
470
- deleteComment(form: DeleteComment): Promise<CommentResponse>;
471
+ deleteComment(form: DeleteComment, options?: RequestOptions): Promise<CommentResponse>;
471
472
  /**
472
473
  * A moderator remove for a comment.
473
474
  *
474
475
  * `HTTP.POST /comment/remove`
475
476
  */
476
- removeComment(form: RemoveComment): Promise<CommentResponse>;
477
+ removeComment(form: RemoveComment, options?: RequestOptions): Promise<CommentResponse>;
477
478
  /**
478
479
  * Mark a comment as read.
479
480
  *
480
481
  * `HTTP.POST /comment/mark_as_read`
481
482
  */
482
- markCommentReplyAsRead(form: MarkCommentReplyAsRead): Promise<CommentReplyResponse>;
483
+ markCommentReplyAsRead(form: MarkCommentReplyAsRead, options?: RequestOptions): Promise<CommentReplyResponse>;
483
484
  /**
484
485
  * Like / vote on a comment.
485
486
  *
486
487
  * `HTTP.POST /comment/like`
487
488
  */
488
- likeComment(form: CreateCommentLike): Promise<CommentResponse>;
489
+ likeComment(form: CreateCommentLike, options?: RequestOptions): Promise<CommentResponse>;
489
490
  /**
490
491
  * List a comment's likes. Admin-only.
491
492
  *
492
493
  * `HTTP.GET /comment/like/list`
493
494
  */
494
- listCommentLikes(form: ListCommentLikes): Promise<ListCommentLikesResponse>;
495
+ listCommentLikes(form: ListCommentLikes, options?: RequestOptions): Promise<ListCommentLikesResponse>;
495
496
  /**
496
497
  * Save a comment.
497
498
  *
498
499
  * `HTTP.PUT /comment/save`
499
500
  */
500
- saveComment(form: SaveComment): Promise<CommentResponse>;
501
+ saveComment(form: SaveComment, options?: RequestOptions): Promise<CommentResponse>;
501
502
  /**
502
503
  * Distinguishes a comment (speak as moderator)
503
504
  *
504
505
  * `HTTP.POST /comment/distinguish`
505
506
  */
506
- distinguishComment(form: DistinguishComment): Promise<CommentResponse>;
507
+ distinguishComment(form: DistinguishComment, options?: RequestOptions): Promise<CommentResponse>;
507
508
  /**
508
509
  * Get / fetch comments.
509
510
  *
510
511
  * `HTTP.GET /comment/list`
511
512
  */
512
- getComments(form?: GetComments): Promise<GetCommentsResponse>;
513
+ getComments(form?: GetComments, options?: RequestOptions): Promise<GetCommentsResponse>;
513
514
  /**
514
515
  * Get / fetch comment.
515
516
  *
516
517
  * `HTTP.GET /comment`
517
518
  */
518
- getComment(form: GetComment): Promise<CommentResponse>;
519
+ getComment(form: GetComment, options?: RequestOptions): Promise<CommentResponse>;
519
520
  /**
520
521
  * Report a comment.
521
522
  *
522
523
  * `HTTP.POST /comment/report`
523
524
  */
524
- createCommentReport(form: CreateCommentReport): Promise<CommentReportResponse>;
525
+ createCommentReport(form: CreateCommentReport, options?: RequestOptions): Promise<CommentReportResponse>;
525
526
  /**
526
527
  * Resolve a comment report. Only a mod can do this.
527
528
  *
528
529
  * `HTTP.PUT /comment/report/resolve`
529
530
  */
530
- resolveCommentReport(form: ResolveCommentReport): Promise<CommentReportResponse>;
531
+ resolveCommentReport(form: ResolveCommentReport, options?: RequestOptions): Promise<CommentReportResponse>;
531
532
  /**
532
533
  * List comment reports.
533
534
  *
534
535
  * `HTTP.GET /comment/report/list`
535
536
  */
536
- listCommentReports(form: ListCommentReports): Promise<ListCommentReportsResponse>;
537
+ listCommentReports(form: ListCommentReports, options?: RequestOptions): Promise<ListCommentReportsResponse>;
537
538
  /**
538
539
  * Get / fetch private messages.
539
540
  *
540
541
  * `HTTP.GET /private_message/list`
541
542
  */
542
- getPrivateMessages(form: GetPrivateMessages): Promise<PrivateMessagesResponse>;
543
+ getPrivateMessages(form: GetPrivateMessages, options?: RequestOptions): Promise<PrivateMessagesResponse>;
543
544
  /**
544
545
  * Create a private message.
545
546
  *
546
547
  * `HTTP.POST /private_message`
547
548
  */
548
- createPrivateMessage(form: CreatePrivateMessage): Promise<PrivateMessageResponse>;
549
+ createPrivateMessage(form: CreatePrivateMessage, options?: RequestOptions): Promise<PrivateMessageResponse>;
549
550
  /**
550
551
  * Edit a private message.
551
552
  *
552
553
  * `HTTP.PUT /private_message`
553
554
  */
554
- editPrivateMessage(form: EditPrivateMessage): Promise<PrivateMessageResponse>;
555
+ editPrivateMessage(form: EditPrivateMessage, options?: RequestOptions): Promise<PrivateMessageResponse>;
555
556
  /**
556
557
  * Delete a private message.
557
558
  *
558
559
  * `HTTP.POST /private_message/delete`
559
560
  */
560
- deletePrivateMessage(form: DeletePrivateMessage): Promise<PrivateMessageResponse>;
561
+ deletePrivateMessage(form: DeletePrivateMessage, options?: RequestOptions): Promise<PrivateMessageResponse>;
561
562
  /**
562
563
  * Mark a private message as read.
563
564
  *
564
565
  * `HTTP.POST /private_message/mark_as_read`
565
566
  */
566
- markPrivateMessageAsRead(form: MarkPrivateMessageAsRead): Promise<PrivateMessageResponse>;
567
+ markPrivateMessageAsRead(form: MarkPrivateMessageAsRead, options?: RequestOptions): Promise<PrivateMessageResponse>;
567
568
  /**
568
569
  * Create a report for a private message.
569
570
  *
570
571
  * `HTTP.POST /private_message/report`
571
572
  */
572
- createPrivateMessageReport(form: CreatePrivateMessageReport): Promise<PrivateMessageReportResponse>;
573
+ createPrivateMessageReport(form: CreatePrivateMessageReport, options?: RequestOptions): Promise<PrivateMessageReportResponse>;
573
574
  /**
574
575
  * Resolve a report for a private message.
575
576
  *
576
577
  * `HTTP.PUT /private_message/report/resolve`
577
578
  */
578
- resolvePrivateMessageReport(form: ResolvePrivateMessageReport): Promise<PrivateMessageReportResponse>;
579
+ resolvePrivateMessageReport(form: ResolvePrivateMessageReport, options?: RequestOptions): Promise<PrivateMessageReportResponse>;
579
580
  /**
580
581
  * List private message reports.
581
582
  *
582
583
  * `HTTP.GET /private_message/report/list`
583
584
  */
584
- listPrivateMessageReports(form: ListPrivateMessageReports): Promise<ListPrivateMessageReportsResponse>;
585
+ listPrivateMessageReports(form: ListPrivateMessageReports, options?: RequestOptions): Promise<ListPrivateMessageReportsResponse>;
585
586
  /**
586
587
  * Register a new user.
587
588
  *
588
589
  * `HTTP.POST /user/register`
589
590
  */
590
- register(form: Register): Promise<LoginResponse>;
591
+ register(form: Register, options?: RequestOptions): Promise<LoginResponse>;
591
592
  /**
592
593
  * Log into lemmy.
593
594
  *
594
595
  * `HTTP.POST /user/login`
595
596
  */
596
- login(form: Login): Promise<LoginResponse>;
597
+ login(form: Login, options?: RequestOptions): Promise<LoginResponse>;
597
598
  /**
598
599
  * Invalidate the currently used auth token.
599
600
  *
600
601
  * `HTTP.POST /user/logout`
601
602
  */
602
- logout(): Promise<SuccessResponse>;
603
+ logout(options?: RequestOptions): Promise<SuccessResponse>;
603
604
  /**
604
605
  * Get the details for a person.
605
606
  *
606
607
  * `HTTP.GET /user`
607
608
  */
608
- getPersonDetails(form?: GetPersonDetails): Promise<GetPersonDetailsResponse>;
609
+ getPersonDetails(form?: GetPersonDetails, options?: RequestOptions): Promise<GetPersonDetailsResponse>;
609
610
  /**
610
611
  * Get mentions for your user.
611
612
  *
612
613
  * `HTTP.GET /user/mention`
613
614
  */
614
- getPersonMentions(form: GetPersonMentions): Promise<GetPersonMentionsResponse>;
615
+ getPersonMentions(form: GetPersonMentions, options?: RequestOptions): Promise<GetPersonMentionsResponse>;
615
616
  /**
616
617
  * Mark a person mention as read.
617
618
  *
618
619
  * `HTTP.POST /user/mention/mark_as_read`
619
620
  */
620
- markPersonMentionAsRead(form: MarkPersonMentionAsRead): Promise<PersonMentionResponse>;
621
+ markPersonMentionAsRead(form: MarkPersonMentionAsRead, options?: RequestOptions): Promise<PersonMentionResponse>;
621
622
  /**
622
623
  * Get comment replies.
623
624
  *
624
625
  * `HTTP.GET /user/replies`
625
626
  */
626
- getReplies(form: GetReplies): Promise<GetRepliesResponse>;
627
+ getReplies(form: GetReplies, options?: RequestOptions): Promise<GetRepliesResponse>;
627
628
  /**
628
629
  * Ban a person from your site.
629
630
  *
630
631
  * `HTTP.POST /user/ban`
631
632
  */
632
- banPerson(form: BanPerson): Promise<BanPersonResponse>;
633
+ banPerson(form: BanPerson, options?: RequestOptions): Promise<BanPersonResponse>;
633
634
  /**
634
635
  * Get a list of banned users
635
636
  *
636
637
  * `HTTP.GET /user/banned`
637
638
  */
638
- getBannedPersons(): Promise<BannedPersonsResponse>;
639
+ getBannedPersons(options?: RequestOptions): Promise<BannedPersonsResponse>;
639
640
  /**
640
641
  * Block a person.
641
642
  *
642
643
  * `HTTP.POST /user/block`
643
644
  */
644
- blockPerson(form: BlockPerson): Promise<BlockPersonResponse>;
645
+ blockPerson(form: BlockPerson, options?: RequestOptions): Promise<BlockPersonResponse>;
645
646
  /**
646
647
  * Fetch a Captcha.
647
648
  *
648
649
  * `HTTP.GET /user/get_captcha`
649
650
  */
650
- getCaptcha(): Promise<GetCaptchaResponse>;
651
+ getCaptcha(options?: RequestOptions): Promise<GetCaptchaResponse>;
651
652
  /**
652
653
  * Delete your account.
653
654
  *
654
655
  * `HTTP.POST /user/delete_account`
655
656
  */
656
- deleteAccount(form: DeleteAccount): Promise<SuccessResponse>;
657
+ deleteAccount(form: DeleteAccount, options?: RequestOptions): Promise<SuccessResponse>;
657
658
  /**
658
659
  * Reset your password.
659
660
  *
660
661
  * `HTTP.POST /user/password_reset`
661
662
  */
662
- passwordReset(form: PasswordReset): Promise<SuccessResponse>;
663
+ passwordReset(form: PasswordReset, options?: RequestOptions): Promise<SuccessResponse>;
663
664
  /**
664
665
  * Change your password from an email / token based reset.
665
666
  *
666
667
  * `HTTP.POST /user/password_change`
667
668
  */
668
- passwordChangeAfterReset(form: PasswordChangeAfterReset): Promise<SuccessResponse>;
669
+ passwordChangeAfterReset(form: PasswordChangeAfterReset, options?: RequestOptions): Promise<SuccessResponse>;
669
670
  /**
670
671
  * Mark all replies as read.
671
672
  *
672
673
  * `HTTP.POST /user/mark_all_as_read`
673
674
  */
674
- markAllAsRead(): Promise<GetRepliesResponse>;
675
+ markAllAsRead(options?: RequestOptions): Promise<GetRepliesResponse>;
675
676
  /**
676
677
  * Save your user settings.
677
678
  *
678
679
  * `HTTP.PUT /user/save_user_settings`
679
680
  */
680
- saveUserSettings(form: SaveUserSettings): Promise<SuccessResponse>;
681
+ saveUserSettings(form: SaveUserSettings, options?: RequestOptions): Promise<SuccessResponse>;
681
682
  /**
682
683
  * Change your user password.
683
684
  *
684
685
  * `HTTP.PUT /user/change_password`
685
686
  */
686
- changePassword(form: ChangePassword): Promise<LoginResponse>;
687
+ changePassword(form: ChangePassword, options?: RequestOptions): Promise<LoginResponse>;
687
688
  /**
688
689
  * Get counts for your reports
689
690
  *
690
691
  * `HTTP.GET /user/report_count`
691
692
  */
692
- getReportCount(form: GetReportCount): Promise<GetReportCountResponse>;
693
+ getReportCount(form: GetReportCount, options?: RequestOptions): Promise<GetReportCountResponse>;
693
694
  /**
694
695
  * Get your unread counts
695
696
  *
696
697
  * `HTTP.GET /user/unread_count`
697
698
  */
698
- getUnreadCount(): Promise<GetUnreadCountResponse>;
699
+ getUnreadCount(options?: RequestOptions): Promise<GetUnreadCountResponse>;
699
700
  /**
700
701
  * Verify your email
701
702
  *
702
703
  * `HTTP.POST /user/verify_email`
703
704
  */
704
- verifyEmail(form: VerifyEmail): Promise<SuccessResponse>;
705
+ verifyEmail(form: VerifyEmail, options?: RequestOptions): Promise<SuccessResponse>;
705
706
  /**
706
707
  * Add an admin to your site.
707
708
  *
708
709
  * `HTTP.POST /admin/add`
709
710
  */
710
- addAdmin(form: AddAdmin): Promise<AddAdminResponse>;
711
+ addAdmin(form: AddAdmin, options?: RequestOptions): Promise<AddAdminResponse>;
711
712
  /**
712
713
  * Get the unread registration applications count.
713
714
  *
714
715
  * `HTTP.GET /admin/registration_application/count`
715
716
  */
716
- getUnreadRegistrationApplicationCount(): Promise<GetUnreadRegistrationApplicationCountResponse>;
717
+ getUnreadRegistrationApplicationCount(options?: RequestOptions): Promise<GetUnreadRegistrationApplicationCountResponse>;
717
718
  /**
718
719
  * List the registration applications.
719
720
  *
720
721
  * `HTTP.GET /admin/registration_application/list`
721
722
  */
722
- listRegistrationApplications(form: ListRegistrationApplications): Promise<ListRegistrationApplicationsResponse>;
723
+ listRegistrationApplications(form: ListRegistrationApplications, options?: RequestOptions): Promise<ListRegistrationApplicationsResponse>;
723
724
  /**
724
725
  * Approve a registration application
725
726
  *
726
727
  * `HTTP.PUT /admin/registration_application/approve`
727
728
  */
728
- approveRegistrationApplication(form: ApproveRegistrationApplication): Promise<RegistrationApplicationResponse>;
729
+ approveRegistrationApplication(form: ApproveRegistrationApplication, options?: RequestOptions): Promise<RegistrationApplicationResponse>;
729
730
  /**
730
731
  * Get the application a user submitted when they first registered their account
731
732
  *
732
733
  * `HTTP.GET /admin/registration_application`
733
734
  */
734
- getRegistrationApplication(form: GetRegistrationApplication): Promise<RegistrationApplicationResponse>;
735
+ getRegistrationApplication(form: GetRegistrationApplication, options?: RequestOptions): Promise<RegistrationApplicationResponse>;
735
736
  /**
736
737
  * Purge / Delete a person from the database.
737
738
  *
738
739
  * `HTTP.POST /admin/purge/person`
739
740
  */
740
- purgePerson(form: PurgePerson): Promise<SuccessResponse>;
741
+ purgePerson(form: PurgePerson, options?: RequestOptions): Promise<SuccessResponse>;
741
742
  /**
742
743
  * Purge / Delete a community from the database.
743
744
  *
744
745
  * `HTTP.POST /admin/purge/community`
745
746
  */
746
- purgeCommunity(form: PurgeCommunity): Promise<SuccessResponse>;
747
+ purgeCommunity(form: PurgeCommunity, options?: RequestOptions): Promise<SuccessResponse>;
747
748
  /**
748
749
  * Purge / Delete a post from the database.
749
750
  *
750
751
  * `HTTP.POST /admin/purge/post`
751
752
  */
752
- purgePost(form: PurgePost): Promise<SuccessResponse>;
753
+ purgePost(form: PurgePost, options?: RequestOptions): Promise<SuccessResponse>;
753
754
  /**
754
755
  * Purge / Delete a comment from the database.
755
756
  *
756
757
  * `HTTP.POST /admin/purge/comment`
757
758
  */
758
- purgeComment(form: PurgeComment): Promise<SuccessResponse>;
759
+ purgeComment(form: PurgeComment, options?: RequestOptions): Promise<SuccessResponse>;
759
760
  /**
760
761
  * Create a new custom emoji
761
762
  *
762
763
  * `HTTP.POST /custom_emoji`
763
764
  */
764
- createCustomEmoji(form: CreateCustomEmoji): Promise<CustomEmojiResponse>;
765
+ createCustomEmoji(form: CreateCustomEmoji, options?: RequestOptions): Promise<CustomEmojiResponse>;
765
766
  /**
766
767
  * Edit an existing custom emoji
767
768
  *
768
769
  * `HTTP.PUT /custom_emoji`
769
770
  */
770
- editCustomEmoji(form: EditCustomEmoji): Promise<CustomEmojiResponse>;
771
+ editCustomEmoji(form: EditCustomEmoji, options?: RequestOptions): Promise<CustomEmojiResponse>;
771
772
  /**
772
773
  * Delete a custom emoji
773
774
  *
774
775
  * `HTTP.Post /custom_emoji/delete`
775
776
  */
776
- deleteCustomEmoji(form: DeleteCustomEmoji): Promise<SuccessResponse>;
777
+ deleteCustomEmoji(form: DeleteCustomEmoji, options?: RequestOptions): Promise<SuccessResponse>;
777
778
  /**
778
779
  * List custom emojis
779
780
  *
780
781
  * `HTTP.GET /custom_emoji/list`
781
782
  */
782
- listCustomEmojis(form: ListCustomEmojis): Promise<ListCustomEmojisResponse>;
783
+ listCustomEmojis(form: ListCustomEmojis, options?: RequestOptions): Promise<ListCustomEmojisResponse>;
783
784
  /**
784
785
  * Create a new tagline
785
786
  *
786
787
  * `HTTP.POST /admin/tagline`
787
788
  */
788
- createTagline(form: CreateTagline): Promise<TaglineResponse>;
789
+ createTagline(form: CreateTagline, options?: RequestOptions): Promise<TaglineResponse>;
789
790
  /**
790
791
  * Edit an existing tagline
791
792
  *
792
793
  * `HTTP.PUT /admin/tagline`
793
794
  */
794
- editTagline(form: UpdateTagline): Promise<TaglineResponse>;
795
+ editTagline(form: UpdateTagline, options?: RequestOptions): Promise<TaglineResponse>;
795
796
  /**
796
797
  * Delete a tagline
797
798
  *
798
799
  * `HTTP.Post /admin/tagline/delete`
799
800
  */
800
- deleteTagline(form: DeleteTagline): Promise<SuccessResponse>;
801
+ deleteTagline(form: DeleteTagline, options?: RequestOptions): Promise<SuccessResponse>;
801
802
  /**
802
803
  * List taglines
803
804
  *
804
805
  * `HTTP.GET /admin/tagline/list`
805
806
  */
806
- listTaglines(form: ListTaglines): Promise<ListTaglinesResponse>;
807
+ listTaglines(form: ListTaglines, options?: RequestOptions): Promise<ListTaglinesResponse>;
807
808
  /**
808
809
  * Create a new oauth provider method
809
810
  *
810
811
  * `HTTP.POST /oauth_provider`
811
812
  */
812
- createOAuthProvider(form: CreateOAuthProvider): Promise<OAuthProvider>;
813
+ createOAuthProvider(form: CreateOAuthProvider, options?: RequestOptions): Promise<OAuthProvider>;
813
814
  /**
814
815
  * Edit an existing oauth provider method
815
816
  *
816
817
  * `HTTP.PUT /oauth_provider`
817
818
  */
818
- editOAuthProvider(form: EditOAuthProvider): Promise<OAuthProvider>;
819
+ editOAuthProvider(form: EditOAuthProvider, options?: RequestOptions): Promise<OAuthProvider>;
819
820
  /**
820
821
  * Delete an oauth provider method
821
822
  *
822
823
  * `HTTP.Post /oauth_provider/delete`
823
824
  */
824
- deleteOAuthProvider(form: DeleteOAuthProvider): Promise<SuccessResponse>;
825
+ deleteOAuthProvider(form: DeleteOAuthProvider, options?: RequestOptions): Promise<SuccessResponse>;
825
826
  /**
826
827
  * Authenticate with OAuth
827
828
  *
828
829
  * `HTTP.Post /oauth/authenticate`
829
830
  */
830
- authenticateWithOAuth(form: AuthenticateWithOauth): Promise<LoginResponse>;
831
+ authenticateWithOAuth(form: AuthenticateWithOauth, options?: RequestOptions): Promise<LoginResponse>;
831
832
  /**
832
833
  * Fetch federated instances.
833
834
  *
834
835
  * `HTTP.Get /federated_instances`
835
836
  */
836
- getFederatedInstances(): Promise<GetFederatedInstancesResponse>;
837
+ getFederatedInstances(options?: RequestOptions): Promise<GetFederatedInstancesResponse>;
837
838
  /**
838
839
  * Block an instance.
839
840
  *
840
841
  * `HTTP.Post /site/block`
841
842
  */
842
- blockInstance(form: BlockInstance): Promise<BlockInstanceResponse>;
843
+ blockInstance(form: BlockInstance, options?: RequestOptions): Promise<BlockInstanceResponse>;
843
844
  /**
844
845
  * Upload an image to the server.
845
846
  */
846
- uploadImage({ image }: UploadImage): Promise<UploadImageResponse>;
847
+ uploadImage({ image }: UploadImage, options?: RequestOptions): Promise<UploadImageResponse>;
847
848
  /**
848
849
  * Delete a pictrs image
849
850
  */
850
- deleteImage({ token, filename }: DeleteImage): Promise<boolean>;
851
+ deleteImage({ token, filename }: DeleteImage, options?: RequestOptions): Promise<boolean>;
851
852
  /**
852
853
  * Set the headers (can be used to set the auth header)
853
854
  */
@@ -855,3 +856,4 @@ export declare class LemmyHttp {
855
856
  [key: string]: string;
856
857
  }): void;
857
858
  }
859
+ export {};