lemmy-js-client 0.14.0-rc.1 → 0.15.0-rc.6
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/http.d.ts +22 -6
- package/dist/http.js +115 -75
- package/dist/index.d.ts +3 -3
- package/dist/index.js +1 -1
- package/dist/interfaces/api/comment.d.ts +1 -1
- package/dist/interfaces/api/community.d.ts +1 -1
- package/dist/interfaces/api/index.d.ts +6 -6
- package/dist/interfaces/api/index.js +1 -1
- package/dist/interfaces/api/person.d.ts +21 -2
- package/dist/interfaces/api/post.d.ts +2 -2
- package/dist/interfaces/api/site.d.ts +37 -2
- package/dist/interfaces/api/user.d.ts +190 -0
- package/dist/interfaces/api/user.js +2 -0
- package/dist/interfaces/index.d.ts +5 -5
- package/dist/interfaces/index.js +1 -1
- package/dist/interfaces/others.d.ts +37 -33
- package/dist/interfaces/others.js +38 -34
- package/dist/interfaces/source.d.ts +16 -2
- package/dist/interfaces/views.d.ts +8 -2
- package/dist/websocket.d.ts +22 -6
- package/dist/websocket.js +24 -0
- package/package.json +20 -9
package/dist/websocket.d.ts
CHANGED
@@ -1,9 +1,9 @@
|
|
1
|
-
import { CreateComment, CreateCommentLike, CreateCommentReport, DeleteComment, EditComment, GetComments, ListCommentReports, MarkCommentAsRead, RemoveComment, ResolveCommentReport, SaveComment } from
|
2
|
-
import { AddModToCommunity, BanFromCommunity, BlockCommunity, CreateCommunity, DeleteCommunity, EditCommunity, FollowCommunity, GetCommunity, ListCommunities, RemoveCommunity, TransferCommunity } from
|
3
|
-
import {
|
4
|
-
import {
|
5
|
-
import {
|
6
|
-
import {
|
1
|
+
import { CreateComment, CreateCommentLike, CreateCommentReport, DeleteComment, EditComment, GetComments, ListCommentReports, MarkCommentAsRead, RemoveComment, ResolveCommentReport, SaveComment } from "./interfaces/api/comment";
|
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";
|
4
|
+
import { CreatePost, CreatePostLike, CreatePostReport, DeletePost, EditPost, GetPost, GetPosts, GetSiteMetadata, ListPostReports, LockPost, RemovePost, ResolvePostReport, SavePost, StickyPost } from "./interfaces/api/post";
|
5
|
+
import { ApproveRegistrationApplication, CreateSite, EditSite, GetModlog, GetSite, GetSiteConfig, GetUnreadRegistrationApplicationCount, ListRegistrationApplications, ResolveObject, SaveSiteConfig, Search, TransferSite } from "./interfaces/api/site";
|
6
|
+
import { CommunityJoin, PostJoin, UserJoin } from "./interfaces/api/websocket";
|
7
7
|
/**
|
8
8
|
* Helps build lemmy websocket message requests, that you can use in your Websocket sends.
|
9
9
|
*
|
@@ -197,6 +197,18 @@ export declare class LemmyWebsocket {
|
|
197
197
|
* Add an admin to your site.
|
198
198
|
*/
|
199
199
|
addAdmin(form: AddAdmin): string;
|
200
|
+
/**
|
201
|
+
* Get the unread registration applications count.
|
202
|
+
*/
|
203
|
+
getUnreadRegistrationApplicationCount(form: GetUnreadRegistrationApplicationCount): string;
|
204
|
+
/**
|
205
|
+
* List the unread registration applications.
|
206
|
+
*/
|
207
|
+
listRegistrationApplications(form: ListRegistrationApplications): string;
|
208
|
+
/**
|
209
|
+
* Approve a registration application
|
210
|
+
*/
|
211
|
+
approveRegistrationApplication(form: ApproveRegistrationApplication): string;
|
200
212
|
/**
|
201
213
|
* Get the details for a person.
|
202
214
|
*/
|
@@ -261,6 +273,10 @@ export declare class LemmyWebsocket {
|
|
261
273
|
* Get your unread counts
|
262
274
|
*/
|
263
275
|
getUnreadCount(form: GetUnreadCount): string;
|
276
|
+
/**
|
277
|
+
* Verify your email
|
278
|
+
*/
|
279
|
+
verifyEmail(form: VerifyEmail): string;
|
264
280
|
/**
|
265
281
|
* Delete your account.
|
266
282
|
*/
|
package/dist/websocket.js
CHANGED
@@ -284,6 +284,24 @@ var LemmyWebsocket = /** @class */ (function () {
|
|
284
284
|
LemmyWebsocket.prototype.addAdmin = function (form) {
|
285
285
|
return wrapper(others_1.UserOperation.AddAdmin, form);
|
286
286
|
};
|
287
|
+
/**
|
288
|
+
* Get the unread registration applications count.
|
289
|
+
*/
|
290
|
+
LemmyWebsocket.prototype.getUnreadRegistrationApplicationCount = function (form) {
|
291
|
+
return wrapper(others_1.UserOperation.GetUnreadRegistrationApplicationCount, form);
|
292
|
+
};
|
293
|
+
/**
|
294
|
+
* List the unread registration applications.
|
295
|
+
*/
|
296
|
+
LemmyWebsocket.prototype.listRegistrationApplications = function (form) {
|
297
|
+
return wrapper(others_1.UserOperation.ListRegistrationApplications, form);
|
298
|
+
};
|
299
|
+
/**
|
300
|
+
* Approve a registration application
|
301
|
+
*/
|
302
|
+
LemmyWebsocket.prototype.approveRegistrationApplication = function (form) {
|
303
|
+
return wrapper(others_1.UserOperation.ApproveRegistrationApplication, form);
|
304
|
+
};
|
287
305
|
/**
|
288
306
|
* Get the details for a person.
|
289
307
|
*/
|
@@ -381,6 +399,12 @@ var LemmyWebsocket = /** @class */ (function () {
|
|
381
399
|
LemmyWebsocket.prototype.getUnreadCount = function (form) {
|
382
400
|
return wrapper(others_1.UserOperation.GetUnreadCount, form);
|
383
401
|
};
|
402
|
+
/**
|
403
|
+
* Verify your email
|
404
|
+
*/
|
405
|
+
LemmyWebsocket.prototype.verifyEmail = function (form) {
|
406
|
+
return wrapper(others_1.UserOperation.VerifyEmail, form);
|
407
|
+
};
|
384
408
|
/**
|
385
409
|
* Delete your account.
|
386
410
|
*/
|
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.
|
4
|
+
"version": "0.15.0-rc.6",
|
5
5
|
"author": "Dessalines <tyhou13@gmx.com>",
|
6
6
|
"license": "AGPL-3.0",
|
7
7
|
"main": "./dist/index.js",
|
@@ -16,18 +16,23 @@
|
|
16
16
|
},
|
17
17
|
"repository": "https://github.com/LemmyNet/lemmy-js-client",
|
18
18
|
"devDependencies": {
|
19
|
-
"@types/node": "^16.
|
19
|
+
"@types/node": "^16.11.11",
|
20
20
|
"@types/node-fetch": "^3.0.3",
|
21
|
-
"eslint": "^
|
22
|
-
"eslint
|
23
|
-
"
|
24
|
-
"
|
25
|
-
"
|
26
|
-
"
|
21
|
+
"@typescript-eslint/eslint-plugin": "^5.5.0",
|
22
|
+
"@typescript-eslint/parser": "^5.5.0",
|
23
|
+
"eslint": "^8.3.0",
|
24
|
+
"eslint-plugin-prettier": "^4.0.0",
|
25
|
+
"husky": "^7.0.4",
|
26
|
+
"lint-staged": "^12.1.2",
|
27
|
+
"node-fetch": "^3.1.0",
|
28
|
+
"prettier": "^2.5.0",
|
29
|
+
"prettier-plugin-import-sort": "^0.0.7",
|
30
|
+
"prettier-plugin-organize-imports": "^2.3.4",
|
31
|
+
"prettier-plugin-packagejson": "^2.2.15",
|
27
32
|
"sortpack": "^2.2.0",
|
28
33
|
"typedoc": "^0.21.6",
|
29
34
|
"typedoc-plugin-sourcefile-url": "^1.0.6",
|
30
|
-
"typescript": "^4.
|
35
|
+
"typescript": "^4.5.2"
|
31
36
|
},
|
32
37
|
"types": "./dist/index.d.ts",
|
33
38
|
"lint-staged": {
|
@@ -38,5 +43,11 @@
|
|
38
43
|
"package.json": [
|
39
44
|
"sortpack"
|
40
45
|
]
|
46
|
+
},
|
47
|
+
"importSort": {
|
48
|
+
".js, .jsx, .ts, .tsx": {
|
49
|
+
"style": "module",
|
50
|
+
"parser": "typescript"
|
51
|
+
}
|
41
52
|
}
|
42
53
|
}
|