lemmy-js-client 1.0.0-merge-modlog-tables.1 → 1.0.0-merge-modlog-tables.3
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 +2 -2
- package/dist/http.js +4 -3
- package/dist/index.d.ts +87 -1
- package/dist/index.js +3 -0
- package/dist/other_types.d.ts +3 -0
- package/dist/types/AdminAllowInstance.d.ts +11 -0
- package/dist/types/AdminAllowInstance.js +2 -0
- package/dist/types/AdminAllowInstanceId.d.ts +1 -0
- package/dist/types/AdminAllowInstanceId.js +3 -0
- package/dist/types/AdminAllowInstanceView.d.ts +11 -0
- package/dist/types/AdminAllowInstanceView.js +2 -0
- package/dist/types/AdminBlockInstance.d.ts +12 -0
- package/dist/types/AdminBlockInstance.js +2 -0
- package/dist/types/AdminBlockInstanceId.d.ts +1 -0
- package/dist/types/AdminBlockInstanceId.js +3 -0
- package/dist/types/AdminBlockInstanceView.d.ts +11 -0
- package/dist/types/AdminBlockInstanceView.js +2 -0
- package/dist/types/AdminPurgeComment.d.ts +9 -0
- package/dist/types/AdminPurgeComment.js +2 -0
- package/dist/types/AdminPurgeCommentId.d.ts +1 -0
- package/dist/types/AdminPurgeCommentId.js +3 -0
- package/dist/types/AdminPurgeCommentView.d.ts +11 -0
- package/dist/types/AdminPurgeCommentView.js +2 -0
- package/dist/types/AdminPurgeCommunity.d.ts +7 -0
- package/dist/types/AdminPurgeCommunity.js +2 -0
- package/dist/types/AdminPurgeCommunityId.d.ts +1 -0
- package/dist/types/AdminPurgeCommunityId.js +3 -0
- package/dist/types/AdminPurgeCommunityView.d.ts +9 -0
- package/dist/types/AdminPurgeCommunityView.js +2 -0
- package/dist/types/AdminPurgePerson.d.ts +7 -0
- package/dist/types/AdminPurgePerson.js +2 -0
- package/dist/types/AdminPurgePersonId.d.ts +1 -0
- package/dist/types/AdminPurgePersonId.js +3 -0
- package/dist/types/AdminPurgePersonView.d.ts +9 -0
- package/dist/types/AdminPurgePersonView.js +2 -0
- package/dist/types/AdminPurgePost.d.ts +9 -0
- package/dist/types/AdminPurgePost.js +2 -0
- package/dist/types/AdminPurgePostId.d.ts +1 -0
- package/dist/types/AdminPurgePostId.js +3 -0
- package/dist/types/AdminPurgePostView.d.ts +11 -0
- package/dist/types/AdminPurgePostView.js +2 -0
- package/dist/types/CommentAggregates.d.ts +9 -0
- package/dist/types/CommentAggregates.js +2 -0
- package/dist/types/CommentReply.d.ts +10 -0
- package/dist/types/CommentReply.js +2 -0
- package/dist/types/CommentReplyId.d.ts +1 -0
- package/dist/types/CommentReplyId.js +3 -0
- package/dist/types/CommentReplyView.d.ts +27 -0
- package/dist/types/CommentReplyView.js +2 -0
- package/dist/types/CommentReportView.d.ts +12 -17
- package/dist/types/CommentSlimView.d.ts +4 -3
- package/dist/types/CommunityAggregates.d.ts +13 -0
- package/dist/types/CommunityAggregates.js +2 -0
- package/dist/types/CommunityReportView.d.ts +0 -6
- package/dist/types/CustomEmojiView.d.ts +2 -5
- package/dist/types/FederationError.d.ts +10 -0
- package/dist/types/FederationError.js +3 -0
- 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/InboxCombinedView.js +2 -0
- package/dist/types/InboxDataType.d.ts +4 -0
- package/dist/types/InboxDataType.js +3 -0
- package/dist/types/LocalUserVoteDisplayMode.d.ts +8 -0
- package/dist/types/LocalUserVoteDisplayMode.js +2 -0
- package/dist/types/ModAdd.d.ts +8 -0
- package/dist/types/ModAdd.js +2 -0
- package/dist/types/ModAddCommunity.d.ts +10 -0
- package/dist/types/ModAddCommunity.js +2 -0
- package/dist/types/ModAddCommunityId.d.ts +1 -0
- package/dist/types/ModAddCommunityId.js +3 -0
- package/dist/types/ModAddCommunityView.d.ts +12 -0
- package/dist/types/ModAddCommunityView.js +2 -0
- package/dist/types/ModAddId.d.ts +1 -0
- package/dist/types/ModAddId.js +3 -0
- package/dist/types/ModAddView.d.ts +10 -0
- package/dist/types/ModAddView.js +2 -0
- package/dist/types/ModBan.d.ts +10 -0
- package/dist/types/ModBan.js +2 -0
- package/dist/types/ModBanFromCommunity.d.ts +12 -0
- package/dist/types/ModBanFromCommunity.js +2 -0
- package/dist/types/ModBanFromCommunityId.d.ts +1 -0
- package/dist/types/ModBanFromCommunityId.js +3 -0
- package/dist/types/ModBanFromCommunityView.d.ts +12 -0
- package/dist/types/ModBanFromCommunityView.js +2 -0
- package/dist/types/ModBanId.d.ts +1 -0
- package/dist/types/ModBanId.js +3 -0
- package/dist/types/ModBanView.d.ts +10 -0
- package/dist/types/ModBanView.js +2 -0
- package/dist/types/ModChangeCommunityVisibility.d.ts +12 -0
- package/dist/types/ModChangeCommunityVisibility.js +2 -0
- package/dist/types/ModChangeCommunityVisibilityId.d.ts +1 -0
- package/dist/types/ModChangeCommunityVisibilityId.js +3 -0
- package/dist/types/ModChangeCommunityVisibilityView.d.ts +11 -0
- package/dist/types/ModChangeCommunityVisibilityView.js +2 -0
- package/dist/types/ModFeaturePost.d.ts +10 -0
- package/dist/types/ModFeaturePost.js +2 -0
- package/dist/types/ModFeaturePostId.d.ts +1 -0
- package/dist/types/ModFeaturePostId.js +3 -0
- package/dist/types/ModFeaturePostView.d.ts +14 -0
- package/dist/types/ModFeaturePostView.js +2 -0
- package/dist/types/ModHideCommunity.d.ts +10 -0
- package/dist/types/ModHideCommunity.js +2 -0
- package/dist/types/ModHideCommunityId.d.ts +1 -0
- package/dist/types/ModHideCommunityId.js +3 -0
- package/dist/types/ModHideCommunityView.d.ts +11 -0
- package/dist/types/ModHideCommunityView.js +2 -0
- package/dist/types/ModLockPost.d.ts +9 -0
- package/dist/types/ModLockPost.js +2 -0
- package/dist/types/ModLockPostId.d.ts +1 -0
- package/dist/types/ModLockPostId.js +3 -0
- package/dist/types/ModLockPostView.d.ts +14 -0
- package/dist/types/ModLockPostView.js +2 -0
- package/dist/types/ModRemoveComment.d.ts +10 -0
- package/dist/types/ModRemoveComment.js +2 -0
- package/dist/types/ModRemoveCommentId.d.ts +1 -0
- package/dist/types/ModRemoveCommentId.js +3 -0
- package/dist/types/ModRemoveCommentView.d.ts +16 -0
- package/dist/types/ModRemoveCommentView.js +2 -0
- package/dist/types/ModRemoveCommunity.d.ts +10 -0
- package/dist/types/ModRemoveCommunity.js +2 -0
- package/dist/types/ModRemoveCommunityId.d.ts +1 -0
- package/dist/types/ModRemoveCommunityId.js +3 -0
- package/dist/types/ModRemoveCommunityView.d.ts +11 -0
- package/dist/types/ModRemoveCommunityView.js +2 -0
- package/dist/types/ModRemovePost.d.ts +10 -0
- package/dist/types/ModRemovePost.js +2 -0
- package/dist/types/ModRemovePostId.d.ts +1 -0
- package/dist/types/ModRemovePostId.js +3 -0
- package/dist/types/ModRemovePostView.d.ts +14 -0
- package/dist/types/ModRemovePostView.js +2 -0
- package/dist/types/ModTransferCommunity.d.ts +9 -0
- package/dist/types/ModTransferCommunity.js +2 -0
- package/dist/types/ModTransferCommunityId.d.ts +1 -0
- package/dist/types/ModTransferCommunityId.js +3 -0
- package/dist/types/ModTransferCommunityView.d.ts +12 -0
- package/dist/types/ModTransferCommunityView.js +2 -0
- package/dist/types/ModlogActionType.d.ts +1 -0
- package/dist/types/ModlogActionType.js +3 -0
- 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/ModlogCombinedView.js +2 -0
- package/dist/types/PersonAggregates.d.ts +6 -0
- package/dist/types/PersonAggregates.js +2 -0
- package/dist/types/PersonCommentMention.d.ts +13 -0
- package/dist/types/PersonCommentMention.js +2 -0
- package/dist/types/PersonCommentMentionId.d.ts +4 -0
- package/dist/types/PersonCommentMentionId.js +3 -0
- package/dist/types/PersonCommentMentionView.d.ts +27 -0
- 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 +2 -2
- package/dist/types/PersonMention.d.ts +10 -0
- package/dist/types/PersonMention.js +2 -0
- package/dist/types/PersonMentionId.d.ts +1 -0
- package/dist/types/PersonMentionId.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 +27 -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/PersonSavedCombinedView.d.ts +2 -2
- package/dist/types/PostAggregates.d.ts +10 -0
- package/dist/types/PostAggregates.js +2 -0
- package/dist/types/PostPaginationCursor.d.ts +7 -0
- package/dist/types/PostPaginationCursor.js +3 -0
- package/dist/types/PostReportView.d.ts +15 -17
- package/dist/types/PostTags.d.ts +7 -0
- package/dist/types/PostTags.js +2 -0
- package/dist/types/PrivateMessageReportView.d.ts +3 -9
- package/dist/types/RegistrationApplicationView.d.ts +2 -5
- package/dist/types/ReportCombinedPaginationCursor.d.ts +4 -0
- package/dist/types/ReportCombinedPaginationCursor.js +3 -0
- package/dist/types/ReportCombinedView.d.ts +4 -4
- package/dist/types/SearchCombinedPaginationCursor.d.ts +4 -0
- package/dist/types/SearchCombinedPaginationCursor.js +3 -0
- package/dist/types/SearchCombinedView.d.ts +5 -8
- package/dist/types/SiteAggregates.d.ts +12 -0
- package/dist/types/SiteAggregates.js +2 -0
- package/dist/types/SiteView.d.ts +4 -7
- package/dist/types/SortType.d.ts +1 -0
- package/dist/types/SortType.js +3 -0
- package/dist/types/SubscribedType.d.ts +1 -0
- package/dist/types/SubscribedType.js +3 -0
- package/dist/types/VoteView.d.ts +3 -10
- package/package.json +2 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type ModTransferCommunityId = number;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Community } from "./Community";
|
|
2
|
+
import type { ModTransferCommunity } from "./ModTransferCommunity";
|
|
3
|
+
import type { Person } from "./Person";
|
|
4
|
+
/**
|
|
5
|
+
* When a moderator transfers a community to a new owner.
|
|
6
|
+
*/
|
|
7
|
+
export type ModTransferCommunityView = {
|
|
8
|
+
mod_transfer_community: ModTransferCommunity;
|
|
9
|
+
moderator?: Person;
|
|
10
|
+
community: Community;
|
|
11
|
+
other_person: Person;
|
|
12
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type ModlogActionType = "All" | "ModRemovePost" | "ModLockPost" | "ModFeaturePost" | "ModRemoveComment" | "ModRemoveCommunity" | "ModBanFromCommunity" | "ModAddCommunity" | "ModTransferCommunity" | "ModAdd" | "ModBan" | "ModHideCommunity" | "AdminPurgePerson" | "AdminPurgeCommunity" | "AdminPurgePost" | "AdminPurgeComment";
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type { AdminAllowInstanceView } from "./AdminAllowInstanceView";
|
|
2
|
+
import type { AdminBlockInstanceView } from "./AdminBlockInstanceView";
|
|
3
|
+
import type { AdminPurgeCommentView } from "./AdminPurgeCommentView";
|
|
4
|
+
import type { AdminPurgeCommunityView } from "./AdminPurgeCommunityView";
|
|
5
|
+
import type { AdminPurgePersonView } from "./AdminPurgePersonView";
|
|
6
|
+
import type { AdminPurgePostView } from "./AdminPurgePostView";
|
|
7
|
+
import type { ModAddCommunityView } from "./ModAddCommunityView";
|
|
8
|
+
import type { ModAddView } from "./ModAddView";
|
|
9
|
+
import type { ModBanFromCommunityView } from "./ModBanFromCommunityView";
|
|
10
|
+
import type { ModBanView } from "./ModBanView";
|
|
11
|
+
import type { ModChangeCommunityVisibilityView } from "./ModChangeCommunityVisibilityView";
|
|
12
|
+
import type { ModFeaturePostView } from "./ModFeaturePostView";
|
|
13
|
+
import type { ModLockPostView } from "./ModLockPostView";
|
|
14
|
+
import type { ModRemoveCommentView } from "./ModRemoveCommentView";
|
|
15
|
+
import type { ModRemoveCommunityView } from "./ModRemoveCommunityView";
|
|
16
|
+
import type { ModRemovePostView } from "./ModRemovePostView";
|
|
17
|
+
import type { ModTransferCommunityView } from "./ModTransferCommunityView";
|
|
18
|
+
export type ModlogCombinedView = ({
|
|
19
|
+
type_: "AdminAllowInstance";
|
|
20
|
+
} & AdminAllowInstanceView) | ({
|
|
21
|
+
type_: "AdminBlockInstance";
|
|
22
|
+
} & AdminBlockInstanceView) | ({
|
|
23
|
+
type_: "AdminPurgeComment";
|
|
24
|
+
} & AdminPurgeCommentView) | ({
|
|
25
|
+
type_: "AdminPurgeCommunity";
|
|
26
|
+
} & AdminPurgeCommunityView) | ({
|
|
27
|
+
type_: "AdminPurgePerson";
|
|
28
|
+
} & AdminPurgePersonView) | ({
|
|
29
|
+
type_: "AdminPurgePost";
|
|
30
|
+
} & AdminPurgePostView) | ({
|
|
31
|
+
type_: "ModAdd";
|
|
32
|
+
} & ModAddView) | ({
|
|
33
|
+
type_: "ModAddCommunity";
|
|
34
|
+
} & ModAddCommunityView) | ({
|
|
35
|
+
type_: "ModBan";
|
|
36
|
+
} & ModBanView) | ({
|
|
37
|
+
type_: "ModBanFromCommunity";
|
|
38
|
+
} & ModBanFromCommunityView) | ({
|
|
39
|
+
type_: "ModFeaturePost";
|
|
40
|
+
} & ModFeaturePostView) | ({
|
|
41
|
+
type_: "ModChangeCommunityVisibility";
|
|
42
|
+
} & ModChangeCommunityVisibilityView) | ({
|
|
43
|
+
type_: "ModLockPost";
|
|
44
|
+
} & ModLockPostView) | ({
|
|
45
|
+
type_: "ModRemoveComment";
|
|
46
|
+
} & ModRemoveCommentView) | ({
|
|
47
|
+
type_: "ModRemoveCommunity";
|
|
48
|
+
} & ModRemoveCommunityView) | ({
|
|
49
|
+
type_: "ModRemovePost";
|
|
50
|
+
} & ModRemovePostView) | ({
|
|
51
|
+
type_: "ModTransferCommunity";
|
|
52
|
+
} & ModTransferCommunityView);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { CommentId } from "./CommentId";
|
|
2
|
+
import type { PersonCommentMentionId } from "./PersonCommentMentionId";
|
|
3
|
+
import type { PersonId } from "./PersonId";
|
|
4
|
+
/**
|
|
5
|
+
* A person mention.
|
|
6
|
+
*/
|
|
7
|
+
export type PersonCommentMention = {
|
|
8
|
+
id: PersonCommentMentionId;
|
|
9
|
+
recipient_id: PersonId;
|
|
10
|
+
comment_id: CommentId;
|
|
11
|
+
read: boolean;
|
|
12
|
+
published: string;
|
|
13
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
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_community_actions?: CommunityActions;
|
|
25
|
+
creator_is_admin: boolean;
|
|
26
|
+
can_mod: boolean;
|
|
27
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { CommentId } from "./CommentId";
|
|
2
|
+
import type { PersonId } from "./PersonId";
|
|
3
|
+
import type { PersonMentionId } from "./PersonMentionId";
|
|
4
|
+
export interface PersonMention {
|
|
5
|
+
id: PersonMentionId;
|
|
6
|
+
recipient_id: PersonId;
|
|
7
|
+
comment_id: CommentId;
|
|
8
|
+
read: boolean;
|
|
9
|
+
published: string;
|
|
10
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type PersonMentionId = number;
|
|
@@ -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,27 @@
|
|
|
1
|
+
import type { Community } from "./Community";
|
|
2
|
+
import type { CommunityActions } from "./CommunityActions";
|
|
3
|
+
import type { ImageDetails } from "./ImageDetails";
|
|
4
|
+
import type { InstanceActions } from "./InstanceActions";
|
|
5
|
+
import type { Person } from "./Person";
|
|
6
|
+
import type { PersonActions } from "./PersonActions";
|
|
7
|
+
import type { PersonPostMention } from "./PersonPostMention";
|
|
8
|
+
import type { Post } from "./Post";
|
|
9
|
+
import type { PostActions } from "./PostActions";
|
|
10
|
+
/**
|
|
11
|
+
* A person post mention view.
|
|
12
|
+
*/
|
|
13
|
+
export type PersonPostMentionView = {
|
|
14
|
+
person_post_mention: PersonPostMention;
|
|
15
|
+
recipient: Person;
|
|
16
|
+
post: Post;
|
|
17
|
+
creator: Person;
|
|
18
|
+
community: Community;
|
|
19
|
+
image_details?: ImageDetails;
|
|
20
|
+
community_actions?: CommunityActions;
|
|
21
|
+
person_actions?: PersonActions;
|
|
22
|
+
post_actions?: PostActions;
|
|
23
|
+
instance_actions?: InstanceActions;
|
|
24
|
+
creator_community_actions?: CommunityActions;
|
|
25
|
+
creator_is_admin: boolean;
|
|
26
|
+
can_mod: boolean;
|
|
27
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* currently this is just a wrapper around post id, but should be seen as opaque from the client's
|
|
3
|
+
* perspective. stringified since we might want to use arbitrary info later, with a P prepended to
|
|
4
|
+
* prevent ossification (api users love to make assumptions (e.g. parse stuff that looks like
|
|
5
|
+
* numbers as numbers) about apis that aren't part of the spec
|
|
6
|
+
*/
|
|
7
|
+
export type PostPaginationCursor = string;
|
|
@@ -1,27 +1,25 @@
|
|
|
1
1
|
import type { Community } from "./Community";
|
|
2
|
-
import type { CommunityActions } from "./CommunityActions";
|
|
3
2
|
import type { Person } from "./Person";
|
|
4
|
-
import type { PersonActions } from "./PersonActions";
|
|
5
3
|
import type { Post } from "./Post";
|
|
6
|
-
import type {
|
|
4
|
+
import type { PostAggregates } from "./PostAggregates";
|
|
7
5
|
import type { PostReport } from "./PostReport";
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
*/
|
|
11
|
-
export type PostReportView = {
|
|
6
|
+
import type { SubscribedType } from "./SubscribedType";
|
|
7
|
+
export interface PostReportView {
|
|
12
8
|
post_report: PostReport;
|
|
13
9
|
post: Post;
|
|
14
10
|
community: Community;
|
|
15
11
|
creator: Person;
|
|
16
12
|
post_creator: Person;
|
|
17
|
-
community_actions?: CommunityActions;
|
|
18
|
-
post_actions?: PostActions;
|
|
19
|
-
person_actions?: PersonActions;
|
|
20
|
-
resolver?: Person;
|
|
21
|
-
creator_is_admin: boolean;
|
|
22
|
-
creator_is_moderator: boolean;
|
|
23
|
-
creator_banned: boolean;
|
|
24
|
-
creator_ban_expires_at?: string;
|
|
25
13
|
creator_banned_from_community: boolean;
|
|
26
|
-
|
|
27
|
-
|
|
14
|
+
creator_is_moderator: boolean;
|
|
15
|
+
creator_is_admin: boolean;
|
|
16
|
+
subscribed: SubscribedType;
|
|
17
|
+
saved: boolean;
|
|
18
|
+
read: boolean;
|
|
19
|
+
hidden: boolean;
|
|
20
|
+
creator_blocked: boolean;
|
|
21
|
+
my_vote?: number;
|
|
22
|
+
unread_comments: number;
|
|
23
|
+
counts: PostAggregates;
|
|
24
|
+
resolver?: Person;
|
|
25
|
+
}
|
|
@@ -1,16 +1,10 @@
|
|
|
1
1
|
import type { Person } from "./Person";
|
|
2
2
|
import type { PrivateMessage } from "./PrivateMessage";
|
|
3
3
|
import type { PrivateMessageReport } from "./PrivateMessageReport";
|
|
4
|
-
|
|
5
|
-
* A private message report view.
|
|
6
|
-
*/
|
|
7
|
-
export type PrivateMessageReportView = {
|
|
4
|
+
export interface PrivateMessageReportView {
|
|
8
5
|
private_message_report: PrivateMessageReport;
|
|
9
6
|
private_message: PrivateMessage;
|
|
10
|
-
creator: Person;
|
|
11
7
|
private_message_creator: Person;
|
|
8
|
+
creator: Person;
|
|
12
9
|
resolver?: Person;
|
|
13
|
-
|
|
14
|
-
creator_banned: boolean;
|
|
15
|
-
creator_ban_expires_at?: string;
|
|
16
|
-
};
|
|
10
|
+
}
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
import type { LocalUser } from "./LocalUser";
|
|
2
2
|
import type { Person } from "./Person";
|
|
3
3
|
import type { RegistrationApplication } from "./RegistrationApplication";
|
|
4
|
-
|
|
5
|
-
* A registration application view.
|
|
6
|
-
*/
|
|
7
|
-
export type RegistrationApplicationView = {
|
|
4
|
+
export interface RegistrationApplicationView {
|
|
8
5
|
registration_application: RegistrationApplication;
|
|
9
6
|
creator_local_user: LocalUser;
|
|
10
7
|
creator: Person;
|
|
11
8
|
admin?: Person;
|
|
12
|
-
}
|
|
9
|
+
}
|
|
@@ -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_: "PrivateMessage";
|
|
11
11
|
} & PrivateMessageReportView) | ({
|
|
12
|
-
type_: "
|
|
12
|
+
type_: "Community";
|
|
13
13
|
} & CommunityReportView);
|
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
import type { CommentView } from "./CommentView";
|
|
2
2
|
import type { CommunityView } from "./CommunityView";
|
|
3
|
-
import type { MultiCommunityView } from "./MultiCommunityView";
|
|
4
3
|
import type { PersonView } from "./PersonView";
|
|
5
4
|
import type { PostView } from "./PostView";
|
|
6
5
|
export type SearchCombinedView = ({
|
|
7
|
-
type_: "
|
|
6
|
+
type_: "Post";
|
|
8
7
|
} & PostView) | ({
|
|
9
|
-
type_: "
|
|
8
|
+
type_: "Comment";
|
|
10
9
|
} & CommentView) | ({
|
|
11
|
-
type_: "
|
|
10
|
+
type_: "Community";
|
|
12
11
|
} & CommunityView) | ({
|
|
13
|
-
type_: "
|
|
14
|
-
} & PersonView)
|
|
15
|
-
type_: "multi_community";
|
|
16
|
-
} & MultiCommunityView);
|
|
12
|
+
type_: "Person";
|
|
13
|
+
} & PersonView);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { SiteId } from "./SiteId";
|
|
2
|
+
export interface SiteAggregates {
|
|
3
|
+
site_id: SiteId;
|
|
4
|
+
users: number;
|
|
5
|
+
posts: number;
|
|
6
|
+
comments: number;
|
|
7
|
+
communities: number;
|
|
8
|
+
users_active_day: number;
|
|
9
|
+
users_active_week: number;
|
|
10
|
+
users_active_month: number;
|
|
11
|
+
users_active_half_year: number;
|
|
12
|
+
}
|
package/dist/types/SiteView.d.ts
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
import type { Instance } from "./Instance";
|
|
2
1
|
import type { LocalSite } from "./LocalSite";
|
|
3
2
|
import type { LocalSiteRateLimit } from "./LocalSiteRateLimit";
|
|
4
3
|
import type { Site } from "./Site";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
*/
|
|
8
|
-
export type SiteView = {
|
|
4
|
+
import type { SiteAggregates } from "./SiteAggregates";
|
|
5
|
+
export interface SiteView {
|
|
9
6
|
site: Site;
|
|
10
7
|
local_site: LocalSite;
|
|
11
8
|
local_site_rate_limit: LocalSiteRateLimit;
|
|
12
|
-
|
|
13
|
-
}
|
|
9
|
+
counts: SiteAggregates;
|
|
10
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type SortType = "Active" | "Hot" | "New" | "Old" | "TopDay" | "TopWeek" | "TopMonth" | "TopYear" | "TopAll" | "MostComments" | "NewComments" | "TopHour" | "TopSixHour" | "TopTwelveHour" | "TopThreeMonths" | "TopSixMonths" | "TopNineMonths" | "Controversial" | "Scaled";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type SubscribedType = "Subscribed" | "NotSubscribed" | "Pending";
|
package/dist/types/VoteView.d.ts
CHANGED
|
@@ -1,13 +1,6 @@
|
|
|
1
1
|
import type { Person } from "./Person";
|
|
2
|
-
|
|
3
|
-
* A vote view for checking a post or comments votes.
|
|
4
|
-
*/
|
|
5
|
-
export type VoteView = {
|
|
2
|
+
export interface VoteView {
|
|
6
3
|
creator: Person;
|
|
7
|
-
creator_banned: boolean;
|
|
8
4
|
creator_banned_from_community: boolean;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
*/
|
|
12
|
-
is_upvote: boolean;
|
|
13
|
-
};
|
|
5
|
+
score: number;
|
|
6
|
+
}
|
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-merge-modlog-tables.
|
|
4
|
+
"version": "1.0.0-merge-modlog-tables.3",
|
|
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.
|
|
47
|
+
"packageManager": "pnpm@10.19.0",
|
|
48
48
|
"types": "./dist/index.d.ts",
|
|
49
49
|
"lint-staged": {
|
|
50
50
|
"*.{ts,tsx,js}": [
|