lemmy-js-client 1.0.0-name-and-message.1 → 1.0.0-post-notifications.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 +36 -22
- package/dist/http.js +109 -51
- package/dist/index.d.ts +29 -8
- package/dist/other_types.d.ts +9 -0
- package/dist/types/AdminAllowInstance.d.ts +1 -1
- package/dist/types/AdminBlockInstance.d.ts +2 -2
- package/dist/types/AdminBlockInstanceParams.d.ts +1 -1
- package/dist/types/AdminPurgeComment.d.ts +1 -1
- package/dist/types/AdminPurgeCommunity.d.ts +1 -1
- package/dist/types/AdminPurgePerson.d.ts +1 -1
- package/dist/types/AdminPurgePost.d.ts +1 -1
- package/dist/types/BanFromCommunity.d.ts +1 -1
- package/dist/types/BanPerson.d.ts +1 -1
- package/dist/types/Comment.d.ts +2 -2
- package/dist/types/CommentActions.d.ts +2 -6
- package/dist/types/CommentActions.js +1 -0
- package/dist/types/CommentReply.d.ts +1 -1
- package/dist/types/CommentReport.d.ts +2 -2
- package/dist/types/CommentReportView.d.ts +0 -1
- package/dist/types/CommentResponse.d.ts +0 -2
- package/dist/types/CommentSlimView.d.ts +2 -4
- package/dist/types/CommentView.d.ts +2 -3
- package/dist/types/Community.d.ts +2 -2
- package/dist/types/CommunityActions.d.ts +5 -13
- package/dist/types/CommunityReport.d.ts +2 -2
- package/dist/types/CreateMultiCommunity.d.ts +5 -0
- package/dist/types/CreateMultiCommunity.js +3 -0
- package/dist/types/CreateOrDeleteMultiCommunityEntry.d.ts +6 -0
- package/dist/types/CreatePost.d.ts +1 -1
- package/dist/types/CreateSite.d.ts +16 -13
- package/dist/types/CustomEmoji.d.ts +2 -2
- package/dist/types/EditPost.d.ts +1 -1
- package/dist/types/EditSite.d.ts +22 -16
- package/dist/types/ExportDataResponse.d.ts +13 -0
- package/dist/types/FederationBlockList.d.ts +3 -3
- package/dist/types/FollowMultiCommunity.d.ts +5 -0
- package/dist/types/GetComments.d.ts +0 -2
- package/dist/types/GetMultiCommunity.d.ts +4 -0
- package/dist/types/GetMultiCommunityResponse.d.ts +6 -0
- package/dist/types/GetPosts.d.ts +2 -2
- package/dist/types/InboxDataType.d.ts +1 -1
- package/dist/types/Instance.d.ts +2 -2
- package/dist/types/InstanceActions.d.ts +3 -7
- package/dist/types/InstanceActions.js +1 -0
- package/dist/types/InstanceWithFederationState.d.ts +2 -2
- package/dist/types/LemmyErrorType.d.ts +10 -14
- package/dist/types/LikeType.d.ts +4 -0
- package/dist/types/LikeType.js +3 -0
- package/dist/types/ListInboxResponse.d.ts +2 -2
- package/dist/types/ListMultiCommunities.d.ts +5 -0
- package/dist/types/ListMultiCommunitiesResponse.d.ts +4 -0
- package/dist/types/ListPersonLiked.d.ts +13 -0
- package/dist/types/ListPersonLikedResponse.d.ts +13 -0
- package/dist/types/ListPersonLikedResponse.js +2 -0
- package/dist/types/ListingType.d.ts +1 -1
- package/dist/types/LocalImage.d.ts +8 -3
- package/dist/types/LocalImageView.d.ts +2 -0
- package/dist/types/LocalSite.d.ts +6 -6
- package/dist/types/LocalSiteRateLimit.d.ts +16 -16
- package/dist/types/LocalSiteUrlBlocklist.d.ts +2 -2
- package/dist/types/LocalUser.d.ts +2 -1
- package/dist/types/LocalUserView.d.ts +1 -2
- package/dist/types/LoginToken.d.ts +1 -1
- package/dist/types/MarkNotificationAsRead.d.ts +8 -0
- package/dist/types/MarkNotificationAsRead.js +2 -0
- package/dist/types/ModAdd.d.ts +1 -1
- package/dist/types/ModAddCommunity.d.ts +1 -1
- package/dist/types/ModBan.d.ts +2 -2
- package/dist/types/ModBanFromCommunity.d.ts +2 -2
- package/dist/types/ModChangeCommunityVisibility.d.ts +1 -2
- package/dist/types/ModFeaturePost.d.ts +1 -1
- package/dist/types/ModLockPost.d.ts +1 -1
- package/dist/types/ModRemoveComment.d.ts +1 -1
- package/dist/types/ModRemoveCommunity.d.ts +1 -1
- package/dist/types/ModRemovePost.d.ts +1 -1
- package/dist/types/ModTransferCommunity.d.ts +1 -1
- package/dist/types/MultiCommunity.d.ts +17 -0
- package/dist/types/MultiCommunity.js +2 -0
- package/dist/types/MultiCommunityFollow.d.ts +8 -0
- package/dist/types/MultiCommunityFollow.js +2 -0
- package/dist/types/MultiCommunityId.d.ts +1 -0
- package/dist/types/MultiCommunityId.js +3 -0
- package/dist/types/MultiCommunityView.d.ts +6 -0
- package/dist/types/MultiCommunityView.js +2 -0
- package/dist/types/NotePerson.d.ts +10 -0
- package/dist/types/NotePerson.js +2 -0
- package/dist/types/Notification.d.ts +14 -0
- package/dist/types/Notification.js +2 -0
- package/dist/types/NotificationId.d.ts +1 -0
- package/dist/types/NotificationId.js +3 -0
- package/dist/types/NotificationTypes.d.ts +4 -0
- package/dist/types/NotificationTypes.js +3 -0
- package/dist/types/{PersonPostMentionView.d.ts → NotificationView.d.ts} +19 -15
- package/dist/types/NotificationView.js +2 -0
- package/dist/types/NotificationsMode.d.ts +4 -0
- package/dist/types/NotificationsMode.js +3 -0
- package/dist/types/OAuthAccount.d.ts +2 -2
- package/dist/types/OAuthProvider.d.ts +2 -2
- package/dist/types/Person.d.ts +2 -2
- package/dist/types/PersonActions.d.ts +21 -4
- package/dist/types/PersonActions.js +1 -0
- package/dist/types/PersonCommentMention.d.ts +1 -1
- package/dist/types/PersonLikedCombinedView.d.ts +7 -0
- package/dist/types/PersonLikedCombinedView.js +2 -0
- package/dist/types/PersonNotification.d.ts +9 -0
- package/dist/types/PersonNotification.js +2 -0
- package/dist/types/PersonPostMention.d.ts +1 -1
- package/dist/types/PersonView.d.ts +2 -3
- package/dist/types/Post.d.ts +4 -4
- package/dist/types/PostActions.d.ts +7 -9
- package/dist/types/PostOrCommentOrPrivateMessage.d.ts +10 -0
- package/dist/types/PostOrCommentOrPrivateMessage.js +2 -0
- package/dist/types/PostReport.d.ts +2 -2
- package/dist/types/PostReportView.d.ts +0 -1
- package/dist/types/PostView.d.ts +2 -3
- package/dist/types/PrivateMessage.d.ts +2 -2
- package/dist/types/PrivateMessageReport.d.ts +2 -2
- package/dist/types/ReadableFederationState.d.ts +2 -2
- package/dist/types/RegistrationApplication.d.ts +1 -1
- package/dist/types/SaveUserSettings.d.ts +4 -0
- package/dist/types/Search.d.ts +5 -1
- package/dist/types/SearchCombinedView.d.ts +4 -1
- package/dist/types/SearchType.d.ts +1 -1
- package/dist/types/Site.d.ts +2 -2
- package/dist/types/SiteResponse.d.ts +0 -4
- package/dist/types/Tag.d.ts +2 -2
- package/dist/types/Tagline.d.ts +2 -2
- package/dist/types/UpdateCommunityNotifications.d.ts +9 -0
- package/dist/types/UpdateCommunityNotifications.js +2 -0
- package/dist/types/UpdateMultiCommunity.d.ts +7 -0
- package/dist/types/UpdateMultiCommunity.js +2 -0
- package/dist/types/UpdatePostNotifications.d.ts +9 -0
- package/dist/types/UpdatePostNotifications.js +2 -0
- package/dist/types/UserSettingsBackup.d.ts +26 -0
- package/dist/types/UserSettingsBackup.js +2 -0
- package/dist/types/VoteView.d.ts +0 -1
- package/package.json +2 -2
- package/dist/types/CommentReplyView.d.ts +0 -32
- package/dist/types/InboxCombinedView.d.ts +0 -13
- package/dist/types/MarkCommentReplyAsRead.d.ts +0 -8
- package/dist/types/MarkPersonCommentMentionAsRead.d.ts +0 -8
- package/dist/types/MarkPersonPostMentionAsRead.d.ts +0 -8
- package/dist/types/PersonCommentMentionView.d.ts +0 -30
- package/dist/types/ResolveObjectResponse.d.ts +0 -13
- /package/dist/types/{CommentReplyView.js → CreateOrDeleteMultiCommunityEntry.js} +0 -0
- /package/dist/types/{InboxCombinedView.js → ExportDataResponse.js} +0 -0
- /package/dist/types/{MarkCommentReplyAsRead.js → FollowMultiCommunity.js} +0 -0
- /package/dist/types/{MarkPersonCommentMentionAsRead.js → GetMultiCommunity.js} +0 -0
- /package/dist/types/{MarkPersonPostMentionAsRead.js → GetMultiCommunityResponse.js} +0 -0
- /package/dist/types/{PersonCommentMentionView.js → ListMultiCommunities.js} +0 -0
- /package/dist/types/{PersonPostMentionView.js → ListMultiCommunitiesResponse.js} +0 -0
- /package/dist/types/{ResolveObjectResponse.js → ListPersonLiked.js} +0 -0
@@ -1,16 +1,13 @@
|
|
1
|
-
import type {
|
2
|
-
import type { PostId } from "./PostId";
|
1
|
+
import type { NotificationsMode } from "./NotificationsMode";
|
3
2
|
export type PostActions = {
|
4
|
-
post_id: PostId;
|
5
|
-
person_id: PersonId;
|
6
3
|
/**
|
7
4
|
* When the post was read.
|
8
5
|
*/
|
9
|
-
|
6
|
+
read_at?: string;
|
10
7
|
/**
|
11
8
|
* When was the last time you read the comments.
|
12
9
|
*/
|
13
|
-
|
10
|
+
read_comments_at?: string;
|
14
11
|
/**
|
15
12
|
* The number of comments you read last. Subtract this from total comments to get an unread
|
16
13
|
* count.
|
@@ -19,11 +16,11 @@ export type PostActions = {
|
|
19
16
|
/**
|
20
17
|
* When the post was saved.
|
21
18
|
*/
|
22
|
-
|
19
|
+
saved_at?: string;
|
23
20
|
/**
|
24
21
|
* When the post was liked.
|
25
22
|
*/
|
26
|
-
|
23
|
+
liked_at?: string;
|
27
24
|
/**
|
28
25
|
* The like / score of the post.
|
29
26
|
*/
|
@@ -31,5 +28,6 @@ export type PostActions = {
|
|
31
28
|
/**
|
32
29
|
* When the post was hidden.
|
33
30
|
*/
|
34
|
-
|
31
|
+
hidden_at?: string;
|
32
|
+
notifications?: NotificationsMode;
|
35
33
|
};
|
@@ -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
|
+
};
|
package/dist/types/PostView.d.ts
CHANGED
@@ -19,11 +19,10 @@ export type PostView = {
|
|
19
19
|
person_actions?: PersonActions;
|
20
20
|
post_actions?: PostActions;
|
21
21
|
instance_actions?: InstanceActions;
|
22
|
-
creator_home_instance_actions?: InstanceActions;
|
23
|
-
creator_local_instance_actions?: InstanceActions;
|
24
|
-
creator_community_actions?: CommunityActions;
|
25
22
|
creator_is_admin: boolean;
|
26
23
|
tags: TagsView;
|
27
24
|
can_mod: boolean;
|
28
25
|
creator_banned: boolean;
|
26
|
+
creator_is_moderator: boolean;
|
27
|
+
creator_banned_from_community: boolean;
|
29
28
|
};
|
@@ -10,7 +10,7 @@ export type ReadableFederationState = {
|
|
10
10
|
* the last successfully sent activity id
|
11
11
|
*/
|
12
12
|
last_successful_id?: ActivityId;
|
13
|
-
|
13
|
+
last_successful_published_time_at?: string;
|
14
14
|
/**
|
15
15
|
* how many failed attempts have been made to send the next activity
|
16
16
|
*/
|
@@ -18,5 +18,5 @@ export type ReadableFederationState = {
|
|
18
18
|
/**
|
19
19
|
* timestamp of the last retry attempt (when the last failing activity was resent)
|
20
20
|
*/
|
21
|
-
|
21
|
+
last_retry_at?: string;
|
22
22
|
};
|
package/dist/types/Search.d.ts
CHANGED
@@ -8,7 +8,7 @@ import type { SearchType } from "./SearchType";
|
|
8
8
|
* Searches the site, given a search term, and some optional filters.
|
9
9
|
*/
|
10
10
|
export type Search = {
|
11
|
-
|
11
|
+
q: string;
|
12
12
|
community_id?: CommunityId;
|
13
13
|
community_name?: string;
|
14
14
|
creator_id?: PersonId;
|
@@ -24,6 +24,10 @@ export type Search = {
|
|
24
24
|
post_url_only?: boolean;
|
25
25
|
liked_only?: boolean;
|
26
26
|
disliked_only?: boolean;
|
27
|
+
/**
|
28
|
+
* If true, then show the nsfw posts (even if your user setting is to hide them)
|
29
|
+
*/
|
30
|
+
show_nsfw?: boolean;
|
27
31
|
page_cursor?: PaginationCursor;
|
28
32
|
page_back?: boolean;
|
29
33
|
limit?: number;
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import type { CommentView } from "./CommentView";
|
2
2
|
import type { CommunityView } from "./CommunityView";
|
3
|
+
import type { MultiCommunityView } from "./MultiCommunityView";
|
3
4
|
import type { PersonView } from "./PersonView";
|
4
5
|
import type { PostView } from "./PostView";
|
5
6
|
export type SearchCombinedView = ({
|
@@ -10,4 +11,6 @@ export type SearchCombinedView = ({
|
|
10
11
|
type_: "Community";
|
11
12
|
} & CommunityView) | ({
|
12
13
|
type_: "Person";
|
13
|
-
} & PersonView)
|
14
|
+
} & PersonView) | ({
|
15
|
+
type_: "MultiCommunity";
|
16
|
+
} & MultiCommunityView);
|
package/dist/types/Site.d.ts
CHANGED
package/dist/types/Tag.d.ts
CHANGED
package/dist/types/Tagline.d.ts
CHANGED
@@ -0,0 +1,9 @@
|
|
1
|
+
import type { CommunityId } from "./CommunityId";
|
2
|
+
import type { NotificationsMode } from "./NotificationsMode";
|
3
|
+
/**
|
4
|
+
* Disable reply notifications for a post and all comments inside it
|
5
|
+
*/
|
6
|
+
export type UpdateCommunityNotifications = {
|
7
|
+
community_id: CommunityId;
|
8
|
+
new_state: NotificationsMode;
|
9
|
+
};
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import type { NotificationsMode } from "./NotificationsMode";
|
2
|
+
import type { PostId } from "./PostId";
|
3
|
+
/**
|
4
|
+
* Disable reply notifications for a post and all comments inside it
|
5
|
+
*/
|
6
|
+
export type UpdatePostNotifications = {
|
7
|
+
post_id: PostId;
|
8
|
+
new_state: NotificationsMode;
|
9
|
+
};
|
@@ -0,0 +1,26 @@
|
|
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
|
+
blocked_instances: Array<string>;
|
26
|
+
};
|
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-post-notifications.0",
|
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.
|
46
|
+
"packageManager": "pnpm@10.12.4",
|
47
47
|
"types": "./dist/index.d.ts",
|
48
48
|
"lint-staged": {
|
49
49
|
"*.{ts,tsx,js}": [
|
@@ -1,32 +0,0 @@
|
|
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 { InstanceActions } from "./InstanceActions";
|
7
|
-
import type { Person } from "./Person";
|
8
|
-
import type { PersonActions } from "./PersonActions";
|
9
|
-
import type { Post } from "./Post";
|
10
|
-
import type { TagsView } from "./TagsView";
|
11
|
-
/**
|
12
|
-
* A comment reply view.
|
13
|
-
*/
|
14
|
-
export type CommentReplyView = {
|
15
|
-
comment_reply: CommentReply;
|
16
|
-
recipient: Person;
|
17
|
-
comment: Comment;
|
18
|
-
creator: Person;
|
19
|
-
post: Post;
|
20
|
-
community: Community;
|
21
|
-
community_actions?: CommunityActions;
|
22
|
-
comment_actions?: CommentActions;
|
23
|
-
person_actions?: PersonActions;
|
24
|
-
instance_actions?: InstanceActions;
|
25
|
-
creator_home_instance_actions?: InstanceActions;
|
26
|
-
creator_local_instance_actions?: InstanceActions;
|
27
|
-
creator_community_actions?: CommunityActions;
|
28
|
-
creator_is_admin: boolean;
|
29
|
-
post_tags: TagsView;
|
30
|
-
can_mod: boolean;
|
31
|
-
creator_banned: boolean;
|
32
|
-
};
|
@@ -1,13 +0,0 @@
|
|
1
|
-
import type { CommentReplyView } from "./CommentReplyView";
|
2
|
-
import type { PersonCommentMentionView } from "./PersonCommentMentionView";
|
3
|
-
import type { PersonPostMentionView } from "./PersonPostMentionView";
|
4
|
-
import type { PrivateMessageView } from "./PrivateMessageView";
|
5
|
-
export type InboxCombinedView = ({
|
6
|
-
type_: "CommentReply";
|
7
|
-
} & CommentReplyView) | ({
|
8
|
-
type_: "CommentMention";
|
9
|
-
} & PersonCommentMentionView) | ({
|
10
|
-
type_: "PostMention";
|
11
|
-
} & PersonPostMentionView) | ({
|
12
|
-
type_: "PrivateMessage";
|
13
|
-
} & PrivateMessageView);
|
@@ -1,30 +0,0 @@
|
|
1
|
-
import type { Comment } from "./Comment";
|
2
|
-
import type { CommentActions } from "./CommentActions";
|
3
|
-
import type { Community } from "./Community";
|
4
|
-
import type { CommunityActions } from "./CommunityActions";
|
5
|
-
import type { InstanceActions } from "./InstanceActions";
|
6
|
-
import type { Person } from "./Person";
|
7
|
-
import type { PersonActions } from "./PersonActions";
|
8
|
-
import type { PersonCommentMention } from "./PersonCommentMention";
|
9
|
-
import type { Post } from "./Post";
|
10
|
-
/**
|
11
|
-
* A person comment mention view.
|
12
|
-
*/
|
13
|
-
export type PersonCommentMentionView = {
|
14
|
-
person_comment_mention: PersonCommentMention;
|
15
|
-
recipient: Person;
|
16
|
-
comment: Comment;
|
17
|
-
creator: Person;
|
18
|
-
post: Post;
|
19
|
-
community: Community;
|
20
|
-
community_actions?: CommunityActions;
|
21
|
-
comment_actions?: CommentActions;
|
22
|
-
person_actions?: PersonActions;
|
23
|
-
instance_actions?: InstanceActions;
|
24
|
-
creator_home_instance_actions?: InstanceActions;
|
25
|
-
creator_local_instance_actions?: InstanceActions;
|
26
|
-
creator_community_actions?: CommunityActions;
|
27
|
-
creator_is_admin: boolean;
|
28
|
-
can_mod: boolean;
|
29
|
-
creator_banned: boolean;
|
30
|
-
};
|
@@ -1,13 +0,0 @@
|
|
1
|
-
import type { CommentView } from "./CommentView";
|
2
|
-
import type { CommunityView } from "./CommunityView";
|
3
|
-
import type { PersonView } from "./PersonView";
|
4
|
-
import type { PostView } from "./PostView";
|
5
|
-
/**
|
6
|
-
* The response of an apub object fetch.
|
7
|
-
*/
|
8
|
-
export type ResolveObjectResponse = {
|
9
|
-
comment?: CommentView;
|
10
|
-
post?: PostView;
|
11
|
-
community?: CommunityView;
|
12
|
-
person?: PersonView;
|
13
|
-
};
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|