lemmy-js-client 1.0.0-post-tags.1 → 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 +95 -70
- package/dist/http.js +141 -61
- package/dist/index.d.ts +25 -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/CreateCommunityTag.d.ts +2 -0
- 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/ModEditPost.d.ts +10 -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/Tag.d.ts +5 -13
- package/dist/types/TagsView.d.ts +1 -1
- package/dist/types/UntranslatedError.d.ts +14 -0
- package/dist/types/UpdateCommunityTag.d.ts +9 -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/BlockCommunityResponse.d.ts +0 -8
- 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 → ModEditPost.js} +0 -0
- /package/dist/types/{AdminPurgeComment.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/{AdminPurgeCommentView.js → ModlogView.js} +0 -0
- /package/dist/types/{AdminPurgeCommunity.js → MultiCommunityEntry.js} +0 -0
- /package/dist/types/{AdminPurgePersonId.js → MultiCommunityListingType.js} +0 -0
- /package/dist/types/{AdminPurgeCommunityView.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/{AdminPurgePerson.js → PagedResponse.js} +0 -0
- /package/dist/types/{AdminPurgePersonView.js → PendingFollowerView.js} +0 -0
- /package/dist/types/{AdminPurgePost.js → PersonResponse.js} +0 -0
- /package/dist/types/{AdminPurgePostView.js → PostCommentCombinedView.js} +0 -0
- /package/dist/types/{FederationError.js → UntranslatedError.js} +0 -0
- /package/dist/types/{BanFromCommunityResponse.js → UpdateCommunityTag.js} +0 -0
- /package/dist/types/{BanPersonResponse.js → UserBlockInstanceCommunitiesParams.js} +0 -0
- /package/dist/types/{BlockCommunityResponse.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.
|
|
@@ -298,11 +298,17 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
|
|
|
298
298
|
async editPost(form, options) {
|
|
299
299
|
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/post", form, options);
|
|
300
300
|
}
|
|
301
|
+
/**
|
|
302
|
+
* @summary Mods can change nsfw flag and tags for a post
|
|
303
|
+
*/
|
|
304
|
+
async modEditPost(form, options) {
|
|
305
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/post/mod_update", form, options);
|
|
306
|
+
}
|
|
301
307
|
/**
|
|
302
308
|
* @summary Delete a post.
|
|
303
309
|
*/
|
|
304
310
|
async deletePost(form, options) {
|
|
305
|
-
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);
|
|
306
312
|
}
|
|
307
313
|
/**
|
|
308
314
|
* @summary A moderator remove for a post.
|
|
@@ -398,7 +404,7 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
|
|
|
398
404
|
* @summary Delete a comment.
|
|
399
405
|
*/
|
|
400
406
|
async deleteComment(form, options) {
|
|
401
|
-
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);
|
|
402
408
|
}
|
|
403
409
|
/**
|
|
404
410
|
* @summary A moderator remove for a comment.
|
|
@@ -407,7 +413,13 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
|
|
|
407
413
|
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/comment/remove", form, options);
|
|
408
414
|
}
|
|
409
415
|
/**
|
|
410
|
-
* @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.
|
|
411
423
|
*/
|
|
412
424
|
async likeComment(form, options) {
|
|
413
425
|
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/comment/like", form, options);
|
|
@@ -476,13 +488,7 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
|
|
|
476
488
|
* @summary Delete a private message.
|
|
477
489
|
*/
|
|
478
490
|
async deletePrivateMessage(form, options) {
|
|
479
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.
|
|
480
|
-
}
|
|
481
|
-
/**
|
|
482
|
-
* @summary Mark a private message as read.
|
|
483
|
-
*/
|
|
484
|
-
async markPrivateMessageAsRead(form, options) {
|
|
485
|
-
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);
|
|
486
492
|
}
|
|
487
493
|
/**
|
|
488
494
|
* @summary Create a report for a private message.
|
|
@@ -526,6 +532,12 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
|
|
|
526
532
|
async listPersonContent(form = {}, options) {
|
|
527
533
|
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/person/content", form, options);
|
|
528
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
|
+
}
|
|
529
541
|
/**
|
|
530
542
|
* @summary Ban a person from your site.
|
|
531
543
|
*/
|
|
@@ -554,7 +566,7 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
|
|
|
554
566
|
* @summary Delete your account.
|
|
555
567
|
*/
|
|
556
568
|
async deleteAccount(form, options) {
|
|
557
|
-
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);
|
|
558
570
|
}
|
|
559
571
|
/**
|
|
560
572
|
* @summary Reset your password.
|
|
@@ -569,16 +581,16 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
|
|
|
569
581
|
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/auth/password_change", form, options);
|
|
570
582
|
}
|
|
571
583
|
/**
|
|
572
|
-
* @summary Mark all
|
|
584
|
+
* @summary Mark all notifications as read.
|
|
573
585
|
*/
|
|
574
586
|
async markAllNotificationsAsRead(options) {
|
|
575
|
-
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);
|
|
576
588
|
}
|
|
577
589
|
/**
|
|
578
|
-
* @summary Mark a
|
|
590
|
+
* @summary Mark a notification as read.
|
|
579
591
|
*/
|
|
580
592
|
async markNotificationAsRead(form, options) {
|
|
581
|
-
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);
|
|
582
594
|
}
|
|
583
595
|
/**
|
|
584
596
|
* @summary Save your user settings.
|
|
@@ -596,19 +608,19 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
|
|
|
596
608
|
* @summary Get counts for your reports.
|
|
597
609
|
*/
|
|
598
610
|
async getReportCount(form, options) {
|
|
599
|
-
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);
|
|
600
612
|
}
|
|
601
613
|
/**
|
|
602
614
|
* @summary Get your unread counts.
|
|
603
615
|
*/
|
|
604
616
|
async getUnreadCount(options) {
|
|
605
|
-
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);
|
|
606
618
|
}
|
|
607
619
|
/**
|
|
608
620
|
* @summary Get your inbox (replies, comment mentions, post mentions, and messages)
|
|
609
621
|
*/
|
|
610
622
|
async listNotifications(form, options) {
|
|
611
|
-
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);
|
|
612
624
|
}
|
|
613
625
|
/**
|
|
614
626
|
* @summary Verify your email
|
|
@@ -740,7 +752,7 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
|
|
|
740
752
|
* @summary Delete a tagline
|
|
741
753
|
*/
|
|
742
754
|
async deleteTagline(form, options) {
|
|
743
|
-
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);
|
|
744
756
|
}
|
|
745
757
|
/**
|
|
746
758
|
* @summary List taglines.
|
|
@@ -754,6 +766,12 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
|
|
|
754
766
|
createCommunityTag(form, options) {
|
|
755
767
|
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/community/tag", form, options);
|
|
756
768
|
}
|
|
769
|
+
/**
|
|
770
|
+
* @summary Edit a community post tag.
|
|
771
|
+
*/
|
|
772
|
+
updateCommunityTag(form, options) {
|
|
773
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/community/tag", form, options);
|
|
774
|
+
}
|
|
757
775
|
/**
|
|
758
776
|
* @summary Delete a post tag in a community.
|
|
759
777
|
*/
|
|
@@ -776,7 +794,7 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
|
|
|
776
794
|
* @summary Delete an oauth provider method
|
|
777
795
|
*/
|
|
778
796
|
async deleteOAuthProvider(form, options) {
|
|
779
|
-
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);
|
|
780
798
|
}
|
|
781
799
|
/**
|
|
782
800
|
* @summary Authenticate with OAuth
|
|
@@ -787,8 +805,8 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
|
|
|
787
805
|
/**
|
|
788
806
|
* @summary Fetch federated instances.
|
|
789
807
|
*/
|
|
790
|
-
async getFederatedInstances(options) {
|
|
791
|
-
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);
|
|
792
810
|
}
|
|
793
811
|
/**
|
|
794
812
|
* @summary List user reports.
|
|
@@ -797,10 +815,16 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
|
|
|
797
815
|
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/report/list", form, options);
|
|
798
816
|
}
|
|
799
817
|
/**
|
|
800
|
-
* @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.
|
|
801
825
|
*/
|
|
802
|
-
async
|
|
803
|
-
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);
|
|
804
828
|
}
|
|
805
829
|
/**
|
|
806
830
|
* @summary Globally block an instance as admin.
|
|
@@ -902,7 +926,7 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
|
|
|
902
926
|
* Mark donation dialog as shown, so it isn't displayed anymore.
|
|
903
927
|
*/
|
|
904
928
|
donationDialogShown(options) {
|
|
905
|
-
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);
|
|
906
930
|
}
|
|
907
931
|
createMultiCommunity(form, options) {
|
|
908
932
|
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/multi_community", form, options);
|
|
@@ -925,6 +949,18 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
|
|
|
925
949
|
followMultiCommunity(form, options) {
|
|
926
950
|
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/multi_community/follow", form, options);
|
|
927
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
|
+
}
|
|
928
964
|
/**
|
|
929
965
|
* Set the headers (can be used to set the auth header)
|
|
930
966
|
*/
|
|
@@ -979,10 +1015,11 @@ _LemmyHttp_wrapper = async function _LemmyHttp_wrapper(type_, endpoint, form, op
|
|
|
979
1015
|
json = await response.json();
|
|
980
1016
|
}
|
|
981
1017
|
catch {
|
|
982
|
-
throw new LemmyError(response.statusText);
|
|
1018
|
+
throw new LemmyError(response.statusText, response.status);
|
|
983
1019
|
}
|
|
984
1020
|
if (!response.ok) {
|
|
985
|
-
|
|
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);
|
|
986
1023
|
throw err;
|
|
987
1024
|
}
|
|
988
1025
|
else {
|
|
@@ -1043,7 +1080,7 @@ __decorate([
|
|
|
1043
1080
|
], LemmyHttp.prototype, "importSettings", null);
|
|
1044
1081
|
__decorate([
|
|
1045
1082
|
(0, runtime_1.Security)("bearerAuth"),
|
|
1046
|
-
(0, runtime_1.Get)("/account/
|
|
1083
|
+
(0, runtime_1.Get)("/account/login/list"),
|
|
1047
1084
|
(0, runtime_1.Tags)("Account"),
|
|
1048
1085
|
__param(0, (0, runtime_1.Inject)())
|
|
1049
1086
|
], LemmyHttp.prototype, "listLogins", null);
|
|
@@ -1154,8 +1191,7 @@ __decorate([
|
|
|
1154
1191
|
(0, runtime_1.Security)("bearerAuth"),
|
|
1155
1192
|
(0, runtime_1.Get)("/community/pending_follows/count"),
|
|
1156
1193
|
(0, runtime_1.Tags)("Community"),
|
|
1157
|
-
__param(0, (0, runtime_1.
|
|
1158
|
-
__param(1, (0, runtime_1.Inject)())
|
|
1194
|
+
__param(0, (0, runtime_1.Inject)())
|
|
1159
1195
|
], LemmyHttp.prototype, "getCommunityPendingFollowsCount", null);
|
|
1160
1196
|
__decorate([
|
|
1161
1197
|
(0, runtime_1.Security)("bearerAuth"),
|
|
@@ -1180,7 +1216,7 @@ __decorate([
|
|
|
1180
1216
|
], LemmyHttp.prototype, "blockCommunity", null);
|
|
1181
1217
|
__decorate([
|
|
1182
1218
|
(0, runtime_1.Security)("bearerAuth"),
|
|
1183
|
-
(0, runtime_1.
|
|
1219
|
+
(0, runtime_1.Delete)("/community"),
|
|
1184
1220
|
(0, runtime_1.Tags)("Community"),
|
|
1185
1221
|
__param(0, (0, runtime_1.Body)()),
|
|
1186
1222
|
__param(1, (0, runtime_1.Inject)())
|
|
@@ -1266,7 +1302,14 @@ __decorate([
|
|
|
1266
1302
|
], LemmyHttp.prototype, "editPost", null);
|
|
1267
1303
|
__decorate([
|
|
1268
1304
|
(0, runtime_1.Security)("bearerAuth"),
|
|
1269
|
-
(0, runtime_1.
|
|
1305
|
+
(0, runtime_1.Put)("/post/mod_update"),
|
|
1306
|
+
(0, runtime_1.Tags)("Post"),
|
|
1307
|
+
__param(0, (0, runtime_1.Body)()),
|
|
1308
|
+
__param(1, (0, runtime_1.Inject)())
|
|
1309
|
+
], LemmyHttp.prototype, "modEditPost", null);
|
|
1310
|
+
__decorate([
|
|
1311
|
+
(0, runtime_1.Security)("bearerAuth"),
|
|
1312
|
+
(0, runtime_1.Delete)("/post"),
|
|
1270
1313
|
(0, runtime_1.Tags)("Post"),
|
|
1271
1314
|
__param(0, (0, runtime_1.Body)()),
|
|
1272
1315
|
__param(1, (0, runtime_1.Inject)())
|
|
@@ -1379,7 +1422,7 @@ __decorate([
|
|
|
1379
1422
|
], LemmyHttp.prototype, "editComment", null);
|
|
1380
1423
|
__decorate([
|
|
1381
1424
|
(0, runtime_1.Security)("bearerAuth"),
|
|
1382
|
-
(0, runtime_1.
|
|
1425
|
+
(0, runtime_1.Delete)("/comment"),
|
|
1383
1426
|
(0, runtime_1.Tags)("Comment"),
|
|
1384
1427
|
__param(0, (0, runtime_1.Body)()),
|
|
1385
1428
|
__param(1, (0, runtime_1.Inject)())
|
|
@@ -1391,6 +1434,13 @@ __decorate([
|
|
|
1391
1434
|
__param(0, (0, runtime_1.Body)()),
|
|
1392
1435
|
__param(1, (0, runtime_1.Inject)())
|
|
1393
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);
|
|
1394
1444
|
__decorate([
|
|
1395
1445
|
(0, runtime_1.Security)("bearerAuth"),
|
|
1396
1446
|
(0, runtime_1.Post)("/comment/like"),
|
|
@@ -1473,18 +1523,11 @@ __decorate([
|
|
|
1473
1523
|
], LemmyHttp.prototype, "editPrivateMessage", null);
|
|
1474
1524
|
__decorate([
|
|
1475
1525
|
(0, runtime_1.Security)("bearerAuth"),
|
|
1476
|
-
(0, runtime_1.
|
|
1526
|
+
(0, runtime_1.Delete)("/private_message"),
|
|
1477
1527
|
(0, runtime_1.Tags)("PrivateMessage"),
|
|
1478
1528
|
__param(0, (0, runtime_1.Body)()),
|
|
1479
1529
|
__param(1, (0, runtime_1.Inject)())
|
|
1480
1530
|
], LemmyHttp.prototype, "deletePrivateMessage", null);
|
|
1481
|
-
__decorate([
|
|
1482
|
-
(0, runtime_1.Security)("bearerAuth"),
|
|
1483
|
-
(0, runtime_1.Post)("/private_message/mark_as_read"),
|
|
1484
|
-
(0, runtime_1.Tags)("PrivateMessage"),
|
|
1485
|
-
__param(0, (0, runtime_1.Body)()),
|
|
1486
|
-
__param(1, (0, runtime_1.Inject)())
|
|
1487
|
-
], LemmyHttp.prototype, "markPrivateMessageAsRead", null);
|
|
1488
1531
|
__decorate([
|
|
1489
1532
|
(0, runtime_1.Security)("bearerAuth"),
|
|
1490
1533
|
(0, runtime_1.Post)("/private_message/report"),
|
|
@@ -1533,6 +1576,13 @@ __decorate([
|
|
|
1533
1576
|
__param(0, (0, runtime_1.Queries)()),
|
|
1534
1577
|
__param(1, (0, runtime_1.Inject)())
|
|
1535
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);
|
|
1536
1586
|
__decorate([
|
|
1537
1587
|
(0, runtime_1.Security)("bearerAuth"),
|
|
1538
1588
|
(0, runtime_1.Post)("/admin/ban"),
|
|
@@ -1561,7 +1611,7 @@ __decorate([
|
|
|
1561
1611
|
], LemmyHttp.prototype, "getCaptcha", null);
|
|
1562
1612
|
__decorate([
|
|
1563
1613
|
(0, runtime_1.Security)("bearerAuth"),
|
|
1564
|
-
(0, runtime_1.
|
|
1614
|
+
(0, runtime_1.Delete)("/account"),
|
|
1565
1615
|
(0, runtime_1.Tags)("Account"),
|
|
1566
1616
|
__param(0, (0, runtime_1.Body)()),
|
|
1567
1617
|
__param(1, (0, runtime_1.Inject)())
|
|
@@ -1582,13 +1632,13 @@ __decorate([
|
|
|
1582
1632
|
], LemmyHttp.prototype, "passwordChangeAfterReset", null);
|
|
1583
1633
|
__decorate([
|
|
1584
1634
|
(0, runtime_1.Security)("bearerAuth"),
|
|
1585
|
-
(0, runtime_1.Post)("/account/mark_as_read/all"),
|
|
1635
|
+
(0, runtime_1.Post)("/account/notification/mark_as_read/all"),
|
|
1586
1636
|
(0, runtime_1.Tags)("Account"),
|
|
1587
1637
|
__param(0, (0, runtime_1.Inject)())
|
|
1588
1638
|
], LemmyHttp.prototype, "markAllNotificationsAsRead", null);
|
|
1589
1639
|
__decorate([
|
|
1590
1640
|
(0, runtime_1.Security)("bearerAuth"),
|
|
1591
|
-
(0, runtime_1.Post)("/account/mark_as_read"),
|
|
1641
|
+
(0, runtime_1.Post)("/account/notification/mark_as_read"),
|
|
1592
1642
|
(0, runtime_1.Tags)("Account"),
|
|
1593
1643
|
__param(0, (0, runtime_1.Body)()),
|
|
1594
1644
|
__param(1, (0, runtime_1.Inject)())
|
|
@@ -1609,20 +1659,20 @@ __decorate([
|
|
|
1609
1659
|
], LemmyHttp.prototype, "changePassword", null);
|
|
1610
1660
|
__decorate([
|
|
1611
1661
|
(0, runtime_1.Security)("bearerAuth"),
|
|
1612
|
-
(0, runtime_1.Get)("/
|
|
1662
|
+
(0, runtime_1.Get)("/report/count"),
|
|
1613
1663
|
(0, runtime_1.Tags)("Account"),
|
|
1614
1664
|
__param(0, (0, runtime_1.Queries)()),
|
|
1615
1665
|
__param(1, (0, runtime_1.Inject)())
|
|
1616
1666
|
], LemmyHttp.prototype, "getReportCount", null);
|
|
1617
1667
|
__decorate([
|
|
1618
1668
|
(0, runtime_1.Security)("bearerAuth"),
|
|
1619
|
-
(0, runtime_1.Get)("/account/
|
|
1669
|
+
(0, runtime_1.Get)("/account/notification/count"),
|
|
1620
1670
|
(0, runtime_1.Tags)("Account"),
|
|
1621
1671
|
__param(0, (0, runtime_1.Inject)())
|
|
1622
1672
|
], LemmyHttp.prototype, "getUnreadCount", null);
|
|
1623
1673
|
__decorate([
|
|
1624
1674
|
(0, runtime_1.Security)("bearerAuth"),
|
|
1625
|
-
(0, runtime_1.Get)("/account/
|
|
1675
|
+
(0, runtime_1.Get)("/account/notification/list"),
|
|
1626
1676
|
(0, runtime_1.Tags)("Account"),
|
|
1627
1677
|
__param(0, (0, runtime_1.Queries)()),
|
|
1628
1678
|
__param(1, (0, runtime_1.Inject)())
|
|
@@ -1774,7 +1824,7 @@ __decorate([
|
|
|
1774
1824
|
], LemmyHttp.prototype, "editTagline", null);
|
|
1775
1825
|
__decorate([
|
|
1776
1826
|
(0, runtime_1.Security)("bearerAuth"),
|
|
1777
|
-
(0, runtime_1.
|
|
1827
|
+
(0, runtime_1.Delete)("/admin/tagline"),
|
|
1778
1828
|
(0, runtime_1.Tags)("Admin", "Tagline"),
|
|
1779
1829
|
__param(0, (0, runtime_1.Body)()),
|
|
1780
1830
|
__param(1, (0, runtime_1.Inject)())
|
|
@@ -1794,6 +1844,13 @@ __decorate([
|
|
|
1794
1844
|
__param(0, (0, runtime_1.Body)()),
|
|
1795
1845
|
__param(1, (0, runtime_1.Inject)())
|
|
1796
1846
|
], LemmyHttp.prototype, "createCommunityTag", null);
|
|
1847
|
+
__decorate([
|
|
1848
|
+
(0, runtime_1.Security)("bearerAuth"),
|
|
1849
|
+
(0, runtime_1.Put)("/community/tag"),
|
|
1850
|
+
(0, runtime_1.Tags)("Community"),
|
|
1851
|
+
__param(0, (0, runtime_1.Body)()),
|
|
1852
|
+
__param(1, (0, runtime_1.Inject)())
|
|
1853
|
+
], LemmyHttp.prototype, "updateCommunityTag", null);
|
|
1797
1854
|
__decorate([
|
|
1798
1855
|
(0, runtime_1.Security)("bearerAuth"),
|
|
1799
1856
|
(0, runtime_1.Delete)("/community/tag"),
|
|
@@ -1817,7 +1874,7 @@ __decorate([
|
|
|
1817
1874
|
], LemmyHttp.prototype, "editOAuthProvider", null);
|
|
1818
1875
|
__decorate([
|
|
1819
1876
|
(0, runtime_1.Security)("bearerAuth"),
|
|
1820
|
-
(0, runtime_1.
|
|
1877
|
+
(0, runtime_1.Delete)("/oauth_provider"),
|
|
1821
1878
|
(0, runtime_1.Tags)("Miscellaneous", "OAuth"),
|
|
1822
1879
|
__param(0, (0, runtime_1.Body)()),
|
|
1823
1880
|
__param(1, (0, runtime_1.Inject)())
|
|
@@ -1832,7 +1889,8 @@ __decorate([
|
|
|
1832
1889
|
__decorate([
|
|
1833
1890
|
(0, runtime_1.Get)("/federated_instances"),
|
|
1834
1891
|
(0, runtime_1.Tags)("Miscellaneous"),
|
|
1835
|
-
__param(0, (0, runtime_1.
|
|
1892
|
+
__param(0, (0, runtime_1.Queries)()),
|
|
1893
|
+
__param(1, (0, runtime_1.Inject)())
|
|
1836
1894
|
], LemmyHttp.prototype, "getFederatedInstances", null);
|
|
1837
1895
|
__decorate([
|
|
1838
1896
|
(0, runtime_1.Security)("bearerAuth"),
|
|
@@ -1843,11 +1901,18 @@ __decorate([
|
|
|
1843
1901
|
], LemmyHttp.prototype, "listReports", null);
|
|
1844
1902
|
__decorate([
|
|
1845
1903
|
(0, runtime_1.Security)("bearerAuth"),
|
|
1846
|
-
(0, runtime_1.Post)("/account/block/instance"),
|
|
1847
|
-
(0, runtime_1.Tags)("Account"),
|
|
1904
|
+
(0, runtime_1.Post)("/account/block/instance/communities"),
|
|
1905
|
+
(0, runtime_1.Tags)("Account", "Community"),
|
|
1848
1906
|
__param(0, (0, runtime_1.Body)()),
|
|
1849
1907
|
__param(1, (0, runtime_1.Inject)())
|
|
1850
|
-
], LemmyHttp.prototype, "
|
|
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"),
|
|
1913
|
+
__param(0, (0, runtime_1.Body)()),
|
|
1914
|
+
__param(1, (0, runtime_1.Inject)())
|
|
1915
|
+
], LemmyHttp.prototype, "userBlockInstancePersons", null);
|
|
1851
1916
|
__decorate([
|
|
1852
1917
|
(0, runtime_1.Security)("bearerAuth"),
|
|
1853
1918
|
(0, runtime_1.Post)("/admin/instance/block"),
|
|
@@ -1958,8 +2023,8 @@ __decorate([
|
|
|
1958
2023
|
], LemmyHttp.prototype, "imageHealth", null);
|
|
1959
2024
|
__decorate([
|
|
1960
2025
|
(0, runtime_1.Security)("bearerAuth"),
|
|
1961
|
-
(0, runtime_1.Post)("/
|
|
1962
|
-
(0, runtime_1.Tags)("
|
|
2026
|
+
(0, runtime_1.Post)("/account/donation_dialog_shown"),
|
|
2027
|
+
(0, runtime_1.Tags)("Account"),
|
|
1963
2028
|
__param(0, (0, runtime_1.Inject)())
|
|
1964
2029
|
], LemmyHttp.prototype, "donationDialogShown", null);
|
|
1965
2030
|
__decorate([
|
|
@@ -2008,6 +2073,20 @@ __decorate([
|
|
|
2008
2073
|
__param(0, (0, runtime_1.Body)()),
|
|
2009
2074
|
__param(1, (0, runtime_1.Inject)())
|
|
2010
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);
|
|
2011
2090
|
exports.LemmyHttp = LemmyHttp = __decorate([
|
|
2012
2091
|
(0, runtime_1.Route)("api/v4")
|
|
2013
2092
|
], LemmyHttp);
|
|
@@ -2035,9 +2114,10 @@ function createFormData(image) {
|
|
|
2035
2114
|
* The msg is either an empty string, or extra non-translatable info.
|
|
2036
2115
|
*/
|
|
2037
2116
|
class LemmyError extends Error {
|
|
2038
|
-
constructor(name, msg) {
|
|
2117
|
+
constructor(name, status, msg) {
|
|
2039
2118
|
super(msg ?? "");
|
|
2040
2119
|
this.name = name;
|
|
2120
|
+
this.status = status;
|
|
2041
2121
|
// Set the prototype explicitly.
|
|
2042
2122
|
Object.setPrototypeOf(this, LemmyError.prototype);
|
|
2043
2123
|
}
|