lemmy-js-client 0.19.11-donation-dialog.0 → 0.19.12-name-and-message.1
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
@@ -771,7 +771,7 @@ export declare class LemmyHttp {
|
|
771
771
|
*
|
772
772
|
* `HTTP.POST /user/donation_dialog_shown`
|
773
773
|
*/
|
774
|
-
donation_dialog_shown(
|
774
|
+
donation_dialog_shown(): Promise<SuccessResponse>;
|
775
775
|
/**
|
776
776
|
* Set the headers (can be used to set the auth header)
|
777
777
|
*/
|
package/dist/http.js
CHANGED
@@ -904,9 +904,8 @@ class LemmyHttp {
|
|
904
904
|
*
|
905
905
|
* `HTTP.POST /user/donation_dialog_shown`
|
906
906
|
*/
|
907
|
-
donation_dialog_shown(
|
908
|
-
|
909
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/user/donation_dialog_shown", form);
|
907
|
+
donation_dialog_shown() {
|
908
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/user/donation_dialog_shown", {});
|
910
909
|
}
|
911
910
|
/**
|
912
911
|
* Set the headers (can be used to set the auth header)
|
@@ -920,7 +919,7 @@ _LemmyHttp_apiUrl = new WeakMap(), _LemmyHttp_headers = new WeakMap(), _LemmyHtt
|
|
920
919
|
return `${__classPrivateFieldGet(this, _LemmyHttp_apiUrl, "f")}${endpoint}`;
|
921
920
|
}, _LemmyHttp_wrapper = function _LemmyHttp_wrapper(type_, endpoint, form) {
|
922
921
|
return __awaiter(this, void 0, void 0, function* () {
|
923
|
-
var _a;
|
922
|
+
var _a, _b;
|
924
923
|
let response;
|
925
924
|
if (type_ === HttpType.Get) {
|
926
925
|
const getUrl = `${__classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_buildFullUrl).call(this, endpoint)}?${encodeGetParams(form)}`;
|
@@ -940,11 +939,16 @@ _LemmyHttp_apiUrl = new WeakMap(), _LemmyHttp_headers = new WeakMap(), _LemmyHtt
|
|
940
939
|
try {
|
941
940
|
json = yield response.json();
|
942
941
|
}
|
943
|
-
catch (
|
942
|
+
catch (_c) {
|
944
943
|
throw new Error(response.statusText);
|
945
944
|
}
|
946
945
|
if (!response.ok) {
|
947
|
-
|
946
|
+
let err = {
|
947
|
+
name: (_a = json.error) !== null && _a !== void 0 ? _a : response.statusText,
|
948
|
+
// Leave an empty error message if undefined
|
949
|
+
message: (_b = json.message) !== null && _b !== void 0 ? _b : "",
|
950
|
+
};
|
951
|
+
throw err;
|
948
952
|
}
|
949
953
|
else {
|
950
954
|
return json;
|
package/dist/index.d.ts
CHANGED
@@ -72,7 +72,6 @@ export { DeleteCustomEmoji } from "./types/DeleteCustomEmoji";
|
|
72
72
|
export { DeletePost } from "./types/DeletePost";
|
73
73
|
export { DeletePrivateMessage } from "./types/DeletePrivateMessage";
|
74
74
|
export { DistinguishComment } from "./types/DistinguishComment";
|
75
|
-
export { DonationDialogShown } from "./types/DonationDialogShown";
|
76
75
|
export { EditComment } from "./types/EditComment";
|
77
76
|
export { EditCommunity } from "./types/EditCommunity";
|
78
77
|
export { EditCustomEmoji } from "./types/EditCustomEmoji";
|
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.19.
|
4
|
+
"version": "0.19.12-name-and-message.1",
|
5
5
|
"author": "Dessalines <tyhou13@gmx.com>",
|
6
6
|
"license": "AGPL-3.0",
|
7
7
|
"main": "./dist/index.js",
|