lemmy-js-client 0.20.0-api-v4.17 → 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.
Files changed (221) hide show
  1. package/README.md +13 -4
  2. package/dist/http.d.ts +237 -430
  3. package/dist/http.js +1225 -411
  4. package/dist/index.d.ts +62 -20
  5. package/dist/other_types.d.ts +80 -16
  6. package/dist/types/AdminAllowInstance.d.ts +2 -1
  7. package/dist/types/AdminAllowInstanceId.d.ts +1 -0
  8. package/dist/types/AdminAllowInstanceView.d.ts +1 -1
  9. package/dist/types/AdminBlockInstance.d.ts +2 -1
  10. package/dist/types/AdminBlockInstanceId.d.ts +1 -0
  11. package/dist/types/AdminPurgeComment.d.ts +3 -2
  12. package/dist/types/AdminPurgeCommentId.d.ts +1 -0
  13. package/dist/types/AdminPurgeCommentId.js +3 -0
  14. package/dist/types/AdminPurgeCommunity.d.ts +3 -2
  15. package/dist/types/AdminPurgeCommunityId.d.ts +1 -0
  16. package/dist/types/AdminPurgeCommunityId.js +3 -0
  17. package/dist/types/AdminPurgePerson.d.ts +3 -2
  18. package/dist/types/AdminPurgePersonId.d.ts +1 -0
  19. package/dist/types/AdminPurgePersonId.js +3 -0
  20. package/dist/types/AdminPurgePost.d.ts +3 -2
  21. package/dist/types/AdminPurgePostId.d.ts +1 -0
  22. package/dist/types/AdminPurgePostId.js +3 -0
  23. package/dist/types/AuthenticateWithOauth.d.ts +1 -1
  24. package/dist/types/CommentReplyView.d.ts +5 -1
  25. package/dist/types/CommentReport.d.ts +1 -0
  26. package/dist/types/CommentReportView.d.ts +4 -1
  27. package/dist/types/CommentSlimView.d.ts +24 -0
  28. package/dist/types/CommentView.d.ts +5 -1
  29. package/dist/types/Community.d.ts +2 -2
  30. package/dist/types/CommunityAggregates.d.ts +2 -0
  31. package/dist/types/CommunityReport.d.ts +22 -0
  32. package/dist/types/CommunityReportId.d.ts +4 -0
  33. package/dist/types/CommunityReportId.js +3 -0
  34. package/dist/types/CommunityReportView.d.ts +16 -0
  35. package/dist/types/CommunitySortType.d.ts +1 -1
  36. package/dist/types/CommunityView.d.ts +1 -0
  37. package/dist/types/CreateCommentReport.d.ts +1 -0
  38. package/dist/types/CreateCommunity.d.ts +1 -1
  39. package/dist/types/CreatePost.d.ts +2 -0
  40. package/dist/types/CreatePostReport.d.ts +1 -0
  41. package/dist/types/CreateSite.d.ts +3 -5
  42. package/dist/types/DeleteImageParams.d.ts +3 -0
  43. package/dist/types/DeleteImageParams.js +3 -0
  44. package/dist/types/EditCommunity.d.ts +1 -9
  45. package/dist/types/EditPost.d.ts +2 -0
  46. package/dist/types/EditSite.d.ts +11 -18
  47. package/dist/types/FederationError.d.ts +2 -2
  48. package/dist/types/GetComments.d.ts +5 -1
  49. package/dist/types/GetCommentsSlimResponse.d.ts +7 -0
  50. package/dist/types/GetModlog.d.ts +27 -2
  51. package/dist/types/GetModlogResponse.d.ts +2 -34
  52. package/dist/types/GetPersonDetails.d.ts +0 -7
  53. package/dist/types/GetPersonDetailsResponse.d.ts +0 -4
  54. package/dist/types/GetPostResponse.d.ts +0 -2
  55. package/dist/types/GetPosts.d.ts +12 -0
  56. package/dist/types/GetRandomCommunity.d.ts +1 -0
  57. package/dist/types/GetReportCountResponse.d.ts +1 -5
  58. package/dist/types/GetReportCountResponse.js +1 -0
  59. package/dist/types/GetSiteResponse.d.ts +3 -10
  60. package/dist/types/GetUnreadCountResponse.d.ts +2 -4
  61. package/dist/types/ImageDetails.d.ts +1 -0
  62. package/dist/types/ImageGetParams.d.ts +4 -0
  63. package/dist/types/ImageGetParams.js +3 -0
  64. package/dist/types/ImageProxyParams.d.ts +5 -0
  65. package/dist/types/ImageProxyParams.js +3 -0
  66. package/dist/types/InboxCombinedPaginationCursor.d.ts +4 -0
  67. package/dist/types/InboxCombinedPaginationCursor.js +3 -0
  68. package/dist/types/InboxCombinedView.d.ts +13 -0
  69. package/dist/types/InboxDataType.d.ts +4 -0
  70. package/dist/types/InboxDataType.js +3 -0
  71. package/dist/types/LemmyErrorType.d.ts +5 -3
  72. package/dist/types/ListCommunities.d.ts +5 -0
  73. package/dist/types/ListInbox.d.ts +11 -0
  74. package/dist/types/ListInboxResponse.d.ts +7 -0
  75. package/dist/types/ListPersonContent.d.ts +18 -0
  76. package/dist/types/ListPersonContentResponse.d.ts +7 -0
  77. package/dist/types/ListPersonSaved.d.ts +10 -0
  78. package/dist/types/ListPersonSavedResponse.d.ts +7 -0
  79. package/dist/types/ListReports.d.ts +35 -0
  80. package/dist/types/ListReportsResponse.d.ts +7 -0
  81. package/dist/types/LocalImage.d.ts +0 -1
  82. package/dist/types/LocalSite.d.ts +9 -0
  83. package/dist/types/LocalUser.d.ts +13 -0
  84. package/dist/types/MarkPersonCommentMentionAsRead.d.ts +8 -0
  85. package/dist/types/MarkPersonPostMentionAsRead.d.ts +8 -0
  86. package/dist/types/ModAdd.d.ts +3 -2
  87. package/dist/types/ModAddCommunity.d.ts +3 -2
  88. package/dist/types/ModAddCommunityId.d.ts +1 -0
  89. package/dist/types/ModAddCommunityId.js +3 -0
  90. package/dist/types/ModAddCommunityView.d.ts +1 -1
  91. package/dist/types/ModAddId.d.ts +1 -0
  92. package/dist/types/ModAddId.js +3 -0
  93. package/dist/types/ModAddView.d.ts +1 -1
  94. package/dist/types/ModBan.d.ts +3 -2
  95. package/dist/types/ModBanFromCommunity.d.ts +3 -2
  96. package/dist/types/ModBanFromCommunityId.d.ts +1 -0
  97. package/dist/types/ModBanFromCommunityId.js +3 -0
  98. package/dist/types/ModBanFromCommunityView.d.ts +1 -1
  99. package/dist/types/ModBanId.d.ts +1 -0
  100. package/dist/types/ModBanId.js +3 -0
  101. package/dist/types/ModBanView.d.ts +1 -1
  102. package/dist/types/ModFeaturePost.d.ts +3 -2
  103. package/dist/types/ModFeaturePostId.d.ts +1 -0
  104. package/dist/types/ModFeaturePostId.js +3 -0
  105. package/dist/types/ModFeaturePostView.d.ts +1 -0
  106. package/dist/types/ModHideCommunity.d.ts +3 -2
  107. package/dist/types/ModHideCommunityId.d.ts +1 -0
  108. package/dist/types/ModHideCommunityId.js +3 -0
  109. package/dist/types/ModLockPost.d.ts +3 -2
  110. package/dist/types/ModLockPostId.d.ts +1 -0
  111. package/dist/types/ModLockPostId.js +3 -0
  112. package/dist/types/ModLockPostView.d.ts +1 -0
  113. package/dist/types/ModRemoveComment.d.ts +3 -2
  114. package/dist/types/ModRemoveCommentId.d.ts +1 -0
  115. package/dist/types/ModRemoveCommentId.js +3 -0
  116. package/dist/types/ModRemoveCommentView.d.ts +1 -1
  117. package/dist/types/ModRemoveCommunity.d.ts +3 -2
  118. package/dist/types/ModRemoveCommunityId.d.ts +1 -0
  119. package/dist/types/ModRemoveCommunityId.js +3 -0
  120. package/dist/types/ModRemovePost.d.ts +3 -2
  121. package/dist/types/ModRemovePostId.d.ts +1 -0
  122. package/dist/types/ModRemovePostId.js +3 -0
  123. package/dist/types/ModRemovePostView.d.ts +1 -0
  124. package/dist/types/ModTransferCommunity.d.ts +3 -2
  125. package/dist/types/ModTransferCommunityId.d.ts +1 -0
  126. package/dist/types/ModTransferCommunityId.js +3 -0
  127. package/dist/types/ModTransferCommunityView.d.ts +1 -1
  128. package/dist/types/ModlogCombinedPaginationCursor.d.ts +4 -0
  129. package/dist/types/ModlogCombinedPaginationCursor.js +3 -0
  130. package/dist/types/ModlogCombinedView.d.ts +52 -0
  131. package/dist/types/Person.d.ts +2 -2
  132. package/dist/types/PersonAggregates.d.ts +1 -0
  133. package/dist/types/{PersonMention.d.ts → PersonCommentMention.d.ts} +3 -3
  134. package/dist/types/PersonCommentMentionId.d.ts +4 -0
  135. package/dist/types/PersonCommentMentionId.js +3 -0
  136. package/dist/types/{PersonMentionView.d.ts → PersonCommentMentionView.d.ts} +9 -5
  137. package/dist/types/PersonCommentMentionView.js +2 -0
  138. package/dist/types/PersonContentCombinedPaginationCursor.d.ts +4 -0
  139. package/dist/types/PersonContentCombinedPaginationCursor.js +3 -0
  140. package/dist/types/PersonContentCombinedView.d.ts +7 -0
  141. package/dist/types/PersonContentCombinedView.js +2 -0
  142. package/dist/types/PersonContentType.d.ts +4 -0
  143. package/dist/types/PersonContentType.js +3 -0
  144. package/dist/types/PersonPostMention.d.ts +13 -0
  145. package/dist/types/PersonPostMention.js +2 -0
  146. package/dist/types/PersonPostMentionId.d.ts +4 -0
  147. package/dist/types/PersonPostMentionId.js +3 -0
  148. package/dist/types/PersonPostMentionView.d.ts +36 -0
  149. package/dist/types/PersonPostMentionView.js +2 -0
  150. package/dist/types/PersonSavedCombinedPaginationCursor.d.ts +4 -0
  151. package/dist/types/PersonSavedCombinedPaginationCursor.js +3 -0
  152. package/dist/types/PostReport.d.ts +1 -0
  153. package/dist/types/PostReportView.d.ts +4 -1
  154. package/dist/types/PostSortType.d.ts +1 -1
  155. package/dist/types/PostTags.d.ts +7 -0
  156. package/dist/types/PostTags.js +2 -0
  157. package/dist/types/PostView.d.ts +7 -1
  158. package/dist/types/PrivateMessage.d.ts +1 -0
  159. package/dist/types/ReportCombinedPaginationCursor.d.ts +4 -0
  160. package/dist/types/ReportCombinedPaginationCursor.js +3 -0
  161. package/dist/types/ReportCombinedView.d.ts +13 -0
  162. package/dist/types/ReportCombinedView.js +2 -0
  163. package/dist/types/ReportType.d.ts +4 -0
  164. package/dist/types/ReportType.js +3 -0
  165. package/dist/types/ResendVerificationEmail.d.ts +7 -0
  166. package/dist/types/ResendVerificationEmail.js +2 -0
  167. package/dist/types/SaveUserSettings.d.ts +9 -9
  168. package/dist/types/Search.d.ts +12 -7
  169. package/dist/types/SearchCombinedPaginationCursor.d.ts +4 -0
  170. package/dist/types/SearchCombinedPaginationCursor.js +3 -0
  171. package/dist/types/SearchCombinedView.d.ts +13 -0
  172. package/dist/types/SearchCombinedView.js +2 -0
  173. package/dist/types/SearchResponse.d.ts +2 -10
  174. package/dist/types/SearchSortType.d.ts +4 -0
  175. package/dist/types/SearchSortType.js +3 -0
  176. package/dist/types/Site.d.ts +2 -2
  177. package/dist/types/SiteResponse.d.ts +1 -1
  178. package/dist/types/SuccessResponse.d.ts +1 -1
  179. package/dist/types/Tag.d.ts +27 -0
  180. package/dist/types/Tag.js +2 -0
  181. package/dist/types/TagId.d.ts +4 -0
  182. package/dist/types/TagId.js +3 -0
  183. package/dist/types/UploadImageResponse.d.ts +4 -0
  184. package/dist/types/UploadImageResponse.js +3 -0
  185. package/package.json +9 -4
  186. package/dist/types/CommentReplyResponse.d.ts +0 -7
  187. package/dist/types/GetPersonMentions.d.ts +0 -10
  188. package/dist/types/GetPersonMentionsResponse.d.ts +0 -7
  189. package/dist/types/GetPrivateMessages.d.ts +0 -10
  190. package/dist/types/GetReplies.d.ts +0 -10
  191. package/dist/types/GetRepliesResponse.d.ts +0 -7
  192. package/dist/types/ListCommentReports.d.ts +0 -18
  193. package/dist/types/ListCommentReportsResponse.d.ts +0 -7
  194. package/dist/types/ListPostReports.d.ts +0 -18
  195. package/dist/types/ListPostReportsResponse.d.ts +0 -7
  196. package/dist/types/ListPrivateMessageReports.d.ts +0 -11
  197. package/dist/types/ListPrivateMessageReportsResponse.d.ts +0 -7
  198. package/dist/types/MarkPersonMentionAsRead.d.ts +0 -8
  199. package/dist/types/ModlogListParams.d.ts +0 -17
  200. package/dist/types/PersonMentionId.d.ts +0 -4
  201. package/dist/types/PersonMentionResponse.d.ts +0 -7
  202. package/dist/types/PrivateMessagesResponse.d.ts +0 -7
  203. /package/dist/types/{ListPrivateMessageReports.js → AdminAllowInstanceId.js} +0 -0
  204. /package/dist/types/{PersonMentionId.js → AdminBlockInstanceId.js} +0 -0
  205. /package/dist/types/{CommentReplyResponse.js → CommentSlimView.js} +0 -0
  206. /package/dist/types/{GetPersonMentions.js → CommunityReport.js} +0 -0
  207. /package/dist/types/{GetPersonMentionsResponse.js → CommunityReportView.js} +0 -0
  208. /package/dist/types/{GetPrivateMessages.js → GetCommentsSlimResponse.js} +0 -0
  209. /package/dist/types/{GetReplies.js → InboxCombinedView.js} +0 -0
  210. /package/dist/types/{GetRepliesResponse.js → ListInbox.js} +0 -0
  211. /package/dist/types/{ListCommentReports.js → ListInboxResponse.js} +0 -0
  212. /package/dist/types/{ListCommentReportsResponse.js → ListPersonContent.js} +0 -0
  213. /package/dist/types/{ListPostReports.js → ListPersonContentResponse.js} +0 -0
  214. /package/dist/types/{ListPostReportsResponse.js → ListPersonSaved.js} +0 -0
  215. /package/dist/types/{ListPrivateMessageReportsResponse.js → ListPersonSavedResponse.js} +0 -0
  216. /package/dist/types/{MarkPersonMentionAsRead.js → ListReports.js} +0 -0
  217. /package/dist/types/{ModlogListParams.js → ListReportsResponse.js} +0 -0
  218. /package/dist/types/{PersonMention.js → MarkPersonCommentMentionAsRead.js} +0 -0
  219. /package/dist/types/{PersonMentionResponse.js → MarkPersonPostMentionAsRead.js} +0 -0
  220. /package/dist/types/{PersonMentionView.js → ModlogCombinedView.js} +0 -0
  221. /package/dist/types/{PrivateMessagesResponse.js → PersonCommentMention.js} +0 -0
