lemmy-js-client 1.0.0-block-nsfw.1 → 1.0.0-media-fixes.1

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.
Files changed (114) hide show
  1. package/dist/http.d.ts +42 -16
  2. package/dist/http.js +926 -889
  3. package/dist/index.d.ts +19 -17
  4. package/dist/other_types.d.ts +3 -0
  5. package/dist/types/BannedPersonsResponse.d.ts +5 -0
  6. package/dist/types/Comment.d.ts +14 -0
  7. package/dist/types/CommentActions.d.ts +18 -0
  8. package/dist/types/CommentReplyView.d.ts +15 -14
  9. package/dist/types/CommentReportView.d.ts +8 -13
  10. package/dist/types/CommentSlimView.d.ts +11 -13
  11. package/dist/types/CommentView.d.ts +14 -13
  12. package/dist/types/Community.d.ts +23 -4
  13. package/dist/types/CommunityActions.d.ts +35 -0
  14. package/dist/types/CommunityReportResponse.d.ts +7 -0
  15. package/dist/types/CommunityReportView.d.ts +0 -4
  16. package/dist/types/CommunityView.d.ts +6 -6
  17. package/dist/types/CommunityVisibility.d.ts +1 -1
  18. package/dist/types/CreateCommunityReport.d.ts +8 -0
  19. package/dist/types/CreateCommunityTag.d.ts +8 -0
  20. package/dist/types/CreateSite.d.ts +1 -1
  21. package/dist/types/DeleteCommunityTag.d.ts +7 -0
  22. package/dist/types/EditPost.d.ts +1 -1
  23. package/dist/types/EditSite.d.ts +0 -5
  24. package/dist/types/GetModlog.d.ts +2 -2
  25. package/dist/types/GetModlogResponse.d.ts +5 -0
  26. package/dist/types/GetPosts.d.ts +2 -2
  27. package/dist/types/GetPostsResponse.d.ts +2 -2
  28. package/dist/types/GetSiteResponse.d.ts +4 -2
  29. package/dist/types/Instance.d.ts +9 -0
  30. package/dist/types/InstanceActions.d.ts +18 -0
  31. package/dist/types/InstanceWithFederationState.d.ts +9 -0
  32. package/dist/types/LemmyErrorType.d.ts +13 -6
  33. package/dist/types/ListBannedPersons.d.ts +9 -0
  34. package/dist/types/ListInbox.d.ts +2 -2
  35. package/dist/types/ListInboxResponse.d.ts +5 -0
  36. package/dist/types/ListPersonContent.d.ts +2 -2
  37. package/dist/types/ListPersonContentResponse.d.ts +5 -0
  38. package/dist/types/ListPersonSaved.d.ts +2 -2
  39. package/dist/types/ListPersonSavedResponse.d.ts +7 -2
  40. package/dist/types/ListReports.d.ts +2 -2
  41. package/dist/types/ListReportsResponse.d.ts +5 -0
  42. package/dist/types/LocalSite.d.ts +20 -5
  43. package/dist/types/LocalUser.d.ts +4 -0
  44. package/dist/types/LocalUserView.d.ts +2 -4
  45. package/dist/types/ModBan.d.ts +2 -0
  46. package/dist/types/ModChangeCommunityVisibility.d.ts +12 -0
  47. package/dist/types/ModChangeCommunityVisibility.js +2 -0
  48. package/dist/types/ModChangeCommunityVisibilityId.d.ts +1 -0
  49. package/dist/types/ModChangeCommunityVisibilityView.d.ts +11 -0
  50. package/dist/types/ModChangeCommunityVisibilityView.js +2 -0
  51. package/dist/types/ModlogActionType.d.ts +1 -1
  52. package/dist/types/ModlogCombinedView.d.ts +3 -3
  53. package/dist/types/PaginationCursor.d.ts +1 -4
  54. package/dist/types/PendingFollow.d.ts +2 -2
  55. package/dist/types/Person.d.ts +2 -8
  56. package/dist/types/PersonActions.d.ts +9 -0
  57. package/dist/types/PersonActions.js +2 -0
  58. package/dist/types/PersonCommentMentionView.d.ts +13 -14
  59. package/dist/types/PersonPostMentionView.d.ts +15 -19
  60. package/dist/types/PersonSavedCombinedView.d.ts +7 -0
  61. package/dist/types/PersonSavedCombinedView.js +2 -0
  62. package/dist/types/PersonView.d.ts +4 -2
  63. package/dist/types/PluginMetadata.d.ts +5 -0
  64. package/dist/types/Post.d.ts +15 -0
  65. package/dist/types/PostActions.d.ts +35 -0
  66. package/dist/types/PostActions.js +2 -0
  67. package/dist/types/PostPaginationCursor.d.ts +7 -0
  68. package/dist/types/PostReportView.d.ts +8 -16
  69. package/dist/types/PostView.d.ts +14 -18
  70. package/dist/types/PrivateMessageReportView.d.ts +1 -1
  71. package/dist/types/ResolveCommunityReport.d.ts +8 -0
  72. package/dist/types/ResolveCommunityReport.js +2 -0
  73. package/dist/types/Search.d.ts +2 -2
  74. package/dist/types/SearchResponse.d.ts +5 -0
  75. package/dist/types/SiteView.d.ts +2 -2
  76. package/dist/types/Tag.d.ts +8 -6
  77. package/dist/types/{PostTags.d.ts → TagsView.d.ts} +1 -3
  78. package/dist/types/TagsView.js +2 -0
  79. package/dist/types/UpdateCommunityTag.d.ts +8 -0
  80. package/dist/types/UpdateCommunityTag.js +2 -0
  81. package/package.json +6 -3
  82. package/dist/types/CommentAggregates.d.ts +0 -17
  83. package/dist/types/CommunityAggregates.d.ts +0 -30
  84. package/dist/types/InboxCombinedPaginationCursor.d.ts +0 -4
  85. package/dist/types/LocalUserVoteDisplayMode.d.ts +0 -9
  86. package/dist/types/ModHideCommunity.d.ts +0 -14
  87. package/dist/types/ModHideCommunityId.d.ts +0 -1
  88. package/dist/types/ModHideCommunityView.d.ts +0 -11
  89. package/dist/types/ModlogCombinedPaginationCursor.d.ts +0 -4
  90. package/dist/types/ModlogCombinedPaginationCursor.js +0 -3
  91. package/dist/types/PersonAggregates.d.ts +0 -10
  92. package/dist/types/PersonContentCombinedPaginationCursor.d.ts +0 -4
  93. package/dist/types/PersonContentCombinedPaginationCursor.js +0 -3
  94. package/dist/types/PersonSavedCombinedPaginationCursor.d.ts +0 -4
  95. package/dist/types/PersonSavedCombinedPaginationCursor.js +0 -3
  96. package/dist/types/PostAggregates.d.ts +0 -18
  97. package/dist/types/ReportCombinedPaginationCursor.d.ts +0 -4
  98. package/dist/types/ReportCombinedPaginationCursor.js +0 -3
  99. package/dist/types/SearchCombinedPaginationCursor.d.ts +0 -4
  100. package/dist/types/SearchCombinedPaginationCursor.js +0 -3
  101. package/dist/types/SiteAggregates.d.ts +0 -27
  102. package/dist/types/SubscribedType.d.ts +0 -4
  103. package/dist/types/SubscribedType.js +0 -3
  104. /package/dist/types/{CommentAggregates.js → CommentActions.js} +0 -0
  105. /package/dist/types/{CommunityAggregates.js → CommunityActions.js} +0 -0
  106. /package/dist/types/{ModHideCommunity.js → CommunityReportResponse.js} +0 -0
  107. /package/dist/types/{ModHideCommunityView.js → CreateCommunityReport.js} +0 -0
  108. /package/dist/types/{PersonAggregates.js → CreateCommunityTag.js} +0 -0
  109. /package/dist/types/{PostAggregates.js → DeleteCommunityTag.js} +0 -0
  110. /package/dist/types/{PostTags.js → InstanceActions.js} +0 -0
  111. /package/dist/types/{SiteAggregates.js → ListBannedPersons.js} +0 -0
  112. /package/dist/types/{InboxCombinedPaginationCursor.js → ModChangeCommunityVisibilityId.js} +0 -0
  113. /package/dist/types/{LocalUserVoteDisplayMode.js → PluginMetadata.js} +0 -0
  114. /package/dist/types/{ModHideCommunityId.js → PostPaginationCursor.js} +0 -0
