lemmy-js-client 1.0.0-post-tags.3 → 1.0.0-post-comment-combined-view.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.
- package/README.md +6 -0
- package/dist/http.d.ts +85 -70
- package/dist/http.js +115 -61
- package/dist/index.d.ts +23 -96
- package/dist/index.js +3 -0
- package/dist/other_types.d.ts +3 -3
- package/dist/types/AdminAllowInstanceParams.d.ts +1 -1
- package/dist/types/AdminBlockInstanceParams.d.ts +7 -2
- package/dist/types/AdminListUsers.d.ts +0 -1
- package/dist/types/AllLemmyErrors.d.ts +1 -0
- package/dist/types/AllLemmyErrors.js +117 -0
- package/dist/types/AuthenticateWithOauth.d.ts +4 -0
- package/dist/types/BanFromCommunity.d.ts +1 -1
- package/dist/types/BanPerson.d.ts +1 -1
- package/dist/types/ChangePassword.d.ts +4 -0
- package/dist/types/Comment.d.ts +4 -0
- package/dist/types/CommentActions.d.ts +6 -6
- package/dist/types/CommentReportView.d.ts +2 -0
- package/dist/types/CommentSlimView.d.ts +0 -2
- package/dist/types/CommentSortType.d.ts +1 -1
- package/dist/types/CommentView.d.ts +2 -2
- package/dist/types/CommunityActions.d.ts +4 -4
- package/dist/types/CommunityFollowerState.d.ts +1 -1
- package/dist/types/CommunityNotificationsMode.d.ts +1 -1
- package/dist/types/CommunityReportView.d.ts +2 -0
- package/dist/types/CommunitySortType.d.ts +1 -1
- package/dist/types/CommunityView.d.ts +0 -2
- package/dist/types/CommunityVisibility.d.ts +1 -1
- package/dist/types/CreateCommentLike.d.ts +2 -2
- package/dist/types/CreateCustomEmoji.d.ts +2 -1
- package/dist/types/CreateCustomEmoji.js +0 -1
- package/dist/types/CreatePostLike.d.ts +2 -2
- package/dist/types/CreateSite.d.ts +0 -1
- package/dist/types/EditCustomEmoji.d.ts +7 -5
- package/dist/types/EditSite.d.ts +4 -4
- package/dist/types/FederatedInstanceView.d.ts +12 -0
- package/dist/types/FederationAllowList.d.ts +4 -0
- package/dist/types/FederationBlockList.d.ts +0 -2
- package/dist/types/FederationBlockList.js +1 -0
- package/dist/types/FederationMode.d.ts +1 -1
- package/dist/types/FederationQueueState.d.ts +18 -0
- package/dist/types/GetComments.d.ts +0 -1
- package/dist/types/GetFederatedInstances.d.ts +8 -0
- package/dist/types/GetFederatedInstancesKind.d.ts +1 -0
- package/dist/types/GetModlog.d.ts +2 -3
- package/dist/types/GetMultiCommunity.d.ts +2 -1
- package/dist/types/GetPersonDetailsResponse.d.ts +2 -0
- package/dist/types/GetPosts.d.ts +1 -1
- package/dist/types/GetSiteResponse.d.ts +6 -0
- package/dist/types/HideCommunity.d.ts +1 -1
- package/dist/types/InstanceActions.d.ts +6 -2
- package/dist/types/LemmyErrorType.d.ts +23 -133
- package/dist/types/LikeType.d.ts +1 -1
- package/dist/types/LinkMetadata.d.ts +4 -0
- package/dist/types/ListCommentLikes.d.ts +0 -1
- package/dist/types/ListCommunities.d.ts +0 -1
- package/dist/types/ListCommunityPendingFollows.d.ts +1 -2
- package/dist/types/ListMedia.d.ts +0 -1
- package/dist/types/ListMultiCommunities.d.ts +12 -1
- package/dist/types/ListNotifications.d.ts +0 -1
- package/dist/types/ListPersonContent.d.ts +0 -1
- package/dist/types/ListPersonHidden.d.ts +0 -1
- package/dist/types/ListPersonLiked.d.ts +0 -1
- package/dist/types/ListPersonRead.d.ts +0 -1
- package/dist/types/ListPersonSaved.d.ts +0 -1
- package/dist/types/ListPostLikes.d.ts +0 -1
- package/dist/types/ListRegistrationApplications.d.ts +0 -1
- package/dist/types/ListReports.d.ts +0 -1
- package/dist/types/ListTaglines.d.ts +0 -1
- package/dist/types/ListingType.d.ts +1 -1
- package/dist/types/LocalSite.d.ts +1 -6
- package/dist/types/LocalUser.d.ts +10 -13
- package/dist/types/LocalUserView.d.ts +1 -0
- package/dist/types/LockComment.d.ts +9 -0
- package/dist/types/LockPost.d.ts +1 -1
- package/dist/types/Login.d.ts +4 -0
- package/dist/types/MarkManyPostsAsRead.d.ts +1 -0
- package/dist/types/Modlog.d.ts +10 -0
- package/dist/types/ModlogId.d.ts +1 -0
- package/dist/types/ModlogKind.d.ts +4 -0
- package/dist/types/ModlogView.d.ts +15 -0
- package/dist/types/MultiCommunity.d.ts +3 -0
- package/dist/types/MultiCommunityEntry.d.ts +6 -0
- package/dist/types/MultiCommunityListingType.d.ts +4 -0
- package/dist/types/MultiCommunityResponse.d.ts +4 -0
- package/dist/types/MultiCommunitySortType.d.ts +1 -0
- package/dist/types/MultiCommunityView.d.ts +2 -0
- package/dist/types/MyUserInfo.d.ts +4 -1
- package/dist/types/Notification.d.ts +4 -2
- package/dist/types/NotificationData.d.ts +7 -4
- package/dist/types/NotificationDataType.d.ts +1 -1
- package/dist/types/NotificationType.d.ts +4 -0
- package/dist/types/OpenGraphData.d.ts +4 -0
- package/dist/types/PagedResponse.d.ts +11 -0
- package/dist/types/PaginationCursor.d.ts +5 -1
- package/dist/types/PendingFollowerView.d.ts +9 -0
- package/dist/types/PersonContentType.d.ts +1 -1
- package/dist/types/PersonResponse.d.ts +7 -0
- package/dist/types/PersonView.d.ts +2 -1
- package/dist/types/PluginMetadata.d.ts +2 -2
- package/dist/types/Post.d.ts +6 -4
- package/dist/types/PostActions.d.ts +11 -11
- package/dist/types/{PersonSavedCombinedView.d.ts → PostCommentCombinedView.d.ts} +3 -3
- package/dist/types/PostFeatureType.d.ts +1 -1
- package/dist/types/PostListingMode.d.ts +1 -1
- package/dist/types/PostNotificationsMode.d.ts +1 -1
- package/dist/types/PostOrCommentOrPrivateMessage.d.ts +7 -7
- package/dist/types/PostReportView.d.ts +2 -0
- package/dist/types/PostSortType.d.ts +1 -1
- package/dist/types/PostView.d.ts +2 -2
- package/dist/types/PrivateMessageReportView.d.ts +1 -0
- package/dist/types/PurgeComment.d.ts +1 -1
- package/dist/types/PurgeCommunity.d.ts +1 -1
- package/dist/types/PurgePerson.d.ts +1 -1
- package/dist/types/PurgePost.d.ts +1 -1
- package/dist/types/ReadableFederationState.d.ts +1 -1
- package/dist/types/Register.d.ts +4 -0
- package/dist/types/RegistrationApplication.d.ts +1 -0
- package/dist/types/RegistrationMode.d.ts +1 -1
- package/dist/types/RemoveComment.d.ts +1 -1
- package/dist/types/RemoveCommunity.d.ts +1 -1
- package/dist/types/RemovePost.d.ts +1 -1
- package/dist/types/ReportCombinedView.d.ts +4 -4
- package/dist/types/ReportType.d.ts +1 -1
- package/dist/types/SaveUserSettings.d.ts +5 -5
- package/dist/types/Search.d.ts +4 -1
- package/dist/types/SearchCombinedView.d.ts +5 -5
- package/dist/types/SearchResponse.d.ts +11 -1
- package/dist/types/SearchSortType.d.ts +1 -1
- package/dist/types/SearchType.d.ts +1 -1
- package/dist/types/UntranslatedError.d.ts +14 -0
- package/dist/types/UserBlockInstanceCommunitiesParams.d.ts +8 -0
- package/dist/types/{UserBlockInstanceParams.d.ts → UserBlockInstancePersonsParams.d.ts} +2 -2
- package/dist/types/UserSettingsBackup.d.ts +4 -1
- package/dist/types/VoteShow.d.ts +1 -1
- package/dist/types/VoteView.d.ts +4 -1
- package/package.json +7 -6
- package/dist/types/AdminAllowInstance.d.ts +0 -11
- package/dist/types/AdminAllowInstanceId.d.ts +0 -1
- package/dist/types/AdminAllowInstanceView.d.ts +0 -11
- package/dist/types/AdminBlockInstance.d.ts +0 -12
- package/dist/types/AdminBlockInstanceId.d.ts +0 -1
- package/dist/types/AdminBlockInstanceView.d.ts +0 -11
- package/dist/types/AdminListUsersResponse.d.ts +0 -10
- package/dist/types/AdminPurgeComment.d.ts +0 -13
- package/dist/types/AdminPurgeCommentId.d.ts +0 -1
- package/dist/types/AdminPurgeCommentView.d.ts +0 -11
- package/dist/types/AdminPurgeCommunity.d.ts +0 -11
- package/dist/types/AdminPurgeCommunityId.d.ts +0 -1
- package/dist/types/AdminPurgeCommunityView.d.ts +0 -9
- package/dist/types/AdminPurgePerson.d.ts +0 -11
- package/dist/types/AdminPurgePersonId.d.ts +0 -1
- package/dist/types/AdminPurgePersonView.d.ts +0 -9
- package/dist/types/AdminPurgePost.d.ts +0 -13
- package/dist/types/AdminPurgePostId.d.ts +0 -1
- package/dist/types/AdminPurgePostView.d.ts +0 -11
- package/dist/types/BanFromCommunityResponse.d.ts +0 -8
- package/dist/types/BanPersonResponse.d.ts +0 -8
- package/dist/types/BanPersonResponse.js +0 -2
- package/dist/types/BlockCommunityResponse.d.ts +0 -8
- package/dist/types/BlockCommunityResponse.js +0 -2
- package/dist/types/BlockPersonResponse.d.ts +0 -8
- package/dist/types/BlockPersonResponse.js +0 -2
- package/dist/types/CommentReply.d.ts +0 -13
- package/dist/types/CommentReply.js +0 -2
- package/dist/types/CommentReplyId.d.ts +0 -4
- package/dist/types/FederatedInstances.d.ts +0 -9
- package/dist/types/FederatedInstances.js +0 -2
- package/dist/types/FederationError.d.ts +0 -10
- package/dist/types/GetCommentsResponse.d.ts +0 -10
- package/dist/types/GetCommentsResponse.js +0 -2
- package/dist/types/GetCommentsSlimResponse.d.ts +0 -10
- package/dist/types/GetCommentsSlimResponse.js +0 -2
- package/dist/types/GetCommunityPendingFollowsCount.d.ts +0 -4
- package/dist/types/GetCommunityPendingFollowsCount.js +0 -2
- package/dist/types/GetFederatedInstancesResponse.d.ts +0 -10
- package/dist/types/GetFederatedInstancesResponse.js +0 -2
- package/dist/types/GetModlogResponse.d.ts +0 -13
- package/dist/types/GetModlogResponse.js +0 -2
- package/dist/types/GetPostsResponse.d.ts +0 -13
- package/dist/types/GetPostsResponse.js +0 -2
- package/dist/types/InboxDataType.d.ts +0 -4
- package/dist/types/InboxDataType.js +0 -3
- package/dist/types/ListCommentLikesResponse.d.ts +0 -13
- package/dist/types/ListCommentLikesResponse.js +0 -2
- package/dist/types/ListCommunitiesResponse.d.ts +0 -13
- package/dist/types/ListCommunitiesResponse.js +0 -2
- package/dist/types/ListCommunityPendingFollowsResponse.d.ts +0 -10
- package/dist/types/ListCommunityPendingFollowsResponse.js +0 -2
- package/dist/types/ListMediaResponse.d.ts +0 -10
- package/dist/types/ListMediaResponse.js +0 -2
- package/dist/types/ListMultiCommunitiesResponse.d.ts +0 -4
- package/dist/types/ListMultiCommunitiesResponse.js +0 -2
- package/dist/types/ListNotificationsResponse.d.ts +0 -13
- package/dist/types/ListNotificationsResponse.js +0 -2
- package/dist/types/ListPersonContentResponse.d.ts +0 -13
- package/dist/types/ListPersonContentResponse.js +0 -2
- package/dist/types/ListPersonHiddenResponse.d.ts +0 -13
- package/dist/types/ListPersonHiddenResponse.js +0 -2
- package/dist/types/ListPersonLikedResponse.d.ts +0 -13
- package/dist/types/ListPersonLikedResponse.js +0 -2
- package/dist/types/ListPersonReadResponse.d.ts +0 -13
- package/dist/types/ListPersonReadResponse.js +0 -2
- package/dist/types/ListPersonSavedResponse.d.ts +0 -13
- package/dist/types/ListPersonSavedResponse.js +0 -2
- package/dist/types/ListPostLikesResponse.d.ts +0 -13
- package/dist/types/ListPostLikesResponse.js +0 -2
- package/dist/types/ListRegistrationApplicationsResponse.d.ts +0 -13
- package/dist/types/ListRegistrationApplicationsResponse.js +0 -2
- package/dist/types/ListReportsResponse.d.ts +0 -13
- package/dist/types/ListReportsResponse.js +0 -2
- package/dist/types/ListTaglinesResponse.d.ts +0 -13
- package/dist/types/ListTaglinesResponse.js +0 -2
- package/dist/types/MarkPrivateMessageAsRead.d.ts +0 -8
- package/dist/types/MarkPrivateMessageAsRead.js +0 -2
- package/dist/types/ModAdd.d.ts +0 -12
- package/dist/types/ModAdd.js +0 -2
- package/dist/types/ModAddCommunity.d.ts +0 -14
- package/dist/types/ModAddCommunity.js +0 -2
- package/dist/types/ModAddCommunityId.d.ts +0 -1
- package/dist/types/ModAddCommunityId.js +0 -3
- package/dist/types/ModAddCommunityView.d.ts +0 -12
- package/dist/types/ModAddCommunityView.js +0 -2
- package/dist/types/ModAddId.d.ts +0 -1
- package/dist/types/ModAddId.js +0 -3
- package/dist/types/ModAddView.d.ts +0 -10
- package/dist/types/ModAddView.js +0 -2
- package/dist/types/ModBan.d.ts +0 -16
- package/dist/types/ModBan.js +0 -2
- package/dist/types/ModBanFromCommunity.d.ts +0 -16
- package/dist/types/ModBanFromCommunity.js +0 -2
- package/dist/types/ModBanFromCommunityId.d.ts +0 -1
- package/dist/types/ModBanFromCommunityId.js +0 -3
- package/dist/types/ModBanFromCommunityView.d.ts +0 -12
- package/dist/types/ModBanFromCommunityView.js +0 -2
- package/dist/types/ModBanId.d.ts +0 -1
- package/dist/types/ModBanId.js +0 -3
- package/dist/types/ModBanView.d.ts +0 -10
- package/dist/types/ModBanView.js +0 -2
- package/dist/types/ModChangeCommunityVisibility.d.ts +0 -11
- package/dist/types/ModChangeCommunityVisibility.js +0 -2
- package/dist/types/ModChangeCommunityVisibilityId.d.ts +0 -1
- package/dist/types/ModChangeCommunityVisibilityId.js +0 -3
- package/dist/types/ModChangeCommunityVisibilityView.d.ts +0 -11
- package/dist/types/ModChangeCommunityVisibilityView.js +0 -2
- package/dist/types/ModFeaturePost.d.ts +0 -14
- package/dist/types/ModFeaturePost.js +0 -2
- package/dist/types/ModFeaturePostId.d.ts +0 -1
- package/dist/types/ModFeaturePostId.js +0 -3
- package/dist/types/ModFeaturePostView.d.ts +0 -14
- package/dist/types/ModFeaturePostView.js +0 -2
- package/dist/types/ModLockPost.d.ts +0 -14
- package/dist/types/ModLockPost.js +0 -2
- package/dist/types/ModLockPostId.d.ts +0 -1
- package/dist/types/ModLockPostId.js +0 -3
- package/dist/types/ModLockPostView.d.ts +0 -14
- package/dist/types/ModLockPostView.js +0 -2
- package/dist/types/ModRemoveComment.d.ts +0 -14
- package/dist/types/ModRemoveComment.js +0 -2
- package/dist/types/ModRemoveCommentId.d.ts +0 -1
- package/dist/types/ModRemoveCommentId.js +0 -3
- package/dist/types/ModRemoveCommentView.d.ts +0 -16
- package/dist/types/ModRemoveCommentView.js +0 -2
- package/dist/types/ModRemoveCommunity.d.ts +0 -14
- package/dist/types/ModRemoveCommunity.js +0 -2
- package/dist/types/ModRemoveCommunityId.d.ts +0 -1
- package/dist/types/ModRemoveCommunityId.js +0 -3
- package/dist/types/ModRemoveCommunityView.d.ts +0 -11
- package/dist/types/ModRemoveCommunityView.js +0 -2
- package/dist/types/ModRemovePost.d.ts +0 -14
- package/dist/types/ModRemovePost.js +0 -2
- package/dist/types/ModRemovePostId.d.ts +0 -1
- package/dist/types/ModRemovePostId.js +0 -3
- package/dist/types/ModRemovePostView.d.ts +0 -14
- package/dist/types/ModRemovePostView.js +0 -2
- package/dist/types/ModTransferCommunity.d.ts +0 -13
- package/dist/types/ModTransferCommunity.js +0 -2
- package/dist/types/ModTransferCommunityId.d.ts +0 -1
- package/dist/types/ModTransferCommunityId.js +0 -3
- package/dist/types/ModTransferCommunityView.d.ts +0 -12
- package/dist/types/ModTransferCommunityView.js +0 -2
- package/dist/types/ModlogActionType.d.ts +0 -4
- package/dist/types/ModlogActionType.js +0 -3
- package/dist/types/ModlogCombinedView.d.ts +0 -52
- package/dist/types/ModlogCombinedView.js +0 -2
- package/dist/types/NotificationTypes.d.ts +0 -4
- package/dist/types/NotificationTypes.js +0 -3
- package/dist/types/NotificationsMode.d.ts +0 -4
- package/dist/types/NotificationsMode.js +0 -3
- package/dist/types/PersonCommentMention.d.ts +0 -13
- package/dist/types/PersonCommentMention.js +0 -2
- package/dist/types/PersonCommentMentionId.d.ts +0 -4
- package/dist/types/PersonCommentMentionId.js +0 -3
- package/dist/types/PersonContentCombinedView.d.ts +0 -7
- package/dist/types/PersonContentCombinedView.js +0 -2
- package/dist/types/PersonLikedCombinedView.d.ts +0 -7
- package/dist/types/PersonLikedCombinedView.js +0 -2
- package/dist/types/PersonNotification.d.ts +0 -9
- package/dist/types/PersonNotification.js +0 -2
- package/dist/types/PersonPostMention.d.ts +0 -13
- package/dist/types/PersonPostMention.js +0 -2
- package/dist/types/PersonPostMentionId.d.ts +0 -4
- package/dist/types/PersonPostMentionId.js +0 -3
- package/dist/types/PersonSavedCombinedView.js +0 -2
- package/dist/types/UserBlockInstanceParams.js +0 -2
- /package/dist/types/{AdminAllowInstance.js → FederatedInstanceView.js} +0 -0
- /package/dist/types/{AdminAllowInstanceId.js → FederationAllowList.js} +0 -0
- /package/dist/types/{AdminAllowInstanceView.js → FederationQueueState.js} +0 -0
- /package/dist/types/{AdminBlockInstance.js → GetFederatedInstances.js} +0 -0
- /package/dist/types/{AdminBlockInstanceId.js → GetFederatedInstancesKind.js} +0 -0
- /package/dist/types/{AdminBlockInstanceView.js → LockComment.js} +0 -0
- /package/dist/types/{AdminListUsersResponse.js → Modlog.js} +0 -0
- /package/dist/types/{AdminPurgeCommentId.js → ModlogId.js} +0 -0
- /package/dist/types/{AdminPurgeCommunityId.js → ModlogKind.js} +0 -0
- /package/dist/types/{AdminPurgeComment.js → ModlogView.js} +0 -0
- /package/dist/types/{AdminPurgeCommentView.js → MultiCommunityEntry.js} +0 -0
- /package/dist/types/{AdminPurgePersonId.js → MultiCommunityListingType.js} +0 -0
- /package/dist/types/{AdminPurgeCommunity.js → MultiCommunityResponse.js} +0 -0
- /package/dist/types/{AdminPurgePostId.js → MultiCommunitySortType.js} +0 -0
- /package/dist/types/{CommentReplyId.js → NotificationType.js} +0 -0
- /package/dist/types/{AdminPurgeCommunityView.js → PagedResponse.js} +0 -0
- /package/dist/types/{AdminPurgePerson.js → PendingFollowerView.js} +0 -0
- /package/dist/types/{AdminPurgePersonView.js → PersonResponse.js} +0 -0
- /package/dist/types/{AdminPurgePost.js → PostCommentCombinedView.js} +0 -0
- /package/dist/types/{FederationError.js → UntranslatedError.js} +0 -0
- /package/dist/types/{AdminPurgePostView.js → UserBlockInstanceCommunitiesParams.js} +0 -0
- /package/dist/types/{BanFromCommunityResponse.js → UserBlockInstancePersonsParams.js} +0 -0
package/dist/http.js
CHANGED
|
@@ -112,7 +112,7 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
|
|
|
112
112
|
* @summary List login tokens for your user
|
|
113
113
|
*/
|
|
114
114
|
async listLogins(options) {
|
|
115
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/
|
|
115
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/login/list", {}, options);
|
|
116
116
|
}
|
|
117
117
|
/**
|
|
118
118
|
* @summary Returns an error message if your auth token is invalid
|
|
@@ -205,8 +205,8 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
|
|
|
205
205
|
/**
|
|
206
206
|
* @summary Get a community's pending follows count.
|
|
207
207
|
*/
|
|
208
|
-
async getCommunityPendingFollowsCount(
|
|
209
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/community/pending_follows/count",
|
|
208
|
+
async getCommunityPendingFollowsCount(options) {
|
|
209
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/community/pending_follows/count", {}, options);
|
|
210
210
|
}
|
|
211
211
|
/**
|
|
212
212
|
* @summary Get a community's pending followers.
|
|
@@ -230,7 +230,7 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
|
|
|
230
230
|
* @summary Delete a community.
|
|
231
231
|
*/
|
|
232
232
|
async deleteCommunity(form, options) {
|
|
233
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.
|
|
233
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/community", form, options);
|
|
234
234
|
}
|
|
235
235
|
/**
|
|
236
236
|
* @summary Hide a community from public / "All" view. Admins only.
|
|
@@ -308,7 +308,7 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
|
|
|
308
308
|
* @summary Delete a post.
|
|
309
309
|
*/
|
|
310
310
|
async deletePost(form, options) {
|
|
311
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.
|
|
311
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/post", form, options);
|
|
312
312
|
}
|
|
313
313
|
/**
|
|
314
314
|
* @summary A moderator remove for a post.
|
|
@@ -404,7 +404,7 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
|
|
|
404
404
|
* @summary Delete a comment.
|
|
405
405
|
*/
|
|
406
406
|
async deleteComment(form, options) {
|
|
407
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.
|
|
407
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/comment", form, options);
|
|
408
408
|
}
|
|
409
409
|
/**
|
|
410
410
|
* @summary A moderator remove for a comment.
|
|
@@ -413,7 +413,13 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
|
|
|
413
413
|
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/comment/remove", form, options);
|
|
414
414
|
}
|
|
415
415
|
/**
|
|
416
|
-
* @summary
|
|
416
|
+
* @summary A moderator can lock a comment (IE disable replies).
|
|
417
|
+
*/
|
|
418
|
+
async lockComment(form, options) {
|
|
419
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/comment/lock", form, options);
|
|
420
|
+
}
|
|
421
|
+
/**
|
|
422
|
+
* @Summary Like / vote on a comment.
|
|
417
423
|
*/
|
|
418
424
|
async likeComment(form, options) {
|
|
419
425
|
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/comment/like", form, options);
|
|
@@ -482,13 +488,7 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
|
|
|
482
488
|
* @summary Delete a private message.
|
|
483
489
|
*/
|
|
484
490
|
async deletePrivateMessage(form, options) {
|
|
485
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.
|
|
486
|
-
}
|
|
487
|
-
/**
|
|
488
|
-
* @summary Mark a private message as read.
|
|
489
|
-
*/
|
|
490
|
-
async markPrivateMessageAsRead(form, options) {
|
|
491
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/private_message/mark_as_read", form, options);
|
|
491
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/private_message", form, options);
|
|
492
492
|
}
|
|
493
493
|
/**
|
|
494
494
|
* @summary Create a report for a private message.
|
|
@@ -532,6 +532,12 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
|
|
|
532
532
|
async listPersonContent(form = {}, options) {
|
|
533
533
|
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/person/content", form, options);
|
|
534
534
|
}
|
|
535
|
+
/**
|
|
536
|
+
* @summary Make a note for a person.
|
|
537
|
+
*/
|
|
538
|
+
async notePerson(form, options) {
|
|
539
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/person/note", form, options);
|
|
540
|
+
}
|
|
535
541
|
/**
|
|
536
542
|
* @summary Ban a person from your site.
|
|
537
543
|
*/
|
|
@@ -560,7 +566,7 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
|
|
|
560
566
|
* @summary Delete your account.
|
|
561
567
|
*/
|
|
562
568
|
async deleteAccount(form, options) {
|
|
563
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.
|
|
569
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/account", form, options);
|
|
564
570
|
}
|
|
565
571
|
/**
|
|
566
572
|
* @summary Reset your password.
|
|
@@ -575,16 +581,16 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
|
|
|
575
581
|
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/auth/password_change", form, options);
|
|
576
582
|
}
|
|
577
583
|
/**
|
|
578
|
-
* @summary Mark all
|
|
584
|
+
* @summary Mark all notifications as read.
|
|
579
585
|
*/
|
|
580
586
|
async markAllNotificationsAsRead(options) {
|
|
581
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/mark_as_read/all", {}, options);
|
|
587
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/notification/mark_as_read/all", {}, options);
|
|
582
588
|
}
|
|
583
589
|
/**
|
|
584
|
-
* @summary Mark a
|
|
590
|
+
* @summary Mark a notification as read.
|
|
585
591
|
*/
|
|
586
592
|
async markNotificationAsRead(form, options) {
|
|
587
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/mark_as_read", form, options);
|
|
593
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/notification/mark_as_read", form, options);
|
|
588
594
|
}
|
|
589
595
|
/**
|
|
590
596
|
* @summary Save your user settings.
|
|
@@ -602,19 +608,19 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
|
|
|
602
608
|
* @summary Get counts for your reports.
|
|
603
609
|
*/
|
|
604
610
|
async getReportCount(form, options) {
|
|
605
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/
|
|
611
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/report/count", form, options);
|
|
606
612
|
}
|
|
607
613
|
/**
|
|
608
614
|
* @summary Get your unread counts.
|
|
609
615
|
*/
|
|
610
616
|
async getUnreadCount(options) {
|
|
611
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/
|
|
617
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/notification/count", {}, options);
|
|
612
618
|
}
|
|
613
619
|
/**
|
|
614
620
|
* @summary Get your inbox (replies, comment mentions, post mentions, and messages)
|
|
615
621
|
*/
|
|
616
622
|
async listNotifications(form, options) {
|
|
617
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/
|
|
623
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/notification/list", form, options);
|
|
618
624
|
}
|
|
619
625
|
/**
|
|
620
626
|
* @summary Verify your email
|
|
@@ -746,7 +752,7 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
|
|
|
746
752
|
* @summary Delete a tagline
|
|
747
753
|
*/
|
|
748
754
|
async deleteTagline(form, options) {
|
|
749
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.
|
|
755
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/admin/tagline", form, options);
|
|
750
756
|
}
|
|
751
757
|
/**
|
|
752
758
|
* @summary List taglines.
|
|
@@ -788,7 +794,7 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
|
|
|
788
794
|
* @summary Delete an oauth provider method
|
|
789
795
|
*/
|
|
790
796
|
async deleteOAuthProvider(form, options) {
|
|
791
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.
|
|
797
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/oauth_provider", form, options);
|
|
792
798
|
}
|
|
793
799
|
/**
|
|
794
800
|
* @summary Authenticate with OAuth
|
|
@@ -799,8 +805,8 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
|
|
|
799
805
|
/**
|
|
800
806
|
* @summary Fetch federated instances.
|
|
801
807
|
*/
|
|
802
|
-
async getFederatedInstances(options) {
|
|
803
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/federated_instances",
|
|
808
|
+
async getFederatedInstances(form, options) {
|
|
809
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/federated_instances", form, options);
|
|
804
810
|
}
|
|
805
811
|
/**
|
|
806
812
|
* @summary List user reports.
|
|
@@ -809,10 +815,16 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
|
|
|
809
815
|
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/report/list", form, options);
|
|
810
816
|
}
|
|
811
817
|
/**
|
|
812
|
-
* @summary Block an instance as user.
|
|
818
|
+
* @summary Block an instance's communities as a user.
|
|
819
|
+
*/
|
|
820
|
+
async userBlockInstanceCommunities(form, options) {
|
|
821
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/block/instance/communities", form, options);
|
|
822
|
+
}
|
|
823
|
+
/**
|
|
824
|
+
* @summary Block an instance's persons as a user.
|
|
813
825
|
*/
|
|
814
|
-
async
|
|
815
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/block/instance", form, options);
|
|
826
|
+
async userBlockInstancePersons(form, options) {
|
|
827
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/block/instance/persons", form, options);
|
|
816
828
|
}
|
|
817
829
|
/**
|
|
818
830
|
* @summary Globally block an instance as admin.
|
|
@@ -914,7 +926,7 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
|
|
|
914
926
|
* Mark donation dialog as shown, so it isn't displayed anymore.
|
|
915
927
|
*/
|
|
916
928
|
donationDialogShown(options) {
|
|
917
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/
|
|
929
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/donation_dialog_shown", {}, options);
|
|
918
930
|
}
|
|
919
931
|
createMultiCommunity(form, options) {
|
|
920
932
|
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/multi_community", form, options);
|
|
@@ -937,6 +949,18 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
|
|
|
937
949
|
followMultiCommunity(form, options) {
|
|
938
950
|
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/multi_community/follow", form, options);
|
|
939
951
|
}
|
|
952
|
+
/**
|
|
953
|
+
* @summary Change notification settings for a community
|
|
954
|
+
*/
|
|
955
|
+
updateCommunityNotifications(form, options) {
|
|
956
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/community/notifications", form, options);
|
|
957
|
+
}
|
|
958
|
+
/**
|
|
959
|
+
* @summary Change notification settings for a post
|
|
960
|
+
*/
|
|
961
|
+
updatePostNotifications(form, options) {
|
|
962
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/post/notifications", form, options);
|
|
963
|
+
}
|
|
940
964
|
/**
|
|
941
965
|
* Set the headers (can be used to set the auth header)
|
|
942
966
|
*/
|
|
@@ -991,10 +1015,11 @@ _LemmyHttp_wrapper = async function _LemmyHttp_wrapper(type_, endpoint, form, op
|
|
|
991
1015
|
json = await response.json();
|
|
992
1016
|
}
|
|
993
1017
|
catch {
|
|
994
|
-
throw new LemmyError(response.statusText);
|
|
1018
|
+
throw new LemmyError(response.statusText, response.status);
|
|
995
1019
|
}
|
|
996
1020
|
if (!response.ok) {
|
|
997
|
-
|
|
1021
|
+
console.error(`Request error while calling ${type_} ${endpoint} with ${JSON.stringify(form)}`);
|
|
1022
|
+
let err = new LemmyError(json.error ?? response.statusText, response.status, json.message);
|
|
998
1023
|
throw err;
|
|
999
1024
|
}
|
|
1000
1025
|
else {
|
|
@@ -1055,7 +1080,7 @@ __decorate([
|
|
|
1055
1080
|
], LemmyHttp.prototype, "importSettings", null);
|
|
1056
1081
|
__decorate([
|
|
1057
1082
|
(0, runtime_1.Security)("bearerAuth"),
|
|
1058
|
-
(0, runtime_1.Get)("/account/
|
|
1083
|
+
(0, runtime_1.Get)("/account/login/list"),
|
|
1059
1084
|
(0, runtime_1.Tags)("Account"),
|
|
1060
1085
|
__param(0, (0, runtime_1.Inject)())
|
|
1061
1086
|
], LemmyHttp.prototype, "listLogins", null);
|
|
@@ -1166,8 +1191,7 @@ __decorate([
|
|
|
1166
1191
|
(0, runtime_1.Security)("bearerAuth"),
|
|
1167
1192
|
(0, runtime_1.Get)("/community/pending_follows/count"),
|
|
1168
1193
|
(0, runtime_1.Tags)("Community"),
|
|
1169
|
-
__param(0, (0, runtime_1.
|
|
1170
|
-
__param(1, (0, runtime_1.Inject)())
|
|
1194
|
+
__param(0, (0, runtime_1.Inject)())
|
|
1171
1195
|
], LemmyHttp.prototype, "getCommunityPendingFollowsCount", null);
|
|
1172
1196
|
__decorate([
|
|
1173
1197
|
(0, runtime_1.Security)("bearerAuth"),
|
|
@@ -1192,7 +1216,7 @@ __decorate([
|
|
|
1192
1216
|
], LemmyHttp.prototype, "blockCommunity", null);
|
|
1193
1217
|
__decorate([
|
|
1194
1218
|
(0, runtime_1.Security)("bearerAuth"),
|
|
1195
|
-
(0, runtime_1.
|
|
1219
|
+
(0, runtime_1.Delete)("/community"),
|
|
1196
1220
|
(0, runtime_1.Tags)("Community"),
|
|
1197
1221
|
__param(0, (0, runtime_1.Body)()),
|
|
1198
1222
|
__param(1, (0, runtime_1.Inject)())
|
|
@@ -1285,7 +1309,7 @@ __decorate([
|
|
|
1285
1309
|
], LemmyHttp.prototype, "modEditPost", null);
|
|
1286
1310
|
__decorate([
|
|
1287
1311
|
(0, runtime_1.Security)("bearerAuth"),
|
|
1288
|
-
(0, runtime_1.
|
|
1312
|
+
(0, runtime_1.Delete)("/post"),
|
|
1289
1313
|
(0, runtime_1.Tags)("Post"),
|
|
1290
1314
|
__param(0, (0, runtime_1.Body)()),
|
|
1291
1315
|
__param(1, (0, runtime_1.Inject)())
|
|
@@ -1398,7 +1422,7 @@ __decorate([
|
|
|
1398
1422
|
], LemmyHttp.prototype, "editComment", null);
|
|
1399
1423
|
__decorate([
|
|
1400
1424
|
(0, runtime_1.Security)("bearerAuth"),
|
|
1401
|
-
(0, runtime_1.
|
|
1425
|
+
(0, runtime_1.Delete)("/comment"),
|
|
1402
1426
|
(0, runtime_1.Tags)("Comment"),
|
|
1403
1427
|
__param(0, (0, runtime_1.Body)()),
|
|
1404
1428
|
__param(1, (0, runtime_1.Inject)())
|
|
@@ -1410,6 +1434,13 @@ __decorate([
|
|
|
1410
1434
|
__param(0, (0, runtime_1.Body)()),
|
|
1411
1435
|
__param(1, (0, runtime_1.Inject)())
|
|
1412
1436
|
], LemmyHttp.prototype, "removeComment", null);
|
|
1437
|
+
__decorate([
|
|
1438
|
+
(0, runtime_1.Security)("bearerAuth"),
|
|
1439
|
+
(0, runtime_1.Post)("/comment/lock"),
|
|
1440
|
+
(0, runtime_1.Tags)("Comment", "Moderator"),
|
|
1441
|
+
__param(0, (0, runtime_1.Body)()),
|
|
1442
|
+
__param(1, (0, runtime_1.Inject)())
|
|
1443
|
+
], LemmyHttp.prototype, "lockComment", null);
|
|
1413
1444
|
__decorate([
|
|
1414
1445
|
(0, runtime_1.Security)("bearerAuth"),
|
|
1415
1446
|
(0, runtime_1.Post)("/comment/like"),
|
|
@@ -1492,18 +1523,11 @@ __decorate([
|
|
|
1492
1523
|
], LemmyHttp.prototype, "editPrivateMessage", null);
|
|
1493
1524
|
__decorate([
|
|
1494
1525
|
(0, runtime_1.Security)("bearerAuth"),
|
|
1495
|
-
(0, runtime_1.
|
|
1526
|
+
(0, runtime_1.Delete)("/private_message"),
|
|
1496
1527
|
(0, runtime_1.Tags)("PrivateMessage"),
|
|
1497
1528
|
__param(0, (0, runtime_1.Body)()),
|
|
1498
1529
|
__param(1, (0, runtime_1.Inject)())
|
|
1499
1530
|
], LemmyHttp.prototype, "deletePrivateMessage", null);
|
|
1500
|
-
__decorate([
|
|
1501
|
-
(0, runtime_1.Security)("bearerAuth"),
|
|
1502
|
-
(0, runtime_1.Post)("/private_message/mark_as_read"),
|
|
1503
|
-
(0, runtime_1.Tags)("PrivateMessage"),
|
|
1504
|
-
__param(0, (0, runtime_1.Body)()),
|
|
1505
|
-
__param(1, (0, runtime_1.Inject)())
|
|
1506
|
-
], LemmyHttp.prototype, "markPrivateMessageAsRead", null);
|
|
1507
1531
|
__decorate([
|
|
1508
1532
|
(0, runtime_1.Security)("bearerAuth"),
|
|
1509
1533
|
(0, runtime_1.Post)("/private_message/report"),
|
|
@@ -1552,6 +1576,13 @@ __decorate([
|
|
|
1552
1576
|
__param(0, (0, runtime_1.Queries)()),
|
|
1553
1577
|
__param(1, (0, runtime_1.Inject)())
|
|
1554
1578
|
], LemmyHttp.prototype, "listPersonContent", null);
|
|
1579
|
+
__decorate([
|
|
1580
|
+
(0, runtime_1.Security)("bearerAuth"),
|
|
1581
|
+
(0, runtime_1.Post)("/person/note"),
|
|
1582
|
+
(0, runtime_1.Tags)("Person"),
|
|
1583
|
+
__param(0, (0, runtime_1.Body)()),
|
|
1584
|
+
__param(1, (0, runtime_1.Inject)())
|
|
1585
|
+
], LemmyHttp.prototype, "notePerson", null);
|
|
1555
1586
|
__decorate([
|
|
1556
1587
|
(0, runtime_1.Security)("bearerAuth"),
|
|
1557
1588
|
(0, runtime_1.Post)("/admin/ban"),
|
|
@@ -1580,7 +1611,7 @@ __decorate([
|
|
|
1580
1611
|
], LemmyHttp.prototype, "getCaptcha", null);
|
|
1581
1612
|
__decorate([
|
|
1582
1613
|
(0, runtime_1.Security)("bearerAuth"),
|
|
1583
|
-
(0, runtime_1.
|
|
1614
|
+
(0, runtime_1.Delete)("/account"),
|
|
1584
1615
|
(0, runtime_1.Tags)("Account"),
|
|
1585
1616
|
__param(0, (0, runtime_1.Body)()),
|
|
1586
1617
|
__param(1, (0, runtime_1.Inject)())
|
|
@@ -1601,13 +1632,13 @@ __decorate([
|
|
|
1601
1632
|
], LemmyHttp.prototype, "passwordChangeAfterReset", null);
|
|
1602
1633
|
__decorate([
|
|
1603
1634
|
(0, runtime_1.Security)("bearerAuth"),
|
|
1604
|
-
(0, runtime_1.Post)("/account/mark_as_read/all"),
|
|
1635
|
+
(0, runtime_1.Post)("/account/notification/mark_as_read/all"),
|
|
1605
1636
|
(0, runtime_1.Tags)("Account"),
|
|
1606
1637
|
__param(0, (0, runtime_1.Inject)())
|
|
1607
1638
|
], LemmyHttp.prototype, "markAllNotificationsAsRead", null);
|
|
1608
1639
|
__decorate([
|
|
1609
1640
|
(0, runtime_1.Security)("bearerAuth"),
|
|
1610
|
-
(0, runtime_1.Post)("/account/mark_as_read"),
|
|
1641
|
+
(0, runtime_1.Post)("/account/notification/mark_as_read"),
|
|
1611
1642
|
(0, runtime_1.Tags)("Account"),
|
|
1612
1643
|
__param(0, (0, runtime_1.Body)()),
|
|
1613
1644
|
__param(1, (0, runtime_1.Inject)())
|
|
@@ -1628,20 +1659,20 @@ __decorate([
|
|
|
1628
1659
|
], LemmyHttp.prototype, "changePassword", null);
|
|
1629
1660
|
__decorate([
|
|
1630
1661
|
(0, runtime_1.Security)("bearerAuth"),
|
|
1631
|
-
(0, runtime_1.Get)("/
|
|
1662
|
+
(0, runtime_1.Get)("/report/count"),
|
|
1632
1663
|
(0, runtime_1.Tags)("Account"),
|
|
1633
1664
|
__param(0, (0, runtime_1.Queries)()),
|
|
1634
1665
|
__param(1, (0, runtime_1.Inject)())
|
|
1635
1666
|
], LemmyHttp.prototype, "getReportCount", null);
|
|
1636
1667
|
__decorate([
|
|
1637
1668
|
(0, runtime_1.Security)("bearerAuth"),
|
|
1638
|
-
(0, runtime_1.Get)("/account/
|
|
1669
|
+
(0, runtime_1.Get)("/account/notification/count"),
|
|
1639
1670
|
(0, runtime_1.Tags)("Account"),
|
|
1640
1671
|
__param(0, (0, runtime_1.Inject)())
|
|
1641
1672
|
], LemmyHttp.prototype, "getUnreadCount", null);
|
|
1642
1673
|
__decorate([
|
|
1643
1674
|
(0, runtime_1.Security)("bearerAuth"),
|
|
1644
|
-
(0, runtime_1.Get)("/account/
|
|
1675
|
+
(0, runtime_1.Get)("/account/notification/list"),
|
|
1645
1676
|
(0, runtime_1.Tags)("Account"),
|
|
1646
1677
|
__param(0, (0, runtime_1.Queries)()),
|
|
1647
1678
|
__param(1, (0, runtime_1.Inject)())
|
|
@@ -1793,7 +1824,7 @@ __decorate([
|
|
|
1793
1824
|
], LemmyHttp.prototype, "editTagline", null);
|
|
1794
1825
|
__decorate([
|
|
1795
1826
|
(0, runtime_1.Security)("bearerAuth"),
|
|
1796
|
-
(0, runtime_1.
|
|
1827
|
+
(0, runtime_1.Delete)("/admin/tagline"),
|
|
1797
1828
|
(0, runtime_1.Tags)("Admin", "Tagline"),
|
|
1798
1829
|
__param(0, (0, runtime_1.Body)()),
|
|
1799
1830
|
__param(1, (0, runtime_1.Inject)())
|
|
@@ -1843,7 +1874,7 @@ __decorate([
|
|
|
1843
1874
|
], LemmyHttp.prototype, "editOAuthProvider", null);
|
|
1844
1875
|
__decorate([
|
|
1845
1876
|
(0, runtime_1.Security)("bearerAuth"),
|
|
1846
|
-
(0, runtime_1.
|
|
1877
|
+
(0, runtime_1.Delete)("/oauth_provider"),
|
|
1847
1878
|
(0, runtime_1.Tags)("Miscellaneous", "OAuth"),
|
|
1848
1879
|
__param(0, (0, runtime_1.Body)()),
|
|
1849
1880
|
__param(1, (0, runtime_1.Inject)())
|
|
@@ -1858,7 +1889,8 @@ __decorate([
|
|
|
1858
1889
|
__decorate([
|
|
1859
1890
|
(0, runtime_1.Get)("/federated_instances"),
|
|
1860
1891
|
(0, runtime_1.Tags)("Miscellaneous"),
|
|
1861
|
-
__param(0, (0, runtime_1.
|
|
1892
|
+
__param(0, (0, runtime_1.Queries)()),
|
|
1893
|
+
__param(1, (0, runtime_1.Inject)())
|
|
1862
1894
|
], LemmyHttp.prototype, "getFederatedInstances", null);
|
|
1863
1895
|
__decorate([
|
|
1864
1896
|
(0, runtime_1.Security)("bearerAuth"),
|
|
@@ -1869,11 +1901,18 @@ __decorate([
|
|
|
1869
1901
|
], LemmyHttp.prototype, "listReports", null);
|
|
1870
1902
|
__decorate([
|
|
1871
1903
|
(0, runtime_1.Security)("bearerAuth"),
|
|
1872
|
-
(0, runtime_1.Post)("/account/block/instance"),
|
|
1873
|
-
(0, runtime_1.Tags)("Account"),
|
|
1904
|
+
(0, runtime_1.Post)("/account/block/instance/communities"),
|
|
1905
|
+
(0, runtime_1.Tags)("Account", "Community"),
|
|
1906
|
+
__param(0, (0, runtime_1.Body)()),
|
|
1907
|
+
__param(1, (0, runtime_1.Inject)())
|
|
1908
|
+
], LemmyHttp.prototype, "userBlockInstanceCommunities", null);
|
|
1909
|
+
__decorate([
|
|
1910
|
+
(0, runtime_1.Security)("bearerAuth"),
|
|
1911
|
+
(0, runtime_1.Post)("/account/block/instance/persons"),
|
|
1912
|
+
(0, runtime_1.Tags)("Account", "Person"),
|
|
1874
1913
|
__param(0, (0, runtime_1.Body)()),
|
|
1875
1914
|
__param(1, (0, runtime_1.Inject)())
|
|
1876
|
-
], LemmyHttp.prototype, "
|
|
1915
|
+
], LemmyHttp.prototype, "userBlockInstancePersons", null);
|
|
1877
1916
|
__decorate([
|
|
1878
1917
|
(0, runtime_1.Security)("bearerAuth"),
|
|
1879
1918
|
(0, runtime_1.Post)("/admin/instance/block"),
|
|
@@ -1984,8 +2023,8 @@ __decorate([
|
|
|
1984
2023
|
], LemmyHttp.prototype, "imageHealth", null);
|
|
1985
2024
|
__decorate([
|
|
1986
2025
|
(0, runtime_1.Security)("bearerAuth"),
|
|
1987
|
-
(0, runtime_1.Post)("/
|
|
1988
|
-
(0, runtime_1.Tags)("
|
|
2026
|
+
(0, runtime_1.Post)("/account/donation_dialog_shown"),
|
|
2027
|
+
(0, runtime_1.Tags)("Account"),
|
|
1989
2028
|
__param(0, (0, runtime_1.Inject)())
|
|
1990
2029
|
], LemmyHttp.prototype, "donationDialogShown", null);
|
|
1991
2030
|
__decorate([
|
|
@@ -2034,6 +2073,20 @@ __decorate([
|
|
|
2034
2073
|
__param(0, (0, runtime_1.Body)()),
|
|
2035
2074
|
__param(1, (0, runtime_1.Inject)())
|
|
2036
2075
|
], LemmyHttp.prototype, "followMultiCommunity", null);
|
|
2076
|
+
__decorate([
|
|
2077
|
+
(0, runtime_1.Security)("bearerAuth"),
|
|
2078
|
+
(0, runtime_1.Put)("/community/notifications"),
|
|
2079
|
+
(0, runtime_1.Tags)("Community"),
|
|
2080
|
+
__param(0, (0, runtime_1.Body)()),
|
|
2081
|
+
__param(1, (0, runtime_1.Inject)())
|
|
2082
|
+
], LemmyHttp.prototype, "updateCommunityNotifications", null);
|
|
2083
|
+
__decorate([
|
|
2084
|
+
(0, runtime_1.Security)("bearerAuth"),
|
|
2085
|
+
(0, runtime_1.Put)("/post/notifications"),
|
|
2086
|
+
(0, runtime_1.Tags)("Post"),
|
|
2087
|
+
__param(0, (0, runtime_1.Body)()),
|
|
2088
|
+
__param(1, (0, runtime_1.Inject)())
|
|
2089
|
+
], LemmyHttp.prototype, "updatePostNotifications", null);
|
|
2037
2090
|
exports.LemmyHttp = LemmyHttp = __decorate([
|
|
2038
2091
|
(0, runtime_1.Route)("api/v4")
|
|
2039
2092
|
], LemmyHttp);
|
|
@@ -2061,9 +2114,10 @@ function createFormData(image) {
|
|
|
2061
2114
|
* The msg is either an empty string, or extra non-translatable info.
|
|
2062
2115
|
*/
|
|
2063
2116
|
class LemmyError extends Error {
|
|
2064
|
-
constructor(name, msg) {
|
|
2117
|
+
constructor(name, status, msg) {
|
|
2065
2118
|
super(msg ?? "");
|
|
2066
2119
|
this.name = name;
|
|
2120
|
+
this.status = status;
|
|
2067
2121
|
// Set the prototype explicitly.
|
|
2068
2122
|
Object.setPrototypeOf(this, LemmyError.prototype);
|
|
2069
2123
|
}
|