lemmy-js-client 1.0.0-error-status-code.0 → 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.
Files changed (80) hide show
  1. package/dist/http.d.ts +13 -14
  2. package/dist/http.js +5 -6
  3. package/dist/index.d.ts +7 -6
  4. package/dist/other_types.d.ts +0 -3
  5. package/dist/types/AdminBlockInstanceParams.d.ts +6 -1
  6. package/dist/types/AllLemmyErrors.d.ts +1 -0
  7. package/dist/types/AllLemmyErrors.js +117 -0
  8. package/dist/types/CommentActions.d.ts +6 -6
  9. package/dist/types/CommentReportView.d.ts +2 -0
  10. package/dist/types/CommentSortType.d.ts +1 -1
  11. package/dist/types/CommunityActions.d.ts +4 -4
  12. package/dist/types/CommunityFollowerState.d.ts +1 -1
  13. package/dist/types/CommunityNotificationsMode.d.ts +1 -1
  14. package/dist/types/CommunityReportView.d.ts +2 -0
  15. package/dist/types/CommunitySortType.d.ts +1 -1
  16. package/dist/types/CommunityVisibility.d.ts +1 -1
  17. package/dist/types/CreateCommentLike.d.ts +1 -4
  18. package/dist/types/CreateCustomEmoji.d.ts +2 -1
  19. package/dist/types/CreateCustomEmoji.js +0 -1
  20. package/dist/types/CreatePostLike.d.ts +1 -4
  21. package/dist/types/EditCustomEmoji.d.ts +7 -5
  22. package/dist/types/FederationMode.d.ts +1 -1
  23. package/dist/types/GetMultiCommunity.d.ts +2 -1
  24. package/dist/types/LemmyErrorType.d.ts +11 -13
  25. package/dist/types/LikeType.d.ts +1 -1
  26. package/dist/types/ListCommunityPendingFollows.d.ts +1 -1
  27. package/dist/types/ListCommunityPendingFollowsResponse.d.ts +2 -2
  28. package/dist/types/ListingType.d.ts +1 -1
  29. package/dist/types/LocalSite.d.ts +0 -2
  30. package/dist/types/LocalUser.d.ts +0 -4
  31. package/dist/types/MarkManyPostsAsRead.d.ts +1 -0
  32. package/dist/types/ModlogActionType.d.ts +1 -1
  33. package/dist/types/ModlogCombinedView.d.ts +18 -18
  34. package/dist/types/MultiCommunityEntry.d.ts +6 -0
  35. package/dist/types/MultiCommunityResponse.d.ts +4 -0
  36. package/dist/types/MultiCommunityView.d.ts +2 -0
  37. package/dist/types/Notification.d.ts +22 -2
  38. package/dist/types/NotificationData.d.ts +34 -4
  39. package/dist/types/NotificationDataType.d.ts +1 -1
  40. package/dist/types/NotificationType.d.ts +4 -0
  41. package/dist/types/PendingFollowerView.d.ts +9 -0
  42. package/dist/types/PersonContentCombinedView.d.ts +2 -2
  43. package/dist/types/PersonContentType.d.ts +1 -1
  44. package/dist/types/PersonLikedCombinedView.d.ts +2 -2
  45. package/dist/types/PersonResponse.d.ts +7 -0
  46. package/dist/types/PersonSavedCombinedView.d.ts +2 -2
  47. package/dist/types/Post.d.ts +4 -4
  48. package/dist/types/PostActions.d.ts +11 -11
  49. package/dist/types/PostFeatureType.d.ts +1 -1
  50. package/dist/types/PostListingMode.d.ts +1 -1
  51. package/dist/types/PostNotificationsMode.d.ts +1 -1
  52. package/dist/types/PostOrCommentOrPrivateMessage.d.ts +3 -3
  53. package/dist/types/PostReportView.d.ts +2 -0
  54. package/dist/types/PostSortType.d.ts +1 -1
  55. package/dist/types/PrivateMessageReportView.d.ts +1 -0
  56. package/dist/types/ReadableFederationState.d.ts +1 -1
  57. package/dist/types/RegistrationMode.d.ts +1 -1
  58. package/dist/types/ReportCombinedView.d.ts +4 -4
  59. package/dist/types/ReportType.d.ts +1 -1
  60. package/dist/types/SaveUserSettings.d.ts +0 -4
  61. package/dist/types/SearchCombinedView.d.ts +5 -5
  62. package/dist/types/SearchSortType.d.ts +1 -1
  63. package/dist/types/SearchType.d.ts +1 -1
  64. package/dist/types/UntranslatedError.d.ts +14 -0
  65. package/dist/types/UserSettingsBackup.d.ts +2 -0
  66. package/dist/types/VoteShow.d.ts +1 -1
  67. package/dist/types/VoteView.d.ts +1 -1
  68. package/package.json +2 -2
  69. package/dist/types/BanPersonResponse.d.ts +0 -8
  70. package/dist/types/BlockCommunityResponse.d.ts +0 -8
  71. package/dist/types/BlockPersonResponse.d.ts +0 -8
  72. package/dist/types/FederationError.d.ts +0 -12
  73. package/dist/types/GetCommunityPendingFollowsCount.d.ts +0 -4
  74. package/dist/types/NotificationTypes.d.ts +0 -4
  75. /package/dist/types/{BanPersonResponse.js → MultiCommunityEntry.js} +0 -0
  76. /package/dist/types/{BlockCommunityResponse.js → MultiCommunityResponse.js} +0 -0
  77. /package/dist/types/{FederationError.js → NotificationType.js} +0 -0
  78. /package/dist/types/{BlockPersonResponse.js → PendingFollowerView.js} +0 -0
  79. /package/dist/types/{GetCommunityPendingFollowsCount.js → PersonResponse.js} +0 -0
  80. /package/dist/types/{NotificationTypes.js → UntranslatedError.js} +0 -0
