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.
@@ -1,9 +1,9 @@
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 { CreatePost, CreatePostLike, CreatePostReport, DeletePost, EditPost, GetPost, GetPosts, GetSiteMetadata, ListPostReports, LockPost, RemovePost, ResolvePostReport, SavePost, StickyPost } from './interfaces/api/post';
4
- import { CreateSite, EditSite, GetModlog, GetSite, GetSiteConfig, ResolveObject, SaveSiteConfig, Search, TransferSite } from './interfaces/api/site';
5
- import { AddAdmin, BanPerson, CreatePrivateMessage, DeleteAccount, DeletePrivateMessage, EditPrivateMessage, GetPrivateMessages, GetReplies, GetPersonDetails, GetPersonMentions, Login, MarkAllAsRead, MarkPrivateMessageAsRead, MarkPersonMentionAsRead, PasswordChange, PasswordReset, Register, SaveUserSettings, ChangePassword, BlockPerson, GetReportCount, GetUnreadCount } from './interfaces/api/person';
6
- import { UserJoin, PostJoin, CommunityJoin } from './interfaces/api/websocket';
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.14.0-rc.1",
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.10.2",
19
+ "@types/node": "^16.11.11",
20
20
  "@types/node-fetch": "^3.0.3",
21
- "eslint": "^7.32.0",
22
- "eslint-plugin-jane": "^9.0.6",
23
- "husky": "^7.0.2",
24
- "lint-staged": "^11.1.2",
25
- "node-fetch": "^3.0.0",
26
- "prettier": "^2.4.1",
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.4.3"
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
  }