lemmy-js-client 0.15.0-rc.2 → 0.15.0-rc.33
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/http.d.ts +5 -1
- package/dist/http.js +10 -0
- package/dist/interfaces/api/person.d.ts +6 -0
- package/dist/interfaces/api/site.d.ts +1 -1
- package/dist/interfaces/others.d.ts +34 -33
- package/dist/interfaces/others.js +34 -33
- package/dist/websocket.d.ts +5 -1
- package/dist/websocket.js +6 -0
- package/package.json +1 -1
package/dist/http.d.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { CommentReportResponse, CommentResponse, CreateComment, CreateCommentLike, CreateCommentReport, DeleteComment, EditComment, GetComments, GetCommentsResponse, ListCommentReports, ListCommentReportsResponse, MarkCommentAsRead, RemoveComment, ResolveCommentReport, SaveComment } from "./interfaces/api/comment";
|
2
2
|
import { AddModToCommunity, AddModToCommunityResponse, BanFromCommunity, BanFromCommunityResponse, BlockCommunity, BlockCommunityResponse, CommunityResponse, CreateCommunity, DeleteCommunity, EditCommunity, FollowCommunity, GetCommunity, GetCommunityResponse, ListCommunities, ListCommunitiesResponse, RemoveCommunity, TransferCommunity } from "./interfaces/api/community";
|
3
|
-
import { AddAdmin, AddAdminResponse, BanPerson, BanPersonResponse, BlockPerson, BlockPersonResponse, ChangePassword, CreatePrivateMessage, DeleteAccount, DeleteAccountResponse, DeletePrivateMessage, EditPrivateMessage, GetCaptchaResponse, GetPersonDetails, GetPersonDetailsResponse, GetPersonMentions, GetPersonMentionsResponse, GetPrivateMessages, GetReplies, GetRepliesResponse, GetReportCount, GetReportCountResponse, GetUnreadCount, GetUnreadCountResponse, Login, LoginResponse, MarkAllAsRead, MarkPersonMentionAsRead, MarkPrivateMessageAsRead, PasswordChange, PasswordReset, PasswordResetResponse, PersonMentionResponse, PrivateMessageResponse, PrivateMessagesResponse, Register, SaveUserSettings, VerifyEmail, VerifyEmailResponse } from "./interfaces/api/person";
|
3
|
+
import { AddAdmin, AddAdminResponse, BannedPersonsResponse, BanPerson, BanPersonResponse, BlockPerson, BlockPersonResponse, ChangePassword, CreatePrivateMessage, DeleteAccount, DeleteAccountResponse, DeletePrivateMessage, EditPrivateMessage, GetBannedPersons, GetCaptchaResponse, GetPersonDetails, GetPersonDetailsResponse, GetPersonMentions, GetPersonMentionsResponse, GetPrivateMessages, GetReplies, GetRepliesResponse, GetReportCount, GetReportCountResponse, GetUnreadCount, GetUnreadCountResponse, Login, LoginResponse, MarkAllAsRead, MarkPersonMentionAsRead, MarkPrivateMessageAsRead, PasswordChange, PasswordReset, PasswordResetResponse, PersonMentionResponse, PrivateMessageResponse, PrivateMessagesResponse, Register, SaveUserSettings, VerifyEmail, VerifyEmailResponse } from "./interfaces/api/person";
|
4
4
|
import { CreatePost, CreatePostLike, CreatePostReport, DeletePost, EditPost, GetPost, GetPostResponse, GetPosts, GetPostsResponse, GetSiteMetadata, GetSiteMetadataResponse, ListPostReports, ListPostReportsResponse, LockPost, PostReportResponse, PostResponse, RemovePost, ResolvePostReport, SavePost, StickyPost } from "./interfaces/api/post";
|
5
5
|
import { ApproveRegistrationApplication, CreateSite, EditSite, GetModlog, GetModlogResponse, GetSite, GetSiteConfig, GetSiteConfigResponse, GetSiteResponse, GetUnreadRegistrationApplicationCount, GetUnreadRegistrationApplicationCountResponse, ListRegistrationApplications, ListRegistrationApplicationsResponse, RegistrationApplicationResponse, ResolveObject, ResolveObjectResponse, SaveSiteConfig, Search, SearchResponse, SiteResponse, TransferSite } from "./interfaces/api/site";
|
6
6
|
/**
|
@@ -245,6 +245,10 @@ export declare class LemmyHttp {
|
|
245
245
|
* Ban a person from your site.
|
246
246
|
*/
|
247
247
|
banPerson(form: BanPerson): Promise<BanPersonResponse>;
|
248
|
+
/**
|
249
|
+
* Get a list of banned users
|
250
|
+
*/
|
251
|
+
getBannedPersons(form: GetBannedPersons): Promise<BannedPersonsResponse>;
|
248
252
|
/**
|
249
253
|
* Block a person.
|
250
254
|
*/
|
package/dist/http.js
CHANGED
@@ -642,6 +642,16 @@ var LemmyHttp = /** @class */ (function () {
|
|
642
642
|
});
|
643
643
|
});
|
644
644
|
};
|
645
|
+
/**
|
646
|
+
* Get a list of banned users
|
647
|
+
*/
|
648
|
+
LemmyHttp.prototype.getBannedPersons = function (form) {
|
649
|
+
return __awaiter(this, void 0, void 0, function () {
|
650
|
+
return __generator(this, function (_a) {
|
651
|
+
return [2 /*return*/, this.wrapper(HttpType.Get, "/user/banned", form)];
|
652
|
+
});
|
653
|
+
});
|
654
|
+
};
|
645
655
|
/**
|
646
656
|
* Block a person.
|
647
657
|
*/
|
@@ -41,6 +41,7 @@ export interface GetModlog {
|
|
41
41
|
community_id?: number;
|
42
42
|
page?: number;
|
43
43
|
limit?: number;
|
44
|
+
auth?: string;
|
44
45
|
}
|
45
46
|
export interface GetModlogResponse {
|
46
47
|
removed_posts: ModRemovePostView[];
|
@@ -98,7 +99,6 @@ export interface GetSiteResponse {
|
|
98
99
|
*/
|
99
100
|
site_view?: SiteView;
|
100
101
|
admins: PersonViewSafe[];
|
101
|
-
banned: PersonViewSafe[];
|
102
102
|
online: number;
|
103
103
|
version: string;
|
104
104
|
/**
|
@@ -45,39 +45,40 @@ export declare enum UserOperation {
|
|
45
45
|
ListRegistrationApplications = 39,
|
46
46
|
ApproveRegistrationApplication = 40,
|
47
47
|
BanPerson = 41,
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
48
|
+
GetBannedPersons = 42,
|
49
|
+
Search = 43,
|
50
|
+
ResolveObject = 44,
|
51
|
+
MarkAllAsRead = 45,
|
52
|
+
SaveUserSettings = 46,
|
53
|
+
TransferCommunity = 47,
|
54
|
+
TransferSite = 48,
|
55
|
+
DeleteAccount = 49,
|
56
|
+
PasswordReset = 50,
|
57
|
+
PasswordChange = 51,
|
58
|
+
CreatePrivateMessage = 52,
|
59
|
+
EditPrivateMessage = 53,
|
60
|
+
DeletePrivateMessage = 54,
|
61
|
+
MarkPrivateMessageAsRead = 55,
|
62
|
+
GetPrivateMessages = 56,
|
63
|
+
UserJoin = 57,
|
64
|
+
GetComments = 58,
|
65
|
+
GetSiteConfig = 59,
|
66
|
+
SaveSiteConfig = 60,
|
67
|
+
PostJoin = 61,
|
68
|
+
CommunityJoin = 62,
|
69
|
+
ChangePassword = 63,
|
70
|
+
GetSiteMetadata = 64,
|
71
|
+
BlockCommunity = 65,
|
72
|
+
BlockPerson = 66,
|
73
|
+
CreateCommentReport = 67,
|
74
|
+
ResolveCommentReport = 68,
|
75
|
+
ListCommentReports = 69,
|
76
|
+
CreatePostReport = 70,
|
77
|
+
ResolvePostReport = 71,
|
78
|
+
ListPostReports = 72,
|
79
|
+
GetReportCount = 73,
|
80
|
+
GetUnreadCount = 74,
|
81
|
+
VerifyEmail = 75
|
81
82
|
}
|
82
83
|
/**
|
83
84
|
* Different sort types used in lemmy.
|
@@ -49,39 +49,40 @@ var UserOperation;
|
|
49
49
|
UserOperation[UserOperation["ListRegistrationApplications"] = 39] = "ListRegistrationApplications";
|
50
50
|
UserOperation[UserOperation["ApproveRegistrationApplication"] = 40] = "ApproveRegistrationApplication";
|
51
51
|
UserOperation[UserOperation["BanPerson"] = 41] = "BanPerson";
|
52
|
-
UserOperation[UserOperation["
|
53
|
-
UserOperation[UserOperation["
|
54
|
-
UserOperation[UserOperation["
|
55
|
-
UserOperation[UserOperation["
|
56
|
-
UserOperation[UserOperation["
|
57
|
-
UserOperation[UserOperation["
|
58
|
-
UserOperation[UserOperation["
|
59
|
-
UserOperation[UserOperation["
|
60
|
-
UserOperation[UserOperation["
|
61
|
-
UserOperation[UserOperation["
|
62
|
-
UserOperation[UserOperation["
|
63
|
-
UserOperation[UserOperation["
|
64
|
-
UserOperation[UserOperation["
|
65
|
-
UserOperation[UserOperation["
|
66
|
-
UserOperation[UserOperation["
|
67
|
-
UserOperation[UserOperation["
|
68
|
-
UserOperation[UserOperation["
|
69
|
-
UserOperation[UserOperation["
|
70
|
-
UserOperation[UserOperation["
|
71
|
-
UserOperation[UserOperation["
|
72
|
-
UserOperation[UserOperation["
|
73
|
-
UserOperation[UserOperation["
|
74
|
-
UserOperation[UserOperation["
|
75
|
-
UserOperation[UserOperation["
|
76
|
-
UserOperation[UserOperation["
|
77
|
-
UserOperation[UserOperation["
|
78
|
-
UserOperation[UserOperation["
|
79
|
-
UserOperation[UserOperation["
|
80
|
-
UserOperation[UserOperation["
|
81
|
-
UserOperation[UserOperation["
|
82
|
-
UserOperation[UserOperation["
|
83
|
-
UserOperation[UserOperation["
|
84
|
-
UserOperation[UserOperation["
|
52
|
+
UserOperation[UserOperation["GetBannedPersons"] = 42] = "GetBannedPersons";
|
53
|
+
UserOperation[UserOperation["Search"] = 43] = "Search";
|
54
|
+
UserOperation[UserOperation["ResolveObject"] = 44] = "ResolveObject";
|
55
|
+
UserOperation[UserOperation["MarkAllAsRead"] = 45] = "MarkAllAsRead";
|
56
|
+
UserOperation[UserOperation["SaveUserSettings"] = 46] = "SaveUserSettings";
|
57
|
+
UserOperation[UserOperation["TransferCommunity"] = 47] = "TransferCommunity";
|
58
|
+
UserOperation[UserOperation["TransferSite"] = 48] = "TransferSite";
|
59
|
+
UserOperation[UserOperation["DeleteAccount"] = 49] = "DeleteAccount";
|
60
|
+
UserOperation[UserOperation["PasswordReset"] = 50] = "PasswordReset";
|
61
|
+
UserOperation[UserOperation["PasswordChange"] = 51] = "PasswordChange";
|
62
|
+
UserOperation[UserOperation["CreatePrivateMessage"] = 52] = "CreatePrivateMessage";
|
63
|
+
UserOperation[UserOperation["EditPrivateMessage"] = 53] = "EditPrivateMessage";
|
64
|
+
UserOperation[UserOperation["DeletePrivateMessage"] = 54] = "DeletePrivateMessage";
|
65
|
+
UserOperation[UserOperation["MarkPrivateMessageAsRead"] = 55] = "MarkPrivateMessageAsRead";
|
66
|
+
UserOperation[UserOperation["GetPrivateMessages"] = 56] = "GetPrivateMessages";
|
67
|
+
UserOperation[UserOperation["UserJoin"] = 57] = "UserJoin";
|
68
|
+
UserOperation[UserOperation["GetComments"] = 58] = "GetComments";
|
69
|
+
UserOperation[UserOperation["GetSiteConfig"] = 59] = "GetSiteConfig";
|
70
|
+
UserOperation[UserOperation["SaveSiteConfig"] = 60] = "SaveSiteConfig";
|
71
|
+
UserOperation[UserOperation["PostJoin"] = 61] = "PostJoin";
|
72
|
+
UserOperation[UserOperation["CommunityJoin"] = 62] = "CommunityJoin";
|
73
|
+
UserOperation[UserOperation["ChangePassword"] = 63] = "ChangePassword";
|
74
|
+
UserOperation[UserOperation["GetSiteMetadata"] = 64] = "GetSiteMetadata";
|
75
|
+
UserOperation[UserOperation["BlockCommunity"] = 65] = "BlockCommunity";
|
76
|
+
UserOperation[UserOperation["BlockPerson"] = 66] = "BlockPerson";
|
77
|
+
UserOperation[UserOperation["CreateCommentReport"] = 67] = "CreateCommentReport";
|
78
|
+
UserOperation[UserOperation["ResolveCommentReport"] = 68] = "ResolveCommentReport";
|
79
|
+
UserOperation[UserOperation["ListCommentReports"] = 69] = "ListCommentReports";
|
80
|
+
UserOperation[UserOperation["CreatePostReport"] = 70] = "CreatePostReport";
|
81
|
+
UserOperation[UserOperation["ResolvePostReport"] = 71] = "ResolvePostReport";
|
82
|
+
UserOperation[UserOperation["ListPostReports"] = 72] = "ListPostReports";
|
83
|
+
UserOperation[UserOperation["GetReportCount"] = 73] = "GetReportCount";
|
84
|
+
UserOperation[UserOperation["GetUnreadCount"] = 74] = "GetUnreadCount";
|
85
|
+
UserOperation[UserOperation["VerifyEmail"] = 75] = "VerifyEmail";
|
85
86
|
})(UserOperation = exports.UserOperation || (exports.UserOperation = {}));
|
86
87
|
/**
|
87
88
|
* Different sort types used in lemmy.
|
package/dist/websocket.d.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { CreateComment, CreateCommentLike, CreateCommentReport, DeleteComment, EditComment, GetComments, ListCommentReports, MarkCommentAsRead, RemoveComment, ResolveCommentReport, SaveComment } from "./interfaces/api/comment";
|
2
2
|
import { AddModToCommunity, BanFromCommunity, BlockCommunity, CreateCommunity, DeleteCommunity, EditCommunity, FollowCommunity, GetCommunity, ListCommunities, RemoveCommunity, TransferCommunity } from "./interfaces/api/community";
|
3
|
-
import { AddAdmin, BanPerson, BlockPerson, ChangePassword, CreatePrivateMessage, DeleteAccount, DeletePrivateMessage, EditPrivateMessage, GetPersonDetails, GetPersonMentions, GetPrivateMessages, GetReplies, GetReportCount, GetUnreadCount, Login, MarkAllAsRead, MarkPersonMentionAsRead, MarkPrivateMessageAsRead, PasswordChange, PasswordReset, Register, SaveUserSettings, VerifyEmail } from "./interfaces/api/person";
|
3
|
+
import { AddAdmin, BanPerson, BlockPerson, ChangePassword, CreatePrivateMessage, DeleteAccount, DeletePrivateMessage, EditPrivateMessage, GetBannedPersons, GetPersonDetails, GetPersonMentions, GetPrivateMessages, GetReplies, GetReportCount, GetUnreadCount, Login, MarkAllAsRead, MarkPersonMentionAsRead, MarkPrivateMessageAsRead, PasswordChange, PasswordReset, Register, SaveUserSettings, VerifyEmail } from "./interfaces/api/person";
|
4
4
|
import { CreatePost, CreatePostLike, CreatePostReport, DeletePost, EditPost, GetPost, GetPosts, GetSiteMetadata, ListPostReports, LockPost, RemovePost, ResolvePostReport, SavePost, StickyPost } from "./interfaces/api/post";
|
5
5
|
import { ApproveRegistrationApplication, CreateSite, EditSite, GetModlog, GetSite, GetSiteConfig, GetUnreadRegistrationApplicationCount, ListRegistrationApplications, ResolveObject, SaveSiteConfig, Search, TransferSite } from "./interfaces/api/site";
|
6
6
|
import { CommunityJoin, PostJoin, UserJoin } from "./interfaces/api/websocket";
|
@@ -193,6 +193,10 @@ export declare class LemmyWebsocket {
|
|
193
193
|
* Ban a person from your site.
|
194
194
|
*/
|
195
195
|
banPerson(form: BanPerson): string;
|
196
|
+
/**
|
197
|
+
* Get a list of banned users
|
198
|
+
*/
|
199
|
+
getBannedPersons(form: GetBannedPersons): string;
|
196
200
|
/**
|
197
201
|
* Add an admin to your site.
|
198
202
|
*/
|
package/dist/websocket.js
CHANGED
@@ -278,6 +278,12 @@ var LemmyWebsocket = /** @class */ (function () {
|
|
278
278
|
LemmyWebsocket.prototype.banPerson = function (form) {
|
279
279
|
return wrapper(others_1.UserOperation.BanPerson, form);
|
280
280
|
};
|
281
|
+
/**
|
282
|
+
* Get a list of banned users
|
283
|
+
*/
|
284
|
+
LemmyWebsocket.prototype.getBannedPersons = function (form) {
|
285
|
+
return wrapper(others_1.UserOperation.GetBannedPersons, form);
|
286
|
+
};
|
281
287
|
/**
|
282
288
|
* Add an admin to your site.
|
283
289
|
*/
|
package/package.json
CHANGED