lemmy-js-client 1.0.0-block-nsfw.1 → 1.0.0-site-person-ban.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 (103) hide show
  1. package/dist/http.d.ts +2 -2
  2. package/dist/http.js +5 -4
  3. package/dist/index.d.ts +14 -17
  4. package/dist/other_types.d.ts +3 -0
  5. package/dist/types/BannedPersonsResponse.d.ts +5 -0
  6. package/dist/types/Comment.d.ts +9 -0
  7. package/dist/types/CommentActions.d.ts +18 -0
  8. package/dist/types/CommentReplyView.d.ts +10 -14
  9. package/dist/types/CommentReportView.d.ts +8 -13
  10. package/dist/types/CommentSlimView.d.ts +8 -13
  11. package/dist/types/CommentView.d.ts +9 -13
  12. package/dist/types/Community.d.ts +23 -4
  13. package/dist/types/CommunityActions.d.ts +35 -0
  14. package/dist/types/CommunityReportResponse.d.ts +7 -0
  15. package/dist/types/CommunityReportView.d.ts +0 -4
  16. package/dist/types/CommunityView.d.ts +4 -6
  17. package/dist/types/CommunityVisibility.d.ts +1 -1
  18. package/dist/types/CreateCommunityReport.d.ts +8 -0
  19. package/dist/types/CreateSite.d.ts +1 -0
  20. package/dist/types/GetModlog.d.ts +2 -2
  21. package/dist/types/GetModlogResponse.d.ts +5 -0
  22. package/dist/types/GetPosts.d.ts +2 -2
  23. package/dist/types/GetPostsResponse.d.ts +2 -2
  24. package/dist/types/GetSiteResponse.d.ts +2 -2
  25. package/dist/types/Instance.d.ts +9 -0
  26. package/dist/types/InstanceActions.d.ts +18 -0
  27. package/dist/types/InstanceWithFederationState.d.ts +9 -0
  28. package/dist/types/LemmyErrorType.d.ts +6 -4
  29. package/dist/types/ListBannedPersons.d.ts +9 -0
  30. package/dist/types/ListInbox.d.ts +2 -2
  31. package/dist/types/ListInboxResponse.d.ts +5 -0
  32. package/dist/types/ListPersonContent.d.ts +2 -2
  33. package/dist/types/ListPersonContentResponse.d.ts +5 -0
  34. package/dist/types/ListPersonSaved.d.ts +2 -2
  35. package/dist/types/ListPersonSavedResponse.d.ts +7 -2
  36. package/dist/types/ListReports.d.ts +2 -2
  37. package/dist/types/ListReportsResponse.d.ts +5 -0
  38. package/dist/types/LocalSite.d.ts +20 -0
  39. package/dist/types/LocalUser.d.ts +4 -0
  40. package/dist/types/LocalUserView.d.ts +2 -4
  41. package/dist/types/ModBan.d.ts +2 -0
  42. package/dist/types/ModChangeCommunityVisibility.d.ts +12 -0
  43. package/dist/types/ModChangeCommunityVisibilityId.d.ts +1 -0
  44. package/dist/types/ModChangeCommunityVisibilityView.d.ts +11 -0
  45. package/dist/types/ModlogActionType.d.ts +1 -1
  46. package/dist/types/ModlogCombinedView.d.ts +3 -3
  47. package/dist/types/PaginationCursor.d.ts +1 -4
  48. package/dist/types/PendingFollow.d.ts +2 -2
  49. package/dist/types/Person.d.ts +2 -8
  50. package/dist/types/PersonActions.d.ts +9 -0
  51. package/dist/types/PersonActions.js +2 -0
  52. package/dist/types/PersonCommentMentionView.d.ts +10 -14
  53. package/dist/types/PersonPostMentionView.d.ts +10 -19
  54. package/dist/types/PersonSavedCombinedView.d.ts +7 -0
  55. package/dist/types/PersonSavedCombinedView.js +2 -0
  56. package/dist/types/PersonView.d.ts +2 -2
  57. package/dist/types/Post.d.ts +10 -0
  58. package/dist/types/PostActions.d.ts +35 -0
  59. package/dist/types/PostActions.js +2 -0
  60. package/dist/types/PostPaginationCursor.d.ts +7 -0
  61. package/dist/types/PostReportView.d.ts +8 -16
  62. package/dist/types/PostView.d.ts +9 -18
  63. package/dist/types/PrivateMessageReportView.d.ts +1 -1
  64. package/dist/types/ResolveCommunityReport.d.ts +8 -0
  65. package/dist/types/ResolveCommunityReport.js +2 -0
  66. package/dist/types/Search.d.ts +2 -2
  67. package/dist/types/SearchResponse.d.ts +5 -0
  68. package/dist/types/SiteView.d.ts +0 -2
  69. package/package.json +3 -3
  70. package/dist/types/CommentAggregates.d.ts +0 -17
  71. package/dist/types/CommunityAggregates.d.ts +0 -30
  72. package/dist/types/InboxCombinedPaginationCursor.d.ts +0 -4
  73. package/dist/types/LocalUserVoteDisplayMode.d.ts +0 -9
  74. package/dist/types/ModHideCommunity.d.ts +0 -14
  75. package/dist/types/ModHideCommunityId.d.ts +0 -1
  76. package/dist/types/ModHideCommunityId.js +0 -3
  77. package/dist/types/ModHideCommunityView.d.ts +0 -11
  78. package/dist/types/ModlogCombinedPaginationCursor.d.ts +0 -4
  79. package/dist/types/ModlogCombinedPaginationCursor.js +0 -3
  80. package/dist/types/PersonAggregates.d.ts +0 -10
  81. package/dist/types/PersonContentCombinedPaginationCursor.d.ts +0 -4
  82. package/dist/types/PersonContentCombinedPaginationCursor.js +0 -3
  83. package/dist/types/PersonSavedCombinedPaginationCursor.d.ts +0 -4
  84. package/dist/types/PersonSavedCombinedPaginationCursor.js +0 -3
  85. package/dist/types/PostAggregates.d.ts +0 -18
  86. package/dist/types/PostTags.d.ts +0 -7
  87. package/dist/types/ReportCombinedPaginationCursor.d.ts +0 -4
  88. package/dist/types/ReportCombinedPaginationCursor.js +0 -3
  89. package/dist/types/SearchCombinedPaginationCursor.d.ts +0 -4
  90. package/dist/types/SearchCombinedPaginationCursor.js +0 -3
  91. package/dist/types/SiteAggregates.d.ts +0 -27
  92. package/dist/types/SubscribedType.d.ts +0 -4
  93. package/dist/types/SubscribedType.js +0 -3
  94. /package/dist/types/{CommentAggregates.js → CommentActions.js} +0 -0
  95. /package/dist/types/{CommunityAggregates.js → CommunityActions.js} +0 -0
  96. /package/dist/types/{ModHideCommunity.js → CommunityReportResponse.js} +0 -0
  97. /package/dist/types/{ModHideCommunityView.js → CreateCommunityReport.js} +0 -0
  98. /package/dist/types/{PersonAggregates.js → InstanceActions.js} +0 -0
  99. /package/dist/types/{PostAggregates.js → ListBannedPersons.js} +0 -0
  100. /package/dist/types/{PostTags.js → ModChangeCommunityVisibility.js} +0 -0
  101. /package/dist/types/{InboxCombinedPaginationCursor.js → ModChangeCommunityVisibilityId.js} +0 -0
  102. /package/dist/types/{SiteAggregates.js → ModChangeCommunityVisibilityView.js} +0 -0
  103. /package/dist/types/{LocalUserVoteDisplayMode.js → PostPaginationCursor.js} +0 -0
