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 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
- * The like / score for the comment.
3
+ * When the comment was upvoted or downvoted.
4
4
  */
5
- like_score?: number;
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
  };
@@ -4,8 +4,5 @@ import type { CommentId } from "./CommentId";
4
4
  */
5
5
  export type CreateCommentLike = {
6
6
  comment_id: CommentId;
7
- /**
8
- * Must be -1, 0, or 1 .
9
- */
10
- score: number;
7
+ is_upvote?: boolean;
11
8
  };
@@ -4,8 +4,5 @@ import type { PostId } from "./PostId";
4
4
  */
5
5
  export type CreatePostLike = {
6
6
  post_id: PostId;
7
- /**
8
- * Score must be -1, 0, or 1.
9
- */
10
- score: number;
7
+ is_upvote?: boolean;
11
8
  };
@@ -4,4 +4,5 @@ import type { PostId } from "./PostId";
4
4
  */
5
5
  export type MarkManyPostsAsRead = {
6
6
  post_ids: Array<PostId>;
7
+ read: boolean;
7
8
  };
@@ -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_: "AdminAllowInstance";
20
+ type_: "admin_allow_instance";
21
21
  } & AdminAllowInstanceView) | ({
22
- type_: "AdminBlockInstance";
22
+ type_: "admin_block_instance";
23
23
  } & AdminBlockInstanceView) | ({
24
- type_: "AdminPurgeComment";
24
+ type_: "admin_purge_comment";
25
25
  } & AdminPurgeCommentView) | ({
26
- type_: "AdminPurgeCommunity";
26
+ type_: "admin_purge_community";
27
27
  } & AdminPurgeCommunityView) | ({
28
- type_: "AdminPurgePerson";
28
+ type_: "admin_purge_person";
29
29
  } & AdminPurgePersonView) | ({
30
- type_: "AdminPurgePost";
30
+ type_: "admin_purge_post";
31
31
  } & AdminPurgePostView) | ({
32
- type_: "AdminAdd";
32
+ type_: "admin_add";
33
33
  } & AdminAddView) | ({
34
- type_: "ModAddToCommunity";
34
+ type_: "mod_add_to_community";
35
35
  } & ModAddToCommunityView) | ({
36
- type_: "AdminBan";
36
+ type_: "admin_ban";
37
37
  } & AdminBanView) | ({
38
- type_: "ModBanFromCommunity";
38
+ type_: "mod_ban_from_community";
39
39
  } & ModBanFromCommunityView) | ({
40
- type_: "ModFeaturePost";
40
+ type_: "mod_feature_post";
41
41
  } & ModFeaturePostView) | ({
42
- type_: "ModChangeCommunityVisibility";
42
+ type_: "mod_change_community_visibility";
43
43
  } & ModChangeCommunityVisibilityView) | ({
44
- type_: "ModLockPost";
44
+ type_: "mod_lock_post";
45
45
  } & ModLockPostView) | ({
46
- type_: "ModRemoveComment";
46
+ type_: "mod_remove_comment";
47
47
  } & ModRemoveCommentView) | ({
48
- type_: "AdminRemoveCommunity";
48
+ type_: "admin_remove_community";
49
49
  } & AdminRemoveCommunityView) | ({
50
- type_: "ModRemovePost";
50
+ type_: "mod_remove_post";
51
51
  } & ModRemovePostView) | ({
52
- type_: "ModTransferCommunity";
52
+ type_: "mod_transfer_community";
53
53
  } & ModTransferCommunityView) | ({
54
- type_: "ModLockComment";
54
+ type_: "mod_lock_comment";
55
55
  } & ModLockCommentView);
