lemmy-js-client 1.0.0-search-query-mandatory.1 → 1.0.0-search-resolve-field.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 +66 -41
- package/dist/http.js +196 -87
- package/dist/index.d.ts +50 -78
- package/dist/index.js +3 -0
- package/dist/other_types.d.ts +11 -5
- package/dist/types/AdminAllowInstanceParams.d.ts +1 -1
- package/dist/types/AdminBlockInstanceParams.d.ts +7 -2
- 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 +5 -1
- package/dist/types/CommentResponse.d.ts +0 -2
- package/dist/types/CommentSlimView.d.ts +2 -6
- package/dist/types/CommentSortType.d.ts +1 -1
- package/dist/types/CommentView.d.ts +4 -5
- package/dist/types/CommunityActions.d.ts +6 -4
- package/dist/types/CommunityFollowerState.d.ts +1 -1
- package/dist/types/CommunityNotificationsMode.d.ts +4 -0
- package/dist/types/CommunityReportView.d.ts +6 -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 +3 -1
- package/dist/types/CreateCustomEmoji.d.ts +2 -1
- package/dist/types/CreateCustomEmoji.js +0 -1
- package/dist/types/CreateMultiCommunity.d.ts +5 -0
- package/dist/types/CreateOrDeleteMultiCommunityEntry.d.ts +6 -0
- package/dist/types/CreatePostLike.d.ts +2 -2
- package/dist/types/CreateSite.d.ts +16 -13
- package/dist/types/EditCustomEmoji.d.ts +7 -5
- package/dist/types/EditSite.d.ts +26 -16
- package/dist/types/ExportDataResponse.d.ts +13 -0
- 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/FollowMultiCommunity.d.ts +5 -0
- package/dist/types/GetFederatedInstances.d.ts +9 -0
- package/dist/types/GetFederatedInstancesKind.d.ts +1 -0
- package/dist/types/GetFederatedInstancesResponse.d.ts +5 -5
- package/dist/types/GetModlog.d.ts +2 -2
- package/dist/types/GetModlogResponse.d.ts +2 -2
- package/dist/types/GetMultiCommunity.d.ts +5 -0
- package/dist/types/GetMultiCommunityResponse.d.ts +6 -0
- package/dist/types/GetPersonDetailsResponse.d.ts +2 -0
- package/dist/types/GetPosts.d.ts +3 -0
- 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 +28 -146
- package/dist/types/LikeType.d.ts +1 -1
- package/dist/types/LinkMetadata.d.ts +4 -0
- package/dist/types/ListCommunityPendingFollows.d.ts +1 -1
- package/dist/types/ListCommunityPendingFollowsResponse.d.ts +2 -2
- package/dist/types/ListMultiCommunities.d.ts +17 -0
- package/dist/types/ListMultiCommunitiesResponse.d.ts +10 -0
- package/dist/types/{ListInbox.d.ts → ListNotifications.d.ts} +3 -3
- package/dist/types/{ListInboxResponse.d.ts → ListNotificationsResponse.d.ts} +3 -3
- package/dist/types/ListingType.d.ts +1 -1
- package/dist/types/LocalImage.d.ts +1 -1
- package/dist/types/LocalSite.d.ts +3 -4
- package/dist/types/LocalSiteRateLimit.d.ts +14 -14
- package/dist/types/LocalUser.d.ts +11 -13
- package/dist/types/LocalUserView.d.ts +2 -2
- 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/MarkNotificationAsRead.d.ts +8 -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 +20 -0
- package/dist/types/MultiCommunityEntry.d.ts +6 -0
- package/dist/types/MultiCommunityFollow.d.ts +8 -0
- package/dist/types/MultiCommunityId.d.ts +1 -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 +8 -0
- package/dist/types/MyUserInfo.d.ts +4 -1
- package/dist/types/NotePerson.d.ts +10 -0
- package/dist/types/Notification.d.ts +18 -0
- package/dist/types/NotificationData.d.ts +13 -0
- package/dist/types/NotificationDataType.d.ts +4 -0
- package/dist/types/NotificationId.d.ts +1 -0
- package/dist/types/NotificationType.d.ts +4 -0
- package/dist/types/NotificationView.d.ts +6 -0
- package/dist/types/OpenGraphData.d.ts +4 -0
- package/dist/types/PendingFollowerView.d.ts +9 -0
- package/dist/types/PersonActions.d.ts +20 -0
- package/dist/types/PersonContentCombinedView.d.ts +2 -2
- package/dist/types/PersonContentType.d.ts +1 -1
- package/dist/types/PersonLikedCombinedView.d.ts +2 -2
- package/dist/types/PersonResponse.d.ts +7 -0
- package/dist/types/PersonSavedCombinedView.d.ts +2 -2
- package/dist/types/PersonView.d.ts +4 -4
- package/dist/types/Post.d.ts +6 -4
- package/dist/types/PostActions.d.ts +13 -11
- package/dist/types/PostActions.js +0 -1
- package/dist/types/PostFeatureType.d.ts +1 -1
- package/dist/types/PostListingMode.d.ts +1 -1
- package/dist/types/PostNotificationsMode.d.ts +4 -0
- package/dist/types/PostOrCommentOrPrivateMessage.d.ts +10 -0
- package/dist/types/PostReportView.d.ts +5 -1
- package/dist/types/PostSortType.d.ts +1 -1
- package/dist/types/PostView.d.ts +4 -5
- package/dist/types/PrivateMessage.d.ts +0 -1
- package/dist/types/PrivateMessageReportView.d.ts +3 -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 +9 -5
- package/dist/types/Search.d.ts +5 -1
- package/dist/types/SearchCombinedView.d.ts +8 -5
- package/dist/types/SearchResponse.d.ts +10 -1
- package/dist/types/SearchSortType.d.ts +1 -1
- package/dist/types/SearchType.d.ts +1 -1
- package/dist/types/Tag.d.ts +6 -14
- package/dist/types/TagsView.d.ts +1 -1
- package/dist/types/UntranslatedError.d.ts +14 -0
- package/dist/types/UpdateCommunityNotifications.d.ts +9 -0
- package/dist/types/UpdateCommunityTag.d.ts +3 -2
- package/dist/types/UpdateMultiCommunity.d.ts +7 -0
- package/dist/types/UpdatePostNotifications.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 +29 -0
- package/dist/types/VoteShow.d.ts +1 -1
- package/dist/types/VoteView.d.ts +5 -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/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/CommentReply.d.ts +0 -13
- package/dist/types/CommentReplyId.d.ts +0 -4
- package/dist/types/CommentReplyView.d.ts +0 -32
- package/dist/types/FederatedInstances.d.ts +0 -9
- package/dist/types/FederationError.d.ts +0 -10
- package/dist/types/GetCommunityPendingFollowsCount.d.ts +0 -4
- package/dist/types/InboxCombinedView.d.ts +0 -13
- package/dist/types/InboxDataType.d.ts +0 -4
- package/dist/types/MarkCommentReplyAsRead.d.ts +0 -8
- package/dist/types/MarkPersonCommentMentionAsRead.d.ts +0 -8
- package/dist/types/MarkPersonPostMentionAsRead.d.ts +0 -8
- package/dist/types/MarkPrivateMessageAsRead.d.ts +0 -8
- package/dist/types/ModAdd.d.ts +0 -12
- package/dist/types/ModAddCommunity.d.ts +0 -14
- package/dist/types/ModAddCommunityId.d.ts +0 -1
- package/dist/types/ModAddCommunityView.d.ts +0 -12
- package/dist/types/ModAddId.d.ts +0 -1
- package/dist/types/ModAddView.d.ts +0 -10
- package/dist/types/ModBan.d.ts +0 -16
- package/dist/types/ModBanFromCommunity.d.ts +0 -16
- package/dist/types/ModBanFromCommunityId.d.ts +0 -1
- package/dist/types/ModBanFromCommunityView.d.ts +0 -12
- package/dist/types/ModBanId.d.ts +0 -1
- package/dist/types/ModBanView.d.ts +0 -10
- 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/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/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/PersonCommentMentionView.d.ts +0 -30
- package/dist/types/PersonCommentMentionView.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/PersonPostMentionView.d.ts +0 -32
- package/dist/types/PersonPostMentionView.js +0 -2
- package/dist/types/UserBlockInstanceParams.js +0 -2
- /package/dist/types/{AdminAllowInstanceId.js → CommunityNotificationsMode.js} +0 -0
- /package/dist/types/{AdminBlockInstanceId.js → CreateMultiCommunity.js} +0 -0
- /package/dist/types/{AdminAllowInstance.js → CreateOrDeleteMultiCommunityEntry.js} +0 -0
- /package/dist/types/{AdminAllowInstanceView.js → ExportDataResponse.js} +0 -0
- /package/dist/types/{AdminBlockInstance.js → FederatedInstanceView.js} +0 -0
- /package/dist/types/{AdminPurgeCommentId.js → FederationAllowList.js} +0 -0
- /package/dist/types/{AdminBlockInstanceView.js → FederationQueueState.js} +0 -0
- /package/dist/types/{AdminPurgeComment.js → FollowMultiCommunity.js} +0 -0
- /package/dist/types/{AdminPurgeCommentView.js → GetFederatedInstances.js} +0 -0
- /package/dist/types/{AdminPurgeCommunityId.js → GetFederatedInstancesKind.js} +0 -0
- /package/dist/types/{AdminPurgeCommunity.js → GetMultiCommunity.js} +0 -0
- /package/dist/types/{AdminPurgeCommunityView.js → GetMultiCommunityResponse.js} +0 -0
- /package/dist/types/{AdminPurgePerson.js → ListMultiCommunities.js} +0 -0
- /package/dist/types/{AdminPurgePersonView.js → ListMultiCommunitiesResponse.js} +0 -0
- /package/dist/types/{AdminPurgePost.js → ListNotifications.js} +0 -0
- /package/dist/types/{AdminPurgePostView.js → ListNotificationsResponse.js} +0 -0
- /package/dist/types/{BanFromCommunityResponse.js → LockComment.js} +0 -0
- /package/dist/types/{BanPersonResponse.js → MarkNotificationAsRead.js} +0 -0
- /package/dist/types/{BlockCommunityResponse.js → ModEditPost.js} +0 -0
- /package/dist/types/{BlockPersonResponse.js → Modlog.js} +0 -0
- /package/dist/types/{AdminPurgePersonId.js → ModlogId.js} +0 -0
- /package/dist/types/{AdminPurgePostId.js → ModlogKind.js} +0 -0
- /package/dist/types/{CommentReply.js → ModlogView.js} +0 -0
- /package/dist/types/{CommentReplyView.js → MultiCommunity.js} +0 -0
- /package/dist/types/{FederatedInstances.js → MultiCommunityEntry.js} +0 -0
- /package/dist/types/{GetCommunityPendingFollowsCount.js → MultiCommunityFollow.js} +0 -0
- /package/dist/types/{CommentReplyId.js → MultiCommunityId.js} +0 -0
- /package/dist/types/{FederationError.js → MultiCommunityListingType.js} +0 -0
- /package/dist/types/{InboxCombinedView.js → MultiCommunityResponse.js} +0 -0
- /package/dist/types/{InboxDataType.js → MultiCommunitySortType.js} +0 -0
- /package/dist/types/{ListInbox.js → MultiCommunityView.js} +0 -0
- /package/dist/types/{ListInboxResponse.js → NotePerson.js} +0 -0
- /package/dist/types/{MarkCommentReplyAsRead.js → Notification.js} +0 -0
- /package/dist/types/{MarkPersonCommentMentionAsRead.js → NotificationData.js} +0 -0
- /package/dist/types/{ModAddCommunityId.js → NotificationDataType.js} +0 -0
- /package/dist/types/{ModAddId.js → NotificationId.js} +0 -0
- /package/dist/types/{ModBanFromCommunityId.js → NotificationType.js} +0 -0
- /package/dist/types/{MarkPersonPostMentionAsRead.js → NotificationView.js} +0 -0
- /package/dist/types/{MarkPrivateMessageAsRead.js → PendingFollowerView.js} +0 -0
- /package/dist/types/{ModAdd.js → PersonResponse.js} +0 -0
- /package/dist/types/{ModBanId.js → PostNotificationsMode.js} +0 -0
- /package/dist/types/{ModAddCommunity.js → PostOrCommentOrPrivateMessage.js} +0 -0
- /package/dist/types/{ModChangeCommunityVisibilityId.js → UntranslatedError.js} +0 -0
- /package/dist/types/{ModAddCommunityView.js → UpdateCommunityNotifications.js} +0 -0
- /package/dist/types/{ModAddView.js → UpdateMultiCommunity.js} +0 -0
- /package/dist/types/{ModBan.js → UpdatePostNotifications.js} +0 -0
- /package/dist/types/{ModBanFromCommunity.js → UserBlockInstanceCommunitiesParams.js} +0 -0
- /package/dist/types/{ModBanFromCommunityView.js → UserBlockInstancePersonsParams.js} +0 -0
- /package/dist/types/{ModBanView.js → UserSettingsBackup.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,13 +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).
|
|
411
417
|
*/
|
|
412
|
-
async
|
|
413
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/comment/
|
|
418
|
+
async lockComment(form, options) {
|
|
419
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/comment/lock", form, options);
|
|
414
420
|
}
|
|
415
421
|
/**
|
|
416
|
-
* @
|
|
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.
|
|
@@ -533,16 +533,10 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
|
|
|
533
533
|
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/person/content", form, options);
|
|
534
534
|
}
|
|
535
535
|
/**
|
|
536
|
-
* @summary
|
|
536
|
+
* @summary Make a note for a person.
|
|
537
537
|
*/
|
|
538
|
-
async
|
|
539
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/
|
|
540
|
-
}
|
|
541
|
-
/**
|
|
542
|
-
* @summary Mark a person post body mention as read.
|
|
543
|
-
*/
|
|
544
|
-
async markPostMentionAsRead(form, options) {
|
|
545
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/mention/post/mark_as_read", form, options);
|
|
538
|
+
async notePerson(form, options) {
|
|
539
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/person/note", form, options);
|
|
546
540
|
}
|
|
547
541
|
/**
|
|
548
542
|
* @summary Ban a person from your site.
|
|
@@ -572,7 +566,7 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
|
|
|
572
566
|
* @summary Delete your account.
|
|
573
567
|
*/
|
|
574
568
|
async deleteAccount(form, options) {
|
|
575
|
-
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);
|
|
576
570
|
}
|
|
577
571
|
/**
|
|
578
572
|
* @summary Reset your password.
|
|
@@ -587,10 +581,16 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
|
|
|
587
581
|
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/auth/password_change", form, options);
|
|
588
582
|
}
|
|
589
583
|
/**
|
|
590
|
-
* @summary Mark all
|
|
584
|
+
* @summary Mark all notifications as read.
|
|
591
585
|
*/
|
|
592
586
|
async markAllNotificationsAsRead(options) {
|
|
593
|
-
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);
|
|
588
|
+
}
|
|
589
|
+
/**
|
|
590
|
+
* @summary Mark a notification as read.
|
|
591
|
+
*/
|
|
592
|
+
async markNotificationAsRead(form, options) {
|
|
593
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/notification/mark_as_read", form, options);
|
|
594
594
|
}
|
|
595
595
|
/**
|
|
596
596
|
* @summary Save your user settings.
|
|
@@ -614,13 +614,13 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
|
|
|
614
614
|
* @summary Get your unread counts.
|
|
615
615
|
*/
|
|
616
616
|
async getUnreadCount(options) {
|
|
617
|
-
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);
|
|
618
618
|
}
|
|
619
619
|
/**
|
|
620
620
|
* @summary Get your inbox (replies, comment mentions, post mentions, and messages)
|
|
621
621
|
*/
|
|
622
|
-
async
|
|
623
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/
|
|
622
|
+
async listNotifications(form, options) {
|
|
623
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/notification/list", form, options);
|
|
624
624
|
}
|
|
625
625
|
/**
|
|
626
626
|
* @summary Verify your email
|
|
@@ -752,7 +752,7 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
|
|
|
752
752
|
* @summary Delete a tagline
|
|
753
753
|
*/
|
|
754
754
|
async deleteTagline(form, options) {
|
|
755
|
-
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);
|
|
756
756
|
}
|
|
757
757
|
/**
|
|
758
758
|
* @summary List taglines.
|
|
@@ -767,10 +767,10 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
|
|
|
767
767
|
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/community/tag", form, options);
|
|
768
768
|
}
|
|
769
769
|
/**
|
|
770
|
-
* @summary
|
|
770
|
+
* @summary Edit a community post tag.
|
|
771
771
|
*/
|
|
772
772
|
updateCommunityTag(form, options) {
|
|
773
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.
|
|
773
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/community/tag", form, options);
|
|
774
774
|
}
|
|
775
775
|
/**
|
|
776
776
|
* @summary Delete a post tag in a community.
|
|
@@ -794,7 +794,7 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
|
|
|
794
794
|
* @summary Delete an oauth provider method
|
|
795
795
|
*/
|
|
796
796
|
async deleteOAuthProvider(form, options) {
|
|
797
|
-
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);
|
|
798
798
|
}
|
|
799
799
|
/**
|
|
800
800
|
* @summary Authenticate with OAuth
|
|
@@ -805,8 +805,8 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
|
|
|
805
805
|
/**
|
|
806
806
|
* @summary Fetch federated instances.
|
|
807
807
|
*/
|
|
808
|
-
async getFederatedInstances(options) {
|
|
809
|
-
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);
|
|
810
810
|
}
|
|
811
811
|
/**
|
|
812
812
|
* @summary List user reports.
|
|
@@ -815,10 +815,16 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
|
|
|
815
815
|
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/report/list", form, options);
|
|
816
816
|
}
|
|
817
817
|
/**
|
|
818
|
-
* @summary Block an instance as user.
|
|
818
|
+
* @summary Block an instance's communities as a user.
|
|
819
819
|
*/
|
|
820
|
-
async
|
|
821
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/block/instance", form, options);
|
|
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.
|
|
825
|
+
*/
|
|
826
|
+
async userBlockInstancePersons(form, options) {
|
|
827
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/block/instance/persons", form, options);
|
|
822
828
|
}
|
|
823
829
|
/**
|
|
824
830
|
* @summary Globally block an instance as admin.
|
|
@@ -918,11 +924,42 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
|
|
|
918
924
|
}
|
|
919
925
|
/**
|
|
920
926
|
* Mark donation dialog as shown, so it isn't displayed anymore.
|
|
921
|
-
*
|
|
922
|
-
* `HTTP.POST /user/donation_dialog_shown`
|
|
923
927
|
*/
|
|
924
|
-
|
|
925
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/
|
|
928
|
+
donationDialogShown(options) {
|
|
929
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/donation_dialog_shown", {}, options);
|
|
930
|
+
}
|
|
931
|
+
createMultiCommunity(form, options) {
|
|
932
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/multi_community", form, options);
|
|
933
|
+
}
|
|
934
|
+
updateMultiCommunity(form, options) {
|
|
935
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/multi_community", form, options);
|
|
936
|
+
}
|
|
937
|
+
getMultiCommunity(form, options) {
|
|
938
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/multi_community", form, options);
|
|
939
|
+
}
|
|
940
|
+
createMultiCommunityEntry(form, options) {
|
|
941
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/multi_community/entry", form, options);
|
|
942
|
+
}
|
|
943
|
+
deleteMultiCommunityEntry(form, options) {
|
|
944
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/multi_community/entry", form, options);
|
|
945
|
+
}
|
|
946
|
+
listMultiCommunities(form, options) {
|
|
947
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/multi_community/list", form, options);
|
|
948
|
+
}
|
|
949
|
+
followMultiCommunity(form, options) {
|
|
950
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/multi_community/follow", form, options);
|
|
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);
|
|
926
963
|
}
|
|
927
964
|
/**
|
|
928
965
|
* Set the headers (can be used to set the auth header)
|
|
@@ -978,10 +1015,11 @@ _LemmyHttp_wrapper = async function _LemmyHttp_wrapper(type_, endpoint, form, op
|
|
|
978
1015
|
json = await response.json();
|
|
979
1016
|
}
|
|
980
1017
|
catch {
|
|
981
|
-
throw new LemmyError(response.statusText);
|
|
1018
|
+
throw new LemmyError(response.statusText, response.status);
|
|
982
1019
|
}
|
|
983
1020
|
if (!response.ok) {
|
|
984
|
-
|
|
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);
|
|
985
1023
|
throw err;
|
|
986
1024
|
}
|
|
987
1025
|
else {
|
|
@@ -1042,7 +1080,7 @@ __decorate([
|
|
|
1042
1080
|
], LemmyHttp.prototype, "importSettings", null);
|
|
1043
1081
|
__decorate([
|
|
1044
1082
|
(0, runtime_1.Security)("bearerAuth"),
|
|
1045
|
-
(0, runtime_1.Get)("/account/
|
|
1083
|
+
(0, runtime_1.Get)("/account/login/list"),
|
|
1046
1084
|
(0, runtime_1.Tags)("Account"),
|
|
1047
1085
|
__param(0, (0, runtime_1.Inject)())
|
|
1048
1086
|
], LemmyHttp.prototype, "listLogins", null);
|
|
@@ -1153,8 +1191,7 @@ __decorate([
|
|
|
1153
1191
|
(0, runtime_1.Security)("bearerAuth"),
|
|
1154
1192
|
(0, runtime_1.Get)("/community/pending_follows/count"),
|
|
1155
1193
|
(0, runtime_1.Tags)("Community"),
|
|
1156
|
-
__param(0, (0, runtime_1.
|
|
1157
|
-
__param(1, (0, runtime_1.Inject)())
|
|
1194
|
+
__param(0, (0, runtime_1.Inject)())
|
|
1158
1195
|
], LemmyHttp.prototype, "getCommunityPendingFollowsCount", null);
|
|
1159
1196
|
__decorate([
|
|
1160
1197
|
(0, runtime_1.Security)("bearerAuth"),
|
|
@@ -1179,7 +1216,7 @@ __decorate([
|
|
|
1179
1216
|
], LemmyHttp.prototype, "blockCommunity", null);
|
|
1180
1217
|
__decorate([
|
|
1181
1218
|
(0, runtime_1.Security)("bearerAuth"),
|
|
1182
|
-
(0, runtime_1.
|
|
1219
|
+
(0, runtime_1.Delete)("/community"),
|
|
1183
1220
|
(0, runtime_1.Tags)("Community"),
|
|
1184
1221
|
__param(0, (0, runtime_1.Body)()),
|
|
1185
1222
|
__param(1, (0, runtime_1.Inject)())
|
|
@@ -1265,7 +1302,14 @@ __decorate([
|
|
|
1265
1302
|
], LemmyHttp.prototype, "editPost", null);
|
|
1266
1303
|
__decorate([
|
|
1267
1304
|
(0, runtime_1.Security)("bearerAuth"),
|
|
1268
|
-
(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"),
|
|
1269
1313
|
(0, runtime_1.Tags)("Post"),
|
|
1270
1314
|
__param(0, (0, runtime_1.Body)()),
|
|
1271
1315
|
__param(1, (0, runtime_1.Inject)())
|
|
@@ -1378,7 +1422,7 @@ __decorate([
|
|
|
1378
1422
|
], LemmyHttp.prototype, "editComment", null);
|
|
1379
1423
|
__decorate([
|
|
1380
1424
|
(0, runtime_1.Security)("bearerAuth"),
|
|
1381
|
-
(0, runtime_1.
|
|
1425
|
+
(0, runtime_1.Delete)("/comment"),
|
|
1382
1426
|
(0, runtime_1.Tags)("Comment"),
|
|
1383
1427
|
__param(0, (0, runtime_1.Body)()),
|
|
1384
1428
|
__param(1, (0, runtime_1.Inject)())
|
|
@@ -1392,11 +1436,11 @@ __decorate([
|
|
|
1392
1436
|
], LemmyHttp.prototype, "removeComment", null);
|
|
1393
1437
|
__decorate([
|
|
1394
1438
|
(0, runtime_1.Security)("bearerAuth"),
|
|
1395
|
-
(0, runtime_1.Post)("/comment/
|
|
1396
|
-
(0, runtime_1.Tags)("Comment"),
|
|
1439
|
+
(0, runtime_1.Post)("/comment/lock"),
|
|
1440
|
+
(0, runtime_1.Tags)("Comment", "Moderator"),
|
|
1397
1441
|
__param(0, (0, runtime_1.Body)()),
|
|
1398
1442
|
__param(1, (0, runtime_1.Inject)())
|
|
1399
|
-
], LemmyHttp.prototype, "
|
|
1443
|
+
], LemmyHttp.prototype, "lockComment", null);
|
|
1400
1444
|
__decorate([
|
|
1401
1445
|
(0, runtime_1.Security)("bearerAuth"),
|
|
1402
1446
|
(0, runtime_1.Post)("/comment/like"),
|
|
@@ -1479,18 +1523,11 @@ __decorate([
|
|
|
1479
1523
|
], LemmyHttp.prototype, "editPrivateMessage", null);
|
|
1480
1524
|
__decorate([
|
|
1481
1525
|
(0, runtime_1.Security)("bearerAuth"),
|
|
1482
|
-
(0, runtime_1.
|
|
1526
|
+
(0, runtime_1.Delete)("/private_message"),
|
|
1483
1527
|
(0, runtime_1.Tags)("PrivateMessage"),
|
|
1484
1528
|
__param(0, (0, runtime_1.Body)()),
|
|
1485
1529
|
__param(1, (0, runtime_1.Inject)())
|
|
1486
1530
|
], LemmyHttp.prototype, "deletePrivateMessage", null);
|
|
1487
|
-
__decorate([
|
|
1488
|
-
(0, runtime_1.Security)("bearerAuth"),
|
|
1489
|
-
(0, runtime_1.Post)("/private_message/mark_as_read"),
|
|
1490
|
-
(0, runtime_1.Tags)("PrivateMessage"),
|
|
1491
|
-
__param(0, (0, runtime_1.Body)()),
|
|
1492
|
-
__param(1, (0, runtime_1.Inject)())
|
|
1493
|
-
], LemmyHttp.prototype, "markPrivateMessageAsRead", null);
|
|
1494
1531
|
__decorate([
|
|
1495
1532
|
(0, runtime_1.Security)("bearerAuth"),
|
|
1496
1533
|
(0, runtime_1.Post)("/private_message/report"),
|
|
@@ -1541,18 +1578,11 @@ __decorate([
|
|
|
1541
1578
|
], LemmyHttp.prototype, "listPersonContent", null);
|
|
1542
1579
|
__decorate([
|
|
1543
1580
|
(0, runtime_1.Security)("bearerAuth"),
|
|
1544
|
-
(0, runtime_1.Post)("/
|
|
1545
|
-
(0, runtime_1.Tags)("
|
|
1546
|
-
__param(0, (0, runtime_1.Body)()),
|
|
1547
|
-
__param(1, (0, runtime_1.Inject)())
|
|
1548
|
-
], LemmyHttp.prototype, "markCommentMentionAsRead", null);
|
|
1549
|
-
__decorate([
|
|
1550
|
-
(0, runtime_1.Security)("bearerAuth"),
|
|
1551
|
-
(0, runtime_1.Post)("/account/mention/post/mark_as_read"),
|
|
1552
|
-
(0, runtime_1.Tags)("Account", "Post"),
|
|
1581
|
+
(0, runtime_1.Post)("/person/note"),
|
|
1582
|
+
(0, runtime_1.Tags)("Person"),
|
|
1553
1583
|
__param(0, (0, runtime_1.Body)()),
|
|
1554
1584
|
__param(1, (0, runtime_1.Inject)())
|
|
1555
|
-
], LemmyHttp.prototype, "
|
|
1585
|
+
], LemmyHttp.prototype, "notePerson", null);
|
|
1556
1586
|
__decorate([
|
|
1557
1587
|
(0, runtime_1.Security)("bearerAuth"),
|
|
1558
1588
|
(0, runtime_1.Post)("/admin/ban"),
|
|
@@ -1581,7 +1611,7 @@ __decorate([
|
|
|
1581
1611
|
], LemmyHttp.prototype, "getCaptcha", null);
|
|
1582
1612
|
__decorate([
|
|
1583
1613
|
(0, runtime_1.Security)("bearerAuth"),
|
|
1584
|
-
(0, runtime_1.
|
|
1614
|
+
(0, runtime_1.Delete)("/account"),
|
|
1585
1615
|
(0, runtime_1.Tags)("Account"),
|
|
1586
1616
|
__param(0, (0, runtime_1.Body)()),
|
|
1587
1617
|
__param(1, (0, runtime_1.Inject)())
|
|
@@ -1602,10 +1632,17 @@ __decorate([
|
|
|
1602
1632
|
], LemmyHttp.prototype, "passwordChangeAfterReset", null);
|
|
1603
1633
|
__decorate([
|
|
1604
1634
|
(0, runtime_1.Security)("bearerAuth"),
|
|
1605
|
-
(0, runtime_1.Post)("/account/mark_as_read/all"),
|
|
1635
|
+
(0, runtime_1.Post)("/account/notification/mark_as_read/all"),
|
|
1606
1636
|
(0, runtime_1.Tags)("Account"),
|
|
1607
1637
|
__param(0, (0, runtime_1.Inject)())
|
|
1608
1638
|
], LemmyHttp.prototype, "markAllNotificationsAsRead", null);
|
|
1639
|
+
__decorate([
|
|
1640
|
+
(0, runtime_1.Security)("bearerAuth"),
|
|
1641
|
+
(0, runtime_1.Post)("/account/notification/mark_as_read"),
|
|
1642
|
+
(0, runtime_1.Tags)("Account"),
|
|
1643
|
+
__param(0, (0, runtime_1.Body)()),
|
|
1644
|
+
__param(1, (0, runtime_1.Inject)())
|
|
1645
|
+
], LemmyHttp.prototype, "markNotificationAsRead", null);
|
|
1609
1646
|
__decorate([
|
|
1610
1647
|
(0, runtime_1.Security)("bearerAuth"),
|
|
1611
1648
|
(0, runtime_1.Put)("/account/settings/save"),
|
|
@@ -1629,17 +1666,17 @@ __decorate([
|
|
|
1629
1666
|
], LemmyHttp.prototype, "getReportCount", null);
|
|
1630
1667
|
__decorate([
|
|
1631
1668
|
(0, runtime_1.Security)("bearerAuth"),
|
|
1632
|
-
(0, runtime_1.Get)("/account/
|
|
1669
|
+
(0, runtime_1.Get)("/account/notification/count"),
|
|
1633
1670
|
(0, runtime_1.Tags)("Account"),
|
|
1634
1671
|
__param(0, (0, runtime_1.Inject)())
|
|
1635
1672
|
], LemmyHttp.prototype, "getUnreadCount", null);
|
|
1636
1673
|
__decorate([
|
|
1637
1674
|
(0, runtime_1.Security)("bearerAuth"),
|
|
1638
|
-
(0, runtime_1.Get)("/account/
|
|
1675
|
+
(0, runtime_1.Get)("/account/notification/list"),
|
|
1639
1676
|
(0, runtime_1.Tags)("Account"),
|
|
1640
1677
|
__param(0, (0, runtime_1.Queries)()),
|
|
1641
1678
|
__param(1, (0, runtime_1.Inject)())
|
|
1642
|
-
], LemmyHttp.prototype, "
|
|
1679
|
+
], LemmyHttp.prototype, "listNotifications", null);
|
|
1643
1680
|
__decorate([
|
|
1644
1681
|
(0, runtime_1.Post)("/account/auth/verify_email"),
|
|
1645
1682
|
(0, runtime_1.Tags)("Account"),
|
|
@@ -1787,7 +1824,7 @@ __decorate([
|
|
|
1787
1824
|
], LemmyHttp.prototype, "editTagline", null);
|
|
1788
1825
|
__decorate([
|
|
1789
1826
|
(0, runtime_1.Security)("bearerAuth"),
|
|
1790
|
-
(0, runtime_1.
|
|
1827
|
+
(0, runtime_1.Delete)("/admin/tagline"),
|
|
1791
1828
|
(0, runtime_1.Tags)("Admin", "Tagline"),
|
|
1792
1829
|
__param(0, (0, runtime_1.Body)()),
|
|
1793
1830
|
__param(1, (0, runtime_1.Inject)())
|
|
@@ -1837,7 +1874,7 @@ __decorate([
|
|
|
1837
1874
|
], LemmyHttp.prototype, "editOAuthProvider", null);
|
|
1838
1875
|
__decorate([
|
|
1839
1876
|
(0, runtime_1.Security)("bearerAuth"),
|
|
1840
|
-
(0, runtime_1.
|
|
1877
|
+
(0, runtime_1.Delete)("/oauth_provider"),
|
|
1841
1878
|
(0, runtime_1.Tags)("Miscellaneous", "OAuth"),
|
|
1842
1879
|
__param(0, (0, runtime_1.Body)()),
|
|
1843
1880
|
__param(1, (0, runtime_1.Inject)())
|
|
@@ -1852,7 +1889,8 @@ __decorate([
|
|
|
1852
1889
|
__decorate([
|
|
1853
1890
|
(0, runtime_1.Get)("/federated_instances"),
|
|
1854
1891
|
(0, runtime_1.Tags)("Miscellaneous"),
|
|
1855
|
-
__param(0, (0, runtime_1.
|
|
1892
|
+
__param(0, (0, runtime_1.Queries)()),
|
|
1893
|
+
__param(1, (0, runtime_1.Inject)())
|
|
1856
1894
|
], LemmyHttp.prototype, "getFederatedInstances", null);
|
|
1857
1895
|
__decorate([
|
|
1858
1896
|
(0, runtime_1.Security)("bearerAuth"),
|
|
@@ -1863,11 +1901,18 @@ __decorate([
|
|
|
1863
1901
|
], LemmyHttp.prototype, "listReports", null);
|
|
1864
1902
|
__decorate([
|
|
1865
1903
|
(0, runtime_1.Security)("bearerAuth"),
|
|
1866
|
-
(0, runtime_1.Post)("/account/block/instance"),
|
|
1867
|
-
(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"),
|
|
1868
1913
|
__param(0, (0, runtime_1.Body)()),
|
|
1869
1914
|
__param(1, (0, runtime_1.Inject)())
|
|
1870
|
-
], LemmyHttp.prototype, "
|
|
1915
|
+
], LemmyHttp.prototype, "userBlockInstancePersons", null);
|
|
1871
1916
|
__decorate([
|
|
1872
1917
|
(0, runtime_1.Security)("bearerAuth"),
|
|
1873
1918
|
(0, runtime_1.Post)("/admin/instance/block"),
|
|
@@ -1977,8 +2022,71 @@ __decorate([
|
|
|
1977
2022
|
__param(0, (0, runtime_1.Inject)())
|
|
1978
2023
|
], LemmyHttp.prototype, "imageHealth", null);
|
|
1979
2024
|
__decorate([
|
|
2025
|
+
(0, runtime_1.Security)("bearerAuth"),
|
|
2026
|
+
(0, runtime_1.Post)("/account/donation_dialog_shown"),
|
|
2027
|
+
(0, runtime_1.Tags)("Account"),
|
|
1980
2028
|
__param(0, (0, runtime_1.Inject)())
|
|
1981
|
-
], LemmyHttp.prototype, "
|
|
2029
|
+
], LemmyHttp.prototype, "donationDialogShown", null);
|
|
2030
|
+
__decorate([
|
|
2031
|
+
(0, runtime_1.Security)("bearerAuth"),
|
|
2032
|
+
(0, runtime_1.Post)("/multi_community"),
|
|
2033
|
+
(0, runtime_1.Tags)("Multicommunity"),
|
|
2034
|
+
__param(0, (0, runtime_1.Body)()),
|
|
2035
|
+
__param(1, (0, runtime_1.Inject)())
|
|
2036
|
+
], LemmyHttp.prototype, "createMultiCommunity", null);
|
|
2037
|
+
__decorate([
|
|
2038
|
+
(0, runtime_1.Security)("bearerAuth"),
|
|
2039
|
+
(0, runtime_1.Put)("/multi_community"),
|
|
2040
|
+
(0, runtime_1.Tags)("Multicommunity"),
|
|
2041
|
+
__param(0, (0, runtime_1.Body)()),
|
|
2042
|
+
__param(1, (0, runtime_1.Inject)())
|
|
2043
|
+
], LemmyHttp.prototype, "updateMultiCommunity", null);
|
|
2044
|
+
__decorate([
|
|
2045
|
+
(0, runtime_1.Get)("/multi_community"),
|
|
2046
|
+
(0, runtime_1.Tags)("Multicommunity"),
|
|
2047
|
+
__param(0, (0, runtime_1.Queries)()),
|
|
2048
|
+
__param(1, (0, runtime_1.Inject)())
|
|
2049
|
+
], LemmyHttp.prototype, "getMultiCommunity", null);
|
|
2050
|
+
__decorate([
|
|
2051
|
+
(0, runtime_1.Security)("bearerAuth"),
|
|
2052
|
+
(0, runtime_1.Post)("/multi_community/entry"),
|
|
2053
|
+
(0, runtime_1.Tags)("Multicommunity"),
|
|
2054
|
+
__param(0, (0, runtime_1.Body)()),
|
|
2055
|
+
__param(1, (0, runtime_1.Inject)())
|
|
2056
|
+
], LemmyHttp.prototype, "createMultiCommunityEntry", null);
|
|
2057
|
+
__decorate([
|
|
2058
|
+
(0, runtime_1.Security)("bearerAuth"),
|
|
2059
|
+
(0, runtime_1.Delete)("/multi_community/entry"),
|
|
2060
|
+
(0, runtime_1.Tags)("Multicommunity"),
|
|
2061
|
+
__param(0, (0, runtime_1.Body)()),
|
|
2062
|
+
__param(1, (0, runtime_1.Inject)())
|
|
2063
|
+
], LemmyHttp.prototype, "deleteMultiCommunityEntry", null);
|
|
2064
|
+
__decorate([
|
|
2065
|
+
(0, runtime_1.Get)("/multi_community/list"),
|
|
2066
|
+
(0, runtime_1.Tags)("Multicommunity"),
|
|
2067
|
+
__param(0, (0, runtime_1.Queries)()),
|
|
2068
|
+
__param(1, (0, runtime_1.Inject)())
|
|
2069
|
+
], LemmyHttp.prototype, "listMultiCommunities", null);
|
|
2070
|
+
__decorate([
|
|
2071
|
+
(0, runtime_1.Post)("/multi_community/follow"),
|
|
2072
|
+
(0, runtime_1.Tags)("Multicommunity"),
|
|
2073
|
+
__param(0, (0, runtime_1.Body)()),
|
|
2074
|
+
__param(1, (0, runtime_1.Inject)())
|
|
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);
|
|
1982
2090
|
exports.LemmyHttp = LemmyHttp = __decorate([
|
|
1983
2091
|
(0, runtime_1.Route)("api/v4")
|
|
1984
2092
|
], LemmyHttp);
|
|
@@ -2006,9 +2114,10 @@ function createFormData(image) {
|
|
|
2006
2114
|
* The msg is either an empty string, or extra non-translatable info.
|
|
2007
2115
|
*/
|
|
2008
2116
|
class LemmyError extends Error {
|
|
2009
|
-
constructor(name, msg) {
|
|
2117
|
+
constructor(name, status, msg) {
|
|
2010
2118
|
super(msg ?? "");
|
|
2011
2119
|
this.name = name;
|
|
2120
|
+
this.status = status;
|
|
2012
2121
|
// Set the prototype explicitly.
|
|
2013
2122
|
Object.setPrototypeOf(this, LemmyError.prototype);
|
|
2014
2123
|
}
|