lemmy-js-client 1.0.0-alpha.1 → 1.0.0-comment-lock.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 +92 -36
- package/dist/http.js +248 -66
- package/dist/index.d.ts +48 -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 +6 -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/LockComment.d.ts +6 -0
- package/dist/types/LockComment.js +2 -0
- 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/ModLockComment.d.ts +14 -0
- package/dist/types/ModLockComment.js +2 -0
- package/dist/types/ModLockCommentId.d.ts +1 -0
- package/dist/types/ModLockCommentView.d.ts +14 -0
- package/dist/types/ModLockCommentView.js +2 -0
- 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/ModlogCombinedView.d.ts +4 -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/MultiCommunityId.js +3 -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 +6 -5
- 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 → ModLockCommentId.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);
|
@@ -268,6 +268,18 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
|
|
268
268
|
async getRandomCommunity(form, options) {
|
269
269
|
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/community/random", form, options);
|
270
270
|
}
|
271
|
+
/**
|
272
|
+
* @summary Create a report for a community.
|
273
|
+
*/
|
274
|
+
async createCommunityReport(form, options) {
|
275
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/community/report", form, options);
|
276
|
+
}
|
277
|
+
/**
|
278
|
+
* @summary Resolve a report for a private message.
|
279
|
+
*/
|
280
|
+
async resolveCommunityReport(form, options) {
|
281
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/community/report/resolve", form, options);
|
282
|
+
}
|
271
283
|
/**
|
272
284
|
* @summary Create a post.
|
273
285
|
*/
|
@@ -286,6 +298,12 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
|
|
286
298
|
async editPost(form, options) {
|
287
299
|
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/post", form, options);
|
288
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
|
+
}
|
289
307
|
/**
|
290
308
|
* @summary Delete a post.
|
291
309
|
*/
|
@@ -395,13 +413,13 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
|
|
395
413
|
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/comment/remove", form, options);
|
396
414
|
}
|
397
415
|
/**
|
398
|
-
* @summary
|
416
|
+
* @summary A moderator can lock a comment (IE disable replies).
|
399
417
|
*/
|
400
|
-
async
|
401
|
-
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);
|
402
420
|
}
|
403
421
|
/**
|
404
|
-
* @
|
422
|
+
* @Summary Like / vote on a comment.
|
405
423
|
*/
|
406
424
|
async likeComment(form, options) {
|
407
425
|
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/comment/like", form, options);
|
@@ -521,16 +539,10 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
|
|
521
539
|
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/person/content", form, options);
|
522
540
|
}
|
523
541
|
/**
|
524
|
-
* @summary
|
525
|
-
*/
|
526
|
-
async markCommentMentionAsRead(form, options) {
|
527
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/mention/comment/mark_as_read", form, options);
|
528
|
-
}
|
529
|
-
/**
|
530
|
-
* @summary Mark a person post body mention as read.
|
542
|
+
* @summary Make a note for a person.
|
531
543
|
*/
|
532
|
-
async
|
533
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/
|
544
|
+
async notePerson(form, options) {
|
545
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/person/note", form, options);
|
534
546
|
}
|
535
547
|
/**
|
536
548
|
* @summary Ban a person from your site.
|
@@ -539,10 +551,10 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
|
|
539
551
|
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/admin/ban", form, options);
|
540
552
|
}
|
541
553
|
/**
|
542
|
-
* @summary Get a list of
|
554
|
+
* @summary Get a list of users.
|
543
555
|
*/
|
544
|
-
async
|
545
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/admin/
|
556
|
+
async listUsers(form = {}, options) {
|
557
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/admin/users", form, options);
|
546
558
|
}
|
547
559
|
/**
|
548
560
|
* @summary Block a person.
|
@@ -580,6 +592,12 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
|
|
580
592
|
async markAllNotificationsAsRead(options) {
|
581
593
|
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/mark_as_read/all", {}, options);
|
582
594
|
}
|
595
|
+
/**
|
596
|
+
* @summary Mark a comment as read.
|
597
|
+
*/
|
598
|
+
async markNotificationAsRead(form, options) {
|
599
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/mark_as_read", form, options);
|
600
|
+
}
|
583
601
|
/**
|
584
602
|
* @summary Save your user settings.
|
585
603
|
*/
|
@@ -607,8 +625,8 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
|
|
607
625
|
/**
|
608
626
|
* @summary Get your inbox (replies, comment mentions, post mentions, and messages)
|
609
627
|
*/
|
610
|
-
async
|
611
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/
|
628
|
+
async listNotifications(form, options) {
|
629
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/notifications", form, options);
|
612
630
|
}
|
613
631
|
/**
|
614
632
|
* @summary Verify your email
|
@@ -628,6 +646,24 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
|
|
628
646
|
async listPersonSaved(form, options) {
|
629
647
|
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/saved", form, options);
|
630
648
|
}
|
649
|
+
/**
|
650
|
+
* @summary List your read content.
|
651
|
+
*/
|
652
|
+
async listPersonRead(form, options) {
|
653
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/read", form, options);
|
654
|
+
}
|
655
|
+
/**
|
656
|
+
* @summary List your hidden content.
|
657
|
+
*/
|
658
|
+
async listPersonHidden(form, options) {
|
659
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/hidden", form, options);
|
660
|
+
}
|
661
|
+
/**
|
662
|
+
* @summary List your liked content.
|
663
|
+
*/
|
664
|
+
async listPersonLiked(form, options) {
|
665
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/liked", form, options);
|
666
|
+
}
|
631
667
|
/**
|
632
668
|
* @summary Add an admin to your site.
|
633
669
|
*/
|
@@ -737,10 +773,10 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
|
|
737
773
|
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/community/tag", form, options);
|
738
774
|
}
|
739
775
|
/**
|
740
|
-
* @summary
|
776
|
+
* @summary Edit a community post tag.
|
741
777
|
*/
|
742
778
|
updateCommunityTag(form, options) {
|
743
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.
|
779
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/community/tag", form, options);
|
744
780
|
}
|
745
781
|
/**
|
746
782
|
* @summary Delete a post tag in a community.
|
@@ -785,10 +821,16 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
|
|
785
821
|
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/report/list", form, options);
|
786
822
|
}
|
787
823
|
/**
|
788
|
-
* @summary Block an instance as user.
|
824
|
+
* @summary Block an instance's communities as a user.
|
825
|
+
*/
|
826
|
+
async userBlockInstanceCommunities(form, options) {
|
827
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/block/instance/communities", form, options);
|
828
|
+
}
|
829
|
+
/**
|
830
|
+
* @summary Block an instance's persons as a user.
|
789
831
|
*/
|
790
|
-
async
|
791
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/block/instance", form, options);
|
832
|
+
async userBlockInstancePersons(form, options) {
|
833
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/block/instance/persons", form, options);
|
792
834
|
}
|
793
835
|
/**
|
794
836
|
* @summary Globally block an instance as admin.
|
@@ -829,26 +871,26 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
|
|
829
871
|
/**
|
830
872
|
* @summary Upload new community icon.
|
831
873
|
*/
|
832
|
-
async uploadCommunityIcon(image, options) {
|
833
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m",
|
874
|
+
async uploadCommunityIcon(query, image, options) {
|
875
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_uploadWithQuery).call(this, "/community/icon", query, image, options);
|
834
876
|
}
|
835
877
|
/**
|
836
878
|
* @summary Delete the community icon.
|
837
879
|
*/
|
838
|
-
async deleteCommunityIcon(options) {
|
839
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/community/icon",
|
880
|
+
async deleteCommunityIcon(form, options) {
|
881
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/community/icon", form, options);
|
840
882
|
}
|
841
883
|
/**
|
842
884
|
* @summary Upload new community banner.
|
843
885
|
*/
|
844
|
-
async uploadCommunityBanner(image, options) {
|
845
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m",
|
886
|
+
async uploadCommunityBanner(query, image, options) {
|
887
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_uploadWithQuery).call(this, "/community/banner", query, image, options);
|
846
888
|
}
|
847
889
|
/**
|
848
890
|
* @summary Delete the community banner.
|
849
891
|
*/
|
850
|
-
async deleteCommunityBanner(options) {
|
851
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/community/banner",
|
892
|
+
async deleteCommunityBanner(form, options) {
|
893
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/community/banner", form, options);
|
852
894
|
}
|
853
895
|
/**
|
854
896
|
* @summary Upload new site icon.
|
@@ -888,12 +930,31 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
|
|
888
930
|
}
|
889
931
|
/**
|
890
932
|
* Mark donation dialog as shown, so it isn't displayed anymore.
|
891
|
-
*
|
892
|
-
* `HTTP.POST /user/donation_dialog_shown`
|
893
933
|
*/
|
894
|
-
|
934
|
+
donationDialogShown(options) {
|
895
935
|
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/user/donation_dialog_shown", {}, options);
|
896
936
|
}
|
937
|
+
createMultiCommunity(form, options) {
|
938
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/multi_community", form, options);
|
939
|
+
}
|
940
|
+
updateMultiCommunity(form, options) {
|
941
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/multi_community", form, options);
|
942
|
+
}
|
943
|
+
getMultiCommunity(form, options) {
|
944
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/multi_community", form, options);
|
945
|
+
}
|
946
|
+
createMultiCommunityEntry(form, options) {
|
947
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/multi_community/entry", form, options);
|
948
|
+
}
|
949
|
+
deleteMultiCommunityEntry(form, options) {
|
950
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/multi_community/entry", form, options);
|
951
|
+
}
|
952
|
+
listMultiCommunities(form, options) {
|
953
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/multi_community/list", form, options);
|
954
|
+
}
|
955
|
+
followMultiCommunity(form, options) {
|
956
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/multi_community/follow", form, options);
|
957
|
+
}
|
897
958
|
/**
|
898
959
|
* Set the headers (can be used to set the auth header)
|
899
960
|
*/
|
@@ -919,6 +980,9 @@ _LemmyHttp_upload = async function _LemmyHttp_upload(path, { image }, options) {
|
|
919
980
|
});
|
920
981
|
return response.json();
|
921
982
|
};
|
983
|
+
_LemmyHttp_uploadWithQuery = async function _LemmyHttp_uploadWithQuery(path, query, { image }, options) {
|
984
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_upload).call(this, `${path}?${encodeGetParams(query)}`, { image }, options);
|
985
|
+
};
|
922
986
|
_LemmyHttp_wrapper = async function _LemmyHttp_wrapper(type_, endpoint, form, options) {
|
923
987
|
let response;
|
924
988
|
if (type_ === HttpType.Get) {
|
@@ -945,10 +1009,11 @@ _LemmyHttp_wrapper = async function _LemmyHttp_wrapper(type_, endpoint, form, op
|
|
945
1009
|
json = await response.json();
|
946
1010
|
}
|
947
1011
|
catch {
|
948
|
-
throw new
|
1012
|
+
throw new LemmyError(response.statusText);
|
949
1013
|
}
|
950
1014
|
if (!response.ok) {
|
951
|
-
|
1015
|
+
let err = new LemmyError(json.error ?? response.statusText, json.message);
|
1016
|
+
throw err;
|
952
1017
|
}
|
953
1018
|
else {
|
954
1019
|
return json;
|
@@ -1193,6 +1258,20 @@ __decorate([
|
|
1193
1258
|
__param(0, (0, runtime_1.Queries)()),
|
1194
1259
|
__param(1, (0, runtime_1.Inject)())
|
1195
1260
|
], LemmyHttp.prototype, "getRandomCommunity", null);
|
1261
|
+
__decorate([
|
1262
|
+
(0, runtime_1.Security)("bearerAuth"),
|
1263
|
+
(0, runtime_1.Post)("/community/report"),
|
1264
|
+
(0, runtime_1.Tags)("Community"),
|
1265
|
+
__param(0, (0, runtime_1.Body)()),
|
1266
|
+
__param(1, (0, runtime_1.Inject)())
|
1267
|
+
], LemmyHttp.prototype, "createCommunityReport", null);
|
1268
|
+
__decorate([
|
1269
|
+
(0, runtime_1.Security)("bearerAuth"),
|
1270
|
+
(0, runtime_1.Put)("/community/report/resolve"),
|
1271
|
+
(0, runtime_1.Tags)("Community", "Admin"),
|
1272
|
+
__param(0, (0, runtime_1.Body)()),
|
1273
|
+
__param(1, (0, runtime_1.Inject)())
|
1274
|
+
], LemmyHttp.prototype, "resolveCommunityReport", null);
|
1196
1275
|
__decorate([
|
1197
1276
|
(0, runtime_1.Security)("bearerAuth"),
|
1198
1277
|
(0, runtime_1.Post)("/post"),
|
@@ -1215,6 +1294,13 @@ __decorate([
|
|
1215
1294
|
__param(0, (0, runtime_1.Body)()),
|
1216
1295
|
__param(1, (0, runtime_1.Inject)())
|
1217
1296
|
], LemmyHttp.prototype, "editPost", null);
|
1297
|
+
__decorate([
|
1298
|
+
(0, runtime_1.Security)("bearerAuth"),
|
1299
|
+
(0, runtime_1.Put)("/post/mod_update"),
|
1300
|
+
(0, runtime_1.Tags)("Post"),
|
1301
|
+
__param(0, (0, runtime_1.Body)()),
|
1302
|
+
__param(1, (0, runtime_1.Inject)())
|
1303
|
+
], LemmyHttp.prototype, "modEditPost", null);
|
1218
1304
|
__decorate([
|
1219
1305
|
(0, runtime_1.Security)("bearerAuth"),
|
1220
1306
|
(0, runtime_1.Post)("/post/delete"),
|
@@ -1344,11 +1430,11 @@ __decorate([
|
|
1344
1430
|
], LemmyHttp.prototype, "removeComment", null);
|
1345
1431
|
__decorate([
|
1346
1432
|
(0, runtime_1.Security)("bearerAuth"),
|
1347
|
-
(0, runtime_1.Post)("/comment/
|
1348
|
-
(0, runtime_1.Tags)("Comment"),
|
1433
|
+
(0, runtime_1.Post)("/comment/lock"),
|
1434
|
+
(0, runtime_1.Tags)("Comment", "Moderator"),
|
1349
1435
|
__param(0, (0, runtime_1.Body)()),
|
1350
1436
|
__param(1, (0, runtime_1.Inject)())
|
1351
|
-
], LemmyHttp.prototype, "
|
1437
|
+
], LemmyHttp.prototype, "lockComment", null);
|
1352
1438
|
__decorate([
|
1353
1439
|
(0, runtime_1.Security)("bearerAuth"),
|
1354
1440
|
(0, runtime_1.Post)("/comment/like"),
|
@@ -1493,18 +1579,11 @@ __decorate([
|
|
1493
1579
|
], LemmyHttp.prototype, "listPersonContent", null);
|
1494
1580
|
__decorate([
|
1495
1581
|
(0, runtime_1.Security)("bearerAuth"),
|
1496
|
-
(0, runtime_1.Post)("/
|
1497
|
-
(0, runtime_1.Tags)("
|
1498
|
-
__param(0, (0, runtime_1.Body)()),
|
1499
|
-
__param(1, (0, runtime_1.Inject)())
|
1500
|
-
], LemmyHttp.prototype, "markCommentMentionAsRead", null);
|
1501
|
-
__decorate([
|
1502
|
-
(0, runtime_1.Security)("bearerAuth"),
|
1503
|
-
(0, runtime_1.Post)("/account/mention/post/mark_as_read"),
|
1504
|
-
(0, runtime_1.Tags)("Account", "Post"),
|
1582
|
+
(0, runtime_1.Post)("/person/note"),
|
1583
|
+
(0, runtime_1.Tags)("Person"),
|
1505
1584
|
__param(0, (0, runtime_1.Body)()),
|
1506
1585
|
__param(1, (0, runtime_1.Inject)())
|
1507
|
-
], LemmyHttp.prototype, "
|
1586
|
+
], LemmyHttp.prototype, "notePerson", null);
|
1508
1587
|
__decorate([
|
1509
1588
|
(0, runtime_1.Security)("bearerAuth"),
|
1510
1589
|
(0, runtime_1.Post)("/admin/ban"),
|
@@ -1514,11 +1593,11 @@ __decorate([
|
|
1514
1593
|
], LemmyHttp.prototype, "banPerson", null);
|
1515
1594
|
__decorate([
|
1516
1595
|
(0, runtime_1.Security)("bearerAuth"),
|
1517
|
-
(0, runtime_1.Get)("/admin/
|
1596
|
+
(0, runtime_1.Get)("/admin/users"),
|
1518
1597
|
(0, runtime_1.Tags)("Admin", "Miscellaneous"),
|
1519
1598
|
__param(0, (0, runtime_1.Queries)()),
|
1520
1599
|
__param(1, (0, runtime_1.Inject)())
|
1521
|
-
], LemmyHttp.prototype, "
|
1600
|
+
], LemmyHttp.prototype, "listUsers", null);
|
1522
1601
|
__decorate([
|
1523
1602
|
(0, runtime_1.Security)("bearerAuth"),
|
1524
1603
|
(0, runtime_1.Post)("/account/block/person"),
|
@@ -1558,6 +1637,13 @@ __decorate([
|
|
1558
1637
|
(0, runtime_1.Tags)("Account"),
|
1559
1638
|
__param(0, (0, runtime_1.Inject)())
|
1560
1639
|
], LemmyHttp.prototype, "markAllNotificationsAsRead", null);
|
1640
|
+
__decorate([
|
1641
|
+
(0, runtime_1.Security)("bearerAuth"),
|
1642
|
+
(0, runtime_1.Post)("/account/mark_as_read"),
|
1643
|
+
(0, runtime_1.Tags)("Account"),
|
1644
|
+
__param(0, (0, runtime_1.Body)()),
|
1645
|
+
__param(1, (0, runtime_1.Inject)())
|
1646
|
+
], LemmyHttp.prototype, "markNotificationAsRead", null);
|
1561
1647
|
__decorate([
|
1562
1648
|
(0, runtime_1.Security)("bearerAuth"),
|
1563
1649
|
(0, runtime_1.Put)("/account/settings/save"),
|
@@ -1587,11 +1673,11 @@ __decorate([
|
|
1587
1673
|
], LemmyHttp.prototype, "getUnreadCount", null);
|
1588
1674
|
__decorate([
|
1589
1675
|
(0, runtime_1.Security)("bearerAuth"),
|
1590
|
-
(0, runtime_1.Get)("/account/
|
1676
|
+
(0, runtime_1.Get)("/account/notifications"),
|
1591
1677
|
(0, runtime_1.Tags)("Account"),
|
1592
1678
|
__param(0, (0, runtime_1.Queries)()),
|
1593
1679
|
__param(1, (0, runtime_1.Inject)())
|
1594
|
-
], LemmyHttp.prototype, "
|
1680
|
+
], LemmyHttp.prototype, "listNotifications", null);
|
1595
1681
|
__decorate([
|
1596
1682
|
(0, runtime_1.Post)("/account/auth/verify_email"),
|
1597
1683
|
(0, runtime_1.Tags)("Account"),
|
@@ -1611,6 +1697,27 @@ __decorate([
|
|
1611
1697
|
__param(0, (0, runtime_1.Queries)()),
|
1612
1698
|
__param(1, (0, runtime_1.Inject)())
|
1613
1699
|
], LemmyHttp.prototype, "listPersonSaved", null);
|
1700
|
+
__decorate([
|
1701
|
+
(0, runtime_1.Security)("bearerAuth"),
|
1702
|
+
(0, runtime_1.Get)("/account/read"),
|
1703
|
+
(0, runtime_1.Tags)("Account"),
|
1704
|
+
__param(0, (0, runtime_1.Queries)()),
|
1705
|
+
__param(1, (0, runtime_1.Inject)())
|
1706
|
+
], LemmyHttp.prototype, "listPersonRead", null);
|
1707
|
+
__decorate([
|
1708
|
+
(0, runtime_1.Security)("bearerAuth"),
|
1709
|
+
(0, runtime_1.Get)("/account/hidden"),
|
1710
|
+
(0, runtime_1.Tags)("Account"),
|
1711
|
+
__param(0, (0, runtime_1.Queries)()),
|
1712
|
+
__param(1, (0, runtime_1.Inject)())
|
1713
|
+
], LemmyHttp.prototype, "listPersonHidden", null);
|
1714
|
+
__decorate([
|
1715
|
+
(0, runtime_1.Security)("bearerAuth"),
|
1716
|
+
(0, runtime_1.Get)("/account/liked"),
|
1717
|
+
(0, runtime_1.Tags)("Account"),
|
1718
|
+
__param(0, (0, runtime_1.Queries)()),
|
1719
|
+
__param(1, (0, runtime_1.Inject)())
|
1720
|
+
], LemmyHttp.prototype, "listPersonLiked", null);
|
1614
1721
|
__decorate([
|
1615
1722
|
(0, runtime_1.Security)("bearerAuth"),
|
1616
1723
|
(0, runtime_1.Post)("/admin/add"),
|
@@ -1794,11 +1901,18 @@ __decorate([
|
|
1794
1901
|
], LemmyHttp.prototype, "listReports", null);
|
1795
1902
|
__decorate([
|
1796
1903
|
(0, runtime_1.Security)("bearerAuth"),
|
1797
|
-
(0, runtime_1.Post)("/account/block/instance"),
|
1798
|
-
(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"),
|
1799
1913
|
__param(0, (0, runtime_1.Body)()),
|
1800
1914
|
__param(1, (0, runtime_1.Inject)())
|
1801
|
-
], LemmyHttp.prototype, "
|
1915
|
+
], LemmyHttp.prototype, "userBlockInstancePersons", null);
|
1802
1916
|
__decorate([
|
1803
1917
|
(0, runtime_1.Security)("bearerAuth"),
|
1804
1918
|
(0, runtime_1.Post)("/admin/instance/block"),
|
@@ -1843,27 +1957,31 @@ __decorate([
|
|
1843
1957
|
(0, runtime_1.Security)("bearerAuth"),
|
1844
1958
|
(0, runtime_1.Post)("/community/icon"),
|
1845
1959
|
(0, runtime_1.Tags)("Community", "Media"),
|
1846
|
-
__param(0, (0, runtime_1.
|
1847
|
-
__param(1, (0, runtime_1.
|
1960
|
+
__param(0, (0, runtime_1.Queries)()),
|
1961
|
+
__param(1, (0, runtime_1.UploadedFile)()),
|
1962
|
+
__param(2, (0, runtime_1.Inject)())
|
1848
1963
|
], LemmyHttp.prototype, "uploadCommunityIcon", null);
|
1849
1964
|
__decorate([
|
1850
1965
|
(0, runtime_1.Security)("bearerAuth"),
|
1851
1966
|
(0, runtime_1.Delete)("/community/icon"),
|
1852
1967
|
(0, runtime_1.Tags)("Community", "Media"),
|
1853
|
-
__param(0, (0, runtime_1.
|
1968
|
+
__param(0, (0, runtime_1.Body)()),
|
1969
|
+
__param(1, (0, runtime_1.Inject)())
|
1854
1970
|
], LemmyHttp.prototype, "deleteCommunityIcon", null);
|
1855
1971
|
__decorate([
|
1856
1972
|
(0, runtime_1.Security)("bearerAuth"),
|
1857
1973
|
(0, runtime_1.Post)("/community/banner"),
|
1858
1974
|
(0, runtime_1.Tags)("Community", "Media"),
|
1859
|
-
__param(0, (0, runtime_1.
|
1860
|
-
__param(1, (0, runtime_1.
|
1975
|
+
__param(0, (0, runtime_1.Queries)()),
|
1976
|
+
__param(1, (0, runtime_1.UploadedFile)()),
|
1977
|
+
__param(2, (0, runtime_1.Inject)())
|
1861
1978
|
], LemmyHttp.prototype, "uploadCommunityBanner", null);
|
1862
1979
|
__decorate([
|
1863
1980
|
(0, runtime_1.Security)("bearerAuth"),
|
1864
1981
|
(0, runtime_1.Delete)("/community/banner"),
|
1865
1982
|
(0, runtime_1.Tags)("Community", "Media"),
|
1866
|
-
__param(0, (0, runtime_1.
|
1983
|
+
__param(0, (0, runtime_1.Body)()),
|
1984
|
+
__param(1, (0, runtime_1.Inject)())
|
1867
1985
|
], LemmyHttp.prototype, "deleteCommunityBanner", null);
|
1868
1986
|
__decorate([
|
1869
1987
|
(0, runtime_1.Security)("bearerAuth"),
|
@@ -1904,8 +2022,57 @@ __decorate([
|
|
1904
2022
|
__param(0, (0, runtime_1.Inject)())
|
1905
2023
|
], LemmyHttp.prototype, "imageHealth", null);
|
1906
2024
|
__decorate([
|
2025
|
+
(0, runtime_1.Security)("bearerAuth"),
|
2026
|
+
(0, runtime_1.Post)("/user/donation_dialog_shown"),
|
2027
|
+
(0, runtime_1.Tags)("Miscellaneous"),
|
1907
2028
|
__param(0, (0, runtime_1.Inject)())
|
1908
|
-
], 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);
|
1909
2076
|
exports.LemmyHttp = LemmyHttp = __decorate([
|
1910
2077
|
(0, runtime_1.Route)("api/v4")
|
1911
2078
|
], LemmyHttp);
|
@@ -1926,3 +2093,18 @@ function createFormData(image) {
|
|
1926
2093
|
}
|
1927
2094
|
return formData;
|
1928
2095
|
}
|
2096
|
+
/**
|
2097
|
+
* A Lemmy error type.
|
2098
|
+
*
|
2099
|
+
* The name is the i18n translatable error code.
|
2100
|
+
* The msg is either an empty string, or extra non-translatable info.
|
2101
|
+
*/
|
2102
|
+
class LemmyError extends Error {
|
2103
|
+
constructor(name, msg) {
|
2104
|
+
super(msg ?? "");
|
2105
|
+
this.name = name;
|
2106
|
+
// Set the prototype explicitly.
|
2107
|
+
Object.setPrototypeOf(this, LemmyError.prototype);
|
2108
|
+
}
|
2109
|
+
}
|
2110
|
+
exports.LemmyError = LemmyError;
|