lemmy-js-client 1.0.0-post-tags.0 → 1.0.0-remove-page-limit.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 (154) hide show
  1. package/README.md +12 -3
  2. package/dist/http.d.ts +38 -34
  3. package/dist/http.js +845 -835
  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.
@@ -200,13 +198,21 @@ export declare class LemmyHttp extends Controller {
200
198
  */
201
199
  validateAuth(options?: RequestOptions): Promise<SuccessResponse>;
202
200
  /**
203
- * @summary List all the media for your user
201
+ * @summary List all the media for your account.
204
202
  */
205
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>;
206
212
  /**
207
213
  * @summary List all the media known to your instance.
208
214
  */
209
- listAllMedia(form?: ListMediaI, options?: RequestOptions): Promise<ListMediaResponse>;
215
+ listMediaAdmin(form?: ListMediaI, options?: RequestOptions): Promise<ListMediaResponse>;
210
216
  /**
211
217
  * @summary Enable / Disable TOTP / two-factor authentication.
212
218
  *
@@ -430,7 +436,7 @@ export declare class LemmyHttp extends Controller {
430
436
  /**
431
437
  * @summary Mark a private message as read.
432
438
  */
433
- markPrivateMessageAsRead(form: MarkPrivateMessageAsRead, options?: RequestOptions): Promise<PrivateMessageResponse>;
439
+ markPrivateMessageAsRead(form: MarkPrivateMessageAsRead, options?: RequestOptions): Promise<SuccessResponse>;
434
440
  /**
435
441
  * @summary Create a report for a private message.
436
442
  */
@@ -474,7 +480,7 @@ export declare class LemmyHttp extends Controller {
474
480
  /**
475
481
  * @summary Get a list of banned users.
476
482
  */
477
- getBannedPersons(options?: RequestOptions): Promise<BannedPersonsResponse>;
483
+ listBannedPersons(form?: ListBannedPersonsI, options?: RequestOptions): Promise<BannedPersonsResponse>;
478
484
  /**
479
485
  * @summary Block a person.
480
486
  */
@@ -523,6 +529,10 @@ export declare class LemmyHttp extends Controller {
523
529
  * @summary Verify your email
524
530
  */
525
531
  verifyEmail(form: VerifyEmail, options?: RequestOptions): Promise<SuccessResponse>;
532
+ /**
533
+ * @summary Resend a verification email.
534
+ */
535
+ resendVerificationEmail(form: ResendVerificationEmail, options?: RequestOptions): Promise<SuccessResponse>;
526
536
  /**
527
537
  * @summary List your saved content.
528
538
  */
@@ -596,25 +606,17 @@ export declare class LemmyHttp extends Controller {
596
606
  */
597
607
  listTaglines(form: ListTaglinesI, options?: RequestOptions): Promise<ListTaglinesResponse>;
598
608
  /**
599
- * @summary Create a community tag.
600
- */
601
- createCommunityTag(form: CreateCommunityTag, options?: RequestOptions): Promise<CommunityTagResponse>;
602
- /**
603
- * @summary Update a community tag.
609
+ * @summary Create a community post tag.
604
610
  */
605
- updateCommunityTag(form: UpdateCommunityTag, options?: RequestOptions): Promise<CommunityTagResponse>;
611
+ createCommunityTag(form: CreateCommunityTag, options?: RequestOptions): Promise<Tag>;
606
612
  /**
607
- * @summary List community tags.
613
+ * @summary Update a community post tag.
608
614
  */
609
- listCommunityTags(form: ListCommunityTags, options?: RequestOptions): Promise<ListCommunityTagsResponse>;
615
+ updateCommunityTag(form: UpdateCommunityTag, options?: RequestOptions): Promise<Tag>;
610
616
  /**
611
- * @summary Delete a community tag.
617
+ * @summary Delete a post tag in a community.
612
618
  */
613
- deleteCommunityTag(form: DeleteCommunityTag, options?: RequestOptions): Promise<CommunityTagResponse>;
614
- /**
615
- * @summary Update post tags.
616
- */
617
- updatePostTags(form: UpdatePostTags, options?: RequestOptions): Promise<PostResponse>;
619
+ deleteCommunityTag(form: DeleteCommunityTag, options?: RequestOptions): Promise<Tag>;
618
620
  /**
619
621
  * @summary Create a new oauth provider method
620
622
  */
@@ -654,7 +656,7 @@ export declare class LemmyHttp extends Controller {
654
656
  /**
655
657
  * @summary Upload new user avatar.
656
658
  */
657
- uploadUserAvatar(image: UploadImage, options?: RequestOptions): Promise<SuccessResponse>;
659
+ uploadUserAvatar(image: UploadImage, options?: RequestOptions): Promise<UploadImageResponse>;
658
660
  /**
659
661
  * @summary Delete the user avatar.
660
662
  */
@@ -662,7 +664,7 @@ export declare class LemmyHttp extends Controller {
662
664
  /**
663
665
  * @summary Upload new user banner.
664
666
  */
665
- uploadUserBanner(image: UploadImage, options?: RequestOptions): Promise<SuccessResponse>;
667
+ uploadUserBanner(image: UploadImage, options?: RequestOptions): Promise<UploadImageResponse>;
666
668
  /**
667
669
  * @summary Delete the user banner.
668
670
  */
@@ -670,7 +672,7 @@ export declare class LemmyHttp extends Controller {
670
672
  /**
671
673
  * @summary Upload new community icon.
672
674
  */
673
- uploadCommunityIcon(image: UploadImage, options?: RequestOptions): Promise<SuccessResponse>;
675
+ uploadCommunityIcon(image: UploadImage, options?: RequestOptions): Promise<UploadImageResponse>;
674
676
  /**
675
677
  * @summary Delete the community icon.
676
678
  */
@@ -678,7 +680,7 @@ export declare class LemmyHttp extends Controller {
678
680
  /**
679
681
  * @summary Upload new community banner.
680
682
  */
681
- uploadCommunityBanner(image: UploadImage, options?: RequestOptions): Promise<SuccessResponse>;
683
+ uploadCommunityBanner(image: UploadImage, options?: RequestOptions): Promise<UploadImageResponse>;
682
684
  /**
683
685
  * @summary Delete the community banner.
684
686
  */
@@ -686,7 +688,7 @@ export declare class LemmyHttp extends Controller {
686
688
  /**
687
689
  * @summary Upload new site icon.
688
690
  */
689
- uploadSiteIcon(image: UploadImage, options?: RequestOptions): Promise<SuccessResponse>;
691
+ uploadSiteIcon(image: UploadImage, options?: RequestOptions): Promise<UploadImageResponse>;
690
692
  /**
691
693
  * @summary Delete the site icon.
692
694
  */
@@ -694,7 +696,7 @@ export declare class LemmyHttp extends Controller {
694
696
  /**
695
697
  * @summary Upload new site banner.
696
698
  */
697
- uploadSiteBanner(image: UploadImage, options?: RequestOptions): Promise<SuccessResponse>;
699
+ uploadSiteBanner(image: UploadImage, options?: RequestOptions): Promise<UploadImageResponse>;
698
700
  /**
699
701
  * @summary Delete the site banner.
700
702
  */
@@ -703,14 +705,16 @@ export declare class LemmyHttp extends Controller {
703
705
  * @summary Upload an image to the server.
704
706
  */
705
707
  uploadImage(image: UploadImage, options?: RequestOptions): Promise<UploadImageResponse>;
706
- /**
707
- * @summary Delete a pictrs image
708
- */
709
- deleteImage(form: DeleteImageParamsI, options?: RequestOptions): Promise<SuccessResponse>;
710
708
  /**
711
709
  * @summary Health check for image functionality
712
710
  */
713
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>;
714
718
  /**
715
719
  * Set the headers (can be used to set the auth header)
716
720
  */