lemmy-js-client 1.0.0-emoji-shortcode.1 → 1.0.0-error-status-code.0
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 +2 -1
- package/dist/http.js +4 -3
- package/dist/index.d.ts +1 -1
- package/dist/types/CreateCustomEmoji.d.ts +1 -2
- package/dist/types/CreateCustomEmoji.js +1 -0
- package/dist/types/EditCustomEmoji.d.ts +5 -7
- package/dist/types/LocalSite.d.ts +2 -0
- package/dist/types/LocalUser.d.ts +4 -0
- package/dist/types/Notification.d.ts +2 -2
- package/dist/types/NotificationTypes.d.ts +4 -0
- package/dist/types/ReadableFederationState.d.ts +1 -1
- package/dist/types/SaveUserSettings.d.ts +4 -0
- package/package.json +1 -1
- package/dist/types/NotificationType.d.ts +0 -4
- /package/dist/types/{NotificationType.js → NotificationTypes.js} +0 -0
package/dist/http.d.ts
CHANGED
|
@@ -781,6 +781,7 @@ export declare class LemmyHttp extends Controller {
|
|
|
781
781
|
* The msg is either an empty string, or extra non-translatable info.
|
|
782
782
|
*/
|
|
783
783
|
export declare class LemmyError extends Error {
|
|
784
|
-
|
|
784
|
+
status: number;
|
|
785
|
+
constructor(name: string, status: number, msg?: string);
|
|
785
786
|
}
|
|
786
787
|
export {};
|
package/dist/http.js
CHANGED
|
@@ -1015,11 +1015,11 @@ _LemmyHttp_wrapper = async function _LemmyHttp_wrapper(type_, endpoint, form, op
|
|
|
1015
1015
|
json = await response.json();
|
|
1016
1016
|
}
|
|
1017
1017
|
catch {
|
|
1018
|
-
throw new LemmyError(response.statusText);
|
|
1018
|
+
throw new LemmyError(response.statusText, response.status);
|
|
1019
1019
|
}
|
|
1020
1020
|
if (!response.ok) {
|
|
1021
1021
|
console.error(`Request error while calling ${type_} ${endpoint} with ${form}`);
|
|
1022
|
-
let err = new LemmyError(json.error ?? response.statusText, json.message);
|
|
1022
|
+
let err = new LemmyError(json.error ?? response.statusText, response.status, json.message);
|
|
1023
1023
|
throw err;
|
|
1024
1024
|
}
|
|
1025
1025
|
else {
|
|
@@ -2114,9 +2114,10 @@ function createFormData(image) {
|
|
|
2114
2114
|
* The msg is either an empty string, or extra non-translatable info.
|
|
2115
2115
|
*/
|
|
2116
2116
|
class LemmyError extends Error {
|
|
2117
|
-
constructor(name, msg) {
|
|
2117
|
+
constructor(name, status, msg) {
|
|
2118
2118
|
super(msg ?? "");
|
|
2119
2119
|
this.name = name;
|
|
2120
|
+
this.status = status;
|
|
2120
2121
|
// Set the prototype explicitly.
|
|
2121
2122
|
Object.setPrototypeOf(this, LemmyError.prototype);
|
|
2122
2123
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -260,7 +260,7 @@ export { Notification } from "./types/Notification";
|
|
|
260
260
|
export { NotificationData } from "./types/NotificationData";
|
|
261
261
|
export { NotificationDataType } from "./types/NotificationDataType";
|
|
262
262
|
export { NotificationId } from "./types/NotificationId";
|
|
263
|
-
export {
|
|
263
|
+
export { NotificationTypes } from "./types/NotificationTypes";
|
|
264
264
|
export { NotificationView } from "./types/NotificationView";
|
|
265
265
|
export { OAuthAccount } from "./types/OAuthAccount";
|
|
266
266
|
export { OAuthProvider } from "./types/OAuthProvider";
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import type { CustomEmojiId } from "./CustomEmojiId";
|
|
2
|
-
import type { DbUrl } from "./DbUrl";
|
|
3
2
|
/**
|
|
4
|
-
* Edit
|
|
3
|
+
* Edit a custom emoji.
|
|
5
4
|
*/
|
|
6
5
|
export type EditCustomEmoji = {
|
|
7
6
|
id: CustomEmojiId;
|
|
8
|
-
category
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
keywords?: Array<string>;
|
|
7
|
+
category: string;
|
|
8
|
+
image_url: string;
|
|
9
|
+
alt_text: string;
|
|
10
|
+
keywords: Array<string>;
|
|
13
11
|
};
|
|
@@ -3,6 +3,7 @@ import type { FederationMode } from "./FederationMode";
|
|
|
3
3
|
import type { ListingType } from "./ListingType";
|
|
4
4
|
import type { LocalSiteId } from "./LocalSiteId";
|
|
5
5
|
import type { MultiCommunityId } from "./MultiCommunityId";
|
|
6
|
+
import type { PersonId } from "./PersonId";
|
|
6
7
|
import type { PostListingMode } from "./PostListingMode";
|
|
7
8
|
import type { PostSortType } from "./PostSortType";
|
|
8
9
|
import type { RegistrationMode } from "./RegistrationMode";
|
|
@@ -139,5 +140,6 @@ export type LocalSite = {
|
|
|
139
140
|
*/
|
|
140
141
|
disable_email_notifications: boolean;
|
|
141
142
|
suggested_communities?: MultiCommunityId;
|
|
143
|
+
multi_comm_follower: PersonId;
|
|
142
144
|
default_items_per_page: number;
|
|
143
145
|
};
|
|
@@ -63,6 +63,10 @@ export type LocalUser = {
|
|
|
63
63
|
*/
|
|
64
64
|
post_listing_mode: PostListingMode;
|
|
65
65
|
totp_2fa_enabled: boolean;
|
|
66
|
+
/**
|
|
67
|
+
* Whether to allow keyboard navigation (for browsing and interacting with posts and comments).
|
|
68
|
+
*/
|
|
69
|
+
enable_keyboard_navigation: boolean;
|
|
66
70
|
/**
|
|
67
71
|
* Whether user avatars and inline images in the UI that are gifs should be allowed to play or
|
|
68
72
|
* should be paused
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { CommentId } from "./CommentId";
|
|
2
2
|
import type { NotificationId } from "./NotificationId";
|
|
3
|
-
import type {
|
|
3
|
+
import type { NotificationTypes } from "./NotificationTypes";
|
|
4
4
|
import type { PersonId } from "./PersonId";
|
|
5
5
|
import type { PostId } from "./PostId";
|
|
6
6
|
import type { PrivateMessageId } from "./PrivateMessageId";
|
|
@@ -10,7 +10,7 @@ export type Notification = {
|
|
|
10
10
|
comment_id?: CommentId;
|
|
11
11
|
read: boolean;
|
|
12
12
|
published_at: string;
|
|
13
|
-
kind:
|
|
13
|
+
kind: NotificationTypes;
|
|
14
14
|
post_id?: PostId;
|
|
15
15
|
private_message_id?: PrivateMessageId;
|
|
16
16
|
};
|
|
@@ -98,6 +98,10 @@ export type SaveUserSettings = {
|
|
|
98
98
|
* Enable infinite scroll
|
|
99
99
|
*/
|
|
100
100
|
infinite_scroll_enabled?: boolean;
|
|
101
|
+
/**
|
|
102
|
+
* Whether to allow keyboard navigation (for browsing and interacting with posts and comments).
|
|
103
|
+
*/
|
|
104
|
+
enable_keyboard_navigation?: boolean;
|
|
101
105
|
/**
|
|
102
106
|
* Whether user avatars or inline images in the UI that are gifs should be allowed to play or
|
|
103
107
|
* should be paused
|
package/package.json
CHANGED
|
File without changes
|