lemmy-js-client 0.19.4-alpha.16 → 0.19.4-alpha.18
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/http.d.ts +5 -0
- package/dist/http.js +6 -1
- package/dist/index.d.ts +1 -0
- package/dist/types/LemmyErrorType.d.ts +22 -0
- package/dist/types/ListMediaResponse.d.ts +2 -2
- package/dist/types/LocalImageView.d.ts +6 -0
- package/dist/types/LocalImageView.js +2 -0
- package/dist/types/Site.d.ts +1 -0
- package/package.json +1 -1
package/dist/http.d.ts
CHANGED
@@ -565,6 +565,11 @@ export declare class LemmyHttp {
|
|
565
565
|
* `HTTP.POST /user/login`
|
566
566
|
*/
|
567
567
|
login(form: Login): Promise<LoginResponse>;
|
568
|
+
/**
|
569
|
+
* Invalidate the currently used auth token.
|
570
|
+
*
|
571
|
+
* `HTTP.POST /user/logout`
|
572
|
+
*/
|
568
573
|
logout(): Promise<SuccessResponse>;
|
569
574
|
/**
|
570
575
|
* Get the details for a person.
|
package/dist/http.js
CHANGED
@@ -604,6 +604,11 @@ class LemmyHttp {
|
|
604
604
|
login(form) {
|
605
605
|
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/user/login", form);
|
606
606
|
}
|
607
|
+
/**
|
608
|
+
* Invalidate the currently used auth token.
|
609
|
+
*
|
610
|
+
* `HTTP.POST /user/logout`
|
611
|
+
*/
|
607
612
|
logout() {
|
608
613
|
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/user/logout", {});
|
609
614
|
}
|
@@ -931,7 +936,7 @@ _LemmyHttp_apiUrl = new WeakMap(), _LemmyHttp_headers = new WeakMap(), _LemmyHtt
|
|
931
936
|
};
|
932
937
|
function encodeGetParams(p) {
|
933
938
|
return Object.entries(p)
|
934
|
-
.filter(kv =>
|
939
|
+
.filter(kv => kv[1] !== undefined && kv[1] !== null)
|
935
940
|
.map(kv => kv.map(encodeURIComponent).join("="))
|
936
941
|
.join("&");
|
937
942
|
}
|
package/dist/index.d.ts
CHANGED
@@ -137,6 +137,7 @@ export { ListRegistrationApplications } from "./types/ListRegistrationApplicatio
|
|
137
137
|
export { ListRegistrationApplicationsResponse } from "./types/ListRegistrationApplicationsResponse";
|
138
138
|
export { ListingType } from "./types/ListingType";
|
139
139
|
export { LocalImage } from "./types/LocalImage";
|
140
|
+
export { LocalImageView } from "./types/LocalImageView";
|
140
141
|
export { LocalSite } from "./types/LocalSite";
|
141
142
|
export { LocalSiteId } from "./types/LocalSiteId";
|
142
143
|
export { LocalSiteRateLimit } from "./types/LocalSiteRateLimit";
|
@@ -66,6 +66,26 @@ export type LemmyErrorType = {
|
|
66
66
|
error: "couldnt_find_community";
|
67
67
|
} | {
|
68
68
|
error: "couldnt_find_person";
|
69
|
+
} | {
|
70
|
+
error: "couldnt_find_comment";
|
71
|
+
} | {
|
72
|
+
error: "couldnt_find_comment_report";
|
73
|
+
} | {
|
74
|
+
error: "couldnt_find_post_report";
|
75
|
+
} | {
|
76
|
+
error: "couldnt_find_private_message_report";
|
77
|
+
} | {
|
78
|
+
error: "couldnt_find_local_user";
|
79
|
+
} | {
|
80
|
+
error: "couldnt_find_person_mention";
|
81
|
+
} | {
|
82
|
+
error: "couldnt_find_registration_application";
|
83
|
+
} | {
|
84
|
+
error: "couldnt_find_comment_reply";
|
85
|
+
} | {
|
86
|
+
error: "couldnt_find_private_message";
|
87
|
+
} | {
|
88
|
+
error: "couldnt_find_activity";
|
69
89
|
} | {
|
70
90
|
error: "person_is_blocked";
|
71
91
|
} | {
|
@@ -163,6 +183,8 @@ export type LemmyErrorType = {
|
|
163
183
|
error: "no_community_found_in_cc";
|
164
184
|
} | {
|
165
185
|
error: "no_email_setup";
|
186
|
+
} | {
|
187
|
+
error: "local_site_not_setup";
|
166
188
|
} | {
|
167
189
|
error: "email_smtp_server_needs_a_port";
|
168
190
|
} | {
|
package/dist/types/Site.d.ts
CHANGED
package/package.json
CHANGED