@@ -3,7 +3,6 @@ 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";
7
6
  import type { PostListingMode } from "./PostListingMode";
8
7
  import type { PostSortType } from "./PostSortType";
9
8
  import type { RegistrationMode } from "./RegistrationMode";
@@ -140,6 +139,5 @@ export type LocalSite = {
140
139
  */
141
140
  disable_email_notifications: boolean;
142
141
  suggested_communities?: MultiCommunityId;
143
- multi_comm_follower: PersonId;
144
142
  default_items_per_page: number;
145
143
  };
@@ -63,10 +63,6 @@ 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;
70
66
  /**
71
67
  * Whether user avatars and inline images in the UI that are gifs should be allowed to play or
72
68
  * should be paused
@@ -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
  };
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * A list of possible types for the various modlog actions.
3
3
  */
4
- export type ModlogActionType = "All" | "ModRemovePost" | "ModLockPost" | "ModFeaturePost" | "ModRemoveComment" | "ModLockComment" | "AdminRemoveCommunity" | "ModBanFromCommunity" | "ModAddToCommunity" | "ModTransferCommunity" | "AdminAdd" | "AdminBan" | "ModChangeCommunityVisibility" | "AdminPurgePerson" | "AdminPurgeCommunity" | "AdminPurgePost" | "AdminPurgeComment" | "AdminBlockInstance" | "AdminAllowInstance";
4
+ export type ModlogActionType = "all" | "mod_remove_post" | "mod_lock_post" | "mod_feature_post" | "mod_remove_comment" | "mod_lock_comment" | "admin_remove_community" | "mod_ban_from_community" | "mod_add_to_community" | "mod_transfer_community" | "admin_add" | "admin_ban" | "mod_change_community_visibility" | "admin_purge_person" | "admin_purge_community" | "admin_purge_post" | "admin_purge_comment" | "admin_block_instance" | "admin_allow_instance";
@@ -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,4 @@
1
+ import type { MultiCommunityView } from "./MultiCommunityView";
2
+ export type MultiCommunityResponse = {
3
+ multi_community_view: MultiCommunityView;
4
+ };
@@ -1,6 +1,8 @@
1
+ import type { CommunityFollowerState } from "./CommunityFollowerState";
1
2
  import type { MultiCommunity } from "./MultiCommunity";
2
3
  import type { Person } from "./Person";
3
4
  export type MultiCommunityView = {
4
5
  multi: MultiCommunity;
6
+ follow_state?: CommunityFollowerState;
5
7
  owner: Person;
6
8
  };