package/dist/http.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { Controller } from "tsoa";
2
- import { DeleteImageParamsI, GetCommentI, GetCommentsI, GetCommunityI, GetCommunityPendingFollowsCountI, GetModlogI, GetPersonDetailsI, GetPostI, GetPostsI, GetRandomCommunityI, GetRegistrationApplicationI, GetReportCountI, GetSiteMetadataI, ListCommentLikesI, ListCommunitiesI, ListCommunityPendingFollowsI, ListCustomEmojisI, ListInboxI, ListMediaI, ListPersonContentI, ListPersonSavedI, ListPostLikesI, ListRegistrationApplicationsI, ListReportsI, ListTaglinesI, ResolveObjectI, SearchI, UploadImage } from "./other_types";
1
+ import { Controller } from "@tsoa/runtime";
2
+ import { DeleteImageParamsI, GetCommentI, GetCommentsI, GetCommunityI, GetCommunityPendingFollowsCountI, GetModlogI, GetPersonDetailsI, GetPostI, GetPostsI, GetRandomCommunityI, GetRegistrationApplicationI, GetReportCountI, GetSiteMetadataI, ListBannedPersonsI, ListCommentLikesI, ListCommunitiesI, ListCommunityPendingFollowsI, ListCustomEmojisI, ListInboxI, ListMediaI, ListPersonContentI, ListPersonSavedI, ListPostLikesI, ListRegistrationApplicationsI, ListReportsI, ListTaglinesI, ResolveObjectI, SearchI, UploadImage } from "./other_types";
3
3
  import { AddAdmin } from "./types/AddAdmin";