@@ -0,0 +1,18 @@
1
+ import type { PersonContentCombinedPaginationCursor } from "./PersonContentCombinedPaginationCursor";
2
+ import type { PersonContentType } from "./PersonContentType";
3
+ import type { PersonId } from "./PersonId";
4
+ /**
5
+ * Gets a person's content (posts and comments)
6
+ *
7
+ * Either person_id, or username are required.
8
+ */
9
+ export type ListPersonContent = {
10
+ type_?: PersonContentType;
11
+ person_id?: PersonId;
12
+ /**
13
+ * Example: dessalines , or dessalines@xyz.tld
14
+ */
15
+ username?: string;
16
+ page_cursor?: PersonContentCombinedPaginationCursor;
17
+ page_back?: boolean;
18
+ };
@@ -0,0 +1,7 @@
1
+ import type { PersonContentCombinedView } from "./PersonContentCombinedView";
2
+ /**
3
+ * A person's content response.
4
+ */
5
+ export type ListPersonContentResponse = {
6
+ content: Array<PersonContentCombinedView>;
7
+ };
@@ -0,0 +1,10 @@
1
+ import type { PersonContentType } from "./PersonContentType";
2
+ import type { PersonSavedCombinedPaginationCursor } from "./PersonSavedCombinedPaginationCursor";
3
+ /**
4
+ * Gets your saved posts and comments
5
+ */
6
+ export type ListPersonSaved = {
7
+ type_?: PersonContentType;
8
+ page_cursor?: PersonSavedCombinedPaginationCursor;
9
+ page_back?: boolean;
10
+ };
@@ -0,0 +1,7 @@
1
+ import type { PersonContentCombinedView } from "./PersonContentCombinedView";
2
+ /**
3
+ * A person's saved content response.
4
+ */
5
+ export type ListPersonSavedResponse = {
6
+ saved: Array<PersonContentCombinedView>;
7
+ };
@@ -0,0 +1,35 @@
1
+ import type { CommunityId } from "./CommunityId";
2
+ import type { PostId } from "./PostId";
3
+ import type { ReportCombinedPaginationCursor } from "./ReportCombinedPaginationCursor";
4
+ import type { ReportType } from "./ReportType";
5
+ /**
6
+ * List reports.
7
+ */
8
+ export type ListReports = {
9
+ /**
10
+ * Only shows the unresolved reports
11
+ */
12
+ unresolved_only?: boolean;
13
+ /**
14
+ * Filter the type of report.
15
+ */
16
+ type_?: ReportType;
17
+ /**
18
+ * Filter by the post id. Can return either comment or post reports.
19
+ */
20
+ post_id?: PostId;
21
+ /**
22
+ * if no community is given, it returns reports for all communities moderated by the auth user
23
+ */
24
+ community_id?: CommunityId;
25
+ page_cursor?: ReportCombinedPaginationCursor;
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;
35
+ };
@@ -0,0 +1,7 @@
1
+ import type { ReportCombinedView } from "./ReportCombinedView";
2
+ /**
3
+ * The post reports response.
4
+ */
5
+ export type ListReportsResponse = {
6
+ reports: Array<ReportCombinedView>;
7
+ };
@@ -2,6 +2,5 @@ import type { LocalUserId } from "./LocalUserId";
2
2
  export type LocalImage = {
3
3
  local_user_id?: LocalUserId;
4
4
  pictrs_alias: string;
5
- pictrs_delete_token: string;
6
5
  published: string;
7
6
  };