@@ -1,6 +1,16 @@
1
+ import type { AdminAddId } from "./AdminAddId";
2
+ import type { AdminBanId } from "./AdminBanId";
3
+ import type { AdminRemoveCommunityId } from "./AdminRemoveCommunityId";
1
4
  import type { CommentId } from "./CommentId";
5
+ import type { ModAddToCommunityId } from "./ModAddToCommunityId";
6
+ import type { ModBanFromCommunityId } from "./ModBanFromCommunityId";
7
+ import type { ModLockCommentId } from "./ModLockCommentId";
8
+ import type { ModLockPostId } from "./ModLockPostId";
9
+ import type { ModRemoveCommentId } from "./ModRemoveCommentId";
10
+ import type { ModRemovePostId } from "./ModRemovePostId";
11
+ import type { ModTransferCommunityId } from "./ModTransferCommunityId";
2
12
  import type { NotificationId } from "./NotificationId";
3
- import type { NotificationTypes } from "./NotificationTypes";
13
+ import type { NotificationType } from "./NotificationType";
4
14
  import type { PersonId } from "./PersonId";
5
15
  import type { PostId } from "./PostId";
6
16
  import type { PrivateMessageId } from "./PrivateMessageId";
@@ -10,7 +20,17 @@ export type Notification = {
10
20
  comment_id?: CommentId;
11
21
  read: boolean;
12
22
  published_at: string;
13
- kind: NotificationTypes;
23
+ kind: NotificationType;
14
24
  post_id?: PostId;
15
25
  private_message_id?: PrivateMessageId;
26
+ admin_add_id?: AdminAddId;
27
+ mod_add_to_community_id?: ModAddToCommunityId;
28
+ admin_ban_id?: AdminBanId;
29
+ mod_ban_from_community_id?: ModBanFromCommunityId;
30
+ mod_lock_post_id?: ModLockPostId;
31
+ mod_remove_comment_id?: ModRemoveCommentId;
32
+ admin_remove_community_id?: AdminRemoveCommunityId;
33
+ mod_remove_post_id?: ModRemovePostId;
34
+ mod_lock_comment_id?: ModLockCommentId;
35
+ mod_transfer_community_id?: ModTransferCommunityId;
16
36
  };
@@ -1,10 +1,40 @@
1
+ import type { AdminAdd } from "./AdminAdd";
2
+ import type { AdminBan } from "./AdminBan";
3
+ import type { AdminRemoveCommunity } from "./AdminRemoveCommunity";
1
4
  import type { CommentView } from "./CommentView";
5
+ import type { ModAddToCommunity } from "./ModAddToCommunity";
6
+ import type { ModBanFromCommunity } from "./ModBanFromCommunity";
7
+ import type { ModLockComment } from "./ModLockComment";
8
+ import type { ModLockPost } from "./ModLockPost";
9
+ import type { ModRemoveComment } from "./ModRemoveComment";
10
+ import type { ModRemovePost } from "./ModRemovePost";
11
+ import type { ModTransferCommunity } from "./ModTransferCommunity";
2
12
  import type { PostView } from "./PostView";
3
13
  import type { PrivateMessageView } from "./PrivateMessageView";
4
14
  export type NotificationData = ({
5
- type_: "Comment";
15
+ type_: "comment";
6
16
  } & CommentView) | ({
7
- type_: "Post";
17
+ type_: "post";
8
18
  } & PostView) | ({
9
- type_: "PrivateMessage";
10
- } & PrivateMessageView);
19
+ type_: "private_message";
20
+ } & PrivateMessageView) | ({
21
+ type_: "admin_add";
22
+ } & AdminAdd) | ({
23
+ type_: "mod_add_to_community";
24
+ } & ModAddToCommunity) | ({
25
+ type_: "admin_ban";
26
+ } & AdminBan) | ({
27
+ type_: "mod_ban_from_community";
28
+ } & ModBanFromCommunity) | ({
29
+ type_: "mod_lock_post";
30
+ } & ModLockPost) | ({
31
+ type_: "mod_lock_comment";
32
+ } & ModLockComment) | ({
33
+ type_: "mod_remove_post";
34
+ } & ModRemovePost) | ({
35
+ type_: "mod_remove_comment";
36
+ } & ModRemoveComment) | ({
37
+ type_: "admin_remove_community";
38
+ } & AdminRemoveCommunity) | ({
39
+ type_: "mod_transfer_community";
40
+ } & ModTransferCommunity);
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * A list of possible types for the inbox.
3
3
  */
