lemmy-js-client 1.0.0-post-tags.0 → 1.0.0-site-person-ban.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.
Files changed (131) hide show
  1. package/README.md +12 -3
  2. package/dist/http.d.ts +8 -30
  3. package/dist/http.js +119 -145
  4. package/dist/index.d.ts +15 -24
  5. package/dist/other_types.d.ts +3 -0
  6. package/dist/types/BannedPersonsResponse.d.ts +5 -0
  7. package/dist/types/Comment.d.ts +9 -0
  8. package/dist/types/CommentActions.d.ts +18 -0
  9. package/dist/types/CommentReplyView.d.ts +12 -11
  10. package/dist/types/CommentReport.d.ts +1 -0
  11. package/dist/types/CommentReportView.d.ts +8 -10
  12. package/dist/types/CommentSlimView.d.ts +10 -10
  13. package/dist/types/CommentView.d.ts +11 -10
  14. package/dist/types/Community.d.ts +25 -6
  15. package/dist/types/CommunityActions.d.ts +35 -0
  16. package/dist/types/CommunityReportResponse.d.ts +7 -0
  17. package/dist/types/CommunityReportView.d.ts +0 -4
  18. package/dist/types/CommunitySortType.d.ts +1 -1
  19. package/dist/types/CommunityView.d.ts +5 -6
  20. package/dist/types/CommunityVisibility.d.ts +1 -1
  21. package/dist/types/CreateCommentReport.d.ts +1 -0
  22. package/dist/types/CreateCommunityReport.d.ts +8 -0
  23. package/dist/types/CreatePostReport.d.ts +1 -0
  24. package/dist/types/CreateSite.d.ts +2 -0
  25. package/dist/types/EditPost.d.ts +2 -0
  26. package/dist/types/EditSite.d.ts +8 -0
  27. package/dist/types/FederationError.d.ts +1 -1
  28. package/dist/types/GetComments.d.ts +5 -0
  29. package/dist/types/GetModlog.d.ts +26 -2
  30. package/dist/types/GetModlogResponse.d.ts +5 -0
  31. package/dist/types/GetPostResponse.d.ts +0 -2
  32. package/dist/types/GetPosts.d.ts +8 -2
  33. package/dist/types/GetPostsResponse.d.ts +2 -2
  34. package/dist/types/GetSiteResponse.d.ts +2 -2
  35. package/dist/types/ImageDetails.d.ts +1 -0
  36. package/dist/types/Instance.d.ts +9 -0
  37. package/dist/types/InstanceActions.d.ts +18 -0
  38. package/dist/types/InstanceWithFederationState.d.ts +9 -0
  39. package/dist/types/LemmyErrorType.d.ts +6 -4
  40. package/dist/types/ListBannedPersons.d.ts +9 -0
  41. package/dist/types/ListCommunities.d.ts +5 -0
  42. package/dist/types/ListInbox.d.ts +2 -2
  43. package/dist/types/ListInboxResponse.d.ts +5 -0
  44. package/dist/types/ListPersonContent.d.ts +2 -2
  45. package/dist/types/ListPersonContentResponse.d.ts +5 -0
  46. package/dist/types/ListPersonSaved.d.ts +2 -2
  47. package/dist/types/ListPersonSavedResponse.d.ts +7 -2
  48. package/dist/types/ListReports.d.ts +10 -2
  49. package/dist/types/ListReportsResponse.d.ts +5 -0
  50. package/dist/types/LocalSite.d.ts +28 -0
  51. package/dist/types/LocalUser.d.ts +8 -0
  52. package/dist/types/LocalUserView.d.ts +2 -4
  53. package/dist/types/ModBan.d.ts +2 -0
  54. package/dist/types/ModChangeCommunityVisibility.d.ts +12 -0
  55. package/dist/types/ModChangeCommunityVisibilityId.d.ts +1 -0
  56. package/dist/types/ModChangeCommunityVisibilityView.d.ts +11 -0
  57. package/dist/types/ModlogActionType.d.ts +1 -1
  58. package/dist/types/ModlogCombinedView.d.ts +3 -3
  59. package/dist/types/PaginationCursor.d.ts +1 -4
  60. package/dist/types/PendingFollow.d.ts +2 -2
  61. package/dist/types/Person.d.ts +4 -10
  62. package/dist/types/PersonActions.d.ts +9 -0
  63. package/dist/types/PersonCommentMentionView.d.ts +12 -11
  64. package/dist/types/PersonPostMentionView.d.ts +12 -16
  65. package/dist/types/PersonSavedCombinedView.d.ts +7 -0
  66. package/dist/types/PersonView.d.ts +3 -2
  67. package/dist/types/Post.d.ts +10 -0
  68. package/dist/types/PostActions.d.ts +35 -0
  69. package/dist/types/PostPaginationCursor.d.ts +7 -0
  70. package/dist/types/PostReport.d.ts +1 -0
  71. package/dist/types/PostReportView.d.ts +8 -13
  72. package/dist/types/PostSortType.d.ts +1 -1
  73. package/dist/types/PostView.d.ts +11 -15
  74. package/dist/types/PrivateMessage.d.ts +1 -0
  75. package/dist/types/PrivateMessageReportView.d.ts +1 -1
  76. package/dist/types/ResendVerificationEmail.d.ts +7 -0
  77. package/dist/types/ResolveCommunityReport.d.ts +8 -0
  78. package/dist/types/SaveUserSettings.d.ts +4 -0
  79. package/dist/types/Search.d.ts +7 -2
  80. package/dist/types/SearchResponse.d.ts +5 -0
  81. package/dist/types/Site.d.ts +2 -2
  82. package/dist/types/SiteView.d.ts +2 -2
  83. package/package.json +3 -3
  84. package/dist/types/CommentAggregates.d.ts +0 -17
  85. package/dist/types/CommunityAggregates.d.ts +0 -30
  86. package/dist/types/CommunityTagResponse.d.ts +0 -7
  87. package/dist/types/CreateCommunityTag.d.ts +0 -9
  88. package/dist/types/DeleteCommunityTag.d.ts +0 -7
  89. package/dist/types/InboxCombinedPaginationCursor.d.ts +0 -4
  90. package/dist/types/ListCommunityTags.d.ts +0 -7
  91. package/dist/types/ListCommunityTagsResponse.d.ts +0 -4
  92. package/dist/types/LocalUserVoteDisplayMode.d.ts +0 -9
  93. package/dist/types/ModHideCommunity.d.ts +0 -14
  94. package/dist/types/ModHideCommunityId.d.ts +0 -1
  95. package/dist/types/ModHideCommunityId.js +0 -3
  96. package/dist/types/ModHideCommunityView.d.ts +0 -11
  97. package/dist/types/ModlogCombinedPaginationCursor.d.ts +0 -4
  98. package/dist/types/ModlogCombinedPaginationCursor.js +0 -3
  99. package/dist/types/PersonAggregates.d.ts +0 -9
  100. package/dist/types/PersonContentCombinedPaginationCursor.d.ts +0 -4
  101. package/dist/types/PersonContentCombinedPaginationCursor.js +0 -3
  102. package/dist/types/PersonSavedCombinedPaginationCursor.d.ts +0 -4
  103. package/dist/types/PersonSavedCombinedPaginationCursor.js +0 -3
  104. package/dist/types/PostAggregates.d.ts +0 -18
  105. package/dist/types/PostTags.d.ts +0 -5
  106. package/dist/types/ReportCombinedPaginationCursor.d.ts +0 -4
  107. package/dist/types/ReportCombinedPaginationCursor.js +0 -3
  108. package/dist/types/SearchCombinedPaginationCursor.d.ts +0 -4
  109. package/dist/types/SearchCombinedPaginationCursor.js +0 -3
  110. package/dist/types/SiteAggregates.d.ts +0 -27
  111. package/dist/types/SubscribedType.d.ts +0 -4
  112. package/dist/types/SubscribedType.js +0 -3
  113. package/dist/types/UpdateCommunityTag.d.ts +0 -8
  114. package/dist/types/UpdateCommunityTag.js +0 -2
  115. package/dist/types/UpdatePostTags.d.ts +0 -9
  116. package/dist/types/UpdatePostTags.js +0 -2
  117. /package/dist/types/{CommentAggregates.js → CommentActions.js} +0 -0
  118. /package/dist/types/{CommunityAggregates.js → CommunityActions.js} +0 -0
  119. /package/dist/types/{CommunityTagResponse.js → CommunityReportResponse.js} +0 -0
  120. /package/dist/types/{CreateCommunityTag.js → CreateCommunityReport.js} +0 -0
  121. /package/dist/types/{DeleteCommunityTag.js → InstanceActions.js} +0 -0
  122. /package/dist/types/{ListCommunityTags.js → ListBannedPersons.js} +0 -0
  123. /package/dist/types/{ListCommunityTagsResponse.js → ModChangeCommunityVisibility.js} +0 -0
  124. /package/dist/types/{InboxCombinedPaginationCursor.js → ModChangeCommunityVisibilityId.js} +0 -0
  125. /package/dist/types/{ModHideCommunity.js → ModChangeCommunityVisibilityView.js} +0 -0
  126. /package/dist/types/{ModHideCommunityView.js → PersonActions.js} +0 -0
  127. /package/dist/types/{PersonAggregates.js → PersonSavedCombinedView.js} +0 -0
  128. /package/dist/types/{PostAggregates.js → PostActions.js} +0 -0
  129. /package/dist/types/{LocalUserVoteDisplayMode.js → PostPaginationCursor.js} +0 -0
  130. /package/dist/types/{PostTags.js → ResendVerificationEmail.js} +0 -0
  131. /package/dist/types/{SiteAggregates.js → ResolveCommunityReport.js} +0 -0
