lemmy-js-client 0.15.0-rc.1 → 0.15.0-rc.31

Sign up to get free protection for your applications and to get access to all the features.
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
  */
@@ -265,3 +265,9 @@ export interface BlockPersonResponse {
265
265
  person_view: PersonViewSafe;
266
266
  blocked: boolean;
267
267
  }
268
+ export interface GetBannedPersons {
269
+ auth: string;
270
+ }
271
+ export interface BannedPersonsResponse {
272
+ banned: PersonViewSafe[];
273
+ }
@@ -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
- Search = 42,
49
- ResolveObject = 43,
50
- MarkAllAsRead = 44,
51
- SaveUserSettings = 45,
52
- TransferCommunity = 46,
53
- TransferSite = 47,
54
- DeleteAccount = 48,
55
- PasswordReset = 49,
56
- PasswordChange = 50,
57
- CreatePrivateMessage = 51,
58
- EditPrivateMessage = 52,
59
- DeletePrivateMessage = 53,
60
- MarkPrivateMessageAsRead = 54,
61
- GetPrivateMessages = 55,
62
- UserJoin = 56,
63
- GetComments = 57,
64
- GetSiteConfig = 58,
65
- SaveSiteConfig = 59,
66
- PostJoin = 60,
67
- CommunityJoin = 61,
68
- ChangePassword = 62,
69
- GetSiteMetadata = 63,
70
- BlockCommunity = 64,
71
- BlockPerson = 65,
72
- CreateCommentReport = 66,
73
- ResolveCommentReport = 67,
74
- ListCommentReports = 68,
75
- CreatePostReport = 69,
76
- ResolvePostReport = 70,
77
- ListPostReports = 71,
78
- GetReportCount = 72,
79
- GetUnreadCount = 73,
80
- VerifyEmail = 74
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["Search"] = 42] = "Search";
53
- UserOperation[UserOperation["ResolveObject"] = 43] = "ResolveObject";
54
- UserOperation[UserOperation["MarkAllAsRead"] = 44] = "MarkAllAsRead";
55
- UserOperation[UserOperation["SaveUserSettings"] = 45] = "SaveUserSettings";
56
- UserOperation[UserOperation["TransferCommunity"] = 46] = "TransferCommunity";
57
- UserOperation[UserOperation["TransferSite"] = 47] = "TransferSite";
58
- UserOperation[UserOperation["DeleteAccount"] = 48] = "DeleteAccount";
59
- UserOperation[UserOperation["PasswordReset"] = 49] = "PasswordReset";
60
- UserOperation[UserOperation["PasswordChange"] = 50] = "PasswordChange";
61
- UserOperation[UserOperation["CreatePrivateMessage"] = 51] = "CreatePrivateMessage";
62
- UserOperation[UserOperation["EditPrivateMessage"] = 52] = "EditPrivateMessage";
63
- UserOperation[UserOperation["DeletePrivateMessage"] = 53] = "DeletePrivateMessage";
64
- UserOperation[UserOperation["MarkPrivateMessageAsRead"] = 54] = "MarkPrivateMessageAsRead";
65
- UserOperation[UserOperation["GetPrivateMessages"] = 55] = "GetPrivateMessages";
66
- UserOperation[UserOperation["UserJoin"] = 56] = "UserJoin";
67
- UserOperation[UserOperation["GetComments"] = 57] = "GetComments";
68
- UserOperation[UserOperation["GetSiteConfig"] = 58] = "GetSiteConfig";
69
- UserOperation[UserOperation["SaveSiteConfig"] = 59] = "SaveSiteConfig";
70
- UserOperation[UserOperation["PostJoin"] = 60] = "PostJoin";
71
- UserOperation[UserOperation["CommunityJoin"] = 61] = "CommunityJoin";
72
- UserOperation[UserOperation["ChangePassword"] = 62] = "ChangePassword";
73
- UserOperation[UserOperation["GetSiteMetadata"] = 63] = "GetSiteMetadata";
74
- UserOperation[UserOperation["BlockCommunity"] = 64] = "BlockCommunity";
75
- UserOperation[UserOperation["BlockPerson"] = 65] = "BlockPerson";
76
- UserOperation[UserOperation["CreateCommentReport"] = 66] = "CreateCommentReport";
77
- UserOperation[UserOperation["ResolveCommentReport"] = 67] = "ResolveCommentReport";
78
- UserOperation[UserOperation["ListCommentReports"] = 68] = "ListCommentReports";
79
- UserOperation[UserOperation["CreatePostReport"] = 69] = "CreatePostReport";
80
- UserOperation[UserOperation["ResolvePostReport"] = 70] = "ResolvePostReport";
81
- UserOperation[UserOperation["ListPostReports"] = 71] = "ListPostReports";
82
- UserOperation[UserOperation["GetReportCount"] = 72] = "GetReportCount";
83
- UserOperation[UserOperation["GetUnreadCount"] = 73] = "GetUnreadCount";
84
- UserOperation[UserOperation["VerifyEmail"] = 74] = "VerifyEmail";
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.
@@ -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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "lemmy-js-client",
3
3
  "description": "A javascript / typescript client for Lemmy",
4
- "version": "0.15.0-rc.1",
4
+ "version": "0.15.0-rc.31",
5
5
  "author": "Dessalines <tyhou13@gmx.com>",
6
6
  "license": "AGPL-3.0",
7
7
  "main": "./dist/index.js",