lemmy-js-client 0.17.0-rc.32 → 0.17.0-rc.36

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.
@@ -1,9 +1,9 @@
1
1
  import { ClassConstructor } from "class-transformer";
2
- import { CreateComment, CreateCommentLike, CreateCommentReport, DeleteComment, EditComment, GetComments, ListCommentReports, MarkCommentAsRead, RemoveComment, ResolveCommentReport, SaveComment } from "./interfaces/api/comment";
2
+ import { CreateComment, CreateCommentLike, CreateCommentReport, DeleteComment, EditComment, GetComments, ListCommentReports, RemoveComment, ResolveCommentReport, SaveComment } from "./interfaces/api/comment";
3
3
  import { AddModToCommunity, BanFromCommunity, BlockCommunity, CreateCommunity, DeleteCommunity, EditCommunity, FollowCommunity, GetCommunity, ListCommunities, RemoveCommunity, TransferCommunity } from "./interfaces/api/community";
4
- 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
+ import { AddAdmin, BanPerson, BlockPerson, ChangePassword, CreatePrivateMessage, DeleteAccount, DeletePrivateMessage, EditPrivateMessage, GetBannedPersons, GetPersonDetails, GetPersonMentions, GetPrivateMessages, GetReplies, GetReportCount, GetUnreadCount, Login, MarkAllAsRead, MarkCommentReplyAsRead, MarkPersonMentionAsRead, MarkPrivateMessageAsRead, PasswordChange, PasswordReset, Register, SaveUserSettings, VerifyEmail } from "./interfaces/api/person";
5
5
  import { CreatePost, CreatePostLike, CreatePostReport, DeletePost, EditPost, GetPost, GetPosts, GetSiteMetadata, ListPostReports, LockPost, MarkPostAsRead, RemovePost, ResolvePostReport, SavePost, StickyPost } from "./interfaces/api/post";
6
- import { ApproveRegistrationApplication, CreateSite, EditSite, GetModlog, GetSite, GetUnreadRegistrationApplicationCount, LeaveAdmin, ListRegistrationApplications, ResolveObject, Search } from "./interfaces/api/site";
6
+ import { ApproveRegistrationApplication, CreateSite, EditSite, GetModlog, GetSite, GetUnreadRegistrationApplicationCount, LeaveAdmin, ListRegistrationApplications, PurgeComment, PurgeCommunity, PurgePerson, PurgePost, ResolveObject, Search } from "./interfaces/api/site";
7
7
  import { CommunityJoin, PostJoin, UserJoin } from "./interfaces/api/websocket";
8
8
  import { UserOperation } from "./interfaces/others";
9
9
  /**
@@ -102,7 +102,7 @@ export declare class LemmyWebsocket {
102
102
  /**
103
103
  * Mark a comment as read.
104
104
  */
105
- markCommentAsRead(form: MarkCommentAsRead): string;
105
+ markCommentReplyAsRead(form: MarkCommentReplyAsRead): string;
106
106
  /**
107
107
  * Like / vote on a comment.
108
108
  */
@@ -323,6 +323,22 @@ export declare class LemmyWebsocket {
323
323
  * Block a community.
324
324
  */
325
325
  blockCommunity(form: BlockCommunity): string;
326
+ /**
327
+ * Purge / Delete a person from the database.
328
+ */
329
+ purgePerson(form: PurgePerson): string;
330
+ /**
331
+ * Purge / Delete a community from the database.
332
+ */
333
+ purgeCommunity(form: PurgeCommunity): string;
334
+ /**
335
+ * Purge / Delete a post from the database.
336
+ */
337
+ purgePost(form: PurgePost): string;
338
+ /**
339
+ * Purge / Delete a comment from the database.
340
+ */
341
+ purgeComment(form: PurgeComment): string;
326
342
  }
327
343
  export declare function wsUserOp(msg: any): UserOperation;