package/dist/http.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Controller } from "tsoa";
2
- import { DeleteImageParamsI, GetCommentI, GetCommentsI, GetCommunityI, GetCommunityPendingFollowsCountI, GetModlogI, GetPersonDetailsI, GetPostI, GetPostsI, GetRandomCommunityI, GetRegistrationApplicationI, GetReportCountI, GetSiteMetadataI, ListCommentLikesI, ListCommunitiesI, ListCommunityPendingFollowsI, ListCustomEmojisI, ListInboxI, ListMediaI, ListPersonContentI, ListPersonSavedI, ListPostLikesI, ListRegistrationApplicationsI, ListReportsI, ListTaglinesI, ResolveObjectI, SearchI, UploadImage } from "./other_types";
2
+ import { DeleteImageParamsI, GetCommentI, GetCommentsI, GetCommunityI, GetCommunityPendingFollowsCountI, GetModlogI, GetPersonDetailsI, GetPostI, GetPostsI, GetRandomCommunityI, GetRegistrationApplicationI, GetReportCountI, GetSiteMetadataI, ListBannedPersonsI, ListCommentLikesI, ListCommunitiesI, ListCommunityPendingFollowsI, ListCustomEmojisI, ListInboxI, ListMediaI, ListPersonContentI, ListPersonSavedI, ListPostLikesI, ListRegistrationApplicationsI, ListReportsI, ListTaglinesI, ResolveObjectI, SearchI, UploadImage } from "./other_types";
3
3
  import { AddAdmin } from "./types/AddAdmin";
