lemmy-js-client 1.0.0-media-fixes.0 → 1.0.0-mod-reason-mandatory.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 +119 -36
- package/dist/http.js +607 -626
- package/dist/index.d.ts +64 -34
- package/dist/other_types.d.ts +22 -4
- package/dist/types/AdminAdd.d.ts +12 -0
- package/dist/types/AdminAddId.d.ts +1 -0
- package/dist/types/{ModAddView.d.ts → AdminAddView.d.ts} +3 -3
- package/dist/types/AdminAllowInstance.d.ts +2 -2
- package/dist/types/AdminAllowInstanceParams.d.ts +1 -1
- package/dist/types/{ModBan.d.ts → AdminBan.d.ts} +6 -6
- package/dist/types/AdminBanId.d.ts +1 -0
- package/dist/types/{ModBanView.d.ts → AdminBanView.d.ts} +3 -3
- package/dist/types/AdminBlockInstance.d.ts +3 -3
- package/dist/types/AdminBlockInstanceParams.d.ts +2 -2
- package/dist/types/AdminListUsers.d.ts +7 -0
- package/dist/types/{BannedPersonsResponse.d.ts → AdminListUsersResponse.d.ts} +4 -6
- package/dist/types/AdminPurgeComment.d.ts +2 -2
- package/dist/types/AdminPurgeCommunity.d.ts +2 -2
- package/dist/types/AdminPurgePerson.d.ts +2 -2
- package/dist/types/AdminPurgePost.d.ts +2 -2
- package/dist/types/{ModRemoveCommunity.d.ts → AdminRemoveCommunity.d.ts} +5 -5
- package/dist/types/AdminRemoveCommunityId.d.ts +1 -0
- package/dist/types/AdminRemoveCommunityView.d.ts +11 -0
- package/dist/types/BanFromCommunity.d.ts +2 -2
- package/dist/types/BanPerson.d.ts +2 -2
- 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 +6 -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 +2 -2
- package/dist/types/CreateCommunityTag.d.ts +10 -0
- 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 +17 -14
- package/dist/types/CustomEmoji.d.ts +2 -2
- package/dist/types/DeleteCommunityTag.d.ts +7 -0
- package/dist/types/EditPost.d.ts +2 -2
- package/dist/types/EditSite.d.ts +30 -20
- package/dist/types/ExportDataResponse.d.ts +13 -0
- package/dist/types/FederationBlockList.d.ts +3 -3
- package/dist/types/FederationError.d.ts +4 -2
- package/dist/types/FollowMultiCommunity.d.ts +5 -0
- package/dist/types/GetComments.d.ts +3 -3
- package/dist/types/GetCommentsResponse.d.ts +3 -0
- package/dist/types/GetCommentsSlimResponse.d.ts +3 -0
- package/dist/types/GetModlog.d.ts +1 -0
- package/dist/types/GetModlogResponse.d.ts +1 -0
- package/dist/types/GetMultiCommunity.d.ts +4 -0
- package/dist/types/GetMultiCommunityResponse.d.ts +6 -0
- package/dist/types/GetPosts.d.ts +5 -11
- package/dist/types/GetPostsResponse.d.ts +3 -2
- package/dist/types/HideCommunity.d.ts +1 -1
- 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 +31 -79
- package/dist/types/LikeType.d.ts +4 -0
- package/dist/types/LinkMetadata.d.ts +4 -0
- package/dist/types/ListCommentLikes.d.ts +3 -1
- package/dist/types/ListCommentLikesResponse.d.ts +6 -0
- package/dist/types/ListCommunities.d.ts +3 -1
- package/dist/types/ListCommunitiesResponse.d.ts +6 -0
- package/dist/types/ListCommunityPendingFollows.d.ts +3 -1
- package/dist/types/ListCommunityPendingFollows.js +0 -1
- package/dist/types/ListCommunityPendingFollowsResponse.d.ts +6 -0
- package/dist/types/ListCustomEmojis.d.ts +0 -3
- package/dist/types/ListMedia.d.ts +3 -1
- package/dist/types/ListMedia.js +0 -1
- package/dist/types/ListMediaResponse.d.ts +6 -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} +4 -3
- package/dist/types/{ListInboxResponse.d.ts → ListNotificationsResponse.d.ts} +4 -3
- package/dist/types/ListPersonContent.d.ts +1 -0
- package/dist/types/ListPersonContentResponse.d.ts +1 -0
- package/dist/types/{ListBannedPersons.d.ts → ListPersonHidden.d.ts} +2 -2
- package/dist/types/ListPersonHiddenResponse.d.ts +13 -0
- 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/ListPersonReadResponse.d.ts +13 -0
- package/dist/types/ListPersonReadResponse.js +2 -0
- package/dist/types/ListPersonSaved.d.ts +1 -0
- package/dist/types/ListPersonSavedResponse.d.ts +1 -0
- package/dist/types/ListPostLikes.d.ts +3 -1
- package/dist/types/ListPostLikesResponse.d.ts +6 -0
- package/dist/types/ListRegistrationApplications.d.ts +3 -1
- package/dist/types/ListRegistrationApplications.js +0 -1
- package/dist/types/ListRegistrationApplicationsResponse.d.ts +6 -0
- package/dist/types/ListReports.d.ts +1 -0
- package/dist/types/ListReportsResponse.d.ts +1 -0
- package/dist/types/ListTaglines.d.ts +3 -1
- package/dist/types/ListTaglines.js +0 -1
- package/dist/types/ListTaglinesResponse.d.ts +6 -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 +11 -10
- package/dist/types/LocalSiteRateLimit.d.ts +16 -16
- package/dist/types/LocalSiteUrlBlocklist.d.ts +2 -2
- package/dist/types/LocalUser.d.ts +13 -10
- package/dist/types/LocalUserView.d.ts +2 -2
- package/dist/types/LockComment.d.ts +9 -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/{ModAddCommunity.d.ts → ModAddToCommunity.d.ts} +4 -4
- package/dist/types/ModAddToCommunity.js +2 -0
- package/dist/types/ModAddToCommunityId.d.ts +1 -0
- package/dist/types/{ModAddCommunityView.d.ts → ModAddToCommunityView.d.ts} +3 -3
- package/dist/types/ModAddToCommunityView.js +2 -0
- package/dist/types/ModBanFromCommunity.d.ts +3 -3
- 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 +16 -0
- package/dist/types/ModLockCommentView.js +2 -0
- package/dist/types/ModLockPost.d.ts +2 -1
- package/dist/types/ModRemoveComment.d.ts +2 -2
- package/dist/types/ModRemovePost.d.ts +2 -2
- package/dist/types/ModTransferCommunity.d.ts +1 -1
- package/dist/types/ModlogActionType.d.ts +1 -1
- package/dist/types/ModlogCombinedView.d.ts +16 -13
- 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 +3 -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/OpenGraphData.d.ts +4 -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/PersonLikedCombinedView.d.ts +7 -0
- package/dist/types/PersonLikedCombinedView.js +2 -0
- package/dist/types/PersonView.d.ts +4 -4
- package/dist/types/Post.d.ts +6 -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 +6 -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/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 +2 -2
- package/dist/types/RegistrationApplication.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/SaveUserSettings.d.ts +12 -2
- package/dist/types/Search.d.ts +6 -1
- package/dist/types/SearchCombinedView.d.ts +4 -1
- package/dist/types/SearchResponse.d.ts +1 -0
- 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 +7 -13
- package/dist/types/Tagline.d.ts +4 -3
- package/dist/types/Tagline.js +0 -1
- package/dist/types/TagsView.d.ts +5 -0
- package/dist/types/TagsView.js +2 -0
- package/dist/types/UpdateCommunityNotifications.d.ts +9 -0
- package/dist/types/UpdateCommunityNotifications.js +2 -0
- package/dist/types/UpdateCommunityTag.d.ts +9 -0
- package/dist/types/UpdateCommunityTag.js +2 -0
- 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 +27 -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 -0
- 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 -30
- 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/ModAddCommunityId.d.ts +0 -1
- package/dist/types/ModAddId.d.ts +0 -1
- package/dist/types/ModBanId.d.ts +0 -1
- package/dist/types/ModRemoveCommunityId.d.ts +0 -1
- package/dist/types/ModRemoveCommunityView.d.ts +0 -11
- 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 -30
- package/dist/types/PostPaginationCursor.d.ts +0 -7
- package/dist/types/ResolveObjectResponse.d.ts +0 -13
- /package/dist/types/{BannedPersonsResponse.js → AdminAdd.js} +0 -0
- /package/dist/types/{CommentReplyId.js → AdminAddId.js} +0 -0
- /package/dist/types/{CommentReply.js → AdminAddView.js} +0 -0
- /package/dist/types/{CommentReplyView.js → AdminBan.js} +0 -0
- /package/dist/types/{InboxDataType.js → AdminBanId.js} +0 -0
- /package/dist/types/{InboxCombinedView.js → AdminBanView.js} +0 -0
- /package/dist/types/{ListBannedPersons.js → AdminListUsers.js} +0 -0
- /package/dist/types/{ListInbox.js → AdminListUsersResponse.js} +0 -0
- /package/dist/types/{ListInboxResponse.js → AdminRemoveCommunity.js} +0 -0
- /package/dist/types/{ModAddCommunityId.js → AdminRemoveCommunityId.js} +0 -0
- /package/dist/types/{MarkCommentReplyAsRead.js → AdminRemoveCommunityView.js} +0 -0
- /package/dist/types/{MarkPersonCommentMentionAsRead.js → CommunityIdQuery.js} +0 -0
- /package/dist/types/{ModAddId.js → CommunityNotificationsMode.js} +0 -0
- /package/dist/types/{MarkPersonPostMentionAsRead.js → CreateCommunityTag.js} +0 -0
- /package/dist/types/{ModBanId.js → CreateMultiCommunity.js} +0 -0
- /package/dist/types/{MarkPrivateMessageAsRead.js → CreateOrDeleteMultiCommunityEntry.js} +0 -0
- /package/dist/types/{ModAdd.js → DeleteCommunityTag.js} +0 -0
- /package/dist/types/{ModAddCommunity.js → ExportDataResponse.js} +0 -0
- /package/dist/types/{ModAddCommunityView.js → FollowMultiCommunity.js} +0 -0
- /package/dist/types/{ModAddView.js → GetMultiCommunity.js} +0 -0
- /package/dist/types/{ModBan.js → GetMultiCommunityResponse.js} +0 -0
- /package/dist/types/{ModRemoveCommunityId.js → LikeType.js} +0 -0
- /package/dist/types/{ModBanView.js → ListMultiCommunities.js} +0 -0
- /package/dist/types/{ModRemoveCommunity.js → ListMultiCommunitiesResponse.js} +0 -0
- /package/dist/types/{ModRemoveCommunityView.js → ListNotifications.js} +0 -0
- /package/dist/types/{PersonCommentMention.js → ListNotificationsResponse.js} +0 -0
- /package/dist/types/{PersonCommentMentionView.js → ListPersonHidden.js} +0 -0
- /package/dist/types/{PersonPostMention.js → ListPersonHiddenResponse.js} +0 -0
- /package/dist/types/{PersonPostMentionView.js → ListPersonLiked.js} +0 -0
- /package/dist/types/{ResolveObjectResponse.js → ListPersonLikedResponse.js} +0 -0
- /package/dist/types/{UserBlockInstanceParams.js → ListPersonRead.js} +0 -0
- /package/dist/types/{PersonCommentMentionId.js → ModAddToCommunityId.js} +0 -0
- /package/dist/types/{PersonPostMentionId.js → ModLockCommentId.js} +0 -0
- /package/dist/types/{PostPaginationCursor.js → MultiCommunityId.js} +0 -0
package/dist/http.js
CHANGED
|
@@ -8,15 +8,6 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
8
|
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
9
9
|
return function (target, key) { decorator(target, key, paramIndex); }
|
|
10
10
|
};
|
|
11
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
12
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
13
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
14
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
15
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
16
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
17
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
18
|
-
});
|
|
19
|
-
};
|
|
20
11
|
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
21
12
|
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
22
13
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
@@ -28,9 +19,9 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
28
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");
|
|
29
20
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
30
21
|
};
|
|
31
|
-
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;
|
|
32
23
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
33
|
-
exports.LemmyHttp = void 0;
|
|
24
|
+
exports.LemmyError = exports.LemmyHttp = void 0;
|
|
34
25
|
const runtime_1 = require("@tsoa/runtime");
|
|
35
26
|
const other_types_1 = require("./other_types");
|
|
36
27
|
var HttpType;
|
|
@@ -56,44 +47,36 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
|
|
|
56
47
|
_LemmyHttp_headers.set(this, {});
|
|
57
48
|
_LemmyHttp_fetchFunction.set(this, fetch.bind(globalThis));
|
|
58
49
|
__classPrivateFieldSet(this, _LemmyHttp_apiUrl, `${baseUrl.replace(/\/+$/, "")}/api/${other_types_1.VERSION}`, "f");
|
|
59
|
-
if (options
|
|
50
|
+
if (options?.headers) {
|
|
60
51
|
__classPrivateFieldSet(this, _LemmyHttp_headers, options.headers, "f");
|
|
61
52
|
}
|
|
62
|
-
if (options
|
|
53
|
+
if (options?.fetchFunction) {
|
|
63
54
|
__classPrivateFieldSet(this, _LemmyHttp_fetchFunction, options.fetchFunction, "f");
|
|
64
55
|
}
|
|
65
56
|
}
|
|
66
57
|
/**
|
|
67
58
|
* @summary Gets the site, and your user data.
|
|
68
59
|
*/
|
|
69
|
-
getSite(options) {
|
|
70
|
-
return
|
|
71
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/site", {}, options);
|
|
72
|
-
});
|
|
60
|
+
async getSite(options) {
|
|
61
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/site", {}, options);
|
|
73
62
|
}
|
|
74
63
|
/**
|
|
75
64
|
* @summary Create your site.
|
|
76
65
|
*/
|
|
77
|
-
createSite(form, options) {
|
|
78
|
-
return
|
|
79
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/site", form, options);
|
|
80
|
-
});
|
|
66
|
+
async createSite(form, options) {
|
|
67
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/site", form, options);
|
|
81
68
|
}
|
|
82
69
|
/**
|
|
83
70
|
* @summary Edit your site.
|
|
84
71
|
*/
|
|
85
|
-
editSite(form, options) {
|
|
86
|
-
return
|
|
87
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/site", form, options);
|
|
88
|
-
});
|
|
72
|
+
async editSite(form, options) {
|
|
73
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/site", form, options);
|
|
89
74
|
}
|
|
90
75
|
/**
|
|
91
76
|
* @summary Leave the Site admins.
|
|
92
77
|
*/
|
|
93
|
-
leaveAdmin(options) {
|
|
94
|
-
return
|
|
95
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/admin/leave", {}, options);
|
|
96
|
-
});
|
|
78
|
+
async leaveAdmin(options) {
|
|
79
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/admin/leave", {}, options);
|
|
97
80
|
}
|
|
98
81
|
/**
|
|
99
82
|
* @summary Generate a TOTP / two-factor secret.
|
|
@@ -101,18 +84,14 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
|
|
|
101
84
|
* Generate a TOTP / two-factor secret.
|
|
102
85
|
* Afterwards you need to call `/account/auth/totp/update` with a valid token to enable it.
|
|
103
86
|
*/
|
|
104
|
-
generateTotpSecret(options) {
|
|
105
|
-
return
|
|
106
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/auth/totp/generate", {}, options);
|
|
107
|
-
});
|
|
87
|
+
async generateTotpSecret(options) {
|
|
88
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/auth/totp/generate", {}, options);
|
|
108
89
|
}
|
|
109
90
|
/**
|
|
110
91
|
* @summary Get data of current user.
|
|
111
92
|
*/
|
|
112
|
-
getMyUser(options) {
|
|
113
|
-
return
|
|
114
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account", {}, options);
|
|
115
|
-
});
|
|
93
|
+
async getMyUser(options) {
|
|
94
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account", {}, options);
|
|
116
95
|
}
|
|
117
96
|
/**
|
|
118
97
|
* @summary Export a backup of your user settings.
|
|
@@ -120,66 +99,50 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
|
|
|
120
99
|
* Export a backup of your user settings, including your saved content,
|
|
121
100
|
* followed communities, and blocks.
|
|
122
101
|
*/
|
|
123
|
-
exportSettings(options) {
|
|
124
|
-
return
|
|
125
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/settings/export", {}, options);
|
|
126
|
-
});
|
|
102
|
+
async exportSettings(options) {
|
|
103
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/settings/export", {}, options);
|
|
127
104
|
}
|
|
128
105
|
/**
|
|
129
106
|
* @summary Import a backup of your user settings.
|
|
130
107
|
*/
|
|
131
|
-
importSettings(form, options) {
|
|
132
|
-
return
|
|
133
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/settings/import", form, options);
|
|
134
|
-
});
|
|
108
|
+
async importSettings(form, options) {
|
|
109
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/settings/import", form, options);
|
|
135
110
|
}
|
|
136
111
|
/**
|
|
137
112
|
* @summary List login tokens for your user
|
|
138
113
|
*/
|
|
139
|
-
listLogins(options) {
|
|
140
|
-
return
|
|
141
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/list_logins", {}, options);
|
|
142
|
-
});
|
|
114
|
+
async listLogins(options) {
|
|
115
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/list_logins", {}, options);
|
|
143
116
|
}
|
|
144
117
|
/**
|
|
145
118
|
* @summary Returns an error message if your auth token is invalid
|
|
146
119
|
*/
|
|
147
|
-
validateAuth(options) {
|
|
148
|
-
return
|
|
149
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/validate_auth", {}, options);
|
|
150
|
-
});
|
|
120
|
+
async validateAuth(options) {
|
|
121
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/validate_auth", {}, options);
|
|
151
122
|
}
|
|
152
123
|
/**
|
|
153
124
|
* @summary List all the media for your account.
|
|
154
125
|
*/
|
|
155
|
-
listMedia() {
|
|
156
|
-
return
|
|
157
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/media/list", form, options);
|
|
158
|
-
});
|
|
126
|
+
async listMedia(form = {}, options) {
|
|
127
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/media/list", form, options);
|
|
159
128
|
}
|
|
160
129
|
/**
|
|
161
130
|
* @summary Delete media for your account.
|
|
162
131
|
*/
|
|
163
|
-
deleteMedia(form, options) {
|
|
164
|
-
return
|
|
165
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/account/media", form, options);
|
|
166
|
-
});
|
|
132
|
+
async deleteMedia(form, options) {
|
|
133
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/account/media", form, options);
|
|
167
134
|
}
|
|
168
135
|
/**
|
|
169
136
|
* @summary Delete any media. (Admin only)
|
|
170
137
|
*/
|
|
171
|
-
deleteMediaAdmin(form, options) {
|
|
172
|
-
return
|
|
173
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/image", form, options);
|
|
174
|
-
});
|
|
138
|
+
async deleteMediaAdmin(form, options) {
|
|
139
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/image", form, options);
|
|
175
140
|
}
|
|
176
141
|
/**
|
|
177
142
|
* @summary List all the media known to your instance.
|
|
178
143
|
*/
|
|
179
|
-
listMediaAdmin() {
|
|
180
|
-
return
|
|
181
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/image/list", form, options);
|
|
182
|
-
});
|
|
144
|
+
async listMediaAdmin(form = {}, options) {
|
|
145
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/image/list", form, options);
|
|
183
146
|
}
|
|
184
147
|
/**
|
|
185
148
|
* @summary Enable / Disable TOTP / two-factor authentication.
|
|
@@ -188,962 +151,815 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
|
|
|
188
151
|
*
|
|
189
152
|
* Disabling is only possible if 2FA was previously enabled. Again it is necessary to pass a valid token.
|
|
190
153
|
*/
|
|
191
|
-
updateTotp(form, options) {
|
|
192
|
-
return
|
|
193
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/auth/totp/update", form, options);
|
|
194
|
-
});
|
|
154
|
+
async updateTotp(form, options) {
|
|
155
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/auth/totp/update", form, options);
|
|
195
156
|
}
|
|
196
157
|
/**
|
|
197
158
|
* @summary Get the modlog.
|
|
198
159
|
*/
|
|
199
|
-
getModlog() {
|
|
200
|
-
return
|
|
201
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/modlog", form, options);
|
|
202
|
-
});
|
|
160
|
+
async getModlog(form = {}, options) {
|
|
161
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/modlog", form, options);
|
|
203
162
|
}
|
|
204
163
|
/**
|
|
205
|
-
* @summary Search lemmy.
|
|
164
|
+
* @summary Search lemmy. If `search_term` is a url it also attempts to fetch it, just like `resolve_object`.
|
|
206
165
|
*/
|
|
207
|
-
search(form, options) {
|
|
208
|
-
return
|
|
209
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/search", form, options);
|
|
210
|
-
});
|
|
166
|
+
async search(form, options) {
|
|
167
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/search", form, options);
|
|
211
168
|
}
|
|
212
169
|
/**
|
|
213
170
|
* @summary Fetch a non-local / federated object.
|
|
214
171
|
*/
|
|
215
|
-
resolveObject(form, options) {
|
|
216
|
-
return
|
|
217
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/resolve_object", form, options);
|
|
218
|
-
});
|
|
172
|
+
async resolveObject(form, options) {
|
|
173
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/resolve_object", form, options);
|
|
219
174
|
}
|
|
220
175
|
/**
|
|
221
176
|
* @summary Create a new community.
|
|
222
177
|
*/
|
|
223
|
-
createCommunity(form, options) {
|
|
224
|
-
return
|
|
225
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/community", form, options);
|
|
226
|
-
});
|
|
178
|
+
async createCommunity(form, options) {
|
|
179
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/community", form, options);
|
|
227
180
|
}
|
|
228
181
|
/**
|
|
229
182
|
* @summary Get / fetch a community.
|
|
230
183
|
*/
|
|
231
|
-
getCommunity() {
|
|
232
|
-
return
|
|
233
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/community", form, options);
|
|
234
|
-
});
|
|
184
|
+
async getCommunity(form = {}, options) {
|
|
185
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/community", form, options);
|
|
235
186
|
}
|
|
236
187
|
/**
|
|
237
188
|
* @summary Edit a community.
|
|
238
189
|
*/
|
|
239
|
-
editCommunity(form, options) {
|
|
240
|
-
return
|
|
241
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/community", form, options);
|
|
242
|
-
});
|
|
190
|
+
async editCommunity(form, options) {
|
|
191
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/community", form, options);
|
|
243
192
|
}
|
|
244
193
|
/**
|
|
245
194
|
* @summary List communities, with various filters.
|
|
246
195
|
*/
|
|
247
|
-
listCommunities() {
|
|
248
|
-
return
|
|
249
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/community/list", form, options);
|
|
250
|
-
});
|
|
196
|
+
async listCommunities(form = {}, options) {
|
|
197
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/community/list", form, options);
|
|
251
198
|
}
|
|
252
199
|
/**
|
|
253
200
|
* @summary Follow / subscribe to a community.
|
|
254
201
|
*/
|
|
255
|
-
followCommunity(form, options) {
|
|
256
|
-
return
|
|
257
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/community/follow", form, options);
|
|
258
|
-
});
|
|
202
|
+
async followCommunity(form, options) {
|
|
203
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/community/follow", form, options);
|
|
259
204
|
}
|
|
260
205
|
/**
|
|
261
206
|
* @summary Get a community's pending follows count.
|
|
262
207
|
*/
|
|
263
|
-
getCommunityPendingFollowsCount(form, options) {
|
|
264
|
-
return
|
|
265
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/community/pending_follows/count", form, options);
|
|
266
|
-
});
|
|
208
|
+
async getCommunityPendingFollowsCount(form, options) {
|
|
209
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/community/pending_follows/count", form, options);
|
|
267
210
|
}
|
|
268
211
|
/**
|
|
269
212
|
* @summary Get a community's pending followers.
|
|
270
213
|
*/
|
|
271
|
-
listCommunityPendingFollows(form, options) {
|
|
272
|
-
return
|
|
273
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/community/pending_follows/list", form, options);
|
|
274
|
-
});
|
|
214
|
+
async listCommunityPendingFollows(form, options) {
|
|
215
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/community/pending_follows/list", form, options);
|
|
275
216
|
}
|
|
276
217
|
/**
|
|
277
218
|
* @summary Approve a community pending follow request.
|
|
278
219
|
*/
|
|
279
|
-
approveCommunityPendingFollow(form, options) {
|
|
280
|
-
return
|
|
281
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/community/pending_follows/approve", form, options);
|
|
282
|
-
});
|
|
220
|
+
async approveCommunityPendingFollow(form, options) {
|
|
221
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/community/pending_follows/approve", form, options);
|
|
283
222
|
}
|
|
284
223
|
/**
|
|
285
224
|
* @summary Block a community.
|
|
286
225
|
*/
|
|
287
|
-
blockCommunity(form, options) {
|
|
288
|
-
return
|
|
289
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/block/community", form, options);
|
|
290
|
-
});
|
|
226
|
+
async blockCommunity(form, options) {
|
|
227
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/block/community", form, options);
|
|
291
228
|
}
|
|
292
229
|
/**
|
|
293
230
|
* @summary Delete a community.
|
|
294
231
|
*/
|
|
295
|
-
deleteCommunity(form, options) {
|
|
296
|
-
return
|
|
297
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/community/delete", form, options);
|
|
298
|
-
});
|
|
232
|
+
async deleteCommunity(form, options) {
|
|
233
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/community/delete", form, options);
|
|
299
234
|
}
|
|
300
235
|
/**
|
|
301
236
|
* @summary Hide a community from public / "All" view. Admins only.
|
|
302
237
|
*/
|
|
303
|
-
hideCommunity(form, options) {
|
|
304
|
-
return
|
|
305
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/community/hide", form, options);
|
|
306
|
-
});
|
|
238
|
+
async hideCommunity(form, options) {
|
|
239
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/community/hide", form, options);
|
|
307
240
|
}
|
|
308
241
|
/**
|
|
309
242
|
* @summary A moderator remove for a community.
|
|
310
243
|
*/
|
|
311
|
-
removeCommunity(form, options) {
|
|
312
|
-
return
|
|
313
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/community/remove", form, options);
|
|
314
|
-
});
|
|
244
|
+
async removeCommunity(form, options) {
|
|
245
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/community/remove", form, options);
|
|
315
246
|
}
|
|
316
247
|
/**
|
|
317
248
|
* @summary Transfer your community to an existing moderator.
|
|
318
249
|
*/
|
|
319
|
-
transferCommunity(form, options) {
|
|
320
|
-
return
|
|
321
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/community/transfer", form, options);
|
|
322
|
-
});
|
|
250
|
+
async transferCommunity(form, options) {
|
|
251
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/community/transfer", form, options);
|
|
323
252
|
}
|
|
324
253
|
/**
|
|
325
254
|
* @summary Ban a user from a community.
|
|
326
255
|
*/
|
|
327
|
-
banFromCommunity(form, options) {
|
|
328
|
-
return
|
|
329
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/community/ban_user", form, options);
|
|
330
|
-
});
|
|
256
|
+
async banFromCommunity(form, options) {
|
|
257
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/community/ban_user", form, options);
|
|
331
258
|
}
|
|
332
259
|
/**
|
|
333
260
|
* @summary Add a moderator to your community.
|
|
334
261
|
*/
|
|
335
|
-
addModToCommunity(form, options) {
|
|
336
|
-
return
|
|
337
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/community/mod", form, options);
|
|
338
|
-
});
|
|
262
|
+
async addModToCommunity(form, options) {
|
|
263
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/community/mod", form, options);
|
|
339
264
|
}
|
|
340
265
|
/**
|
|
341
266
|
* @summary Get a random community.
|
|
342
267
|
*/
|
|
343
|
-
getRandomCommunity(form, options) {
|
|
344
|
-
return
|
|
345
|
-
|
|
346
|
-
|
|
268
|
+
async getRandomCommunity(form, options) {
|
|
269
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/community/random", form, options);
|
|
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);
|
|
347
282
|
}
|
|
348
283
|
/**
|
|
349
284
|
* @summary Create a post.
|
|
350
285
|
*/
|
|
351
|
-
createPost(form, options) {
|
|
352
|
-
return
|
|
353
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/post", form, options);
|
|
354
|
-
});
|
|
286
|
+
async createPost(form, options) {
|
|
287
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/post", form, options);
|
|
355
288
|
}
|
|
356
289
|
/**
|
|
357
290
|
* @summary Get / fetch a post.
|
|
358
291
|
*/
|
|
359
|
-
getPost() {
|
|
360
|
-
return
|
|
361
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/post", form, options);
|
|
362
|
-
});
|
|
292
|
+
async getPost(form = {}, options) {
|
|
293
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/post", form, options);
|
|
363
294
|
}
|
|
364
295
|
/**
|
|
365
296
|
* @summary Edit a post.
|
|
366
297
|
*/
|
|
367
|
-
editPost(form, options) {
|
|
368
|
-
return
|
|
369
|
-
|
|
370
|
-
|
|
298
|
+
async editPost(form, options) {
|
|
299
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/post", form, options);
|
|
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);
|
|
371
306
|
}
|
|
372
307
|
/**
|
|
373
308
|
* @summary Delete a post.
|
|
374
309
|
*/
|
|
375
|
-
deletePost(form, options) {
|
|
376
|
-
return
|
|
377
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/post/delete", form, options);
|
|
378
|
-
});
|
|
310
|
+
async deletePost(form, options) {
|
|
311
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/post/delete", form, options);
|
|
379
312
|
}
|
|
380
313
|
/**
|
|
381
314
|
* @summary A moderator remove for a post.
|
|
382
315
|
*/
|
|
383
|
-
removePost(form, options) {
|
|
384
|
-
return
|
|
385
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/post/remove", form, options);
|
|
386
|
-
});
|
|
316
|
+
async removePost(form, options) {
|
|
317
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/post/remove", form, options);
|
|
387
318
|
}
|
|
388
319
|
/**
|
|
389
320
|
* @summary Mark a post as read.
|
|
390
321
|
*/
|
|
391
|
-
markPostAsRead(form, options) {
|
|
392
|
-
return
|
|
393
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/post/mark_as_read", form, options);
|
|
394
|
-
});
|
|
322
|
+
async markPostAsRead(form, options) {
|
|
323
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/post/mark_as_read", form, options);
|
|
395
324
|
}
|
|
396
325
|
/**
|
|
397
326
|
* @summary Mark multiple posts as read.
|
|
398
327
|
*/
|
|
399
|
-
markManyPostAsRead(form, options) {
|
|
400
|
-
return
|
|
401
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/post/mark_as_read/many", form, options);
|
|
402
|
-
});
|
|
328
|
+
async markManyPostAsRead(form, options) {
|
|
329
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/post/mark_as_read/many", form, options);
|
|
403
330
|
}
|
|
404
331
|
/**
|
|
405
332
|
* @summary Hide a post from list views.
|
|
406
333
|
*/
|
|
407
|
-
hidePost(form, options) {
|
|
408
|
-
return
|
|
409
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/post/hide", form, options);
|
|
410
|
-
});
|
|
334
|
+
async hidePost(form, options) {
|
|
335
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/post/hide", form, options);
|
|
411
336
|
}
|
|
412
337
|
/**
|
|
413
338
|
* @summary A moderator can lock a post ( IE disable new comments ).
|
|
414
339
|
*/
|
|
415
|
-
lockPost(form, options) {
|
|
416
|
-
return
|
|
417
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/post/lock", form, options);
|
|
418
|
-
});
|
|
340
|
+
async lockPost(form, options) {
|
|
341
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/post/lock", form, options);
|
|
419
342
|
}
|
|
420
343
|
/**
|
|
421
344
|
* @summary A moderator can feature a community post ( IE stick it to the top of a community ).
|
|
422
345
|
*/
|
|
423
|
-
featurePost(form, options) {
|
|
424
|
-
return
|
|
425
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/post/feature", form, options);
|
|
426
|
-
});
|
|
346
|
+
async featurePost(form, options) {
|
|
347
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/post/feature", form, options);
|
|
427
348
|
}
|
|
428
349
|
/**
|
|
429
350
|
* @summary Get / fetch posts, with various filters.
|
|
430
351
|
*/
|
|
431
|
-
getPosts() {
|
|
432
|
-
return
|
|
433
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/post/list", form, options);
|
|
434
|
-
});
|
|
352
|
+
async getPosts(form = {}, options) {
|
|
353
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/post/list", form, options);
|
|
435
354
|
}
|
|
436
355
|
/**
|
|
437
356
|
* @summary Like / vote on a post.
|
|
438
357
|
*/
|
|
439
|
-
likePost(form, options) {
|
|
440
|
-
return
|
|
441
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/post/like", form, options);
|
|
442
|
-
});
|
|
358
|
+
async likePost(form, options) {
|
|
359
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/post/like", form, options);
|
|
443
360
|
}
|
|
444
361
|
/**
|
|
445
362
|
* @summary List a post's likes. Admin-only.
|
|
446
363
|
*/
|
|
447
|
-
listPostLikes(form, options) {
|
|
448
|
-
return
|
|
449
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/post/like/list", form, options);
|
|
450
|
-
});
|
|
364
|
+
async listPostLikes(form, options) {
|
|
365
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/post/like/list", form, options);
|
|
451
366
|
}
|
|
452
367
|
/**
|
|
453
368
|
* @summary Save a post.
|
|
454
369
|
*/
|
|
455
|
-
savePost(form, options) {
|
|
456
|
-
return
|
|
457
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/post/save", form, options);
|
|
458
|
-
});
|
|
370
|
+
async savePost(form, options) {
|
|
371
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/post/save", form, options);
|
|
459
372
|
}
|
|
460
373
|
/**
|
|
461
374
|
* @summary Report a post.
|
|
462
375
|
*/
|
|
463
|
-
createPostReport(form, options) {
|
|
464
|
-
return
|
|
465
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/post/report", form, options);
|
|
466
|
-
});
|
|
376
|
+
async createPostReport(form, options) {
|
|
377
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/post/report", form, options);
|
|
467
378
|
}
|
|
468
379
|
/**
|
|
469
380
|
* @summary Resolve a post report. Only a mod can do this.
|
|
470
381
|
*/
|
|
471
|
-
resolvePostReport(form, options) {
|
|
472
|
-
return
|
|
473
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/post/report/resolve", form, options);
|
|
474
|
-
});
|
|
382
|
+
async resolvePostReport(form, options) {
|
|
383
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/post/report/resolve", form, options);
|
|
475
384
|
}
|
|
476
385
|
/**
|
|
477
386
|
* @summary Fetch metadata for any given site.
|
|
478
387
|
*/
|
|
479
|
-
getSiteMetadata(form, options) {
|
|
480
|
-
return
|
|
481
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/post/site_metadata", form, options);
|
|
482
|
-
});
|
|
388
|
+
async getSiteMetadata(form, options) {
|
|
389
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/post/site_metadata", form, options);
|
|
483
390
|
}
|
|
484
391
|
/**
|
|
485
392
|
* @summary Create a comment.
|
|
486
393
|
*/
|
|
487
|
-
createComment(form, options) {
|
|
488
|
-
return
|
|
489
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/comment", form, options);
|
|
490
|
-
});
|
|
394
|
+
async createComment(form, options) {
|
|
395
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/comment", form, options);
|
|
491
396
|
}
|
|
492
397
|
/**
|
|
493
398
|
* @summary Edit a comment.
|
|
494
399
|
*/
|
|
495
|
-
editComment(form, options) {
|
|
496
|
-
return
|
|
497
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/comment", form, options);
|
|
498
|
-
});
|
|
400
|
+
async editComment(form, options) {
|
|
401
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/comment", form, options);
|
|
499
402
|
}
|
|
500
403
|
/**
|
|
501
404
|
* @summary Delete a comment.
|
|
502
405
|
*/
|
|
503
|
-
deleteComment(form, options) {
|
|
504
|
-
return
|
|
505
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/comment/delete", form, options);
|
|
506
|
-
});
|
|
406
|
+
async deleteComment(form, options) {
|
|
407
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/comment/delete", form, options);
|
|
507
408
|
}
|
|
508
409
|
/**
|
|
509
410
|
* @summary A moderator remove for a comment.
|
|
510
411
|
*/
|
|
511
|
-
removeComment(form, options) {
|
|
512
|
-
return
|
|
513
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/comment/remove", form, options);
|
|
514
|
-
});
|
|
412
|
+
async removeComment(form, options) {
|
|
413
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/comment/remove", form, options);
|
|
515
414
|
}
|
|
516
415
|
/**
|
|
517
|
-
* @summary
|
|
416
|
+
* @summary A moderator can lock a comment (IE disable replies).
|
|
518
417
|
*/
|
|
519
|
-
|
|
520
|
-
return
|
|
521
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/comment/mark_as_read", form, options);
|
|
522
|
-
});
|
|
418
|
+
async lockComment(form, options) {
|
|
419
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/comment/lock", form, options);
|
|
523
420
|
}
|
|
524
421
|
/**
|
|
525
|
-
* @
|
|
422
|
+
* @Summary Like / vote on a comment.
|
|
526
423
|
*/
|
|
527
|
-
likeComment(form, options) {
|
|
528
|
-
return
|
|
529
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/comment/like", form, options);
|
|
530
|
-
});
|
|
424
|
+
async likeComment(form, options) {
|
|
425
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/comment/like", form, options);
|
|
531
426
|
}
|
|
532
427
|
/**
|
|
533
428
|
* @summary List a comment's likes. Admin-only.
|
|
534
429
|
*/
|
|
535
|
-
listCommentLikes(form, options) {
|
|
536
|
-
return
|
|
537
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/comment/like/list", form, options);
|
|
538
|
-
});
|
|
430
|
+
async listCommentLikes(form, options) {
|
|
431
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/comment/like/list", form, options);
|
|
539
432
|
}
|
|
540
433
|
/**
|
|
541
434
|
* @summary Save a comment.
|
|
542
435
|
*/
|
|
543
|
-
saveComment(form, options) {
|
|
544
|
-
return
|
|
545
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/comment/save", form, options);
|
|
546
|
-
});
|
|
436
|
+
async saveComment(form, options) {
|
|
437
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/comment/save", form, options);
|
|
547
438
|
}
|
|
548
439
|
/**
|
|
549
440
|
* @summary Distinguishes a comment (speak as moderator)
|
|
550
441
|
*/
|
|
551
|
-
distinguishComment(form, options) {
|
|
552
|
-
return
|
|
553
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/comment/distinguish", form, options);
|
|
554
|
-
});
|
|
442
|
+
async distinguishComment(form, options) {
|
|
443
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/comment/distinguish", form, options);
|
|
555
444
|
}
|
|
556
445
|
/**
|
|
557
446
|
* @summary Get / fetch comments.
|
|
558
447
|
*/
|
|
559
|
-
getComments() {
|
|
560
|
-
return
|
|
561
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/comment/list", form, options);
|
|
562
|
-
});
|
|
448
|
+
async getComments(form = {}, options) {
|
|
449
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/comment/list", form, options);
|
|
563
450
|
}
|
|
564
451
|
/**
|
|
565
452
|
* @summary Get / fetch comments, but without the post or community.
|
|
566
453
|
*/
|
|
567
|
-
getCommentsSlim() {
|
|
568
|
-
return
|
|
569
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/comment/list/slim", form, options);
|
|
570
|
-
});
|
|
454
|
+
async getCommentsSlim(form = {}, options) {
|
|
455
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/comment/list/slim", form, options);
|
|
571
456
|
}
|
|
572
457
|
/**
|
|
573
458
|
* @summary Get / fetch comment.
|
|
574
459
|
*/
|
|
575
|
-
getComment(form, options) {
|
|
576
|
-
return
|
|
577
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/comment", form, options);
|
|
578
|
-
});
|
|
460
|
+
async getComment(form, options) {
|
|
461
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/comment", form, options);
|
|
579
462
|
}
|
|
580
463
|
/**
|
|
581
464
|
* @summary Report a comment.
|
|
582
465
|
*/
|
|
583
|
-
createCommentReport(form, options) {
|
|
584
|
-
return
|
|
585
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/comment/report", form, options);
|
|
586
|
-
});
|
|
466
|
+
async createCommentReport(form, options) {
|
|
467
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/comment/report", form, options);
|
|
587
468
|
}
|
|
588
469
|
/**
|
|
589
470
|
* @summary Resolve a comment report. Only a mod can do this.
|
|
590
471
|
*/
|
|
591
|
-
resolveCommentReport(form, options) {
|
|
592
|
-
return
|
|
593
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/comment/report/resolve", form, options);
|
|
594
|
-
});
|
|
472
|
+
async resolveCommentReport(form, options) {
|
|
473
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/comment/report/resolve", form, options);
|
|
595
474
|
}
|
|
596
475
|
/**
|
|
597
476
|
* @summary Create a private message.
|
|
598
477
|
*/
|
|
599
|
-
createPrivateMessage(form, options) {
|
|
600
|
-
return
|
|
601
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/private_message", form, options);
|
|
602
|
-
});
|
|
478
|
+
async createPrivateMessage(form, options) {
|
|
479
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/private_message", form, options);
|
|
603
480
|
}
|
|
604
481
|
/**
|
|
605
482
|
* @summary Edit a private message.
|
|
606
483
|
*/
|
|
607
|
-
editPrivateMessage(form, options) {
|
|
608
|
-
return
|
|
609
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/private_message", form, options);
|
|
610
|
-
});
|
|
484
|
+
async editPrivateMessage(form, options) {
|
|
485
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/private_message", form, options);
|
|
611
486
|
}
|
|
612
487
|
/**
|
|
613
488
|
* @summary Delete a private message.
|
|
614
489
|
*/
|
|
615
|
-
deletePrivateMessage(form, options) {
|
|
616
|
-
return
|
|
617
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/private_message/delete", form, options);
|
|
618
|
-
});
|
|
619
|
-
}
|
|
620
|
-
/**
|
|
621
|
-
* @summary Mark a private message as read.
|
|
622
|
-
*/
|
|
623
|
-
markPrivateMessageAsRead(form, options) {
|
|
624
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
625
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/private_message/mark_as_read", form, options);
|
|
626
|
-
});
|
|
490
|
+
async deletePrivateMessage(form, options) {
|
|
491
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/private_message/delete", form, options);
|
|
627
492
|
}
|
|
628
493
|
/**
|
|
629
494
|
* @summary Create a report for a private message.
|
|
630
495
|
*/
|
|
631
|
-
createPrivateMessageReport(form, options) {
|
|
632
|
-
return
|
|
633
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/private_message/report", form, options);
|
|
634
|
-
});
|
|
496
|
+
async createPrivateMessageReport(form, options) {
|
|
497
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/private_message/report", form, options);
|
|
635
498
|
}
|
|
636
499
|
/**
|
|
637
500
|
* @summary Resolve a report for a private message.
|
|
638
501
|
*/
|
|
639
|
-
resolvePrivateMessageReport(form, options) {
|
|
640
|
-
return
|
|
641
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/private_message/report/resolve", form, options);
|
|
642
|
-
});
|
|
502
|
+
async resolvePrivateMessageReport(form, options) {
|
|
503
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/private_message/report/resolve", form, options);
|
|
643
504
|
}
|
|
644
505
|
/**
|
|
645
506
|
* @summary Register a new user.
|
|
646
507
|
*/
|
|
647
|
-
register(form, options) {
|
|
648
|
-
return
|
|
649
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/auth/register", form, options);
|
|
650
|
-
});
|
|
508
|
+
async register(form, options) {
|
|
509
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/auth/register", form, options);
|
|
651
510
|
}
|
|
652
511
|
/**
|
|
653
512
|
* @summary Log into lemmy.
|
|
654
513
|
*/
|
|
655
|
-
login(form, options) {
|
|
656
|
-
return
|
|
657
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/auth/login", form, options);
|
|
658
|
-
});
|
|
514
|
+
async login(form, options) {
|
|
515
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/auth/login", form, options);
|
|
659
516
|
}
|
|
660
517
|
/**
|
|
661
518
|
* @summary Invalidate the currently used auth token.
|
|
662
519
|
*/
|
|
663
|
-
logout(options) {
|
|
664
|
-
return
|
|
665
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/auth/logout", {}, options);
|
|
666
|
-
});
|
|
520
|
+
async logout(options) {
|
|
521
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/auth/logout", {}, options);
|
|
667
522
|
}
|
|
668
523
|
/**
|
|
669
524
|
* @summary Get the details for a person.
|
|
670
525
|
*/
|
|
671
|
-
getPersonDetails() {
|
|
672
|
-
return
|
|
673
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/person", form, options);
|
|
674
|
-
});
|
|
526
|
+
async getPersonDetails(form = {}, options) {
|
|
527
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/person", form, options);
|
|
675
528
|
}
|
|
676
529
|
/**
|
|
677
530
|
* @summary List the content for a person.
|
|
678
531
|
*/
|
|
679
|
-
listPersonContent() {
|
|
680
|
-
return
|
|
681
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/person/content", form, options);
|
|
682
|
-
});
|
|
532
|
+
async listPersonContent(form = {}, options) {
|
|
533
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/person/content", form, options);
|
|
683
534
|
}
|
|
684
535
|
/**
|
|
685
|
-
* @summary
|
|
536
|
+
* @summary Make a note for a person.
|
|
686
537
|
*/
|
|
687
|
-
|
|
688
|
-
return
|
|
689
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/mention/comment/mark_as_read", form, options);
|
|
690
|
-
});
|
|
691
|
-
}
|
|
692
|
-
/**
|
|
693
|
-
* @summary Mark a person post body mention as read.
|
|
694
|
-
*/
|
|
695
|
-
markPostMentionAsRead(form, options) {
|
|
696
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
697
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/mention/post/mark_as_read", form, options);
|
|
698
|
-
});
|
|
538
|
+
async notePerson(form, options) {
|
|
539
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/person/note", form, options);
|
|
699
540
|
}
|
|
700
541
|
/**
|
|
701
542
|
* @summary Ban a person from your site.
|
|
702
543
|
*/
|
|
703
|
-
banPerson(form, options) {
|
|
704
|
-
return
|
|
705
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/admin/ban", form, options);
|
|
706
|
-
});
|
|
544
|
+
async banPerson(form, options) {
|
|
545
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/admin/ban", form, options);
|
|
707
546
|
}
|
|
708
547
|
/**
|
|
709
|
-
* @summary Get a list of
|
|
548
|
+
* @summary Get a list of users.
|
|
710
549
|
*/
|
|
711
|
-
|
|
712
|
-
return
|
|
713
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/admin/banned", form, options);
|
|
714
|
-
});
|
|
550
|
+
async listUsers(form = {}, options) {
|
|
551
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/admin/users", form, options);
|
|
715
552
|
}
|
|
716
553
|
/**
|
|
717
554
|
* @summary Block a person.
|
|
718
555
|
*/
|
|
719
|
-
blockPerson(form, options) {
|
|
720
|
-
return
|
|
721
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/block/person", form, options);
|
|
722
|
-
});
|
|
556
|
+
async blockPerson(form, options) {
|
|
557
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/block/person", form, options);
|
|
723
558
|
}
|
|
724
559
|
/**
|
|
725
560
|
* @summary Fetch a Captcha.
|
|
726
561
|
*/
|
|
727
|
-
getCaptcha(options) {
|
|
728
|
-
return
|
|
729
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/auth/get_captcha", {}, options);
|
|
730
|
-
});
|
|
562
|
+
async getCaptcha(options) {
|
|
563
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/auth/get_captcha", {}, options);
|
|
731
564
|
}
|
|
732
565
|
/**
|
|
733
566
|
* @summary Delete your account.
|
|
734
567
|
*/
|
|
735
|
-
deleteAccount(form, options) {
|
|
736
|
-
return
|
|
737
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/delete", form, options);
|
|
738
|
-
});
|
|
568
|
+
async deleteAccount(form, options) {
|
|
569
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/delete", form, options);
|
|
739
570
|
}
|
|
740
571
|
/**
|
|
741
572
|
* @summary Reset your password.
|
|
742
573
|
*/
|
|
743
|
-
passwordReset(form, options) {
|
|
744
|
-
return
|
|
745
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/auth/password_reset", form, options);
|
|
746
|
-
});
|
|
574
|
+
async passwordReset(form, options) {
|
|
575
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/auth/password_reset", form, options);
|
|
747
576
|
}
|
|
748
577
|
/**
|
|
749
578
|
* @summary Change your password from an email / token based reset.
|
|
750
579
|
*/
|
|
751
|
-
passwordChangeAfterReset(form, options) {
|
|
752
|
-
return
|
|
753
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/auth/password_change", form, options);
|
|
754
|
-
});
|
|
580
|
+
async passwordChangeAfterReset(form, options) {
|
|
581
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/auth/password_change", form, options);
|
|
755
582
|
}
|
|
756
583
|
/**
|
|
757
584
|
* @summary Mark all replies as read.
|
|
758
585
|
*/
|
|
759
|
-
markAllNotificationsAsRead(options) {
|
|
760
|
-
return
|
|
761
|
-
|
|
762
|
-
|
|
586
|
+
async markAllNotificationsAsRead(options) {
|
|
587
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/mark_as_read/all", {}, options);
|
|
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);
|
|
763
594
|
}
|
|
764
595
|
/**
|
|
765
596
|
* @summary Save your user settings.
|
|
766
597
|
*/
|
|
767
|
-
saveUserSettings(form, options) {
|
|
768
|
-
return
|
|
769
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/account/settings/save", form, options);
|
|
770
|
-
});
|
|
598
|
+
async saveUserSettings(form, options) {
|
|
599
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/account/settings/save", form, options);
|
|
771
600
|
}
|
|
772
601
|
/**
|
|
773
602
|
* @summary Change your user password.
|
|
774
603
|
*/
|
|
775
|
-
changePassword(form, options) {
|
|
776
|
-
return
|
|
777
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/account/auth/change_password", form, options);
|
|
778
|
-
});
|
|
604
|
+
async changePassword(form, options) {
|
|
605
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/account/auth/change_password", form, options);
|
|
779
606
|
}
|
|
780
607
|
/**
|
|
781
608
|
* @summary Get counts for your reports.
|
|
782
609
|
*/
|
|
783
|
-
getReportCount(form, options) {
|
|
784
|
-
return
|
|
785
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/report_count", form, options);
|
|
786
|
-
});
|
|
610
|
+
async getReportCount(form, options) {
|
|
611
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/report_count", form, options);
|
|
787
612
|
}
|
|
788
613
|
/**
|
|
789
614
|
* @summary Get your unread counts.
|
|
790
615
|
*/
|
|
791
|
-
getUnreadCount(options) {
|
|
792
|
-
return
|
|
793
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/unread_count", {}, options);
|
|
794
|
-
});
|
|
616
|
+
async getUnreadCount(options) {
|
|
617
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/unread_count", {}, options);
|
|
795
618
|
}
|
|
796
619
|
/**
|
|
797
620
|
* @summary Get your inbox (replies, comment mentions, post mentions, and messages)
|
|
798
621
|
*/
|
|
799
|
-
|
|
800
|
-
return
|
|
801
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/inbox", form, options);
|
|
802
|
-
});
|
|
622
|
+
async listNotifications(form, options) {
|
|
623
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/notifications", form, options);
|
|
803
624
|
}
|
|
804
625
|
/**
|
|
805
626
|
* @summary Verify your email
|
|
806
627
|
*/
|
|
807
|
-
verifyEmail(form, options) {
|
|
808
|
-
return
|
|
809
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/auth/verify_email", form, options);
|
|
810
|
-
});
|
|
628
|
+
async verifyEmail(form, options) {
|
|
629
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/auth/verify_email", form, options);
|
|
811
630
|
}
|
|
812
631
|
/**
|
|
813
632
|
* @summary Resend a verification email.
|
|
814
633
|
*/
|
|
815
|
-
resendVerificationEmail(form, options) {
|
|
816
|
-
return
|
|
817
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/auth/resend_verification_email", form, options);
|
|
818
|
-
});
|
|
634
|
+
async resendVerificationEmail(form, options) {
|
|
635
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/auth/resend_verification_email", form, options);
|
|
819
636
|
}
|
|
820
637
|
/**
|
|
821
638
|
* @summary List your saved content.
|
|
822
639
|
*/
|
|
823
|
-
listPersonSaved(form, options) {
|
|
824
|
-
return
|
|
825
|
-
|
|
826
|
-
|
|
640
|
+
async listPersonSaved(form, options) {
|
|
641
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/saved", form, options);
|
|
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);
|
|
827
660
|
}
|
|
828
661
|
/**
|
|
829
662
|
* @summary Add an admin to your site.
|
|
830
663
|
*/
|
|
831
|
-
addAdmin(form, options) {
|
|
832
|
-
return
|
|
833
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/admin/add", form, options);
|
|
834
|
-
});
|
|
664
|
+
async addAdmin(form, options) {
|
|
665
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/admin/add", form, options);
|
|
835
666
|
}
|
|
836
667
|
/**
|
|
837
668
|
* @summary Get the unread registration applications count.
|
|
838
669
|
*/
|
|
839
|
-
getUnreadRegistrationApplicationCount(options) {
|
|
840
|
-
return
|
|
841
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/admin/registration_application/count", {}, options);
|
|
842
|
-
});
|
|
670
|
+
async getUnreadRegistrationApplicationCount(options) {
|
|
671
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/admin/registration_application/count", {}, options);
|
|
843
672
|
}
|
|
844
673
|
/**
|
|
845
674
|
* @summary List the registration applications.
|
|
846
675
|
*/
|
|
847
|
-
listRegistrationApplications(form, options) {
|
|
848
|
-
return
|
|
849
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/admin/registration_application/list", form, options);
|
|
850
|
-
});
|
|
676
|
+
async listRegistrationApplications(form, options) {
|
|
677
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/admin/registration_application/list", form, options);
|
|
851
678
|
}
|
|
852
679
|
/**
|
|
853
680
|
* @summary Approve a registration application
|
|
854
681
|
*/
|
|
855
|
-
approveRegistrationApplication(form, options) {
|
|
856
|
-
return
|
|
857
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/admin/registration_application/approve", form, options);
|
|
858
|
-
});
|
|
682
|
+
async approveRegistrationApplication(form, options) {
|
|
683
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/admin/registration_application/approve", form, options);
|
|
859
684
|
}
|
|
860
685
|
/**
|
|
861
686
|
* @summary Get the application a user submitted when they first registered their account
|
|
862
687
|
*/
|
|
863
|
-
getRegistrationApplication(form, options) {
|
|
864
|
-
return
|
|
865
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/admin/registration_application", form, options);
|
|
866
|
-
});
|
|
688
|
+
async getRegistrationApplication(form, options) {
|
|
689
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/admin/registration_application", form, options);
|
|
867
690
|
}
|
|
868
691
|
/**
|
|
869
692
|
* @summary Purge / Delete a person from the database.
|
|
870
693
|
*/
|
|
871
|
-
purgePerson(form, options) {
|
|
872
|
-
return
|
|
873
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/admin/purge/person", form, options);
|
|
874
|
-
});
|
|
694
|
+
async purgePerson(form, options) {
|
|
695
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/admin/purge/person", form, options);
|
|
875
696
|
}
|
|
876
697
|
/**
|
|
877
698
|
* @summary Purge / Delete a community from the database.
|
|
878
699
|
*/
|
|
879
|
-
purgeCommunity(form, options) {
|
|
880
|
-
return
|
|
881
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/admin/purge/community", form, options);
|
|
882
|
-
});
|
|
700
|
+
async purgeCommunity(form, options) {
|
|
701
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/admin/purge/community", form, options);
|
|
883
702
|
}
|
|
884
703
|
/**
|
|
885
704
|
* @summary Purge / Delete a post from the database.
|
|
886
705
|
*/
|
|
887
|
-
purgePost(form, options) {
|
|
888
|
-
return
|
|
889
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/admin/purge/post", form, options);
|
|
890
|
-
});
|
|
706
|
+
async purgePost(form, options) {
|
|
707
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/admin/purge/post", form, options);
|
|
891
708
|
}
|
|
892
709
|
/**
|
|
893
710
|
* @summary Purge / Delete a comment from the database.
|
|
894
711
|
*/
|
|
895
|
-
purgeComment(form, options) {
|
|
896
|
-
return
|
|
897
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/admin/purge/comment", form, options);
|
|
898
|
-
});
|
|
712
|
+
async purgeComment(form, options) {
|
|
713
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/admin/purge/comment", form, options);
|
|
899
714
|
}
|
|
900
715
|
/**
|
|
901
716
|
* @summary Create a new custom emoji.
|
|
902
717
|
*/
|
|
903
|
-
createCustomEmoji(form, options) {
|
|
904
|
-
return
|
|
905
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/custom_emoji", form, options);
|
|
906
|
-
});
|
|
718
|
+
async createCustomEmoji(form, options) {
|
|
719
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/custom_emoji", form, options);
|
|
907
720
|
}
|
|
908
721
|
/**
|
|
909
722
|
* @summary Edit an existing custom emoji.
|
|
910
723
|
*/
|
|
911
|
-
editCustomEmoji(form, options) {
|
|
912
|
-
return
|
|
913
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/custom_emoji", form, options);
|
|
914
|
-
});
|
|
724
|
+
async editCustomEmoji(form, options) {
|
|
725
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/custom_emoji", form, options);
|
|
915
726
|
}
|
|
916
727
|
/**
|
|
917
728
|
* @summary Delete a custom emoji.
|
|
918
729
|
*/
|
|
919
|
-
deleteCustomEmoji(form, options) {
|
|
920
|
-
return
|
|
921
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/custom_emoji/delete", form, options);
|
|
922
|
-
});
|
|
730
|
+
async deleteCustomEmoji(form, options) {
|
|
731
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/custom_emoji/delete", form, options);
|
|
923
732
|
}
|
|
924
733
|
/**
|
|
925
734
|
* @summary List custom emojis
|
|
926
735
|
*/
|
|
927
|
-
listCustomEmojis(form, options) {
|
|
928
|
-
return
|
|
929
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/custom_emoji/list", form, options);
|
|
930
|
-
});
|
|
736
|
+
async listCustomEmojis(form, options) {
|
|
737
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/custom_emoji/list", form, options);
|
|
931
738
|
}
|
|
932
739
|
/**
|
|
933
740
|
* @summary Create a new tagline
|
|
934
741
|
*/
|
|
935
|
-
createTagline(form, options) {
|
|
936
|
-
return
|
|
937
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/admin/tagline", form, options);
|
|
938
|
-
});
|
|
742
|
+
async createTagline(form, options) {
|
|
743
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/admin/tagline", form, options);
|
|
939
744
|
}
|
|
940
745
|
/**
|
|
941
746
|
* @summary Edit an existing tagline
|
|
942
747
|
*/
|
|
943
|
-
editTagline(form, options) {
|
|
944
|
-
return
|
|
945
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/admin/tagline", form, options);
|
|
946
|
-
});
|
|
748
|
+
async editTagline(form, options) {
|
|
749
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/admin/tagline", form, options);
|
|
947
750
|
}
|
|
948
751
|
/**
|
|
949
752
|
* @summary Delete a tagline
|
|
950
753
|
*/
|
|
951
|
-
deleteTagline(form, options) {
|
|
952
|
-
return
|
|
953
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/admin/tagline/delete", form, options);
|
|
954
|
-
});
|
|
754
|
+
async deleteTagline(form, options) {
|
|
755
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/admin/tagline/delete", form, options);
|
|
955
756
|
}
|
|
956
757
|
/**
|
|
957
758
|
* @summary List taglines.
|
|
958
759
|
*/
|
|
959
|
-
listTaglines(form, options) {
|
|
960
|
-
return
|
|
961
|
-
|
|
962
|
-
|
|
760
|
+
async listTaglines(form, options) {
|
|
761
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/admin/tagline/list", form, options);
|
|
762
|
+
}
|
|
763
|
+
/**
|
|
764
|
+
* @summary Create a community post tag.
|
|
765
|
+
*/
|
|
766
|
+
createCommunityTag(form, options) {
|
|
767
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/community/tag", form, options);
|
|
768
|
+
}
|
|
769
|
+
/**
|
|
770
|
+
* @summary Edit a community post tag.
|
|
771
|
+
*/
|
|
772
|
+
updateCommunityTag(form, options) {
|
|
773
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/community/tag", form, options);
|
|
774
|
+
}
|
|
775
|
+
/**
|
|
776
|
+
* @summary Delete a post tag in a community.
|
|
777
|
+
*/
|
|
778
|
+
deleteCommunityTag(form, options) {
|
|
779
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/community/tag", form, options);
|
|
963
780
|
}
|
|
964
781
|
/**
|
|
965
782
|
* @summary Create a new oauth provider method
|
|
966
783
|
*/
|
|
967
|
-
createOAuthProvider(form, options) {
|
|
968
|
-
return
|
|
969
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/oauth_provider", form, options);
|
|
970
|
-
});
|
|
784
|
+
async createOAuthProvider(form, options) {
|
|
785
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/oauth_provider", form, options);
|
|
971
786
|
}
|
|
972
787
|
/**
|
|
973
788
|
* @summary Edit an existing oauth provider method
|
|
974
789
|
*/
|
|
975
|
-
editOAuthProvider(form, options) {
|
|
976
|
-
return
|
|
977
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/oauth_provider", form, options);
|
|
978
|
-
});
|
|
790
|
+
async editOAuthProvider(form, options) {
|
|
791
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/oauth_provider", form, options);
|
|
979
792
|
}
|
|
980
793
|
/**
|
|
981
794
|
* @summary Delete an oauth provider method
|
|
982
795
|
*/
|
|
983
|
-
deleteOAuthProvider(form, options) {
|
|
984
|
-
return
|
|
985
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/oauth_provider/delete", form, options);
|
|
986
|
-
});
|
|
796
|
+
async deleteOAuthProvider(form, options) {
|
|
797
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/oauth_provider/delete", form, options);
|
|
987
798
|
}
|
|
988
799
|
/**
|
|
989
800
|
* @summary Authenticate with OAuth
|
|
990
801
|
*/
|
|
991
|
-
authenticateWithOAuth(form, options) {
|
|
992
|
-
return
|
|
993
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/oauth/authenticate", form, options);
|
|
994
|
-
});
|
|
802
|
+
async authenticateWithOAuth(form, options) {
|
|
803
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/oauth/authenticate", form, options);
|
|
995
804
|
}
|
|
996
805
|
/**
|
|
997
806
|
* @summary Fetch federated instances.
|
|
998
807
|
*/
|
|
999
|
-
getFederatedInstances(options) {
|
|
1000
|
-
return
|
|
1001
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/federated_instances", {}, options);
|
|
1002
|
-
});
|
|
808
|
+
async getFederatedInstances(options) {
|
|
809
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/federated_instances", {}, options);
|
|
1003
810
|
}
|
|
1004
811
|
/**
|
|
1005
812
|
* @summary List user reports.
|
|
1006
813
|
*/
|
|
1007
|
-
listReports(form, options) {
|
|
1008
|
-
return
|
|
1009
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/report/list", form, options);
|
|
1010
|
-
});
|
|
814
|
+
async listReports(form, options) {
|
|
815
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/report/list", form, options);
|
|
1011
816
|
}
|
|
1012
817
|
/**
|
|
1013
|
-
* @summary Block an instance as user.
|
|
818
|
+
* @summary Block an instance's communities as a user.
|
|
1014
819
|
*/
|
|
1015
|
-
|
|
1016
|
-
return
|
|
1017
|
-
|
|
1018
|
-
|
|
820
|
+
async userBlockInstanceCommunities(form, options) {
|
|
821
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/block/instance/communities", form, options);
|
|
822
|
+
}
|
|
823
|
+
/**
|
|
824
|
+
* @summary Block an instance's persons as a user.
|
|
825
|
+
*/
|
|
826
|
+
async userBlockInstancePersons(form, options) {
|
|
827
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/block/instance/persons", form, options);
|
|
1019
828
|
}
|
|
1020
829
|
/**
|
|
1021
830
|
* @summary Globally block an instance as admin.
|
|
1022
831
|
*/
|
|
1023
|
-
adminBlockInstance(form, options) {
|
|
1024
|
-
return
|
|
1025
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/admin/instance/block", form, options);
|
|
1026
|
-
});
|
|
832
|
+
async adminBlockInstance(form, options) {
|
|
833
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/admin/instance/block", form, options);
|
|
1027
834
|
}
|
|
1028
835
|
/**
|
|
1029
836
|
* @summary Globally allow an instance as admin.
|
|
1030
837
|
*/
|
|
1031
|
-
adminAllowInstance(form, options) {
|
|
1032
|
-
return
|
|
1033
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/admin/instance/allow", form, options);
|
|
1034
|
-
});
|
|
838
|
+
async adminAllowInstance(form, options) {
|
|
839
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/admin/instance/allow", form, options);
|
|
1035
840
|
}
|
|
1036
841
|
/**
|
|
1037
842
|
* @summary Upload new user avatar.
|
|
1038
843
|
*/
|
|
1039
|
-
uploadUserAvatar(image, options) {
|
|
1040
|
-
return
|
|
1041
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_upload).call(this, "/account/avatar", image, options);
|
|
1042
|
-
});
|
|
844
|
+
async uploadUserAvatar(image, options) {
|
|
845
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_upload).call(this, "/account/avatar", image, options);
|
|
1043
846
|
}
|
|
1044
847
|
/**
|
|
1045
848
|
* @summary Delete the user avatar.
|
|
1046
849
|
*/
|
|
1047
|
-
deleteUserAvatar(options) {
|
|
1048
|
-
return
|
|
1049
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/account/avatar", {}, options);
|
|
1050
|
-
});
|
|
850
|
+
async deleteUserAvatar(options) {
|
|
851
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/account/avatar", {}, options);
|
|
1051
852
|
}
|
|
1052
853
|
/**
|
|
1053
854
|
* @summary Upload new user banner.
|
|
1054
855
|
*/
|
|
1055
|
-
uploadUserBanner(image, options) {
|
|
1056
|
-
return
|
|
1057
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_upload).call(this, "/account/banner", image, options);
|
|
1058
|
-
});
|
|
856
|
+
async uploadUserBanner(image, options) {
|
|
857
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_upload).call(this, "/account/banner", image, options);
|
|
1059
858
|
}
|
|
1060
859
|
/**
|
|
1061
860
|
* @summary Delete the user banner.
|
|
1062
861
|
*/
|
|
1063
|
-
deleteUserBanner(options) {
|
|
1064
|
-
return
|
|
1065
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/account/banner", {}, options);
|
|
1066
|
-
});
|
|
862
|
+
async deleteUserBanner(options) {
|
|
863
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/account/banner", {}, options);
|
|
1067
864
|
}
|
|
1068
865
|
/**
|
|
1069
866
|
* @summary Upload new community icon.
|
|
1070
867
|
*/
|
|
1071
|
-
uploadCommunityIcon(image, options) {
|
|
1072
|
-
return
|
|
1073
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_upload).call(this, "/community/icon", image, options);
|
|
1074
|
-
});
|
|
868
|
+
async uploadCommunityIcon(query, image, options) {
|
|
869
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_uploadWithQuery).call(this, "/community/icon", query, image, options);
|
|
1075
870
|
}
|
|
1076
871
|
/**
|
|
1077
872
|
* @summary Delete the community icon.
|
|
1078
873
|
*/
|
|
1079
|
-
deleteCommunityIcon(options) {
|
|
1080
|
-
return
|
|
1081
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/community/icon", {}, options);
|
|
1082
|
-
});
|
|
874
|
+
async deleteCommunityIcon(form, options) {
|
|
875
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/community/icon", form, options);
|
|
1083
876
|
}
|
|
1084
877
|
/**
|
|
1085
878
|
* @summary Upload new community banner.
|
|
1086
879
|
*/
|
|
1087
|
-
uploadCommunityBanner(image, options) {
|
|
1088
|
-
return
|
|
1089
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_upload).call(this, "/community/banner", image, options);
|
|
1090
|
-
});
|
|
880
|
+
async uploadCommunityBanner(query, image, options) {
|
|
881
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_uploadWithQuery).call(this, "/community/banner", query, image, options);
|
|
1091
882
|
}
|
|
1092
883
|
/**
|
|
1093
884
|
* @summary Delete the community banner.
|
|
1094
885
|
*/
|
|
1095
|
-
deleteCommunityBanner(options) {
|
|
1096
|
-
return
|
|
1097
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/community/banner", {}, options);
|
|
1098
|
-
});
|
|
886
|
+
async deleteCommunityBanner(form, options) {
|
|
887
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/community/banner", form, options);
|
|
1099
888
|
}
|
|
1100
889
|
/**
|
|
1101
890
|
* @summary Upload new site icon.
|
|
1102
891
|
*/
|
|
1103
|
-
uploadSiteIcon(image, options) {
|
|
1104
|
-
return
|
|
1105
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_upload).call(this, "/site/icon", image, options);
|
|
1106
|
-
});
|
|
892
|
+
async uploadSiteIcon(image, options) {
|
|
893
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_upload).call(this, "/site/icon", image, options);
|
|
1107
894
|
}
|
|
1108
895
|
/**
|
|
1109
896
|
* @summary Delete the site icon.
|
|
1110
897
|
*/
|
|
1111
|
-
deleteSiteIcon(options) {
|
|
1112
|
-
return
|
|
1113
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/site/icon", {}, options);
|
|
1114
|
-
});
|
|
898
|
+
async deleteSiteIcon(options) {
|
|
899
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/site/icon", {}, options);
|
|
1115
900
|
}
|
|
1116
901
|
/**
|
|
1117
902
|
* @summary Upload new site banner.
|
|
1118
903
|
*/
|
|
1119
|
-
uploadSiteBanner(image, options) {
|
|
1120
|
-
return
|
|
1121
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_upload).call(this, "/site/banner", image, options);
|
|
1122
|
-
});
|
|
904
|
+
async uploadSiteBanner(image, options) {
|
|
905
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_upload).call(this, "/site/banner", image, options);
|
|
1123
906
|
}
|
|
1124
907
|
/**
|
|
1125
908
|
* @summary Delete the site banner.
|
|
1126
909
|
*/
|
|
1127
|
-
deleteSiteBanner(options) {
|
|
1128
|
-
return
|
|
1129
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/site/banner", {}, options);
|
|
1130
|
-
});
|
|
910
|
+
async deleteSiteBanner(options) {
|
|
911
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/site/banner", {}, options);
|
|
1131
912
|
}
|
|
1132
913
|
/**
|
|
1133
914
|
* @summary Upload an image to the server.
|
|
1134
915
|
*/
|
|
1135
|
-
uploadImage(image, options) {
|
|
1136
|
-
return
|
|
1137
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_upload).call(this, "/image", image, options);
|
|
1138
|
-
});
|
|
916
|
+
async uploadImage(image, options) {
|
|
917
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_upload).call(this, "/image", image, options);
|
|
1139
918
|
}
|
|
1140
919
|
/**
|
|
1141
920
|
* @summary Health check for image functionality
|
|
1142
921
|
*/
|
|
1143
|
-
imageHealth(options) {
|
|
1144
|
-
return
|
|
1145
|
-
|
|
1146
|
-
|
|
922
|
+
async imageHealth(options) {
|
|
923
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/image/health", {}, options);
|
|
924
|
+
}
|
|
925
|
+
/**
|
|
926
|
+
* Mark donation dialog as shown, so it isn't displayed anymore.
|
|
927
|
+
*/
|
|
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);
|
|
1147
963
|
}
|
|
1148
964
|
/**
|
|
1149
965
|
* Set the headers (can be used to set the auth header)
|
|
@@ -1160,38 +976,55 @@ _LemmyHttp_instances = new WeakSet();
|
|
|
1160
976
|
_LemmyHttp_buildFullUrl = function _LemmyHttp_buildFullUrl(endpoint) {
|
|
1161
977
|
return `${__classPrivateFieldGet(this, _LemmyHttp_apiUrl, "f")}${endpoint}`;
|
|
1162
978
|
};
|
|
1163
|
-
_LemmyHttp_upload = function _LemmyHttp_upload(
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
979
|
+
_LemmyHttp_upload = async function _LemmyHttp_upload(path, { image }, options) {
|
|
980
|
+
const formData = createFormData(image);
|
|
981
|
+
const response = await __classPrivateFieldGet(this, _LemmyHttp_fetchFunction, "f").call(this, __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_buildFullUrl).call(this, path), {
|
|
982
|
+
...options,
|
|
983
|
+
method: HttpType.Post,
|
|
984
|
+
body: formData,
|
|
985
|
+
headers: __classPrivateFieldGet(this, _LemmyHttp_headers, "f"),
|
|
1168
986
|
});
|
|
987
|
+
return response.json();
|
|
1169
988
|
};
|
|
1170
|
-
|
|
1171
|
-
return
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
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
|
+
};
|
|
992
|
+
_LemmyHttp_wrapper = async function _LemmyHttp_wrapper(type_, endpoint, form, options) {
|
|
993
|
+
let response;
|
|
994
|
+
if (type_ === HttpType.Get) {
|
|
995
|
+
const getUrl = `${__classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_buildFullUrl).call(this, endpoint)}?${encodeGetParams(form)}`;
|
|
996
|
+
response = await __classPrivateFieldGet(this, _LemmyHttp_fetchFunction, "f").call(this, getUrl, {
|
|
997
|
+
...options,
|
|
998
|
+
method: HttpType.Get,
|
|
999
|
+
headers: __classPrivateFieldGet(this, _LemmyHttp_headers, "f"),
|
|
1000
|
+
});
|
|
1001
|
+
}
|
|
1002
|
+
else {
|
|
1003
|
+
response = await __classPrivateFieldGet(this, _LemmyHttp_fetchFunction, "f").call(this, __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_buildFullUrl).call(this, endpoint), {
|
|
1004
|
+
...options,
|
|
1005
|
+
method: type_,
|
|
1006
|
+
headers: {
|
|
1007
|
+
"Content-Type": "application/json",
|
|
1008
|
+
...__classPrivateFieldGet(this, _LemmyHttp_headers, "f"),
|
|
1009
|
+
},
|
|
1010
|
+
body: JSON.stringify(form),
|
|
1011
|
+
});
|
|
1012
|
+
}
|
|
1013
|
+
let json = undefined;
|
|
1014
|
+
try {
|
|
1015
|
+
json = await response.json();
|
|
1016
|
+
}
|
|
1017
|
+
catch {
|
|
1018
|
+
throw new LemmyError(response.statusText);
|
|
1019
|
+
}
|
|
1020
|
+
if (!response.ok) {
|
|
1021
|
+
console.error(`Request error while calling ${type_} ${endpoint} with ${form}`);
|
|
1022
|
+
let err = new LemmyError(json.error ?? response.statusText, json.message);
|
|
1023
|
+
throw err;
|
|
1024
|
+
}
|
|
1025
|
+
else {
|
|
1026
|
+
return json;
|
|
1027
|
+
}
|
|
1195
1028
|
};
|
|
1196
1029
|
__decorate([
|
|
1197
1030
|
(0, runtime_1.Security)("bearerAuth"),
|
|
@@ -1432,6 +1265,20 @@ __decorate([
|
|
|
1432
1265
|
__param(0, (0, runtime_1.Queries)()),
|
|
1433
1266
|
__param(1, (0, runtime_1.Inject)())
|
|
1434
1267
|
], LemmyHttp.prototype, "getRandomCommunity", null);
|
|
1268
|
+
__decorate([
|
|
1269
|
+
(0, runtime_1.Security)("bearerAuth"),
|
|
1270
|
+
(0, runtime_1.Post)("/community/report"),
|
|
1271
|
+
(0, runtime_1.Tags)("Community"),
|
|
1272
|
+
__param(0, (0, runtime_1.Body)()),
|
|
1273
|
+
__param(1, (0, runtime_1.Inject)())
|
|
1274
|
+
], LemmyHttp.prototype, "createCommunityReport", null);
|
|
1275
|
+
__decorate([
|
|
1276
|
+
(0, runtime_1.Security)("bearerAuth"),
|
|
1277
|
+
(0, runtime_1.Put)("/community/report/resolve"),
|
|
1278
|
+
(0, runtime_1.Tags)("Community", "Admin"),
|
|
1279
|
+
__param(0, (0, runtime_1.Body)()),
|
|
1280
|
+
__param(1, (0, runtime_1.Inject)())
|
|
1281
|
+
], LemmyHttp.prototype, "resolveCommunityReport", null);
|
|
1435
1282
|
__decorate([
|
|
1436
1283
|
(0, runtime_1.Security)("bearerAuth"),
|
|
1437
1284
|
(0, runtime_1.Post)("/post"),
|
|
@@ -1454,6 +1301,13 @@ __decorate([
|
|
|
1454
1301
|
__param(0, (0, runtime_1.Body)()),
|
|
1455
1302
|
__param(1, (0, runtime_1.Inject)())
|
|
1456
1303
|
], LemmyHttp.prototype, "editPost", null);
|
|
1304
|
+
__decorate([
|
|
1305
|
+
(0, runtime_1.Security)("bearerAuth"),
|
|
1306
|
+
(0, runtime_1.Put)("/post/mod_update"),
|
|
1307
|
+
(0, runtime_1.Tags)("Post"),
|
|
1308
|
+
__param(0, (0, runtime_1.Body)()),
|
|
1309
|
+
__param(1, (0, runtime_1.Inject)())
|
|
1310
|
+
], LemmyHttp.prototype, "modEditPost", null);
|
|
1457
1311
|
__decorate([
|
|
1458
1312
|
(0, runtime_1.Security)("bearerAuth"),
|
|
1459
1313
|
(0, runtime_1.Post)("/post/delete"),
|
|
@@ -1583,11 +1437,11 @@ __decorate([
|
|
|
1583
1437
|
], LemmyHttp.prototype, "removeComment", null);
|
|
1584
1438
|
__decorate([
|
|
1585
1439
|
(0, runtime_1.Security)("bearerAuth"),
|
|
1586
|
-
(0, runtime_1.Post)("/comment/
|
|
1587
|
-
(0, runtime_1.Tags)("Comment"),
|
|
1440
|
+
(0, runtime_1.Post)("/comment/lock"),
|
|
1441
|
+
(0, runtime_1.Tags)("Comment", "Moderator"),
|
|
1588
1442
|
__param(0, (0, runtime_1.Body)()),
|
|
1589
1443
|
__param(1, (0, runtime_1.Inject)())
|
|
1590
|
-
], LemmyHttp.prototype, "
|
|
1444
|
+
], LemmyHttp.prototype, "lockComment", null);
|
|
1591
1445
|
__decorate([
|
|
1592
1446
|
(0, runtime_1.Security)("bearerAuth"),
|
|
1593
1447
|
(0, runtime_1.Post)("/comment/like"),
|
|
@@ -1675,13 +1529,6 @@ __decorate([
|
|
|
1675
1529
|
__param(0, (0, runtime_1.Body)()),
|
|
1676
1530
|
__param(1, (0, runtime_1.Inject)())
|
|
1677
1531
|
], LemmyHttp.prototype, "deletePrivateMessage", null);
|
|
1678
|
-
__decorate([
|
|
1679
|
-
(0, runtime_1.Security)("bearerAuth"),
|
|
1680
|
-
(0, runtime_1.Post)("/private_message/mark_as_read"),
|
|
1681
|
-
(0, runtime_1.Tags)("PrivateMessage"),
|
|
1682
|
-
__param(0, (0, runtime_1.Body)()),
|
|
1683
|
-
__param(1, (0, runtime_1.Inject)())
|
|
1684
|
-
], LemmyHttp.prototype, "markPrivateMessageAsRead", null);
|
|
1685
1532
|
__decorate([
|
|
1686
1533
|
(0, runtime_1.Security)("bearerAuth"),
|
|
1687
1534
|
(0, runtime_1.Post)("/private_message/report"),
|
|
@@ -1732,18 +1579,11 @@ __decorate([
|
|
|
1732
1579
|
], LemmyHttp.prototype, "listPersonContent", null);
|
|
1733
1580
|
__decorate([
|
|
1734
1581
|
(0, runtime_1.Security)("bearerAuth"),
|
|
1735
|
-
(0, runtime_1.Post)("/
|
|
1736
|
-
(0, runtime_1.Tags)("
|
|
1737
|
-
__param(0, (0, runtime_1.Body)()),
|
|
1738
|
-
__param(1, (0, runtime_1.Inject)())
|
|
1739
|
-
], LemmyHttp.prototype, "markCommentMentionAsRead", null);
|
|
1740
|
-
__decorate([
|
|
1741
|
-
(0, runtime_1.Security)("bearerAuth"),
|
|
1742
|
-
(0, runtime_1.Post)("/account/mention/post/mark_as_read"),
|
|
1743
|
-
(0, runtime_1.Tags)("Account", "Post"),
|
|
1582
|
+
(0, runtime_1.Post)("/person/note"),
|
|
1583
|
+
(0, runtime_1.Tags)("Person"),
|
|
1744
1584
|
__param(0, (0, runtime_1.Body)()),
|
|
1745
1585
|
__param(1, (0, runtime_1.Inject)())
|
|
1746
|
-
], LemmyHttp.prototype, "
|
|
1586
|
+
], LemmyHttp.prototype, "notePerson", null);
|
|
1747
1587
|
__decorate([
|
|
1748
1588
|
(0, runtime_1.Security)("bearerAuth"),
|
|
1749
1589
|
(0, runtime_1.Post)("/admin/ban"),
|
|
@@ -1753,11 +1593,11 @@ __decorate([
|
|
|
1753
1593
|
], LemmyHttp.prototype, "banPerson", null);
|
|
1754
1594
|
__decorate([
|
|
1755
1595
|
(0, runtime_1.Security)("bearerAuth"),
|
|
1756
|
-
(0, runtime_1.Get)("/admin/
|
|
1596
|
+
(0, runtime_1.Get)("/admin/users"),
|
|
1757
1597
|
(0, runtime_1.Tags)("Admin", "Miscellaneous"),
|
|
1758
1598
|
__param(0, (0, runtime_1.Queries)()),
|
|
1759
1599
|
__param(1, (0, runtime_1.Inject)())
|
|
1760
|
-
], LemmyHttp.prototype, "
|
|
1600
|
+
], LemmyHttp.prototype, "listUsers", null);
|
|
1761
1601
|
__decorate([
|
|
1762
1602
|
(0, runtime_1.Security)("bearerAuth"),
|
|
1763
1603
|
(0, runtime_1.Post)("/account/block/person"),
|
|
@@ -1797,6 +1637,13 @@ __decorate([
|
|
|
1797
1637
|
(0, runtime_1.Tags)("Account"),
|
|
1798
1638
|
__param(0, (0, runtime_1.Inject)())
|
|
1799
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);
|
|
1800
1647
|
__decorate([
|
|
1801
1648
|
(0, runtime_1.Security)("bearerAuth"),
|
|
1802
1649
|
(0, runtime_1.Put)("/account/settings/save"),
|
|
@@ -1826,11 +1673,11 @@ __decorate([
|
|
|
1826
1673
|
], LemmyHttp.prototype, "getUnreadCount", null);
|
|
1827
1674
|
__decorate([
|
|
1828
1675
|
(0, runtime_1.Security)("bearerAuth"),
|
|
1829
|
-
(0, runtime_1.Get)("/account/
|
|
1676
|
+
(0, runtime_1.Get)("/account/notifications"),
|
|
1830
1677
|
(0, runtime_1.Tags)("Account"),
|
|
1831
1678
|
__param(0, (0, runtime_1.Queries)()),
|
|
1832
1679
|
__param(1, (0, runtime_1.Inject)())
|
|
1833
|
-
], LemmyHttp.prototype, "
|
|
1680
|
+
], LemmyHttp.prototype, "listNotifications", null);
|
|
1834
1681
|
__decorate([
|
|
1835
1682
|
(0, runtime_1.Post)("/account/auth/verify_email"),
|
|
1836
1683
|
(0, runtime_1.Tags)("Account"),
|
|
@@ -1850,6 +1697,27 @@ __decorate([
|
|
|
1850
1697
|
__param(0, (0, runtime_1.Queries)()),
|
|
1851
1698
|
__param(1, (0, runtime_1.Inject)())
|
|
1852
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);
|
|
1853
1721
|
__decorate([
|
|
1854
1722
|
(0, runtime_1.Security)("bearerAuth"),
|
|
1855
1723
|
(0, runtime_1.Post)("/admin/add"),
|
|
@@ -1970,6 +1838,27 @@ __decorate([
|
|
|
1970
1838
|
__param(0, (0, runtime_1.Queries)()),
|
|
1971
1839
|
__param(1, (0, runtime_1.Inject)())
|
|
1972
1840
|
], LemmyHttp.prototype, "listTaglines", null);
|
|
1841
|
+
__decorate([
|
|
1842
|
+
(0, runtime_1.Security)("bearerAuth"),
|
|
1843
|
+
(0, runtime_1.Post)("/community/tag"),
|
|
1844
|
+
(0, runtime_1.Tags)("Community"),
|
|
1845
|
+
__param(0, (0, runtime_1.Body)()),
|
|
1846
|
+
__param(1, (0, runtime_1.Inject)())
|
|
1847
|
+
], LemmyHttp.prototype, "createCommunityTag", null);
|
|
1848
|
+
__decorate([
|
|
1849
|
+
(0, runtime_1.Security)("bearerAuth"),
|
|
1850
|
+
(0, runtime_1.Put)("/community/tag"),
|
|
1851
|
+
(0, runtime_1.Tags)("Community"),
|
|
1852
|
+
__param(0, (0, runtime_1.Body)()),
|
|
1853
|
+
__param(1, (0, runtime_1.Inject)())
|
|
1854
|
+
], LemmyHttp.prototype, "updateCommunityTag", null);
|
|
1855
|
+
__decorate([
|
|
1856
|
+
(0, runtime_1.Security)("bearerAuth"),
|
|
1857
|
+
(0, runtime_1.Delete)("/community/tag"),
|
|
1858
|
+
(0, runtime_1.Tags)("Community"),
|
|
1859
|
+
__param(0, (0, runtime_1.Body)()),
|
|
1860
|
+
__param(1, (0, runtime_1.Inject)())
|
|
1861
|
+
], LemmyHttp.prototype, "deleteCommunityTag", null);
|
|
1973
1862
|
__decorate([
|
|
1974
1863
|
(0, runtime_1.Security)("bearerAuth"),
|
|
1975
1864
|
(0, runtime_1.Post)("/oauth_provider"),
|
|
@@ -2012,11 +1901,18 @@ __decorate([
|
|
|
2012
1901
|
], LemmyHttp.prototype, "listReports", null);
|
|
2013
1902
|
__decorate([
|
|
2014
1903
|
(0, runtime_1.Security)("bearerAuth"),
|
|
2015
|
-
(0, runtime_1.Post)("/account/block/instance"),
|
|
2016
|
-
(0, runtime_1.Tags)("Account"),
|
|
1904
|
+
(0, runtime_1.Post)("/account/block/instance/communities"),
|
|
1905
|
+
(0, runtime_1.Tags)("Account", "Community"),
|
|
2017
1906
|
__param(0, (0, runtime_1.Body)()),
|
|
2018
1907
|
__param(1, (0, runtime_1.Inject)())
|
|
2019
|
-
], 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);
|
|
2020
1916
|
__decorate([
|
|
2021
1917
|
(0, runtime_1.Security)("bearerAuth"),
|
|
2022
1918
|
(0, runtime_1.Post)("/admin/instance/block"),
|
|
@@ -2061,27 +1957,31 @@ __decorate([
|
|
|
2061
1957
|
(0, runtime_1.Security)("bearerAuth"),
|
|
2062
1958
|
(0, runtime_1.Post)("/community/icon"),
|
|
2063
1959
|
(0, runtime_1.Tags)("Community", "Media"),
|
|
2064
|
-
__param(0, (0, runtime_1.
|
|
2065
|
-
__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)())
|
|
2066
1963
|
], LemmyHttp.prototype, "uploadCommunityIcon", null);
|
|
2067
1964
|
__decorate([
|
|
2068
1965
|
(0, runtime_1.Security)("bearerAuth"),
|
|
2069
1966
|
(0, runtime_1.Delete)("/community/icon"),
|
|
2070
1967
|
(0, runtime_1.Tags)("Community", "Media"),
|
|
2071
|
-
__param(0, (0, runtime_1.
|
|
1968
|
+
__param(0, (0, runtime_1.Body)()),
|
|
1969
|
+
__param(1, (0, runtime_1.Inject)())
|
|
2072
1970
|
], LemmyHttp.prototype, "deleteCommunityIcon", null);
|
|
2073
1971
|
__decorate([
|
|
2074
1972
|
(0, runtime_1.Security)("bearerAuth"),
|
|
2075
1973
|
(0, runtime_1.Post)("/community/banner"),
|
|
2076
1974
|
(0, runtime_1.Tags)("Community", "Media"),
|
|
2077
|
-
__param(0, (0, runtime_1.
|
|
2078
|
-
__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)())
|
|
2079
1978
|
], LemmyHttp.prototype, "uploadCommunityBanner", null);
|
|
2080
1979
|
__decorate([
|
|
2081
1980
|
(0, runtime_1.Security)("bearerAuth"),
|
|
2082
1981
|
(0, runtime_1.Delete)("/community/banner"),
|
|
2083
1982
|
(0, runtime_1.Tags)("Community", "Media"),
|
|
2084
|
-
__param(0, (0, runtime_1.
|
|
1983
|
+
__param(0, (0, runtime_1.Body)()),
|
|
1984
|
+
__param(1, (0, runtime_1.Inject)())
|
|
2085
1985
|
], LemmyHttp.prototype, "deleteCommunityBanner", null);
|
|
2086
1986
|
__decorate([
|
|
2087
1987
|
(0, runtime_1.Security)("bearerAuth"),
|
|
@@ -2121,6 +2021,72 @@ __decorate([
|
|
|
2121
2021
|
(0, runtime_1.Tags)("Media"),
|
|
2122
2022
|
__param(0, (0, runtime_1.Inject)())
|
|
2123
2023
|
], LemmyHttp.prototype, "imageHealth", null);
|
|
2024
|
+
__decorate([
|
|
2025
|
+
(0, runtime_1.Security)("bearerAuth"),
|
|
2026
|
+
(0, runtime_1.Post)("/account/donation_dialog_shown"),
|
|
2027
|
+
(0, runtime_1.Tags)("Account"),
|
|
2028
|
+
__param(0, (0, runtime_1.Inject)())
|
|
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);
|
|
2124
2090
|
exports.LemmyHttp = LemmyHttp = __decorate([
|
|
2125
2091
|
(0, runtime_1.Route)("api/v4")
|
|
2126
2092
|
], LemmyHttp);
|
|
@@ -2141,3 +2107,18 @@ function createFormData(image) {
|
|
|
2141
2107
|
}
|
|
2142
2108
|
return formData;
|
|
2143
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, msg) {
|
|
2118
|
+
super(msg ?? "");
|
|
2119
|
+
this.name = name;
|
|
2120
|
+
// Set the prototype explicitly.
|
|
2121
|
+
Object.setPrototypeOf(this, LemmyError.prototype);
|
|
2122
|
+
}
|
|
2123
|
+
}
|
|
2124
|
+
exports.LemmyError = LemmyError;
|