@@ -113,4 +113,13 @@ export type LocalSite = {
113
113
  * What kind of comment downvotes your site allows.
114
114
  */
115
115
  comment_downvotes: FederationMode;
116
+ /**
117
+ * If this is true, users will never see the dialog asking to support Lemmy development with
118
+ * donations.
119
+ */
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;
116
125
  };
@@ -84,4 +84,17 @@ export type LocalUser = {
84
84
  * Whether to automatically mark fetched posts as read.
85
85
  */
86
86
  auto_mark_fetched_posts_as_read: boolean;
87
+ /**
88
+ * The last time a donation request was shown to this user. If this is more than a year ago,
89
+ * a new notification request should be shown.
90
+ */
91
+ last_donation_notification: string;
92
+ /**
93
+ * Whether to hide posts containing images/videos
94
+ */
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;
87
100
  };
@@ -0,0 +1,8 @@
1
+ import type { PersonCommentMentionId } from "./PersonCommentMentionId";
2
+ /**
3
+ * Mark a person mention as read.
4
+ */
5
+ export type MarkPersonCommentMentionAsRead = {
6
+ person_comment_mention_id: PersonCommentMentionId;
7
+ read: boolean;
8
+ };
@@ -0,0 +1,8 @@
1
+ import type { PersonPostMentionId } from "./PersonPostMentionId";
2
+ /**
3
+ * Mark a person mention as read.
4
+ */
5
+ export type MarkPersonPostMentionAsRead = {
6
+ person_post_mention_id: PersonPostMentionId;
7
+ read: boolean;
8
+ };
@@ -1,11 +1,12 @@
1
+ import type { ModAddId } from "./ModAddId";
1
2
  import type { PersonId } from "./PersonId";
