lemmy-js-client 1.0.0-enum-variants-snake-case.3 → 1.0.0-error-status-public.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/index.d.ts +1 -0
- package/dist/types/CommentActions.d.ts +6 -6
- package/dist/types/CommunityActions.d.ts +4 -4
- package/dist/types/CreateCommentLike.d.ts +1 -4
- package/dist/types/CreatePostLike.d.ts +1 -4
- package/dist/types/MarkManyPostsAsRead.d.ts +1 -0
- package/dist/types/ModlogCombinedView.d.ts +18 -18
- package/dist/types/MultiCommunityEntry.d.ts +6 -0
- package/dist/types/MultiCommunityEntry.js +2 -0
- package/dist/types/NotificationData.d.ts +13 -13
- package/dist/types/PersonContentCombinedView.d.ts +2 -2
- package/dist/types/PersonLikedCombinedView.d.ts +2 -2
- package/dist/types/PersonSavedCombinedView.d.ts +2 -2
- package/dist/types/Post.d.ts +4 -4
- package/dist/types/PostActions.d.ts +11 -11
- package/dist/types/PostOrCommentOrPrivateMessage.d.ts +3 -3
- package/dist/types/ReportCombinedView.d.ts +4 -4
- package/dist/types/SearchCombinedView.d.ts +5 -5
- package/dist/types/UntranslatedError.d.ts +3 -1
- package/dist/types/UserSettingsBackup.d.ts +2 -0
- package/dist/types/VoteView.d.ts +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -247,6 +247,7 @@ export { ModTransferCommunityView } from "./types/ModTransferCommunityView";
|
|
|
247
247
|
export { ModlogActionType } from "./types/ModlogActionType";
|
|
248
248
|
export { ModlogCombinedView } from "./types/ModlogCombinedView";
|
|
249
249
|
export { MultiCommunity } from "./types/MultiCommunity";
|
|
250
|
+
export { MultiCommunityEntry } from "./types/MultiCommunityEntry";
|
|
250
251
|
export { MultiCommunityFollow } from "./types/MultiCommunityFollow";
|
|
251
252
|
export { MultiCommunityId } from "./types/MultiCommunityId";
|
|
252
253
|
export { MultiCommunityResponse } from "./types/MultiCommunityResponse";
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
export type CommentActions = {
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* When the comment was upvoted or downvoted.
|
|
4
4
|
*/
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* When the comment was liked.
|
|
8
|
-
*/
|
|
9
|
-
liked_at?: string;
|
|
5
|
+
voted_at?: string;
|
|
10
6
|
/**
|
|
11
7
|
* When the comment was saved.
|
|
12
8
|
*/
|
|
13
9
|
saved_at?: string;
|
|
10
|
+
/**
|
|
11
|
+
* True if upvoted, false if downvoted. Upvote is greater than downvote.
|
|
12
|
+
*/
|
|
13
|
+
vote_is_upvote?: boolean;
|
|
14
14
|
};
|
|
@@ -5,10 +5,6 @@ export type CommunityActions = {
|
|
|
5
5
|
* When the community was followed.
|
|
6
6
|
*/
|
|
7
7
|
followed_at?: string;
|
|
8
|
-
/**
|
|
9
|
-
* The state of the community follow.
|
|
10
|
-
*/
|
|
11
|
-
follow_state?: CommunityFollowerState;
|
|
12
8
|
/**
|
|
13
9
|
* When the community was blocked.
|
|
14
10
|
*/
|
|
@@ -25,5 +21,9 @@ export type CommunityActions = {
|
|
|
25
21
|
* When their ban expires.
|
|
26
22
|
*/
|
|
27
23
|
ban_expires_at?: string;
|
|
24
|
+
/**
|
|
25
|
+
* The state of the community follow.
|
|
26
|
+
*/
|
|
27
|
+
follow_state?: CommunityFollowerState;
|
|
28
28
|
notifications?: CommunityNotificationsMode;
|
|
29
29
|
};
|
|
@@ -17,39 +17,39 @@ import type { ModRemoveCommentView } from "./ModRemoveCommentView";
|
|
|
17
17
|
import type { ModRemovePostView } from "./ModRemovePostView";
|
|
18
18
|
import type { ModTransferCommunityView } from "./ModTransferCommunityView";
|
|
19
19
|
export type ModlogCombinedView = ({
|
|
20
|
-
type_: "
|
|
20
|
+
type_: "admin_allow_instance";
|
|
21
21
|
} & AdminAllowInstanceView) | ({
|
|
22
|
-
type_: "
|
|
22
|
+
type_: "admin_block_instance";
|
|
23
23
|
} & AdminBlockInstanceView) | ({
|
|
24
|
-
type_: "
|
|
24
|
+
type_: "admin_purge_comment";
|
|
25
25
|
} & AdminPurgeCommentView) | ({
|
|
26
|
-
type_: "
|
|
26
|
+
type_: "admin_purge_community";
|
|
27
27
|
} & AdminPurgeCommunityView) | ({
|
|
28
|
-
type_: "
|
|
28
|
+
type_: "admin_purge_person";
|
|
29
29
|
} & AdminPurgePersonView) | ({
|
|
30
|
-
type_: "
|
|
30
|
+
type_: "admin_purge_post";
|
|
31
31
|
} & AdminPurgePostView) | ({
|
|
32
|
-
type_: "
|
|
32
|
+
type_: "admin_add";
|
|
33
33
|
} & AdminAddView) | ({
|
|
34
|
-
type_: "
|
|
34
|
+
type_: "mod_add_to_community";
|
|
35
35
|
} & ModAddToCommunityView) | ({
|
|
36
|
-
type_: "
|
|
36
|
+
type_: "admin_ban";
|
|
37
37
|
} & AdminBanView) | ({
|
|
38
|
-
type_: "
|
|
38
|
+
type_: "mod_ban_from_community";
|
|
39
39
|
} & ModBanFromCommunityView) | ({
|
|
40
|
-
type_: "
|
|
40
|
+
type_: "mod_feature_post";
|
|
41
41
|
} & ModFeaturePostView) | ({
|
|
42
|
-
type_: "
|
|
42
|
+
type_: "mod_change_community_visibility";
|
|
43
43
|
} & ModChangeCommunityVisibilityView) | ({
|
|
44
|
-
type_: "
|
|
44
|
+
type_: "mod_lock_post";
|
|
45
45
|
} & ModLockPostView) | ({
|
|
46
|
-
type_: "
|
|
46
|
+
type_: "mod_remove_comment";
|
|
47
47
|
} & ModRemoveCommentView) | ({
|
|
48
|
-
type_: "
|
|
48
|
+
type_: "admin_remove_community";
|
|
49
49
|
} & AdminRemoveCommunityView) | ({
|
|
50
|
-
type_: "
|
|
50
|
+
type_: "mod_remove_post";
|
|
51
51
|
} & ModRemovePostView) | ({
|
|
52
|
-
type_: "
|
|
52
|
+
type_: "mod_transfer_community";
|
|
53
53
|
} & ModTransferCommunityView) | ({
|
|
54
|
-
type_: "
|
|
54
|
+
type_: "mod_lock_comment";
|
|
55
55
|
} & ModLockCommentView);
|
|
@@ -12,29 +12,29 @@ import type { ModTransferCommunity } from "./ModTransferCommunity";
|
|
|
12
12
|
import type { PostView } from "./PostView";
|
|
13
13
|
import type { PrivateMessageView } from "./PrivateMessageView";
|
|
14
14
|
export type NotificationData = ({
|
|
15
|
-
type_: "
|
|
15
|
+
type_: "comment";
|
|
16
16
|
} & CommentView) | ({
|
|
17
|
-
type_: "
|
|
17
|
+
type_: "post";
|
|
18
18
|
} & PostView) | ({
|
|
19
|
-
type_: "
|
|
19
|
+
type_: "private_message";
|
|
20
20
|
} & PrivateMessageView) | ({
|
|
21
|
-
type_: "
|
|
21
|
+
type_: "admin_add";
|
|
22
22
|
} & AdminAdd) | ({
|
|
23
|
-
type_: "
|
|
23
|
+
type_: "mod_add_to_community";
|
|
24
24
|
} & ModAddToCommunity) | ({
|
|
25
|
-
type_: "
|
|
25
|
+
type_: "admin_ban";
|
|
26
26
|
} & AdminBan) | ({
|
|
27
|
-
type_: "
|
|
27
|
+
type_: "mod_ban_from_community";
|
|
28
28
|
} & ModBanFromCommunity) | ({
|
|
29
|
-
type_: "
|
|
29
|
+
type_: "mod_lock_post";
|
|
30
30
|
} & ModLockPost) | ({
|
|
31
|
-
type_: "
|
|
31
|
+
type_: "mod_lock_comment";
|
|
32
32
|
} & ModLockComment) | ({
|
|
33
|
-
type_: "
|
|
33
|
+
type_: "mod_remove_post";
|
|
34
34
|
} & ModRemovePost) | ({
|
|
35
|
-
type_: "
|
|
35
|
+
type_: "mod_remove_comment";
|
|
36
36
|
} & ModRemoveComment) | ({
|
|
37
|
-
type_: "
|
|
37
|
+
type_: "admin_remove_community";
|
|
38
38
|
} & AdminRemoveCommunity) | ({
|
|
39
|
-
type_: "
|
|
39
|
+
type_: "mod_transfer_community";
|
|
40
40
|
} & ModTransferCommunity);
|
package/dist/types/Post.d.ts
CHANGED
|
@@ -79,14 +79,14 @@ export type Post = {
|
|
|
79
79
|
* Time at which the post will be published. None means publish immediately.
|
|
80
80
|
*/
|
|
81
81
|
scheduled_publish_time_at?: string;
|
|
82
|
+
/**
|
|
83
|
+
* The time of the newest comment in the post, if the post has any comments.
|
|
84
|
+
*/
|
|
85
|
+
newest_comment_time_at?: string;
|
|
82
86
|
comments: number;
|
|
83
87
|
score: number;
|
|
84
88
|
upvotes: number;
|
|
85
89
|
downvotes: number;
|
|
86
|
-
/**
|
|
87
|
-
* The time of the newest comment in the post.
|
|
88
|
-
*/
|
|
89
|
-
newest_comment_time_at: string;
|
|
90
90
|
report_count: number;
|
|
91
91
|
unresolved_report_count: number;
|
|
92
92
|
/**
|
|
@@ -8,26 +8,26 @@ export type PostActions = {
|
|
|
8
8
|
* When was the last time you read the comments.
|
|
9
9
|
*/
|
|
10
10
|
read_comments_at?: string;
|
|
11
|
-
/**
|
|
12
|
-
* The number of comments you read last. Subtract this from total comments to get an unread
|
|
13
|
-
* count.
|
|
14
|
-
*/
|
|
15
|
-
read_comments_amount?: number;
|
|
16
11
|
/**
|
|
17
12
|
* When the post was saved.
|
|
18
13
|
*/
|
|
19
14
|
saved_at?: string;
|
|
20
15
|
/**
|
|
21
|
-
* When the post was
|
|
22
|
-
*/
|
|
23
|
-
liked_at?: string;
|
|
24
|
-
/**
|
|
25
|
-
* The like / score of the post.
|
|
16
|
+
* When the post was upvoted or downvoted.
|
|
26
17
|
*/
|
|
27
|
-
|
|
18
|
+
voted_at?: string;
|
|
28
19
|
/**
|
|
29
20
|
* When the post was hidden.
|
|
30
21
|
*/
|
|
31
22
|
hidden_at?: string;
|
|
23
|
+
/**
|
|
24
|
+
* The number of comments you read last. Subtract this from total comments to get an unread
|
|
25
|
+
* count.
|
|
26
|
+
*/
|
|
27
|
+
read_comments_amount?: number;
|
|
28
|
+
/**
|
|
29
|
+
* True if upvoted, false if downvoted. Upvote is greater than downvote.
|
|
30
|
+
*/
|
|
31
|
+
vote_is_upvote?: boolean;
|
|
32
32
|
notifications?: PostNotificationsMode;
|
|
33
33
|
};
|
|
@@ -2,9 +2,9 @@ import type { Comment } from "./Comment";
|
|
|
2
2
|
import type { Post } from "./Post";
|
|
3
3
|
import type { PrivateMessage } from "./PrivateMessage";
|
|
4
4
|
export type PostOrCommentOrPrivateMessage = ({
|
|
5
|
-
type_: "
|
|
5
|
+
type_: "post";
|
|
6
6
|
} & Post) | ({
|
|
7
|
-
type_: "
|
|
7
|
+
type_: "comment";
|
|
8
8
|
} & Comment) | ({
|
|
9
|
-
type_: "
|
|
9
|
+
type_: "private_message";
|
|
10
10
|
} & PrivateMessage);
|
|
@@ -3,11 +3,11 @@ import type { CommunityReportView } from "./CommunityReportView";
|
|
|
3
3
|
import type { PostReportView } from "./PostReportView";
|
|
4
4
|
import type { PrivateMessageReportView } from "./PrivateMessageReportView";
|
|
5
5
|
export type ReportCombinedView = ({
|
|
6
|
-
type_: "
|
|
6
|
+
type_: "post";
|
|
7
7
|
} & PostReportView) | ({
|
|
8
|
-
type_: "
|
|
8
|
+
type_: "comment";
|
|
9
9
|
} & CommentReportView) | ({
|
|
10
|
-
type_: "
|
|
10
|
+
type_: "private_message";
|
|
11
11
|
} & PrivateMessageReportView) | ({
|
|
12
|
-
type_: "
|
|
12
|
+
type_: "community";
|
|
13
13
|
} & CommunityReportView);
|
|
@@ -4,13 +4,13 @@ import type { MultiCommunityView } from "./MultiCommunityView";
|
|
|
4
4
|
import type { PersonView } from "./PersonView";
|
|
5
5
|
import type { PostView } from "./PostView";
|
|
6
6
|
export type SearchCombinedView = ({
|
|
7
|
-
type_: "
|
|
7
|
+
type_: "post";
|
|
8
8
|
} & PostView) | ({
|
|
9
|
-
type_: "
|
|
9
|
+
type_: "comment";
|
|
10
10
|
} & CommentView) | ({
|
|
11
|
-
type_: "
|
|
11
|
+
type_: "community";
|
|
12
12
|
} & CommunityView) | ({
|
|
13
|
-
type_: "
|
|
13
|
+
type_: "person";
|
|
14
14
|
} & PersonView) | ({
|
|
15
|
-
type_: "
|
|
15
|
+
type_: "multi_community";
|
|
16
16
|
} & MultiCommunityView);
|
|
@@ -9,4 +9,6 @@ export type UntranslatedError = "InvalidCommunity" | "CannotCreatePostOrCommentI
|
|
|
9
9
|
DomainNotInAllowList: string;
|
|
10
10
|
} | "FederationDisabledByStrictAllowList" | "ContradictingFilters" | "UrlWithoutDomain" | "InboxTimeout" | "CantDeleteSite" | "ObjectIsNotPublic" | "ObjectIsNotPrivate" | {
|
|
11
11
|
InvalidFollow: string;
|
|
12
|
-
} | "PurgeInvalidImageUrl" | "Unreachable" | "CouldntSendWebmention" |
|
|
12
|
+
} | "PurgeInvalidImageUrl" | "Unreachable" | "CouldntSendWebmention" | {
|
|
13
|
+
CommunityHasNoFollowers: string;
|
|
14
|
+
};
|
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-
|
|
4
|
+
"version": "1.0.0-error-status-public.0",
|
|
5
5
|
"author": "Dessalines",
|
|
6
6
|
"license": "AGPL-3.0",
|
|
7
7
|
"main": "./dist/index.js",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"typescript": "^5.5.4",
|
|
45
45
|
"typescript-eslint": "^8.7.0"
|
|
46
46
|
},
|
|
47
|
-
"packageManager": "pnpm@10.18.
|
|
47
|
+
"packageManager": "pnpm@10.18.3",
|
|
48
48
|
"types": "./dist/index.d.ts",
|
|
49
49
|
"lint-staged": {
|
|
50
50
|
"*.{ts,tsx,js}": [
|