4
4
  import { AddAdminResponse } from "./types/AddAdminResponse";
5
5
  import { AddModToCommunity } from "./types/AddModToCommunity";
@@ -23,6 +23,7 @@ import { CreateComment } from "./types/CreateComment";
23
23
  import { CreateCommentLike } from "./types/CreateCommentLike";
24
24
  import { CreateCommentReport } from "./types/CreateCommentReport";
25
25
  import { CreateCommunity } from "./types/CreateCommunity";
26
+ import { CreateCommunityTag } from "./types/CreateCommunityTag";
26
27
  import { CreateCustomEmoji } from "./types/CreateCustomEmoji";
27
28
  import { CreateOAuthProvider } from "./types/CreateOAuthProvider";
28
29
  import { CreatePost } from "./types/CreatePost";
@@ -35,6 +36,7 @@ import { CustomEmojiResponse } from "./types/CustomEmojiResponse";
35
36
  import { DeleteAccount } from "./types/DeleteAccount";
36
37
  import { DeleteComment } from "./types/DeleteComment";
37
38
  import { DeleteCommunity } from "./types/DeleteCommunity";
39
+ import { DeleteCommunityTag } from "./types/DeleteCommunityTag";
38
40
  import { DeleteCustomEmoji } from "./types/DeleteCustomEmoji";
39
41
  import { DeleteOAuthProvider } from "./types/DeleteOAuthProvider";
40
42
  import { DeletePost } from "./types/DeletePost";
@@ -96,6 +98,7 @@ import { SaveUserSettings } from "./types/SaveUserSettings";
96
98
  import { SearchResponse } from "./types/SearchResponse";
97
99
  import { SiteResponse } from "./types/SiteResponse";
98
100
  import { TransferCommunity } from "./types/TransferCommunity";
101
+ import { UpdateCommunityTag } from "./types/UpdateCommunityTag";
99
102
  import { VerifyEmail } from "./types/VerifyEmail";