2
3
  /**
3
4
  * When someone is added as a site moderator.
4
5
  */
5
6
  export type ModAdd = {
6
- id: number;
7
+ id: ModAddId;
7
8
  mod_person_id: PersonId;
8
9
  other_person_id: PersonId;
9
10
  removed: boolean;
10
- when_: string;
11
+ published: string;
11
12
  };
@@ -1,13 +1,14 @@
1
1
  import type { CommunityId } from "./CommunityId";
2
+ import type { ModAddCommunityId } from "./ModAddCommunityId";
2
3
  import type { PersonId } from "./PersonId";
3
4
  /**
4
5
  * When someone is added as a community moderator.
5
6
  */
6
7
  export type ModAddCommunity = {
7
- id: number;
8
+ id: ModAddCommunityId;
8
9
  mod_person_id: PersonId;
9
10
  other_person_id: PersonId;
10
11
  community_id: CommunityId;
11
12
  removed: boolean;
12
- when_: string;
13
+ published: string;
13
14
  };
@@ -0,0 +1 @@
1
+ export type ModAddCommunityId = number;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -8,5 +8,5 @@ export type ModAddCommunityView = {
8
8
  mod_add_community: ModAddCommunity;
9
9
  moderator?: Person;
10
10
  community: Community;
11
- modded_person: Person;
11
+ other_person: Person;
12
12
  };