@@ -1,19 +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";
4
- import type { ModlogCombinedPaginationCursor } from "./ModlogCombinedPaginationCursor";
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?: ModlogCombinedPaginationCursor;
41
+ page_cursor?: PaginationCursor;
18
42
  page_back?: boolean;
19
43
  };
@@ -1,7 +1,12 @@
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;
7
12
  };
@@ -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
  */
@@ -1,6 +1,6 @@
1
1
  import type { CommunityId } from "./CommunityId";
2
2
  import type { ListingType } from "./ListingType";
3
- import type { PaginationCursor } from "./PaginationCursor";
3
+ import type { PostPaginationCursor } from "./PostPaginationCursor";
4
4
  import type { PostSortType } from "./PostSortType";
5
5
  /**
6
6
  * Get a list of posts.
@@ -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
  */
@@ -40,6 +46,6 @@ export type GetPosts = {
40
46
  * If true, then only show posts with no comments
41
47
  */
42
48
  no_comments_only?: boolean;
43
- page_cursor?: PaginationCursor;
49
+ page_cursor?: PostPaginationCursor;
44
50
  page_back?: boolean;
45
51
  };
@@ -1,4 +1,4 @@
1
- import type { PaginationCursor } from "./PaginationCursor";
1
+ import type { PostPaginationCursor } from "./PostPaginationCursor";
2
2
  import type { PostView } from "./PostView";
