lemmy-js-client 0.14.0-rc.1 → 0.15.0-rc.30
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/http.d.ts +26 -6
- package/dist/http.js +125 -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 +27 -2
- package/dist/interfaces/api/post.d.ts +2 -2
- package/dist/interfaces/api/site.d.ts +37 -3
- 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 +38 -33
- package/dist/interfaces/others.js +39 -34
- package/dist/interfaces/source.d.ts +16 -2
- package/dist/interfaces/views.d.ts +8 -2
- package/dist/websocket.d.ts +26 -6
- package/dist/websocket.js +30 -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, GetBannedPersons, 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
|
*
|
@@ -193,10 +193,26 @@ 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
|
*/
|
199
203
|
addAdmin(form: AddAdmin): string;
|
204
|
+
/**
|
205
|
+
* Get the unread registration applications count.
|
206
|
+
*/
|
207
|
+
getUnreadRegistrationApplicationCount(form: GetUnreadRegistrationApplicationCount): string;
|
208
|
+
/**
|
209
|
+
* List the unread registration applications.
|
210
|
+
*/
|
211
|
+
listRegistrationApplications(form: ListRegistrationApplications): string;
|
212
|
+
/**
|
213
|
+
* Approve a registration application
|
214
|
+
*/
|
215
|
+
approveRegistrationApplication(form: ApproveRegistrationApplication): string;
|
200
216
|
/**
|
201
217
|
* Get the details for a person.
|
202
218
|
*/
|
@@ -261,6 +277,10 @@ export declare class LemmyWebsocket {
|
|
261
277
|
* Get your unread counts
|
262
278
|
*/
|
263
279
|
getUnreadCount(form: GetUnreadCount): string;
|
280
|
+
/**
|
281
|
+
* Verify your email
|
282
|
+
*/
|
283
|
+
verifyEmail(form: VerifyEmail): string;
|
264
284
|
/**
|
265
285
|
* Delete your account.
|
266
286
|
*/
|
package/dist/websocket.js
CHANGED
@@ -278,12 +278,36 @@ 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
|
*/
|
284
290
|
LemmyWebsocket.prototype.addAdmin = function (form) {
|
285
291
|
return wrapper(others_1.UserOperation.AddAdmin, form);
|
286
292
|
};
|
293
|
+
/**
|
294
|
+
* Get the unread registration applications count.
|
295
|
+
*/
|
296
|
+
LemmyWebsocket.prototype.getUnreadRegistrationApplicationCount = function (form) {
|
297
|
+
return wrapper(others_1.UserOperation.GetUnreadRegistrationApplicationCount, form);
|
298
|
+
};
|
299
|
+
/**
|
300
|
+
* List the unread registration applications.
|
301
|
+
*/
|
302
|
+
LemmyWebsocket.prototype.listRegistrationApplications = function (form) {
|
303
|
+
return wrapper(others_1.UserOperation.ListRegistrationApplications, form);
|
304
|
+
};
|
305
|
+
/**
|
306
|
+
* Approve a registration application
|
307
|
+
*/
|
308
|
+
LemmyWebsocket.prototype.approveRegistrationApplication = function (form) {
|
309
|
+
return wrapper(others_1.UserOperation.ApproveRegistrationApplication, form);
|
310
|
+
};
|
287
311
|
/**
|
288
312
|
* Get the details for a person.
|
289
313
|
*/
|
@@ -381,6 +405,12 @@ var LemmyWebsocket = /** @class */ (function () {
|
|
381
405
|
LemmyWebsocket.prototype.getUnreadCount = function (form) {
|
382
406
|
return wrapper(others_1.UserOperation.GetUnreadCount, form);
|
383
407
|
};
|
408
|
+
/**
|
409
|
+
* Verify your email
|
410
|
+
*/
|
411
|
+
LemmyWebsocket.prototype.verifyEmail = function (form) {
|
412
|
+
return wrapper(others_1.UserOperation.VerifyEmail, form);
|
413
|
+
};
|
384
414
|
/**
|
385
415
|
* Delete your account.
|
386
416
|
*/
|
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.30",
|
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
|
}
|