@@ -0,0 +1 @@
1
+ export type ModAddId = number;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -6,5 +6,5 @@ import type { Person } from "./Person";
6
6
  export type ModAddView = {
7
7
  mod_add: ModAdd;
8
8
  moderator?: Person;
9
- modded_person: Person;
9
+ other_person: Person;
10
10
  };
@@ -1,13 +1,14 @@
1
+ import type { ModBanId } from "./ModBanId";
1
2
  import type { PersonId } from "./PersonId";
2
3
  /**
3
4
  * When someone is banned from the site.
4
5
  */
5
6
  export type ModBan = {
6
- id: number;
7
+ id: ModBanId;
7
8
  mod_person_id: PersonId;
8
9
  other_person_id: PersonId;
9
10
  reason?: string;
10
11
  banned: boolean;
11
12
  expires?: string;
12
- when_: string;
13
+ published: string;
13
14
  };
@@ -1,15 +1,16 @@
1
1
  import type { CommunityId } from "./CommunityId";
2
+ import type { ModBanFromCommunityId } from "./ModBanFromCommunityId";
2
3
  import type { PersonId } from "./PersonId";
3
4
  /**
4
5
  * When someone is banned from a community.
5
6
  */
6
7
  export type ModBanFromCommunity = {
7
- id: number;
8
+ id: ModBanFromCommunityId;
8
9
  mod_person_id: PersonId;
9
10
  other_person_id: PersonId;
10
11
  community_id: CommunityId;
11
12
  reason?: string;
12
13
  banned: boolean;
13
14
  expires?: string;
14
- when_: string;
15
+ published: string;
15
16
  };