4
4
  import { AddAdminResponse } from "./types/AddAdminResponse";
5
5
  import { AddModToCommunity } from "./types/AddModToCommunity";
@@ -468,7 +468,7 @@ export declare class LemmyHttp extends Controller {
468
468
  /**
469
469
  * @summary Get a list of banned users.
470
470
  */
471
- getBannedPersons(options?: RequestOptions): Promise<BannedPersonsResponse>;
471
+ listBannedPersons(form?: ListBannedPersonsI, options?: RequestOptions): Promise<BannedPersonsResponse>;
472
472
  /**
473
473
  * @summary Block a person.
474
474
  */
package/dist/http.js CHANGED
@@ -538,8 +538,8 @@ let LemmyHttp = class LemmyHttp extends tsoa_1.Controller {
538
538
  /**
539
539
  * @summary Get a list of banned users.
540
540
  */
541
- getBannedPersons(options) {
542
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/admin/banned", {}, options);
541
+ listBannedPersons(form = {}, options) {
542
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/admin/banned", form, options);
543
543
  }
544
544
  /**
545
545
  * @summary Block a person.
@@ -1497,8 +1497,9 @@ __decorate([
1497
1497
  (0, tsoa_1.Security)("bearerAuth"),
1498
1498
  (0, tsoa_1.Get)("/admin/banned"),
1499
1499
  (0, tsoa_1.Tags)("Admin", "Miscellaneous"),
1500
- __param(0, (0, tsoa_1.Inject)())
1501
- ], LemmyHttp.prototype, "getBannedPersons", null);
1500
+ __param(0, (0, tsoa_1.Queries)()),
1501
+ __param(1, (0, tsoa_1.Inject)())
1502
+ ], LemmyHttp.prototype, "listBannedPersons", null);
1502
1503
  __decorate([
1503
1504
  (0, tsoa_1.Security)("bearerAuth"),
1504
1505
  (0, tsoa_1.Post)("/account/block/person"),
package/dist/index.d.ts CHANGED
@@ -40,7 +40,7 @@ export { BlockPersonResponse } from "./types/BlockPersonResponse";
40
40
  export { CaptchaResponse } from "./types/CaptchaResponse";
41
41
  export { ChangePassword } from "./types/ChangePassword";
42
42
  export { Comment } from "./types/Comment";
43
- export { CommentAggregates } from "./types/CommentAggregates";
43
+ export { CommentActions } from "./types/CommentActions";
44
44
  export { CommentId } from "./types/CommentId";
45
45
  export { CommentReply } from "./types/CommentReply";
46
46
  export { CommentReplyId } from "./types/CommentReplyId";
@@ -54,13 +54,14 @@ export { CommentSlimView } from "./types/CommentSlimView";
54
54
  export { CommentSortType } from "./types/CommentSortType";
55
55
  export { CommentView } from "./types/CommentView";
56
56
  export { Community } from "./types/Community";
57
- export { CommunityAggregates } from "./types/CommunityAggregates";
57
+ export { CommunityActions } from "./types/CommunityActions";
58
58
  export { CommunityFollowerState } from "./types/CommunityFollowerState";
59
59
  export { CommunityFollowerView } from "./types/CommunityFollowerView";
60
60
  export { CommunityId } from "./types/CommunityId";
61
61
  export { CommunityModeratorView } from "./types/CommunityModeratorView";
62
62
  export { CommunityReport } from "./types/CommunityReport";
63
63
  export { CommunityReportId } from "./types/CommunityReportId";
64
+ export { CommunityReportResponse } from "./types/CommunityReportResponse";
64
65
  export { CommunityReportView } from "./types/CommunityReportView";
65
66
  export { CommunityResponse } from "./types/CommunityResponse";
66
67
  export { CommunitySortType } from "./types/CommunitySortType";
@@ -70,6 +71,7 @@ export { CreateComment } from "./types/CreateComment";
70
71
  export { CreateCommentLike } from "./types/CreateCommentLike";
71
72
  export { CreateCommentReport } from "./types/CreateCommentReport";
72
73
  export { CreateCommunity } from "./types/CreateCommunity";
74
+ export { CreateCommunityReport } from "./types/CreateCommunityReport";
73
75
  export { CreateCustomEmoji } from "./types/CreateCustomEmoji";
74
76
  export { CreateOAuthProvider } from "./types/CreateOAuthProvider";
75
77
  export { CreatePost } from "./types/CreatePost";
@@ -141,16 +143,17 @@ export { HidePost } from "./types/HidePost";
141
143
  export { ImageDetails } from "./types/ImageDetails";
142
144
  export { ImageGetParams } from "./types/ImageGetParams";
143
145
  export { ImageProxyParams } from "./types/ImageProxyParams";
144
- export { InboxCombinedPaginationCursor } from "./types/InboxCombinedPaginationCursor";
145
146
  export { InboxCombinedView } from "./types/InboxCombinedView";
146
147
  export { InboxDataType } from "./types/InboxDataType";
147
148
  export { Instance } from "./types/Instance";
149
+ export { InstanceActions } from "./types/InstanceActions";
148
150
  export { InstanceId } from "./types/InstanceId";
149
151
  export { InstanceWithFederationState } from "./types/InstanceWithFederationState";
150
152
  export { Language } from "./types/Language";
151
153
  export { LanguageId } from "./types/LanguageId";
152
154
  export { LemmyErrorType } from "./types/LemmyErrorType";
153
155
  export { LinkMetadata } from "./types/LinkMetadata";
156
+ export { ListBannedPersons } from "./types/ListBannedPersons";
154
157
  export { ListCommentLikes } from "./types/ListCommentLikes";
155
158
  export { ListCommentLikesResponse } from "./types/ListCommentLikesResponse";
156
159
  export { ListCommunities } from "./types/ListCommunities";
@@ -186,7 +189,6 @@ export { LocalSiteUrlBlocklist } from "./types/LocalSiteUrlBlocklist";
186
189
  export { LocalUser } from "./types/LocalUser";
187
190
  export { LocalUserId } from "./types/LocalUserId";
188
191
  export { LocalUserView } from "./types/LocalUserView";
189
- export { LocalUserVoteDisplayMode } from "./types/LocalUserVoteDisplayMode";
190
192
  export { LockPost } from "./types/LockPost";
191
193
  export { Login } from "./types/Login";
192
194
  export { LoginResponse } from "./types/LoginResponse";
@@ -209,12 +211,12 @@ export { ModBanFromCommunityId } from "./types/ModBanFromCommunityId";
209
211
  export { ModBanFromCommunityView } from "./types/ModBanFromCommunityView";
210
212
  export { ModBanId } from "./types/ModBanId";
211
213
  export { ModBanView } from "./types/ModBanView";
214
+ export { ModChangeCommunityVisibility } from "./types/ModChangeCommunityVisibility";
215
+ export { ModChangeCommunityVisibilityId } from "./types/ModChangeCommunityVisibilityId";
216
+ export { ModChangeCommunityVisibilityView } from "./types/ModChangeCommunityVisibilityView";
212
217
  export { ModFeaturePost } from "./types/ModFeaturePost";
213
218
  export { ModFeaturePostId } from "./types/ModFeaturePostId";
214
219
  export { ModFeaturePostView } from "./types/ModFeaturePostView";
215
- export { ModHideCommunity } from "./types/ModHideCommunity";
216
- export { ModHideCommunityId } from "./types/ModHideCommunityId";
217
- export { ModHideCommunityView } from "./types/ModHideCommunityView";
218
220
  export { ModLockPost } from "./types/ModLockPost";
219
221
  export { ModLockPostId } from "./types/ModLockPostId";
220
222
  export { ModLockPostView } from "./types/ModLockPostView";
@@ -231,7 +233,6 @@ export { ModTransferCommunity } from "./types/ModTransferCommunity";
231
233
  export { ModTransferCommunityId } from "./types/ModTransferCommunityId";
232
234
  export { ModTransferCommunityView } from "./types/ModTransferCommunityView";
233
235
  export { ModlogActionType } from "./types/ModlogActionType";
234
- export { ModlogCombinedPaginationCursor } from "./types/ModlogCombinedPaginationCursor";
235
236
  export { ModlogCombinedView } from "./types/ModlogCombinedView";
236
237
  export { MyUserInfo } from "./types/MyUserInfo";
237
238
  export { OAuthAccount } from "./types/OAuthAccount";
@@ -243,31 +244,30 @@ export { PasswordChangeAfterReset } from "./types/PasswordChangeAfterReset";
243
244
  export { PasswordReset } from "./types/PasswordReset";
244
245
  export { PendingFollow } from "./types/PendingFollow";
245
246
  export { Person } from "./types/Person";
246
- export { PersonAggregates } from "./types/PersonAggregates";
247
+ export { PersonActions } from "./types/PersonActions";
247
248
  export { PersonCommentMention } from "./types/PersonCommentMention";
248
249
  export { PersonCommentMentionId } from "./types/PersonCommentMentionId";
249
250
  export { PersonCommentMentionView } from "./types/PersonCommentMentionView";
250
- export { PersonContentCombinedPaginationCursor } from "./types/PersonContentCombinedPaginationCursor";
251
251
  export { PersonContentCombinedView } from "./types/PersonContentCombinedView";
252
252
  export { PersonContentType } from "./types/PersonContentType";
253
253
  export { PersonId } from "./types/PersonId";
254
254
  export { PersonPostMention } from "./types/PersonPostMention";
255
255
  export { PersonPostMentionId } from "./types/PersonPostMentionId";
256
256
  export { PersonPostMentionView } from "./types/PersonPostMentionView";
257
- export { PersonSavedCombinedPaginationCursor } from "./types/PersonSavedCombinedPaginationCursor";
257
+ export { PersonSavedCombinedView } from "./types/PersonSavedCombinedView";
258
258
  export { PersonView } from "./types/PersonView";
259
259
  export { Post } from "./types/Post";
260
- export { PostAggregates } from "./types/PostAggregates";
260
+ export { PostActions } from "./types/PostActions";
261
261
  export { PostFeatureType } from "./types/PostFeatureType";
262
262
  export { PostId } from "./types/PostId";
263
263
  export { PostListingMode } from "./types/PostListingMode";
264
+ export { PostPaginationCursor } from "./types/PostPaginationCursor";
264
265
  export { PostReport } from "./types/PostReport";
265
266
  export { PostReportId } from "./types/PostReportId";
266
267
  export { PostReportResponse } from "./types/PostReportResponse";
267
268
  export { PostReportView } from "./types/PostReportView";
268
269
  export { PostResponse } from "./types/PostResponse";
269
270
  export { PostSortType } from "./types/PostSortType";
270
- export { PostTags } from "./types/PostTags";
271
271
  export { PostView } from "./types/PostView";
272
272
  export { PrivateMessage } from "./types/PrivateMessage";
273
273
  export { PrivateMessageId } from "./types/PrivateMessageId";
@@ -292,11 +292,11 @@ export { RegistrationMode } from "./types/RegistrationMode";
292
292
  export { RemoveComment } from "./types/RemoveComment";
293
293
  export { RemoveCommunity } from "./types/RemoveCommunity";
294
294
  export { RemovePost } from "./types/RemovePost";
295
- export { ReportCombinedPaginationCursor } from "./types/ReportCombinedPaginationCursor";
296
295
  export { ReportCombinedView } from "./types/ReportCombinedView";
297
296
  export { ReportType } from "./types/ReportType";
298
297
  export { ResendVerificationEmail } from "./types/ResendVerificationEmail";
299
298
  export { ResolveCommentReport } from "./types/ResolveCommentReport";
299
+ export { ResolveCommunityReport } from "./types/ResolveCommunityReport";
300
300
  export { ResolveObject } from "./types/ResolveObject";
301
301
  export { ResolveObjectResponse } from "./types/ResolveObjectResponse";
302
302
  export { ResolvePostReport } from "./types/ResolvePostReport";
@@ -305,18 +305,15 @@ export { SaveComment } from "./types/SaveComment";
305
305
  export { SavePost } from "./types/SavePost";
306
306
  export { SaveUserSettings } from "./types/SaveUserSettings";
307
307
  export { Search } from "./types/Search";
308
- export { SearchCombinedPaginationCursor } from "./types/SearchCombinedPaginationCursor";
309
308
  export { SearchCombinedView } from "./types/SearchCombinedView";
310
309
  export { SearchResponse } from "./types/SearchResponse";
311
310
  export { SearchSortType } from "./types/SearchSortType";
312
311
  export { SearchType } from "./types/SearchType";
313
312
  export { SensitiveString } from "./types/SensitiveString";
314
313
  export { Site } from "./types/Site";
315
- export { SiteAggregates } from "./types/SiteAggregates";
316
314
  export { SiteId } from "./types/SiteId";
317
315
  export { SiteResponse } from "./types/SiteResponse";
318
316
  export { SiteView } from "./types/SiteView";
319
- export { SubscribedType } from "./types/SubscribedType";
320
317
  export { SuccessResponse } from "./types/SuccessResponse";
321
318
  export { Tag } from "./types/Tag";
322
319
  export { TagId } from "./types/TagId";
@@ -11,6 +11,7 @@ import { GetRandomCommunity } from "./types/GetRandomCommunity";
11
11
  import { GetRegistrationApplication } from "./types/GetRegistrationApplication";
12
12
  import { GetReportCount } from "./types/GetReportCount";
13
13
  import { GetSiteMetadata } from "./types/GetSiteMetadata";
14
+ import { ListBannedPersons } from "./types/ListBannedPersons";
14
15
  import { ListCommentLikes } from "./types/ListCommentLikes";
15
16
  import { ListCommunities } from "./types/ListCommunities";
16
17
  import { ListCommunityPendingFollows } from "./types/ListCommunityPendingFollows";
@@ -83,3 +84,5 @@ export interface ListReportsI extends ListReports {
83
84
  }
84
85
  export interface DeleteImageParamsI extends DeleteImageParams {
85
86
  }
87
+ export interface ListBannedPersonsI extends ListBannedPersons {
88
+ }
@@ -1,7 +1,12 @@
1
+ import type { PaginationCursor } from "./PaginationCursor";
1
2
  import type { PersonView } from "./PersonView";
2
3
  /**
3
4
  * The list of banned persons.
4
5
  */
5
6
  export type BannedPersonsResponse = {
6
7
  banned: Array<PersonView>;
8
+ /**
9
+ * the pagination cursor to use to fetch the next page
10
+ */
11
+ next_page?: PaginationCursor;
7
12
  };
@@ -39,4 +39,13 @@ export type Comment = {
39
39
  */
40
40
  distinguished: boolean;
41
41
  language_id: LanguageId;
42
+ score: number;
43
+ upvotes: number;
44
+ downvotes: number;
45
+ /**
46
+ * The total number of children in this comment branch.
47
+ */
48
+ child_count: number;
49
+ report_count: number;
50
+ unresolved_report_count: number;
42
51
  };
@@ -0,0 +1,18 @@
1
+ import type { CommentId } from "./CommentId";
2
+ import type { PersonId } from "./PersonId";
3
+ export type CommentActions = {
4
+ person_id: PersonId;
5
+ comment_id: CommentId;
6
+ /**
7
+ * The like / score for the comment.
8
+ */
9
+ like_score?: number;
10
+ /**
11
+ * When the comment was liked.
12
+ */
13
+ liked?: string;
14
+ /**
15
+ * When the comment was saved.
16
+ */
17
+ saved?: string;
18
+ };
@@ -1,31 +1,27 @@
1
1
  import type { Comment } from "./Comment";
2
- import type { CommentAggregates } from "./CommentAggregates";
2
+ import type { CommentActions } from "./CommentActions";
3
3
  import type { CommentReply } from "./CommentReply";
4
4
  import type { Community } from "./Community";
5
+ import type { CommunityActions } from "./CommunityActions";
6
+ import type { InstanceActions } from "./InstanceActions";
5
7
  import type { Person } from "./Person";
8
+ import type { PersonActions } from "./PersonActions";
6
9
  import type { Post } from "./Post";
7
- import type { SubscribedType } from "./SubscribedType";
8
10
  /**
9
11
  * A comment reply view.
10
12
  */
11
13
  export type CommentReplyView = {
12
14
  comment_reply: CommentReply;
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
+ creator_community_actions?: CommunityActions;
22
25
  creator_is_admin: boolean;
23
- subscribed: SubscribedType;
24
- /**
25
- * The time when the comment was saved.
26
- */
27
- saved?: string;
28
- creator_blocked: boolean;
29
- my_vote?: number;
30
26
  can_mod: boolean;
31
27
  };
@@ -1,10 +1,11 @@
1
1
  import type { Comment } from "./Comment";
2
- import type { CommentAggregates } from "./CommentAggregates";
2
+ import type { CommentActions } from "./CommentActions";
3
3
  import type { CommentReport } from "./CommentReport";
4
4
  import type { Community } from "./Community";
5
+ import type { CommunityActions } from "./CommunityActions";
5
6
  import type { Person } from "./Person";
7
+ import type { PersonActions } from "./PersonActions";
6
8
  import type { Post } from "./Post";
7
- import type { SubscribedType } from "./SubscribedType";
8
9
  /**
9
10
  * A comment report view.
10
11
  */
@@ -15,16 +16,10 @@ export type CommentReportView = {
15
16
  community: Community;
16
17
  creator: Person;
17
18
  comment_creator: Person;
18
- counts: CommentAggregates;
19
- creator_banned_from_community: boolean;
20
- creator_is_moderator: boolean;
21
- creator_is_admin: boolean;
22
- creator_blocked: boolean;
23
- subscribed: SubscribedType;
24
- /**
25
- * The time when the comment was saved.
26
- */
27
- saved?: string;
28
- my_vote?: number;
19
+ comment_actions?: CommentActions;
29
20
  resolver?: Person;
21
+ creator_community_actions?: CommunityActions;
22
+ person_actions?: PersonActions;
23
+ community_actions?: CommunityActions;
24
+ creator_is_admin: boolean;
30
25
  };
@@ -1,24 +1,19 @@
1
1
  import type { Comment } from "./Comment";
2
- import type { CommentAggregates } from "./CommentAggregates";
2
+ import type { CommentActions } from "./CommentActions";
3
+ import type { CommunityActions } from "./CommunityActions";
4
+ import type { InstanceActions } from "./InstanceActions";
3
5
  import type { Person } from "./Person";
4
- import type { SubscribedType } from "./SubscribedType";
6
+ import type { PersonActions } from "./PersonActions";
5
7
  /**
6
8
  * A slimmer comment view, without the post, or community.
7
9
  */
8
10
  export type CommentSlimView = {
9
11
  comment: Comment;
10
12
  creator: Person;
11
- counts: CommentAggregates;
12
- creator_banned_from_community: boolean;
13
- banned_from_community: boolean;
14
- creator_is_moderator: boolean;
13
+ comment_actions?: CommentActions;
14
+ person_actions?: PersonActions;
15
+ creator_community_actions?: CommunityActions;
16
+ instance_actions?: InstanceActions;
15
17
  creator_is_admin: boolean;
16
- subscribed: SubscribedType;
17
- /**
18
- * The time when the comment was saved.
19
- */
20
- saved?: string;
21
- creator_blocked: boolean;
22
- my_vote?: number;
23
18
  can_mod: boolean;
24
19
  };
@@ -1,9 +1,11 @@
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 { Post } from "./Post";
6
- import type { SubscribedType } from "./SubscribedType";
7
9
  /**
8
10
  * A comment view.
9
11
  */
@@ -12,17 +14,11 @@ export type CommentView = {
12
14
  creator: Person;
13
15
  post: Post;
14
16
  community: Community;
15
- counts: CommentAggregates;
16
- creator_banned_from_community: boolean;
17
- banned_from_community: boolean;
18
- creator_is_moderator: boolean;
17
+ community_actions?: CommunityActions;
18
+ comment_actions?: CommentActions;
19
+ person_actions?: PersonActions;
20
+ instance_actions?: InstanceActions;
21
+ creator_community_actions?: CommunityActions;
19
22
  creator_is_admin: boolean;
20
- subscribed: SubscribedType;
21
- /**
22
- * The time when the comment was saved.
23
- */
24
- saved?: string;
25
- creator_blocked: boolean;
26
- my_vote?: number;
27
23
  can_mod: boolean;
28
24
  };
@@ -46,10 +46,6 @@ export type Community = {
46
46
  * A URL for a banner.
47
47
  */
48
48
  banner?: DbUrl;
49
- /**
50
- * Whether the community is hidden.
51
- */
52
- hidden: boolean;
53
49
  /**
54
50
  * Whether posting is restricted to mods only.
55
51
  */
@@ -60,4 +56,27 @@ export type Community = {
60
56
  * A shorter, one-line description of the site.
61
57
  */
62
58
  description?: string;
59
+ subscribers: number;
60
+ posts: number;
61
+ comments: number;
62
+ /**
63
+ * The number of users with any activity in the last day.
64
+ */
65
+ users_active_day: number;
66
+ /**
67
+ * The number of users with any activity in the last week.
68
+ */
69
+ users_active_week: number;
70
+ /**
71
+ * The number of users with any activity in the last month.
72
+ */
73
+ users_active_month: number;
74
+ /**
75
+ * The number of users with any activity in the last year.
76
+ */
77
+ users_active_half_year: number;
78
+ subscribers_local: number;
79
+ report_count: number;
80
+ unresolved_report_count: number;
81
+ local_removed: boolean;
63
82
  };
@@ -0,0 +1,35 @@
1
+ import type { CommunityFollowerState } from "./CommunityFollowerState";
2
+ import type { CommunityId } from "./CommunityId";
3
+ import type { PersonId } from "./PersonId";
4
+ export type CommunityActions = {
5
+ community_id: CommunityId;
6
+ person_id: PersonId;
7
+ /**
8
+ * When the community was followed.
9
+ */
10
+ followed?: string;
11
+ /**
12
+ * The state of the community follow.
13
+ */
14
+ follow_state?: CommunityFollowerState;
15
+ /**
16
+ * The approver of the community follow.
17
+ */
18
+ follow_approver_id?: PersonId;
19
+ /**
20
+ * When the community was blocked.
21
+ */
22
+ blocked?: string;
23
+ /**
24
+ * When this user became a moderator.
25
+ */
26
+ became_moderator?: string;
27
+ /**
28
+ * When this user received a ban.
29
+ */
30
+ received_ban?: string;
31
+ /**
32
+ * When their ban expires.
33
+ */
34
+ ban_expires?: string;
35
+ };
@@ -0,0 +1,7 @@
1
+ import type { CommunityReportView } from "./CommunityReportView";
2
+ /**
3
+ * A community report response.
4
+ */
5
+ export type CommunityReportResponse = {
6
+ community_report_view: CommunityReportView;
7
+ };
@@ -1,8 +1,6 @@
1
1
  import type { Community } from "./Community";
2
- import type { CommunityAggregates } from "./CommunityAggregates";
3
2
  import type { CommunityReport } from "./CommunityReport";
4
3
  import type { Person } from "./Person";
5
- import type { SubscribedType } from "./SubscribedType";
6
4
  /**
7
5
  * A community report view.
8
6
  */
@@ -10,7 +8,5 @@ export type CommunityReportView = {
10
8
  community_report: CommunityReport;
11
9
  community: Community;
12
10
  creator: Person;
13
- counts: CommunityAggregates;
14
- subscribed: SubscribedType;
15
11
  resolver?: Person;
16
12
  };
@@ -1,14 +1,12 @@
1
1
  import type { Community } from "./Community";
2
- import type { CommunityAggregates } from "./CommunityAggregates";
3
- import type { SubscribedType } from "./SubscribedType";
2
+ import type { CommunityActions } from "./CommunityActions";
3
+ import type { InstanceActions } from "./InstanceActions";
4
4
  /**
5
5
  * A community view.
6
6
  */
7
7
  export type CommunityView = {
8
8
  community: Community;
9
- subscribed: SubscribedType;
10
- blocked: boolean;
11
- counts: CommunityAggregates;
12
- banned_from_community: boolean;
9
+ community_actions?: CommunityActions;
10
+ instance_actions?: InstanceActions;
13
11
  can_mod: boolean;
14
12
  };
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * Defines who can browse and interact with content in a community.
3
3
  */
4
- export type CommunityVisibility = "Public" | "LocalOnly" | "Private";
4
+ export type CommunityVisibility = "Public" | "Unlisted" | "LocalOnlyPublic" | "LocalOnlyPrivate" | "Private";
@@ -0,0 +1,8 @@
1
+ import type { CommunityId } from "./CommunityId";
2
+ /**
3
+ * Create a report for a community.
4
+ */
5
+ export type CreateCommunityReport = {
6
+ community_id: CommunityId;
7
+ reason: string;
8
+ };
@@ -51,4 +51,5 @@ export type CreateSite = {
51
51
  comment_upvotes?: FederationMode;
52
52
  comment_downvotes?: FederationMode;
53
53
  disable_donation_dialog?: boolean;
54
+ disallow_nsfw_content?: boolean;
54
55
  };
@@ -2,7 +2,7 @@ import type { CommentId } from "./CommentId";
2
2
  import type { CommunityId } from "./CommunityId";
3
3
  import type { ListingType } from "./ListingType";
4
4
  import type { ModlogActionType } from "./ModlogActionType";
5
- import type { ModlogCombinedPaginationCursor } from "./ModlogCombinedPaginationCursor";
5
+ import type { PaginationCursor } from "./PaginationCursor";
6
6
  import type { PersonId } from "./PersonId";
7
7
  import type { PostId } from "./PostId";
8
8
  /**
@@ -38,6 +38,6 @@ export type GetModlog = {
38
38
  * Filter by comment.
39
39
  */
40
40
  comment_id?: CommentId;
41
- page_cursor?: ModlogCombinedPaginationCursor;
41
+ page_cursor?: PaginationCursor;
42
42
  page_back?: boolean;
43
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,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.
@@ -46,6 +46,6 @@ export type GetPosts = {
46
46
  * If true, then only show posts with no comments
47
47
  */
48
48
  no_comments_only?: boolean;
49
- page_cursor?: PaginationCursor;
49
+ page_cursor?: PostPaginationCursor;
50
50
  page_back?: boolean;
51
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
  };
@@ -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
  };