lemmy-js-client 0.20.0-api-v4.13 → 0.20.0-api-v4.15

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.
package/dist/http.d.ts CHANGED
@@ -5,6 +5,7 @@ import { AddModToCommunityResponse } from "./types/AddModToCommunityResponse";
5
5
  import { ApproveRegistrationApplication } from "./types/ApproveRegistrationApplication";
6
6
  import { BanFromCommunity } from "./types/BanFromCommunity";
7
7
  import { BanFromCommunityResponse } from "./types/BanFromCommunityResponse";
8
+ import { MarkManyPostsAsRead } from "./types/MarkManyPostsAsRead";
8
9
  import { BanPerson } from "./types/BanPerson";
9
10
  import { BanPersonResponse } from "./types/BanPersonResponse";
10
11
  import { BannedPersonsResponse } from "./types/BannedPersonsResponse";
@@ -200,7 +201,7 @@ export declare class LemmyHttp {
200
201
  /**
201
202
  * Generate a TOTP / two-factor secret.
202
203
  *
203
- * Afterwards you need to call `/user/totp/update` with a valid token to enable it.
204
+ * Afterwards you need to call `/account/auth/totp/update` with a valid token to enable it.
204
205
  *
205
206
  * `HTTP.POST /account/auth/totp/generate`
206
207
  */
@@ -208,7 +209,7 @@ export declare class LemmyHttp {
208
209
  /**
209
210
  * Get data of current user.
210
211
  *
211
- * `HTTP.GET /account/my_user`
212
+ * `HTTP.GET /account`
212
213
  */
213
214
  getMyUser(options?: RequestOptions): Promise<MyUserInfo>;
214
215
  /**
@@ -227,13 +228,13 @@ export declare class LemmyHttp {
227
228
  /**
228
229
  * List login tokens for your user
229
230
  *
230
- * `HTTP.GET /user/list_logins`
231
+ * `HTTP.GET /account/list_logins`
231
232
  */
232
233
  listLogins(options?: RequestOptions): Promise<LoginToken[]>;
233
234
  /**
234
235
  * Returns an error message if your auth token is invalid
235
236
  *
236
- * `HTTP.GET /user/validate_auth`
237
+ * `HTTP.GET /account/validate_auth`
237
238
  */
238
239
  validateAuth(options?: RequestOptions): Promise<SuccessResponse>;
239
240
  /**
@@ -251,7 +252,7 @@ export declare class LemmyHttp {
251
252
  /**
252
253
  * Enable / Disable TOTP / two-factor authentication.
253
254
  *
254
- * To enable, you need to first call `/user/totp/generate` and then pass a valid token to this.
255
+ * To enable, you need to first call `/account/auth/totp/generate` and then pass a valid token to this.
255
256
  *
256
257
  * Disabling is only possible if 2FA was previously enabled. Again it is necessary to pass a valid token.
257
258
  *
@@ -393,6 +394,12 @@ export declare class LemmyHttp {
393
394
  * `HTTP.POST /post/mark_as_read`
394
395
  */
395
396
  markPostAsRead(form: MarkPostAsRead, options?: RequestOptions): Promise<SuccessResponse>;
397
+ /**
398
+ * Mark multiple posts as read.
399
+ *
400
+ * `HTTP.POST /post/mark_as_read/many`
401
+ */
402
+ markManyPostAsRead(form: MarkManyPostsAsRead, options?: RequestOptions): Promise<SuccessResponse>;
396
403
  /**
397
404
  * Hide a post from list views.
398
405
  *
@@ -618,7 +625,7 @@ export declare class LemmyHttp {
618
625
  /**
619
626
  * Get mentions for your user.
620
627
  *
621
- * `HTTP.GET /user/mention`
628
+ * `HTTP.GET /account/mention`
622
629
  */
623
630
  getPersonMentions(form: GetPersonMentions, options?: RequestOptions): Promise<GetPersonMentionsResponse>;
624
631
  /**
@@ -636,7 +643,7 @@ export declare class LemmyHttp {
636
643
  /**
637
644
  * Get comment replies.
638
645
  *
639
- * `HTTP.GET /user/replies`
646
+ * `HTTP.GET /account/replies`
640
647
  */
641
648
  getReplies(form: GetReplies, options?: RequestOptions): Promise<GetRepliesResponse>;
642
649
  /**
@@ -696,19 +703,19 @@ export declare class LemmyHttp {
696
703
  /**
697
704
  * Change your user password.
698
705
  *
699
- * `HTTP.PUT /user/change_password`
706
+ * `HTTP.PUT /account/auth/change_password`
700
707
  */
701
708
  changePassword(form: ChangePassword, options?: RequestOptions): Promise<LoginResponse>;
702
709
  /**
703
710
  * Get counts for your reports
704
711
  *
705
- * `HTTP.GET /user/report_count`
712
+ * `HTTP.GET /account/report_count`
706
713
  */
707
714
  getReportCount(form: GetReportCount, options?: RequestOptions): Promise<GetReportCountResponse>;
708
715
  /**
709
716
  * Get your unread counts
710
717
  *
711
- * `HTTP.GET /user/unread_count`
718
+ * `HTTP.GET /account/unread_count`
712
719
  */
713
720
  getUnreadCount(options?: RequestOptions): Promise<GetUnreadCountResponse>;
714
721
  /**
package/dist/http.js CHANGED
@@ -88,7 +88,7 @@ class LemmyHttp {
88
88
  /**
89
89
  * Generate a TOTP / two-factor secret.
90
90
  *
91
- * Afterwards you need to call `/user/totp/update` with a valid token to enable it.
91
+ * Afterwards you need to call `/account/auth/totp/update` with a valid token to enable it.
92
92
  *
93
93
  * `HTTP.POST /account/auth/totp/generate`
94
94
  */
@@ -98,10 +98,10 @@ class LemmyHttp {
98
98
  /**
99
99
  * Get data of current user.
100
100
  *
101
- * `HTTP.GET /account/my_user`
101
+ * `HTTP.GET /account`
102
102
  */
103
103
  getMyUser(options) {
104
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/my_user", {}, options);
104
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account", {}, options);
105
105
  }
106
106
  /**
107
107
  * Export a backup of your user settings, including your saved content,
@@ -123,18 +123,18 @@ class LemmyHttp {
123
123
  /**
124
124
  * List login tokens for your user
125
125
  *
126
- * `HTTP.GET /user/list_logins`
126
+ * `HTTP.GET /account/list_logins`
127
127
  */
128
128
  listLogins(options) {
129
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/user/list_logins", {}, options);
129
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/list_logins", {}, options);
130
130
  }
131
131
  /**
132
132
  * Returns an error message if your auth token is invalid
133
133
  *
134
- * `HTTP.GET /user/validate_auth`
134
+ * `HTTP.GET /account/validate_auth`
135
135
  */
136
136
  validateAuth(options) {
137
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/user/validate_auth", {}, options);
137
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/validate_auth", {}, options);
138
138
  }
139
139
  /**
140
140
  * List all the media for your user
@@ -155,7 +155,7 @@ class LemmyHttp {
155
155
  /**
156
156
  * Enable / Disable TOTP / two-factor authentication.
157
157
  *
158
- * To enable, you need to first call `/user/totp/generate` and then pass a valid token to this.
158
+ * To enable, you need to first call `/account/auth/totp/generate` and then pass a valid token to this.
159
159
  *
160
160
  * Disabling is only possible if 2FA was previously enabled. Again it is necessary to pass a valid token.
161
161
  *
@@ -350,6 +350,14 @@ class LemmyHttp {
350
350
  markPostAsRead(form, options) {
351
351
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/post/mark_as_read", form, options);
352
352
  }
353
+ /**
354
+ * Mark multiple posts as read.
355
+ *
356
+ * `HTTP.POST /post/mark_as_read/many`
357
+ */
358
+ markManyPostAsRead(form, options) {
359
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/post/mark_as_read/many", form, options);
360
+ }
353
361
  /**
354
362
  * Hide a post from list views.
355
363
  *
@@ -649,10 +657,10 @@ class LemmyHttp {
649
657
  /**
650
658
  * Get mentions for your user.
651
659
  *
652
- * `HTTP.GET /user/mention`
660
+ * `HTTP.GET /account/mention`
653
661
  */
654
662
  getPersonMentions(form, options) {
655
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/user/mention", form, options);
663
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/mention", form, options);
656
664
  }
657
665
  /**
658
666
  * Mark a person mention as read.
@@ -673,10 +681,10 @@ class LemmyHttp {
673
681
  /**
674
682
  * Get comment replies.
675
683
  *
676
- * `HTTP.GET /user/replies`
684
+ * `HTTP.GET /account/replies`
677
685
  */
678
686
  getReplies(form, options) {
679
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/user/replies", form, options);
687
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/replies", form, options);
680
688
  }
681
689
  /**
682
690
  * Ban a person from your site.
@@ -753,26 +761,26 @@ class LemmyHttp {
753
761
  /**
754
762
  * Change your user password.
755
763
  *
756
- * `HTTP.PUT /user/change_password`
764
+ * `HTTP.PUT /account/auth/change_password`
757
765
  */
758
766
  changePassword(form, options) {
759
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/user/change_password", form, options);
767
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/account/auth/change_password", form, options);
760
768
  }
761
769
  /**
762
770
  * Get counts for your reports
763
771
  *
764
- * `HTTP.GET /user/report_count`
772
+ * `HTTP.GET /account/report_count`
765
773
  */
766
774
  getReportCount(form, options) {
767
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/user/report_count", form, options);
775
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/report_count", form, options);
768
776
  }
769
777
  /**
770
778
  * Get your unread counts
771
779
  *
772
- * `HTTP.GET /user/unread_count`
780
+ * `HTTP.GET /account/unread_count`
773
781
  */
774
782
  getUnreadCount(options) {
775
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/user/unread_count", {}, options);
783
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/unread_count", {}, options);
776
784
  }
777
785
  /**
778
786
  * Verify your email
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.20.0-api-v4.13",
4
+ "version": "0.20.0-api-v4.15",
5
5
  "author": "Dessalines <tyhou13@gmx.com>",
6
6
  "license": "AGPL-3.0",
7
7
  "main": "./dist/index.js",