lemmy-js-client 1.0.0-post-tags.0 → 1.0.0-remove-page-limit.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/README.md +12 -3
- package/dist/http.d.ts +28 -28
- package/dist/http.js +703 -706
- package/dist/index.d.ts +16 -21
- package/dist/other_types.d.ts +3 -0
- package/dist/types/BannedPersonsResponse.d.ts +6 -0
- package/dist/types/Comment.d.ts +14 -0
- package/dist/types/CommentActions.d.ts +18 -0
- package/dist/types/CommentReplyView.d.ts +16 -11
- package/dist/types/CommentReport.d.ts +1 -0
- package/dist/types/CommentReportView.d.ts +8 -10
- package/dist/types/CommentSlimView.d.ts +12 -10
- package/dist/types/CommentView.d.ts +15 -10
- package/dist/types/Community.d.ts +25 -6
- package/dist/types/CommunityActions.d.ts +35 -0
- package/dist/types/CommunityReportResponse.d.ts +7 -0
- package/dist/types/CommunityReportView.d.ts +0 -4
- package/dist/types/CommunitySortType.d.ts +1 -1
- package/dist/types/CommunityView.d.ts +7 -6
- package/dist/types/CommunityVisibility.d.ts +1 -1
- package/dist/types/CreateCommentReport.d.ts +1 -0
- package/dist/types/CreateCommunityReport.d.ts +8 -0
- package/dist/types/CreateCommunityTag.d.ts +1 -2
- package/dist/types/CreatePostReport.d.ts +1 -0
- package/dist/types/CreateSite.d.ts +2 -1
- package/dist/types/EditPost.d.ts +2 -0
- package/dist/types/EditSite.d.ts +6 -3
- package/dist/types/FederationError.d.ts +1 -1
- package/dist/types/GetComments.d.ts +8 -1
- package/dist/types/GetCommentsResponse.d.ts +3 -0
- package/dist/types/GetCommentsSlimResponse.d.ts +3 -0
- package/dist/types/GetModlog.d.ts +27 -2
- package/dist/types/GetModlogResponse.d.ts +6 -0
- package/dist/types/GetPostResponse.d.ts +0 -2
- package/dist/types/GetPosts.d.ts +5 -5
- package/dist/types/GetPostsResponse.d.ts +1 -0
- package/dist/types/GetSiteResponse.d.ts +4 -2
- package/dist/types/ImageDetails.d.ts +1 -0
- package/dist/types/Instance.d.ts +9 -0
- package/dist/types/InstanceActions.d.ts +18 -0
- package/dist/types/InstanceWithFederationState.d.ts +9 -0
- package/dist/types/LemmyErrorType.d.ts +95 -24
- package/dist/types/ListBannedPersons.d.ts +9 -0
- package/dist/types/ListCommentLikes.d.ts +3 -1
- package/dist/types/ListCommentLikesResponse.d.ts +6 -0
- package/dist/types/ListCommunities.d.ts +8 -1
- package/dist/types/ListCommunitiesResponse.d.ts +6 -0
- package/dist/types/ListCommunityPendingFollows.d.ts +3 -1
- package/dist/types/ListCommunityPendingFollows.js +0 -1
- package/dist/types/ListCommunityPendingFollowsResponse.d.ts +6 -0
- package/dist/types/ListCustomEmojis.d.ts +0 -3
- package/dist/types/ListInbox.d.ts +3 -2
- package/dist/types/ListInboxResponse.d.ts +6 -0
- package/dist/types/ListMedia.d.ts +3 -1
- package/dist/types/ListMedia.js +0 -1
- package/dist/types/ListMediaResponse.d.ts +6 -0
- package/dist/types/ListPersonContent.d.ts +3 -2
- package/dist/types/ListPersonContentResponse.d.ts +6 -0
- package/dist/types/ListPersonSaved.d.ts +3 -2
- package/dist/types/ListPersonSavedResponse.d.ts +8 -2
- package/dist/types/ListPostLikes.d.ts +3 -1
- package/dist/types/ListPostLikesResponse.d.ts +6 -0
- package/dist/types/ListRegistrationApplications.d.ts +3 -1
- package/dist/types/ListRegistrationApplications.js +0 -1
- package/dist/types/ListRegistrationApplicationsResponse.d.ts +6 -0
- package/dist/types/ListReports.d.ts +11 -2
- package/dist/types/ListReportsResponse.d.ts +6 -0
- package/dist/types/ListTaglines.d.ts +3 -1
- package/dist/types/ListTaglines.js +0 -1
- package/dist/types/ListTaglinesResponse.d.ts +6 -0
- package/dist/types/LocalSite.d.ts +26 -3
- package/dist/types/LocalUser.d.ts +8 -0
- package/dist/types/LocalUserView.d.ts +2 -4
- package/dist/types/ModBan.d.ts +2 -0
- package/dist/types/ModChangeCommunityVisibility.d.ts +12 -0
- package/dist/types/ModChangeCommunityVisibilityId.d.ts +1 -0
- package/dist/types/ModChangeCommunityVisibilityView.d.ts +11 -0
- package/dist/types/ModlogActionType.d.ts +1 -1
- package/dist/types/ModlogCombinedView.d.ts +3 -3
- package/dist/types/MyUserInfo.d.ts +1 -0
- package/dist/types/PaginationCursor.d.ts +1 -4
- package/dist/types/PendingFollow.d.ts +2 -2
- package/dist/types/Person.d.ts +4 -10
- package/dist/types/PersonActions.d.ts +9 -0
- package/dist/types/PersonCommentMentionView.d.ts +14 -11
- package/dist/types/PersonPostMentionView.d.ts +16 -16
- package/dist/types/PersonSavedCombinedView.d.ts +7 -0
- package/dist/types/PersonView.d.ts +4 -2
- package/dist/types/PluginMetadata.d.ts +5 -0
- package/dist/types/Post.d.ts +15 -0
- package/dist/types/PostActions.d.ts +35 -0
- package/dist/types/PostReport.d.ts +1 -0
- package/dist/types/PostReportView.d.ts +8 -13
- package/dist/types/PostSortType.d.ts +1 -1
- package/dist/types/PostView.d.ts +15 -15
- package/dist/types/PrivateMessage.d.ts +1 -0
- package/dist/types/PrivateMessageReportView.d.ts +1 -1
- package/dist/types/ResendVerificationEmail.d.ts +7 -0
- package/dist/types/ResolveCommunityReport.d.ts +8 -0
- package/dist/types/ResolveCommunityReport.js +2 -0
- package/dist/types/SaveUserSettings.d.ts +5 -0
- package/dist/types/Search.d.ts +8 -2
- package/dist/types/SearchResponse.d.ts +6 -0
- package/dist/types/Site.d.ts +2 -2
- package/dist/types/SiteView.d.ts +2 -2
- package/dist/types/Tag.d.ts +8 -6
- package/dist/types/Tagline.d.ts +2 -1
- package/dist/types/Tagline.js +0 -1
- package/dist/types/{PostTags.d.ts → TagsView.d.ts} +1 -1
- package/dist/types/TagsView.js +2 -0
- package/dist/types/UpdateCommunityTag.d.ts +1 -1
- package/dist/types/VoteView.d.ts +1 -0
- package/package.json +6 -3
- package/dist/types/CommentAggregates.d.ts +0 -17
- package/dist/types/CommunityAggregates.d.ts +0 -30
- package/dist/types/CommunityTagResponse.d.ts +0 -7
- package/dist/types/InboxCombinedPaginationCursor.d.ts +0 -4
- package/dist/types/ListCommunityTags.d.ts +0 -7
- package/dist/types/ListCommunityTagsResponse.d.ts +0 -4
- package/dist/types/LocalUserVoteDisplayMode.d.ts +0 -9
- package/dist/types/ModHideCommunity.d.ts +0 -14
- package/dist/types/ModHideCommunityId.d.ts +0 -1
- package/dist/types/ModHideCommunityId.js +0 -3
- package/dist/types/ModHideCommunityView.d.ts +0 -11
- package/dist/types/ModlogCombinedPaginationCursor.d.ts +0 -4
- package/dist/types/ModlogCombinedPaginationCursor.js +0 -3
- package/dist/types/PersonAggregates.d.ts +0 -9
- package/dist/types/PersonContentCombinedPaginationCursor.d.ts +0 -4
- package/dist/types/PersonContentCombinedPaginationCursor.js +0 -3
- package/dist/types/PersonSavedCombinedPaginationCursor.d.ts +0 -4
- package/dist/types/PersonSavedCombinedPaginationCursor.js +0 -3
- package/dist/types/PostAggregates.d.ts +0 -18
- package/dist/types/ReportCombinedPaginationCursor.d.ts +0 -4
- package/dist/types/ReportCombinedPaginationCursor.js +0 -3
- package/dist/types/SearchCombinedPaginationCursor.d.ts +0 -4
- package/dist/types/SearchCombinedPaginationCursor.js +0 -3
- package/dist/types/SiteAggregates.d.ts +0 -27
- package/dist/types/SubscribedType.d.ts +0 -4
- package/dist/types/SubscribedType.js +0 -3
- package/dist/types/UpdatePostTags.d.ts +0 -9
- /package/dist/types/{CommentAggregates.js → CommentActions.js} +0 -0
- /package/dist/types/{CommunityAggregates.js → CommunityActions.js} +0 -0
- /package/dist/types/{CommunityTagResponse.js → CommunityReportResponse.js} +0 -0
- /package/dist/types/{ListCommunityTags.js → CreateCommunityReport.js} +0 -0
- /package/dist/types/{ListCommunityTagsResponse.js → InstanceActions.js} +0 -0
- /package/dist/types/{ModHideCommunity.js → ListBannedPersons.js} +0 -0
- /package/dist/types/{ModHideCommunityView.js → ModChangeCommunityVisibility.js} +0 -0
- /package/dist/types/{InboxCombinedPaginationCursor.js → ModChangeCommunityVisibilityId.js} +0 -0
- /package/dist/types/{PersonAggregates.js → ModChangeCommunityVisibilityView.js} +0 -0
- /package/dist/types/{PostAggregates.js → PersonActions.js} +0 -0
- /package/dist/types/{PostTags.js → PersonSavedCombinedView.js} +0 -0
- /package/dist/types/{LocalUserVoteDisplayMode.js → PluginMetadata.js} +0 -0
- /package/dist/types/{SiteAggregates.js → PostActions.js} +0 -0
- /package/dist/types/{UpdatePostTags.js → ResendVerificationEmail.js} +0 -0
@@ -1,7 +1,13 @@
|
|
1
|
-
import type {
|
1
|
+
import type { PaginationCursor } from "./PaginationCursor";
|
2
|
+
import type { PersonSavedCombinedView } from "./PersonSavedCombinedView";
|
2
3
|
/**
|
3
4
|
* A person's saved content response.
|
4
5
|
*/
|
5
6
|
export type ListPersonSavedResponse = {
|
6
|
-
saved: Array<
|
7
|
+
saved: Array<PersonSavedCombinedView>;
|
8
|
+
/**
|
9
|
+
* the pagination cursor to use to fetch the next page
|
10
|
+
*/
|
11
|
+
next_page?: PaginationCursor;
|
12
|
+
prev_page?: PaginationCursor;
|
7
13
|
};
|
@@ -1,9 +1,11 @@
|
|
1
|
+
import type { PaginationCursor } from "./PaginationCursor";
|
1
2
|
import type { PostId } from "./PostId";
|
2
3
|
/**
|
3
4
|
* List post likes. Admins-only.
|
4
5
|
*/
|
5
6
|
export type ListPostLikes = {
|
6
7
|
post_id: PostId;
|
7
|
-
|
8
|
+
page_cursor?: PaginationCursor;
|
9
|
+
page_back?: boolean;
|
8
10
|
limit?: number;
|
9
11
|
};
|
@@ -1,7 +1,13 @@
|
|
1
|
+
import type { PaginationCursor } from "./PaginationCursor";
|
1
2
|
import type { VoteView } from "./VoteView";
|
2
3
|
/**
|
3
4
|
* The post likes response
|
4
5
|
*/
|
5
6
|
export type ListPostLikesResponse = {
|
6
7
|
post_likes: Array<VoteView>;
|
8
|
+
/**
|
9
|
+
* the pagination cursor to use to fetch the next page
|
10
|
+
*/
|
11
|
+
next_page?: PaginationCursor;
|
12
|
+
prev_page?: PaginationCursor;
|
7
13
|
};
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import type { PaginationCursor } from "./PaginationCursor";
|
1
2
|
/**
|
2
3
|
* Fetches a list of registration applications.
|
3
4
|
*/
|
@@ -6,6 +7,7 @@ export type ListRegistrationApplications = {
|
|
6
7
|
* Only shows the unread applications (IE those without an admin actor)
|
7
8
|
*/
|
8
9
|
unread_only?: boolean;
|
9
|
-
|
10
|
+
page_cursor?: PaginationCursor;
|
11
|
+
page_back?: boolean;
|
10
12
|
limit?: number;
|
11
13
|
};
|
@@ -1,7 +1,13 @@
|
|
1
|
+
import type { PaginationCursor } from "./PaginationCursor";
|
1
2
|
import type { RegistrationApplicationView } from "./RegistrationApplicationView";
|
2
3
|
/**
|
3
4
|
* The list of registration applications.
|
4
5
|
*/
|
5
6
|
export type ListRegistrationApplicationsResponse = {
|
6
7
|
registration_applications: Array<RegistrationApplicationView>;
|
8
|
+
/**
|
9
|
+
* the pagination cursor to use to fetch the next page
|
10
|
+
*/
|
11
|
+
next_page?: PaginationCursor;
|
12
|
+
prev_page?: PaginationCursor;
|
7
13
|
};
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import type { CommunityId } from "./CommunityId";
|
2
|
+
import type { PaginationCursor } from "./PaginationCursor";
|
2
3
|
import type { PostId } from "./PostId";
|
3
|
-
import type { ReportCombinedPaginationCursor } from "./ReportCombinedPaginationCursor";
|
4
4
|
import type { ReportType } from "./ReportType";
|
5
5
|
/**
|
6
6
|
* List reports.
|
@@ -22,6 +22,15 @@ export type ListReports = {
|
|
22
22
|
* if no community is given, it returns reports for all communities moderated by the auth user
|
23
23
|
*/
|
24
24
|
community_id?: CommunityId;
|
25
|
-
page_cursor?:
|
25
|
+
page_cursor?: PaginationCursor;
|
26
26
|
page_back?: boolean;
|
27
|
+
limit?: number;
|
28
|
+
/**
|
29
|
+
* Only for admins: also show reports with `violates_instance_rules=false`
|
30
|
+
*/
|
31
|
+
show_community_rule_violations?: boolean;
|
32
|
+
/**
|
33
|
+
* If true, view all your created reports. Works for non-admins/mods also.
|
34
|
+
*/
|
35
|
+
my_reports_only?: boolean;
|
27
36
|
};
|
@@ -1,7 +1,13 @@
|
|
1
|
+
import type { PaginationCursor } from "./PaginationCursor";
|
1
2
|
import type { ReportCombinedView } from "./ReportCombinedView";
|
2
3
|
/**
|
3
4
|
* The post reports response.
|
4
5
|
*/
|
5
6
|
export type ListReportsResponse = {
|
6
7
|
reports: Array<ReportCombinedView>;
|
8
|
+
/**
|
9
|
+
* the pagination cursor to use to fetch the next page
|
10
|
+
*/
|
11
|
+
next_page?: PaginationCursor;
|
12
|
+
prev_page?: PaginationCursor;
|
7
13
|
};
|
@@ -1,7 +1,13 @@
|
|
1
|
+
import type { PaginationCursor } from "./PaginationCursor";
|
1
2
|
import type { Tagline } from "./Tagline";
|
2
3
|
/**
|
3
4
|
* A response for taglines.
|
4
5
|
*/
|
5
6
|
export type ListTaglinesResponse = {
|
6
7
|
taglines: Array<Tagline>;
|
8
|
+
/**
|
9
|
+
* the pagination cursor to use to fetch the next page
|
10
|
+
*/
|
11
|
+
next_page?: PaginationCursor;
|
12
|
+
prev_page?: PaginationCursor;
|
7
13
|
};
|
@@ -114,8 +114,31 @@ export type LocalSite = {
|
|
114
114
|
*/
|
115
115
|
comment_downvotes: FederationMode;
|
116
116
|
/**
|
117
|
-
*
|
118
|
-
* donations.
|
117
|
+
* A default time range limit to apply to post sorts, in seconds.
|
119
118
|
*/
|
120
|
-
|
119
|
+
default_post_time_range_seconds?: number;
|
120
|
+
/**
|
121
|
+
* Block NSFW content being created
|
122
|
+
*/
|
123
|
+
disallow_nsfw_content: boolean;
|
124
|
+
users: number;
|
125
|
+
posts: number;
|
126
|
+
comments: number;
|
127
|
+
communities: number;
|
128
|
+
/**
|
129
|
+
* The number of users with any activity in the last day.
|
130
|
+
*/
|
131
|
+
users_active_day: number;
|
132
|
+
/**
|
133
|
+
* The number of users with any activity in the last week.
|
134
|
+
*/
|
135
|
+
users_active_week: number;
|
136
|
+
/**
|
137
|
+
* The number of users with any activity in the last month.
|
138
|
+
*/
|
139
|
+
users_active_month: number;
|
140
|
+
/**
|
141
|
+
* The number of users with any activity in the last half year.
|
142
|
+
*/
|
143
|
+
users_active_half_year: number;
|
121
144
|
};
|
@@ -93,4 +93,12 @@ export type LocalUser = {
|
|
93
93
|
* Whether to hide posts containing images/videos
|
94
94
|
*/
|
95
95
|
hide_media: boolean;
|
96
|
+
/**
|
97
|
+
* A default time range limit to apply to post sorts, in seconds.
|
98
|
+
*/
|
99
|
+
default_post_time_range_seconds?: number;
|
100
|
+
show_score: boolean;
|
101
|
+
show_upvotes: boolean;
|
102
|
+
show_downvotes: boolean;
|
103
|
+
show_upvote_percentage: boolean;
|
96
104
|
};
|
@@ -1,13 +1,11 @@
|
|
1
|
+
import type { InstanceActions } from "./InstanceActions";
|
1
2
|
import type { LocalUser } from "./LocalUser";
|
2
|
-
import type { LocalUserVoteDisplayMode } from "./LocalUserVoteDisplayMode";
|
3
3
|
import type { Person } from "./Person";
|
4
|
-
import type { PersonAggregates } from "./PersonAggregates";
|
5
4
|
/**
|
6
5
|
* A local user view.
|
7
6
|
*/
|
8
7
|
export type LocalUserView = {
|
9
8
|
local_user: LocalUser;
|
10
|
-
local_user_vote_display_mode: LocalUserVoteDisplayMode;
|
11
9
|
person: Person;
|
12
|
-
|
10
|
+
instance_actions?: InstanceActions;
|
13
11
|
};
|
package/dist/types/ModBan.d.ts
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
import type { InstanceId } from "./InstanceId";
|
1
2
|
import type { ModBanId } from "./ModBanId";
|
2
3
|
import type { PersonId } from "./PersonId";
|
3
4
|
/**
|
@@ -11,4 +12,5 @@ export type ModBan = {
|
|
11
12
|
banned: boolean;
|
12
13
|
expires?: string;
|
13
14
|
published: string;
|
15
|
+
instance_id: InstanceId;
|
14
16
|
};
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import type { CommunityId } from "./CommunityId";
|
2
|
+
import type { CommunityVisibility } from "./CommunityVisibility";
|
3
|
+
import type { ModChangeCommunityVisibilityId } from "./ModChangeCommunityVisibilityId";
|
4
|
+
import type { PersonId } from "./PersonId";
|
5
|
+
export type ModChangeCommunityVisibility = {
|
6
|
+
id: ModChangeCommunityVisibilityId;
|
7
|
+
community_id: CommunityId;
|
8
|
+
mod_person_id: PersonId;
|
9
|
+
published: string;
|
10
|
+
reason?: string;
|
11
|
+
visibility: CommunityVisibility;
|
12
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
export type ModChangeCommunityVisibilityId = number;
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import type { Community } from "./Community";
|
2
|
+
import type { ModChangeCommunityVisibility } from "./ModChangeCommunityVisibility";
|
3
|
+
import type { Person } from "./Person";
|
4
|
+
/**
|
5
|
+
* When the visibility of a community is changed
|
6
|
+
*/
|
7
|
+
export type ModChangeCommunityVisibilityView = {
|
8
|
+
mod_change_community_visibility: ModChangeCommunityVisibility;
|
9
|
+
moderator?: Person;
|
10
|
+
community: Community;
|
11
|
+
};
|
@@ -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" | "ModRemoveCommunity" | "ModBanFromCommunity" | "ModAddCommunity" | "ModTransferCommunity" | "ModAdd" | "ModBan" | "
|
4
|
+
export type ModlogActionType = "All" | "ModRemovePost" | "ModLockPost" | "ModFeaturePost" | "ModRemoveComment" | "ModRemoveCommunity" | "ModBanFromCommunity" | "ModAddCommunity" | "ModTransferCommunity" | "ModAdd" | "ModBan" | "ModChangeCommunityVisibility" | "AdminPurgePerson" | "AdminPurgeCommunity" | "AdminPurgePost" | "AdminPurgeComment" | "AdminBlockInstance" | "AdminAllowInstance";
|
@@ -8,8 +8,8 @@ import type { ModAddCommunityView } from "./ModAddCommunityView";
|
|
8
8
|
import type { ModAddView } from "./ModAddView";
|
9
9
|
import type { ModBanFromCommunityView } from "./ModBanFromCommunityView";
|
10
10
|
import type { ModBanView } from "./ModBanView";
|
11
|
+
import type { ModChangeCommunityVisibilityView } from "./ModChangeCommunityVisibilityView";
|
11
12
|
import type { ModFeaturePostView } from "./ModFeaturePostView";
|
12
|
-
import type { ModHideCommunityView } from "./ModHideCommunityView";
|
13
13
|
import type { ModLockPostView } from "./ModLockPostView";
|
14
14
|
import type { ModRemoveCommentView } from "./ModRemoveCommentView";
|
15
15
|
import type { ModRemoveCommunityView } from "./ModRemoveCommunityView";
|
@@ -38,8 +38,8 @@ export type ModlogCombinedView = ({
|
|
38
38
|
} & ModBanFromCommunityView) | ({
|
39
39
|
type_: "ModFeaturePost";
|
40
40
|
} & ModFeaturePostView) | ({
|
41
|
-
type_: "
|
42
|
-
} &
|
41
|
+
type_: "ModChangeCommunityVisibility";
|
42
|
+
} & ModChangeCommunityVisibilityView) | ({
|
43
43
|
type_: "ModLockPost";
|
44
44
|
} & ModLockPostView) | ({
|
45
45
|
type_: "ModRemoveComment";
|
@@ -1,7 +1,4 @@
|
|
1
1
|
/**
|
2
|
-
*
|
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
|
2
|
+
* A pagination cursor
|
6
3
|
*/
|
7
4
|
export type PaginationCursor = string;
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import type { Community } from "./Community";
|
2
|
+
import type { CommunityFollowerState } from "./CommunityFollowerState";
|
2
3
|
import type { Person } from "./Person";
|
3
|
-
import type { SubscribedType } from "./SubscribedType";
|
4
4
|
export type PendingFollow = {
|
5
5
|
person: Person;
|
6
6
|
community: Community;
|
7
7
|
is_new_instance: boolean;
|
8
|
-
|
8
|
+
follow_state?: CommunityFollowerState;
|
9
9
|
};
|
package/dist/types/Person.d.ts
CHANGED
@@ -15,16 +15,12 @@ export type Person = {
|
|
15
15
|
* A URL for an avatar.
|
16
16
|
*/
|
17
17
|
avatar?: DbUrl;
|
18
|
-
/**
|
19
|
-
* Whether the person is banned.
|
20
|
-
*/
|
21
|
-
banned: boolean;
|
22
18
|
published: string;
|
23
19
|
updated?: string;
|
24
20
|
/**
|
25
|
-
* The federated
|
21
|
+
* The federated ap_id.
|
26
22
|
*/
|
27
|
-
|
23
|
+
ap_id: DbUrl;
|
28
24
|
/**
|
29
25
|
* An optional bio, in markdown.
|
30
26
|
*/
|
@@ -49,9 +45,7 @@ export type Person = {
|
|
49
45
|
* Whether the person is a bot account.
|
50
46
|
*/
|
51
47
|
bot_account: boolean;
|
52
|
-
/**
|
53
|
-
* When their ban, if it exists, expires, if at all.
|
54
|
-
*/
|
55
|
-
ban_expires?: string;
|
56
48
|
instance_id: InstanceId;
|
49
|
+
post_count: number;
|
50
|
+
comment_count: number;
|
57
51
|
};
|
@@ -1,27 +1,30 @@
|
|
1
1
|
import type { Comment } from "./Comment";
|
2
|
-
import type {
|
2
|
+
import type { CommentActions } from "./CommentActions";
|
3
3
|
import type { Community } from "./Community";
|
4
|
+
import type { CommunityActions } from "./CommunityActions";
|
5
|
+
import type { InstanceActions } from "./InstanceActions";
|
4
6
|
import type { Person } from "./Person";
|
7
|
+
import type { PersonActions } from "./PersonActions";
|
5
8
|
import type { PersonCommentMention } from "./PersonCommentMention";
|
6
9
|
import type { Post } from "./Post";
|
7
|
-
import type { SubscribedType } from "./SubscribedType";
|
8
10
|
/**
|
9
11
|
* A person comment mention view.
|
10
12
|
*/
|
11
13
|
export type PersonCommentMentionView = {
|
12
14
|
person_comment_mention: PersonCommentMention;
|
15
|
+
recipient: Person;
|
13
16
|
comment: Comment;
|
14
17
|
creator: Person;
|
15
18
|
post: Post;
|
16
19
|
community: Community;
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
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;
|
22
27
|
creator_is_admin: boolean;
|
23
|
-
|
24
|
-
|
25
|
-
creator_blocked: boolean;
|
26
|
-
my_vote?: number;
|
28
|
+
can_mod: boolean;
|
29
|
+
creator_banned: boolean;
|
27
30
|
};
|
@@ -1,32 +1,32 @@
|
|
1
1
|
import type { Community } from "./Community";
|
2
|
+
import type { CommunityActions } from "./CommunityActions";
|
2
3
|
import type { ImageDetails } from "./ImageDetails";
|
4
|
+
import type { InstanceActions } from "./InstanceActions";
|
3
5
|
import type { Person } from "./Person";
|
6
|
+
import type { PersonActions } from "./PersonActions";
|
4
7
|
import type { PersonPostMention } from "./PersonPostMention";
|
5
8
|
import type { Post } from "./Post";
|
6
|
-
import type {
|
7
|
-
import type {
|
8
|
-
import type { SubscribedType } from "./SubscribedType";
|
9
|
+
import type { PostActions } from "./PostActions";
|
10
|
+
import type { TagsView } from "./TagsView";
|
9
11
|
/**
|
10
12
|
* A person post mention view.
|
11
13
|
*/
|
12
14
|
export type PersonPostMentionView = {
|
13
15
|
person_post_mention: PersonPostMention;
|
16
|
+
recipient: Person;
|
14
17
|
post: Post;
|
15
18
|
creator: Person;
|
16
19
|
community: Community;
|
17
20
|
image_details?: ImageDetails;
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
21
|
+
community_actions?: CommunityActions;
|
22
|
+
person_actions?: PersonActions;
|
23
|
+
post_actions?: PostActions;
|
24
|
+
instance_actions?: InstanceActions;
|
25
|
+
creator_home_instance_actions?: InstanceActions;
|
26
|
+
creator_local_instance_actions?: InstanceActions;
|
27
|
+
creator_community_actions?: CommunityActions;
|
28
|
+
post_tags: TagsView;
|
23
29
|
creator_is_admin: boolean;
|
24
|
-
|
25
|
-
|
26
|
-
read: boolean;
|
27
|
-
hidden: boolean;
|
28
|
-
creator_blocked: boolean;
|
29
|
-
my_vote?: number;
|
30
|
-
unread_comments: number;
|
31
|
-
post_tags: PostTags;
|
30
|
+
can_mod: boolean;
|
31
|
+
creator_banned: boolean;
|
32
32
|
};
|
@@ -1,10 +1,12 @@
|
|
1
|
+
import type { InstanceActions } from "./InstanceActions";
|
1
2
|
import type { Person } from "./Person";
|
2
|
-
import type { PersonAggregates } from "./PersonAggregates";
|
3
3
|
/**
|
4
4
|
* A person view.
|
5
5
|
*/
|
6
6
|
export type PersonView = {
|
7
7
|
person: Person;
|
8
|
-
counts: PersonAggregates;
|
9
8
|
is_admin: boolean;
|
9
|
+
home_instance_actions?: InstanceActions;
|
10
|
+
local_instance_actions?: InstanceActions;
|
11
|
+
creator_banned: boolean;
|
10
12
|
};
|
package/dist/types/Post.d.ts
CHANGED
@@ -79,4 +79,19 @@ export type Post = {
|
|
79
79
|
* Time at which the post will be published. None means publish immediately.
|
80
80
|
*/
|
81
81
|
scheduled_publish_time?: string;
|
82
|
+
comments: number;
|
83
|
+
score: number;
|
84
|
+
upvotes: number;
|
85
|
+
downvotes: number;
|
86
|
+
/**
|
87
|
+
* The time of the newest comment in the post.
|
88
|
+
*/
|
89
|
+
newest_comment_time: string;
|
90
|
+
report_count: number;
|
91
|
+
unresolved_report_count: number;
|
92
|
+
/**
|
93
|
+
* If a local user posts in a remote community, the comment is hidden until it is confirmed
|
94
|
+
* accepted by the community (by receiving it back via federation).
|
95
|
+
*/
|
96
|
+
federation_pending: boolean;
|
82
97
|
};
|
@@ -0,0 +1,35 @@
|
|
1
|
+
import type { PersonId } from "./PersonId";
|
2
|
+
import type { PostId } from "./PostId";
|
3
|
+
export type PostActions = {
|
4
|
+
post_id: PostId;
|
5
|
+
person_id: PersonId;
|
6
|
+
/**
|
7
|
+
* When the post was read.
|
8
|
+
*/
|
9
|
+
read?: string;
|
10
|
+
/**
|
11
|
+
* When was the last time you read the comments.
|
12
|
+
*/
|
13
|
+
read_comments?: string;
|
14
|
+
/**
|
15
|
+
* The number of comments you read last. Subtract this from total comments to get an unread
|
16
|
+
* count.
|
17
|
+
*/
|
18
|
+
read_comments_amount?: number;
|
19
|
+
/**
|
20
|
+
* When the post was saved.
|
21
|
+
*/
|
22
|
+
saved?: string;
|
23
|
+
/**
|
24
|
+
* When the post was liked.
|
25
|
+
*/
|
26
|
+
liked?: string;
|
27
|
+
/**
|
28
|
+
* The like / score of the post.
|
29
|
+
*/
|
30
|
+
like_score?: number;
|
31
|
+
/**
|
32
|
+
* When the post was hidden.
|
33
|
+
*/
|
34
|
+
hidden?: string;
|
35
|
+
};
|
@@ -1,9 +1,10 @@
|
|
1
1
|
import type { Community } from "./Community";
|
2
|
+
import type { CommunityActions } from "./CommunityActions";
|
2
3
|
import type { Person } from "./Person";
|
4
|
+
import type { PersonActions } from "./PersonActions";
|
3
5
|
import type { Post } from "./Post";
|
4
|
-
import type {
|
6
|
+
import type { PostActions } from "./PostActions";
|
5
7
|
import type { PostReport } from "./PostReport";
|
6
|
-
import type { SubscribedType } from "./SubscribedType";
|
7
8
|
/**
|
8
9
|
* A post report view.
|
9
10
|
*/
|
@@ -13,16 +14,10 @@ export type PostReportView = {
|
|
13
14
|
community: Community;
|
14
15
|
creator: Person;
|
15
16
|
post_creator: Person;
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
saved: boolean;
|
21
|
-
read: boolean;
|
22
|
-
hidden: boolean;
|
23
|
-
creator_blocked: boolean;
|
24
|
-
my_vote?: number;
|
25
|
-
unread_comments: number;
|
26
|
-
counts: PostAggregates;
|
17
|
+
creator_community_actions?: CommunityActions;
|
18
|
+
community_actions?: CommunityActions;
|
19
|
+
post_actions?: PostActions;
|
20
|
+
person_actions?: PersonActions;
|
27
21
|
resolver?: Person;
|
22
|
+
creator_is_admin: boolean;
|
28
23
|
};
|
@@ -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" | "
|
4
|
+
export type PostSortType = "Active" | "Hot" | "New" | "Old" | "Top" | "MostComments" | "NewComments" | "Controversial" | "Scaled";
|
package/dist/types/PostView.d.ts
CHANGED
@@ -1,10 +1,12 @@
|
|
1
1
|
import type { Community } from "./Community";
|
2
|
+
import type { CommunityActions } from "./CommunityActions";
|
2
3
|
import type { ImageDetails } from "./ImageDetails";
|
4
|
+
import type { InstanceActions } from "./InstanceActions";
|
3
5
|
import type { Person } from "./Person";
|
6
|
+
import type { PersonActions } from "./PersonActions";
|
4
7
|
import type { Post } from "./Post";
|
5
|
-
import type {
|
6
|
-
import type {
|
7
|
-
import type { SubscribedType } from "./SubscribedType";
|
8
|
+
import type { PostActions } from "./PostActions";
|
9
|
+
import type { TagsView } from "./TagsView";
|
8
10
|
/**
|
9
11
|
* A post view.
|
10
12
|
*/
|
@@ -13,17 +15,15 @@ export type PostView = {
|
|
13
15
|
creator: Person;
|
14
16
|
community: Community;
|
15
17
|
image_details?: ImageDetails;
|
16
|
-
|
17
|
-
|
18
|
-
|
18
|
+
community_actions?: CommunityActions;
|
19
|
+
person_actions?: PersonActions;
|
20
|
+
post_actions?: PostActions;
|
21
|
+
instance_actions?: InstanceActions;
|
22
|
+
creator_home_instance_actions?: InstanceActions;
|
23
|
+
creator_local_instance_actions?: InstanceActions;
|
24
|
+
creator_community_actions?: CommunityActions;
|
19
25
|
creator_is_admin: boolean;
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
read: boolean;
|
24
|
-
hidden: boolean;
|
25
|
-
creator_blocked: boolean;
|
26
|
-
my_vote?: number;
|
27
|
-
unread_comments: number;
|
28
|
-
tags: PostTags;
|
26
|
+
tags: TagsView;
|
27
|
+
can_mod: boolean;
|
28
|
+
creator_banned: boolean;
|
29
29
|
};
|