lemmy-js-client 1.0.0-post-tags.0 → 1.0.0-remove-page-limit.0

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 (154) hide show
  1. package/README.md +12 -3
  2. package/dist/http.d.ts +28 -28
  3. package/dist/http.js +703 -706
  4. package/dist/index.d.ts +16 -21
  5. package/dist/other_types.d.ts +3 -0
  6. package/dist/types/BannedPersonsResponse.d.ts +6 -0
  7. package/dist/types/Comment.d.ts +14 -0
  8. package/dist/types/CommentActions.d.ts +18 -0
  9. package/dist/types/CommentReplyView.d.ts +16 -11
  10. package/dist/types/CommentReport.d.ts +1 -0
  11. package/dist/types/CommentReportView.d.ts +8 -10
  12. package/dist/types/CommentSlimView.d.ts +12 -10
  13. package/dist/types/CommentView.d.ts +15 -10
  14. package/dist/types/Community.d.ts +25 -6
  15. package/dist/types/CommunityActions.d.ts +35 -0
  16. package/dist/types/CommunityReportResponse.d.ts +7 -0
  17. package/dist/types/CommunityReportView.d.ts +0 -4
  18. package/dist/types/CommunitySortType.d.ts +1 -1
  19. package/dist/types/CommunityView.d.ts +7 -6
  20. package/dist/types/CommunityVisibility.d.ts +1 -1
  21. package/dist/types/CreateCommentReport.d.ts +1 -0
  22. package/dist/types/CreateCommunityReport.d.ts +8 -0
  23. package/dist/types/CreateCommunityTag.d.ts +1 -2
  24. package/dist/types/CreatePostReport.d.ts +1 -0
  25. package/dist/types/CreateSite.d.ts +2 -1
  26. package/dist/types/EditPost.d.ts +2 -0
  27. package/dist/types/EditSite.d.ts +6 -3
  28. package/dist/types/FederationError.d.ts +1 -1
  29. package/dist/types/GetComments.d.ts +8 -1
  30. package/dist/types/GetCommentsResponse.d.ts +3 -0
  31. package/dist/types/GetCommentsSlimResponse.d.ts +3 -0
  32. package/dist/types/GetModlog.d.ts +27 -2
  33. package/dist/types/GetModlogResponse.d.ts +6 -0
  34. package/dist/types/GetPostResponse.d.ts +0 -2
  35. package/dist/types/GetPosts.d.ts +5 -5
  36. package/dist/types/GetPostsResponse.d.ts +1 -0
  37. package/dist/types/GetSiteResponse.d.ts +4 -2
  38. package/dist/types/ImageDetails.d.ts +1 -0
  39. package/dist/types/Instance.d.ts +9 -0
  40. package/dist/types/InstanceActions.d.ts +18 -0
  41. package/dist/types/InstanceWithFederationState.d.ts +9 -0
  42. package/dist/types/LemmyErrorType.d.ts +95 -24
  43. package/dist/types/ListBannedPersons.d.ts +9 -0
  44. package/dist/types/ListCommentLikes.d.ts +3 -1
  45. package/dist/types/ListCommentLikesResponse.d.ts +6 -0
  46. package/dist/types/ListCommunities.d.ts +8 -1
  47. package/dist/types/ListCommunitiesResponse.d.ts +6 -0
  48. package/dist/types/ListCommunityPendingFollows.d.ts +3 -1
  49. package/dist/types/ListCommunityPendingFollows.js +0 -1
  50. package/dist/types/ListCommunityPendingFollowsResponse.d.ts +6 -0
  51. package/dist/types/ListCustomEmojis.d.ts +0 -3
  52. package/dist/types/ListInbox.d.ts +3 -2
  53. package/dist/types/ListInboxResponse.d.ts +6 -0
  54. package/dist/types/ListMedia.d.ts +3 -1
  55. package/dist/types/ListMedia.js +0 -1
  56. package/dist/types/ListMediaResponse.d.ts +6 -0
  57. package/dist/types/ListPersonContent.d.ts +3 -2
  58. package/dist/types/ListPersonContentResponse.d.ts +6 -0
  59. package/dist/types/ListPersonSaved.d.ts +3 -2
  60. package/dist/types/ListPersonSavedResponse.d.ts +8 -2
  61. package/dist/types/ListPostLikes.d.ts +3 -1
  62. package/dist/types/ListPostLikesResponse.d.ts +6 -0
  63. package/dist/types/ListRegistrationApplications.d.ts +3 -1
  64. package/dist/types/ListRegistrationApplications.js +0 -1
  65. package/dist/types/ListRegistrationApplicationsResponse.d.ts +6 -0
  66. package/dist/types/ListReports.d.ts +11 -2
  67. package/dist/types/ListReportsResponse.d.ts +6 -0
  68. package/dist/types/ListTaglines.d.ts +3 -1
  69. package/dist/types/ListTaglines.js +0 -1
  70. package/dist/types/ListTaglinesResponse.d.ts +6 -0
  71. package/dist/types/LocalSite.d.ts +26 -3
  72. package/dist/types/LocalUser.d.ts +8 -0
  73. package/dist/types/LocalUserView.d.ts +2 -4
  74. package/dist/types/ModBan.d.ts +2 -0
  75. package/dist/types/ModChangeCommunityVisibility.d.ts +12 -0
  76. package/dist/types/ModChangeCommunityVisibilityId.d.ts +1 -0
  77. package/dist/types/ModChangeCommunityVisibilityView.d.ts +11 -0
  78. package/dist/types/ModlogActionType.d.ts +1 -1
  79. package/dist/types/ModlogCombinedView.d.ts +3 -3
  80. package/dist/types/MyUserInfo.d.ts +1 -0
  81. package/dist/types/PaginationCursor.d.ts +1 -4
  82. package/dist/types/PendingFollow.d.ts +2 -2
  83. package/dist/types/Person.d.ts +4 -10
  84. package/dist/types/PersonActions.d.ts +9 -0
  85. package/dist/types/PersonCommentMentionView.d.ts +14 -11
  86. package/dist/types/PersonPostMentionView.d.ts +16 -16
  87. package/dist/types/PersonSavedCombinedView.d.ts +7 -0
  88. package/dist/types/PersonView.d.ts +4 -2
  89. package/dist/types/PluginMetadata.d.ts +5 -0
  90. package/dist/types/Post.d.ts +15 -0
  91. package/dist/types/PostActions.d.ts +35 -0
  92. package/dist/types/PostReport.d.ts +1 -0
  93. package/dist/types/PostReportView.d.ts +8 -13
  94. package/dist/types/PostSortType.d.ts +1 -1
  95. package/dist/types/PostView.d.ts +15 -15
  96. package/dist/types/PrivateMessage.d.ts +1 -0
  97. package/dist/types/PrivateMessageReportView.d.ts +1 -1
  98. package/dist/types/ResendVerificationEmail.d.ts +7 -0
  99. package/dist/types/ResolveCommunityReport.d.ts +8 -0
  100. package/dist/types/ResolveCommunityReport.js +2 -0
  101. package/dist/types/SaveUserSettings.d.ts +5 -0
  102. package/dist/types/Search.d.ts +8 -2
  103. package/dist/types/SearchResponse.d.ts +6 -0
  104. package/dist/types/Site.d.ts +2 -2
  105. package/dist/types/SiteView.d.ts +2 -2
  106. package/dist/types/Tag.d.ts +8 -6
  107. package/dist/types/Tagline.d.ts +2 -1
  108. package/dist/types/Tagline.js +0 -1
  109. package/dist/types/{PostTags.d.ts → TagsView.d.ts} +1 -1
  110. package/dist/types/TagsView.js +2 -0
  111. package/dist/types/UpdateCommunityTag.d.ts +1 -1
  112. package/dist/types/VoteView.d.ts +1 -0
  113. package/package.json +6 -3
  114. package/dist/types/CommentAggregates.d.ts +0 -17
  115. package/dist/types/CommunityAggregates.d.ts +0 -30
  116. package/dist/types/CommunityTagResponse.d.ts +0 -7
  117. package/dist/types/InboxCombinedPaginationCursor.d.ts +0 -4
  118. package/dist/types/ListCommunityTags.d.ts +0 -7
  119. package/dist/types/ListCommunityTagsResponse.d.ts +0 -4
  120. package/dist/types/LocalUserVoteDisplayMode.d.ts +0 -9
  121. package/dist/types/ModHideCommunity.d.ts +0 -14
  122. package/dist/types/ModHideCommunityId.d.ts +0 -1
  123. package/dist/types/ModHideCommunityId.js +0 -3
  124. package/dist/types/ModHideCommunityView.d.ts +0 -11
  125. package/dist/types/ModlogCombinedPaginationCursor.d.ts +0 -4
  126. package/dist/types/ModlogCombinedPaginationCursor.js +0 -3
  127. package/dist/types/PersonAggregates.d.ts +0 -9
  128. package/dist/types/PersonContentCombinedPaginationCursor.d.ts +0 -4
  129. package/dist/types/PersonContentCombinedPaginationCursor.js +0 -3
  130. package/dist/types/PersonSavedCombinedPaginationCursor.d.ts +0 -4
  131. package/dist/types/PersonSavedCombinedPaginationCursor.js +0 -3
  132. package/dist/types/PostAggregates.d.ts +0 -18
  133. package/dist/types/ReportCombinedPaginationCursor.d.ts +0 -4
  134. package/dist/types/ReportCombinedPaginationCursor.js +0 -3
  135. package/dist/types/SearchCombinedPaginationCursor.d.ts +0 -4
  136. package/dist/types/SearchCombinedPaginationCursor.js +0 -3
  137. package/dist/types/SiteAggregates.d.ts +0 -27
  138. package/dist/types/SubscribedType.d.ts +0 -4
  139. package/dist/types/SubscribedType.js +0 -3
  140. package/dist/types/UpdatePostTags.d.ts +0 -9
  141. /package/dist/types/{CommentAggregates.js → CommentActions.js} +0 -0
  142. /package/dist/types/{CommunityAggregates.js → CommunityActions.js} +0 -0
  143. /package/dist/types/{CommunityTagResponse.js → CommunityReportResponse.js} +0 -0
  144. /package/dist/types/{ListCommunityTags.js → CreateCommunityReport.js} +0 -0
  145. /package/dist/types/{ListCommunityTagsResponse.js → InstanceActions.js} +0 -0
  146. /package/dist/types/{ModHideCommunity.js → ListBannedPersons.js} +0 -0
  147. /package/dist/types/{ModHideCommunityView.js → ModChangeCommunityVisibility.js} +0 -0
  148. /package/dist/types/{InboxCombinedPaginationCursor.js → ModChangeCommunityVisibilityId.js} +0 -0
  149. /package/dist/types/{PersonAggregates.js → ModChangeCommunityVisibilityView.js} +0 -0
  150. /package/dist/types/{PostAggregates.js → PersonActions.js} +0 -0
  151. /package/dist/types/{PostTags.js → PersonSavedCombinedView.js} +0 -0
  152. /package/dist/types/{LocalUserVoteDisplayMode.js → PluginMetadata.js} +0 -0
  153. /package/dist/types/{SiteAggregates.js → PostActions.js} +0 -0
  154. /package/dist/types/{UpdatePostTags.js → ResendVerificationEmail.js} +0 -0