328
344
  /**
package/dist/websocket.js CHANGED
@@ -138,8 +138,8 @@ var LemmyWebsocket = /** @class */ (function () {
138
138
  /**
139
139
  * Mark a comment as read.
140
140
  */
141
- LemmyWebsocket.prototype.markCommentAsRead = function (form) {
142
- return wrapper(others_1.UserOperation.MarkCommentAsRead, form);
141
+ LemmyWebsocket.prototype.markCommentReplyAsRead = function (form) {
142
+ return wrapper(others_1.UserOperation.MarkCommentReplyAsRead, form);
143
143
  };
144
144
  /**
145
145
  * Like / vote on a comment.
@@ -471,6 +471,30 @@ var LemmyWebsocket = /** @class */ (function () {
471
471
  LemmyWebsocket.prototype.blockCommunity = function (form) {
472
472
  return wrapper(others_1.UserOperation.BlockCommunity, form);
473
473
  };
474
+ /**
475
+ * Purge / Delete a person from the database.
476
+ */
477
+ LemmyWebsocket.prototype.purgePerson = function (form) {
478
+ return wrapper(others_1.UserOperation.PurgePerson, form);
479
+ };
480
+ /**
481
+ * Purge / Delete a community from the database.
482
+ */
483
+ LemmyWebsocket.prototype.purgeCommunity = function (form) {
484
+ return wrapper(others_1.UserOperation.PurgeCommunity, form);
485
+ };
486
+ /**
487
+ * Purge / Delete a post from the database.
488
+ */
489
+ LemmyWebsocket.prototype.purgePost = function (form) {
490
+ return wrapper(others_1.UserOperation.PurgePost, form);
491
+ };
492
+ /**
493
+ * Purge / Delete a comment from the database.
494
+ */
495
+ LemmyWebsocket.prototype.purgeComment = function (form) {
496
+ return wrapper(others_1.UserOperation.PurgeComment, form);
497
+ };
474
498
  return LemmyWebsocket;
475
499
  }());
476
500
  exports.LemmyWebsocket = LemmyWebsocket;
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.17.0-rc.32",
4
+ "version": "0.17.0-rc.36",
5
5
  "author": "Dessalines <tyhou13@gmx.com>",
6
6
  "license": "AGPL-3.0",
7
7
  "main": "./dist/index.js",
@@ -19,23 +19,23 @@
19
19
  "@sniptt/monads": "^0.5.10",
20
20
  "@types/node": "^17.0.33",
21
21
  "@types/node-fetch": "^3.0.3",
22
- "@typescript-eslint/eslint-plugin": "^5.23.0",
23
- "@typescript-eslint/parser": "^5.23.0",
22
+ "@typescript-eslint/eslint-plugin": "^5.31.0",
23
+ "@typescript-eslint/parser": "^5.31.0",
24
24
  "class-transformer": "^0.5.1",
25
- "eslint": "^8.15.0",
26
- "eslint-plugin-prettier": "^4.0.0",
25
+ "eslint": "^8.20.0",
26
+ "eslint-plugin-prettier": "^4.2.1",
27
27
  "husky": "^8.0.1",
28
28
  "lint-staged": "^12.4.1",
29
- "node-fetch": "^3.2.4",
30
- "prettier": "^2.6.2",
29
+ "node-fetch": "^3.2.9",
30
+ "prettier": "^2.7.1",
31
31
  "prettier-plugin-import-sort": "^0.0.7",
32
- "prettier-plugin-organize-imports": "^2.3.4",
32
+ "prettier-plugin-organize-imports": "^3.0.0",
33
33
  "prettier-plugin-packagejson": "^2.2.18",
34
34
  "reflect-metadata": "^0.1.13",
35
- "sortpack": "^2.2.0",
35
+ "sortpack": "^2.3.0",
36
36
  "typedoc": "^0.21.6",
37
37
  "typedoc-plugin-sourcefile-url": "^1.0.6",
38
- "typescript": "^4.6.4"
38
+ "typescript": "^4.7.4"
39
39
  },
40
40
  "types": "./dist/index.d.ts",
41
41
  "lint-staged": {