lemmy-js-client 1.0.0-instance-user-blocking.4 → 1.0.0-instance-user-blocking.6
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/index.d.ts +6 -0
- package/dist/types/CreateSite.d.ts +14 -12
- package/dist/types/EditSite.d.ts +17 -12
- package/dist/types/ExportDataResponse.d.ts +13 -0
- package/dist/types/ExportDataResponse.js +2 -0
- package/dist/types/InboxCombined.d.ts +16 -0
- package/dist/types/InboxCombined.js +2 -0
- package/dist/types/InboxCombinedId.d.ts +4 -0
- package/dist/types/InboxCombinedId.js +3 -0
- package/dist/types/InboxCombinedViewInternal.d.ts +43 -0
- package/dist/types/InboxCombinedViewInternal.js +2 -0
- package/dist/types/LemmyErrorType.d.ts +2 -2
- package/dist/types/LocalSiteRateLimit.d.ts +14 -14
- package/dist/types/LocalUser.d.ts +1 -0
- package/dist/types/PersonActions.d.ts +12 -0
- package/dist/types/PostOrCommentOrPrivateMessage.d.ts +10 -0
- package/dist/types/PostOrCommentOrPrivateMessage.js +2 -0
- package/dist/types/SaveUserSettings.d.ts +4 -0
- package/dist/types/UserSettingsBackup.d.ts +31 -0
- package/dist/types/UserSettingsBackup.js +2 -0
- package/dist/types/VoteView.d.ts +1 -0
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
@@ -110,6 +110,7 @@ export { EditOAuthProvider } from "./types/EditOAuthProvider";
|
|
110
110
|
export { EditPost } from "./types/EditPost";
|
111
111
|
export { EditPrivateMessage } from "./types/EditPrivateMessage";
|
112
112
|
export { EditSite } from "./types/EditSite";
|
113
|
+
export { ExportDataResponse } from "./types/ExportDataResponse";
|
113
114
|
export { FeaturePost } from "./types/FeaturePost";
|
114
115
|
export { FederatedInstances } from "./types/FederatedInstances";
|
115
116
|
export { FederationBlockList } from "./types/FederationBlockList";
|
@@ -152,7 +153,10 @@ export { HidePost } from "./types/HidePost";
|
|
152
153
|
export { ImageDetails } from "./types/ImageDetails";
|
153
154
|
export { ImageGetParams } from "./types/ImageGetParams";
|
154
155
|
export { ImageProxyParams } from "./types/ImageProxyParams";
|
156
|
+
export { InboxCombined } from "./types/InboxCombined";
|
157
|
+
export { InboxCombinedId } from "./types/InboxCombinedId";
|
155
158
|
export { InboxCombinedView } from "./types/InboxCombinedView";
|
159
|
+
export { InboxCombinedViewInternal } from "./types/InboxCombinedViewInternal";
|
156
160
|
export { InboxDataType } from "./types/InboxDataType";
|
157
161
|
export { Instance } from "./types/Instance";
|
158
162
|
export { InstanceActions } from "./types/InstanceActions";
|
@@ -285,6 +289,7 @@ export { PostActions } from "./types/PostActions";
|
|
285
289
|
export { PostFeatureType } from "./types/PostFeatureType";
|
286
290
|
export { PostId } from "./types/PostId";
|
287
291
|
export { PostListingMode } from "./types/PostListingMode";
|
292
|
+
export { PostOrCommentOrPrivateMessage } from "./types/PostOrCommentOrPrivateMessage";
|
288
293
|
export { PostReport } from "./types/PostReport";
|
289
294
|
export { PostReportId } from "./types/PostReportId";
|
290
295
|
export { PostReportResponse } from "./types/PostReportResponse";
|
@@ -352,6 +357,7 @@ export { UpdateTotpResponse } from "./types/UpdateTotpResponse";
|
|
352
357
|
export { UploadImageResponse } from "./types/UploadImageResponse";
|
353
358
|
export { UserBlockInstanceCommunitiesParams } from "./types/UserBlockInstanceCommunitiesParams";
|
354
359
|
export { UserBlockInstancePersonsParams } from "./types/UserBlockInstancePersonsParams";
|
360
|
+
export { UserSettingsBackup } from "./types/UserSettingsBackup";
|
355
361
|
export { VerifyEmail } from "./types/VerifyEmail";
|
356
362
|
export { VoteShow } from "./types/VoteShow";
|
357
363
|
export { VoteView } from "./types/VoteView";
|
@@ -28,18 +28,20 @@ export type CreateSite = {
|
|
28
28
|
discussion_languages?: Array<LanguageId>;
|
29
29
|
slur_filter_regex?: string;
|
30
30
|
actor_name_max_length?: number;
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
31
|
+
rate_limit_message_max_requests?: number;
|
32
|
+
rate_limit_message_interval_seconds?: number;
|
33
|
+
rate_limit_post_max_requests?: number;
|
34
|
+
rate_limit_post_interval_seconds?: number;
|
35
|
+
rate_limit_register_max_requests?: number;
|
36
|
+
rate_limit_register_interval_seconds?: number;
|
37
|
+
rate_limit_image_max_requests?: number;
|
38
|
+
rate_limit_image_interval_seconds?: number;
|
39
|
+
rate_limit_comment_max_requests?: number;
|
40
|
+
rate_limit_comment_interval_seconds?: number;
|
41
|
+
rate_limit_search_max_requests?: number;
|
42
|
+
rate_limit_search_interval_seconds?: number;
|
43
|
+
rate_limit_import_user_settings_max_requests?: number;
|
44
|
+
rate_limit_import_user_settings_interval_seconds?: number;
|
43
45
|
federation_enabled?: boolean;
|
44
46
|
captcha_enabled?: boolean;
|
45
47
|
captcha_difficulty?: string;
|
package/dist/types/EditSite.d.ts
CHANGED
@@ -82,33 +82,38 @@ export type EditSite = {
|
|
82
82
|
/**
|
83
83
|
* The number of messages allowed in a given time frame.
|
84
84
|
*/
|
85
|
-
|
86
|
-
|
85
|
+
rate_limit_message_max_requests?: number;
|
86
|
+
rate_limit_message_interval_seconds?: number;
|
87
87
|
/**
|
88
88
|
* The number of posts allowed in a given time frame.
|
89
89
|
*/
|
90
|
-
|
91
|
-
|
90
|
+
rate_limit_post_max_requests?: number;
|
91
|
+
rate_limit_post_interval_seconds?: number;
|
92
92
|
/**
|
93
93
|
* The number of registrations allowed in a given time frame.
|
94
94
|
*/
|
95
|
-
|
96
|
-
|
95
|
+
rate_limit_register_max_requests?: number;
|
96
|
+
rate_limit_register_interval_seconds?: number;
|
97
97
|
/**
|
98
98
|
* The number of image uploads allowed in a given time frame.
|
99
99
|
*/
|
100
|
-
|
101
|
-
|
100
|
+
rate_limit_image_max_requests?: number;
|
101
|
+
rate_limit_image_interval_seconds?: number;
|
102
102
|
/**
|
103
103
|
* The number of comments allowed in a given time frame.
|
104
104
|
*/
|
105
|
-
|
106
|
-
|
105
|
+
rate_limit_comment_max_requests?: number;
|
106
|
+
rate_limit_comment_interval_seconds?: number;
|
107
107
|
/**
|
108
108
|
* The number of searches allowed in a given time frame.
|
109
109
|
*/
|
110
|
-
|
111
|
-
|
110
|
+
rate_limit_search_max_requests?: number;
|
111
|
+
rate_limit_search_interval_seconds?: number;
|
112
|
+
/**
|
113
|
+
* The number of settings imports or exports allowed in a given time frame.
|
114
|
+
*/
|
115
|
+
rate_limit_import_user_settings_max_requests?: number;
|
116
|
+
rate_limit_import_user_settings_interval_seconds?: number;
|
112
117
|
/**
|
113
118
|
* Whether to enable federation.
|
114
119
|
*/
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import type { PostOrCommentOrPrivateMessage } from "./PostOrCommentOrPrivateMessage";
|
2
|
+
import type { UserSettingsBackup } from "./UserSettingsBackup";
|
3
|
+
/**
|
4
|
+
* Your exported data.
|
5
|
+
*/
|
6
|
+
export type ExportDataResponse = {
|
7
|
+
inbox: Array<PostOrCommentOrPrivateMessage>;
|
8
|
+
content: Array<PostOrCommentOrPrivateMessage>;
|
9
|
+
read_posts: Array<string>;
|
10
|
+
liked: Array<string>;
|
11
|
+
moderates: Array<string>;
|
12
|
+
settings: UserSettingsBackup;
|
13
|
+
};
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import type { CommentReplyId } from "./CommentReplyId";
|
2
|
+
import type { InboxCombinedId } from "./InboxCombinedId";
|
3
|
+
import type { PersonCommentMentionId } from "./PersonCommentMentionId";
|
4
|
+
import type { PersonPostMentionId } from "./PersonPostMentionId";
|
5
|
+
import type { PrivateMessageId } from "./PrivateMessageId";
|
6
|
+
/**
|
7
|
+
* A combined inbox table.
|
8
|
+
*/
|
9
|
+
export type InboxCombined = {
|
10
|
+
id: InboxCombinedId;
|
11
|
+
published_at: string;
|
12
|
+
comment_reply_id?: CommentReplyId;
|
13
|
+
person_comment_mention_id?: PersonCommentMentionId;
|
14
|
+
person_post_mention_id?: PersonPostMentionId;
|
15
|
+
private_message_id?: PrivateMessageId;
|
16
|
+
};
|
@@ -0,0 +1,43 @@
|
|
1
|
+
import type { Comment } from "./Comment";
|
2
|
+
import type { CommentActions } from "./CommentActions";
|
3
|
+
import type { CommentReply } from "./CommentReply";
|
4
|
+
import type { Community } from "./Community";
|
5
|
+
import type { CommunityActions } from "./CommunityActions";
|
6
|
+
import type { ImageDetails } from "./ImageDetails";
|
7
|
+
import type { InboxCombined } from "./InboxCombined";
|
8
|
+
import type { InstanceActions } from "./InstanceActions";
|
9
|
+
import type { Person } from "./Person";
|
10
|
+
import type { PersonActions } from "./PersonActions";
|
11
|
+
import type { PersonCommentMention } from "./PersonCommentMention";
|
12
|
+
import type { PersonPostMention } from "./PersonPostMention";
|
13
|
+
import type { Post } from "./Post";
|
14
|
+
import type { PostActions } from "./PostActions";
|
15
|
+
import type { PrivateMessage } from "./PrivateMessage";
|
16
|
+
import type { TagsView } from "./TagsView";
|
17
|
+
/**
|
18
|
+
* A combined inbox view
|
19
|
+
*/
|
20
|
+
export type InboxCombinedViewInternal = {
|
21
|
+
inbox_combined: InboxCombined;
|
22
|
+
comment_reply?: CommentReply;
|
23
|
+
person_comment_mention?: PersonCommentMention;
|
24
|
+
person_post_mention?: PersonPostMention;
|
25
|
+
private_message?: PrivateMessage;
|
26
|
+
comment?: Comment;
|
27
|
+
post?: Post;
|
28
|
+
community?: Community;
|
29
|
+
item_creator: Person;
|
30
|
+
item_recipient: Person;
|
31
|
+
image_details?: ImageDetails;
|
32
|
+
community_actions?: CommunityActions;
|
33
|
+
instance_actions?: InstanceActions;
|
34
|
+
post_actions?: PostActions;
|
35
|
+
person_actions?: PersonActions;
|
36
|
+
comment_actions?: CommentActions;
|
37
|
+
item_creator_is_admin: boolean;
|
38
|
+
post_tags: TagsView;
|
39
|
+
can_mod: boolean;
|
40
|
+
creator_banned: boolean;
|
41
|
+
creator_is_moderator: boolean;
|
42
|
+
creator_banned_from_community: boolean;
|
43
|
+
};
|
@@ -240,9 +240,9 @@ export type LemmyErrorType = {
|
|
240
240
|
} | {
|
241
241
|
error: "contradicting_filters";
|
242
242
|
} | {
|
243
|
-
error: "
|
243
|
+
error: "instance_block_communities_already_exists";
|
244
244
|
} | {
|
245
|
-
error: "
|
245
|
+
error: "instance_block_persons_already_exists";
|
246
246
|
} | {
|
247
247
|
error: "too_many_items";
|
248
248
|
} | {
|
@@ -4,20 +4,20 @@ import type { LocalSiteId } from "./LocalSiteId";
|
|
4
4
|
*/
|
5
5
|
export type LocalSiteRateLimit = {
|
6
6
|
local_site_id: LocalSiteId;
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
7
|
+
message_max_requests: number;
|
8
|
+
message_interval_seconds: number;
|
9
|
+
post_max_requests: number;
|
10
|
+
post_interval_seconds: number;
|
11
|
+
register_max_requests: number;
|
12
|
+
register_interval_seconds: number;
|
13
|
+
image_max_requests: number;
|
14
|
+
image_interval_seconds: number;
|
15
|
+
comment_max_requests: number;
|
16
|
+
comment_interval_seconds: number;
|
17
|
+
search_max_requests: number;
|
18
|
+
search_interval_seconds: number;
|
19
19
|
published_at: string;
|
20
20
|
updated_at?: string;
|
21
|
-
|
22
|
-
|
21
|
+
import_user_settings_max_requests: number;
|
22
|
+
import_user_settings_interval_seconds: number;
|
23
23
|
};
|
@@ -11,4 +11,16 @@ export type PersonActions = {
|
|
11
11
|
* A note about the person.
|
12
12
|
*/
|
13
13
|
note?: string;
|
14
|
+
/**
|
15
|
+
* When the person was voted on.
|
16
|
+
*/
|
17
|
+
voted_at?: string;
|
18
|
+
/**
|
19
|
+
* A total of upvotes given to this person
|
20
|
+
*/
|
21
|
+
upvotes?: number;
|
22
|
+
/**
|
23
|
+
* A total of downvotes given to this person
|
24
|
+
*/
|
25
|
+
downvotes?: number;
|
14
26
|
};
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import type { Comment } from "./Comment";
|
2
|
+
import type { Post } from "./Post";
|
3
|
+
import type { PrivateMessage } from "./PrivateMessage";
|
4
|
+
export type PostOrCommentOrPrivateMessage = {
|
5
|
+
Post: Post;
|
6
|
+
} | {
|
7
|
+
Comment: Comment;
|
8
|
+
} | {
|
9
|
+
PrivateMessage: PrivateMessage;
|
10
|
+
};
|
@@ -0,0 +1,31 @@
|
|
1
|
+
import type { LocalUser } from "./LocalUser";
|
2
|
+
/**
|
3
|
+
* Backup of user data. This struct should never be changed so that the data can be used as a
|
4
|
+
* long-term backup in case the instance goes down unexpectedly. All fields are optional to allow
|
5
|
+
* importing partial backups.
|
6
|
+
*
|
7
|
+
* This data should not be parsed by apps/clients, but directly downloaded as a file.
|
8
|
+
*
|
9
|
+
* Be careful with any changes to this struct, to avoid breaking changes which could prevent
|
10
|
+
* importing older backups.
|
11
|
+
*/
|
12
|
+
export type UserSettingsBackup = {
|
13
|
+
display_name?: string;
|
14
|
+
bio?: string;
|
15
|
+
avatar?: string;
|
16
|
+
banner?: string;
|
17
|
+
matrix_id?: string;
|
18
|
+
bot_account?: boolean;
|
19
|
+
settings?: LocalUser;
|
20
|
+
followed_communities: Array<string>;
|
21
|
+
saved_posts: Array<string>;
|
22
|
+
saved_comments: Array<string>;
|
23
|
+
blocked_communities: Array<string>;
|
24
|
+
blocked_users: Array<string>;
|
25
|
+
/**
|
26
|
+
* Only kept for v0.19 compatibility
|
27
|
+
*/
|
28
|
+
blocked_instances: Array<string>;
|
29
|
+
blocked_instances_communities: Array<string>;
|
30
|
+
blocked_instances_persons: Array<string>;
|
31
|
+
};
|
package/dist/types/VoteView.d.ts
CHANGED
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-instance-user-blocking.
|
4
|
+
"version": "1.0.0-instance-user-blocking.6",
|
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.12.
|
46
|
+
"packageManager": "pnpm@10.12.4",
|
47
47
|
"types": "./dist/index.d.ts",
|
48
48
|
"lint-staged": {
|
49
49
|
"*.{ts,tsx,js}": [
|