100
103
  import { HideCommunity } from "./types/HideCommunity";
101
104
  import { GenerateTotpSecretResponse } from "./types/GenerateTotpSecretResponse";
@@ -129,6 +132,7 @@ import { ListInboxResponse } from "./types/ListInboxResponse";
129
132
  import { MarkPersonCommentMentionAsRead } from "./types/MarkPersonCommentMentionAsRead";
130
133
  import { MarkPersonPostMentionAsRead } from "./types/MarkPersonPostMentionAsRead";
131
134
  import { GetCommentsSlimResponse } from "./types/GetCommentsSlimResponse";
135
+ import { Tag } from "./types/Tag";
132
136
  import { ResendVerificationEmail } from "./types/ResendVerificationEmail";
133
137
  type RequestOptions = Pick<RequestInit, "signal">;
134
138
  /**
@@ -194,13 +198,21 @@ export declare class LemmyHttp extends Controller {
194
198
  */
195
199
  validateAuth(options?: RequestOptions): Promise<SuccessResponse>;
196
200
  /**
197
- * @summary List all the media for your user
201
+ * @summary List all the media for your account.
198
202
  */
199
203
  listMedia(form?: ListMediaI, options?: RequestOptions): Promise<ListMediaResponse>;
204
+ /**
205
+ * @summary Delete media for your account.
206
+ */
207
+ deleteMedia(form: DeleteImageParamsI, options?: RequestOptions): Promise<SuccessResponse>;
208
+ /**
209
+ * @summary Delete any media. (Admin only)
210
+ */
211
+ deleteMediaAdmin(form: DeleteImageParamsI, options?: RequestOptions): Promise<SuccessResponse>;
200
212
  /**
201
213
  * @summary List all the media known to your instance.
202
214
  */
203
- listAllMedia(form?: ListMediaI, options?: RequestOptions): Promise<ListMediaResponse>;
215
+ listMediaAdmin(form?: ListMediaI, options?: RequestOptions): Promise<ListMediaResponse>;
204
216
  /**
205
217
  * @summary Enable / Disable TOTP / two-factor authentication.
206
218
  *
@@ -424,7 +436,7 @@ export declare class LemmyHttp extends Controller {
424
436
  /**
425
437
  * @summary Mark a private message as read.
426
438
  */
427
- markPrivateMessageAsRead(form: MarkPrivateMessageAsRead, options?: RequestOptions): Promise<PrivateMessageResponse>;
439
+ markPrivateMessageAsRead(form: MarkPrivateMessageAsRead, options?: RequestOptions): Promise<SuccessResponse>;
428
440
  /**
429
441
  * @summary Create a report for a private message.
430
442
  */
