lemmy-js-client 1.0.0-rename-rate-limit-columns.1 → 1.0.0-rename-person-banned.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -0
- package/dist/http.d.ts +40 -25
- package/dist/http.js +101 -53
- package/dist/index.d.ts +35 -30
- package/dist/other_types.d.ts +2 -2
- package/dist/types/{ModAdd.d.ts → AdminAdd.d.ts} +4 -4
- package/dist/types/AdminAddId.d.ts +1 -0
- package/dist/types/{ModAddView.d.ts → AdminAddView.d.ts} +3 -3
- package/dist/types/{ModBan.d.ts → AdminBan.d.ts} +3 -3
- package/dist/types/AdminBanId.d.ts +1 -0
- package/dist/types/{ModBanView.d.ts → AdminBanView.d.ts} +3 -3
- package/dist/types/{ModRemoveCommunity.d.ts → AdminRemoveCommunity.d.ts} +3 -3
- package/dist/types/AdminRemoveCommunityId.d.ts +1 -0
- package/dist/types/AdminRemoveCommunityView.d.ts +11 -0
- package/dist/types/Comment.d.ts +4 -0
- package/dist/types/CommentReportView.d.ts +3 -0
- package/dist/types/CommentResponse.d.ts +0 -2
- package/dist/types/CommentSlimView.d.ts +0 -2
- package/dist/types/CommentView.d.ts +2 -2
- package/dist/types/CommunityActions.d.ts +2 -0
- package/dist/types/CommunityNotificationsMode.d.ts +4 -0
- package/dist/types/CommunityReportView.d.ts +4 -0
- package/dist/types/CommunityView.d.ts +0 -2
- package/dist/types/CreateCommunityTag.d.ts +3 -1
- package/dist/types/EditSite.d.ts +4 -0
- package/dist/types/ExportDataResponse.d.ts +13 -0
- package/dist/types/FederationError.d.ts +4 -2
- package/dist/types/InstanceActions.d.ts +6 -2
- package/dist/types/LemmyErrorType.d.ts +10 -134
- package/dist/types/LinkMetadata.d.ts +4 -0
- package/dist/types/{ListInbox.d.ts → ListNotifications.d.ts} +3 -3
- package/dist/types/{ListInboxResponse.d.ts → ListNotificationsResponse.d.ts} +3 -3
- package/dist/types/LocalSite.d.ts +1 -0
- package/dist/types/LocalUser.d.ts +2 -0
- package/dist/types/LocalUserView.d.ts +1 -0
- package/dist/types/LockComment.d.ts +6 -0
- package/dist/types/MarkNotificationAsRead.d.ts +8 -0
- package/dist/types/{ModAddCommunity.d.ts → ModAddToCommunity.d.ts} +3 -3
- package/dist/types/ModAddToCommunityId.d.ts +1 -0
- package/dist/types/{ModAddCommunityView.d.ts → ModAddToCommunityView.d.ts} +3 -3
- package/dist/types/ModEditPost.d.ts +10 -0
- package/dist/types/ModLockComment.d.ts +14 -0
- package/dist/types/ModLockCommentId.d.ts +1 -0
- package/dist/types/ModLockCommentView.d.ts +14 -0
- package/dist/types/ModlogActionType.d.ts +1 -1
- package/dist/types/ModlogCombinedView.d.ts +16 -13
- package/dist/types/MyUserInfo.d.ts +2 -1
- package/dist/types/Notification.d.ts +16 -0
- package/dist/types/NotificationData.d.ts +10 -0
- package/dist/types/NotificationDataType.d.ts +4 -0
- package/dist/types/NotificationId.d.ts +1 -0
- package/dist/types/NotificationTypes.d.ts +4 -0
- package/dist/types/NotificationTypes.js +3 -0
- package/dist/types/NotificationView.d.ts +6 -0
- package/dist/types/OpenGraphData.d.ts +4 -0
- package/dist/types/PersonActions.d.ts +12 -0
- package/dist/types/PersonView.d.ts +2 -1
- package/dist/types/PostActions.d.ts +2 -0
- package/dist/types/PostActions.js +0 -1
- package/dist/types/PostNotificationsMode.d.ts +4 -0
- package/dist/types/PostNotificationsMode.js +3 -0
- package/dist/types/PostOrCommentOrPrivateMessage.d.ts +10 -0
- package/dist/types/PostReportView.d.ts +3 -0
- package/dist/types/PostView.d.ts +2 -2
- package/dist/types/PrivateMessage.d.ts +0 -1
- package/dist/types/PrivateMessageReportView.d.ts +2 -0
- package/dist/types/SaveUserSettings.d.ts +8 -0
- package/dist/types/Tag.d.ts +6 -14
- package/dist/types/TagsView.d.ts +1 -1
- package/dist/types/UpdateCommunityNotifications.d.ts +9 -0
- package/dist/types/UpdateCommunityTag.d.ts +3 -2
- package/dist/types/UpdatePostNotifications.d.ts +9 -0
- package/dist/types/UserBlockInstanceCommunitiesParams.d.ts +8 -0
- package/dist/types/UserBlockInstanceCommunitiesParams.js +2 -0
- package/dist/types/{UserBlockInstanceParams.d.ts → UserBlockInstancePersonsParams.d.ts} +2 -2
- package/dist/types/UserBlockInstancePersonsParams.js +2 -0
- package/dist/types/UserSettingsBackup.d.ts +27 -0
- package/dist/types/UserSettingsBackup.js +2 -0
- package/dist/types/VoteView.d.ts +1 -0
- package/package.json +6 -5
- package/dist/types/CommentReply.d.ts +0 -13
- package/dist/types/CommentReplyId.d.ts +0 -4
- package/dist/types/CommentReplyView.d.ts +0 -31
- package/dist/types/InboxCombinedView.d.ts +0 -13
- package/dist/types/InboxDataType.d.ts +0 -4
- package/dist/types/MarkCommentReplyAsRead.d.ts +0 -8
- package/dist/types/MarkPersonCommentMentionAsRead.d.ts +0 -8
- package/dist/types/MarkPersonPostMentionAsRead.d.ts +0 -8
- package/dist/types/MarkPrivateMessageAsRead.d.ts +0 -8
- package/dist/types/ModAddCommunityId.d.ts +0 -1
- package/dist/types/ModAddId.d.ts +0 -1
- package/dist/types/ModBanId.d.ts +0 -1
- package/dist/types/ModRemoveCommunityId.d.ts +0 -1
- package/dist/types/ModRemoveCommunityView.d.ts +0 -11
- package/dist/types/PersonCommentMention.d.ts +0 -13
- package/dist/types/PersonCommentMentionId.d.ts +0 -4
- package/dist/types/PersonCommentMentionView.d.ts +0 -29
- package/dist/types/PersonPostMention.d.ts +0 -13
- package/dist/types/PersonPostMentionId.d.ts +0 -4
- package/dist/types/PersonPostMentionView.d.ts +0 -31
- /package/dist/types/{CommentReply.js → AdminAdd.js} +0 -0
- /package/dist/types/{CommentReplyId.js → AdminAddId.js} +0 -0
- /package/dist/types/{CommentReplyView.js → AdminAddView.js} +0 -0
- /package/dist/types/{InboxCombinedView.js → AdminBan.js} +0 -0
- /package/dist/types/{InboxDataType.js → AdminBanId.js} +0 -0
- /package/dist/types/{ListInbox.js → AdminBanView.js} +0 -0
- /package/dist/types/{ListInboxResponse.js → AdminRemoveCommunity.js} +0 -0
- /package/dist/types/{ModAddCommunityId.js → AdminRemoveCommunityId.js} +0 -0
- /package/dist/types/{MarkCommentReplyAsRead.js → AdminRemoveCommunityView.js} +0 -0
- /package/dist/types/{ModAddId.js → CommunityNotificationsMode.js} +0 -0
- /package/dist/types/{MarkPersonCommentMentionAsRead.js → ExportDataResponse.js} +0 -0
- /package/dist/types/{MarkPersonPostMentionAsRead.js → ListNotifications.js} +0 -0
- /package/dist/types/{MarkPrivateMessageAsRead.js → ListNotificationsResponse.js} +0 -0
- /package/dist/types/{ModAdd.js → LockComment.js} +0 -0
- /package/dist/types/{ModAddCommunity.js → MarkNotificationAsRead.js} +0 -0
- /package/dist/types/{ModAddCommunityView.js → ModAddToCommunity.js} +0 -0
- /package/dist/types/{ModBanId.js → ModAddToCommunityId.js} +0 -0
- /package/dist/types/{ModAddView.js → ModAddToCommunityView.js} +0 -0
- /package/dist/types/{ModBan.js → ModEditPost.js} +0 -0
- /package/dist/types/{ModBanView.js → ModLockComment.js} +0 -0
- /package/dist/types/{ModRemoveCommunityId.js → ModLockCommentId.js} +0 -0
- /package/dist/types/{ModRemoveCommunity.js → ModLockCommentView.js} +0 -0
- /package/dist/types/{ModRemoveCommunityView.js → Notification.js} +0 -0
- /package/dist/types/{PersonCommentMention.js → NotificationData.js} +0 -0
- /package/dist/types/{PersonCommentMentionId.js → NotificationDataType.js} +0 -0
- /package/dist/types/{PersonPostMentionId.js → NotificationId.js} +0 -0
- /package/dist/types/{PersonCommentMentionView.js → NotificationView.js} +0 -0
- /package/dist/types/{PersonPostMention.js → PostOrCommentOrPrivateMessage.js} +0 -0
- /package/dist/types/{PersonPostMentionView.js → UpdateCommunityNotifications.js} +0 -0
- /package/dist/types/{UserBlockInstanceParams.js → UpdatePostNotifications.js} +0 -0
package/README.md
CHANGED
@@ -52,6 +52,12 @@ Use `pnpm add` to develop and test changes locally:
|
|
52
52
|
|
53
53
|
`pnpm add path/to/lemmy-js-client`
|
54
54
|
|
55
|
+
Alternatively, use `yalc publish` and `yalc add lemmy-js-client`
|
56
|
+
|
57
|
+
## Generating typescript types from lemmy structs
|
58
|
+
|
59
|
+
Run `./scripts/copy_generated_types_from_lemmy.sh`
|
60
|
+
|
55
61
|
## OpenAPI
|
56
62
|
|
57
63
|
To generate OpenAPI docs, run `pnpm tsoa`
|
package/dist/http.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { Controller } from "@tsoa/runtime";
|
2
|
-
import { AdminListUsersI, CommunityIdQueryI, DeleteImageParamsI, GetCommentI, GetCommentsI, GetCommunityI, GetCommunityPendingFollowsCountI, GetModlogI, GetMultiCommunityI, GetPersonDetailsI, GetPostI, GetPostsI, GetRandomCommunityI, GetRegistrationApplicationI, GetReportCountI, GetSiteMetadataI, ListCommentLikesI, ListCommunitiesI, ListCommunityPendingFollowsI, ListCustomEmojisI,
|
2
|
+
import { AdminListUsersI, CommunityIdQueryI, DeleteImageParamsI, GetCommentI, GetCommentsI, GetCommunityI, GetCommunityPendingFollowsCountI, GetModlogI, GetMultiCommunityI, GetPersonDetailsI, GetPostI, GetPostsI, GetRandomCommunityI, GetRegistrationApplicationI, GetReportCountI, GetSiteMetadataI, ListCommentLikesI, ListCommunitiesI, ListCommunityPendingFollowsI, ListCustomEmojisI, ListNotificationsI, ListMediaI, ListMultiCommunitiesI, ListPersonContentI, ListPersonHiddenI, ListPersonLikedI, ListPersonReadI, 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";
|
@@ -25,6 +25,7 @@ import { CreateCommentReport } from "./types/CreateCommentReport";
|
|
25
25
|
import { CreateCommunity } from "./types/CreateCommunity";
|
26
26
|
import { CreateCommunityReport } from "./types/CreateCommunityReport";
|
27
27
|
import { CreateCommunityTag } from "./types/CreateCommunityTag";
|
28
|
+
import { UpdateCommunityTag } from "./types/UpdateCommunityTag";
|
28
29
|
import { CreateCustomEmoji } from "./types/CreateCustomEmoji";
|
29
30
|
import { CreateOAuthProvider } from "./types/CreateOAuthProvider";
|
30
31
|
import { CreatePost } from "./types/CreatePost";
|
@@ -69,11 +70,10 @@ import { GetUnreadRegistrationApplicationCountResponse } from "./types/GetUnread
|
|
69
70
|
import { ListCommunitiesResponse } from "./types/ListCommunitiesResponse";
|
70
71
|
import { ListRegistrationApplicationsResponse } from "./types/ListRegistrationApplicationsResponse";
|
71
72
|
import { LockPost } from "./types/LockPost";
|
73
|
+
import { LockComment } from "./types/LockComment";
|
72
74
|
import { Login } from "./types/Login";
|
73
75
|
import { LoginResponse } from "./types/LoginResponse";
|
74
|
-
import { MarkCommentReplyAsRead } from "./types/MarkCommentReplyAsRead";
|
75
76
|
import { MarkPostAsRead } from "./types/MarkPostAsRead";
|
76
|
-
import { MarkPrivateMessageAsRead } from "./types/MarkPrivateMessageAsRead";
|
77
77
|
import { PasswordChangeAfterReset } from "./types/PasswordChangeAfterReset";
|
78
78
|
import { PasswordReset } from "./types/PasswordReset";
|
79
79
|
import { PostReportResponse } from "./types/PostReportResponse";
|
@@ -99,7 +99,6 @@ import { SaveUserSettings } from "./types/SaveUserSettings";
|
|
99
99
|
import { SearchResponse } from "./types/SearchResponse";
|
100
100
|
import { SiteResponse } from "./types/SiteResponse";
|
101
101
|
import { TransferCommunity } from "./types/TransferCommunity";
|
102
|
-
import { UpdateCommunityTag } from "./types/UpdateCommunityTag";
|
103
102
|
import { VerifyEmail } from "./types/VerifyEmail";
|
104
103
|
import { HideCommunity } from "./types/HideCommunity";
|
105
104
|
import { GenerateTotpSecretResponse } from "./types/GenerateTotpSecretResponse";
|
@@ -122,15 +121,11 @@ import { GetCommunityPendingFollowsCountResponse } from "./types/GetCommunityPen
|
|
122
121
|
import { ListCommunityPendingFollowsResponse } from "./types/ListCommunityPendingFollowsResponse";
|
123
122
|
import { ListReportsResponse } from "./types/ListReportsResponse";
|
124
123
|
import { MyUserInfo } from "./types/MyUserInfo";
|
125
|
-
import { UserBlockInstanceParams } from "./types/UserBlockInstanceParams";
|
126
124
|
import { AdminAllowInstanceParams } from "./types/AdminAllowInstanceParams";
|
127
125
|
import { AdminBlockInstanceParams } from "./types/AdminBlockInstanceParams";
|
128
126
|
import { ListPersonContentResponse } from "./types/ListPersonContentResponse";
|
129
127
|
import { ListPersonSavedResponse } from "./types/ListPersonSavedResponse";
|
130
128
|
import { UploadImageResponse } from "./types/UploadImageResponse";
|
131
|
-
import { ListInboxResponse } from "./types/ListInboxResponse";
|
132
|
-
import { MarkPersonCommentMentionAsRead } from "./types/MarkPersonCommentMentionAsRead";
|
133
|
-
import { MarkPersonPostMentionAsRead } from "./types/MarkPersonPostMentionAsRead";
|
134
129
|
import { GetCommentsSlimResponse } from "./types/GetCommentsSlimResponse";
|
135
130
|
import { Tag } from "./types/Tag";
|
136
131
|
import { ResendVerificationEmail } from "./types/ResendVerificationEmail";
|
@@ -146,6 +141,14 @@ import { GetMultiCommunityResponse } from "./types/GetMultiCommunityResponse";
|
|
146
141
|
import { FollowMultiCommunity } from "./types/FollowMultiCommunity";
|
147
142
|
import { ListLoginsResponse } from "./types/ListLoginsResponse";
|
148
143
|
import { ListPersonLikedResponse } from "./types/ListPersonLikedResponse";
|
144
|
+
import { NotePerson } from "./types/NotePerson";
|
145
|
+
import { UserBlockInstanceCommunitiesParams } from "./types/UserBlockInstanceCommunitiesParams";
|
146
|
+
import { UserBlockInstancePersonsParams } from "./types/UserBlockInstancePersonsParams";
|
147
|
+
import { MarkNotificationAsRead } from "./types/MarkNotificationAsRead";
|
148
|
+
import { ListNotificationsResponse } from "./types/ListNotificationsResponse";
|
149
|
+
import { ModEditPost } from "./types/ModEditPost";
|
150
|
+
import { UpdateCommunityNotifications } from "./types/UpdateCommunityNotifications";
|
151
|
+
import { UpdatePostNotifications } from "./types/UpdatePostNotifications";
|
149
152
|
type RequestOptions = Pick<RequestInit, "signal">;
|
150
153
|
/**
|
151
154
|
* Helps build lemmy HTTP requests.
|
@@ -329,6 +332,10 @@ export declare class LemmyHttp extends Controller {
|
|
329
332
|
* @summary Edit a post.
|
330
333
|
*/
|
331
334
|
editPost(form: EditPost, options?: RequestOptions): Promise<PostResponse>;
|
335
|
+
/**
|
336
|
+
* @summary Mods can change nsfw flag and tags for a post
|
337
|
+
*/
|
338
|
+
modEditPost(form: ModEditPost, options?: RequestOptions): Promise<PostResponse>;
|
332
339
|
/**
|
333
340
|
* @summary Delete a post.
|
334
341
|
*/
|
@@ -402,11 +409,11 @@ export declare class LemmyHttp extends Controller {
|
|
402
409
|
*/
|
403
410
|
removeComment(form: RemoveComment, options?: RequestOptions): Promise<CommentResponse>;
|
404
411
|
/**
|
405
|
-
* @summary
|
412
|
+
* @summary A moderator can lock a comment (IE disable replies).
|
406
413
|
*/
|
407
|
-
|
414
|
+
lockComment(form: LockComment, options?: RequestOptions): Promise<CommentResponse>;
|
408
415
|
/**
|
409
|
-
* @
|
416
|
+
* @Summary Like / vote on a comment.
|
410
417
|
*/
|
411
418
|
likeComment(form: CreateCommentLike, options?: RequestOptions): Promise<CommentResponse>;
|
412
419
|
/**
|
@@ -453,10 +460,6 @@ export declare class LemmyHttp extends Controller {
|
|
453
460
|
* @summary Delete a private message.
|
454
461
|
*/
|
455
462
|
deletePrivateMessage(form: DeletePrivateMessage, options?: RequestOptions): Promise<PrivateMessageResponse>;
|
456
|
-
/**
|
457
|
-
* @summary Mark a private message as read.
|
458
|
-
*/
|
459
|
-
markPrivateMessageAsRead(form: MarkPrivateMessageAsRead, options?: RequestOptions): Promise<SuccessResponse>;
|
460
463
|
/**
|
461
464
|
* @summary Create a report for a private message.
|
462
465
|
*/
|
@@ -486,13 +489,9 @@ export declare class LemmyHttp extends Controller {
|
|
486
489
|
*/
|
487
490
|
listPersonContent(form?: ListPersonContentI, options?: RequestOptions): Promise<ListPersonContentResponse>;
|
488
491
|
/**
|
489
|
-
* @summary
|
490
|
-
*/
|
491
|
-
markCommentMentionAsRead(form: MarkPersonCommentMentionAsRead, options?: RequestOptions): Promise<SuccessResponse>;
|
492
|
-
/**
|
493
|
-
* @summary Mark a person post body mention as read.
|
492
|
+
* @summary Make a note for a person.
|
494
493
|
*/
|
495
|
-
|
494
|
+
notePerson(form: NotePerson, options?: RequestOptions): Promise<SuccessResponse>;
|
496
495
|
/**
|
497
496
|
* @summary Ban a person from your site.
|
498
497
|
*/
|
@@ -525,6 +524,10 @@ export declare class LemmyHttp extends Controller {
|
|
525
524
|
* @summary Mark all replies as read.
|
526
525
|
*/
|
527
526
|
markAllNotificationsAsRead(options?: RequestOptions): Promise<SuccessResponse>;
|
527
|
+
/**
|
528
|
+
* @summary Mark a comment as read.
|
529
|
+
*/
|
530
|
+
markNotificationAsRead(form: MarkNotificationAsRead, options?: RequestOptions): Promise<SuccessResponse>;
|
528
531
|
/**
|
529
532
|
* @summary Save your user settings.
|
530
533
|
*/
|
@@ -544,7 +547,7 @@ export declare class LemmyHttp extends Controller {
|
|
544
547
|
/**
|
545
548
|
* @summary Get your inbox (replies, comment mentions, post mentions, and messages)
|
546
549
|
*/
|
547
|
-
|
550
|
+
listNotifications(form: ListNotificationsI, options?: RequestOptions): Promise<ListNotificationsResponse>;
|
548
551
|
/**
|
549
552
|
* @summary Verify your email
|
550
553
|
*/
|
@@ -642,7 +645,7 @@ export declare class LemmyHttp extends Controller {
|
|
642
645
|
*/
|
643
646
|
createCommunityTag(form: CreateCommunityTag, options?: RequestOptions): Promise<Tag>;
|
644
647
|
/**
|
645
|
-
* @summary
|
648
|
+
* @summary Edit a community post tag.
|
646
649
|
*/
|
647
650
|
updateCommunityTag(form: UpdateCommunityTag, options?: RequestOptions): Promise<Tag>;
|
648
651
|
/**
|
@@ -674,9 +677,13 @@ export declare class LemmyHttp extends Controller {
|
|
674
677
|
*/
|
675
678
|
listReports(form: ListReportsI, options?: RequestOptions): Promise<ListReportsResponse>;
|
676
679
|
/**
|
677
|
-
* @summary Block an instance as user.
|
680
|
+
* @summary Block an instance's communities as a user.
|
681
|
+
*/
|
682
|
+
userBlockInstanceCommunities(form: UserBlockInstanceCommunitiesParams, options?: RequestOptions): Promise<SuccessResponse>;
|
683
|
+
/**
|
684
|
+
* @summary Block an instance's persons as a user.
|
678
685
|
*/
|
679
|
-
|
686
|
+
userBlockInstancePersons(form: UserBlockInstancePersonsParams, options?: RequestOptions): Promise<SuccessResponse>;
|
680
687
|
/**
|
681
688
|
* @summary Globally block an instance as admin.
|
682
689
|
*/
|
@@ -752,6 +759,14 @@ export declare class LemmyHttp extends Controller {
|
|
752
759
|
deleteMultiCommunityEntry(form: CreateOrDeleteMultiCommunityEntry, options?: RequestOptions): Promise<SuccessResponse>;
|
753
760
|
listMultiCommunities(form: ListMultiCommunitiesI, options?: RequestOptions): Promise<ListMultiCommunitiesResponse>;
|
754
761
|
followMultiCommunity(form: FollowMultiCommunity, options?: RequestOptions): Promise<SuccessResponse>;
|
762
|
+
/**
|
763
|
+
* @summary Change notification settings for a community
|
764
|
+
*/
|
765
|
+
updateCommunityNotifications(form: UpdateCommunityNotifications, options?: RequestOptions): Promise<SuccessResponse>;
|
766
|
+
/**
|
767
|
+
* @summary Change notification settings for a post
|
768
|
+
*/
|
769
|
+
updatePostNotifications(form: UpdatePostNotifications, options?: RequestOptions): Promise<SuccessResponse>;
|
755
770
|
/**
|
756
771
|
* Set the headers (can be used to set the auth header)
|
757
772
|
*/
|
package/dist/http.js
CHANGED
@@ -298,6 +298,12 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
|
|
298
298
|
async editPost(form, options) {
|
299
299
|
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/post", form, options);
|
300
300
|
}
|
301
|
+
/**
|
302
|
+
* @summary Mods can change nsfw flag and tags for a post
|
303
|
+
*/
|
304
|
+
async modEditPost(form, options) {
|
305
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/post/mod_update", form, options);
|
306
|
+
}
|
301
307
|
/**
|
302
308
|
* @summary Delete a post.
|
303
309
|
*/
|
@@ -407,13 +413,13 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
|
|
407
413
|
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/comment/remove", form, options);
|
408
414
|
}
|
409
415
|
/**
|
410
|
-
* @summary
|
416
|
+
* @summary A moderator can lock a comment (IE disable replies).
|
411
417
|
*/
|
412
|
-
async
|
413
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/comment/
|
418
|
+
async lockComment(form, options) {
|
419
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/comment/lock", form, options);
|
414
420
|
}
|
415
421
|
/**
|
416
|
-
* @
|
422
|
+
* @Summary Like / vote on a comment.
|
417
423
|
*/
|
418
424
|
async likeComment(form, options) {
|
419
425
|
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/comment/like", form, options);
|
@@ -484,12 +490,6 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
|
|
484
490
|
async deletePrivateMessage(form, options) {
|
485
491
|
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/private_message/delete", form, options);
|
486
492
|
}
|
487
|
-
/**
|
488
|
-
* @summary Mark a private message as read.
|
489
|
-
*/
|
490
|
-
async markPrivateMessageAsRead(form, options) {
|
491
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/private_message/mark_as_read", form, options);
|
492
|
-
}
|
493
493
|
/**
|
494
494
|
* @summary Create a report for a private message.
|
495
495
|
*/
|
@@ -533,16 +533,10 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
|
|
533
533
|
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/person/content", form, options);
|
534
534
|
}
|
535
535
|
/**
|
536
|
-
* @summary
|
536
|
+
* @summary Make a note for a person.
|
537
537
|
*/
|
538
|
-
async
|
539
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/
|
540
|
-
}
|
541
|
-
/**
|
542
|
-
* @summary Mark a person post body mention as read.
|
543
|
-
*/
|
544
|
-
async markPostMentionAsRead(form, options) {
|
545
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/mention/post/mark_as_read", form, options);
|
538
|
+
async notePerson(form, options) {
|
539
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/person/note", form, options);
|
546
540
|
}
|
547
541
|
/**
|
548
542
|
* @summary Ban a person from your site.
|
@@ -592,6 +586,12 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
|
|
592
586
|
async markAllNotificationsAsRead(options) {
|
593
587
|
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/mark_as_read/all", {}, options);
|
594
588
|
}
|
589
|
+
/**
|
590
|
+
* @summary Mark a comment as read.
|
591
|
+
*/
|
592
|
+
async markNotificationAsRead(form, options) {
|
593
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/mark_as_read", form, options);
|
594
|
+
}
|
595
595
|
/**
|
596
596
|
* @summary Save your user settings.
|
597
597
|
*/
|
@@ -619,8 +619,8 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
|
|
619
619
|
/**
|
620
620
|
* @summary Get your inbox (replies, comment mentions, post mentions, and messages)
|
621
621
|
*/
|
622
|
-
async
|
623
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/
|
622
|
+
async listNotifications(form, options) {
|
623
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/notifications", form, options);
|
624
624
|
}
|
625
625
|
/**
|
626
626
|
* @summary Verify your email
|
@@ -767,10 +767,10 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
|
|
767
767
|
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/community/tag", form, options);
|
768
768
|
}
|
769
769
|
/**
|
770
|
-
* @summary
|
770
|
+
* @summary Edit a community post tag.
|
771
771
|
*/
|
772
772
|
updateCommunityTag(form, options) {
|
773
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.
|
773
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/community/tag", form, options);
|
774
774
|
}
|
775
775
|
/**
|
776
776
|
* @summary Delete a post tag in a community.
|
@@ -815,10 +815,16 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
|
|
815
815
|
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/report/list", form, options);
|
816
816
|
}
|
817
817
|
/**
|
818
|
-
* @summary Block an instance as user.
|
818
|
+
* @summary Block an instance's communities as a user.
|
819
819
|
*/
|
820
|
-
async
|
821
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/block/instance", form, options);
|
820
|
+
async userBlockInstanceCommunities(form, options) {
|
821
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/block/instance/communities", form, options);
|
822
|
+
}
|
823
|
+
/**
|
824
|
+
* @summary Block an instance's persons as a user.
|
825
|
+
*/
|
826
|
+
async userBlockInstancePersons(form, options) {
|
827
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/block/instance/persons", form, options);
|
822
828
|
}
|
823
829
|
/**
|
824
830
|
* @summary Globally block an instance as admin.
|
@@ -920,7 +926,7 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
|
|
920
926
|
* Mark donation dialog as shown, so it isn't displayed anymore.
|
921
927
|
*/
|
922
928
|
donationDialogShown(options) {
|
923
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/
|
929
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/donation_dialog_shown", {}, options);
|
924
930
|
}
|
925
931
|
createMultiCommunity(form, options) {
|
926
932
|
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/multi_community", form, options);
|
@@ -943,6 +949,18 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
|
|
943
949
|
followMultiCommunity(form, options) {
|
944
950
|
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/multi_community/follow", form, options);
|
945
951
|
}
|
952
|
+
/**
|
953
|
+
* @summary Change notification settings for a community
|
954
|
+
*/
|
955
|
+
updateCommunityNotifications(form, options) {
|
956
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/community/notifications", form, options);
|
957
|
+
}
|
958
|
+
/**
|
959
|
+
* @summary Change notification settings for a post
|
960
|
+
*/
|
961
|
+
updatePostNotifications(form, options) {
|
962
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/post/notifications", form, options);
|
963
|
+
}
|
946
964
|
/**
|
947
965
|
* Set the headers (can be used to set the auth header)
|
948
966
|
*/
|
@@ -1000,6 +1018,7 @@ _LemmyHttp_wrapper = async function _LemmyHttp_wrapper(type_, endpoint, form, op
|
|
1000
1018
|
throw new LemmyError(response.statusText);
|
1001
1019
|
}
|
1002
1020
|
if (!response.ok) {
|
1021
|
+
console.error(`Request error while calling ${type_} ${endpoint} with ${form}`);
|
1003
1022
|
let err = new LemmyError(json.error ?? response.statusText, json.message);
|
1004
1023
|
throw err;
|
1005
1024
|
}
|
@@ -1282,6 +1301,13 @@ __decorate([
|
|
1282
1301
|
__param(0, (0, runtime_1.Body)()),
|
1283
1302
|
__param(1, (0, runtime_1.Inject)())
|
1284
1303
|
], LemmyHttp.prototype, "editPost", null);
|
1304
|
+
__decorate([
|
1305
|
+
(0, runtime_1.Security)("bearerAuth"),
|
1306
|
+
(0, runtime_1.Put)("/post/mod_update"),
|
1307
|
+
(0, runtime_1.Tags)("Post"),
|
1308
|
+
__param(0, (0, runtime_1.Body)()),
|
1309
|
+
__param(1, (0, runtime_1.Inject)())
|
1310
|
+
], LemmyHttp.prototype, "modEditPost", null);
|
1285
1311
|
__decorate([
|
1286
1312
|
(0, runtime_1.Security)("bearerAuth"),
|
1287
1313
|
(0, runtime_1.Post)("/post/delete"),
|
@@ -1411,11 +1437,11 @@ __decorate([
|
|
1411
1437
|
], LemmyHttp.prototype, "removeComment", null);
|
1412
1438
|
__decorate([
|
1413
1439
|
(0, runtime_1.Security)("bearerAuth"),
|
1414
|
-
(0, runtime_1.Post)("/comment/
|
1415
|
-
(0, runtime_1.Tags)("Comment"),
|
1440
|
+
(0, runtime_1.Post)("/comment/lock"),
|
1441
|
+
(0, runtime_1.Tags)("Comment", "Moderator"),
|
1416
1442
|
__param(0, (0, runtime_1.Body)()),
|
1417
1443
|
__param(1, (0, runtime_1.Inject)())
|
1418
|
-
], LemmyHttp.prototype, "
|
1444
|
+
], LemmyHttp.prototype, "lockComment", null);
|
1419
1445
|
__decorate([
|
1420
1446
|
(0, runtime_1.Security)("bearerAuth"),
|
1421
1447
|
(0, runtime_1.Post)("/comment/like"),
|
@@ -1503,13 +1529,6 @@ __decorate([
|
|
1503
1529
|
__param(0, (0, runtime_1.Body)()),
|
1504
1530
|
__param(1, (0, runtime_1.Inject)())
|
1505
1531
|
], LemmyHttp.prototype, "deletePrivateMessage", null);
|
1506
|
-
__decorate([
|
1507
|
-
(0, runtime_1.Security)("bearerAuth"),
|
1508
|
-
(0, runtime_1.Post)("/private_message/mark_as_read"),
|
1509
|
-
(0, runtime_1.Tags)("PrivateMessage"),
|
1510
|
-
__param(0, (0, runtime_1.Body)()),
|
1511
|
-
__param(1, (0, runtime_1.Inject)())
|
1512
|
-
], LemmyHttp.prototype, "markPrivateMessageAsRead", null);
|
1513
1532
|
__decorate([
|
1514
1533
|
(0, runtime_1.Security)("bearerAuth"),
|
1515
1534
|
(0, runtime_1.Post)("/private_message/report"),
|
@@ -1560,18 +1579,11 @@ __decorate([
|
|
1560
1579
|
], LemmyHttp.prototype, "listPersonContent", null);
|
1561
1580
|
__decorate([
|
1562
1581
|
(0, runtime_1.Security)("bearerAuth"),
|
1563
|
-
(0, runtime_1.Post)("/
|
1564
|
-
(0, runtime_1.Tags)("
|
1565
|
-
__param(0, (0, runtime_1.Body)()),
|
1566
|
-
__param(1, (0, runtime_1.Inject)())
|
1567
|
-
], LemmyHttp.prototype, "markCommentMentionAsRead", null);
|
1568
|
-
__decorate([
|
1569
|
-
(0, runtime_1.Security)("bearerAuth"),
|
1570
|
-
(0, runtime_1.Post)("/account/mention/post/mark_as_read"),
|
1571
|
-
(0, runtime_1.Tags)("Account", "Post"),
|
1582
|
+
(0, runtime_1.Post)("/person/note"),
|
1583
|
+
(0, runtime_1.Tags)("Person"),
|
1572
1584
|
__param(0, (0, runtime_1.Body)()),
|
1573
1585
|
__param(1, (0, runtime_1.Inject)())
|
1574
|
-
], LemmyHttp.prototype, "
|
1586
|
+
], LemmyHttp.prototype, "notePerson", null);
|
1575
1587
|
__decorate([
|
1576
1588
|
(0, runtime_1.Security)("bearerAuth"),
|
1577
1589
|
(0, runtime_1.Post)("/admin/ban"),
|
@@ -1625,6 +1637,13 @@ __decorate([
|
|
1625
1637
|
(0, runtime_1.Tags)("Account"),
|
1626
1638
|
__param(0, (0, runtime_1.Inject)())
|
1627
1639
|
], LemmyHttp.prototype, "markAllNotificationsAsRead", null);
|
1640
|
+
__decorate([
|
1641
|
+
(0, runtime_1.Security)("bearerAuth"),
|
1642
|
+
(0, runtime_1.Post)("/account/mark_as_read"),
|
1643
|
+
(0, runtime_1.Tags)("Account"),
|
1644
|
+
__param(0, (0, runtime_1.Body)()),
|
1645
|
+
__param(1, (0, runtime_1.Inject)())
|
1646
|
+
], LemmyHttp.prototype, "markNotificationAsRead", null);
|
1628
1647
|
__decorate([
|
1629
1648
|
(0, runtime_1.Security)("bearerAuth"),
|
1630
1649
|
(0, runtime_1.Put)("/account/settings/save"),
|
@@ -1654,11 +1673,11 @@ __decorate([
|
|
1654
1673
|
], LemmyHttp.prototype, "getUnreadCount", null);
|
1655
1674
|
__decorate([
|
1656
1675
|
(0, runtime_1.Security)("bearerAuth"),
|
1657
|
-
(0, runtime_1.Get)("/account/
|
1676
|
+
(0, runtime_1.Get)("/account/notifications"),
|
1658
1677
|
(0, runtime_1.Tags)("Account"),
|
1659
1678
|
__param(0, (0, runtime_1.Queries)()),
|
1660
1679
|
__param(1, (0, runtime_1.Inject)())
|
1661
|
-
], LemmyHttp.prototype, "
|
1680
|
+
], LemmyHttp.prototype, "listNotifications", null);
|
1662
1681
|
__decorate([
|
1663
1682
|
(0, runtime_1.Post)("/account/auth/verify_email"),
|
1664
1683
|
(0, runtime_1.Tags)("Account"),
|
@@ -1882,11 +1901,18 @@ __decorate([
|
|
1882
1901
|
], LemmyHttp.prototype, "listReports", null);
|
1883
1902
|
__decorate([
|
1884
1903
|
(0, runtime_1.Security)("bearerAuth"),
|
1885
|
-
(0, runtime_1.Post)("/account/block/instance"),
|
1886
|
-
(0, runtime_1.Tags)("Account"),
|
1904
|
+
(0, runtime_1.Post)("/account/block/instance/communities"),
|
1905
|
+
(0, runtime_1.Tags)("Account", "Community"),
|
1887
1906
|
__param(0, (0, runtime_1.Body)()),
|
1888
1907
|
__param(1, (0, runtime_1.Inject)())
|
1889
|
-
], LemmyHttp.prototype, "
|
1908
|
+
], LemmyHttp.prototype, "userBlockInstanceCommunities", null);
|
1909
|
+
__decorate([
|
1910
|
+
(0, runtime_1.Security)("bearerAuth"),
|
1911
|
+
(0, runtime_1.Post)("/account/block/instance/persons"),
|
1912
|
+
(0, runtime_1.Tags)("Account", "Person"),
|
1913
|
+
__param(0, (0, runtime_1.Body)()),
|
1914
|
+
__param(1, (0, runtime_1.Inject)())
|
1915
|
+
], LemmyHttp.prototype, "userBlockInstancePersons", null);
|
1890
1916
|
__decorate([
|
1891
1917
|
(0, runtime_1.Security)("bearerAuth"),
|
1892
1918
|
(0, runtime_1.Post)("/admin/instance/block"),
|
@@ -1997,48 +2023,70 @@ __decorate([
|
|
1997
2023
|
], LemmyHttp.prototype, "imageHealth", null);
|
1998
2024
|
__decorate([
|
1999
2025
|
(0, runtime_1.Security)("bearerAuth"),
|
2000
|
-
(0, runtime_1.Post)("/
|
2026
|
+
(0, runtime_1.Post)("/account/donation_dialog_shown"),
|
2027
|
+
(0, runtime_1.Tags)("Account"),
|
2001
2028
|
__param(0, (0, runtime_1.Inject)())
|
2002
2029
|
], LemmyHttp.prototype, "donationDialogShown", null);
|
2003
2030
|
__decorate([
|
2004
2031
|
(0, runtime_1.Security)("bearerAuth"),
|
2005
2032
|
(0, runtime_1.Post)("/multi_community"),
|
2033
|
+
(0, runtime_1.Tags)("Multicommunity"),
|
2006
2034
|
__param(0, (0, runtime_1.Body)()),
|
2007
2035
|
__param(1, (0, runtime_1.Inject)())
|
2008
2036
|
], LemmyHttp.prototype, "createMultiCommunity", null);
|
2009
2037
|
__decorate([
|
2010
2038
|
(0, runtime_1.Security)("bearerAuth"),
|
2011
2039
|
(0, runtime_1.Put)("/multi_community"),
|
2040
|
+
(0, runtime_1.Tags)("Multicommunity"),
|
2012
2041
|
__param(0, (0, runtime_1.Body)()),
|
2013
2042
|
__param(1, (0, runtime_1.Inject)())
|
2014
2043
|
], LemmyHttp.prototype, "updateMultiCommunity", null);
|
2015
2044
|
__decorate([
|
2016
2045
|
(0, runtime_1.Get)("/multi_community"),
|
2046
|
+
(0, runtime_1.Tags)("Multicommunity"),
|
2017
2047
|
__param(0, (0, runtime_1.Queries)()),
|
2018
2048
|
__param(1, (0, runtime_1.Inject)())
|
2019
2049
|
], LemmyHttp.prototype, "getMultiCommunity", null);
|
2020
2050
|
__decorate([
|
2021
2051
|
(0, runtime_1.Security)("bearerAuth"),
|
2022
2052
|
(0, runtime_1.Post)("/multi_community/entry"),
|
2053
|
+
(0, runtime_1.Tags)("Multicommunity"),
|
2023
2054
|
__param(0, (0, runtime_1.Body)()),
|
2024
2055
|
__param(1, (0, runtime_1.Inject)())
|
2025
2056
|
], LemmyHttp.prototype, "createMultiCommunityEntry", null);
|
2026
2057
|
__decorate([
|
2027
2058
|
(0, runtime_1.Security)("bearerAuth"),
|
2028
2059
|
(0, runtime_1.Delete)("/multi_community/entry"),
|
2060
|
+
(0, runtime_1.Tags)("Multicommunity"),
|
2029
2061
|
__param(0, (0, runtime_1.Body)()),
|
2030
2062
|
__param(1, (0, runtime_1.Inject)())
|
2031
2063
|
], LemmyHttp.prototype, "deleteMultiCommunityEntry", null);
|
2032
2064
|
__decorate([
|
2033
2065
|
(0, runtime_1.Get)("/multi_community/list"),
|
2066
|
+
(0, runtime_1.Tags)("Multicommunity"),
|
2034
2067
|
__param(0, (0, runtime_1.Queries)()),
|
2035
2068
|
__param(1, (0, runtime_1.Inject)())
|
2036
2069
|
], LemmyHttp.prototype, "listMultiCommunities", null);
|
2037
2070
|
__decorate([
|
2038
2071
|
(0, runtime_1.Post)("/multi_community/follow"),
|
2072
|
+
(0, runtime_1.Tags)("Multicommunity"),
|
2039
2073
|
__param(0, (0, runtime_1.Body)()),
|
2040
2074
|
__param(1, (0, runtime_1.Inject)())
|
2041
2075
|
], LemmyHttp.prototype, "followMultiCommunity", null);
|
2076
|
+
__decorate([
|
2077
|
+
(0, runtime_1.Security)("bearerAuth"),
|
2078
|
+
(0, runtime_1.Put)("/community/notifications"),
|
2079
|
+
(0, runtime_1.Tags)("Community"),
|
2080
|
+
__param(0, (0, runtime_1.Body)()),
|
2081
|
+
__param(1, (0, runtime_1.Inject)())
|
2082
|
+
], LemmyHttp.prototype, "updateCommunityNotifications", null);
|
2083
|
+
__decorate([
|
2084
|
+
(0, runtime_1.Security)("bearerAuth"),
|
2085
|
+
(0, runtime_1.Put)("/post/notifications"),
|
2086
|
+
(0, runtime_1.Tags)("Post"),
|
2087
|
+
__param(0, (0, runtime_1.Body)()),
|
2088
|
+
__param(1, (0, runtime_1.Inject)())
|
2089
|
+
], LemmyHttp.prototype, "updatePostNotifications", null);
|
2042
2090
|
exports.LemmyHttp = LemmyHttp = __decorate([
|
2043
2091
|
(0, runtime_1.Route)("api/v4")
|
2044
2092
|
], LemmyHttp);
|