@@ -0,0 +1 @@
1
+ export type ModBanFromCommunityId = number;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -8,5 +8,5 @@ export type ModBanFromCommunityView = {
8
8
  mod_ban_from_community: ModBanFromCommunity;
9
9
  moderator?: Person;
10
10
  community: Community;
11
- banned_person: Person;
11
+ other_person: Person;
12
12
  };
@@ -0,0 +1 @@
1
+ export type ModBanId = number;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -6,5 +6,5 @@ import type { Person } from "./Person";
6
6
  export type ModBanView = {
7
7
  mod_ban: ModBan;
8
8
  moderator?: Person;
9
- banned_person: Person;
9
+ other_person: Person;
10
10
  };
@@ -1,13 +1,14 @@
1
+ import type { ModFeaturePostId } from "./ModFeaturePostId";
1
2
  import type { PersonId } from "./PersonId";
2
3
  import type { PostId } from "./PostId";
3
4
  /**
4
5
  * When a moderator features a post on a community (pins it to the top).
5
6
  */
6
7
  export type ModFeaturePost = {
7
- id: number;
8
+ id: ModFeaturePostId;
8
9
  mod_person_id: PersonId;
9
10
  post_id: PostId;
10
11
  featured: boolean;
11
- when_: string;
12
+ published: string;
12
13
  is_featured_community: boolean;
13
14
  };
@@ -0,0 +1 @@
1
+ export type ModFeaturePostId = number;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -8,6 +8,7 @@ import type { Post } from "./Post";
8
8
  export type ModFeaturePostView = {
9
9
  mod_feature_post: ModFeaturePost;
10
10
  moderator?: Person;
11
+ other_person: Person;
11
12
  post: Post;
12
13
  community: Community;
13
14
  };
@@ -1,13 +1,14 @@
1
1
  import type { CommunityId } from "./CommunityId";
2
+ import type { ModHideCommunityId } from "./ModHideCommunityId";
2
3
  import type { PersonId } from "./PersonId";
3
4
  /**
4
5
  * When a community is hidden from public view.
5
6
  */
6
7
  export type ModHideCommunity = {
7
- id: number;
8
+ id: ModHideCommunityId;
8
9
  community_id: CommunityId;
9
10
  mod_person_id: PersonId;
10
- when_: string;
11
+ published: string;
11
12
  reason?: string;
12
13
  hidden: boolean;
13
14
  };
