lemmy-js-client 0.17.0-rc.32 → 0.17.0-rc.36
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/http.d.ts +28 -4
- package/dist/http.js +49 -1
- package/dist/interfaces/aggregates.d.ts +1 -0
- package/dist/interfaces/api/comment.d.ts +5 -11
- package/dist/interfaces/api/comment.js +34 -11
- package/dist/interfaces/api/person.d.ts +14 -5
- package/dist/interfaces/api/person.js +18 -2
- package/dist/interfaces/api/post.d.ts +3 -3
- package/dist/interfaces/api/post.js +22 -3
- package/dist/interfaces/api/site.d.ts +32 -1
- package/dist/interfaces/api/site.js +91 -1
- package/dist/interfaces/others.d.ts +64 -32
- package/dist/interfaces/others.js +66 -33
- package/dist/interfaces/source.d.ts +34 -2
- package/dist/interfaces/source.js +75 -12
- package/dist/interfaces/views.d.ts +38 -2
- package/dist/interfaces/views.js +85 -8
- package/dist/websocket.d.ts +20 -4
- package/dist/websocket.js +26 -2
- package/package.json +10 -10
package/dist/websocket.d.ts
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
import { ClassConstructor } from "class-transformer";
|
2
|
-
import { CreateComment, CreateCommentLike, CreateCommentReport, DeleteComment, EditComment, GetComments, ListCommentReports,
|
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
|
-
|
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.
|
142
|
-
return wrapper(others_1.UserOperation.
|
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.
|
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
|
-
"@typescript-eslint/parser": "^5.
|
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.
|
26
|
-
"eslint-plugin-prettier": "^4.
|
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.
|
30
|
-
"prettier": "^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": "^
|
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.
|
35
|
+
"sortpack": "^2.3.0",
|
36
36
|
"typedoc": "^0.21.6",
|
37
37
|
"typedoc-plugin-sourcefile-url": "^1.0.6",
|
38
|
-
"typescript": "^4.
|
38
|
+
"typescript": "^4.7.4"
|
39
39
|
},
|
40
40
|
"types": "./dist/index.d.ts",
|
41
41
|
"lint-staged": {
|