4
- export type NotificationDataType = "All" | "Reply" | "Mention" | "PrivateMessage" | "Subscribed";
4
+ export type NotificationDataType = "all" | "reply" | "mention" | "private_message" | "subscribed";
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Types of notifications which can be received in inbox
3
+ */
4
+ export type NotificationType = "mention" | "reply" | "subscribed" | "private_message" | "mod_action";
@@ -0,0 +1,9 @@
1
+ import type { Community } from "./Community";
2
+ import type { CommunityFollowerState } from "./CommunityFollowerState";
3
+ import type { Person } from "./Person";
4
+ export type PendingFollowerView = {
5
+ person: Person;
6
+ community: Community;
7
+ is_new_instance: boolean;
8
+ follow_state?: CommunityFollowerState;
9
+ };
@@ -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,4 +1,4 @@
1
1
  /**
2
2
  * A list of possible types for a person's content.
3
3
  */
4
- export type PersonContentType = "All" | "Comments" | "Posts";
4
+ export type PersonContentType = "all" | "comments" | "posts";
@@ -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);
@@ -0,0 +1,7 @@
1
+ import type { PersonView } from "./PersonView";
2
+ /**
3
+ * A person response for actions done to a person.
4
+ */
5
+ export type PersonResponse = {
6
+ person_view: PersonView;
7
+ };
@@ -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
  };
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * The feature type for a post.
3
3
  */
4
- export type PostFeatureType = "Local" | "Community";
4
+ export type PostFeatureType = "local" | "community";
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * A post-view mode that changes how multiple post listings look.
3
3
  */
4
- export type PostListingMode = "List" | "Card" | "SmallCard";
4
+ export type PostListingMode = "list" | "card" | "small_card";
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * Available settings for post notifications
3
3
  */
4
- export type PostNotificationsMode = "AllComments" | "RepliesAndMentions" | "Mute";
4
+ export type PostNotificationsMode = "all_comments" | "replies_and_mentions" | "mute";
@@ -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);
@@ -21,5 +21,7 @@ export type PostReportView = {
21
21
  creator_is_admin: boolean;
22
22
  creator_is_moderator: boolean;
23
23
  creator_banned: boolean;
24
+ creator_ban_expires_at?: string;
24
25
  creator_banned_from_community: boolean;
26
+ creator_community_ban_expires_at?: string;
25
27
  };
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * The post sort types. See here for descriptions: https://join-lemmy.org/docs/en/users/03-votes-and-ranking.html
3
3
  */
4
- export type PostSortType = "Active" | "Hot" | "New" | "Old" | "Top" | "MostComments" | "NewComments" | "Controversial" | "Scaled";
4
+ export type PostSortType = "active" | "hot" | "new" | "old" | "top" | "most_comments" | "new_comments" | "controversial" | "scaled";
@@ -12,4 +12,5 @@ export type PrivateMessageReportView = {
12
12
  resolver?: Person;
13
13
  creator_is_admin: boolean;
14
14
  creator_banned: boolean;
15
+ creator_ban_expires_at?: string;
15
16
  };
@@ -4,7 +4,7 @@ export type ReadableFederationState = {
4
4
  /**
5
5
  * timestamp of the next retry attempt (null if fail count is 0)
6
6
  */
7
- next_retry?: string;
7
+ next_retry_at?: string;
8
8
  instance_id: InstanceId;
9
9
  /**
10
10
  * the last successfully sent activity id
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * The registration mode for your site. Determines what happens after a user signs up.
3
3
  */
4
- export type RegistrationMode = "Closed" | "RequireApplication" | "Open";
4
+ export type RegistrationMode = "closed" | "require_application" | "open";
@@ -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);
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * A list of possible types for reports.
3
3
  */
4
- export type ReportType = "All" | "Posts" | "Comments" | "PrivateMessages" | "Communities";
4
+ export type ReportType = "all" | "posts" | "comments" | "private_messages" | "communities";
@@ -98,10 +98,6 @@ 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;
105
101
  /**
106
102
  * Whether user avatars or inline images in the UI that are gifs should be allowed to play or
107
103
  * should be paused
@@ -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);
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * The search sort types.
3
3
  */
