lemmy-js-client 1.0.0-post-tags.0 → 1.0.0-post-notifications.1
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 +99 -59
- package/dist/http.js +1002 -870
- package/dist/index.d.ts +55 -30
- package/dist/other_types.d.ts +21 -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/AdminListUsers.d.ts +7 -0
- package/dist/types/AdminListUsersResponse.d.ts +10 -0
- 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 +16 -2
- package/dist/types/CommentActions.d.ts +14 -0
- package/dist/types/CommentReply.d.ts +1 -1
- package/dist/types/CommentReport.d.ts +3 -2
- package/dist/types/CommentReportView.d.ts +7 -10
- package/dist/types/CommentResponse.d.ts +0 -2
- package/dist/types/CommentSlimView.d.ts +10 -10
- package/dist/types/CommentView.d.ts +14 -10
- package/dist/types/Community.d.ts +27 -8
- package/dist/types/CommunityActions.d.ts +29 -0
- package/dist/types/CommunityIdQuery.d.ts +8 -0
- package/dist/types/CommunityNotificationsMode.d.ts +4 -0
- package/dist/types/CommunityReport.d.ts +2 -2
- 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/CreateMultiCommunity.d.ts +5 -0
- package/dist/types/CreateOrDeleteMultiCommunityEntry.d.ts +6 -0
- package/dist/types/CreatePost.d.ts +1 -1
- package/dist/types/CreatePostReport.d.ts +1 -0
- package/dist/types/CreateSite.d.ts +19 -14
- package/dist/types/CustomEmoji.d.ts +2 -2
- package/dist/types/EditPost.d.ts +3 -1
- package/dist/types/EditSite.d.ts +32 -19
- package/dist/types/ExportDataResponse.d.ts +13 -0
- package/dist/types/FederationBlockList.d.ts +3 -3
- package/dist/types/FederationError.d.ts +1 -1
- package/dist/types/FollowMultiCommunity.d.ts +5 -0
- package/dist/types/GetComments.d.ts +8 -3
- 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/GetMultiCommunity.d.ts +4 -0
- package/dist/types/GetMultiCommunityResponse.d.ts +6 -0
- package/dist/types/GetPostResponse.d.ts +0 -2
- package/dist/types/GetPosts.d.ts +7 -7
- 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/InboxDataType.d.ts +1 -1
- package/dist/types/Instance.d.ts +13 -3
- package/dist/types/InstanceActions.d.ts +14 -0
- package/dist/types/InstanceWithFederationState.d.ts +11 -2
- package/dist/types/LemmyErrorType.d.ts +95 -28
- package/dist/types/LikeType.d.ts +4 -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 +8 -2
- 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/ListMultiCommunities.d.ts +5 -0
- package/dist/types/ListMultiCommunitiesResponse.d.ts +4 -0
- package/dist/types/ListPersonContent.d.ts +3 -2
- package/dist/types/ListPersonContentResponse.d.ts +6 -0
- package/dist/types/ListPersonHidden.d.ts +9 -0
- package/dist/types/ListPersonHiddenResponse.d.ts +13 -0
- package/dist/types/ListPersonLiked.d.ts +13 -0
- package/dist/types/ListPersonLikedResponse.d.ts +13 -0
- package/dist/types/ListPersonRead.d.ts +9 -0
- package/dist/types/ListPersonReadResponse.d.ts +13 -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/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 +36 -9
- package/dist/types/LocalSiteRateLimit.d.ts +16 -16
- package/dist/types/LocalSiteUrlBlocklist.d.ts +2 -2
- package/dist/types/LocalUser.d.ts +11 -1
- package/dist/types/LocalUserView.d.ts +1 -4
- package/dist/types/LockPost.d.ts +1 -0
- package/dist/types/Login.d.ts +3 -0
- package/dist/types/LoginToken.d.ts +1 -1
- package/dist/types/MarkNotificationAsRead.d.ts +8 -0
- package/dist/types/ModAdd.d.ts +1 -1
- package/dist/types/ModAddCommunity.d.ts +1 -1
- package/dist/types/ModBan.d.ts +4 -2
- package/dist/types/ModBanFromCommunity.d.ts +2 -2
- package/dist/types/ModChangeCommunityVisibility.d.ts +11 -0
- package/dist/types/ModChangeCommunityVisibilityId.d.ts +1 -0
- package/dist/types/ModChangeCommunityVisibilityView.d.ts +11 -0
- package/dist/types/ModChangeCommunityVisibilityView.js +2 -0
- package/dist/types/ModFeaturePost.d.ts +1 -1
- package/dist/types/ModLockPost.d.ts +2 -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/ModlogActionType.d.ts +1 -1
- package/dist/types/ModlogCombinedView.d.ts +3 -3
- 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/MultiCommunityView.d.ts +6 -0
- package/dist/types/MultiCommunityView.js +2 -0
- package/dist/types/MyUserInfo.d.ts +1 -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/NotificationData.d.ts +17 -0
- package/dist/types/NotificationData.js +2 -0
- package/dist/types/NotificationId.d.ts +1 -0
- package/dist/types/NotificationTypes.d.ts +4 -0
- package/dist/types/NotificationView.d.ts +30 -0
- 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/PaginationCursor.d.ts +1 -4
- package/dist/types/PendingFollow.d.ts +2 -2
- package/dist/types/Person.d.ts +6 -12
- package/dist/types/PersonActions.d.ts +26 -0
- package/dist/types/PersonActions.js +3 -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/PersonSavedCombinedView.d.ts +7 -0
- package/dist/types/PersonSavedCombinedView.js +2 -0
- package/dist/types/PersonView.d.ts +3 -2
- package/dist/types/PluginMetadata.d.ts +5 -0
- package/dist/types/PluginMetadata.js +3 -0
- package/dist/types/Post.d.ts +18 -3
- package/dist/types/PostActions.d.ts +33 -0
- package/dist/types/PostActions.js +2 -0
- package/dist/types/PostNotificationsMode.d.ts +4 -0
- package/dist/types/PostNotificationsMode.js +3 -0
- package/dist/types/PostOrCommentOrPrivateMessage.d.ts +10 -0
- package/dist/types/PostOrCommentOrPrivateMessage.js +2 -0
- package/dist/types/PostReport.d.ts +3 -2
- package/dist/types/PostReportView.d.ts +7 -13
- package/dist/types/PostSortType.d.ts +1 -1
- package/dist/types/PostView.d.ts +14 -15
- package/dist/types/PrivateMessage.d.ts +3 -2
- package/dist/types/PrivateMessageReport.d.ts +2 -2
- package/dist/types/PrivateMessageReportView.d.ts +1 -1
- package/dist/types/ReadableFederationState.d.ts +2 -2
- package/dist/types/RegistrationApplication.d.ts +1 -1
- package/dist/types/ResendVerificationEmail.d.ts +7 -0
- package/dist/types/ResendVerificationEmail.js +2 -0
- package/dist/types/ResolveCommunityReport.d.ts +8 -0
- package/dist/types/ResolveCommunityReport.js +2 -0
- package/dist/types/SaveUserSettings.d.ts +11 -1
- package/dist/types/Search.d.ts +13 -3
- package/dist/types/SearchCombinedView.d.ts +4 -1
- package/dist/types/SearchResponse.d.ts +6 -0
- package/dist/types/SearchType.d.ts +1 -1
- package/dist/types/Site.d.ts +6 -5
- package/dist/types/SiteResponse.d.ts +0 -4
- package/dist/types/SiteView.d.ts +2 -2
- package/dist/types/Tag.d.ts +10 -8
- package/dist/types/Tagline.d.ts +4 -3
- 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/UpdateCommunityNotifications.d.ts +9 -0
- package/dist/types/UpdateCommunityNotifications.js +2 -0
- package/dist/types/UpdateCommunityTag.d.ts +1 -1
- 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/VoteShow.d.ts +4 -0
- package/dist/types/VoteShow.js +3 -0
- package/package.json +8 -5
- package/dist/types/BannedPersonsResponse.d.ts +0 -7
- package/dist/types/CommentAggregates.d.ts +0 -17
- package/dist/types/CommentReplyView.d.ts +0 -27
- 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/InboxCombinedView.d.ts +0 -13
- 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/MarkCommentReplyAsRead.d.ts +0 -8
- package/dist/types/MarkPersonCommentMentionAsRead.d.ts +0 -8
- package/dist/types/MarkPersonPostMentionAsRead.d.ts +0 -8
- package/dist/types/ModHideCommunity.d.ts +0 -14
- package/dist/types/ModHideCommunityId.d.ts +0 -1
- package/dist/types/ModHideCommunityView.d.ts +0 -11
- package/dist/types/ModlogCombinedPaginationCursor.d.ts +0 -4
- package/dist/types/PersonAggregates.d.ts +0 -9
- package/dist/types/PersonCommentMentionView.d.ts +0 -27
- package/dist/types/PersonContentCombinedPaginationCursor.d.ts +0 -4
- package/dist/types/PersonPostMentionView.d.ts +0 -32
- package/dist/types/PersonSavedCombinedPaginationCursor.d.ts +0 -4
- package/dist/types/PostAggregates.d.ts +0 -18
- package/dist/types/ReportCombinedPaginationCursor.d.ts +0 -4
- package/dist/types/ResolveObjectResponse.d.ts +0 -13
- package/dist/types/SearchCombinedPaginationCursor.d.ts +0 -4
- package/dist/types/SiteAggregates.d.ts +0 -27
- package/dist/types/SubscribedType.d.ts +0 -4
- package/dist/types/UpdatePostTags.d.ts +0 -9
- /package/dist/types/{BannedPersonsResponse.js → AdminListUsers.js} +0 -0
- /package/dist/types/{CommentAggregates.js → AdminListUsersResponse.js} +0 -0
- /package/dist/types/{InboxCombinedPaginationCursor.js → CommentActions.js} +0 -0
- /package/dist/types/{CommentReplyView.js → CommunityActions.js} +0 -0
- /package/dist/types/{CommunityAggregates.js → CommunityIdQuery.js} +0 -0
- /package/dist/types/{LocalUserVoteDisplayMode.js → CommunityNotificationsMode.js} +0 -0
- /package/dist/types/{CommunityTagResponse.js → CommunityReportResponse.js} +0 -0
- /package/dist/types/{InboxCombinedView.js → CreateCommunityReport.js} +0 -0
- /package/dist/types/{ModHideCommunityId.js → CreateMultiCommunity.js} +0 -0
- /package/dist/types/{ListCommunityTags.js → CreateOrDeleteMultiCommunityEntry.js} +0 -0
- /package/dist/types/{ListCommunityTagsResponse.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/{ModlogCombinedPaginationCursor.js → InstanceActions.js} +0 -0
- /package/dist/types/{PersonContentCombinedPaginationCursor.js → LikeType.js} +0 -0
- /package/dist/types/{ModHideCommunity.js → ListMultiCommunities.js} +0 -0
- /package/dist/types/{ModHideCommunityView.js → ListMultiCommunitiesResponse.js} +0 -0
- /package/dist/types/{PersonAggregates.js → ListPersonHidden.js} +0 -0
- /package/dist/types/{PersonCommentMentionView.js → ListPersonHiddenResponse.js} +0 -0
- /package/dist/types/{PersonPostMentionView.js → ListPersonLiked.js} +0 -0
- /package/dist/types/{PostAggregates.js → ListPersonLikedResponse.js} +0 -0
- /package/dist/types/{PostTags.js → ListPersonRead.js} +0 -0
- /package/dist/types/{ResolveObjectResponse.js → ListPersonReadResponse.js} +0 -0
- /package/dist/types/{SiteAggregates.js → MarkNotificationAsRead.js} +0 -0
- /package/dist/types/{UpdatePostTags.js → ModChangeCommunityVisibility.js} +0 -0
- /package/dist/types/{PersonSavedCombinedPaginationCursor.js → ModChangeCommunityVisibilityId.js} +0 -0
- /package/dist/types/{ReportCombinedPaginationCursor.js → MultiCommunityId.js} +0 -0
- /package/dist/types/{SearchCombinedPaginationCursor.js → NotificationId.js} +0 -0
- /package/dist/types/{SubscribedType.js → NotificationTypes.js} +0 -0
@@ -20,8 +20,8 @@ export type Community = {
|
|
20
20
|
* Whether the community is removed by a mod.
|
21
21
|
*/
|
22
22
|
removed: boolean;
|
23
|
-
|
24
|
-
|
23
|
+
published_at: string;
|
24
|
+
updated_at?: string;
|
25
25
|
/**
|
26
26
|
* Whether the community has been deleted by its creator.
|
27
27
|
*/
|
@@ -31,9 +31,9 @@ export type Community = {
|
|
31
31
|
*/
|
32
32
|
nsfw: boolean;
|
33
33
|
/**
|
34
|
-
* The federated
|
34
|
+
* The federated ap_id.
|
35
35
|
*/
|
36
|
-
|
36
|
+
ap_id: DbUrl;
|
37
37
|
/**
|
38
38
|
* Whether the community is local.
|
39
39
|
*/
|
@@ -46,10 +46,6 @@ export type Community = {
|
|
46
46
|
* A URL for a banner.
|
47
47
|
*/
|
48
48
|
banner?: DbUrl;
|
49
|
-
/**
|
50
|
-
* Whether the community is hidden.
|
51
|
-
*/
|
52
|
-
hidden: boolean;
|
53
49
|
/**
|
54
50
|
* Whether posting is restricted to mods only.
|
55
51
|
*/
|
@@ -60,4 +56,27 @@ export type Community = {
|
|
60
56
|
* A shorter, one-line description of the site.
|
61
57
|
*/
|
62
58
|
description?: string;
|
59
|
+
subscribers: number;
|
60
|
+
posts: number;
|
61
|
+
comments: number;
|
62
|
+
/**
|
63
|
+
* The number of users with any activity in the last day.
|
64
|
+
*/
|
65
|
+
users_active_day: number;
|
66
|
+
/**
|
67
|
+
* The number of users with any activity in the last week.
|
68
|
+
*/
|
69
|
+
users_active_week: number;
|
70
|
+
/**
|
71
|
+
* The number of users with any activity in the last month.
|
72
|
+
*/
|
73
|
+
users_active_month: number;
|
74
|
+
/**
|
75
|
+
* The number of users with any activity in the last year.
|
76
|
+
*/
|
77
|
+
users_active_half_year: number;
|
78
|
+
subscribers_local: number;
|
79
|
+
report_count: number;
|
80
|
+
unresolved_report_count: number;
|
81
|
+
local_removed: boolean;
|
63
82
|
};
|
@@ -0,0 +1,29 @@
|
|
1
|
+
import type { CommunityFollowerState } from "./CommunityFollowerState";
|
2
|
+
import type { CommunityNotificationsMode } from "./CommunityNotificationsMode";
|
3
|
+
export type CommunityActions = {
|
4
|
+
/**
|
5
|
+
* When the community was followed.
|
6
|
+
*/
|
7
|
+
followed_at?: string;
|
8
|
+
/**
|
9
|
+
* The state of the community follow.
|
10
|
+
*/
|
11
|
+
follow_state?: CommunityFollowerState;
|
12
|
+
/**
|
13
|
+
* When the community was blocked.
|
14
|
+
*/
|
15
|
+
blocked_at?: string;
|
16
|
+
/**
|
17
|
+
* When this user became a moderator.
|
18
|
+
*/
|
19
|
+
became_moderator_at?: string;
|
20
|
+
/**
|
21
|
+
* When this user received a ban.
|
22
|
+
*/
|
23
|
+
received_ban_at?: string;
|
24
|
+
/**
|
25
|
+
* When their ban expires.
|
26
|
+
*/
|
27
|
+
ban_expires_at?: string;
|
28
|
+
notifications?: CommunityNotificationsMode;
|
29
|
+
};
|
@@ -1,8 +1,6 @@
|
|
1
1
|
import type { Community } from "./Community";
|
2
|
-
import type { CommunityAggregates } from "./CommunityAggregates";
|
3
2
|
import type { CommunityReport } from "./CommunityReport";
|
4
3
|
import type { Person } from "./Person";
|
5
|
-
import type { SubscribedType } from "./SubscribedType";
|
6
4
|
/**
|
7
5
|
* A community report view.
|
8
6
|
*/
|
@@ -10,7 +8,5 @@ export type CommunityReportView = {
|
|
10
8
|
community_report: CommunityReport;
|
11
9
|
community: Community;
|
12
10
|
creator: Person;
|
13
|
-
counts: CommunityAggregates;
|
14
|
-
subscribed: SubscribedType;
|
15
11
|
resolver?: Person;
|
16
12
|
};
|
@@ -1,4 +1,4 @@
|
|
1
1
|
/**
|
2
2
|
* The community sort types. See here for descriptions: https://join-lemmy.org/docs/en/users/03-votes-and-ranking.html
|
3
3
|
*/
|
4
|
-
export type CommunitySortType = "
|
4
|
+
export type CommunitySortType = "ActiveSixMonths" | "ActiveMonthly" | "ActiveWeekly" | "ActiveDaily" | "Hot" | "New" | "Old" | "NameAsc" | "NameDesc" | "Comments" | "Posts" | "Subscribers" | "SubscribersLocal";
|
@@ -1,13 +1,14 @@
|
|
1
1
|
import type { Community } from "./Community";
|
2
|
-
import type {
|
3
|
-
import type {
|
2
|
+
import type { CommunityActions } from "./CommunityActions";
|
3
|
+
import type { InstanceActions } from "./InstanceActions";
|
4
|
+
import type { TagsView } from "./TagsView";
|
4
5
|
/**
|
5
6
|
* A community view.
|
6
7
|
*/
|
7
8
|
export type CommunityView = {
|
8
9
|
community: Community;
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
10
|
+
community_actions?: CommunityActions;
|
11
|
+
instance_actions?: InstanceActions;
|
12
|
+
can_mod: boolean;
|
13
|
+
post_tags: TagsView;
|
13
14
|
};
|
@@ -2,6 +2,7 @@ import type { CommentSortType } from "./CommentSortType";
|
|
2
2
|
import type { FederationMode } from "./FederationMode";
|
3
3
|
import type { LanguageId } from "./LanguageId";
|
4
4
|
import type { ListingType } from "./ListingType";
|
5
|
+
import type { MultiCommunityId } from "./MultiCommunityId";
|
5
6
|
import type { PostListingMode } from "./PostListingMode";
|
6
7
|
import type { PostSortType } from "./PostSortType";
|
7
8
|
import type { RegistrationMode } from "./RegistrationMode";
|
@@ -20,25 +21,27 @@ export type CreateSite = {
|
|
20
21
|
default_post_listing_type?: ListingType;
|
21
22
|
default_post_listing_mode?: PostListingMode;
|
22
23
|
default_post_sort_type?: PostSortType;
|
24
|
+
default_post_time_range_seconds?: number;
|
23
25
|
default_comment_sort_type?: CommentSortType;
|
24
26
|
legal_information?: string;
|
25
27
|
application_email_admins?: boolean;
|
26
|
-
hide_modlog_mod_names?: boolean;
|
27
28
|
discussion_languages?: Array<LanguageId>;
|
28
29
|
slur_filter_regex?: string;
|
29
30
|
actor_name_max_length?: number;
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
31
|
+
rate_limit_message_max_requests?: number;
|
32
|
+
rate_limit_message_interval_seconds?: number;
|
33
|
+
rate_limit_post_max_requests?: number;
|
34
|
+
rate_limit_post_interval_seconds?: number;
|
35
|
+
rate_limit_register_max_requests?: number;
|
36
|
+
rate_limit_register_interval_seconds?: number;
|
37
|
+
rate_limit_image_max_requests?: number;
|
38
|
+
rate_limit_image_interval_seconds?: number;
|
39
|
+
rate_limit_comment_max_requests?: number;
|
40
|
+
rate_limit_comment_interval_seconds?: number;
|
41
|
+
rate_limit_search_max_requests?: number;
|
42
|
+
rate_limit_search_interval_seconds?: number;
|
43
|
+
rate_limit_import_user_settings_max_requests?: number;
|
44
|
+
rate_limit_import_user_settings_interval_seconds?: number;
|
42
45
|
federation_enabled?: boolean;
|
43
46
|
captcha_enabled?: boolean;
|
44
47
|
captcha_difficulty?: string;
|
@@ -49,5 +52,7 @@ export type CreateSite = {
|
|
49
52
|
post_downvotes?: FederationMode;
|
50
53
|
comment_upvotes?: FederationMode;
|
51
54
|
comment_downvotes?: FederationMode;
|
52
|
-
|
55
|
+
disallow_nsfw_content?: boolean;
|
56
|
+
disable_email_notifications?: boolean;
|
57
|
+
suggested_communities?: MultiCommunityId;
|
53
58
|
};
|
package/dist/types/EditPost.d.ts
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
import type { LanguageId } from "./LanguageId";
|
2
2
|
import type { PostId } from "./PostId";
|
3
|
+
import type { TagId } from "./TagId";
|
3
4
|
/**
|
4
5
|
* Edit a post.
|
5
6
|
*/
|
@@ -24,5 +25,6 @@ export type EditPost = {
|
|
24
25
|
/**
|
25
26
|
* Time when this post should be scheduled. Null means publish immediately.
|
26
27
|
*/
|
27
|
-
|
28
|
+
scheduled_publish_time_at?: number;
|
29
|
+
tags?: Array<TagId>;
|
28
30
|
};
|
package/dist/types/EditSite.d.ts
CHANGED
@@ -2,6 +2,7 @@ import type { CommentSortType } from "./CommentSortType";
|
|
2
2
|
import type { FederationMode } from "./FederationMode";
|
3
3
|
import type { LanguageId } from "./LanguageId";
|
4
4
|
import type { ListingType } from "./ListingType";
|
5
|
+
import type { MultiCommunityId } from "./MultiCommunityId";
|
5
6
|
import type { PostListingMode } from "./PostListingMode";
|
6
7
|
import type { PostSortType } from "./PostSortType";
|
7
8
|
import type { RegistrationMode } from "./RegistrationMode";
|
@@ -50,6 +51,10 @@ export type EditSite = {
|
|
50
51
|
* The default post sort, usually "active"
|
51
52
|
*/
|
52
53
|
default_post_sort_type?: PostSortType;
|
54
|
+
/**
|
55
|
+
* A default time range limit to apply to post sorts, in seconds. 0 means none.
|
56
|
+
*/
|
57
|
+
default_post_time_range_seconds?: number;
|
53
58
|
/**
|
54
59
|
* The default comment sort, usually "hot"
|
55
60
|
*/
|
@@ -62,10 +67,6 @@ export type EditSite = {
|
|
62
67
|
* Whether to email admins when receiving a new application.
|
63
68
|
*/
|
64
69
|
application_email_admins?: boolean;
|
65
|
-
/**
|
66
|
-
* Whether to hide moderator names from the modlog.
|
67
|
-
*/
|
68
|
-
hide_modlog_mod_names?: boolean;
|
69
70
|
/**
|
70
71
|
* A list of allowed discussion languages.
|
71
72
|
*/
|
@@ -81,33 +82,38 @@ export type EditSite = {
|
|
81
82
|
/**
|
82
83
|
* The number of messages allowed in a given time frame.
|
83
84
|
*/
|
84
|
-
|
85
|
-
|
85
|
+
rate_limit_message_max_requests?: number;
|
86
|
+
rate_limit_message_interval_seconds?: number;
|
86
87
|
/**
|
87
88
|
* The number of posts allowed in a given time frame.
|
88
89
|
*/
|
89
|
-
|
90
|
-
|
90
|
+
rate_limit_post_max_requests?: number;
|
91
|
+
rate_limit_post_interval_seconds?: number;
|
91
92
|
/**
|
92
93
|
* The number of registrations allowed in a given time frame.
|
93
94
|
*/
|
94
|
-
|
95
|
-
|
95
|
+
rate_limit_register_max_requests?: number;
|
96
|
+
rate_limit_register_interval_seconds?: number;
|
96
97
|
/**
|
97
98
|
* The number of image uploads allowed in a given time frame.
|
98
99
|
*/
|
99
|
-
|
100
|
-
|
100
|
+
rate_limit_image_max_requests?: number;
|
101
|
+
rate_limit_image_interval_seconds?: number;
|
101
102
|
/**
|
102
103
|
* The number of comments allowed in a given time frame.
|
103
104
|
*/
|
104
|
-
|
105
|
-
|
105
|
+
rate_limit_comment_max_requests?: number;
|
106
|
+
rate_limit_comment_interval_seconds?: number;
|
106
107
|
/**
|
107
108
|
* The number of searches allowed in a given time frame.
|
108
109
|
*/
|
109
|
-
|
110
|
-
|
110
|
+
rate_limit_search_max_requests?: number;
|
111
|
+
rate_limit_search_interval_seconds?: number;
|
112
|
+
/**
|
113
|
+
* The number of settings imports or exports allowed in a given time frame.
|
114
|
+
*/
|
115
|
+
rate_limit_import_user_settings_max_requests?: number;
|
116
|
+
rate_limit_import_user_settings_interval_seconds?: number;
|
111
117
|
/**
|
112
118
|
* Whether to enable federation.
|
113
119
|
*/
|
@@ -155,8 +161,15 @@ export type EditSite = {
|
|
155
161
|
*/
|
156
162
|
comment_downvotes?: FederationMode;
|
157
163
|
/**
|
158
|
-
*
|
159
|
-
|
164
|
+
* Block NSFW content being created
|
165
|
+
*/
|
166
|
+
disallow_nsfw_content?: boolean;
|
167
|
+
/**
|
168
|
+
* Dont send email notifications to users for new replies, mentions etc
|
169
|
+
*/
|
170
|
+
disable_email_notifications?: boolean;
|
171
|
+
/**
|
172
|
+
* A multicommunity with suggested communities which is shown on the homepage
|
160
173
|
*/
|
161
|
-
|
174
|
+
suggested_communities?: MultiCommunityId;
|
162
175
|
};
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import type { PostOrCommentOrPrivateMessage } from "./PostOrCommentOrPrivateMessage";
|
2
|
+
import type { UserSettingsBackup } from "./UserSettingsBackup";
|
3
|
+
/**
|
4
|
+
* Your exported data.
|
5
|
+
*/
|
6
|
+
export type ExportDataResponse = {
|
7
|
+
inbox: Array<PostOrCommentOrPrivateMessage>;
|
8
|
+
content: Array<PostOrCommentOrPrivateMessage>;
|
9
|
+
read_posts: Array<string>;
|
10
|
+
liked: Array<string>;
|
11
|
+
moderates: Array<string>;
|
12
|
+
settings: UserSettingsBackup;
|
13
|
+
};
|
@@ -7,4 +7,4 @@ export type FederationError = "InvalidCommunity" | "CannotCreatePostOrCommentInD
|
|
7
7
|
DomainBlocked: string;
|
8
8
|
} | {
|
9
9
|
DomainNotInAllowList: string;
|
10
|
-
} | "FederationDisabledByStrictAllowList" | "ContradictingFilters" | "UrlWithoutDomain" | "InboxTimeout" | "CantDeleteSite" | "ObjectIsNotPublic" | "ObjectIsNotPrivate" | "Unreachable";
|
10
|
+
} | "FederationDisabledByStrictAllowList" | "ContradictingFilters" | "UrlWithoutDomain" | "InboxTimeout" | "CantDeleteSite" | "ObjectIsNotPublic" | "ObjectIsNotPrivate" | "PlatformLackingPrivateCommunitySupport" | "Unreachable";
|
@@ -2,6 +2,7 @@ import type { CommentId } from "./CommentId";
|
|
2
2
|
import type { CommentSortType } from "./CommentSortType";
|
3
3
|
import type { CommunityId } from "./CommunityId";
|
4
4
|
import type { ListingType } from "./ListingType";
|
5
|
+
import type { PaginationCursor } from "./PaginationCursor";
|
5
6
|
import type { PostId } from "./PostId";
|
6
7
|
/**
|
7
8
|
* Get a list of comments.
|
@@ -9,13 +10,17 @@ import type { PostId } from "./PostId";
|
|
9
10
|
export type GetComments = {
|
10
11
|
type_?: ListingType;
|
11
12
|
sort?: CommentSortType;
|
13
|
+
/**
|
14
|
+
* Filter to within a given time range, in seconds.
|
15
|
+
* IE 60 would give results for the past minute.
|
16
|
+
*/
|
17
|
+
time_range_seconds?: number;
|
12
18
|
max_depth?: number;
|
13
|
-
|
19
|
+
page_cursor?: PaginationCursor;
|
20
|
+
page_back?: boolean;
|
14
21
|
limit?: number;
|
15
22
|
community_id?: CommunityId;
|
16
23
|
community_name?: string;
|
17
24
|
post_id?: PostId;
|
18
25
|
parent_id?: CommentId;
|
19
|
-
liked_only?: boolean;
|
20
|
-
disliked_only?: boolean;
|
21
26
|
};
|
@@ -1,7 +1,10 @@
|
|
1
1
|
import type { CommentView } from "./CommentView";
|
2
|
+
import type { PaginationCursor } from "./PaginationCursor";
|
2
3
|
/**
|
3
4
|
* The comment list response.
|
4
5
|
*/
|
5
6
|
export type GetCommentsResponse = {
|
6
7
|
comments: Array<CommentView>;
|
8
|
+
next_page?: PaginationCursor;
|
9
|
+
prev_page?: PaginationCursor;
|
7
10
|
};
|
@@ -1,7 +1,10 @@
|
|
1
1
|
import type { CommentSlimView } from "./CommentSlimView";
|
2
|
+
import type { PaginationCursor } from "./PaginationCursor";
|
2
3
|
/**
|
3
4
|
* A slimmer comment list response, without the post or community.
|
4
5
|
*/
|
5
6
|
export type GetCommentsSlimResponse = {
|
6
7
|
comments: Array<CommentSlimView>;
|
8
|
+
next_page?: PaginationCursor;
|
9
|
+
prev_page?: PaginationCursor;
|
7
10
|
};
|
@@ -1,19 +1,44 @@
|
|
1
1
|
import type { CommentId } from "./CommentId";
|
2
2
|
import type { CommunityId } from "./CommunityId";
|
3
|
+
import type { ListingType } from "./ListingType";
|
3
4
|
import type { ModlogActionType } from "./ModlogActionType";
|
4
|
-
import type {
|
5
|
+
import type { PaginationCursor } from "./PaginationCursor";
|
5
6
|
import type { PersonId } from "./PersonId";
|
6
7
|
import type { PostId } from "./PostId";
|
7
8
|
/**
|
8
9
|
* Fetches the modlog.
|
9
10
|
*/
|
10
11
|
export type GetModlog = {
|
12
|
+
/**
|
13
|
+
* Filter by the moderator.
|
14
|
+
*/
|
11
15
|
mod_person_id?: PersonId;
|
16
|
+
/**
|
17
|
+
* Filter by the community.
|
18
|
+
*/
|
12
19
|
community_id?: CommunityId;
|
20
|
+
/**
|
21
|
+
* Filter by the modlog action type.
|
22
|
+
*/
|
13
23
|
type_?: ModlogActionType;
|
24
|
+
/**
|
25
|
+
* Filter by listing type. When not using All, it will remove the non-community modlog entries,
|
26
|
+
* such as site bans, instance blocks, adding an admin, etc.
|
27
|
+
*/
|
28
|
+
listing_type?: ListingType;
|
29
|
+
/**
|
30
|
+
* Filter by the other / modded person.
|
31
|
+
*/
|
14
32
|
other_person_id?: PersonId;
|
33
|
+
/**
|
34
|
+
* Filter by post. Will include comments of that post.
|
35
|
+
*/
|
15
36
|
post_id?: PostId;
|
37
|
+
/**
|
38
|
+
* Filter by comment.
|
39
|
+
*/
|
16
40
|
comment_id?: CommentId;
|
17
|
-
page_cursor?:
|
41
|
+
page_cursor?: PaginationCursor;
|
18
42
|
page_back?: boolean;
|
43
|
+
limit?: number;
|
19
44
|
};
|
@@ -1,7 +1,13 @@
|
|
1
1
|
import type { ModlogCombinedView } from "./ModlogCombinedView";
|
2
|
+
import type { PaginationCursor } from "./PaginationCursor";
|
2
3
|
/**
|
3
4
|
* The modlog fetch response.
|
4
5
|
*/
|
5
6
|
export type GetModlogResponse = {
|
6
7
|
modlog: Array<ModlogCombinedView>;
|
8
|
+
/**
|
9
|
+
* the pagination cursor to use to fetch the next page
|
10
|
+
*/
|
11
|
+
next_page?: PaginationCursor;
|
12
|
+
prev_page?: PaginationCursor;
|
7
13
|
};
|
@@ -1,4 +1,3 @@
|
|
1
|
-
import type { CommunityModeratorView } from "./CommunityModeratorView";
|
2
1
|
import type { CommunityView } from "./CommunityView";
|
3
2
|
import type { PostView } from "./PostView";
|
4
3
|
/**
|
@@ -7,7 +6,6 @@ import type { PostView } from "./PostView";
|
|
7
6
|
export type GetPostResponse = {
|
8
7
|
post_view: PostView;
|
9
8
|
community_view: CommunityView;
|
10
|
-
moderators: Array<CommunityModeratorView>;
|
11
9
|
/**
|
12
10
|
* A list of cross-posts, or other times / communities this link has been posted to.
|
13
11
|
*/
|
package/dist/types/GetPosts.d.ts
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
import type { CommunityId } from "./CommunityId";
|
2
2
|
import type { ListingType } from "./ListingType";
|
3
|
+
import type { MultiCommunityId } from "./MultiCommunityId";
|
3
4
|
import type { PaginationCursor } from "./PaginationCursor";
|
4
5
|
import type { PostSortType } from "./PostSortType";
|
5
6
|
/**
|
@@ -9,16 +10,14 @@ export type GetPosts = {
|
|
9
10
|
type_?: ListingType;
|
10
11
|
sort?: PostSortType;
|
11
12
|
/**
|
12
|
-
*
|
13
|
+
* Filter to within a given time range, in seconds.
|
14
|
+
* IE 60 would give results for the past minute.
|
15
|
+
* Use Zero to override the local_site and local_user time_range.
|
13
16
|
*/
|
14
|
-
|
15
|
-
limit?: number;
|
17
|
+
time_range_seconds?: number;
|
16
18
|
community_id?: CommunityId;
|
17
19
|
community_name?: string;
|
18
|
-
|
19
|
-
read_only?: boolean;
|
20
|
-
liked_only?: boolean;
|
21
|
-
disliked_only?: boolean;
|
20
|
+
multi_community_id?: MultiCommunityId;
|
22
21
|
show_hidden?: boolean;
|
23
22
|
/**
|
24
23
|
* If true, then show the read posts (even if your user setting is to hide them)
|
@@ -42,4 +41,5 @@ export type GetPosts = {
|
|
42
41
|
no_comments_only?: boolean;
|
43
42
|
page_cursor?: PaginationCursor;
|
44
43
|
page_back?: boolean;
|
44
|
+
limit?: number;
|
45
45
|
};
|