3
3
  /**
4
4
  * The post list response.
@@ -8,5 +8,5 @@ export type GetPostsResponse = {
8
8
  /**
9
9
  * the pagination cursor to use to fetch the next page
10
10
  */
11
- next_page?: PaginationCursor;
11
+ next_page?: PostPaginationCursor;
12
12
  };
@@ -22,8 +22,8 @@ export type GetSiteResponse = {
22
22
  /**
23
23
  * A list of external auth methods your site supports.
24
24
  */
25
- oauth_providers?: Array<PublicOAuthProvider>;
26
- admin_oauth_providers?: Array<OAuthProvider>;
25
+ oauth_providers: Array<PublicOAuthProvider>;
26
+ admin_oauth_providers: Array<OAuthProvider>;
27
27
  blocked_urls: Array<LocalSiteUrlBlocklist>;
28
28
  image_upload_disabled: boolean;
29
29
  };
@@ -4,4 +4,5 @@ export type ImageDetails = {
4
4
  width: number;
5
5
  height: number;
6
6
  content_type: string;
7
+ blurhash?: string;
7
8
  };
@@ -6,7 +6,16 @@ export type Instance = {
6
6
  id: InstanceId;
7
7
  domain: string;
8
8
  published: string;
9
+ /**
10
+ * When the instance was updated.
11
+ */
9
12
  updated?: string;
13
+ /**
14
+ * The software of the instance.
15
+ */
10
16
  software?: string;
17
+ /**
18
+ * The version of the instance's software.
19
+ */
11
20
  version?: string;
12
21
  };
