lemmy-js-client 1.0.0-community-reports.0 → 1.0.0-community-post-notifs.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 +87 -37
- package/dist/http.js +241 -72
- package/dist/index.d.ts +44 -20
- package/dist/other_types.d.ts +22 -4
- package/dist/types/AdminAllowInstance.d.ts +1 -1
- package/dist/types/AdminBlockInstance.d.ts +2 -2
- package/dist/types/AdminBlockInstanceParams.d.ts +1 -1
- package/dist/types/AdminListUsers.d.ts +7 -0
- package/dist/types/AdminListUsersResponse.d.ts +10 -0
- package/dist/types/AdminPurgeComment.d.ts +1 -1
- package/dist/types/AdminPurgeCommunity.d.ts +1 -1
- package/dist/types/AdminPurgePerson.d.ts +1 -1
- package/dist/types/AdminPurgePost.d.ts +1 -1
- package/dist/types/BanFromCommunity.d.ts +1 -1
- package/dist/types/BanPerson.d.ts +1 -1
- package/dist/types/Comment.d.ts +2 -2
- package/dist/types/CommentActions.d.ts +2 -6
- package/dist/types/CommentActions.js +1 -0
- package/dist/types/CommentReport.d.ts +2 -2
- package/dist/types/CommentReportView.d.ts +3 -1
- package/dist/types/CommentResponse.d.ts +0 -2
- package/dist/types/CommentSlimView.d.ts +2 -6
- package/dist/types/CommentView.d.ts +2 -5
- package/dist/types/Community.d.ts +2 -2
- package/dist/types/CommunityActions.d.ts +7 -13
- package/dist/types/CommunityIdQuery.d.ts +8 -0
- package/dist/types/CommunityNotificationsMode.d.ts +4 -0
- package/dist/types/CommunityReport.d.ts +2 -2
- package/dist/types/CommunityReportView.d.ts +4 -0
- package/dist/types/CommunityView.d.ts +0 -2
- package/dist/types/CreateCommunityTag.d.ts +3 -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/CreateSite.d.ts +16 -13
- package/dist/types/CustomEmoji.d.ts +2 -2
- package/dist/types/EditPost.d.ts +1 -1
- package/dist/types/EditSite.d.ts +22 -16
- package/dist/types/ExportDataResponse.d.ts +13 -0
- package/dist/types/FederationBlockList.d.ts +3 -3
- package/dist/types/FederationError.d.ts +3 -1
- package/dist/types/FollowMultiCommunity.d.ts +5 -0
- package/dist/types/GetComments.d.ts +0 -2
- package/dist/types/GetMultiCommunity.d.ts +4 -0
- package/dist/types/GetMultiCommunityResponse.d.ts +6 -0
- package/dist/types/GetPosts.d.ts +2 -2
- package/dist/types/Instance.d.ts +4 -3
- 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 +13 -19
- package/dist/types/LikeType.d.ts +4 -0
- package/dist/types/ListMultiCommunities.d.ts +5 -0
- package/dist/types/ListMultiCommunitiesResponse.d.ts +4 -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/{ListBannedPersons.d.ts → ListPersonHidden.d.ts} +2 -2
- package/dist/types/{BannedPersonsResponse.d.ts → ListPersonHiddenResponse.d.ts} +4 -4
- package/dist/types/ListPersonLiked.d.ts +13 -0
- package/dist/types/ListPersonLikedResponse.d.ts +13 -0
- package/dist/types/ListPersonRead.d.ts +9 -0
- package/dist/types/ListPersonRead.js +2 -0
- package/dist/types/ListPersonReadResponse.d.ts +13 -0
- package/dist/types/ListPersonReadResponse.js +2 -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 +6 -6
- package/dist/types/LocalSiteRateLimit.d.ts +16 -16
- package/dist/types/LocalSiteUrlBlocklist.d.ts +2 -2
- package/dist/types/LocalUser.d.ts +4 -2
- package/dist/types/LocalUserView.d.ts +1 -2
- package/dist/types/LockPost.d.ts +1 -0
- package/dist/types/Login.d.ts +3 -0
- package/dist/types/LoginToken.d.ts +1 -1
- package/dist/types/MarkNotificationAsRead.d.ts +8 -0
- package/dist/types/MarkNotificationAsRead.js +2 -0
- package/dist/types/ModAdd.d.ts +1 -1
- package/dist/types/ModAddCommunity.d.ts +1 -1
- package/dist/types/ModBan.d.ts +2 -2
- package/dist/types/ModBanFromCommunity.d.ts +2 -2
- package/dist/types/ModChangeCommunityVisibility.d.ts +1 -2
- package/dist/types/ModEditPost.d.ts +10 -0
- package/dist/types/ModEditPost.js +2 -0
- package/dist/types/ModFeaturePost.d.ts +1 -1
- package/dist/types/ModLockPost.d.ts +2 -1
- package/dist/types/ModRemoveComment.d.ts +1 -1
- package/dist/types/ModRemoveCommunity.d.ts +1 -1
- package/dist/types/ModRemovePost.d.ts +1 -1
- package/dist/types/ModTransferCommunity.d.ts +1 -1
- package/dist/types/MultiCommunity.d.ts +17 -0
- package/dist/types/MultiCommunity.js +2 -0
- package/dist/types/MultiCommunityFollow.d.ts +8 -0
- package/dist/types/MultiCommunityFollow.js +2 -0
- package/dist/types/MultiCommunityId.d.ts +1 -0
- package/dist/types/MultiCommunityView.d.ts +6 -0
- package/dist/types/MultiCommunityView.js +2 -0
- package/dist/types/MyUserInfo.d.ts +2 -1
- package/dist/types/NotePerson.d.ts +10 -0
- package/dist/types/NotePerson.js +2 -0
- package/dist/types/Notification.d.ts +16 -0
- package/dist/types/Notification.js +2 -0
- package/dist/types/NotificationData.d.ts +10 -0
- package/dist/types/NotificationData.js +2 -0
- package/dist/types/NotificationDataType.d.ts +4 -0
- package/dist/types/NotificationDataType.js +3 -0
- package/dist/types/NotificationId.d.ts +1 -0
- package/dist/types/NotificationId.js +3 -0
- package/dist/types/NotificationTypes.d.ts +4 -0
- package/dist/types/NotificationTypes.js +3 -0
- package/dist/types/NotificationView.d.ts +6 -0
- package/dist/types/NotificationView.js +2 -0
- package/dist/types/OAuthAccount.d.ts +2 -2
- package/dist/types/OAuthProvider.d.ts +2 -2
- 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/PersonLikedCombinedView.d.ts +7 -0
- package/dist/types/PersonLikedCombinedView.js +2 -0
- package/dist/types/PersonView.d.ts +2 -3
- package/dist/types/Post.d.ts +4 -4
- package/dist/types/PostActions.d.ts +7 -9
- package/dist/types/PostNotificationsMode.d.ts +4 -0
- package/dist/types/PostNotificationsMode.js +3 -0
- package/dist/types/PostOrCommentOrPrivateMessage.d.ts +10 -0
- package/dist/types/PostOrCommentOrPrivateMessage.js +2 -0
- package/dist/types/PostReport.d.ts +2 -2
- package/dist/types/PostReportView.d.ts +3 -1
- package/dist/types/PostView.d.ts +2 -5
- package/dist/types/PrivateMessage.d.ts +2 -3
- package/dist/types/PrivateMessageReport.d.ts +2 -2
- package/dist/types/PrivateMessageReportView.d.ts +2 -0
- package/dist/types/ReadableFederationState.d.ts +2 -2
- package/dist/types/RegistrationApplication.d.ts +1 -1
- package/dist/types/SaveUserSettings.d.ts +6 -1
- package/dist/types/Search.d.ts +5 -1
- package/dist/types/SearchCombinedView.d.ts +4 -1
- package/dist/types/SearchType.d.ts +1 -1
- package/dist/types/Site.d.ts +4 -3
- 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/UpdateCommunityNotifications.d.ts +9 -0
- package/dist/types/UpdateCommunityNotifications.js +2 -0
- package/dist/types/UpdateCommunityTag.d.ts +3 -2
- package/dist/types/UpdateMultiCommunity.d.ts +7 -0
- package/dist/types/UpdateMultiCommunity.js +2 -0
- package/dist/types/UpdatePostNotifications.d.ts +9 -0
- package/dist/types/UpdatePostNotifications.js +2 -0
- package/dist/types/UserBlockInstanceCommunitiesParams.d.ts +8 -0
- package/dist/types/UserBlockInstanceCommunitiesParams.js +2 -0
- package/dist/types/{UserBlockInstanceParams.d.ts → UserBlockInstancePersonsParams.d.ts} +2 -2
- package/dist/types/UserBlockInstancePersonsParams.js +2 -0
- package/dist/types/UserSettingsBackup.d.ts +31 -0
- package/dist/types/UserSettingsBackup.js +2 -0
- package/dist/types/VoteShow.d.ts +4 -0
- package/dist/types/VoteShow.js +3 -0
- package/dist/types/VoteView.d.ts +1 -1
- package/package.json +7 -6
- 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/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/PersonCommentMention.d.ts +0 -13
- package/dist/types/PersonCommentMentionId.d.ts +0 -4
- package/dist/types/PersonCommentMentionView.d.ts +0 -30
- package/dist/types/PersonPostMention.d.ts +0 -13
- package/dist/types/PersonPostMentionId.d.ts +0 -4
- package/dist/types/PersonPostMentionView.d.ts +0 -32
- package/dist/types/ResolveObjectResponse.d.ts +0 -13
- /package/dist/types/{BannedPersonsResponse.js → AdminListUsers.js} +0 -0
- /package/dist/types/{CommentReply.js → AdminListUsersResponse.js} +0 -0
- /package/dist/types/{CommentReplyView.js → CommunityIdQuery.js} +0 -0
- /package/dist/types/{CommentReplyId.js → CommunityNotificationsMode.js} +0 -0
- /package/dist/types/{InboxDataType.js → CreateMultiCommunity.js} +0 -0
- /package/dist/types/{InboxCombinedView.js → CreateOrDeleteMultiCommunityEntry.js} +0 -0
- /package/dist/types/{ListBannedPersons.js → ExportDataResponse.js} +0 -0
- /package/dist/types/{ListInbox.js → FollowMultiCommunity.js} +0 -0
- /package/dist/types/{ListInboxResponse.js → GetMultiCommunity.js} +0 -0
- /package/dist/types/{MarkCommentReplyAsRead.js → GetMultiCommunityResponse.js} +0 -0
- /package/dist/types/{PersonCommentMentionId.js → LikeType.js} +0 -0
- /package/dist/types/{MarkPersonCommentMentionAsRead.js → ListMultiCommunities.js} +0 -0
- /package/dist/types/{MarkPersonPostMentionAsRead.js → ListMultiCommunitiesResponse.js} +0 -0
- /package/dist/types/{PersonCommentMention.js → ListNotifications.js} +0 -0
- /package/dist/types/{PersonCommentMentionView.js → ListNotificationsResponse.js} +0 -0
- /package/dist/types/{PersonPostMention.js → ListPersonHidden.js} +0 -0
- /package/dist/types/{PersonPostMentionView.js → ListPersonHiddenResponse.js} +0 -0
- /package/dist/types/{ResolveObjectResponse.js → ListPersonLiked.js} +0 -0
- /package/dist/types/{UserBlockInstanceParams.js → ListPersonLikedResponse.js} +0 -0
- /package/dist/types/{PersonPostMentionId.js → MultiCommunityId.js} +0 -0
package/dist/http.js
CHANGED
@@ -19,9 +19,9 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
19
19
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
20
20
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
21
21
|
};
|
22
|
-
var _LemmyHttp_instances, _LemmyHttp_apiUrl, _LemmyHttp_headers, _LemmyHttp_fetchFunction, _LemmyHttp_buildFullUrl, _LemmyHttp_upload, _LemmyHttp_wrapper;
|
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;
|
@@ -161,7 +161,7 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
|
|
161
161
|
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/modlog", form, options);
|
162
162
|
}
|
163
163
|
/**
|
164
|
-
* @summary Search lemmy.
|
164
|
+
* @summary Search lemmy. If `search_term` is a url it also attempts to fetch it, just like `resolve_object`.
|
165
165
|
*/
|
166
166
|
async search(form, options) {
|
167
167
|
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/search", form, options);
|
@@ -298,6 +298,12 @@ 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
|
*/
|
@@ -406,12 +412,6 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
|
|
406
412
|
async removeComment(form, options) {
|
407
413
|
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/comment/remove", form, options);
|
408
414
|
}
|
409
|
-
/**
|
410
|
-
* @summary Mark a comment as read.
|
411
|
-
*/
|
412
|
-
async markCommentReplyAsRead(form, options) {
|
413
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/comment/mark_as_read", form, options);
|
414
|
-
}
|
415
415
|
/**
|
416
416
|
* @summary Like / vote on a comment.
|
417
417
|
*/
|
@@ -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
|
537
|
-
*/
|
538
|
-
async markCommentMentionAsRead(form, options) {
|
539
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/mention/comment/mark_as_read", form, options);
|
540
|
-
}
|
541
|
-
/**
|
542
|
-
* @summary Mark a person post body mention as read.
|
536
|
+
* @summary Make a note for a person.
|
543
537
|
*/
|
544
|
-
async
|
545
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/
|
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.
|
@@ -551,10 +545,10 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
|
|
551
545
|
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/admin/ban", form, options);
|
552
546
|
}
|
553
547
|
/**
|
554
|
-
* @summary Get a list of
|
548
|
+
* @summary Get a list of users.
|
555
549
|
*/
|
556
|
-
async
|
557
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/admin/
|
550
|
+
async listUsers(form = {}, options) {
|
551
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/admin/users", form, options);
|
558
552
|
}
|
559
553
|
/**
|
560
554
|
* @summary Block a person.
|
@@ -592,6 +586,12 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
|
|
592
586
|
async markAllNotificationsAsRead(options) {
|
593
587
|
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/mark_as_read/all", {}, options);
|
594
588
|
}
|
589
|
+
/**
|
590
|
+
* @summary Mark a comment as read.
|
591
|
+
*/
|
592
|
+
async markNotificationAsRead(form, options) {
|
593
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/mark_as_read", form, options);
|
594
|
+
}
|
595
595
|
/**
|
596
596
|
* @summary Save your user settings.
|
597
597
|
*/
|
@@ -619,8 +619,8 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
|
|
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/notifications", form, options);
|
624
624
|
}
|
625
625
|
/**
|
626
626
|
* @summary Verify your email
|
@@ -640,6 +640,24 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
|
|
640
640
|
async listPersonSaved(form, options) {
|
641
641
|
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/saved", form, options);
|
642
642
|
}
|
643
|
+
/**
|
644
|
+
* @summary List your read content.
|
645
|
+
*/
|
646
|
+
async listPersonRead(form, options) {
|
647
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/read", form, options);
|
648
|
+
}
|
649
|
+
/**
|
650
|
+
* @summary List your hidden content.
|
651
|
+
*/
|
652
|
+
async listPersonHidden(form, options) {
|
653
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/hidden", form, options);
|
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
|
+
}
|
643
661
|
/**
|
644
662
|
* @summary Add an admin to your site.
|
645
663
|
*/
|
@@ -749,10 +767,10 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
|
|
749
767
|
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/community/tag", form, options);
|
750
768
|
}
|
751
769
|
/**
|
752
|
-
* @summary
|
770
|
+
* @summary Edit a community post tag.
|
753
771
|
*/
|
754
772
|
updateCommunityTag(form, options) {
|
755
|
-
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);
|
756
774
|
}
|
757
775
|
/**
|
758
776
|
* @summary Delete a post tag in a community.
|
@@ -797,10 +815,16 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
|
|
797
815
|
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/report/list", form, options);
|
798
816
|
}
|
799
817
|
/**
|
800
|
-
* @summary Block an instance as user.
|
818
|
+
* @summary Block an instance's communities as a user.
|
819
|
+
*/
|
820
|
+
async userBlockInstanceCommunities(form, options) {
|
821
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/block/instance/communities", form, options);
|
822
|
+
}
|
823
|
+
/**
|
824
|
+
* @summary Block an instance's persons as a user.
|
801
825
|
*/
|
802
|
-
async
|
803
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/block/instance", form, options);
|
826
|
+
async userBlockInstancePersons(form, options) {
|
827
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/block/instance/persons", form, options);
|
804
828
|
}
|
805
829
|
/**
|
806
830
|
* @summary Globally block an instance as admin.
|
@@ -841,26 +865,26 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
|
|
841
865
|
/**
|
842
866
|
* @summary Upload new community icon.
|
843
867
|
*/
|
844
|
-
async uploadCommunityIcon(image, options) {
|
845
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m",
|
868
|
+
async uploadCommunityIcon(query, image, options) {
|
869
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_uploadWithQuery).call(this, "/community/icon", query, image, options);
|
846
870
|
}
|
847
871
|
/**
|
848
872
|
* @summary Delete the community icon.
|
849
873
|
*/
|
850
|
-
async deleteCommunityIcon(options) {
|
851
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/community/icon",
|
874
|
+
async deleteCommunityIcon(form, options) {
|
875
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/community/icon", form, options);
|
852
876
|
}
|
853
877
|
/**
|
854
878
|
* @summary Upload new community banner.
|
855
879
|
*/
|
856
|
-
async uploadCommunityBanner(image, options) {
|
857
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m",
|
880
|
+
async uploadCommunityBanner(query, image, options) {
|
881
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_uploadWithQuery).call(this, "/community/banner", query, image, options);
|
858
882
|
}
|
859
883
|
/**
|
860
884
|
* @summary Delete the community banner.
|
861
885
|
*/
|
862
|
-
async deleteCommunityBanner(options) {
|
863
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/community/banner",
|
886
|
+
async deleteCommunityBanner(form, options) {
|
887
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/community/banner", form, options);
|
864
888
|
}
|
865
889
|
/**
|
866
890
|
* @summary Upload new site icon.
|
@@ -900,12 +924,43 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
|
|
900
924
|
}
|
901
925
|
/**
|
902
926
|
* Mark donation dialog as shown, so it isn't displayed anymore.
|
903
|
-
*
|
904
|
-
* `HTTP.POST /user/donation_dialog_shown`
|
905
927
|
*/
|
906
|
-
|
928
|
+
donationDialogShown(options) {
|
907
929
|
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/user/donation_dialog_shown", {}, options);
|
908
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);
|
963
|
+
}
|
909
964
|
/**
|
910
965
|
* Set the headers (can be used to set the auth header)
|
911
966
|
*/
|
@@ -931,6 +986,9 @@ _LemmyHttp_upload = async function _LemmyHttp_upload(path, { image }, options) {
|
|
931
986
|
});
|
932
987
|
return response.json();
|
933
988
|
};
|
989
|
+
_LemmyHttp_uploadWithQuery = async function _LemmyHttp_uploadWithQuery(path, query, { image }, options) {
|
990
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_upload).call(this, `${path}?${encodeGetParams(query)}`, { image }, options);
|
991
|
+
};
|
934
992
|
_LemmyHttp_wrapper = async function _LemmyHttp_wrapper(type_, endpoint, form, options) {
|
935
993
|
let response;
|
936
994
|
if (type_ === HttpType.Get) {
|
@@ -957,10 +1015,11 @@ _LemmyHttp_wrapper = async function _LemmyHttp_wrapper(type_, endpoint, form, op
|
|
957
1015
|
json = await response.json();
|
958
1016
|
}
|
959
1017
|
catch {
|
960
|
-
throw new
|
1018
|
+
throw new LemmyError(response.statusText);
|
961
1019
|
}
|
962
1020
|
if (!response.ok) {
|
963
|
-
|
1021
|
+
let err = new LemmyError(json.error ?? response.statusText, json.message);
|
1022
|
+
throw err;
|
964
1023
|
}
|
965
1024
|
else {
|
966
1025
|
return json;
|
@@ -1241,6 +1300,13 @@ __decorate([
|
|
1241
1300
|
__param(0, (0, runtime_1.Body)()),
|
1242
1301
|
__param(1, (0, runtime_1.Inject)())
|
1243
1302
|
], LemmyHttp.prototype, "editPost", null);
|
1303
|
+
__decorate([
|
1304
|
+
(0, runtime_1.Security)("bearerAuth"),
|
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);
|
1244
1310
|
__decorate([
|
1245
1311
|
(0, runtime_1.Security)("bearerAuth"),
|
1246
1312
|
(0, runtime_1.Post)("/post/delete"),
|
@@ -1368,13 +1434,6 @@ __decorate([
|
|
1368
1434
|
__param(0, (0, runtime_1.Body)()),
|
1369
1435
|
__param(1, (0, runtime_1.Inject)())
|
1370
1436
|
], LemmyHttp.prototype, "removeComment", null);
|
1371
|
-
__decorate([
|
1372
|
-
(0, runtime_1.Security)("bearerAuth"),
|
1373
|
-
(0, runtime_1.Post)("/comment/mark_as_read"),
|
1374
|
-
(0, runtime_1.Tags)("Comment"),
|
1375
|
-
__param(0, (0, runtime_1.Body)()),
|
1376
|
-
__param(1, (0, runtime_1.Inject)())
|
1377
|
-
], LemmyHttp.prototype, "markCommentReplyAsRead", null);
|
1378
1437
|
__decorate([
|
1379
1438
|
(0, runtime_1.Security)("bearerAuth"),
|
1380
1439
|
(0, runtime_1.Post)("/comment/like"),
|
@@ -1519,18 +1578,11 @@ __decorate([
|
|
1519
1578
|
], LemmyHttp.prototype, "listPersonContent", null);
|
1520
1579
|
__decorate([
|
1521
1580
|
(0, runtime_1.Security)("bearerAuth"),
|
1522
|
-
(0, runtime_1.Post)("/
|
1523
|
-
(0, runtime_1.Tags)("
|
1524
|
-
__param(0, (0, runtime_1.Body)()),
|
1525
|
-
__param(1, (0, runtime_1.Inject)())
|
1526
|
-
], LemmyHttp.prototype, "markCommentMentionAsRead", null);
|
1527
|
-
__decorate([
|
1528
|
-
(0, runtime_1.Security)("bearerAuth"),
|
1529
|
-
(0, runtime_1.Post)("/account/mention/post/mark_as_read"),
|
1530
|
-
(0, runtime_1.Tags)("Account", "Post"),
|
1581
|
+
(0, runtime_1.Post)("/person/note"),
|
1582
|
+
(0, runtime_1.Tags)("Person"),
|
1531
1583
|
__param(0, (0, runtime_1.Body)()),
|
1532
1584
|
__param(1, (0, runtime_1.Inject)())
|
1533
|
-
], LemmyHttp.prototype, "
|
1585
|
+
], LemmyHttp.prototype, "notePerson", null);
|
1534
1586
|
__decorate([
|
1535
1587
|
(0, runtime_1.Security)("bearerAuth"),
|
1536
1588
|
(0, runtime_1.Post)("/admin/ban"),
|
@@ -1540,11 +1592,11 @@ __decorate([
|
|
1540
1592
|
], LemmyHttp.prototype, "banPerson", null);
|
1541
1593
|
__decorate([
|
1542
1594
|
(0, runtime_1.Security)("bearerAuth"),
|
1543
|
-
(0, runtime_1.Get)("/admin/
|
1595
|
+
(0, runtime_1.Get)("/admin/users"),
|
1544
1596
|
(0, runtime_1.Tags)("Admin", "Miscellaneous"),
|
1545
1597
|
__param(0, (0, runtime_1.Queries)()),
|
1546
1598
|
__param(1, (0, runtime_1.Inject)())
|
1547
|
-
], LemmyHttp.prototype, "
|
1599
|
+
], LemmyHttp.prototype, "listUsers", null);
|
1548
1600
|
__decorate([
|
1549
1601
|
(0, runtime_1.Security)("bearerAuth"),
|
1550
1602
|
(0, runtime_1.Post)("/account/block/person"),
|
@@ -1584,6 +1636,13 @@ __decorate([
|
|
1584
1636
|
(0, runtime_1.Tags)("Account"),
|
1585
1637
|
__param(0, (0, runtime_1.Inject)())
|
1586
1638
|
], LemmyHttp.prototype, "markAllNotificationsAsRead", null);
|
1639
|
+
__decorate([
|
1640
|
+
(0, runtime_1.Security)("bearerAuth"),
|
1641
|
+
(0, runtime_1.Post)("/account/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);
|
1587
1646
|
__decorate([
|
1588
1647
|
(0, runtime_1.Security)("bearerAuth"),
|
1589
1648
|
(0, runtime_1.Put)("/account/settings/save"),
|
@@ -1613,11 +1672,11 @@ __decorate([
|
|
1613
1672
|
], LemmyHttp.prototype, "getUnreadCount", null);
|
1614
1673
|
__decorate([
|
1615
1674
|
(0, runtime_1.Security)("bearerAuth"),
|
1616
|
-
(0, runtime_1.Get)("/account/
|
1675
|
+
(0, runtime_1.Get)("/account/notifications"),
|
1617
1676
|
(0, runtime_1.Tags)("Account"),
|
1618
1677
|
__param(0, (0, runtime_1.Queries)()),
|
1619
1678
|
__param(1, (0, runtime_1.Inject)())
|
1620
|
-
], LemmyHttp.prototype, "
|
1679
|
+
], LemmyHttp.prototype, "listNotifications", null);
|
1621
1680
|
__decorate([
|
1622
1681
|
(0, runtime_1.Post)("/account/auth/verify_email"),
|
1623
1682
|
(0, runtime_1.Tags)("Account"),
|
@@ -1637,6 +1696,27 @@ __decorate([
|
|
1637
1696
|
__param(0, (0, runtime_1.Queries)()),
|
1638
1697
|
__param(1, (0, runtime_1.Inject)())
|
1639
1698
|
], LemmyHttp.prototype, "listPersonSaved", null);
|
1699
|
+
__decorate([
|
1700
|
+
(0, runtime_1.Security)("bearerAuth"),
|
1701
|
+
(0, runtime_1.Get)("/account/read"),
|
1702
|
+
(0, runtime_1.Tags)("Account"),
|
1703
|
+
__param(0, (0, runtime_1.Queries)()),
|
1704
|
+
__param(1, (0, runtime_1.Inject)())
|
1705
|
+
], LemmyHttp.prototype, "listPersonRead", null);
|
1706
|
+
__decorate([
|
1707
|
+
(0, runtime_1.Security)("bearerAuth"),
|
1708
|
+
(0, runtime_1.Get)("/account/hidden"),
|
1709
|
+
(0, runtime_1.Tags)("Account"),
|
1710
|
+
__param(0, (0, runtime_1.Queries)()),
|
1711
|
+
__param(1, (0, runtime_1.Inject)())
|
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);
|
1640
1720
|
__decorate([
|
1641
1721
|
(0, runtime_1.Security)("bearerAuth"),
|
1642
1722
|
(0, runtime_1.Post)("/admin/add"),
|
@@ -1820,11 +1900,18 @@ __decorate([
|
|
1820
1900
|
], LemmyHttp.prototype, "listReports", null);
|
1821
1901
|
__decorate([
|
1822
1902
|
(0, runtime_1.Security)("bearerAuth"),
|
1823
|
-
(0, runtime_1.Post)("/account/block/instance"),
|
1824
|
-
(0, runtime_1.Tags)("Account"),
|
1903
|
+
(0, runtime_1.Post)("/account/block/instance/communities"),
|
1904
|
+
(0, runtime_1.Tags)("Account", "Community"),
|
1825
1905
|
__param(0, (0, runtime_1.Body)()),
|
1826
1906
|
__param(1, (0, runtime_1.Inject)())
|
1827
|
-
], LemmyHttp.prototype, "
|
1907
|
+
], LemmyHttp.prototype, "userBlockInstanceCommunities", null);
|
1908
|
+
__decorate([
|
1909
|
+
(0, runtime_1.Security)("bearerAuth"),
|
1910
|
+
(0, runtime_1.Post)("/account/block/instance/persons"),
|
1911
|
+
(0, runtime_1.Tags)("Account", "Person"),
|
1912
|
+
__param(0, (0, runtime_1.Body)()),
|
1913
|
+
__param(1, (0, runtime_1.Inject)())
|
1914
|
+
], LemmyHttp.prototype, "userBlockInstancePersons", null);
|
1828
1915
|
__decorate([
|
1829
1916
|
(0, runtime_1.Security)("bearerAuth"),
|
1830
1917
|
(0, runtime_1.Post)("/admin/instance/block"),
|
@@ -1869,27 +1956,31 @@ __decorate([
|
|
1869
1956
|
(0, runtime_1.Security)("bearerAuth"),
|
1870
1957
|
(0, runtime_1.Post)("/community/icon"),
|
1871
1958
|
(0, runtime_1.Tags)("Community", "Media"),
|
1872
|
-
__param(0, (0, runtime_1.
|
1873
|
-
__param(1, (0, runtime_1.
|
1959
|
+
__param(0, (0, runtime_1.Queries)()),
|
1960
|
+
__param(1, (0, runtime_1.UploadedFile)()),
|
1961
|
+
__param(2, (0, runtime_1.Inject)())
|
1874
1962
|
], LemmyHttp.prototype, "uploadCommunityIcon", null);
|
1875
1963
|
__decorate([
|
1876
1964
|
(0, runtime_1.Security)("bearerAuth"),
|
1877
1965
|
(0, runtime_1.Delete)("/community/icon"),
|
1878
1966
|
(0, runtime_1.Tags)("Community", "Media"),
|
1879
|
-
__param(0, (0, runtime_1.
|
1967
|
+
__param(0, (0, runtime_1.Body)()),
|
1968
|
+
__param(1, (0, runtime_1.Inject)())
|
1880
1969
|
], LemmyHttp.prototype, "deleteCommunityIcon", null);
|
1881
1970
|
__decorate([
|
1882
1971
|
(0, runtime_1.Security)("bearerAuth"),
|
1883
1972
|
(0, runtime_1.Post)("/community/banner"),
|
1884
1973
|
(0, runtime_1.Tags)("Community", "Media"),
|
1885
|
-
__param(0, (0, runtime_1.
|
1886
|
-
__param(1, (0, runtime_1.
|
1974
|
+
__param(0, (0, runtime_1.Queries)()),
|
1975
|
+
__param(1, (0, runtime_1.UploadedFile)()),
|
1976
|
+
__param(2, (0, runtime_1.Inject)())
|
1887
1977
|
], LemmyHttp.prototype, "uploadCommunityBanner", null);
|
1888
1978
|
__decorate([
|
1889
1979
|
(0, runtime_1.Security)("bearerAuth"),
|
1890
1980
|
(0, runtime_1.Delete)("/community/banner"),
|
1891
1981
|
(0, runtime_1.Tags)("Community", "Media"),
|
1892
|
-
__param(0, (0, runtime_1.
|
1982
|
+
__param(0, (0, runtime_1.Body)()),
|
1983
|
+
__param(1, (0, runtime_1.Inject)())
|
1893
1984
|
], LemmyHttp.prototype, "deleteCommunityBanner", null);
|
1894
1985
|
__decorate([
|
1895
1986
|
(0, runtime_1.Security)("bearerAuth"),
|
@@ -1930,8 +2021,71 @@ __decorate([
|
|
1930
2021
|
__param(0, (0, runtime_1.Inject)())
|
1931
2022
|
], LemmyHttp.prototype, "imageHealth", null);
|
1932
2023
|
__decorate([
|
2024
|
+
(0, runtime_1.Security)("bearerAuth"),
|
2025
|
+
(0, runtime_1.Post)("/user/donation_dialog_shown"),
|
2026
|
+
(0, runtime_1.Tags)("Miscellaneous"),
|
1933
2027
|
__param(0, (0, runtime_1.Inject)())
|
1934
|
-
], LemmyHttp.prototype, "
|
2028
|
+
], LemmyHttp.prototype, "donationDialogShown", null);
|
2029
|
+
__decorate([
|
2030
|
+
(0, runtime_1.Security)("bearerAuth"),
|
2031
|
+
(0, runtime_1.Post)("/multi_community"),
|
2032
|
+
(0, runtime_1.Tags)("Multicommunity"),
|
2033
|
+
__param(0, (0, runtime_1.Body)()),
|
2034
|
+
__param(1, (0, runtime_1.Inject)())
|
2035
|
+
], LemmyHttp.prototype, "createMultiCommunity", null);
|
2036
|
+
__decorate([
|
2037
|
+
(0, runtime_1.Security)("bearerAuth"),
|
2038
|
+
(0, runtime_1.Put)("/multi_community"),
|
2039
|
+
(0, runtime_1.Tags)("Multicommunity"),
|
2040
|
+
__param(0, (0, runtime_1.Body)()),
|
2041
|
+
__param(1, (0, runtime_1.Inject)())
|
2042
|
+
], LemmyHttp.prototype, "updateMultiCommunity", null);
|
2043
|
+
__decorate([
|
2044
|
+
(0, runtime_1.Get)("/multi_community"),
|
2045
|
+
(0, runtime_1.Tags)("Multicommunity"),
|
2046
|
+
__param(0, (0, runtime_1.Queries)()),
|
2047
|
+
__param(1, (0, runtime_1.Inject)())
|
2048
|
+
], LemmyHttp.prototype, "getMultiCommunity", null);
|
2049
|
+
__decorate([
|
2050
|
+
(0, runtime_1.Security)("bearerAuth"),
|
2051
|
+
(0, runtime_1.Post)("/multi_community/entry"),
|
2052
|
+
(0, runtime_1.Tags)("Multicommunity"),
|
2053
|
+
__param(0, (0, runtime_1.Body)()),
|
2054
|
+
__param(1, (0, runtime_1.Inject)())
|
2055
|
+
], LemmyHttp.prototype, "createMultiCommunityEntry", null);
|
2056
|
+
__decorate([
|
2057
|
+
(0, runtime_1.Security)("bearerAuth"),
|
2058
|
+
(0, runtime_1.Delete)("/multi_community/entry"),
|
2059
|
+
(0, runtime_1.Tags)("Multicommunity"),
|
2060
|
+
__param(0, (0, runtime_1.Body)()),
|
2061
|
+
__param(1, (0, runtime_1.Inject)())
|
2062
|
+
], LemmyHttp.prototype, "deleteMultiCommunityEntry", null);
|
2063
|
+
__decorate([
|
2064
|
+
(0, runtime_1.Get)("/multi_community/list"),
|
2065
|
+
(0, runtime_1.Tags)("Multicommunity"),
|
2066
|
+
__param(0, (0, runtime_1.Queries)()),
|
2067
|
+
__param(1, (0, runtime_1.Inject)())
|
2068
|
+
], LemmyHttp.prototype, "listMultiCommunities", null);
|
2069
|
+
__decorate([
|
2070
|
+
(0, runtime_1.Post)("/multi_community/follow"),
|
2071
|
+
(0, runtime_1.Tags)("Multicommunity"),
|
2072
|
+
__param(0, (0, runtime_1.Body)()),
|
2073
|
+
__param(1, (0, runtime_1.Inject)())
|
2074
|
+
], LemmyHttp.prototype, "followMultiCommunity", null);
|
2075
|
+
__decorate([
|
2076
|
+
(0, runtime_1.Security)("bearerAuth"),
|
2077
|
+
(0, runtime_1.Put)("/community/notifications"),
|
2078
|
+
(0, runtime_1.Tags)("Community"),
|
2079
|
+
__param(0, (0, runtime_1.Body)()),
|
2080
|
+
__param(1, (0, runtime_1.Inject)())
|
2081
|
+
], LemmyHttp.prototype, "updateCommunityNotifications", null);
|
2082
|
+
__decorate([
|
2083
|
+
(0, runtime_1.Security)("bearerAuth"),
|
2084
|
+
(0, runtime_1.Put)("/post/notifications"),
|
2085
|
+
(0, runtime_1.Tags)("Post"),
|
2086
|
+
__param(0, (0, runtime_1.Body)()),
|
2087
|
+
__param(1, (0, runtime_1.Inject)())
|
2088
|
+
], LemmyHttp.prototype, "updatePostNotifications", null);
|
1935
2089
|
exports.LemmyHttp = LemmyHttp = __decorate([
|
1936
2090
|
(0, runtime_1.Route)("api/v4")
|
1937
2091
|
], LemmyHttp);
|
@@ -1952,3 +2106,18 @@ function createFormData(image) {
|
|
1952
2106
|
}
|
1953
2107
|
return formData;
|
1954
2108
|
}
|
2109
|
+
/**
|
2110
|
+
* A Lemmy error type.
|
2111
|
+
*
|
2112
|
+
* The name is the i18n translatable error code.
|
2113
|
+
* The msg is either an empty string, or extra non-translatable info.
|
2114
|
+
*/
|
2115
|
+
class LemmyError extends Error {
|
2116
|
+
constructor(name, msg) {
|
2117
|
+
super(msg ?? "");
|
2118
|
+
this.name = name;
|
2119
|
+
// Set the prototype explicitly.
|
2120
|
+
Object.setPrototypeOf(this, LemmyError.prototype);
|
2121
|
+
}
|
2122
|
+
}
|
2123
|
+
exports.LemmyError = LemmyError;
|