lemmy-js-client 0.20.0-api-v4.12 → 0.20.0-api-v4.14
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 +10 -10
 - package/dist/http.js +18 -18
 - package/package.json +1 -1
 
    
        package/dist/http.d.ts
    CHANGED
    
    | 
         @@ -200,7 +200,7 @@ export declare class LemmyHttp { 
     | 
|
| 
       200 
200 
     | 
    
         
             
                /**
         
     | 
| 
       201 
201 
     | 
    
         
             
                 * Generate a TOTP / two-factor secret.
         
     | 
| 
       202 
202 
     | 
    
         
             
                 *
         
     | 
| 
       203 
     | 
    
         
            -
                 * Afterwards you need to call `/ 
     | 
| 
      
 203 
     | 
    
         
            +
                 * Afterwards you need to call `/account/auth/totp/update` with a valid token to enable it.
         
     | 
| 
       204 
204 
     | 
    
         
             
                 *
         
     | 
| 
       205 
205 
     | 
    
         
             
                 * `HTTP.POST /account/auth/totp/generate`
         
     | 
| 
       206 
206 
     | 
    
         
             
                 */
         
     | 
| 
         @@ -227,13 +227,13 @@ export declare class LemmyHttp { 
     | 
|
| 
       227 
227 
     | 
    
         
             
                /**
         
     | 
| 
       228 
228 
     | 
    
         
             
                 * List login tokens for your user
         
     | 
| 
       229 
229 
     | 
    
         
             
                 *
         
     | 
| 
       230 
     | 
    
         
            -
                 * `HTTP.GET / 
     | 
| 
      
 230 
     | 
    
         
            +
                 * `HTTP.GET /account/list_logins`
         
     | 
| 
       231 
231 
     | 
    
         
             
                 */
         
     | 
| 
       232 
232 
     | 
    
         
             
                listLogins(options?: RequestOptions): Promise<LoginToken[]>;
         
     | 
| 
       233 
233 
     | 
    
         
             
                /**
         
     | 
| 
       234 
234 
     | 
    
         
             
                 * Returns an error message if your auth token is invalid
         
     | 
| 
       235 
235 
     | 
    
         
             
                 *
         
     | 
| 
       236 
     | 
    
         
            -
                 * `HTTP.GET / 
     | 
| 
      
 236 
     | 
    
         
            +
                 * `HTTP.GET /account/validate_auth`
         
     | 
| 
       237 
237 
     | 
    
         
             
                 */
         
     | 
| 
       238 
238 
     | 
    
         
             
                validateAuth(options?: RequestOptions): Promise<SuccessResponse>;
         
     | 
| 
       239 
239 
     | 
    
         
             
                /**
         
     | 
| 
         @@ -251,7 +251,7 @@ export declare class LemmyHttp { 
     | 
|
| 
       251 
251 
     | 
    
         
             
                /**
         
     | 
| 
       252 
252 
     | 
    
         
             
                 * Enable / Disable TOTP / two-factor authentication.
         
     | 
| 
       253 
253 
     | 
    
         
             
                 *
         
     | 
| 
       254 
     | 
    
         
            -
                 * To enable, you need to first call `/ 
     | 
| 
      
 254 
     | 
    
         
            +
                 * To enable, you need to first call `/account/auth/totp/generate` and then pass a valid token to this.
         
     | 
| 
       255 
255 
     | 
    
         
             
                 *
         
     | 
| 
       256 
256 
     | 
    
         
             
                 * Disabling is only possible if 2FA was previously enabled. Again it is necessary to pass a valid token.
         
     | 
| 
       257 
257 
     | 
    
         
             
                 *
         
     | 
| 
         @@ -618,7 +618,7 @@ export declare class LemmyHttp { 
     | 
|
| 
       618 
618 
     | 
    
         
             
                /**
         
     | 
| 
       619 
619 
     | 
    
         
             
                 * Get mentions for your user.
         
     | 
| 
       620 
620 
     | 
    
         
             
                 *
         
     | 
| 
       621 
     | 
    
         
            -
                 * `HTTP.GET / 
     | 
| 
      
 621 
     | 
    
         
            +
                 * `HTTP.GET /account/mention`
         
     | 
| 
       622 
622 
     | 
    
         
             
                 */
         
     | 
| 
       623 
623 
     | 
    
         
             
                getPersonMentions(form: GetPersonMentions, options?: RequestOptions): Promise<GetPersonMentionsResponse>;
         
     | 
| 
       624 
624 
     | 
    
         
             
                /**
         
     | 
| 
         @@ -636,7 +636,7 @@ export declare class LemmyHttp { 
     | 
|
| 
       636 
636 
     | 
    
         
             
                /**
         
     | 
| 
       637 
637 
     | 
    
         
             
                 * Get comment replies.
         
     | 
| 
       638 
638 
     | 
    
         
             
                 *
         
     | 
| 
       639 
     | 
    
         
            -
                 * `HTTP.GET / 
     | 
| 
      
 639 
     | 
    
         
            +
                 * `HTTP.GET /account/replies`
         
     | 
| 
       640 
640 
     | 
    
         
             
                 */
         
     | 
| 
       641 
641 
     | 
    
         
             
                getReplies(form: GetReplies, options?: RequestOptions): Promise<GetRepliesResponse>;
         
     | 
| 
       642 
642 
     | 
    
         
             
                /**
         
     | 
| 
         @@ -684,7 +684,7 @@ export declare class LemmyHttp { 
     | 
|
| 
       684 
684 
     | 
    
         
             
                /**
         
     | 
| 
       685 
685 
     | 
    
         
             
                 * Mark all replies as read.
         
     | 
| 
       686 
686 
     | 
    
         
             
                 *
         
     | 
| 
       687 
     | 
    
         
            -
                 * `HTTP.POST / 
     | 
| 
      
 687 
     | 
    
         
            +
                 * `HTTP.POST /account/mention/mark_all_as_read`
         
     | 
| 
       688 
688 
     | 
    
         
             
                 */
         
     | 
| 
       689 
689 
     | 
    
         
             
                markAllAsRead(options?: RequestOptions): Promise<GetRepliesResponse>;
         
     | 
| 
       690 
690 
     | 
    
         
             
                /**
         
     | 
| 
         @@ -696,19 +696,19 @@ export declare class LemmyHttp { 
     | 
|
| 
       696 
696 
     | 
    
         
             
                /**
         
     | 
| 
       697 
697 
     | 
    
         
             
                 * Change your user password.
         
     | 
| 
       698 
698 
     | 
    
         
             
                 *
         
     | 
| 
       699 
     | 
    
         
            -
                 * `HTTP.PUT / 
     | 
| 
      
 699 
     | 
    
         
            +
                 * `HTTP.PUT /account/auth/change_password`
         
     | 
| 
       700 
700 
     | 
    
         
             
                 */
         
     | 
| 
       701 
701 
     | 
    
         
             
                changePassword(form: ChangePassword, options?: RequestOptions): Promise<LoginResponse>;
         
     | 
| 
       702 
702 
     | 
    
         
             
                /**
         
     | 
| 
       703 
703 
     | 
    
         
             
                 * Get counts for your reports
         
     | 
| 
       704 
704 
     | 
    
         
             
                 *
         
     | 
| 
       705 
     | 
    
         
            -
                 * `HTTP.GET / 
     | 
| 
      
 705 
     | 
    
         
            +
                 * `HTTP.GET /account/report_count`
         
     | 
| 
       706 
706 
     | 
    
         
             
                 */
         
     | 
| 
       707 
707 
     | 
    
         
             
                getReportCount(form: GetReportCount, options?: RequestOptions): Promise<GetReportCountResponse>;
         
     | 
| 
       708 
708 
     | 
    
         
             
                /**
         
     | 
| 
       709 
709 
     | 
    
         
             
                 * Get your unread counts
         
     | 
| 
       710 
710 
     | 
    
         
             
                 *
         
     | 
| 
       711 
     | 
    
         
            -
                 * `HTTP.GET / 
     | 
| 
      
 711 
     | 
    
         
            +
                 * `HTTP.GET /account/unread_count`
         
     | 
| 
       712 
712 
     | 
    
         
             
                 */
         
     | 
| 
       713 
713 
     | 
    
         
             
                getUnreadCount(options?: RequestOptions): Promise<GetUnreadCountResponse>;
         
     | 
| 
       714 
714 
     | 
    
         
             
                /**
         
     | 
    
        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 `/ 
     | 
| 
      
 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 
     | 
    
         
             
                 */
         
     | 
| 
         @@ -123,18 +123,18 @@ class LemmyHttp { 
     | 
|
| 
       123 
123 
     | 
    
         
             
                /**
         
     | 
| 
       124 
124 
     | 
    
         
             
                 * List login tokens for your user
         
     | 
| 
       125 
125 
     | 
    
         
             
                 *
         
     | 
| 
       126 
     | 
    
         
            -
                 * `HTTP.GET / 
     | 
| 
      
 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, "/ 
     | 
| 
      
 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 / 
     | 
| 
      
 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, "/ 
     | 
| 
      
 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 `/ 
     | 
| 
      
 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 
     | 
    
         
             
                 *
         
     | 
| 
         @@ -649,10 +649,10 @@ class LemmyHttp { 
     | 
|
| 
       649 
649 
     | 
    
         
             
                /**
         
     | 
| 
       650 
650 
     | 
    
         
             
                 * Get mentions for your user.
         
     | 
| 
       651 
651 
     | 
    
         
             
                 *
         
     | 
| 
       652 
     | 
    
         
            -
                 * `HTTP.GET / 
     | 
| 
      
 652 
     | 
    
         
            +
                 * `HTTP.GET /account/mention`
         
     | 
| 
       653 
653 
     | 
    
         
             
                 */
         
     | 
| 
       654 
654 
     | 
    
         
             
                getPersonMentions(form, options) {
         
     | 
| 
       655 
     | 
    
         
            -
                    return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/ 
     | 
| 
      
 655 
     | 
    
         
            +
                    return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/mention", form, options);
         
     | 
| 
       656 
656 
     | 
    
         
             
                }
         
     | 
| 
       657 
657 
     | 
    
         
             
                /**
         
     | 
| 
       658 
658 
     | 
    
         
             
                 * Mark a person mention as read.
         
     | 
| 
         @@ -673,10 +673,10 @@ class LemmyHttp { 
     | 
|
| 
       673 
673 
     | 
    
         
             
                /**
         
     | 
| 
       674 
674 
     | 
    
         
             
                 * Get comment replies.
         
     | 
| 
       675 
675 
     | 
    
         
             
                 *
         
     | 
| 
       676 
     | 
    
         
            -
                 * `HTTP.GET / 
     | 
| 
      
 676 
     | 
    
         
            +
                 * `HTTP.GET /account/replies`
         
     | 
| 
       677 
677 
     | 
    
         
             
                 */
         
     | 
| 
       678 
678 
     | 
    
         
             
                getReplies(form, options) {
         
     | 
| 
       679 
     | 
    
         
            -
                    return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/ 
     | 
| 
      
 679 
     | 
    
         
            +
                    return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/replies", form, options);
         
     | 
| 
       680 
680 
     | 
    
         
             
                }
         
     | 
| 
       681 
681 
     | 
    
         
             
                /**
         
     | 
| 
       682 
682 
     | 
    
         
             
                 * Ban a person from your site.
         
     | 
| 
         @@ -737,10 +737,10 @@ class LemmyHttp { 
     | 
|
| 
       737 
737 
     | 
    
         
             
                /**
         
     | 
| 
       738 
738 
     | 
    
         
             
                 * Mark all replies as read.
         
     | 
| 
       739 
739 
     | 
    
         
             
                 *
         
     | 
| 
       740 
     | 
    
         
            -
                 * `HTTP.POST / 
     | 
| 
      
 740 
     | 
    
         
            +
                 * `HTTP.POST /account/mention/mark_all_as_read`
         
     | 
| 
       741 
741 
     | 
    
         
             
                 */
         
     | 
| 
       742 
742 
     | 
    
         
             
                markAllAsRead(options) {
         
     | 
| 
       743 
     | 
    
         
            -
                    return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/ 
     | 
| 
      
 743 
     | 
    
         
            +
                    return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/mention/mark_all_as_read", {}, options);
         
     | 
| 
       744 
744 
     | 
    
         
             
                }
         
     | 
| 
       745 
745 
     | 
    
         
             
                /**
         
     | 
| 
       746 
746 
     | 
    
         
             
                 * Save your user settings.
         
     | 
| 
         @@ -753,26 +753,26 @@ class LemmyHttp { 
     | 
|
| 
       753 
753 
     | 
    
         
             
                /**
         
     | 
| 
       754 
754 
     | 
    
         
             
                 * Change your user password.
         
     | 
| 
       755 
755 
     | 
    
         
             
                 *
         
     | 
| 
       756 
     | 
    
         
            -
                 * `HTTP.PUT / 
     | 
| 
      
 756 
     | 
    
         
            +
                 * `HTTP.PUT /account/auth/change_password`
         
     | 
| 
       757 
757 
     | 
    
         
             
                 */
         
     | 
| 
       758 
758 
     | 
    
         
             
                changePassword(form, options) {
         
     | 
| 
       759 
     | 
    
         
            -
                    return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/ 
     | 
| 
      
 759 
     | 
    
         
            +
                    return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/account/auth/change_password", form, options);
         
     | 
| 
       760 
760 
     | 
    
         
             
                }
         
     | 
| 
       761 
761 
     | 
    
         
             
                /**
         
     | 
| 
       762 
762 
     | 
    
         
             
                 * Get counts for your reports
         
     | 
| 
       763 
763 
     | 
    
         
             
                 *
         
     | 
| 
       764 
     | 
    
         
            -
                 * `HTTP.GET / 
     | 
| 
      
 764 
     | 
    
         
            +
                 * `HTTP.GET /account/report_count`
         
     | 
| 
       765 
765 
     | 
    
         
             
                 */
         
     | 
| 
       766 
766 
     | 
    
         
             
                getReportCount(form, options) {
         
     | 
| 
       767 
     | 
    
         
            -
                    return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/ 
     | 
| 
      
 767 
     | 
    
         
            +
                    return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/report_count", form, options);
         
     | 
| 
       768 
768 
     | 
    
         
             
                }
         
     | 
| 
       769 
769 
     | 
    
         
             
                /**
         
     | 
| 
       770 
770 
     | 
    
         
             
                 * Get your unread counts
         
     | 
| 
       771 
771 
     | 
    
         
             
                 *
         
     | 
| 
       772 
     | 
    
         
            -
                 * `HTTP.GET / 
     | 
| 
      
 772 
     | 
    
         
            +
                 * `HTTP.GET /account/unread_count`
         
     | 
| 
       773 
773 
     | 
    
         
             
                 */
         
     | 
| 
       774 
774 
     | 
    
         
             
                getUnreadCount(options) {
         
     | 
| 
       775 
     | 
    
         
            -
                    return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/ 
     | 
| 
      
 775 
     | 
    
         
            +
                    return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/unread_count", {}, options);
         
     | 
| 
       776 
776 
     | 
    
         
             
                }
         
     | 
| 
       777 
777 
     | 
    
         
             
                /**
         
     | 
| 
       778 
778 
     | 
    
         
             
                 * Verify your email
         
     | 
    
        package/package.json
    CHANGED