@@ -468,7 +480,7 @@ export declare class LemmyHttp extends Controller {
468
480
  /**
469
481
  * @summary Get a list of banned users.
470
482
  */
471
- getBannedPersons(options?: RequestOptions): Promise<BannedPersonsResponse>;
483
+ listBannedPersons(form?: ListBannedPersonsI, options?: RequestOptions): Promise<BannedPersonsResponse>;
472
484
  /**
473
485
  * @summary Block a person.
474
486
  */
@@ -593,6 +605,18 @@ export declare class LemmyHttp extends Controller {
593
605
  * @summary List taglines.
594
606
  */
595
607
  listTaglines(form: ListTaglinesI, options?: RequestOptions): Promise<ListTaglinesResponse>;
608
+ /**
609
+ * @summary Create a community post tag.
610
+ */
611
+ createCommunityTag(form: CreateCommunityTag, options?: RequestOptions): Promise<Tag>;
612
+ /**
613
+ * @summary Update a community post tag.
614
+ */
615
+ updateCommunityTag(form: UpdateCommunityTag, options?: RequestOptions): Promise<Tag>;
616
+ /**
617
+ * @summary Delete a post tag in a community.
618
+ */
619
+ deleteCommunityTag(form: DeleteCommunityTag, options?: RequestOptions): Promise<Tag>;
596
620
  /**
597
621
  * @summary Create a new oauth provider method
598
622
  */
@@ -632,7 +656,7 @@ export declare class LemmyHttp extends Controller {
632
656
  /**
633
657
  * @summary Upload new user avatar.
634
658
  */
635
- uploadUserAvatar(image: UploadImage, options?: RequestOptions): Promise<SuccessResponse>;
659
+ uploadUserAvatar(image: UploadImage, options?: RequestOptions): Promise<UploadImageResponse>;
636
660
  /**
637
661
  * @summary Delete the user avatar.
638
662
  */
@@ -640,7 +664,7 @@ export declare class LemmyHttp extends Controller {
640
664
  /**
641
665
  * @summary Upload new user banner.
642
666
  */
643
- uploadUserBanner(image: UploadImage, options?: RequestOptions): Promise<SuccessResponse>;
667
+ uploadUserBanner(image: UploadImage, options?: RequestOptions): Promise<UploadImageResponse>;
644
668
  /**
645
669
  * @summary Delete the user banner.
646
670
  */
@@ -648,7 +672,7 @@ export declare class LemmyHttp extends Controller {
648
672
  /**
649
673
  * @summary Upload new community icon.
650
674
  */
651
- uploadCommunityIcon(image: UploadImage, options?: RequestOptions): Promise<SuccessResponse>;
675
+ uploadCommunityIcon(image: UploadImage, options?: RequestOptions): Promise<UploadImageResponse>;
652
676
  /**
653
677
  * @summary Delete the community icon.
654
678
  */
@@ -656,7 +680,7 @@ export declare class LemmyHttp extends Controller {
656
680
  /**
657
681
  * @summary Upload new community banner.
658
682
  */
659
- uploadCommunityBanner(image: UploadImage, options?: RequestOptions): Promise<SuccessResponse>;
683
+ uploadCommunityBanner(image: UploadImage, options?: RequestOptions): Promise<UploadImageResponse>;
660
684
  /**
661
685
  * @summary Delete the community banner.
662
686
  */
@@ -664,7 +688,7 @@ export declare class LemmyHttp extends Controller {
664
688
  /**
665
689
  * @summary Upload new site icon.
666
690
  */
667
- uploadSiteIcon(image: UploadImage, options?: RequestOptions): Promise<SuccessResponse>;
691
+ uploadSiteIcon(image: UploadImage, options?: RequestOptions): Promise<UploadImageResponse>;
668
692
  /**
669
693
  * @summary Delete the site icon.
670
694
  */
@@ -672,7 +696,7 @@ export declare class LemmyHttp extends Controller {
672
696
  /**
673
697
  * @summary Upload new site banner.
674
698
  */
675
- uploadSiteBanner(image: UploadImage, options?: RequestOptions): Promise<SuccessResponse>;
699
+ uploadSiteBanner(image: UploadImage, options?: RequestOptions): Promise<UploadImageResponse>;
676
700
  /**
677
701
  * @summary Delete the site banner.
678
702
  */
@@ -681,14 +705,16 @@ export declare class LemmyHttp extends Controller {
681
705
  * @summary Upload an image to the server.
682
706
  */
683
707
  uploadImage(image: UploadImage, options?: RequestOptions): Promise<UploadImageResponse>;
684
- /**
685
- * @summary Delete a pictrs image
686
- */
687
- deleteImage(form: DeleteImageParamsI, options?: RequestOptions): Promise<SuccessResponse>;
688
708
  /**
689
709
  * @summary Health check for image functionality
690
710
  */
691
711
  imageHealth(options?: RequestOptions): Promise<SuccessResponse>;
712
+ /**
713
+ * Mark donation dialog as shown, so it isn't displayed anymore.
714
+ *
715
+ * `HTTP.POST /user/donation_dialog_shown`
716
+ */
717
+ donation_dialog_shown(options?: RequestOptions): Promise<SuccessResponse>;
692
718
  /**
693
719
  * Set the headers (can be used to set the auth header)
694
720
  */