lemmy-js-client 1.0.0-rename-timestamp-to-at.2 → 1.0.0-rename-timestamp-to-at.3
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
@@ -140,7 +140,6 @@ import { CommunityIdQuery } from "./types/CommunityIdQuery";
|
|
140
140
|
import { AdminListUsersResponse } from "./types/AdminListUsersResponse";
|
141
141
|
import { ListLoginsResponse } from "./types/ListLoginsResponse";
|
142
142
|
import { ListPersonLikedResponse } from "./types/ListPersonLikedResponse";
|
143
|
-
import { ResolveObjectResponse } from "./types/ResolveObjectResponse";
|
144
143
|
type RequestOptions = Pick<RequestInit, "signal">;
|
145
144
|
/**
|
146
145
|
* Helps build lemmy HTTP requests.
|
@@ -239,7 +238,7 @@ export declare class LemmyHttp extends Controller {
|
|
239
238
|
/**
|
240
239
|
* @summary Fetch a non-local / federated object.
|
241
240
|
*/
|
242
|
-
resolveObject(form: ResolveObjectI, options?: RequestOptions): Promise<
|
241
|
+
resolveObject(form: ResolveObjectI, options?: RequestOptions): Promise<SearchResponse>;
|
243
242
|
/**
|
244
243
|
* @summary Create a new community.
|
245
244
|
*/
|
package/dist/http.js
CHANGED
@@ -981,7 +981,12 @@ _LemmyHttp_wrapper = async function _LemmyHttp_wrapper(type_, endpoint, form, op
|
|
981
981
|
throw new Error(response.statusText);
|
982
982
|
}
|
983
983
|
if (!response.ok) {
|
984
|
-
|
984
|
+
let err = {
|
985
|
+
name: json.error ?? response.statusText,
|
986
|
+
// Leave an empty error message if undefined
|
987
|
+
message: json.message ?? "",
|
988
|
+
};
|
989
|
+
throw err;
|
985
990
|
}
|
986
991
|
else {
|
987
992
|
return json;
|
package/dist/index.d.ts
CHANGED
@@ -309,7 +309,6 @@ export { ResendVerificationEmail } from "./types/ResendVerificationEmail";
|
|
309
309
|
export { ResolveCommentReport } from "./types/ResolveCommentReport";
|
310
310
|
export { ResolveCommunityReport } from "./types/ResolveCommunityReport";
|
311
311
|
export { ResolveObject } from "./types/ResolveObject";
|
312
|
-
export { ResolveObjectResponse } from "./types/ResolveObjectResponse";
|
313
312
|
export { ResolvePostReport } from "./types/ResolvePostReport";
|
314
313
|
export { ResolvePrivateMessageReport } from "./types/ResolvePrivateMessageReport";
|
315
314
|
export { SaveComment } from "./types/SaveComment";
|
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": "1.0.0-rename-timestamp-to-at.
|
4
|
+
"version": "1.0.0-rename-timestamp-to-at.3",
|
5
5
|
"author": "Dessalines",
|
6
6
|
"license": "AGPL-3.0",
|
7
7
|
"main": "./dist/index.js",
|
@@ -43,7 +43,7 @@
|
|
43
43
|
"typescript": "^5.5.4",
|
44
44
|
"typescript-eslint": "^8.7.0"
|
45
45
|
},
|
46
|
-
"packageManager": "pnpm@10.
|
46
|
+
"packageManager": "pnpm@10.12.1",
|
47
47
|
"types": "./dist/index.d.ts",
|
48
48
|
"lint-staged": {
|
49
49
|
"*.{ts,tsx,js}": [
|
@@ -1,13 +0,0 @@
|
|
1
|
-
import type { CommentView } from "./CommentView";
|
2
|
-
import type { CommunityView } from "./CommunityView";
|
3
|
-
import type { PersonView } from "./PersonView";
|
4
|
-
import type { PostView } from "./PostView";
|
5
|
-
/**
|
6
|
-
* The response of an apub object fetch.
|
7
|
-
*/
|
8
|
-
export type ResolveObjectResponse = {
|
9
|
-
comment?: CommentView;
|
10
|
-
post?: PostView;
|
11
|
-
community?: CommunityView;
|
12
|
-
person?: PersonView;
|
13
|
-
};
|