lemmy-js-client 0.20.0-image-api-rework.7 → 0.20.0-inbox-combined.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/http.d.ts +103 -38
- package/dist/http.js +157 -45
- package/dist/index.d.ts +46 -15
- package/dist/types/AdminAllowInstance.d.ts +3 -2
- package/dist/types/AdminAllowInstanceId.d.ts +1 -0
- package/dist/types/AdminAllowInstanceView.d.ts +1 -1
- package/dist/types/AdminBlockInstance.d.ts +3 -2
- package/dist/types/AdminBlockInstanceId.d.ts +1 -0
- package/dist/types/AdminPurgeComment.d.ts +3 -2
- package/dist/types/AdminPurgeCommentId.d.ts +1 -0
- package/dist/types/AdminPurgeCommentId.js +3 -0
- package/dist/types/AdminPurgeCommunity.d.ts +3 -2
- package/dist/types/AdminPurgeCommunityId.d.ts +1 -0
- package/dist/types/AdminPurgeCommunityId.js +3 -0
- package/dist/types/AdminPurgePerson.d.ts +3 -2
- package/dist/types/AdminPurgePersonId.d.ts +1 -0
- package/dist/types/AdminPurgePersonId.js +3 -0
- package/dist/types/AdminPurgePost.d.ts +3 -2
- package/dist/types/AdminPurgePostId.d.ts +1 -0
- package/dist/types/AdminPurgePostId.js +3 -0
- package/dist/types/CommunityAggregates.d.ts +2 -0
- package/dist/types/CommunityReport.d.ts +22 -0
- package/dist/types/CommunityReportId.d.ts +4 -0
- package/dist/types/CommunityReportId.js +3 -0
- package/dist/types/CommunityReportView.d.ts +16 -0
- package/dist/types/CreatePost.d.ts +2 -0
- package/dist/types/CreateSite.d.ts +0 -2
- package/dist/types/EditPost.d.ts +2 -0
- package/dist/types/EditSite.d.ts +0 -8
- package/dist/types/FederationError.d.ts +1 -1
- package/dist/types/GetComments.d.ts +0 -1
- package/dist/types/GetModlog.d.ts +3 -2
- package/dist/types/GetModlogResponse.d.ts +2 -34
- package/dist/types/GetPersonDetails.d.ts +0 -7
- package/dist/types/GetPersonDetailsResponse.d.ts +0 -4
- package/dist/types/GetPosts.d.ts +1 -0
- package/dist/types/GetSiteResponse.d.ts +0 -8
- package/dist/types/GetUnreadCountResponse.d.ts +2 -4
- package/dist/types/InboxCombinedPaginationCursor.d.ts +4 -0
- package/dist/types/InboxCombinedPaginationCursor.js +3 -0
- package/dist/types/InboxCombinedView.d.ts +13 -0
- package/dist/types/InboxDataType.d.ts +4 -0
- package/dist/types/InboxDataType.js +3 -0
- package/dist/types/LemmyErrorType.d.ts +1 -3
- package/dist/types/ListInbox.d.ts +11 -0
- package/dist/types/ListInboxResponse.d.ts +7 -0
- package/dist/types/ListPersonContent.d.ts +18 -0
- package/dist/types/ListPersonContentResponse.d.ts +7 -0
- package/dist/types/ListPersonSaved.d.ts +10 -0
- package/dist/types/ListPersonSavedResponse.d.ts +7 -0
- package/dist/types/MarkPersonCommentMentionAsRead.d.ts +8 -0
- package/dist/types/MarkPersonPostMentionAsRead.d.ts +8 -0
- package/dist/types/ModAdd.d.ts +3 -2
- package/dist/types/ModAddCommunity.d.ts +3 -2
- package/dist/types/ModAddCommunityId.d.ts +1 -0
- package/dist/types/ModAddCommunityId.js +3 -0
- package/dist/types/ModAddCommunityView.d.ts +1 -1
- package/dist/types/ModAddId.d.ts +1 -0
- package/dist/types/ModAddId.js +3 -0
- package/dist/types/ModAddView.d.ts +1 -1
- package/dist/types/ModBan.d.ts +3 -2
- package/dist/types/ModBanFromCommunity.d.ts +3 -2
- package/dist/types/ModBanFromCommunityId.d.ts +1 -0
- package/dist/types/ModBanFromCommunityId.js +3 -0
- package/dist/types/ModBanFromCommunityView.d.ts +1 -1
- package/dist/types/ModBanId.d.ts +1 -0
- package/dist/types/ModBanId.js +3 -0
- package/dist/types/ModBanView.d.ts +1 -1
- package/dist/types/ModFeaturePost.d.ts +3 -2
- package/dist/types/ModFeaturePostId.d.ts +1 -0
- package/dist/types/ModFeaturePostId.js +3 -0
- package/dist/types/ModFeaturePostView.d.ts +1 -0
- package/dist/types/ModHideCommunity.d.ts +3 -2
- package/dist/types/ModHideCommunityId.d.ts +1 -0
- package/dist/types/ModHideCommunityId.js +3 -0
- package/dist/types/ModLockPost.d.ts +3 -2
- package/dist/types/ModLockPostId.d.ts +1 -0
- package/dist/types/ModLockPostId.js +3 -0
- package/dist/types/ModLockPostView.d.ts +1 -0
- package/dist/types/ModRemoveComment.d.ts +3 -2
- package/dist/types/ModRemoveCommentId.d.ts +1 -0
- package/dist/types/ModRemoveCommentId.js +3 -0
- package/dist/types/ModRemoveCommentView.d.ts +1 -1
- package/dist/types/ModRemoveCommunity.d.ts +3 -2
- package/dist/types/ModRemoveCommunityId.d.ts +1 -0
- package/dist/types/ModRemoveCommunityId.js +3 -0
- package/dist/types/ModRemovePost.d.ts +3 -2
- package/dist/types/ModRemovePostId.d.ts +1 -0
- package/dist/types/ModRemovePostId.js +3 -0
- package/dist/types/ModRemovePostView.d.ts +1 -0
- package/dist/types/ModTransferCommunity.d.ts +3 -2
- package/dist/types/ModTransferCommunityId.d.ts +1 -0
- package/dist/types/ModTransferCommunityId.js +3 -0
- package/dist/types/ModTransferCommunityView.d.ts +1 -1
- package/dist/types/ModlogCombinedPaginationCursor.d.ts +4 -0
- package/dist/types/ModlogCombinedPaginationCursor.js +3 -0
- package/dist/types/ModlogCombinedView.d.ts +52 -0
- package/dist/types/{PersonMention.d.ts → PersonCommentMention.d.ts} +3 -3
- package/dist/types/PersonCommentMentionId.d.ts +4 -0
- package/dist/types/PersonCommentMentionId.js +3 -0
- package/dist/types/{PersonMentionView.d.ts → PersonCommentMentionView.d.ts} +4 -4
- package/dist/types/PersonCommentMentionView.js +2 -0
- package/dist/types/PersonContentCombinedPaginationCursor.d.ts +4 -0
- package/dist/types/PersonContentCombinedPaginationCursor.js +3 -0
- package/dist/types/PersonContentCombinedView.d.ts +7 -0
- package/dist/types/PersonContentCombinedView.js +2 -0
- package/dist/types/PersonContentType.d.ts +4 -0
- package/dist/types/PersonContentType.js +3 -0
- package/dist/types/PersonPostMention.d.ts +13 -0
- package/dist/types/PersonPostMention.js +2 -0
- package/dist/types/PersonPostMentionId.d.ts +4 -0
- package/dist/types/PersonPostMentionId.js +3 -0
- package/dist/types/PersonPostMentionView.d.ts +30 -0
- package/dist/types/PersonPostMentionView.js +2 -0
- package/dist/types/PersonSavedCombinedPaginationCursor.d.ts +4 -0
- package/dist/types/PersonSavedCombinedPaginationCursor.js +3 -0
- package/dist/types/PostTags.d.ts +7 -0
- package/dist/types/PostTags.js +2 -0
- package/dist/types/PostView.d.ts +2 -0
- package/dist/types/ReportCombinedView.d.ts +4 -1
- package/dist/types/Search.d.ts +0 -1
- package/dist/types/Tag.d.ts +27 -0
- package/dist/types/Tag.js +2 -0
- package/dist/types/TagId.d.ts +4 -0
- package/dist/types/TagId.js +3 -0
- package/package.json +2 -2
- package/dist/types/CommentReplyResponse.d.ts +0 -7
- package/dist/types/GetPersonMentions.d.ts +0 -10
- package/dist/types/GetPersonMentionsResponse.d.ts +0 -7
- package/dist/types/GetPrivateMessages.d.ts +0 -10
- package/dist/types/GetReplies.d.ts +0 -10
- package/dist/types/GetRepliesResponse.d.ts +0 -7
- package/dist/types/MarkPersonMentionAsRead.d.ts +0 -8
- package/dist/types/ModlogListParams.d.ts +0 -17
- package/dist/types/PersonMentionId.d.ts +0 -4
- package/dist/types/PersonMentionResponse.d.ts +0 -7
- package/dist/types/PrivateMessagesResponse.d.ts +0 -7
- package/dist/types/ReportCombined.d.ts +0 -14
- package/dist/types/ReportCombinedId.d.ts +0 -4
- /package/dist/types/{PersonMentionId.js → AdminAllowInstanceId.js} +0 -0
- /package/dist/types/{ReportCombinedId.js → AdminBlockInstanceId.js} +0 -0
- /package/dist/types/{CommentReplyResponse.js → CommunityReport.js} +0 -0
- /package/dist/types/{GetPersonMentions.js → CommunityReportView.js} +0 -0
- /package/dist/types/{GetPersonMentionsResponse.js → InboxCombinedView.js} +0 -0
- /package/dist/types/{GetPrivateMessages.js → ListInbox.js} +0 -0
- /package/dist/types/{GetReplies.js → ListInboxResponse.js} +0 -0
- /package/dist/types/{GetRepliesResponse.js → ListPersonContent.js} +0 -0
- /package/dist/types/{MarkPersonMentionAsRead.js → ListPersonContentResponse.js} +0 -0
- /package/dist/types/{ModlogListParams.js → ListPersonSaved.js} +0 -0
- /package/dist/types/{PersonMention.js → ListPersonSavedResponse.js} +0 -0
- /package/dist/types/{PersonMentionResponse.js → MarkPersonCommentMentionAsRead.js} +0 -0
- /package/dist/types/{PersonMentionView.js → MarkPersonPostMentionAsRead.js} +0 -0
- /package/dist/types/{PrivateMessagesResponse.js → ModlogCombinedView.js} +0 -0
- /package/dist/types/{ReportCombined.js → PersonCommentMention.js} +0 -0
@@ -0,0 +1,13 @@
|
|
1
|
+
import type { PersonId } from "./PersonId";
|
2
|
+
import type { PersonPostMentionId } from "./PersonPostMentionId";
|
3
|
+
import type { PostId } from "./PostId";
|
4
|
+
/**
|
5
|
+
* A person mention.
|
6
|
+
*/
|
7
|
+
export type PersonPostMention = {
|
8
|
+
id: PersonPostMentionId;
|
9
|
+
recipient_id: PersonId;
|
10
|
+
post_id: PostId;
|
11
|
+
read: boolean;
|
12
|
+
published: string;
|
13
|
+
};
|
@@ -0,0 +1,30 @@
|
|
1
|
+
import type { Community } from "./Community";
|
2
|
+
import type { ImageDetails } from "./ImageDetails";
|
3
|
+
import type { Person } from "./Person";
|
4
|
+
import type { PersonPostMention } from "./PersonPostMention";
|
5
|
+
import type { Post } from "./Post";
|
6
|
+
import type { PostAggregates } from "./PostAggregates";
|
7
|
+
import type { SubscribedType } from "./SubscribedType";
|
8
|
+
/**
|
9
|
+
* A person post mention view.
|
10
|
+
*/
|
11
|
+
export type PersonPostMentionView = {
|
12
|
+
person_post_mention: PersonPostMention;
|
13
|
+
post: Post;
|
14
|
+
creator: Person;
|
15
|
+
community: Community;
|
16
|
+
image_details?: ImageDetails;
|
17
|
+
recipient: Person;
|
18
|
+
counts: PostAggregates;
|
19
|
+
creator_banned_from_community: boolean;
|
20
|
+
banned_from_community: boolean;
|
21
|
+
creator_is_moderator: boolean;
|
22
|
+
creator_is_admin: boolean;
|
23
|
+
subscribed: SubscribedType;
|
24
|
+
saved: boolean;
|
25
|
+
read: boolean;
|
26
|
+
hidden: boolean;
|
27
|
+
creator_blocked: boolean;
|
28
|
+
my_vote?: number;
|
29
|
+
unread_comments: number;
|
30
|
+
};
|
package/dist/types/PostView.d.ts
CHANGED
@@ -3,6 +3,7 @@ import type { ImageDetails } from "./ImageDetails";
|
|
3
3
|
import type { Person } from "./Person";
|
4
4
|
import type { Post } from "./Post";
|
5
5
|
import type { PostAggregates } from "./PostAggregates";
|
6
|
+
import type { PostTags } from "./PostTags";
|
6
7
|
import type { SubscribedType } from "./SubscribedType";
|
7
8
|
/**
|
8
9
|
* A post view.
|
@@ -24,4 +25,5 @@ export type PostView = {
|
|
24
25
|
creator_blocked: boolean;
|
25
26
|
my_vote?: number;
|
26
27
|
unread_comments: number;
|
28
|
+
tags: PostTags;
|
27
29
|
};
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import type { CommentReportView } from "./CommentReportView";
|
2
|
+
import type { CommunityReportView } from "./CommunityReportView";
|
2
3
|
import type { PostReportView } from "./PostReportView";
|
3
4
|
import type { PrivateMessageReportView } from "./PrivateMessageReportView";
|
4
5
|
export type ReportCombinedView = ({
|
@@ -7,4 +8,6 @@ export type ReportCombinedView = ({
|
|
7
8
|
type_: "Comment";
|
8
9
|
} & CommentReportView) | ({
|
9
10
|
type_: "PrivateMessage";
|
10
|
-
} & PrivateMessageReportView)
|
11
|
+
} & PrivateMessageReportView) | ({
|
12
|
+
type_: "Community";
|
13
|
+
} & CommunityReportView);
|
package/dist/types/Search.d.ts
CHANGED
@@ -0,0 +1,27 @@
|
|
1
|
+
import type { CommunityId } from "./CommunityId";
|
2
|
+
import type { DbUrl } from "./DbUrl";
|
3
|
+
import type { TagId } from "./TagId";
|
4
|
+
/**
|
5
|
+
* A tag that can be assigned to a post within a community.
|
6
|
+
* The tag object is created by the community moderators.
|
7
|
+
* The assignment happens by the post creator and can be updated by the community moderators.
|
8
|
+
*
|
9
|
+
* A tag is a federatable object that gives additional context to another object, which can be
|
10
|
+
* displayed and filtered on currently, we only have community post tags, which is a tag that is
|
11
|
+
* created by post authors as well as mods of a community, to categorize a post. in the future we
|
12
|
+
* may add more tag types, depending on the requirements, this will lead to either expansion of
|
13
|
+
* this table (community_id optional, addition of tag_type enum) or split of this table / creation
|
14
|
+
* of new tables.
|
15
|
+
*/
|
16
|
+
export type Tag = {
|
17
|
+
id: TagId;
|
18
|
+
ap_id: DbUrl;
|
19
|
+
name: string;
|
20
|
+
/**
|
21
|
+
* the community that owns this tag
|
22
|
+
*/
|
23
|
+
community_id: CommunityId;
|
24
|
+
published: string;
|
25
|
+
updated?: string;
|
26
|
+
deleted: boolean;
|
27
|
+
};
|
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": "0.20.0-
|
4
|
+
"version": "0.20.0-inbox-combined.0",
|
5
5
|
"author": "Dessalines <tyhou13@gmx.com>",
|
6
6
|
"license": "AGPL-3.0",
|
7
7
|
"main": "./dist/index.js",
|
@@ -35,7 +35,7 @@
|
|
35
35
|
"typescript": "^5.5.4",
|
36
36
|
"typescript-eslint": "^8.7.0"
|
37
37
|
},
|
38
|
-
"packageManager": "pnpm@9.15.
|
38
|
+
"packageManager": "pnpm@9.15.3",
|
39
39
|
"types": "./dist/index.d.ts",
|
40
40
|
"lint-staged": {
|
41
41
|
"*.{ts,tsx,js}": [
|
@@ -1,17 +0,0 @@
|
|
1
|
-
import type { CommentId } from "./CommentId";
|
2
|
-
import type { CommunityId } from "./CommunityId";
|
3
|
-
import type { PersonId } from "./PersonId";
|
4
|
-
import type { PostId } from "./PostId";
|
5
|
-
/**
|
6
|
-
* Querying / filtering the modlog.
|
7
|
-
*/
|
8
|
-
export type ModlogListParams = {
|
9
|
-
community_id?: CommunityId;
|
10
|
-
mod_person_id?: PersonId;
|
11
|
-
other_person_id?: PersonId;
|
12
|
-
post_id?: PostId;
|
13
|
-
comment_id?: CommentId;
|
14
|
-
page?: number;
|
15
|
-
limit?: number;
|
16
|
-
hide_modlog_names: boolean;
|
17
|
-
};
|
@@ -1,14 +0,0 @@
|
|
1
|
-
import type { CommentReportId } from "./CommentReportId";
|
2
|
-
import type { PostReportId } from "./PostReportId";
|
3
|
-
import type { PrivateMessageReportId } from "./PrivateMessageReportId";
|
4
|
-
import type { ReportCombinedId } from "./ReportCombinedId";
|
5
|
-
/**
|
6
|
-
* A combined reports table.
|
7
|
-
*/
|
8
|
-
export type ReportCombined = {
|
9
|
-
id: ReportCombinedId;
|
10
|
-
published: string;
|
11
|
-
post_report_id?: PostReportId;
|
12
|
-
comment_report_id?: CommentReportId;
|
13
|
-
private_message_report_id?: PrivateMessageReportId;
|
14
|
-
};
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|