lemmy-js-client 0.20.0-api-v4.16 → 0.20.0-api-no-optional-vec.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 +13 -4
- package/dist/http.d.ts +237 -430
- package/dist/http.js +1225 -411
- package/dist/index.d.ts +62 -20
- package/dist/other_types.d.ts +80 -16
- package/dist/types/AdminAllowInstance.d.ts +2 -1
- package/dist/types/AdminAllowInstanceId.d.ts +1 -0
- package/dist/types/AdminAllowInstanceView.d.ts +1 -1
- package/dist/types/AdminBlockInstance.d.ts +2 -1
- 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/AuthenticateWithOauth.d.ts +1 -0
- package/dist/types/CommentAggregates.d.ts +2 -0
- package/dist/types/CommentReplyView.d.ts +5 -1
- package/dist/types/CommentReport.d.ts +1 -0
- package/dist/types/CommentReportView.d.ts +4 -1
- package/dist/types/CommentSlimView.d.ts +24 -0
- package/dist/types/CommentView.d.ts +5 -1
- package/dist/types/Community.d.ts +2 -2
- 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/CommunitySortType.d.ts +1 -1
- package/dist/types/CommunityView.d.ts +1 -0
- package/dist/types/CreateCommentReport.d.ts +1 -0
- package/dist/types/CreateCommunity.d.ts +1 -1
- package/dist/types/CreateOAuthProvider.d.ts +1 -0
- package/dist/types/CreatePost.d.ts +2 -0
- package/dist/types/CreatePostReport.d.ts +1 -0
- package/dist/types/CreateSite.d.ts +3 -5
- package/dist/types/DeleteImageParams.d.ts +3 -0
- package/dist/types/DeleteImageParams.js +3 -0
- package/dist/types/EditCommunity.d.ts +1 -9
- package/dist/types/EditOAuthProvider.d.ts +1 -0
- package/dist/types/EditPost.d.ts +2 -0
- package/dist/types/EditSite.d.ts +11 -18
- package/dist/types/FederationError.d.ts +2 -2
- package/dist/types/GetComments.d.ts +5 -1
- package/dist/types/GetCommentsSlimResponse.d.ts +7 -0
- package/dist/types/GetModlog.d.ts +27 -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/GetPostResponse.d.ts +0 -2
- package/dist/types/GetPosts.d.ts +12 -0
- package/dist/types/GetRandomCommunity.d.ts +1 -0
- package/dist/types/GetReportCountResponse.d.ts +1 -5
- package/dist/types/GetReportCountResponse.js +1 -0
- package/dist/types/GetSiteResponse.d.ts +3 -10
- package/dist/types/GetUnreadCountResponse.d.ts +2 -4
- package/dist/types/ImageDetails.d.ts +1 -0
- package/dist/types/ImageGetParams.d.ts +4 -0
- package/dist/types/ImageGetParams.js +3 -0
- package/dist/types/ImageProxyParams.d.ts +5 -0
- package/dist/types/ImageProxyParams.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/InboxDataType.d.ts +4 -0
- package/dist/types/InboxDataType.js +3 -0
- package/dist/types/LemmyErrorType.d.ts +7 -3
- package/dist/types/ListCommunities.d.ts +5 -0
- 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/ListReports.d.ts +35 -0
- package/dist/types/ListReportsResponse.d.ts +7 -0
- package/dist/types/LocalImage.d.ts +0 -1
- package/dist/types/LocalSite.d.ts +9 -0
- package/dist/types/LocalUser.d.ts +13 -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/OAuthProvider.d.ts +4 -0
- package/dist/types/Person.d.ts +2 -2
- package/dist/types/PersonAggregates.d.ts +1 -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} +9 -5
- 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 +36 -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/PostAggregates.d.ts +2 -0
- package/dist/types/PostReport.d.ts +1 -0
- package/dist/types/PostReportView.d.ts +4 -1
- package/dist/types/PostSortType.d.ts +1 -1
- package/dist/types/PostTags.d.ts +7 -0
- package/dist/types/PostTags.js +2 -0
- package/dist/types/PostView.d.ts +7 -1
- package/dist/types/PrivateMessage.d.ts +1 -0
- package/dist/types/ReportCombinedPaginationCursor.d.ts +4 -0
- package/dist/types/ReportCombinedPaginationCursor.js +3 -0
- package/dist/types/ReportCombinedView.d.ts +13 -0
- package/dist/types/ReportCombinedView.js +2 -0
- package/dist/types/ReportType.d.ts +4 -0
- package/dist/types/ReportType.js +3 -0
- package/dist/types/ResendVerificationEmail.d.ts +7 -0
- package/dist/types/ResendVerificationEmail.js +2 -0
- package/dist/types/SaveUserSettings.d.ts +9 -9
- package/dist/types/Search.d.ts +12 -7
- package/dist/types/SearchCombinedPaginationCursor.d.ts +4 -0
- package/dist/types/SearchCombinedPaginationCursor.js +3 -0
- package/dist/types/SearchCombinedView.d.ts +13 -0
- package/dist/types/SearchCombinedView.js +2 -0
- package/dist/types/SearchResponse.d.ts +2 -10
- package/dist/types/SearchSortType.d.ts +4 -0
- package/dist/types/SearchSortType.js +3 -0
- package/dist/types/Site.d.ts +2 -2
- package/dist/types/SiteResponse.d.ts +1 -1
- package/dist/types/SuccessResponse.d.ts +1 -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/dist/types/UploadImageResponse.d.ts +4 -0
- package/dist/types/UploadImageResponse.js +3 -0
- package/package.json +10 -5
- 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/ListCommentReports.d.ts +0 -18
- package/dist/types/ListCommentReportsResponse.d.ts +0 -7
- package/dist/types/ListPostReports.d.ts +0 -18
- package/dist/types/ListPostReportsResponse.d.ts +0 -7
- package/dist/types/ListPrivateMessageReports.d.ts +0 -11
- package/dist/types/ListPrivateMessageReportsResponse.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/{ListPrivateMessageReports.js → AdminAllowInstanceId.js} +0 -0
- /package/dist/types/{PersonMentionId.js → AdminBlockInstanceId.js} +0 -0
- /package/dist/types/{CommentReplyResponse.js → CommentSlimView.js} +0 -0
- /package/dist/types/{GetPersonMentions.js → CommunityReport.js} +0 -0
- /package/dist/types/{GetPersonMentionsResponse.js → CommunityReportView.js} +0 -0
- /package/dist/types/{GetPrivateMessages.js → GetCommentsSlimResponse.js} +0 -0
- /package/dist/types/{GetReplies.js → InboxCombinedView.js} +0 -0
- /package/dist/types/{GetRepliesResponse.js → ListInbox.js} +0 -0
- /package/dist/types/{ListCommentReports.js → ListInboxResponse.js} +0 -0
- /package/dist/types/{ListCommentReportsResponse.js → ListPersonContent.js} +0 -0
- /package/dist/types/{ListPostReports.js → ListPersonContentResponse.js} +0 -0
- /package/dist/types/{ListPostReportsResponse.js → ListPersonSaved.js} +0 -0
- /package/dist/types/{ListPrivateMessageReportsResponse.js → ListPersonSavedResponse.js} +0 -0
- /package/dist/types/{MarkPersonMentionAsRead.js → ListReports.js} +0 -0
- /package/dist/types/{ModlogListParams.js → ListReportsResponse.js} +0 -0
- /package/dist/types/{PersonMention.js → MarkPersonCommentMentionAsRead.js} +0 -0
- /package/dist/types/{PersonMentionResponse.js → MarkPersonPostMentionAsRead.js} +0 -0
- /package/dist/types/{PersonMentionView.js → ModlogCombinedView.js} +0 -0
- /package/dist/types/{PrivateMessagesResponse.js → PersonCommentMention.js} +0 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Community } from "./Community";
|
|
2
|
+
import type { CommunityAggregates } from "./CommunityAggregates";
|
|
3
|
+
import type { CommunityReport } from "./CommunityReport";
|
|
4
|
+
import type { Person } from "./Person";
|
|
5
|
+
import type { SubscribedType } from "./SubscribedType";
|
|
6
|
+
/**
|
|
7
|
+
* A community report view.
|
|
8
|
+
*/
|
|
9
|
+
export type CommunityReportView = {
|
|
10
|
+
community_report: CommunityReport;
|
|
11
|
+
community: Community;
|
|
12
|
+
creator: Person;
|
|
13
|
+
counts: CommunityAggregates;
|
|
14
|
+
subscribed: SubscribedType;
|
|
15
|
+
resolver?: Person;
|
|
16
|
+
};
|
|
@@ -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";
|
|
@@ -36,6 +36,6 @@ export type CreateCommunity = {
|
|
|
36
36
|
* Whether to restrict posting only to moderators.
|
|
37
37
|
*/
|
|
38
38
|
posting_restricted_to_mods?: boolean;
|
|
39
|
-
discussion_languages
|
|
39
|
+
discussion_languages: Array<LanguageId>;
|
|
40
40
|
visibility?: CommunityVisibility;
|
|
41
41
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { CommunityId } from "./CommunityId";
|
|
2
2
|
import type { LanguageId } from "./LanguageId";
|
|
3
|
+
import type { TagId } from "./TagId";
|
|
3
4
|
/**
|
|
4
5
|
* Create a post.
|
|
5
6
|
*/
|
|
@@ -25,6 +26,7 @@ export type CreatePost = {
|
|
|
25
26
|
* Instead of fetching a thumbnail, use a custom one.
|
|
26
27
|
*/
|
|
27
28
|
custom_thumbnail?: string;
|
|
29
|
+
tags: Array<TagId>;
|
|
28
30
|
/**
|
|
29
31
|
* Time when this post should be scheduled. Null means publish immediately.
|
|
30
32
|
*/
|
|
@@ -12,9 +12,6 @@ export type CreateSite = {
|
|
|
12
12
|
name: string;
|
|
13
13
|
sidebar?: string;
|
|
14
14
|
description?: string;
|
|
15
|
-
icon?: string;
|
|
16
|
-
banner?: string;
|
|
17
|
-
enable_nsfw?: boolean;
|
|
18
15
|
community_creation_admin_only?: boolean;
|
|
19
16
|
require_email_verification?: boolean;
|
|
20
17
|
application_question?: string;
|
|
@@ -23,11 +20,12 @@ export type CreateSite = {
|
|
|
23
20
|
default_post_listing_type?: ListingType;
|
|
24
21
|
default_post_listing_mode?: PostListingMode;
|
|
25
22
|
default_post_sort_type?: PostSortType;
|
|
23
|
+
default_post_time_range_seconds?: number;
|
|
26
24
|
default_comment_sort_type?: CommentSortType;
|
|
27
25
|
legal_information?: string;
|
|
28
26
|
application_email_admins?: boolean;
|
|
29
27
|
hide_modlog_mod_names?: boolean;
|
|
30
|
-
discussion_languages
|
|
28
|
+
discussion_languages: Array<LanguageId>;
|
|
31
29
|
slur_filter_regex?: string;
|
|
32
30
|
actor_name_max_length?: number;
|
|
33
31
|
rate_limit_message?: number;
|
|
@@ -43,7 +41,6 @@ export type CreateSite = {
|
|
|
43
41
|
rate_limit_search?: number;
|
|
44
42
|
rate_limit_search_per_second?: number;
|
|
45
43
|
federation_enabled?: boolean;
|
|
46
|
-
federation_debug?: boolean;
|
|
47
44
|
captcha_enabled?: boolean;
|
|
48
45
|
captcha_difficulty?: string;
|
|
49
46
|
registration_mode?: RegistrationMode;
|
|
@@ -53,4 +50,5 @@ export type CreateSite = {
|
|
|
53
50
|
post_downvotes?: FederationMode;
|
|
54
51
|
comment_upvotes?: FederationMode;
|
|
55
52
|
comment_downvotes?: FederationMode;
|
|
53
|
+
disable_donation_dialog?: boolean;
|
|
56
54
|
};
|
|
@@ -18,14 +18,6 @@ export type EditCommunity = {
|
|
|
18
18
|
* A shorter, one line description of your community.
|
|
19
19
|
*/
|
|
20
20
|
description?: string;
|
|
21
|
-
/**
|
|
22
|
-
* An icon URL.
|
|
23
|
-
*/
|
|
24
|
-
icon?: string;
|
|
25
|
-
/**
|
|
26
|
-
* A banner URL.
|
|
27
|
-
*/
|
|
28
|
-
banner?: string;
|
|
29
21
|
/**
|
|
30
22
|
* Whether its an NSFW community.
|
|
31
23
|
*/
|
|
@@ -34,6 +26,6 @@ export type EditCommunity = {
|
|
|
34
26
|
* Whether to restrict posting only to moderators.
|
|
35
27
|
*/
|
|
36
28
|
posting_restricted_to_mods?: boolean;
|
|
37
|
-
discussion_languages
|
|
29
|
+
discussion_languages: Array<LanguageId>;
|
|
38
30
|
visibility?: CommunityVisibility;
|
|
39
31
|
};
|
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
|
*/
|
|
@@ -21,6 +22,7 @@ export type EditPost = {
|
|
|
21
22
|
* Instead of fetching a thumbnail, use a custom one.
|
|
22
23
|
*/
|
|
23
24
|
custom_thumbnail?: string;
|
|
25
|
+
tags: Array<TagId>;
|
|
24
26
|
/**
|
|
25
27
|
* Time when this post should be scheduled. Null means publish immediately.
|
|
26
28
|
*/
|
package/dist/types/EditSite.d.ts
CHANGED
|
@@ -18,18 +18,6 @@ export type EditSite = {
|
|
|
18
18
|
* A shorter, one line description of your site.
|
|
19
19
|
*/
|
|
20
20
|
description?: string;
|
|
21
|
-
/**
|
|
22
|
-
* A url for your site's icon.
|
|
23
|
-
*/
|
|
24
|
-
icon?: string;
|
|
25
|
-
/**
|
|
26
|
-
* A url for your site's banner.
|
|
27
|
-
*/
|
|
28
|
-
banner?: string;
|
|
29
|
-
/**
|
|
30
|
-
* Whether to enable NSFW.
|
|
31
|
-
*/
|
|
32
|
-
enable_nsfw?: boolean;
|
|
33
21
|
/**
|
|
34
22
|
* Limits community creation to admins only.
|
|
35
23
|
*/
|
|
@@ -62,6 +50,10 @@ export type EditSite = {
|
|
|
62
50
|
* The default post sort, usually "active"
|
|
63
51
|
*/
|
|
64
52
|
default_post_sort_type?: PostSortType;
|
|
53
|
+
/**
|
|
54
|
+
* A default time range limit to apply to post sorts, in seconds. 0 means none.
|
|
55
|
+
*/
|
|
56
|
+
default_post_time_range_seconds?: number;
|
|
65
57
|
/**
|
|
66
58
|
* The default comment sort, usually "hot"
|
|
67
59
|
*/
|
|
@@ -81,7 +73,7 @@ export type EditSite = {
|
|
|
81
73
|
/**
|
|
82
74
|
* A list of allowed discussion languages.
|
|
83
75
|
*/
|
|
84
|
-
discussion_languages
|
|
76
|
+
discussion_languages: Array<LanguageId>;
|
|
85
77
|
/**
|
|
86
78
|
* A regex string of items to filter.
|
|
87
79
|
*/
|
|
@@ -124,10 +116,6 @@ export type EditSite = {
|
|
|
124
116
|
* Whether to enable federation.
|
|
125
117
|
*/
|
|
126
118
|
federation_enabled?: boolean;
|
|
127
|
-
/**
|
|
128
|
-
* Enables federation debugging.
|
|
129
|
-
*/
|
|
130
|
-
federation_debug?: boolean;
|
|
131
119
|
/**
|
|
132
120
|
* Whether to enable captchas for signups.
|
|
133
121
|
*/
|
|
@@ -139,7 +127,7 @@ export type EditSite = {
|
|
|
139
127
|
/**
|
|
140
128
|
* A list of blocked URLs
|
|
141
129
|
*/
|
|
142
|
-
blocked_urls
|
|
130
|
+
blocked_urls: Array<string>;
|
|
143
131
|
registration_mode?: RegistrationMode;
|
|
144
132
|
/**
|
|
145
133
|
* Whether to email admins for new reports.
|
|
@@ -170,4 +158,9 @@ export type EditSite = {
|
|
|
170
158
|
* What kind of comment downvotes your site allows.
|
|
171
159
|
*/
|
|
172
160
|
comment_downvotes?: FederationMode;
|
|
161
|
+
/**
|
|
162
|
+
* If this is true, users will never see the dialog asking to support Lemmy development with
|
|
163
|
+
* donations.
|
|
164
|
+
*/
|
|
165
|
+
disable_donation_dialog?: boolean;
|
|
173
166
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Federation related errors, these dont need to be translated.
|
|
3
3
|
*/
|
|
4
|
-
export type FederationError = "
|
|
4
|
+
export type FederationError = "InvalidCommunity" | "CannotCreatePostOrCommentInDeletedOrRemovedCommunity" | "CannotReceivePage" | "OnlyLocalAdminCanRemoveCommunity" | "OnlyLocalAdminCanRestoreCommunity" | "PostIsLocked" | {
|
|
5
5
|
PersonIsBannedFromSite: string;
|
|
6
6
|
} | "InvalidVoteValue" | "PageDoesNotSpecifyCreator" | "CouldntGetComments" | "CouldntGetPosts" | "FederationDisabled" | {
|
|
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";
|
|
@@ -9,6 +9,11 @@ import type { PostId } from "./PostId";
|
|
|
9
9
|
export type GetComments = {
|
|
10
10
|
type_?: ListingType;
|
|
11
11
|
sort?: CommentSortType;
|
|
12
|
+
/**
|
|
13
|
+
* Filter to within a given time range, in seconds.
|
|
14
|
+
* IE 60 would give results for the past minute.
|
|
15
|
+
*/
|
|
16
|
+
time_range_seconds?: number;
|
|
12
17
|
max_depth?: number;
|
|
13
18
|
page?: number;
|
|
14
19
|
limit?: number;
|
|
@@ -16,7 +21,6 @@ export type GetComments = {
|
|
|
16
21
|
community_name?: string;
|
|
17
22
|
post_id?: PostId;
|
|
18
23
|
parent_id?: CommentId;
|
|
19
|
-
saved_only?: boolean;
|
|
20
24
|
liked_only?: boolean;
|
|
21
25
|
disliked_only?: boolean;
|
|
22
26
|
};
|
|
@@ -1,18 +1,43 @@
|
|
|
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";
|
|
5
|
+
import type { ModlogCombinedPaginationCursor } from "./ModlogCombinedPaginationCursor";
|
|
4
6
|
import type { PersonId } from "./PersonId";
|
|
5
7
|
import type { PostId } from "./PostId";
|
|
6
8
|
/**
|
|
7
9
|
* Fetches the modlog.
|
|
8
10
|
*/
|
|
9
11
|
export type GetModlog = {
|
|
12
|
+
/**
|
|
13
|
+
* Filter by the moderator.
|
|
14
|
+
*/
|
|
10
15
|
mod_person_id?: PersonId;
|
|
16
|
+
/**
|
|
17
|
+
* Filter by the community.
|
|
18
|
+
*/
|
|
11
19
|
community_id?: CommunityId;
|
|
12
|
-
|
|
13
|
-
|
|
20
|
+
/**
|
|
21
|
+
* Filter by the modlog action type.
|
|
22
|
+
*/
|
|
14
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
|
+
*/
|
|
15
32
|
other_person_id?: PersonId;
|
|
33
|
+
/**
|
|
34
|
+
* Filter by post. Will include comments of that post.
|
|
35
|
+
*/
|
|
16
36
|
post_id?: PostId;
|
|
37
|
+
/**
|
|
38
|
+
* Filter by comment.
|
|
39
|
+
*/
|
|
17
40
|
comment_id?: CommentId;
|
|
41
|
+
page_cursor?: ModlogCombinedPaginationCursor;
|
|
42
|
+
page_back?: boolean;
|
|
18
43
|
};
|
|
@@ -1,39 +1,7 @@
|
|
|
1
|
-
import type {
|
|
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 { ModFeaturePostView } from "./ModFeaturePostView";
|
|
12
|
-
import type { ModHideCommunityView } from "./ModHideCommunityView";
|
|
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";
|
|
1
|
+
import type { ModlogCombinedView } from "./ModlogCombinedView";
|
|
18
2
|
/**
|
|
19
3
|
* The modlog fetch response.
|
|
20
4
|
*/
|
|
21
5
|
export type GetModlogResponse = {
|
|
22
|
-
|
|
23
|
-
locked_posts: Array<ModLockPostView>;
|
|
24
|
-
featured_posts: Array<ModFeaturePostView>;
|
|
25
|
-
removed_comments: Array<ModRemoveCommentView>;
|
|
26
|
-
removed_communities: Array<ModRemoveCommunityView>;
|
|
27
|
-
banned_from_community: Array<ModBanFromCommunityView>;
|
|
28
|
-
banned: Array<ModBanView>;
|
|
29
|
-
added_to_community: Array<ModAddCommunityView>;
|
|
30
|
-
transferred_to_community: Array<ModTransferCommunityView>;
|
|
31
|
-
added: Array<ModAddView>;
|
|
32
|
-
admin_purged_persons: Array<AdminPurgePersonView>;
|
|
33
|
-
admin_purged_communities: Array<AdminPurgeCommunityView>;
|
|
34
|
-
admin_purged_posts: Array<AdminPurgePostView>;
|
|
35
|
-
admin_purged_comments: Array<AdminPurgeCommentView>;
|
|
36
|
-
hidden_communities: Array<ModHideCommunityView>;
|
|
37
|
-
admin_block_instance: Array<AdminBlockInstanceView>;
|
|
38
|
-
admin_allow_instance: Array<AdminAllowInstanceView>;
|
|
6
|
+
modlog: Array<ModlogCombinedView>;
|
|
39
7
|
};
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import type { CommunityId } from "./CommunityId";
|
|
2
1
|
import type { PersonId } from "./PersonId";
|
|
3
|
-
import type { PostSortType } from "./PostSortType";
|
|
4
2
|
/**
|
|
5
3
|
* Gets a person's details.
|
|
6
4
|
*
|
|
@@ -12,9 +10,4 @@ export type GetPersonDetails = {
|
|
|
12
10
|
* Example: dessalines , or dessalines@xyz.tld
|
|
13
11
|
*/
|
|
14
12
|
username?: string;
|
|
15
|
-
sort?: PostSortType;
|
|
16
|
-
page?: number;
|
|
17
|
-
limit?: number;
|
|
18
|
-
community_id?: CommunityId;
|
|
19
|
-
saved_only?: boolean;
|
|
20
13
|
};
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import type { CommentView } from "./CommentView";
|
|
2
1
|
import type { CommunityModeratorView } from "./CommunityModeratorView";
|
|
3
2
|
import type { PersonView } from "./PersonView";
|
|
4
|
-
import type { PostView } from "./PostView";
|
|
5
3
|
import type { Site } from "./Site";
|
|
6
4
|
/**
|
|
7
5
|
* A person's details response.
|
|
@@ -9,7 +7,5 @@ import type { Site } from "./Site";
|
|
|
9
7
|
export type GetPersonDetailsResponse = {
|
|
10
8
|
person_view: PersonView;
|
|
11
9
|
site?: Site;
|
|
12
|
-
comments: Array<CommentView>;
|
|
13
|
-
posts: Array<PostView>;
|
|
14
10
|
moderates: Array<CommunityModeratorView>;
|
|
15
11
|
};
|
|
@@ -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
|
@@ -8,6 +8,12 @@ import type { PostSortType } from "./PostSortType";
|
|
|
8
8
|
export type GetPosts = {
|
|
9
9
|
type_?: ListingType;
|
|
10
10
|
sort?: PostSortType;
|
|
11
|
+
/**
|
|
12
|
+
* Filter to within a given time range, in seconds.
|
|
13
|
+
* IE 60 would give results for the past minute.
|
|
14
|
+
* Use Zero to override the local_site and local_user time_range.
|
|
15
|
+
*/
|
|
16
|
+
time_range_seconds?: number;
|
|
11
17
|
/**
|
|
12
18
|
* DEPRECATED, use page_cursor
|
|
13
19
|
*/
|
|
@@ -16,6 +22,7 @@ export type GetPosts = {
|
|
|
16
22
|
community_id?: CommunityId;
|
|
17
23
|
community_name?: string;
|
|
18
24
|
saved_only?: boolean;
|
|
25
|
+
read_only?: boolean;
|
|
19
26
|
liked_only?: boolean;
|
|
20
27
|
disliked_only?: boolean;
|
|
21
28
|
show_hidden?: boolean;
|
|
@@ -27,6 +34,10 @@ export type GetPosts = {
|
|
|
27
34
|
* If true, then show the nsfw posts (even if your user setting is to hide them)
|
|
28
35
|
*/
|
|
29
36
|
show_nsfw?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* If false, then show posts with media attached (even if your user setting is to hide them)
|
|
39
|
+
*/
|
|
40
|
+
hide_media?: boolean;
|
|
30
41
|
/**
|
|
31
42
|
* Whether to automatically mark fetched posts as read.
|
|
32
43
|
*/
|
|
@@ -36,4 +47,5 @@ export type GetPosts = {
|
|
|
36
47
|
*/
|
|
37
48
|
no_comments_only?: boolean;
|
|
38
49
|
page_cursor?: PaginationCursor;
|
|
50
|
+
page_back?: boolean;
|
|
39
51
|
};
|
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
import type { CommunityId } from "./CommunityId";
|
|
2
1
|
/**
|
|
3
2
|
* A response for the number of reports.
|
|
4
3
|
*/
|
|
5
4
|
export type GetReportCountResponse = {
|
|
6
|
-
|
|
7
|
-
comment_reports: number;
|
|
8
|
-
post_reports: number;
|
|
9
|
-
private_message_reports?: number;
|
|
5
|
+
count: number;
|
|
10
6
|
};
|
|
@@ -15,14 +15,6 @@ export type GetSiteResponse = {
|
|
|
15
15
|
version: string;
|
|
16
16
|
all_languages: Array<Language>;
|
|
17
17
|
discussion_languages: Array<LanguageId>;
|
|
18
|
-
/**
|
|
19
|
-
* deprecated, use field `tagline` or /api/v3/tagline/list
|
|
20
|
-
*/
|
|
21
|
-
taglines: Array<null>;
|
|
22
|
-
/**
|
|
23
|
-
* deprecated, use /api/v3/custom_emoji/list
|
|
24
|
-
*/
|
|
25
|
-
custom_emojis: Array<null>;
|
|
26
18
|
/**
|
|
27
19
|
* If the site has any taglines, a random one is included here for displaying
|
|
28
20
|
*/
|
|
@@ -30,7 +22,8 @@ export type GetSiteResponse = {
|
|
|
30
22
|
/**
|
|
31
23
|
* A list of external auth methods your site supports.
|
|
32
24
|
*/
|
|
33
|
-
oauth_providers
|
|
34
|
-
admin_oauth_providers
|
|
25
|
+
oauth_providers: Array<PublicOAuthProvider>;
|
|
26
|
+
admin_oauth_providers: Array<OAuthProvider>;
|
|
35
27
|
blocked_urls: Array<LocalSiteUrlBlocklist>;
|
|
28
|
+
image_upload_disabled: boolean;
|
|
36
29
|
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { CommentReplyView } from "./CommentReplyView";
|
|
2
|
+
import type { PersonCommentMentionView } from "./PersonCommentMentionView";
|
|
3
|
+
import type { PersonPostMentionView } from "./PersonPostMentionView";
|
|
4
|
+
import type { PrivateMessageView } from "./PrivateMessageView";
|
|
5
|
+
export type InboxCombinedView = ({
|
|
6
|
+
type_: "CommentReply";
|
|
7
|
+
} & CommentReplyView) | ({
|
|
8
|
+
type_: "CommentMention";
|
|
9
|
+
} & PersonCommentMentionView) | ({
|
|
10
|
+
type_: "PostMention";
|
|
11
|
+
} & PersonPostMentionView) | ({
|
|
12
|
+
type_: "PrivateMessage";
|
|
13
|
+
} & PrivateMessageView);
|
|
@@ -41,6 +41,10 @@ export type LemmyErrorType = {
|
|
|
41
41
|
error: "no_content_type_header";
|
|
42
42
|
} | {
|
|
43
43
|
error: "not_an_image_type";
|
|
44
|
+
} | {
|
|
45
|
+
error: "invalid_image_upload";
|
|
46
|
+
} | {
|
|
47
|
+
error: "image_upload_disabled";
|
|
44
48
|
} | {
|
|
45
49
|
error: "not_a_mod_or_admin";
|
|
46
50
|
} | {
|
|
@@ -130,6 +134,8 @@ export type LemmyErrorType = {
|
|
|
130
134
|
error: "rate_limit_error";
|
|
131
135
|
} | {
|
|
132
136
|
error: "invalid_name";
|
|
137
|
+
} | {
|
|
138
|
+
error: "invalid_code_verifier";
|
|
133
139
|
} | {
|
|
134
140
|
error: "invalid_display_name";
|
|
135
141
|
} | {
|
|
@@ -189,7 +195,7 @@ export type LemmyErrorType = {
|
|
|
189
195
|
} | {
|
|
190
196
|
error: "couldnt_update_replies";
|
|
191
197
|
} | {
|
|
192
|
-
error: "
|
|
198
|
+
error: "couldnt_update_person_comment_mentions";
|
|
193
199
|
} | {
|
|
194
200
|
error: "couldnt_create_post";
|
|
195
201
|
} | {
|
|
@@ -202,8 +208,6 @@ export type LemmyErrorType = {
|
|
|
202
208
|
error: "couldnt_set_all_registrations_accepted";
|
|
203
209
|
} | {
|
|
204
210
|
error: "couldnt_set_all_email_verified";
|
|
205
|
-
} | {
|
|
206
|
-
error: "banned";
|
|
207
211
|
} | {
|
|
208
212
|
error: "blocked_url";
|
|
209
213
|
} | {
|
|
@@ -6,6 +6,11 @@ import type { ListingType } from "./ListingType";
|
|
|
6
6
|
export type ListCommunities = {
|
|
7
7
|
type_?: ListingType;
|
|
8
8
|
sort?: CommunitySortType;
|
|
9
|
+
/**
|
|
10
|
+
* Filter to within a given time range, in seconds.
|
|
11
|
+
* IE 60 would give results for the past minute.
|
|
12
|
+
*/
|
|
13
|
+
time_range_seconds?: number;
|
|
9
14
|
show_nsfw?: boolean;
|
|
10
15
|
page?: number;
|
|
11
16
|
limit?: number;
|