4
- export type SearchSortType = "New" | "Top" | "Old";
4
+ export type SearchSortType = "new" | "top" | "old";
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * The type of content returned from a search.
3
3
  */
4
- export type SearchType = "All" | "Comments" | "Posts" | "Communities" | "Users" | "MultiCommunities";
4
+ export type SearchType = "all" | "comments" | "posts" | "communities" | "users" | "multi_communities";
@@ -0,0 +1,14 @@
1
+ /**
2
+ * These errors are only used for federation or internally and dont need to be translated.
3
+ */
4
+ export type UntranslatedError = "InvalidCommunity" | "CannotCreatePostOrCommentInDeletedOrRemovedCommunity" | "CannotReceivePage" | "OnlyLocalAdminCanRemoveCommunity" | "OnlyLocalAdminCanRestoreCommunity" | "PostIsLocked" | {
5
+ PersonIsBannedFromSite: string;
6
+ } | "InvalidVoteValue" | "PageDoesNotSpecifyCreator" | "FederationDisabled" | {
7
+ DomainBlocked: string;
8
+ } | {
9
+ DomainNotInAllowList: string;
10
+ } | "FederationDisabledByStrictAllowList" | "ContradictingFilters" | "UrlWithoutDomain" | "InboxTimeout" | "CantDeleteSite" | "ObjectIsNotPublic" | "ObjectIsNotPrivate" | {
11
+ InvalidFollow: string;
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
  };
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * Lets you show votes for others only, show all votes, or hide all votes.
3
3
  */
4
- export type VoteShow = "Show" | "ShowForOthers" | "Hide";
4
+ export type VoteShow = "show" | "show_for_others" | "hide";
@@ -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-error-status-code.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.16.1",
47
+ "packageManager": "pnpm@10.18.3",
48
48
  "types": "./dist/index.d.ts",
49
49
  "lint-staged": {
50
50
  "*.{ts,tsx,js}": [
@@ -1,8 +0,0 @@
1
- import type { PersonView } from "./PersonView";
2
- /**
3
- * A response for a banned person.
4
- */
5
- export type BanPersonResponse = {
6
- person_view: PersonView;
7
- banned: boolean;
8
- };
@@ -1,8 +0,0 @@
1
- import type { CommunityView } from "./CommunityView";
2
- /**
3
- * The block community response.
4
- */
5
- export type BlockCommunityResponse = {
6
- community_view: CommunityView;
7
- blocked: boolean;
8
- };
@@ -1,8 +0,0 @@
1
- import type { PersonView } from "./PersonView";
2
- /**
3
- * The response for a person block.
4
- */
5
- export type BlockPersonResponse = {
6
- person_view: PersonView;
7
- blocked: boolean;
8
- };
@@ -1,12 +0,0 @@
1
- /**
2
- * Federation related errors, these dont need to be translated.
3
- */
4
- export type FederationError = "InvalidCommunity" | "CannotCreatePostOrCommentInDeletedOrRemovedCommunity" | "CannotReceivePage" | "OnlyLocalAdminCanRemoveCommunity" | "OnlyLocalAdminCanRestoreCommunity" | "PostIsLocked" | {
5
- PersonIsBannedFromSite: string;
6
- } | "InvalidVoteValue" | "PageDoesNotSpecifyCreator" | "FederationDisabled" | {
7
- DomainBlocked: string;
8
- } | {
9
- DomainNotInAllowList: string;
10
- } | "FederationDisabledByStrictAllowList" | "ContradictingFilters" | "UrlWithoutDomain" | "InboxTimeout" | "CantDeleteSite" | "ObjectIsNotPublic" | "ObjectIsNotPrivate" | {
11
- InvalidFollow: string;
12
- } | "Unreachable";
@@ -1,4 +0,0 @@
1
- import type { CommunityId } from "./CommunityId";
2
- export type GetCommunityPendingFollowsCount = {
3
- community_id: CommunityId;
4
- };
@@ -1,4 +0,0 @@
1
- /**
2
- * Types of notifications which can be received in inbox
3
- */
4
- export type NotificationTypes = "Mention" | "Reply" | "Subscribed" | "PrivateMessage";