@@ -0,0 +1,6 @@
1
+ import type { CommunityId } from "./CommunityId";
2
+ import type { MultiCommunityId } from "./MultiCommunityId";
3
+ export type MultiCommunityEntry = {
4
+ multi_community_id: MultiCommunityId;
5
+ community_id: CommunityId;
6
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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_: "Comment";
15
+ type_: "comment";
16
16
  } & CommentView) | ({
17
- type_: "Post";
17
+ type_: "post";
18
18
  } & PostView) | ({
19
- type_: "PrivateMessage";
19
+ type_: "private_message";
20
20
  } & PrivateMessageView) | ({
21
- type_: "AdminAdd";
21
+ type_: "admin_add";
22
22
  } & AdminAdd) | ({
23
- type_: "ModAddToCommunity";
23
+ type_: "mod_add_to_community";
24
24
  } & ModAddToCommunity) | ({
25
- type_: "AdminBan";
25
+ type_: "admin_ban";
26
26
  } & AdminBan) | ({
27
- type_: "ModBanFromCommunity";
27
+ type_: "mod_ban_from_community";
28
28
  } & ModBanFromCommunity) | ({
29
- type_: "ModLockPost";
29
+ type_: "mod_lock_post";
30
30
  } & ModLockPost) | ({
31
- type_: "ModLockComment";
31
+ type_: "mod_lock_comment";
32
32
  } & ModLockComment) | ({
33
- type_: "ModRemovePost";
33
+ type_: "mod_remove_post";
34
34
  } & ModRemovePost) | ({
35
- type_: "ModRemoveComment";
35
+ type_: "mod_remove_comment";
36
36
  } & ModRemoveComment) | ({
37
- type_: "AdminRemoveCommunity";
37
+ type_: "admin_remove_community";
38
38
  } & AdminRemoveCommunity) | ({
39
- type_: "ModTransferCommunity";
39
+ type_: "mod_transfer_community";
40
40
  } & ModTransferCommunity);
@@ -1,7 +1,7 @@
1
1
  import type { CommentView } from "./CommentView";
2
2
  import type { PostView } from "./PostView";
3
3
  export type PersonContentCombinedView = ({
4
- type_: "Post";
4
+ type_: "post";
5
5
  } & PostView) | ({
6
- type_: "Comment";
6
+ type_: "comment";
7
7
  } & CommentView);
@@ -1,7 +1,7 @@
1
1
  import type { CommentView } from "./CommentView";
2
2
  import type { PostView } from "./PostView";
3
3
  export type PersonLikedCombinedView = ({
4
- type_: "Post";
4
+ type_: "post";
5
5
  } & PostView) | ({
6
- type_: "Comment";
6
+ type_: "comment";
7
7
  } & CommentView);
@@ -1,7 +1,7 @@
1
1
  import type { CommentView } from "./CommentView";
2
2
  import type { PostView } from "./PostView";
3
3
  export type PersonSavedCombinedView = ({
4
- type_: "Post";
4
+ type_: "post";
5
5
  } & PostView) | ({
6
- type_: "Comment";
6
+ type_: "comment";
7
7
  } & CommentView);
@@ -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 liked.
22
- */
23
- liked_at?: string;
24
- /**
25
- * The like / score of the post.
16
+ * When the post was upvoted or downvoted.
26
17
  */
27
- like_score?: number;
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_: "Post";
5
+ type_: "post";
6
6
  } & Post) | ({
7
- type_: "Comment";
7
+ type_: "comment";
8
8
  } & Comment) | ({
9
- type_: "PrivateMessage";
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_: "Post";
6
+ type_: "post";
7
7
  } & PostReportView) | ({
8
- type_: "Comment";
8
+ type_: "comment";
9
9
  } & CommentReportView) | ({
10
- type_: "PrivateMessage";
10
+ type_: "private_message";
11
11
  } & PrivateMessageReportView) | ({
12
- type_: "Community";
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_: "Post";
7
+ type_: "post";
8
8
  } & PostView) | ({
9
- type_: "Comment";
9
+ type_: "comment";
10
10
  } & CommentView) | ({
11
- type_: "Community";
11
+ type_: "community";
12
12
  } & CommunityView) | ({
13
- type_: "Person";
13
+ type_: "person";
14
14
  } & PersonView) | ({
15
- type_: "MultiCommunity";
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" | "CommunityHasNoFollowers";
12
+ } | "PurgeInvalidImageUrl" | "Unreachable" | "CouldntSendWebmention" | {
13
+ CommunityHasNoFollowers: string;
14
+ };
@@ -24,4 +24,6 @@ export type UserSettingsBackup = {
24
24
  blocked_users: Array<string>;
25
25
  blocked_instances_communities: Array<string>;
26
26
  blocked_instances_persons: Array<string>;
27
+ blocking_keywords: Array<string>;
28
+ discussion_languages: Array<string>;
27
29
  };
@@ -6,5 +6,5 @@ export type VoteView = {
6
6
  creator: Person;
7
7
  creator_banned: boolean;
8
8
  creator_banned_from_community: boolean;
9
- score: number;
9
+ is_upvote: boolean;
10
10
  };
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-enum-variants-snake-case.3",
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.2",
47
+ "packageManager": "pnpm@10.18.3",
48
48
  "types": "./dist/index.d.ts",
49
49
  "lint-staged": {
50
50
  "*.{ts,tsx,js}": [