@@ -0,0 +1 @@
1
+ export type ModHideCommunityId = number;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,12 +1,13 @@
1
+ import type { ModLockPostId } from "./ModLockPostId";
1
2
  import type { PersonId } from "./PersonId";
2
3
  import type { PostId } from "./PostId";
3
4
  /**
4
5
  * When a moderator locks a post (prevents new comments being made).
5
6
  */
6
7
  export type ModLockPost = {
7
- id: number;
8
+ id: ModLockPostId;
8
9
  mod_person_id: PersonId;
9
10
  post_id: PostId;
10
11
  locked: boolean;
11
- when_: string;
12
+ published: string;
12
13
  };
@@ -0,0 +1 @@
1
+ export type ModLockPostId = number;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -8,6 +8,7 @@ import type { Post } from "./Post";
8
8
  export type ModLockPostView = {
9
9
  mod_lock_post: ModLockPost;
10
10
  moderator?: Person;
11
+ other_person: Person;
11
12
  post: Post;
12
13
  community: Community;
13
14
  };
@@ -1,13 +1,14 @@
1
1
  import type { CommentId } from "./CommentId";
2
+ import type { ModRemoveCommentId } from "./ModRemoveCommentId";
2
3
  import type { PersonId } from "./PersonId";
3
4
  /**
4
5
  * When a moderator removes a comment.
5
6
  */
6
7
  export type ModRemoveComment = {
7
- id: number;
8
+ id: ModRemoveCommentId;
8
9
  mod_person_id: PersonId;
9
10
  comment_id: CommentId;
10
11
  reason?: string;
11
12
  removed: boolean;
12
- when_: string;
13
+ published: string;
13
14
  };
@@ -0,0 +1 @@
1
+ export type ModRemoveCommentId = number;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -9,8 +9,8 @@ import type { Post } from "./Post";
9
9
  export type ModRemoveCommentView = {
10
10
  mod_remove_comment: ModRemoveComment;
11
11
  moderator?: Person;
12
+ other_person: Person;
12
13
  comment: Comment;
13
- commenter: Person;
14
14
  post: Post;
15
15
  community: Community;
16
16
  };
@@ -1,13 +1,14 @@
1
1
  import type { CommunityId } from "./CommunityId";
2
+ import type { ModRemoveCommunityId } from "./ModRemoveCommunityId";
2
3
  import type { PersonId } from "./PersonId";
3
4
  /**
4
5
  * When a moderator removes a community.
5
6
  */
6
7
  export type ModRemoveCommunity = {
7
- id: number;
8
+ id: ModRemoveCommunityId;
8
9
  mod_person_id: PersonId;
9
10
  community_id: CommunityId;
10
11
  reason?: string;
11
12
  removed: boolean;
12
- when_: string;
13
+ published: string;
13
14
  };
@@ -0,0 +1 @@
1
+ export type ModRemoveCommunityId = number;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,13 +1,14 @@
1
+ import type { ModRemovePostId } from "./ModRemovePostId";
1
2
  import type { PersonId } from "./PersonId";
2
3
  import type { PostId } from "./PostId";
3
4
  /**
4
5
  * When a moderator removes a post.
5
6
  */
6
7
  export type ModRemovePost = {
7
- id: number;
8
+ id: ModRemovePostId;
8
9
  mod_person_id: PersonId;
9
10
  post_id: PostId;
10
11
  reason?: string;
11
12
  removed: boolean;
12
- when_: string;
13
+ published: string;
13
14
  };
@@ -0,0 +1 @@
1
+ export type ModRemovePostId = number;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -8,6 +8,7 @@ import type { Post } from "./Post";
8
8
  export type ModRemovePostView = {
9
9
  mod_remove_post: ModRemovePost;
10
10
  moderator?: Person;
11
+ other_person: Person;
11
12
  post: Post;
12
13
  community: Community;
13
14
  };
@@ -1,12 +1,13 @@
1
1
  import type { CommunityId } from "./CommunityId";
2
+ import type { ModTransferCommunityId } from "./ModTransferCommunityId";
2
3
  import type { PersonId } from "./PersonId";
3
4
  /**
4
5
  * When a moderator transfers a community to a new owner.
5
6
  */
6
7
  export type ModTransferCommunity = {
7
- id: number;
8
+ id: ModTransferCommunityId;
8
9
  mod_person_id: PersonId;
9
10
  other_person_id: PersonId;
10
11
  community_id: CommunityId;
11
- when_: string;
12
+ published: string;
12
13
  };