@@ -0,0 +1,18 @@
1
+ import type { InstanceId } from "./InstanceId";
2
+ import type { PersonId } from "./PersonId";
3
+ export type InstanceActions = {
4
+ person_id: PersonId;
5
+ instance_id: InstanceId;
6
+ /**
7
+ * When the instance was blocked.
8
+ */
9
+ blocked?: string;
10
+ /**
11
+ * When this user received a site ban.
12
+ */
13
+ received_ban?: string;
14
+ /**
15
+ * When their ban expires.
16
+ */
17
+ ban_expires?: string;
18
+ };
@@ -9,7 +9,16 @@ export type InstanceWithFederationState = {
9
9
  id: InstanceId;
10
10
  domain: string;
11
11
  published: string;
12
+ /**
13
+ * When the instance was updated.
14
+ */
12
15
  updated?: string;
16
+ /**
17
+ * The software of the instance.
18
+ */
13
19
  software?: string;
20
+ /**
21
+ * The version of the instance's software.
22
+ */
14
23
  version?: string;
15
24
  };
@@ -95,6 +95,8 @@ export type LemmyErrorType = {
95
95
  error: "couldnt_update_post";
96
96
  } | {
97
97
  error: "no_post_edit_allowed";
98
+ } | {
99
+ error: "nsfw_not_allowed";
98
100
  } | {
99
101
  error: "edit_private_message_not_allowed";
100
102
  } | {
@@ -125,8 +127,6 @@ export type LemmyErrorType = {
125
127
  error: "no_email_setup";
126
128
  } | {
127
129
  error: "local_site_not_setup";
128
- } | {
129
- error: "email_smtp_server_needs_a_port";
130
130
  } | {
131
131
  error: "invalid_email_address";
132
132
  message: string;
@@ -176,8 +176,6 @@ export type LemmyErrorType = {
176
176
  error: "community_block_already_exists";
177
177
  } | {
178
178
  error: "community_follower_already_exists";
179
- } | {
180
- error: "couldnt_update_community_hidden_status";
181
179
  } | {
182
180
  error: "person_block_already_exists";
183
181
  } | {
@@ -188,6 +186,8 @@ export type LemmyErrorType = {
188
186
  error: "couldnt_save_post";
189
187
  } | {
190
188
  error: "couldnt_mark_post_as_read";
189
+ } | {
190
+ error: "couldnt_update_read_comments";
191
191
  } | {
192
192
  error: "couldnt_hide_post";
193
193
  } | {
@@ -285,4 +285,6 @@ export type LemmyErrorType = {
285
285
  message: {
286
286
  error?: FederationError;
287
287
  };
288
+ } | {
289
+ error: "couldnt_parse_pagination_token";
288
290
  };
@@ -0,0 +1,9 @@
1
+ import type { PaginationCursor } from "./PaginationCursor";
2
+ /**
3
+ * List the banned persons.
4
+ */
5
+ export type ListBannedPersons = {
6
+ page_cursor?: PaginationCursor;
7
+ page_back?: boolean;
8
+ limit?: number;
9
+ };
@@ -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;
@@ -1,11 +1,11 @@
1
- import type { InboxCombinedPaginationCursor } from "./InboxCombinedPaginationCursor";
2
1
  import type { InboxDataType } from "./InboxDataType";
2
+ import type { PaginationCursor } from "./PaginationCursor";
3
3
  /**
4
4
  * Get your inbox (replies, comment mentions, post mentions, and messages)
5
5
  */
6
6
  export type ListInbox = {
7
7
  type_?: InboxDataType;
8
8
  unread_only?: boolean;
9
- page_cursor?: InboxCombinedPaginationCursor;
9
+ page_cursor?: PaginationCursor;
10
10
  page_back?: boolean;
11
11
  };
@@ -1,7 +1,12 @@
1
1
  import type { InboxCombinedView } from "./InboxCombinedView";
2
+ import type { PaginationCursor } from "./PaginationCursor";
2
3
  /**
3
4
  * Get your inbox (replies, comment mentions, post mentions, and messages)
4
5
  */
5
6
  export type ListInboxResponse = {
6
7
  inbox: Array<InboxCombinedView>;
8
+ /**
9
+ * the pagination cursor to use to fetch the next page
10
+ */
11
+ next_page?: PaginationCursor;
7
12
  };
@@ -1,4 +1,4 @@
1
- import type { PersonContentCombinedPaginationCursor } from "./PersonContentCombinedPaginationCursor";
1
+ import type { PaginationCursor } from "./PaginationCursor";
2
2
  import type { PersonContentType } from "./PersonContentType";
3
3
  import type { PersonId } from "./PersonId";
4
4
  /**
@@ -13,6 +13,6 @@ export type ListPersonContent = {
13
13
  * Example: dessalines , or dessalines@xyz.tld
14
14
  */
15
15
  username?: string;
16
- page_cursor?: PersonContentCombinedPaginationCursor;
16
+ page_cursor?: PaginationCursor;
17
17
  page_back?: boolean;
18
18
  };
@@ -1,7 +1,12 @@
1
+ import type { PaginationCursor } from "./PaginationCursor";
1
2
  import type { PersonContentCombinedView } from "./PersonContentCombinedView";
2
3
  /**
3
4
  * A person's content response.
4
5
  */
5
6
  export type ListPersonContentResponse = {
6
7
  content: Array<PersonContentCombinedView>;
8
+ /**
9
+ * the pagination cursor to use to fetch the next page
10
+ */
11
+ next_page?: PaginationCursor;
7
12
  };
@@ -1,10 +1,10 @@
1
+ import type { PaginationCursor } from "./PaginationCursor";
1
2
  import type { PersonContentType } from "./PersonContentType";
2
- import type { PersonSavedCombinedPaginationCursor } from "./PersonSavedCombinedPaginationCursor";
3
3
  /**
4
4
  * Gets your saved posts and comments
5
5
  */
6
6
  export type ListPersonSaved = {
7
7
  type_?: PersonContentType;
8
- page_cursor?: PersonSavedCombinedPaginationCursor;
8
+ page_cursor?: PaginationCursor;
9
9
  page_back?: boolean;
10
10
  };
@@ -1,7 +1,12 @@
1
- import type { PersonContentCombinedView } from "./PersonContentCombinedView";
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<PersonContentCombinedView>;
7
+ saved: Array<PersonSavedCombinedView>;
8
+ /**
9
+ * the pagination cursor to use to fetch the next page
10
+ */
11
+ next_page?: PaginationCursor;
7
12
  };
@@ -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,14 @@ 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?: ReportCombinedPaginationCursor;
25
+ page_cursor?: PaginationCursor;
26
26
  page_back?: boolean;
27
+ /**
28
+ * Only for admins: also show reports with `violates_instance_rules=false`
29
+ */
30
+ show_community_rule_violations?: boolean;
31
+ /**
32
+ * If true, view all your created reports. Works for non-admins/mods also.
33
+ */
34
+ my_reports_only?: boolean;
27
35
  };
@@ -1,7 +1,12 @@
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;
7
12
  };
