lemmy-js-client 0.20.0-no-delete-token.1 → 0.20.0-no-delete-token.2
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/http.d.ts +16 -0
- package/dist/http.js +16 -0
- package/dist/index.d.ts +33 -3
- package/dist/types/AdminAllowInstance.d.ts +3 -2
- package/dist/types/AdminAllowInstanceId.d.ts +1 -0
- package/dist/types/AdminAllowInstanceView.d.ts +1 -1
- package/dist/types/AdminBlockInstance.d.ts +3 -2
- package/dist/types/AdminBlockInstanceId.d.ts +1 -0
- package/dist/types/AdminBlockInstanceId.js +3 -0
- package/dist/types/AdminPurgeComment.d.ts +3 -2
- package/dist/types/AdminPurgeCommentId.d.ts +1 -0
- package/dist/types/AdminPurgeCommentId.js +3 -0
- package/dist/types/AdminPurgeCommunity.d.ts +3 -2
- package/dist/types/AdminPurgeCommunityId.d.ts +1 -0
- package/dist/types/AdminPurgeCommunityId.js +3 -0
- package/dist/types/AdminPurgePerson.d.ts +3 -2
- package/dist/types/AdminPurgePersonId.d.ts +1 -0
- package/dist/types/AdminPurgePersonId.js +3 -0
- package/dist/types/AdminPurgePost.d.ts +3 -2
- package/dist/types/AdminPurgePostId.d.ts +1 -0
- package/dist/types/AdminPurgePostId.js +3 -0
- package/dist/types/CommunityAggregates.d.ts +2 -0
- package/dist/types/CommunityReport.d.ts +22 -0
- package/dist/types/CommunityReportId.d.ts +4 -0
- package/dist/types/CommunityReportId.js +3 -0
- package/dist/types/CommunityReportView.d.ts +16 -0
- package/dist/types/CreatePost.d.ts +2 -0
- package/dist/types/CreateSite.d.ts +0 -2
- package/dist/types/EditPost.d.ts +2 -0
- package/dist/types/EditSite.d.ts +0 -8
- package/dist/types/FederationError.d.ts +1 -1
- package/dist/types/GetComments.d.ts +0 -1
- package/dist/types/GetModlog.d.ts +3 -2
- package/dist/types/GetModlogResponse.d.ts +2 -34
- package/dist/types/GetPersonDetails.d.ts +0 -7
- package/dist/types/GetPersonDetailsResponse.d.ts +0 -4
- package/dist/types/GetPosts.d.ts +1 -0
- package/dist/types/GetSiteResponse.d.ts +0 -8
- package/dist/types/LemmyErrorType.d.ts +0 -2
- package/dist/types/ListPersonContent.d.ts +18 -0
- package/dist/types/ListPersonContent.js +2 -0
- package/dist/types/ListPersonContentResponse.d.ts +7 -0
- package/dist/types/ListPersonContentResponse.js +2 -0
- package/dist/types/ListPersonSaved.d.ts +10 -0
- package/dist/types/ListPersonSaved.js +2 -0
- package/dist/types/ListPersonSavedResponse.d.ts +7 -0
- package/dist/types/ListPersonSavedResponse.js +2 -0
- package/dist/types/ModAdd.d.ts +3 -2
- package/dist/types/ModAddCommunity.d.ts +3 -2
- package/dist/types/ModAddCommunityId.d.ts +1 -0
- package/dist/types/ModAddCommunityId.js +3 -0
- package/dist/types/ModAddCommunityView.d.ts +1 -1
- package/dist/types/ModAddId.d.ts +1 -0
- package/dist/types/ModAddId.js +3 -0
- package/dist/types/ModAddView.d.ts +1 -1
- package/dist/types/ModBan.d.ts +3 -2
- package/dist/types/ModBanFromCommunity.d.ts +3 -2
- package/dist/types/ModBanFromCommunityId.d.ts +1 -0
- package/dist/types/ModBanFromCommunityId.js +3 -0
- package/dist/types/ModBanFromCommunityView.d.ts +1 -1
- package/dist/types/ModBanId.d.ts +1 -0
- package/dist/types/ModBanId.js +3 -0
- package/dist/types/ModBanView.d.ts +1 -1
- package/dist/types/ModFeaturePost.d.ts +3 -2
- package/dist/types/ModFeaturePostId.d.ts +1 -0
- package/dist/types/ModFeaturePostId.js +3 -0
- package/dist/types/ModFeaturePostView.d.ts +1 -0
- package/dist/types/ModHideCommunity.d.ts +3 -2
- package/dist/types/ModHideCommunityId.d.ts +1 -0
- package/dist/types/ModHideCommunityId.js +3 -0
- package/dist/types/ModLockPost.d.ts +3 -2
- package/dist/types/ModLockPostId.d.ts +1 -0
- package/dist/types/ModLockPostId.js +3 -0
- package/dist/types/ModLockPostView.d.ts +1 -0
- package/dist/types/ModRemoveComment.d.ts +3 -2
- package/dist/types/ModRemoveCommentId.d.ts +1 -0
- package/dist/types/ModRemoveCommentId.js +3 -0
- package/dist/types/ModRemoveCommentView.d.ts +1 -1
- package/dist/types/ModRemoveCommunity.d.ts +3 -2
- package/dist/types/ModRemoveCommunityId.d.ts +1 -0
- package/dist/types/ModRemoveCommunityId.js +3 -0
- package/dist/types/ModRemovePost.d.ts +3 -2
- package/dist/types/ModRemovePostId.d.ts +1 -0
- package/dist/types/ModRemovePostId.js +3 -0
- package/dist/types/ModRemovePostView.d.ts +1 -0
- package/dist/types/ModTransferCommunity.d.ts +3 -2
- package/dist/types/ModTransferCommunityId.d.ts +1 -0
- package/dist/types/ModTransferCommunityId.js +3 -0
- package/dist/types/ModTransferCommunityView.d.ts +1 -1
- package/dist/types/ModlogCombinedPaginationCursor.d.ts +4 -0
- package/dist/types/ModlogCombinedPaginationCursor.js +3 -0
- package/dist/types/ModlogCombinedView.d.ts +52 -0
- package/dist/types/ModlogCombinedView.js +2 -0
- package/dist/types/PersonContentCombinedPaginationCursor.d.ts +4 -0
- package/dist/types/PersonContentCombinedPaginationCursor.js +3 -0
- package/dist/types/PersonContentCombinedView.d.ts +7 -0
- package/dist/types/PersonContentCombinedView.js +2 -0
- package/dist/types/PersonContentType.d.ts +4 -0
- package/dist/types/PersonContentType.js +3 -0
- package/dist/types/PersonSavedCombinedPaginationCursor.d.ts +4 -0
- package/dist/types/PersonSavedCombinedPaginationCursor.js +3 -0
- package/dist/types/PostTags.d.ts +7 -0
- package/dist/types/PostTags.js +2 -0
- package/dist/types/PostView.d.ts +2 -0
- package/dist/types/ReportCombinedView.d.ts +4 -1
- package/dist/types/Search.d.ts +0 -1
- package/dist/types/Tag.d.ts +27 -0
- package/dist/types/Tag.js +2 -0
- package/dist/types/TagId.d.ts +4 -0
- package/dist/types/TagId.js +3 -0
- package/package.json +1 -1
- package/dist/types/ModlogListParams.d.ts +0 -17
- package/dist/types/ReportCombined.d.ts +0 -14
- package/dist/types/ReportCombinedId.d.ts +0 -4
- /package/dist/types/{ReportCombinedId.js → AdminAllowInstanceId.js} +0 -0
- /package/dist/types/{ModlogListParams.js → CommunityReport.js} +0 -0
- /package/dist/types/{ReportCombined.js → CommunityReportView.js} +0 -0
package/dist/http.d.ts
CHANGED
@@ -153,6 +153,10 @@ import { MyUserInfo } from "./types/MyUserInfo";
|
|
153
153
|
import { UserBlockInstanceParams } from "./types/UserBlockInstanceParams";
|
154
154
|
import { AdminAllowInstanceParams } from "./types/AdminAllowInstanceParams";
|
155
155
|
import { AdminBlockInstanceParams } from "./types/AdminBlockInstanceParams";
|
156
|
+
import { ListPersonContent } from "./types/ListPersonContent";
|
157
|
+
import { ListPersonContentResponse } from "./types/ListPersonContentResponse";
|
158
|
+
import { ListPersonSaved } from "./types/ListPersonSaved";
|
159
|
+
import { ListPersonSavedResponse } from "./types/ListPersonSavedResponse";
|
156
160
|
import { DeleteImageParams } from "./types/DeleteImageParams";
|
157
161
|
import { UploadImageResponse } from "./types/UploadImageResponse";
|
158
162
|
type RequestOptions = Pick<RequestInit, "signal">;
|
@@ -602,6 +606,12 @@ export declare class LemmyHttp {
|
|
602
606
|
* `HTTP.GET /person`
|
603
607
|
*/
|
604
608
|
getPersonDetails(form?: GetPersonDetails, options?: RequestOptions): Promise<GetPersonDetailsResponse>;
|
609
|
+
/**
|
610
|
+
* List the content for a person.
|
611
|
+
*
|
612
|
+
* `HTTP.GET /person/content`
|
613
|
+
*/
|
614
|
+
listPersonContent(form?: ListPersonContent, options?: RequestOptions): Promise<ListPersonContentResponse>;
|
605
615
|
/**
|
606
616
|
* Get mentions for your user.
|
607
617
|
*
|
@@ -704,6 +714,12 @@ export declare class LemmyHttp {
|
|
704
714
|
* `HTTP.POST /account/auth/verify_email`
|
705
715
|
*/
|
706
716
|
verifyEmail(form: VerifyEmail, options?: RequestOptions): Promise<SuccessResponse>;
|
717
|
+
/**
|
718
|
+
* List your saved content.
|
719
|
+
*
|
720
|
+
* `HTTP.GET /account/auth/saved`
|
721
|
+
*/
|
722
|
+
listPersonSaved(form: ListPersonSaved, options?: RequestOptions): Promise<ListPersonSavedResponse>;
|
707
723
|
/**
|
708
724
|
* Add an admin to your site.
|
709
725
|
*
|
package/dist/http.js
CHANGED
@@ -629,6 +629,14 @@ class LemmyHttp {
|
|
629
629
|
getPersonDetails(form = {}, options) {
|
630
630
|
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/person", form, options);
|
631
631
|
}
|
632
|
+
/**
|
633
|
+
* List the content for a person.
|
634
|
+
*
|
635
|
+
* `HTTP.GET /person/content`
|
636
|
+
*/
|
637
|
+
listPersonContent(form = {}, options) {
|
638
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/person/content", form, options);
|
639
|
+
}
|
632
640
|
/**
|
633
641
|
* Get mentions for your user.
|
634
642
|
*
|
@@ -765,6 +773,14 @@ class LemmyHttp {
|
|
765
773
|
verifyEmail(form, options) {
|
766
774
|
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/auth/verify_email", form, options);
|
767
775
|
}
|
776
|
+
/**
|
777
|
+
* List your saved content.
|
778
|
+
*
|
779
|
+
* `HTTP.GET /account/auth/saved`
|
780
|
+
*/
|
781
|
+
listPersonSaved(form, options) {
|
782
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/auth/saved", form, options);
|
783
|
+
}
|
768
784
|
/**
|
769
785
|
* Add an admin to your site.
|
770
786
|
*
|
package/dist/index.d.ts
CHANGED
@@ -6,18 +6,24 @@ export { AddAdminResponse } from "./types/AddAdminResponse";
|
|
6
6
|
export { AddModToCommunity } from "./types/AddModToCommunity";
|
7
7
|
export { AddModToCommunityResponse } from "./types/AddModToCommunityResponse";
|
8
8
|
export { AdminAllowInstance } from "./types/AdminAllowInstance";
|
9
|
+
export { AdminAllowInstanceId } from "./types/AdminAllowInstanceId";
|
9
10
|
export { AdminAllowInstanceParams } from "./types/AdminAllowInstanceParams";
|
10
11
|
export { AdminAllowInstanceView } from "./types/AdminAllowInstanceView";
|
11
12
|
export { AdminBlockInstance } from "./types/AdminBlockInstance";
|
13
|
+
export { AdminBlockInstanceId } from "./types/AdminBlockInstanceId";
|
12
14
|
export { AdminBlockInstanceParams } from "./types/AdminBlockInstanceParams";
|
13
15
|
export { AdminBlockInstanceView } from "./types/AdminBlockInstanceView";
|
14
16
|
export { AdminPurgeComment } from "./types/AdminPurgeComment";
|
17
|
+
export { AdminPurgeCommentId } from "./types/AdminPurgeCommentId";
|
15
18
|
export { AdminPurgeCommentView } from "./types/AdminPurgeCommentView";
|
16
19
|
export { AdminPurgeCommunity } from "./types/AdminPurgeCommunity";
|
20
|
+
export { AdminPurgeCommunityId } from "./types/AdminPurgeCommunityId";
|
17
21
|
export { AdminPurgeCommunityView } from "./types/AdminPurgeCommunityView";
|
18
22
|
export { AdminPurgePerson } from "./types/AdminPurgePerson";
|
23
|
+
export { AdminPurgePersonId } from "./types/AdminPurgePersonId";
|
19
24
|
export { AdminPurgePersonView } from "./types/AdminPurgePersonView";
|
20
25
|
export { AdminPurgePost } from "./types/AdminPurgePost";
|
26
|
+
export { AdminPurgePostId } from "./types/AdminPurgePostId";
|
21
27
|
export { AdminPurgePostView } from "./types/AdminPurgePostView";
|
22
28
|
export { ApproveCommunityPendingFollower } from "./types/ApproveCommunityPendingFollower";
|
23
29
|
export { ApproveRegistrationApplication } from "./types/ApproveRegistrationApplication";
|
@@ -53,6 +59,9 @@ export { CommunityFollowerState } from "./types/CommunityFollowerState";
|
|
53
59
|
export { CommunityFollowerView } from "./types/CommunityFollowerView";
|
54
60
|
export { CommunityId } from "./types/CommunityId";
|
55
61
|
export { CommunityModeratorView } from "./types/CommunityModeratorView";
|
62
|
+
export { CommunityReport } from "./types/CommunityReport";
|
63
|
+
export { CommunityReportId } from "./types/CommunityReportId";
|
64
|
+
export { CommunityReportView } from "./types/CommunityReportView";
|
56
65
|
export { CommunityResponse } from "./types/CommunityResponse";
|
57
66
|
export { CommunitySortType } from "./types/CommunitySortType";
|
58
67
|
export { CommunityView } from "./types/CommunityView";
|
@@ -154,6 +163,10 @@ export { ListCustomEmojisResponse } from "./types/ListCustomEmojisResponse";
|
|
154
163
|
export { ListLoginsResponse } from "./types/ListLoginsResponse";
|
155
164
|
export { ListMedia } from "./types/ListMedia";
|
156
165
|
export { ListMediaResponse } from "./types/ListMediaResponse";
|
166
|
+
export { ListPersonContent } from "./types/ListPersonContent";
|
167
|
+
export { ListPersonContentResponse } from "./types/ListPersonContentResponse";
|
168
|
+
export { ListPersonSaved } from "./types/ListPersonSaved";
|
169
|
+
export { ListPersonSavedResponse } from "./types/ListPersonSavedResponse";
|
157
170
|
export { ListPostLikes } from "./types/ListPostLikes";
|
158
171
|
export { ListPostLikesResponse } from "./types/ListPostLikesResponse";
|
159
172
|
export { ListRegistrationApplications } from "./types/ListRegistrationApplications";
|
@@ -184,28 +197,40 @@ export { MarkPostAsRead } from "./types/MarkPostAsRead";
|
|
184
197
|
export { MarkPrivateMessageAsRead } from "./types/MarkPrivateMessageAsRead";
|
185
198
|
export { ModAdd } from "./types/ModAdd";
|
186
199
|
export { ModAddCommunity } from "./types/ModAddCommunity";
|
200
|
+
export { ModAddCommunityId } from "./types/ModAddCommunityId";
|
187
201
|
export { ModAddCommunityView } from "./types/ModAddCommunityView";
|
202
|
+
export { ModAddId } from "./types/ModAddId";
|
188
203
|
export { ModAddView } from "./types/ModAddView";
|
189
204
|
export { ModBan } from "./types/ModBan";
|
190
205
|
export { ModBanFromCommunity } from "./types/ModBanFromCommunity";
|
206
|
+
export { ModBanFromCommunityId } from "./types/ModBanFromCommunityId";
|
191
207
|
export { ModBanFromCommunityView } from "./types/ModBanFromCommunityView";
|
208
|
+
export { ModBanId } from "./types/ModBanId";
|
192
209
|
export { ModBanView } from "./types/ModBanView";
|
193
210
|
export { ModFeaturePost } from "./types/ModFeaturePost";
|
211
|
+
export { ModFeaturePostId } from "./types/ModFeaturePostId";
|
194
212
|
export { ModFeaturePostView } from "./types/ModFeaturePostView";
|
195
213
|
export { ModHideCommunity } from "./types/ModHideCommunity";
|
214
|
+
export { ModHideCommunityId } from "./types/ModHideCommunityId";
|
196
215
|
export { ModHideCommunityView } from "./types/ModHideCommunityView";
|
197
216
|
export { ModLockPost } from "./types/ModLockPost";
|
217
|
+
export { ModLockPostId } from "./types/ModLockPostId";
|
198
218
|
export { ModLockPostView } from "./types/ModLockPostView";
|
199
219
|
export { ModRemoveComment } from "./types/ModRemoveComment";
|
220
|
+
export { ModRemoveCommentId } from "./types/ModRemoveCommentId";
|
200
221
|
export { ModRemoveCommentView } from "./types/ModRemoveCommentView";
|
201
222
|
export { ModRemoveCommunity } from "./types/ModRemoveCommunity";
|
223
|
+
export { ModRemoveCommunityId } from "./types/ModRemoveCommunityId";
|
202
224
|
export { ModRemoveCommunityView } from "./types/ModRemoveCommunityView";
|
203
225
|
export { ModRemovePost } from "./types/ModRemovePost";
|
226
|
+
export { ModRemovePostId } from "./types/ModRemovePostId";
|
204
227
|
export { ModRemovePostView } from "./types/ModRemovePostView";
|
205
228
|
export { ModTransferCommunity } from "./types/ModTransferCommunity";
|
229
|
+
export { ModTransferCommunityId } from "./types/ModTransferCommunityId";
|
206
230
|
export { ModTransferCommunityView } from "./types/ModTransferCommunityView";
|
207
231
|
export { ModlogActionType } from "./types/ModlogActionType";
|
208
|
-
export {
|
232
|
+
export { ModlogCombinedPaginationCursor } from "./types/ModlogCombinedPaginationCursor";
|
233
|
+
export { ModlogCombinedView } from "./types/ModlogCombinedView";
|
209
234
|
export { MyUserInfo } from "./types/MyUserInfo";
|
210
235
|
export { OAuthAccount } from "./types/OAuthAccount";
|
211
236
|
export { OAuthProvider } from "./types/OAuthProvider";
|
@@ -217,11 +242,15 @@ export { PasswordReset } from "./types/PasswordReset";
|
|
217
242
|
export { PendingFollow } from "./types/PendingFollow";
|
218
243
|
export { Person } from "./types/Person";
|
219
244
|
export { PersonAggregates } from "./types/PersonAggregates";
|
245
|
+
export { PersonContentCombinedPaginationCursor } from "./types/PersonContentCombinedPaginationCursor";
|
246
|
+
export { PersonContentCombinedView } from "./types/PersonContentCombinedView";
|
247
|
+
export { PersonContentType } from "./types/PersonContentType";
|
220
248
|
export { PersonId } from "./types/PersonId";
|
221
249
|
export { PersonMention } from "./types/PersonMention";
|
222
250
|
export { PersonMentionId } from "./types/PersonMentionId";
|
223
251
|
export { PersonMentionResponse } from "./types/PersonMentionResponse";
|
224
252
|
export { PersonMentionView } from "./types/PersonMentionView";
|
253
|
+
export { PersonSavedCombinedPaginationCursor } from "./types/PersonSavedCombinedPaginationCursor";
|
225
254
|
export { PersonView } from "./types/PersonView";
|
226
255
|
export { Post } from "./types/Post";
|
227
256
|
export { PostAggregates } from "./types/PostAggregates";
|
@@ -234,6 +263,7 @@ export { PostReportResponse } from "./types/PostReportResponse";
|
|
234
263
|
export { PostReportView } from "./types/PostReportView";
|
235
264
|
export { PostResponse } from "./types/PostResponse";
|
236
265
|
export { PostSortType } from "./types/PostSortType";
|
266
|
+
export { PostTags } from "./types/PostTags";
|
237
267
|
export { PostView } from "./types/PostView";
|
238
268
|
export { PrivateMessage } from "./types/PrivateMessage";
|
239
269
|
export { PrivateMessageId } from "./types/PrivateMessageId";
|
@@ -259,8 +289,6 @@ export { RegistrationMode } from "./types/RegistrationMode";
|
|
259
289
|
export { RemoveComment } from "./types/RemoveComment";
|
260
290
|
export { RemoveCommunity } from "./types/RemoveCommunity";
|
261
291
|
export { RemovePost } from "./types/RemovePost";
|
262
|
-
export { ReportCombined } from "./types/ReportCombined";
|
263
|
-
export { ReportCombinedId } from "./types/ReportCombinedId";
|
264
292
|
export { ReportCombinedPaginationCursor } from "./types/ReportCombinedPaginationCursor";
|
265
293
|
export { ReportCombinedView } from "./types/ReportCombinedView";
|
266
294
|
export { ResolveCommentReport } from "./types/ResolveCommentReport";
|
@@ -282,6 +310,8 @@ export { SiteResponse } from "./types/SiteResponse";
|
|
282
310
|
export { SiteView } from "./types/SiteView";
|
283
311
|
export { SubscribedType } from "./types/SubscribedType";
|
284
312
|
export { SuccessResponse } from "./types/SuccessResponse";
|
313
|
+
export { Tag } from "./types/Tag";
|
314
|
+
export { TagId } from "./types/TagId";
|
285
315
|
export { Tagline } from "./types/Tagline";
|
286
316
|
export { TaglineId } from "./types/TaglineId";
|
287
317
|
export { TaglineResponse } from "./types/TaglineResponse";
|
@@ -1,10 +1,11 @@
|
|
1
|
+
import type { AdminAllowInstanceId } from "./AdminAllowInstanceId";
|
1
2
|
import type { InstanceId } from "./InstanceId";
|
2
3
|
import type { PersonId } from "./PersonId";
|
3
4
|
export type AdminAllowInstance = {
|
4
|
-
id:
|
5
|
+
id: AdminAllowInstanceId;
|
5
6
|
instance_id: InstanceId;
|
6
7
|
admin_person_id: PersonId;
|
7
8
|
allowed: boolean;
|
8
9
|
reason?: string;
|
9
|
-
|
10
|
+
published: string;
|
10
11
|
};
|
@@ -0,0 +1 @@
|
|
1
|
+
export type AdminAllowInstanceId = number;
|
@@ -1,11 +1,12 @@
|
|
1
|
+
import type { AdminBlockInstanceId } from "./AdminBlockInstanceId";
|
1
2
|
import type { InstanceId } from "./InstanceId";
|
2
3
|
import type { PersonId } from "./PersonId";
|
3
4
|
export type AdminBlockInstance = {
|
4
|
-
id:
|
5
|
+
id: AdminBlockInstanceId;
|
5
6
|
instance_id: InstanceId;
|
6
7
|
admin_person_id: PersonId;
|
7
8
|
blocked: boolean;
|
8
9
|
reason?: string;
|
9
10
|
expires?: string;
|
10
|
-
|
11
|
+
published: string;
|
11
12
|
};
|
@@ -0,0 +1 @@
|
|
1
|
+
export type AdminBlockInstanceId = number;
|
@@ -1,12 +1,13 @@
|
|
1
|
+
import type { AdminPurgeCommentId } from "./AdminPurgeCommentId";
|
1
2
|
import type { PersonId } from "./PersonId";
|
2
3
|
import type { PostId } from "./PostId";
|
3
4
|
/**
|
4
5
|
* When an admin purges a comment.
|
5
6
|
*/
|
6
7
|
export type AdminPurgeComment = {
|
7
|
-
id:
|
8
|
+
id: AdminPurgeCommentId;
|
8
9
|
admin_person_id: PersonId;
|
9
10
|
post_id: PostId;
|
10
11
|
reason?: string;
|
11
|
-
|
12
|
+
published: string;
|
12
13
|
};
|
@@ -0,0 +1 @@
|
|
1
|
+
export type AdminPurgeCommentId = number;
|
@@ -1,10 +1,11 @@
|
|
1
|
+
import type { AdminPurgeCommunityId } from "./AdminPurgeCommunityId";
|
1
2
|
import type { PersonId } from "./PersonId";
|
2
3
|
/**
|
3
4
|
* When an admin purges a community.
|
4
5
|
*/
|
5
6
|
export type AdminPurgeCommunity = {
|
6
|
-
id:
|
7
|
+
id: AdminPurgeCommunityId;
|
7
8
|
admin_person_id: PersonId;
|
8
9
|
reason?: string;
|
9
|
-
|
10
|
+
published: string;
|
10
11
|
};
|
@@ -0,0 +1 @@
|
|
1
|
+
export type AdminPurgeCommunityId = number;
|
@@ -1,10 +1,11 @@
|
|
1
|
+
import type { AdminPurgePersonId } from "./AdminPurgePersonId";
|
1
2
|
import type { PersonId } from "./PersonId";
|
2
3
|
/**
|
3
4
|
* When an admin purges a person.
|
4
5
|
*/
|
5
6
|
export type AdminPurgePerson = {
|
6
|
-
id:
|
7
|
+
id: AdminPurgePersonId;
|
7
8
|
admin_person_id: PersonId;
|
8
9
|
reason?: string;
|
9
|
-
|
10
|
+
published: string;
|
10
11
|
};
|
@@ -0,0 +1 @@
|
|
1
|
+
export type AdminPurgePersonId = number;
|
@@ -1,12 +1,13 @@
|
|
1
|
+
import type { AdminPurgePostId } from "./AdminPurgePostId";
|
1
2
|
import type { CommunityId } from "./CommunityId";
|
2
3
|
import type { PersonId } from "./PersonId";
|
3
4
|
/**
|
4
5
|
* When an admin purges a post.
|
5
6
|
*/
|
6
7
|
export type AdminPurgePost = {
|
7
|
-
id:
|
8
|
+
id: AdminPurgePostId;
|
8
9
|
admin_person_id: PersonId;
|
9
10
|
community_id: CommunityId;
|
10
11
|
reason?: string;
|
11
|
-
|
12
|
+
published: string;
|
12
13
|
};
|
@@ -0,0 +1 @@
|
|
1
|
+
export type AdminPurgePostId = number;
|
@@ -0,0 +1,22 @@
|
|
1
|
+
import type { CommunityId } from "./CommunityId";
|
2
|
+
import type { CommunityReportId } from "./CommunityReportId";
|
3
|
+
import type { PersonId } from "./PersonId";
|
4
|
+
/**
|
5
|
+
* A comment report.
|
6
|
+
*/
|
7
|
+
export type CommunityReport = {
|
8
|
+
id: CommunityReportId;
|
9
|
+
creator_id: PersonId;
|
10
|
+
community_id: CommunityId;
|
11
|
+
original_community_name: string;
|
12
|
+
original_community_title: string;
|
13
|
+
original_community_description?: string;
|
14
|
+
original_community_sidebar?: string;
|
15
|
+
original_community_icon?: string;
|
16
|
+
original_community_banner?: string;
|
17
|
+
reason: string;
|
18
|
+
resolved: boolean;
|
19
|
+
resolver_id?: PersonId;
|
20
|
+
published: string;
|
21
|
+
updated?: string;
|
22
|
+
};
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import type { Community } from "./Community";
|
2
|
+
import type { CommunityAggregates } from "./CommunityAggregates";
|
3
|
+
import type { CommunityReport } from "./CommunityReport";
|
4
|
+
import type { Person } from "./Person";
|
5
|
+
import type { SubscribedType } from "./SubscribedType";
|
6
|
+
/**
|
7
|
+
* A community report view.
|
8
|
+
*/
|
9
|
+
export type CommunityReportView = {
|
10
|
+
community_report: CommunityReport;
|
11
|
+
community: Community;
|
12
|
+
creator: Person;
|
13
|
+
counts: CommunityAggregates;
|
14
|
+
subscribed: SubscribedType;
|
15
|
+
resolver?: Person;
|
16
|
+
};
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import type { CommunityId } from "./CommunityId";
|
2
2
|
import type { LanguageId } from "./LanguageId";
|
3
|
+
import type { TagId } from "./TagId";
|
3
4
|
/**
|
4
5
|
* Create a post.
|
5
6
|
*/
|
@@ -25,6 +26,7 @@ export type CreatePost = {
|
|
25
26
|
* Instead of fetching a thumbnail, use a custom one.
|
26
27
|
*/
|
27
28
|
custom_thumbnail?: string;
|
29
|
+
tags?: Array<TagId>;
|
28
30
|
/**
|
29
31
|
* Time when this post should be scheduled. Null means publish immediately.
|
30
32
|
*/
|
@@ -12,7 +12,6 @@ export type CreateSite = {
|
|
12
12
|
name: string;
|
13
13
|
sidebar?: string;
|
14
14
|
description?: string;
|
15
|
-
enable_nsfw?: boolean;
|
16
15
|
community_creation_admin_only?: boolean;
|
17
16
|
require_email_verification?: boolean;
|
18
17
|
application_question?: string;
|
@@ -41,7 +40,6 @@ export type CreateSite = {
|
|
41
40
|
rate_limit_search?: number;
|
42
41
|
rate_limit_search_per_second?: number;
|
43
42
|
federation_enabled?: boolean;
|
44
|
-
federation_debug?: boolean;
|
45
43
|
captcha_enabled?: boolean;
|
46
44
|
captcha_difficulty?: string;
|
47
45
|
registration_mode?: RegistrationMode;
|
package/dist/types/EditPost.d.ts
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
import type { LanguageId } from "./LanguageId";
|
2
2
|
import type { PostId } from "./PostId";
|
3
|
+
import type { TagId } from "./TagId";
|
3
4
|
/**
|
4
5
|
* Edit a post.
|
5
6
|
*/
|
@@ -21,6 +22,7 @@ export type EditPost = {
|
|
21
22
|
* Instead of fetching a thumbnail, use a custom one.
|
22
23
|
*/
|
23
24
|
custom_thumbnail?: string;
|
25
|
+
tags?: Array<TagId>;
|
24
26
|
/**
|
25
27
|
* Time when this post should be scheduled. Null means publish immediately.
|
26
28
|
*/
|
package/dist/types/EditSite.d.ts
CHANGED
@@ -18,10 +18,6 @@ export type EditSite = {
|
|
18
18
|
* A shorter, one line description of your site.
|
19
19
|
*/
|
20
20
|
description?: string;
|
21
|
-
/**
|
22
|
-
* Whether to enable NSFW.
|
23
|
-
*/
|
24
|
-
enable_nsfw?: boolean;
|
25
21
|
/**
|
26
22
|
* Limits community creation to admins only.
|
27
23
|
*/
|
@@ -116,10 +112,6 @@ export type EditSite = {
|
|
116
112
|
* Whether to enable federation.
|
117
113
|
*/
|
118
114
|
federation_enabled?: boolean;
|
119
|
-
/**
|
120
|
-
* Enables federation debugging.
|
121
|
-
*/
|
122
|
-
federation_debug?: boolean;
|
123
115
|
/**
|
124
116
|
* Whether to enable captchas for signups.
|
125
117
|
*/
|
@@ -1,7 +1,7 @@
|
|
1
1
|
/**
|
2
2
|
* Federation related errors, these dont need to be translated.
|
3
3
|
*/
|
4
|
-
export type FederationError = "
|
4
|
+
export type FederationError = "InvalidCommunity" | "CannotCreatePostOrCommentInDeletedOrRemovedCommunity" | "CannotReceivePage" | "OnlyLocalAdminCanRemoveCommunity" | "OnlyLocalAdminCanRestoreCommunity" | "PostIsLocked" | {
|
5
5
|
PersonIsBannedFromSite: string;
|
6
6
|
} | "InvalidVoteValue" | "PageDoesNotSpecifyCreator" | "CouldntGetComments" | "CouldntGetPosts" | "FederationDisabled" | {
|
7
7
|
DomainBlocked: string;
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import type { CommentId } from "./CommentId";
|
2
2
|
import type { CommunityId } from "./CommunityId";
|
3
3
|
import type { ModlogActionType } from "./ModlogActionType";
|
4
|
+
import type { ModlogCombinedPaginationCursor } from "./ModlogCombinedPaginationCursor";
|
4
5
|
import type { PersonId } from "./PersonId";
|
5
6
|
import type { PostId } from "./PostId";
|
6
7
|
/**
|
@@ -9,10 +10,10 @@ import type { PostId } from "./PostId";
|
|
9
10
|
export type GetModlog = {
|
10
11
|
mod_person_id?: PersonId;
|
11
12
|
community_id?: CommunityId;
|
12
|
-
page?: number;
|
13
|
-
limit?: number;
|
14
13
|
type_?: ModlogActionType;
|
15
14
|
other_person_id?: PersonId;
|
16
15
|
post_id?: PostId;
|
17
16
|
comment_id?: CommentId;
|
17
|
+
page_cursor?: ModlogCombinedPaginationCursor;
|
18
|
+
page_back?: boolean;
|
18
19
|
};
|
@@ -1,39 +1,7 @@
|
|
1
|
-
import type {
|
2
|
-
import type { AdminBlockInstanceView } from "./AdminBlockInstanceView";
|
3
|
-
import type { AdminPurgeCommentView } from "./AdminPurgeCommentView";
|
4
|
-
import type { AdminPurgeCommunityView } from "./AdminPurgeCommunityView";
|
5
|
-
import type { AdminPurgePersonView } from "./AdminPurgePersonView";
|
6
|
-
import type { AdminPurgePostView } from "./AdminPurgePostView";
|
7
|
-
import type { ModAddCommunityView } from "./ModAddCommunityView";
|
8
|
-
import type { ModAddView } from "./ModAddView";
|
9
|
-
import type { ModBanFromCommunityView } from "./ModBanFromCommunityView";
|
10
|
-
import type { ModBanView } from "./ModBanView";
|
11
|
-
import type { ModFeaturePostView } from "./ModFeaturePostView";
|
12
|
-
import type { ModHideCommunityView } from "./ModHideCommunityView";
|
13
|
-
import type { ModLockPostView } from "./ModLockPostView";
|
14
|
-
import type { ModRemoveCommentView } from "./ModRemoveCommentView";
|
15
|
-
import type { ModRemoveCommunityView } from "./ModRemoveCommunityView";
|
16
|
-
import type { ModRemovePostView } from "./ModRemovePostView";
|
17
|
-
import type { ModTransferCommunityView } from "./ModTransferCommunityView";
|
1
|
+
import type { ModlogCombinedView } from "./ModlogCombinedView";
|
18
2
|
/**
|
19
3
|
* The modlog fetch response.
|
20
4
|
*/
|
21
5
|
export type GetModlogResponse = {
|
22
|
-
|
23
|
-
locked_posts: Array<ModLockPostView>;
|
24
|
-
featured_posts: Array<ModFeaturePostView>;
|
25
|
-
removed_comments: Array<ModRemoveCommentView>;
|
26
|
-
removed_communities: Array<ModRemoveCommunityView>;
|
27
|
-
banned_from_community: Array<ModBanFromCommunityView>;
|
28
|
-
banned: Array<ModBanView>;
|
29
|
-
added_to_community: Array<ModAddCommunityView>;
|
30
|
-
transferred_to_community: Array<ModTransferCommunityView>;
|
31
|
-
added: Array<ModAddView>;
|
32
|
-
admin_purged_persons: Array<AdminPurgePersonView>;
|
33
|
-
admin_purged_communities: Array<AdminPurgeCommunityView>;
|
34
|
-
admin_purged_posts: Array<AdminPurgePostView>;
|
35
|
-
admin_purged_comments: Array<AdminPurgeCommentView>;
|
36
|
-
hidden_communities: Array<ModHideCommunityView>;
|
37
|
-
admin_block_instance: Array<AdminBlockInstanceView>;
|
38
|
-
admin_allow_instance: Array<AdminAllowInstanceView>;
|
6
|
+
modlog: Array<ModlogCombinedView>;
|
39
7
|
};
|
@@ -1,6 +1,4 @@
|
|
1
|
-
import type { CommunityId } from "./CommunityId";
|
2
1
|
import type { PersonId } from "./PersonId";
|
3
|
-
import type { PostSortType } from "./PostSortType";
|
4
2
|
/**
|
5
3
|
* Gets a person's details.
|
6
4
|
*
|
@@ -12,9 +10,4 @@ export type GetPersonDetails = {
|
|
12
10
|
* Example: dessalines , or dessalines@xyz.tld
|
13
11
|
*/
|
14
12
|
username?: string;
|
15
|
-
sort?: PostSortType;
|
16
|
-
page?: number;
|
17
|
-
limit?: number;
|
18
|
-
community_id?: CommunityId;
|
19
|
-
saved_only?: boolean;
|
20
13
|
};
|
@@ -1,7 +1,5 @@
|
|
1
|
-
import type { CommentView } from "./CommentView";
|
2
1
|
import type { CommunityModeratorView } from "./CommunityModeratorView";
|
3
2
|
import type { PersonView } from "./PersonView";
|
4
|
-
import type { PostView } from "./PostView";
|
5
3
|
import type { Site } from "./Site";
|
6
4
|
/**
|
7
5
|
* A person's details response.
|
@@ -9,7 +7,5 @@ import type { Site } from "./Site";
|
|
9
7
|
export type GetPersonDetailsResponse = {
|
10
8
|
person_view: PersonView;
|
11
9
|
site?: Site;
|
12
|
-
comments: Array<CommentView>;
|
13
|
-
posts: Array<PostView>;
|
14
10
|
moderates: Array<CommunityModeratorView>;
|
15
11
|
};
|
package/dist/types/GetPosts.d.ts
CHANGED
@@ -15,14 +15,6 @@ export type GetSiteResponse = {
|
|
15
15
|
version: string;
|
16
16
|
all_languages: Array<Language>;
|
17
17
|
discussion_languages: Array<LanguageId>;
|
18
|
-
/**
|
19
|
-
* deprecated, use field `tagline` or /api/v3/tagline/list
|
20
|
-
*/
|
21
|
-
taglines: Array<null>;
|
22
|
-
/**
|
23
|
-
* deprecated, use /api/v3/custom_emoji/list
|
24
|
-
*/
|
25
|
-
custom_emojis: Array<null>;
|
26
18
|
/**
|
27
19
|
* If the site has any taglines, a random one is included here for displaying
|
28
20
|
*/
|