@@ -0,0 +1 @@
1
+ export type ModTransferCommunityId = number;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -8,5 +8,5 @@ export type ModTransferCommunityView = {
8
8
  mod_transfer_community: ModTransferCommunity;
9
9
  moderator?: Person;
10
10
  community: Community;
11
- modded_person: Person;
11
+ other_person: Person;
12
12
  };
@@ -0,0 +1,4 @@
1
+ /**
2
+ * like PaginationCursor but for the modlog_combined
3
+ */
4
+ export type ModlogCombinedPaginationCursor = string;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,52 @@
1
+ import type { AdminAllowInstanceView } from "./AdminAllowInstanceView";
2
+ import type { AdminBlockInstanceView } from "./AdminBlockInstanceView";
3
+ import type { AdminPurgeCommentView } from "./AdminPurgeCommentView";
4
+ import type { AdminPurgeCommunityView } from "./AdminPurgeCommunityView";
5
+ import type { AdminPurgePersonView } from "./AdminPurgePersonView";
6
+ import type { AdminPurgePostView } from "./AdminPurgePostView";
7
+ import type { ModAddCommunityView } from "./ModAddCommunityView";
8
+ import type { ModAddView } from "./ModAddView";
9
+ import type { ModBanFromCommunityView } from "./ModBanFromCommunityView";
10
+ import type { ModBanView } from "./ModBanView";
11
+ import type { 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";
18
+ export type ModlogCombinedView = ({
19
+ type_: "AdminAllowInstance";
20
+ } & AdminAllowInstanceView) | ({
21
+ type_: "AdminBlockInstance";
22
+ } & AdminBlockInstanceView) | ({
23
+ type_: "AdminPurgeComment";
24
+ } & AdminPurgeCommentView) | ({
25
+ type_: "AdminPurgeCommunity";
26
+ } & AdminPurgeCommunityView) | ({
27
+ type_: "AdminPurgePerson";
28
+ } & AdminPurgePersonView) | ({
29
+ type_: "AdminPurgePost";
30
+ } & AdminPurgePostView) | ({
31
+ type_: "ModAdd";
32
+ } & ModAddView) | ({
33
+ type_: "ModAddCommunity";
34
+ } & ModAddCommunityView) | ({
35
+ type_: "ModBan";
36
+ } & ModBanView) | ({
37
+ type_: "ModBanFromCommunity";
38
+ } & ModBanFromCommunityView) | ({
39
+ type_: "ModFeaturePost";
40
+ } & ModFeaturePostView) | ({
41
+ type_: "ModHideCommunity";
42
+ } & ModHideCommunityView) | ({
43
+ type_: "ModLockPost";
44
+ } & ModLockPostView) | ({
45
+ type_: "ModRemoveComment";
46
+ } & ModRemoveCommentView) | ({
47
+ type_: "ModRemoveCommunity";
48
+ } & ModRemoveCommunityView) | ({
49
+ type_: "ModRemovePost";
50
+ } & ModRemovePostView) | ({
51
+ type_: "ModTransferCommunity";
52
+ } & ModTransferCommunityView);
@@ -22,9 +22,9 @@ export type Person = {
22
22
  published: string;
23
23
  updated?: string;
24
24
  /**
25
- * The federated actor_id.
25
+ * The federated ap_id.
26
26
  */
27
- actor_id: DbUrl;
27
+ ap_id: DbUrl;
28
28
  /**
29
29
  * An optional bio, in markdown.
30
30
  */
@@ -6,4 +6,5 @@ export type PersonAggregates = {
6
6
  person_id: PersonId;
7
7
  post_count: number;
8
8
  comment_count: number;
9
+ published: string;
9
10
  };
@@ -1,11 +1,11 @@
1
1
  import type { CommentId } from "./CommentId";
2
+ import type { PersonCommentMentionId } from "./PersonCommentMentionId";
2
3
  import type { PersonId } from "./PersonId";
3
- import type { PersonMentionId } from "./PersonMentionId";
4
4
  /**
5
5
  * A person mention.
6
6
  */
7
- export type PersonMention = {
8
- id: PersonMentionId;
7
+ export type PersonCommentMention = {
8
+ id: PersonCommentMentionId;
9
9
  recipient_id: PersonId;
10
10
  comment_id: CommentId;
11
11
  read: boolean;
@@ -0,0 +1,4 @@
1
+ /**
2
+ * The person comment mention id.
3
+ */
4
+ export type PersonCommentMentionId = number;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
3
+ Object.defineProperty(exports, "__esModule", { value: true });