@@ -118,4 +118,32 @@ export type LocalSite = {
118
118
  * donations.
119
119
  */
120
120
  disable_donation_dialog: boolean;
121
+ /**
122
+ * A default time range limit to apply to post sorts, in seconds.
123
+ */
124
+ default_post_time_range_seconds?: number;
125
+ /**
126
+ * Block NSFW content being created
127
+ */
128
+ disallow_nsfw_content: boolean;
129
+ users: number;
130
+ posts: number;
131
+ comments: number;
132
+ communities: number;
133
+ /**
134
+ * The number of users with any activity in the last day.
135
+ */
136
+ users_active_day: number;
137
+ /**
138
+ * The number of users with any activity in the last week.
139
+ */
140
+ users_active_week: number;
141
+ /**
142
+ * The number of users with any activity in the last month.
143
+ */
144
+ users_active_month: number;
145
+ /**
146
+ * The number of users with any activity in the last half year.
147
+ */
148
+ users_active_half_year: number;
121
149
  };
@@ -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
- counts: PersonAggregates;
10
+ instance_actions?: InstanceActions;
13
11
  };
@@ -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" | "ModHideCommunity" | "AdminPurgePerson" | "AdminPurgeCommunity" | "AdminPurgePost" | "AdminPurgeComment" | "AdminBlockInstance" | "AdminAllowInstance";
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_: "ModHideCommunity";
42
- } & ModHideCommunityView) | ({
41
+ type_: "ModChangeCommunityVisibility";
42
+ } & ModChangeCommunityVisibilityView) | ({
43
43
  type_: "ModLockPost";
44
44
  } & ModLockPostView) | ({
45
45
  type_: "ModRemoveComment";
@@ -1,7 +1,4 @@
1
1
  /**
2
- * currently this is just a wrapper around post id, but should be seen as opaque from the client's
3
- * perspective. stringified since we might want to use arbitrary info later, with a P prepended to
4
- * prevent ossification (api users love to make assumptions (e.g. parse stuff that looks like
5
- * numbers as numbers) about apis that aren't part of the spec
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
- subscribed: SubscribedType;
8
+ follow_state?: CommunityFollowerState;
9
9
  };
@@ -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 actor_id.
21
+ * The federated ap_id.
26
22
  */
27
- actor_id: DbUrl;
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
  };
@@ -0,0 +1,9 @@
1
+ import type { PersonId } from "./PersonId";
2
+ export type PersonActions = {
3
+ target_id: PersonId;
4
+ person_id: PersonId;
5
+ /**
6
+ * When the person was blocked.
7
+ */
8
+ blocked?: string;
9
+ };
@@ -1,27 +1,28 @@
1
1
  import type { Comment } from "./Comment";
2
- import type { CommentAggregates } from "./CommentAggregates";
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
- recipient: Person;
18
- counts: CommentAggregates;
19
- creator_banned_from_community: boolean;
20
- banned_from_community: boolean;
21
- creator_is_moderator: boolean;
20
+ community_actions?: CommunityActions;
21
+ comment_actions?: CommentActions;
22
+ person_actions?: PersonActions;
23
+ instance_actions?: InstanceActions;
24
+ home_instance_actions?: InstanceActions;
25
+ creator_community_actions?: CommunityActions;
22
26
  creator_is_admin: boolean;
23
- subscribed: SubscribedType;
24
- saved: boolean;
25
- creator_blocked: boolean;
26
- my_vote?: number;
27
+ can_mod: boolean;
27
28
  };