package/README.md CHANGED
@@ -50,6 +50,15 @@ const posts = await client.getPosts(getPostsForm);
50
50
 
51
51
  Use `pnpm add` to develop and test changes locally:
52
52
 
53
- ```
54
- pnpm add path/to/lemmy-js-client
55
- ```
53
+ `pnpm add path/to/lemmy-js-client`
54
+
55
+ ## OpenAPI
56
+
57
+ To generate OpenAPI docs, run `pnpm tsoa`
58
+
59
+ This creates two files:
60
+
61
+ - `redoc-static.html` - A static html rendering of the OpenAPI docs.
62
+ - `tsoa_build/swagger.json` - An OpenAPI / Swagger json file.
63
+
64
+ To contribute, check out the [tsoa docs](https://tsoa-community.github.io/docs/).
package/dist/http.d.ts CHANGED
@@ -1,3 +1,5 @@
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";
1
3
  import { AddAdmin } from "./types/AddAdmin";
2
4
  import { AddAdminResponse } from "./types/AddAdminResponse";
3
5
  import { AddModToCommunity } from "./types/AddModToCommunity";
@@ -64,8 +66,6 @@ import { GetSiteResponse } from "./types/GetSiteResponse";
64
66
  import { GetUnreadCountResponse } from "./types/GetUnreadCountResponse";
65
67
  import { GetUnreadRegistrationApplicationCountResponse } from "./types/GetUnreadRegistrationApplicationCountResponse";
66
68
  import { ListCommunitiesResponse } from "./types/ListCommunitiesResponse";
67
- import { ListCommunityTags } from "./types/ListCommunityTags";
68
- import { ListCommunityTagsResponse } from "./types/ListCommunityTagsResponse";
69
69
  import { ListRegistrationApplicationsResponse } from "./types/ListRegistrationApplicationsResponse";
70
70
  import { LockPost } from "./types/LockPost";
71
71
  import { Login } from "./types/Login";
@@ -99,9 +99,7 @@ import { SearchResponse } from "./types/SearchResponse";
99
99
  import { SiteResponse } from "./types/SiteResponse";
100
100
  import { TransferCommunity } from "./types/TransferCommunity";
101
101
  import { UpdateCommunityTag } from "./types/UpdateCommunityTag";
102
- import { UpdatePostTags } from "./types/UpdatePostTags";
103
102
  import { VerifyEmail } from "./types/VerifyEmail";
104
- 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";
105
103
  import { HideCommunity } from "./types/HideCommunity";
106
104
  import { GenerateTotpSecretResponse } from "./types/GenerateTotpSecretResponse";
107
105
  import { UpdateTotp } from "./types/UpdateTotp";
@@ -134,8 +132,8 @@ import { ListInboxResponse } from "./types/ListInboxResponse";
134
132
  import { MarkPersonCommentMentionAsRead } from "./types/MarkPersonCommentMentionAsRead";
135
133
  import { MarkPersonPostMentionAsRead } from "./types/MarkPersonPostMentionAsRead";
136
134
  import { GetCommentsSlimResponse } from "./types/GetCommentsSlimResponse";
137
- import { Controller } from "tsoa";
138
- import { CommunityTagResponse } from "./types/CommunityTagResponse";
135
+ import { Tag } from "./types/Tag";
136
+ import { ResendVerificationEmail } from "./types/ResendVerificationEmail";
139
137
  type RequestOptions = Pick<RequestInit, "signal">;
140
138
  /**
141
139
  * Helps build lemmy HTTP requests.
@@ -430,7 +428,7 @@ export declare class LemmyHttp extends Controller {
430
428
  /**
431
429
  * @summary Mark a private message as read.
432
430
  */
433
- markPrivateMessageAsRead(form: MarkPrivateMessageAsRead, options?: RequestOptions): Promise<PrivateMessageResponse>;
431
+ markPrivateMessageAsRead(form: MarkPrivateMessageAsRead, options?: RequestOptions): Promise<SuccessResponse>;
434
432
  /**
435
433
  * @summary Create a report for a private message.
436
434
  */
@@ -474,7 +472,7 @@ export declare class LemmyHttp extends Controller {
474
472
  /**
475
473
  * @summary Get a list of banned users.
476
474
  */
477
- getBannedPersons(options?: RequestOptions): Promise<BannedPersonsResponse>;
475
+ listBannedPersons(form?: ListBannedPersonsI, options?: RequestOptions): Promise<BannedPersonsResponse>;
478
476
  /**
479
477
  * @summary Block a person.
480
478
  */
@@ -523,6 +521,10 @@ export declare class LemmyHttp extends Controller {
523
521
  * @summary Verify your email
524
522
  */
525
523
  verifyEmail(form: VerifyEmail, options?: RequestOptions): Promise<SuccessResponse>;
524
+ /**
525
+ * @summary Resend a verification email.
526
+ */
527
+ resendVerificationEmail(form: ResendVerificationEmail, options?: RequestOptions): Promise<SuccessResponse>;
526
528
  /**
527
529
  * @summary List your saved content.
528
530
  */
@@ -596,25 +598,17 @@ export declare class LemmyHttp extends Controller {
596
598
  */
597
599
  listTaglines(form: ListTaglinesI, options?: RequestOptions): Promise<ListTaglinesResponse>;
598
600
  /**
599
- * @summary Create a community tag.
601
+ * @summary Create a community post tag.
600
602
  */
601
- createCommunityTag(form: CreateCommunityTag, options?: RequestOptions): Promise<CommunityTagResponse>;
603
+ createCommunityTag(form: CreateCommunityTag, options?: RequestOptions): Promise<Tag>;
602
604
  /**
603
- * @summary Update a community tag.
605
+ * @summary Update a community post tag.
604
606
  */
605
- updateCommunityTag(form: UpdateCommunityTag, options?: RequestOptions): Promise<CommunityTagResponse>;
607
+ updateCommunityTag(form: UpdateCommunityTag, options?: RequestOptions): Promise<Tag>;
606
608
  /**
607
- * @summary List community tags.
609
+ * @summary Delete a post tag in a community.
608
610
  */
609
- listCommunityTags(form: ListCommunityTags, options?: RequestOptions): Promise<ListCommunityTagsResponse>;
610
- /**
611
- * @summary Delete a community tag.
612
- */
613
- deleteCommunityTag(form: DeleteCommunityTag, options?: RequestOptions): Promise<CommunityTagResponse>;
614
- /**
615
- * @summary Update post tags.
616
- */
617
- updatePostTags(form: UpdatePostTags, options?: RequestOptions): Promise<PostResponse>;
611
+ deleteCommunityTag(form: DeleteCommunityTag, options?: RequestOptions): Promise<Tag>;
618
612
  /**
619
613
  * @summary Create a new oauth provider method
620
614
  */
@@ -654,7 +648,7 @@ export declare class LemmyHttp extends Controller {
654
648
  /**
655
649
  * @summary Upload new user avatar.
656
650
  */
657
- uploadUserAvatar(image: UploadImage, options?: RequestOptions): Promise<SuccessResponse>;
651
+ uploadUserAvatar(image: UploadImage, options?: RequestOptions): Promise<UploadImageResponse>;
658
652
  /**
659
653
  * @summary Delete the user avatar.
660
654
  */
@@ -662,7 +656,7 @@ export declare class LemmyHttp extends Controller {
662
656
  /**
663
657
  * @summary Upload new user banner.
664
658
  */
665
- uploadUserBanner(image: UploadImage, options?: RequestOptions): Promise<SuccessResponse>;
659
+ uploadUserBanner(image: UploadImage, options?: RequestOptions): Promise<UploadImageResponse>;
666
660
  /**
667
661
  * @summary Delete the user banner.
668
662
  */
@@ -670,7 +664,7 @@ export declare class LemmyHttp extends Controller {
670
664
  /**
671
665
  * @summary Upload new community icon.
672
666
  */
673
- uploadCommunityIcon(image: UploadImage, options?: RequestOptions): Promise<SuccessResponse>;
667
+ uploadCommunityIcon(image: UploadImage, options?: RequestOptions): Promise<UploadImageResponse>;
674
668
  /**
675
669
  * @summary Delete the community icon.
676
670
  */
@@ -678,7 +672,7 @@ export declare class LemmyHttp extends Controller {
678
672
  /**
679
673
  * @summary Upload new community banner.
680
674
  */
681
- uploadCommunityBanner(image: UploadImage, options?: RequestOptions): Promise<SuccessResponse>;
675
+ uploadCommunityBanner(image: UploadImage, options?: RequestOptions): Promise<UploadImageResponse>;
682
676
  /**
683
677
  * @summary Delete the community banner.
684
678
  */
@@ -686,7 +680,7 @@ export declare class LemmyHttp extends Controller {
686
680
  /**
687
681
  * @summary Upload new site icon.
688
682
  */
689
- uploadSiteIcon(image: UploadImage, options?: RequestOptions): Promise<SuccessResponse>;
683
+ uploadSiteIcon(image: UploadImage, options?: RequestOptions): Promise<UploadImageResponse>;
690
684
  /**
691
685
  * @summary Delete the site icon.
692
686
  */
@@ -694,7 +688,7 @@ export declare class LemmyHttp extends Controller {
694
688
  /**
695
689
  * @summary Upload new site banner.
696
690
  */
697
- uploadSiteBanner(image: UploadImage, options?: RequestOptions): Promise<SuccessResponse>;
691
+ uploadSiteBanner(image: UploadImage, options?: RequestOptions): Promise<UploadImageResponse>;
698
692
  /**
699
693
  * @summary Delete the site banner.
700
694
  */
@@ -711,6 +705,12 @@ export declare class LemmyHttp extends Controller {
711
705
  * @summary Health check for image functionality
712
706
  */
713
707
  imageHealth(options?: RequestOptions): Promise<SuccessResponse>;
708
+ /**
709
+ * Mark donation dialog as shown, so it isn't displayed anymore.
710
+ *
711
+ * `HTTP.POST /user/donation_dialog_shown`
712
+ */
713
+ donation_dialog_shown(options?: RequestOptions): Promise<SuccessResponse>;
714
714
  /**
715
715
  * Set the headers (can be used to set the auth header)
716
716
  */