lemmy-js-client 1.0.0-search-and-resolve.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 +79 -40
- package/dist/http.js +225 -87
- package/dist/index.d.ts +54 -78
- package/dist/index.js +3 -0
- package/dist/other_types.d.ts +14 -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 +2 -2
- package/dist/types/BanPerson.d.ts +2 -2
- package/dist/types/ChangePassword.d.ts +4 -0
- package/dist/types/Comment.d.ts +6 -2
- package/dist/types/CommentActions.d.ts +6 -10
- package/dist/types/CommentActions.js +1 -0
- package/dist/types/CommentReport.d.ts +2 -2
- 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/Community.d.ts +2 -2
- package/dist/types/CommunityActions.d.ts +11 -17
- package/dist/types/CommunityFollowerState.d.ts +1 -1
- package/dist/types/CommunityNotificationsMode.d.ts +4 -0
- package/dist/types/CommunityReport.d.ts +2 -2
- 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/CreatePost.d.ts +1 -1
- package/dist/types/CreatePostLike.d.ts +2 -2
- package/dist/types/CreateSite.d.ts +16 -14
- package/dist/types/CustomEmoji.d.ts +2 -2
- package/dist/types/EditCustomEmoji.d.ts +7 -5
- package/dist/types/EditPost.d.ts +1 -1
- package/dist/types/EditSite.d.ts +26 -20
- 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 +3 -5
- 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/GetComments.d.ts +0 -2
- 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 -2
- package/dist/types/GetSiteResponse.d.ts +6 -0
- package/dist/types/HideCommunity.d.ts +1 -1
- package/dist/types/Instance.d.ts +2 -2
- package/dist/types/InstanceActions.d.ts +8 -8
- package/dist/types/InstanceActions.js +1 -0
- package/dist/types/InstanceWithFederationState.d.ts +2 -2
- package/dist/types/LemmyErrorType.d.ts +28 -146
- package/dist/types/LikeType.d.ts +4 -0
- 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/ListPersonLiked.d.ts +13 -0
- package/dist/types/ListPersonLikedResponse.d.ts +13 -0
- package/dist/types/ListingType.d.ts +1 -1
- package/dist/types/LocalImage.d.ts +8 -3
- package/dist/types/LocalImageView.d.ts +2 -0
- package/dist/types/LocalSite.d.ts +5 -10
- package/dist/types/LocalSiteRateLimit.d.ts +16 -16
- package/dist/types/LocalSiteUrlBlocklist.d.ts +2 -2
- 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/LoginToken.d.ts +1 -1
- 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/OAuthAccount.d.ts +2 -2
- package/dist/types/OAuthProvider.d.ts +2 -2
- package/dist/types/OpenGraphData.d.ts +4 -0
- package/dist/types/PendingFollowerView.d.ts +9 -0
- package/dist/types/Person.d.ts +2 -2
- package/dist/types/PersonActions.d.ts +21 -4
- package/dist/types/PersonActions.js +1 -0
- package/dist/types/PersonContentCombinedView.d.ts +2 -2
- package/dist/types/PersonContentType.d.ts +1 -1
- package/dist/types/PersonLikedCombinedView.d.ts +7 -0
- 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 +9 -7
- package/dist/types/PostActions.d.ts +15 -17
- 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/PostReport.d.ts +2 -2
- 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 +2 -3
- package/dist/types/PrivateMessageReport.d.ts +2 -2
- 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 +3 -3
- package/dist/types/Register.d.ts +4 -0
- package/dist/types/RegistrationApplication.d.ts +2 -1
- 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 +9 -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/Site.d.ts +2 -2
- package/dist/types/SiteResponse.d.ts +0 -4
- package/dist/types/Tag.d.ts +8 -16
- package/dist/types/Tagline.d.ts +2 -2
- 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 -2
- 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 -12
- package/dist/types/ModChangeCommunityVisibilityId.d.ts +0 -1
- package/dist/types/ModChangeCommunityVisibilityView.d.ts +0 -11
- package/dist/types/ModFeaturePost.d.ts +0 -14
- package/dist/types/ModFeaturePostId.d.ts +0 -1
- 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/{AdminPurgePersonId.js → LikeType.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 → ListPersonLiked.js} +0 -0
- /package/dist/types/{BanPersonResponse.js → ListPersonLikedResponse.js} +0 -0
- /package/dist/types/{BlockCommunityResponse.js → LockComment.js} +0 -0
- /package/dist/types/{BlockPersonResponse.js → MarkNotificationAsRead.js} +0 -0
- /package/dist/types/{CommentReply.js → ModEditPost.js} +0 -0
- /package/dist/types/{CommentReplyView.js → Modlog.js} +0 -0
- /package/dist/types/{AdminPurgePostId.js → ModlogId.js} +0 -0
- /package/dist/types/{CommentReplyId.js → ModlogKind.js} +0 -0
- /package/dist/types/{FederatedInstances.js → ModlogView.js} +0 -0
- /package/dist/types/{GetCommunityPendingFollowsCount.js → MultiCommunity.js} +0 -0
- /package/dist/types/{InboxCombinedView.js → MultiCommunityEntry.js} +0 -0
- /package/dist/types/{ListInbox.js → MultiCommunityFollow.js} +0 -0
- /package/dist/types/{FederationError.js → MultiCommunityId.js} +0 -0
- /package/dist/types/{InboxDataType.js → MultiCommunityListingType.js} +0 -0
- /package/dist/types/{ListInboxResponse.js → MultiCommunityResponse.js} +0 -0
- /package/dist/types/{ModAddCommunityId.js → MultiCommunitySortType.js} +0 -0
- /package/dist/types/{MarkCommentReplyAsRead.js → MultiCommunityView.js} +0 -0
- /package/dist/types/{MarkPersonCommentMentionAsRead.js → NotePerson.js} +0 -0
- /package/dist/types/{MarkPersonPostMentionAsRead.js → Notification.js} +0 -0
- /package/dist/types/{MarkPrivateMessageAsRead.js → NotificationData.js} +0 -0
- /package/dist/types/{ModAddId.js → NotificationDataType.js} +0 -0
- /package/dist/types/{ModBanFromCommunityId.js → NotificationId.js} +0 -0
- /package/dist/types/{ModBanId.js → NotificationType.js} +0 -0
- /package/dist/types/{ModAdd.js → NotificationView.js} +0 -0
- /package/dist/types/{ModAddCommunity.js → PendingFollowerView.js} +0 -0
- /package/dist/types/{ModAddCommunityView.js → PersonLikedCombinedView.js} +0 -0
- /package/dist/types/{ModAddView.js → PersonResponse.js} +0 -0
- /package/dist/types/{ModChangeCommunityVisibilityId.js → PostNotificationsMode.js} +0 -0
- /package/dist/types/{ModBan.js → PostOrCommentOrPrivateMessage.js} +0 -0
- /package/dist/types/{ModFeaturePostId.js → UntranslatedError.js} +0 -0
- /package/dist/types/{ModBanFromCommunity.js → UpdateCommunityNotifications.js} +0 -0
- /package/dist/types/{ModBanFromCommunityView.js → UpdateMultiCommunity.js} +0 -0
- /package/dist/types/{ModBanView.js → UpdatePostNotifications.js} +0 -0
- /package/dist/types/{ModChangeCommunityVisibility.js → UserBlockInstanceCommunitiesParams.js} +0 -0
- /package/dist/types/{ModChangeCommunityVisibilityView.js → UserBlockInstancePersonsParams.js} +0 -0
- /package/dist/types/{ModFeaturePost.js → UserSettingsBackup.js} +0 -0
package/dist/http.js
CHANGED
|
@@ -21,7 +21,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
21
21
|
};
|
|
22
22
|
var _LemmyHttp_instances, _LemmyHttp_apiUrl, _LemmyHttp_headers, _LemmyHttp_fetchFunction, _LemmyHttp_buildFullUrl, _LemmyHttp_upload, _LemmyHttp_uploadWithQuery, _LemmyHttp_wrapper;
|
|
23
23
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
|
-
exports.LemmyHttp = void 0;
|
|
24
|
+
exports.LemmyError = exports.LemmyHttp = void 0;
|
|
25
25
|
const runtime_1 = require("@tsoa/runtime");
|
|
26
26
|
const other_types_1 = require("./other_types");
|
|
27
27
|
var HttpType;
|
|
@@ -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
|
|
@@ -652,6 +652,12 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
|
|
|
652
652
|
async listPersonHidden(form, options) {
|
|
653
653
|
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/hidden", form, options);
|
|
654
654
|
}
|
|
655
|
+
/**
|
|
656
|
+
* @summary List your liked content.
|
|
657
|
+
*/
|
|
658
|
+
async listPersonLiked(form, options) {
|
|
659
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/liked", form, options);
|
|
660
|
+
}
|
|
655
661
|
/**
|
|
656
662
|
* @summary Add an admin to your site.
|
|
657
663
|
*/
|
|
@@ -746,7 +752,7 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
|
|
|
746
752
|
* @summary Delete a tagline
|
|
747
753
|
*/
|
|
748
754
|
async deleteTagline(form, options) {
|
|
749
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.
|
|
755
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/admin/tagline", form, options);
|
|
750
756
|
}
|
|
751
757
|
/**
|
|
752
758
|
* @summary List taglines.
|
|
@@ -761,10 +767,10 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
|
|
|
761
767
|
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/community/tag", form, options);
|
|
762
768
|
}
|
|
763
769
|
/**
|
|
764
|
-
* @summary
|
|
770
|
+
* @summary Edit a community post tag.
|
|
765
771
|
*/
|
|
766
772
|
updateCommunityTag(form, options) {
|
|
767
|
-
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);
|
|
768
774
|
}
|
|
769
775
|
/**
|
|
770
776
|
* @summary Delete a post tag in a community.
|
|
@@ -788,7 +794,7 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
|
|
|
788
794
|
* @summary Delete an oauth provider method
|
|
789
795
|
*/
|
|
790
796
|
async deleteOAuthProvider(form, options) {
|
|
791
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.
|
|
797
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/oauth_provider", form, options);
|
|
792
798
|
}
|
|
793
799
|
/**
|
|
794
800
|
* @summary Authenticate with OAuth
|
|
@@ -799,8 +805,8 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
|
|
|
799
805
|
/**
|
|
800
806
|
* @summary Fetch federated instances.
|
|
801
807
|
*/
|
|
802
|
-
async getFederatedInstances(options) {
|
|
803
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/federated_instances",
|
|
808
|
+
async getFederatedInstances(form, options) {
|
|
809
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/federated_instances", form, options);
|
|
804
810
|
}
|
|
805
811
|
/**
|
|
806
812
|
* @summary List user reports.
|
|
@@ -809,10 +815,16 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
|
|
|
809
815
|
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/report/list", form, options);
|
|
810
816
|
}
|
|
811
817
|
/**
|
|
812
|
-
* @summary Block an instance as user.
|
|
818
|
+
* @summary Block an instance's communities as a user.
|
|
819
|
+
*/
|
|
820
|
+
async userBlockInstanceCommunities(form, options) {
|
|
821
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/block/instance/communities", form, options);
|
|
822
|
+
}
|
|
823
|
+
/**
|
|
824
|
+
* @summary Block an instance's persons as a user.
|
|
813
825
|
*/
|
|
814
|
-
async
|
|
815
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/block/instance", form, options);
|
|
826
|
+
async userBlockInstancePersons(form, options) {
|
|
827
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/block/instance/persons", form, options);
|
|
816
828
|
}
|
|
817
829
|
/**
|
|
818
830
|
* @summary Globally block an instance as admin.
|
|
@@ -912,11 +924,42 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
|
|
|
912
924
|
}
|
|
913
925
|
/**
|
|
914
926
|
* Mark donation dialog as shown, so it isn't displayed anymore.
|
|
915
|
-
*
|
|
916
|
-
* `HTTP.POST /user/donation_dialog_shown`
|
|
917
927
|
*/
|
|
918
|
-
|
|
919
|
-
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);
|
|
920
963
|
}
|
|
921
964
|
/**
|
|
922
965
|
* Set the headers (can be used to set the auth header)
|
|
@@ -972,10 +1015,12 @@ _LemmyHttp_wrapper = async function _LemmyHttp_wrapper(type_, endpoint, form, op
|
|
|
972
1015
|
json = await response.json();
|
|
973
1016
|
}
|
|
974
1017
|
catch {
|
|
975
|
-
throw new
|
|
1018
|
+
throw new LemmyError(response.statusText, response.status);
|
|
976
1019
|
}
|
|
977
1020
|
if (!response.ok) {
|
|
978
|
-
|
|
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);
|
|
1023
|
+
throw err;
|
|
979
1024
|
}
|
|
980
1025
|
else {
|
|
981
1026
|
return json;
|
|
@@ -1035,7 +1080,7 @@ __decorate([
|
|
|
1035
1080
|
], LemmyHttp.prototype, "importSettings", null);
|
|
1036
1081
|
__decorate([
|
|
1037
1082
|
(0, runtime_1.Security)("bearerAuth"),
|
|
1038
|
-
(0, runtime_1.Get)("/account/
|
|
1083
|
+
(0, runtime_1.Get)("/account/login/list"),
|
|
1039
1084
|
(0, runtime_1.Tags)("Account"),
|
|
1040
1085
|
__param(0, (0, runtime_1.Inject)())
|
|
1041
1086
|
], LemmyHttp.prototype, "listLogins", null);
|
|
@@ -1146,8 +1191,7 @@ __decorate([
|
|
|
1146
1191
|
(0, runtime_1.Security)("bearerAuth"),
|
|
1147
1192
|
(0, runtime_1.Get)("/community/pending_follows/count"),
|
|
1148
1193
|
(0, runtime_1.Tags)("Community"),
|
|
1149
|
-
__param(0, (0, runtime_1.
|
|
1150
|
-
__param(1, (0, runtime_1.Inject)())
|
|
1194
|
+
__param(0, (0, runtime_1.Inject)())
|
|
1151
1195
|
], LemmyHttp.prototype, "getCommunityPendingFollowsCount", null);
|
|
1152
1196
|
__decorate([
|
|
1153
1197
|
(0, runtime_1.Security)("bearerAuth"),
|
|
@@ -1172,7 +1216,7 @@ __decorate([
|
|
|
1172
1216
|
], LemmyHttp.prototype, "blockCommunity", null);
|
|
1173
1217
|
__decorate([
|
|
1174
1218
|
(0, runtime_1.Security)("bearerAuth"),
|
|
1175
|
-
(0, runtime_1.
|
|
1219
|
+
(0, runtime_1.Delete)("/community"),
|
|
1176
1220
|
(0, runtime_1.Tags)("Community"),
|
|
1177
1221
|
__param(0, (0, runtime_1.Body)()),
|
|
1178
1222
|
__param(1, (0, runtime_1.Inject)())
|
|
@@ -1258,7 +1302,14 @@ __decorate([
|
|
|
1258
1302
|
], LemmyHttp.prototype, "editPost", null);
|
|
1259
1303
|
__decorate([
|
|
1260
1304
|
(0, runtime_1.Security)("bearerAuth"),
|
|
1261
|
-
(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"),
|
|
1262
1313
|
(0, runtime_1.Tags)("Post"),
|
|
1263
1314
|
__param(0, (0, runtime_1.Body)()),
|
|
1264
1315
|
__param(1, (0, runtime_1.Inject)())
|
|
@@ -1371,7 +1422,7 @@ __decorate([
|
|
|
1371
1422
|
], LemmyHttp.prototype, "editComment", null);
|
|
1372
1423
|
__decorate([
|
|
1373
1424
|
(0, runtime_1.Security)("bearerAuth"),
|
|
1374
|
-
(0, runtime_1.
|
|
1425
|
+
(0, runtime_1.Delete)("/comment"),
|
|
1375
1426
|
(0, runtime_1.Tags)("Comment"),
|
|
1376
1427
|
__param(0, (0, runtime_1.Body)()),
|
|
1377
1428
|
__param(1, (0, runtime_1.Inject)())
|
|
@@ -1385,11 +1436,11 @@ __decorate([
|
|
|
1385
1436
|
], LemmyHttp.prototype, "removeComment", null);
|
|
1386
1437
|
__decorate([
|
|
1387
1438
|
(0, runtime_1.Security)("bearerAuth"),
|
|
1388
|
-
(0, runtime_1.Post)("/comment/
|
|
1389
|
-
(0, runtime_1.Tags)("Comment"),
|
|
1439
|
+
(0, runtime_1.Post)("/comment/lock"),
|
|
1440
|
+
(0, runtime_1.Tags)("Comment", "Moderator"),
|
|
1390
1441
|
__param(0, (0, runtime_1.Body)()),
|
|
1391
1442
|
__param(1, (0, runtime_1.Inject)())
|
|
1392
|
-
], LemmyHttp.prototype, "
|
|
1443
|
+
], LemmyHttp.prototype, "lockComment", null);
|
|
1393
1444
|
__decorate([
|
|
1394
1445
|
(0, runtime_1.Security)("bearerAuth"),
|
|
1395
1446
|
(0, runtime_1.Post)("/comment/like"),
|
|
@@ -1472,18 +1523,11 @@ __decorate([
|
|
|
1472
1523
|
], LemmyHttp.prototype, "editPrivateMessage", null);
|
|
1473
1524
|
__decorate([
|
|
1474
1525
|
(0, runtime_1.Security)("bearerAuth"),
|
|
1475
|
-
(0, runtime_1.
|
|
1526
|
+
(0, runtime_1.Delete)("/private_message"),
|
|
1476
1527
|
(0, runtime_1.Tags)("PrivateMessage"),
|
|
1477
1528
|
__param(0, (0, runtime_1.Body)()),
|
|
1478
1529
|
__param(1, (0, runtime_1.Inject)())
|
|
1479
1530
|
], LemmyHttp.prototype, "deletePrivateMessage", null);
|
|
1480
|
-
__decorate([
|
|
1481
|
-
(0, runtime_1.Security)("bearerAuth"),
|
|
1482
|
-
(0, runtime_1.Post)("/private_message/mark_as_read"),
|
|
1483
|
-
(0, runtime_1.Tags)("PrivateMessage"),
|
|
1484
|
-
__param(0, (0, runtime_1.Body)()),
|
|
1485
|
-
__param(1, (0, runtime_1.Inject)())
|
|
1486
|
-
], LemmyHttp.prototype, "markPrivateMessageAsRead", null);
|
|
1487
1531
|
__decorate([
|
|
1488
1532
|
(0, runtime_1.Security)("bearerAuth"),
|
|
1489
1533
|
(0, runtime_1.Post)("/private_message/report"),
|
|
@@ -1534,18 +1578,11 @@ __decorate([
|
|
|
1534
1578
|
], LemmyHttp.prototype, "listPersonContent", null);
|
|
1535
1579
|
__decorate([
|
|
1536
1580
|
(0, runtime_1.Security)("bearerAuth"),
|
|
1537
|
-
(0, runtime_1.Post)("/
|
|
1538
|
-
(0, runtime_1.Tags)("
|
|
1539
|
-
__param(0, (0, runtime_1.Body)()),
|
|
1540
|
-
__param(1, (0, runtime_1.Inject)())
|
|
1541
|
-
], LemmyHttp.prototype, "markCommentMentionAsRead", null);
|
|
1542
|
-
__decorate([
|
|
1543
|
-
(0, runtime_1.Security)("bearerAuth"),
|
|
1544
|
-
(0, runtime_1.Post)("/account/mention/post/mark_as_read"),
|
|
1545
|
-
(0, runtime_1.Tags)("Account", "Post"),
|
|
1581
|
+
(0, runtime_1.Post)("/person/note"),
|
|
1582
|
+
(0, runtime_1.Tags)("Person"),
|
|
1546
1583
|
__param(0, (0, runtime_1.Body)()),
|
|
1547
1584
|
__param(1, (0, runtime_1.Inject)())
|
|
1548
|
-
], LemmyHttp.prototype, "
|
|
1585
|
+
], LemmyHttp.prototype, "notePerson", null);
|
|
1549
1586
|
__decorate([
|
|
1550
1587
|
(0, runtime_1.Security)("bearerAuth"),
|
|
1551
1588
|
(0, runtime_1.Post)("/admin/ban"),
|
|
@@ -1574,7 +1611,7 @@ __decorate([
|
|
|
1574
1611
|
], LemmyHttp.prototype, "getCaptcha", null);
|
|
1575
1612
|
__decorate([
|
|
1576
1613
|
(0, runtime_1.Security)("bearerAuth"),
|
|
1577
|
-
(0, runtime_1.
|
|
1614
|
+
(0, runtime_1.Delete)("/account"),
|
|
1578
1615
|
(0, runtime_1.Tags)("Account"),
|
|
1579
1616
|
__param(0, (0, runtime_1.Body)()),
|
|
1580
1617
|
__param(1, (0, runtime_1.Inject)())
|
|
@@ -1595,10 +1632,17 @@ __decorate([
|
|
|
1595
1632
|
], LemmyHttp.prototype, "passwordChangeAfterReset", null);
|
|
1596
1633
|
__decorate([
|
|
1597
1634
|
(0, runtime_1.Security)("bearerAuth"),
|
|
1598
|
-
(0, runtime_1.Post)("/account/mark_as_read/all"),
|
|
1635
|
+
(0, runtime_1.Post)("/account/notification/mark_as_read/all"),
|
|
1599
1636
|
(0, runtime_1.Tags)("Account"),
|
|
1600
1637
|
__param(0, (0, runtime_1.Inject)())
|
|
1601
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);
|
|
1602
1646
|
__decorate([
|
|
1603
1647
|
(0, runtime_1.Security)("bearerAuth"),
|
|
1604
1648
|
(0, runtime_1.Put)("/account/settings/save"),
|
|
@@ -1622,17 +1666,17 @@ __decorate([
|
|
|
1622
1666
|
], LemmyHttp.prototype, "getReportCount", null);
|
|
1623
1667
|
__decorate([
|
|
1624
1668
|
(0, runtime_1.Security)("bearerAuth"),
|
|
1625
|
-
(0, runtime_1.Get)("/account/
|
|
1669
|
+
(0, runtime_1.Get)("/account/notification/count"),
|
|
1626
1670
|
(0, runtime_1.Tags)("Account"),
|
|
1627
1671
|
__param(0, (0, runtime_1.Inject)())
|
|
1628
1672
|
], LemmyHttp.prototype, "getUnreadCount", null);
|
|
1629
1673
|
__decorate([
|
|
1630
1674
|
(0, runtime_1.Security)("bearerAuth"),
|
|
1631
|
-
(0, runtime_1.Get)("/account/
|
|
1675
|
+
(0, runtime_1.Get)("/account/notification/list"),
|
|
1632
1676
|
(0, runtime_1.Tags)("Account"),
|
|
1633
1677
|
__param(0, (0, runtime_1.Queries)()),
|
|
1634
1678
|
__param(1, (0, runtime_1.Inject)())
|
|
1635
|
-
], LemmyHttp.prototype, "
|
|
1679
|
+
], LemmyHttp.prototype, "listNotifications", null);
|
|
1636
1680
|
__decorate([
|
|
1637
1681
|
(0, runtime_1.Post)("/account/auth/verify_email"),
|
|
1638
1682
|
(0, runtime_1.Tags)("Account"),
|
|
@@ -1666,6 +1710,13 @@ __decorate([
|
|
|
1666
1710
|
__param(0, (0, runtime_1.Queries)()),
|
|
1667
1711
|
__param(1, (0, runtime_1.Inject)())
|
|
1668
1712
|
], LemmyHttp.prototype, "listPersonHidden", null);
|
|
1713
|
+
__decorate([
|
|
1714
|
+
(0, runtime_1.Security)("bearerAuth"),
|
|
1715
|
+
(0, runtime_1.Get)("/account/liked"),
|
|
1716
|
+
(0, runtime_1.Tags)("Account"),
|
|
1717
|
+
__param(0, (0, runtime_1.Queries)()),
|
|
1718
|
+
__param(1, (0, runtime_1.Inject)())
|
|
1719
|
+
], LemmyHttp.prototype, "listPersonLiked", null);
|
|
1669
1720
|
__decorate([
|
|
1670
1721
|
(0, runtime_1.Security)("bearerAuth"),
|
|
1671
1722
|
(0, runtime_1.Post)("/admin/add"),
|
|
@@ -1773,7 +1824,7 @@ __decorate([
|
|
|
1773
1824
|
], LemmyHttp.prototype, "editTagline", null);
|
|
1774
1825
|
__decorate([
|
|
1775
1826
|
(0, runtime_1.Security)("bearerAuth"),
|
|
1776
|
-
(0, runtime_1.
|
|
1827
|
+
(0, runtime_1.Delete)("/admin/tagline"),
|
|
1777
1828
|
(0, runtime_1.Tags)("Admin", "Tagline"),
|
|
1778
1829
|
__param(0, (0, runtime_1.Body)()),
|
|
1779
1830
|
__param(1, (0, runtime_1.Inject)())
|
|
@@ -1823,7 +1874,7 @@ __decorate([
|
|
|
1823
1874
|
], LemmyHttp.prototype, "editOAuthProvider", null);
|
|
1824
1875
|
__decorate([
|
|
1825
1876
|
(0, runtime_1.Security)("bearerAuth"),
|
|
1826
|
-
(0, runtime_1.
|
|
1877
|
+
(0, runtime_1.Delete)("/oauth_provider"),
|
|
1827
1878
|
(0, runtime_1.Tags)("Miscellaneous", "OAuth"),
|
|
1828
1879
|
__param(0, (0, runtime_1.Body)()),
|
|
1829
1880
|
__param(1, (0, runtime_1.Inject)())
|
|
@@ -1838,7 +1889,8 @@ __decorate([
|
|
|
1838
1889
|
__decorate([
|
|
1839
1890
|
(0, runtime_1.Get)("/federated_instances"),
|
|
1840
1891
|
(0, runtime_1.Tags)("Miscellaneous"),
|
|
1841
|
-
__param(0, (0, runtime_1.
|
|
1892
|
+
__param(0, (0, runtime_1.Queries)()),
|
|
1893
|
+
__param(1, (0, runtime_1.Inject)())
|
|
1842
1894
|
], LemmyHttp.prototype, "getFederatedInstances", null);
|
|
1843
1895
|
__decorate([
|
|
1844
1896
|
(0, runtime_1.Security)("bearerAuth"),
|
|
@@ -1849,11 +1901,18 @@ __decorate([
|
|
|
1849
1901
|
], LemmyHttp.prototype, "listReports", null);
|
|
1850
1902
|
__decorate([
|
|
1851
1903
|
(0, runtime_1.Security)("bearerAuth"),
|
|
1852
|
-
(0, runtime_1.Post)("/account/block/instance"),
|
|
1853
|
-
(0, runtime_1.Tags)("Account"),
|
|
1904
|
+
(0, runtime_1.Post)("/account/block/instance/communities"),
|
|
1905
|
+
(0, runtime_1.Tags)("Account", "Community"),
|
|
1854
1906
|
__param(0, (0, runtime_1.Body)()),
|
|
1855
1907
|
__param(1, (0, runtime_1.Inject)())
|
|
1856
|
-
], 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);
|
|
1857
1916
|
__decorate([
|
|
1858
1917
|
(0, runtime_1.Security)("bearerAuth"),
|
|
1859
1918
|
(0, runtime_1.Post)("/admin/instance/block"),
|
|
@@ -1963,8 +2022,71 @@ __decorate([
|
|
|
1963
2022
|
__param(0, (0, runtime_1.Inject)())
|
|
1964
2023
|
], LemmyHttp.prototype, "imageHealth", null);
|
|
1965
2024
|
__decorate([
|
|
2025
|
+
(0, runtime_1.Security)("bearerAuth"),
|
|
2026
|
+
(0, runtime_1.Post)("/account/donation_dialog_shown"),
|
|
2027
|
+
(0, runtime_1.Tags)("Account"),
|
|
1966
2028
|
__param(0, (0, runtime_1.Inject)())
|
|
1967
|
-
], 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);
|
|
1968
2090
|
exports.LemmyHttp = LemmyHttp = __decorate([
|
|
1969
2091
|
(0, runtime_1.Route)("api/v4")
|
|
1970
2092
|
], LemmyHttp);
|
|
@@ -1985,3 +2107,19 @@ function createFormData(image) {
|
|
|
1985
2107
|
}
|
|
1986
2108
|
return formData;
|
|
1987
2109
|
}
|
|
2110
|
+
/**
|
|
2111
|
+
* A Lemmy error type.
|
|
2112
|
+
*
|
|
2113
|
+
* The name is the i18n translatable error code.
|
|
2114
|
+
* The msg is either an empty string, or extra non-translatable info.
|
|
2115
|
+
*/
|
|
2116
|
+
class LemmyError extends Error {
|
|
2117
|
+
constructor(name, status, msg) {
|
|
2118
|
+
super(msg ?? "");
|
|
2119
|
+
this.name = name;
|
|
2120
|
+
this.status = status;
|
|
2121
|
+
// Set the prototype explicitly.
|
|
2122
|
+
Object.setPrototypeOf(this, LemmyError.prototype);
|
|
2123
|
+
}
|
|
2124
|
+
}
|
|
2125
|
+
exports.LemmyError = LemmyError;
|