lemmy-js-client 0.17.0-rc.9 → 0.17.2-rc.10
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +24 -5
- package/dist/http.d.ts +351 -21
- package/dist/http.js +407 -389
- package/dist/index.d.ts +0 -1
- package/dist/index.js +5 -2
- package/dist/types/AddAdmin.d.ts +6 -0
- package/dist/types/AddAdminResponse.d.ts +4 -0
- package/dist/types/AddModToCommunity.d.ts +8 -0
- package/dist/types/AddModToCommunityResponse.d.ts +4 -0
- package/dist/types/AdminPurgeComment.d.ts +9 -0
- package/dist/types/AdminPurgeCommentView.d.ts +8 -0
- package/dist/types/AdminPurgeCommunity.d.ts +7 -0
- package/dist/types/AdminPurgeCommunityView.d.ts +6 -0
- package/dist/types/AdminPurgePerson.d.ts +7 -0
- package/dist/types/AdminPurgePersonView.d.ts +6 -0
- package/dist/types/AdminPurgePersonView.js +2 -0
- package/dist/types/AdminPurgePost.d.ts +9 -0
- package/dist/types/AdminPurgePost.js +2 -0
- package/dist/types/AdminPurgePostView.d.ts +8 -0
- package/dist/types/AdminPurgePostView.js +2 -0
- package/dist/types/ApproveRegistrationApplication.d.ts +6 -0
- package/dist/types/ApproveRegistrationApplication.js +3 -0
- package/dist/types/BanFromCommunity.d.ts +11 -0
- package/dist/types/BanFromCommunity.js +2 -0
- package/dist/types/BanFromCommunityResponse.d.ts +5 -0
- package/dist/types/BanFromCommunityResponse.js +2 -0
- package/dist/types/BanPerson.d.ts +9 -0
- package/dist/types/BanPerson.js +2 -0
- package/dist/types/BanPersonResponse.d.ts +5 -0
- package/dist/types/BanPersonResponse.js +2 -0
- package/dist/types/BannedPersonsResponse.d.ts +4 -0
- package/dist/types/BannedPersonsResponse.js +2 -0
- package/dist/types/BlockCommunity.d.ts +6 -0
- package/dist/types/BlockCommunity.js +2 -0
- package/dist/types/BlockCommunityResponse.d.ts +5 -0
- package/dist/types/BlockCommunityResponse.js +2 -0
- package/dist/types/BlockPerson.d.ts +6 -0
- package/dist/types/BlockPerson.js +2 -0
- package/dist/types/BlockPersonResponse.d.ts +5 -0
- package/dist/types/BlockPersonResponse.js +2 -0
- package/dist/types/CaptchaResponse.d.ts +5 -0
- package/dist/types/CaptchaResponse.js +3 -0
- package/dist/types/ChangePassword.d.ts +6 -0
- package/dist/types/ChangePassword.js +3 -0
- package/dist/types/Comment.d.ts +19 -0
- package/dist/types/Comment.js +2 -0
- package/dist/types/CommentAggregates.d.ts +10 -0
- package/dist/types/CommentAggregates.js +2 -0
- package/dist/types/CommentId.d.ts +1 -0
- package/dist/types/CommentId.js +3 -0
- package/dist/types/CommentReply.d.ts +10 -0
- package/dist/types/CommentReply.js +2 -0
- package/dist/types/CommentReplyId.d.ts +1 -0
- package/dist/types/CommentReplyId.js +3 -0
- package/dist/types/CommentReplyResponse.d.ts +4 -0
- package/dist/types/CommentReplyResponse.js +2 -0
- package/dist/types/CommentReplyView.d.ts +21 -0
- package/dist/types/CommentReplyView.js +2 -0
- package/dist/types/CommentReport.d.ts +14 -0
- package/dist/types/CommentReport.js +2 -0
- package/dist/types/CommentReportId.d.ts +1 -0
- package/dist/types/CommentReportId.js +3 -0
- package/dist/types/CommentReportResponse.d.ts +4 -0
- package/dist/types/CommentReportResponse.js +2 -0
- package/dist/types/CommentReportView.d.ts +18 -0
- package/dist/types/CommentReportView.js +2 -0
- package/dist/types/CommentResponse.d.ts +7 -0
- package/dist/types/CommentResponse.js +2 -0
- package/dist/types/CommentSortType.d.ts +1 -0
- package/dist/types/CommentSortType.js +3 -0
- package/dist/types/CommentView.d.ts +18 -0
- package/dist/types/CommentView.js +2 -0
- package/dist/types/Community.d.ts +20 -0
- package/dist/types/Community.js +2 -0
- package/dist/types/CommunityAggregates.d.ts +13 -0
- package/dist/types/CommunityAggregates.js +2 -0
- package/dist/types/CommunityBlockId.d.ts +1 -0
- package/dist/types/CommunityBlockId.js +3 -0
- package/dist/types/CommunityBlockView.d.ts +6 -0
- package/dist/types/CommunityBlockView.js +2 -0
- package/dist/types/CommunityFollowerView.d.ts +6 -0
- package/dist/types/CommunityFollowerView.js +2 -0
- package/dist/types/CommunityId.d.ts +1 -0
- package/dist/types/CommunityId.js +3 -0
- package/dist/types/CommunityJoin.d.ts +4 -0
- package/dist/types/CommunityJoin.js +2 -0
- package/dist/types/CommunityJoinResponse.d.ts +3 -0
- package/dist/types/CommunityJoinResponse.js +3 -0
- package/dist/types/CommunityModeratorView.d.ts +6 -0
- package/dist/types/CommunityModeratorView.js +2 -0
- package/dist/types/CommunityResponse.d.ts +6 -0
- package/dist/types/CommunityResponse.js +2 -0
- package/dist/types/CommunityView.d.ts +9 -0
- package/dist/types/CommunityView.js +2 -0
- package/dist/types/CreateComment.d.ts +11 -0
- package/dist/types/CreateComment.js +2 -0
- package/dist/types/CreateCommentLike.d.ts +6 -0
- package/dist/types/CreateCommentLike.js +2 -0
- package/dist/types/CreateCommentReport.d.ts +6 -0
- package/dist/types/CreateCommentReport.js +2 -0
- package/dist/types/CreateCommunity.d.ts +12 -0
- package/dist/types/CreateCommunity.js +2 -0
- package/dist/types/CreateCustomEmoji.d.ts +8 -0
- package/dist/types/CreateCustomEmoji.js +3 -0
- package/dist/types/CreatePost.d.ts +12 -0
- package/dist/types/CreatePost.js +2 -0
- package/dist/types/CreatePostLike.d.ts +6 -0
- package/dist/types/CreatePostLike.js +2 -0
- package/dist/types/CreatePostReport.d.ts +6 -0
- package/dist/types/CreatePostReport.js +2 -0
- package/dist/types/CreatePrivateMessage.d.ts +6 -0
- package/dist/types/CreatePrivateMessage.js +2 -0
- package/dist/types/CreatePrivateMessageReport.d.ts +6 -0
- package/dist/types/CreatePrivateMessageReport.js +2 -0
- package/dist/types/CreateSite.d.ts +46 -0
- package/dist/types/CreateSite.js +2 -0
- package/dist/types/CustomEmoji.d.ts +12 -0
- package/dist/types/CustomEmoji.js +2 -0
- package/dist/types/CustomEmojiId.d.ts +1 -0
- package/dist/types/CustomEmojiId.js +3 -0
- package/dist/types/CustomEmojiKeyword.d.ts +6 -0
- package/dist/types/CustomEmojiKeyword.js +2 -0
- package/dist/types/CustomEmojiResponse.d.ts +4 -0
- package/dist/types/CustomEmojiResponse.js +2 -0
- package/dist/types/CustomEmojiView.d.ts +6 -0
- package/dist/types/CustomEmojiView.js +2 -0
- package/dist/types/DeleteAccount.d.ts +4 -0
- package/dist/types/DeleteAccount.js +3 -0
- package/dist/types/DeleteAccountResponse.d.ts +1 -0
- package/dist/types/DeleteAccountResponse.js +3 -0
- package/dist/types/DeleteComment.d.ts +6 -0
- package/dist/types/DeleteComment.js +2 -0
- package/dist/types/DeleteCommunity.d.ts +6 -0
- package/dist/types/DeleteCommunity.js +2 -0
- package/dist/types/DeleteCustomEmoji.d.ts +5 -0
- package/dist/types/DeleteCustomEmoji.js +2 -0
- package/dist/types/DeleteCustomEmojiResponse.d.ts +5 -0
- package/dist/types/DeleteCustomEmojiResponse.js +2 -0
- package/dist/types/DeletePost.d.ts +6 -0
- package/dist/types/DeletePost.js +2 -0
- package/dist/types/DeletePrivateMessage.d.ts +6 -0
- package/dist/types/DeletePrivateMessage.js +2 -0
- package/dist/types/DistinguishComment.d.ts +6 -0
- package/dist/types/DistinguishComment.js +2 -0
- package/dist/types/EditComment.d.ts +9 -0
- package/dist/types/EditComment.js +2 -0
- package/dist/types/EditCommunity.d.ts +13 -0
- package/dist/types/EditCommunity.js +2 -0
- package/dist/types/EditCustomEmoji.d.ts +9 -0
- package/dist/types/EditCustomEmoji.js +2 -0
- package/dist/types/EditPost.d.ts +11 -0
- package/dist/types/EditPost.js +2 -0
- package/dist/types/EditPrivateMessage.d.ts +6 -0
- package/dist/types/EditPrivateMessage.js +2 -0
- package/dist/types/EditSite.d.ts +47 -0
- package/dist/types/EditSite.js +2 -0
- package/dist/types/FeaturePost.d.ts +8 -0
- package/dist/types/FeaturePost.js +2 -0
- package/dist/types/FederatedInstances.d.ts +6 -0
- package/dist/types/FederatedInstances.js +2 -0
- package/dist/types/FollowCommunity.d.ts +6 -0
- package/dist/types/FollowCommunity.js +2 -0
- package/dist/types/GetBannedPersons.d.ts +3 -0
- package/dist/types/GetBannedPersons.js +3 -0
- package/dist/types/GetCaptcha.d.ts +1 -0
- package/dist/types/GetCaptcha.js +3 -0
- package/dist/types/GetCaptchaResponse.d.ts +4 -0
- package/dist/types/GetCaptchaResponse.js +2 -0
- package/dist/types/GetComment.d.ts +5 -0
- package/dist/types/GetComment.js +2 -0
- package/dist/types/GetComments.d.ts +18 -0
- package/dist/types/GetComments.js +2 -0
- package/dist/types/GetCommentsResponse.d.ts +4 -0
- package/dist/types/GetCommentsResponse.js +2 -0
- package/dist/types/GetCommunity.d.ts +6 -0
- package/dist/types/GetCommunity.js +2 -0
- package/dist/types/GetCommunityResponse.d.ts +12 -0
- package/dist/types/GetCommunityResponse.js +2 -0
- package/dist/types/GetFederatedInstances.d.ts +1 -0
- package/dist/types/GetFederatedInstances.js +3 -0
- package/dist/types/GetFederatedInstancesResponse.d.ts +4 -0
- package/dist/types/GetFederatedInstancesResponse.js +2 -0
- package/dist/types/GetModlog.d.ts +12 -0
- package/dist/types/GetModlog.js +2 -0
- package/dist/types/GetModlogResponse.d.ts +32 -0
- package/dist/types/GetModlogResponse.js +2 -0
- package/dist/types/GetPersonDetails.d.ts +13 -0
- package/dist/types/GetPersonDetails.js +2 -0
- package/dist/types/GetPersonDetailsResponse.d.ts +10 -0
- package/dist/types/GetPersonDetailsResponse.js +2 -0
- package/dist/types/GetPersonMentions.d.ts +8 -0
- package/dist/types/GetPersonMentions.js +2 -0
- package/dist/types/GetPersonMentionsResponse.d.ts +4 -0
- package/dist/types/GetPersonMentionsResponse.js +2 -0
- package/dist/types/GetPost.d.ts +5 -0
- package/dist/types/GetPost.js +2 -0
- package/dist/types/GetPostResponse.d.ts +10 -0
- package/dist/types/GetPostResponse.js +2 -0
- package/dist/types/GetPosts.d.ts +13 -0
- package/dist/types/GetPosts.js +2 -0
- package/dist/types/GetPostsResponse.d.ts +4 -0
- package/dist/types/GetPostsResponse.js +2 -0
- package/dist/types/GetPrivateMessages.d.ts +6 -0
- package/dist/types/GetPrivateMessages.js +3 -0
- package/dist/types/GetReplies.d.ts +8 -0
- package/dist/types/GetReplies.js +2 -0
- package/dist/types/GetRepliesResponse.d.ts +4 -0
- package/dist/types/GetRepliesResponse.js +2 -0
- package/dist/types/GetReportCount.d.ts +5 -0
- package/dist/types/GetReportCount.js +2 -0
- package/dist/types/GetReportCountResponse.d.ts +7 -0
- package/dist/types/GetReportCountResponse.js +2 -0
- package/dist/types/GetSite.d.ts +3 -0
- package/dist/types/GetSite.js +3 -0
- package/dist/types/GetSiteMetadata.d.ts +3 -0
- package/dist/types/GetSiteMetadata.js +3 -0
- package/dist/types/GetSiteMetadataResponse.d.ts +4 -0
- package/dist/types/GetSiteMetadataResponse.js +2 -0
- package/dist/types/GetSiteResponse.d.ts +18 -0
- package/dist/types/GetSiteResponse.js +2 -0
- package/dist/types/GetUnreadCount.d.ts +3 -0
- package/dist/types/GetUnreadCount.js +3 -0
- package/dist/types/GetUnreadCountResponse.d.ts +5 -0
- package/dist/types/GetUnreadCountResponse.js +3 -0
- package/dist/types/GetUnreadRegistrationApplicationCount.d.ts +3 -0
- package/dist/types/GetUnreadRegistrationApplicationCount.js +3 -0
- package/dist/types/GetUnreadRegistrationApplicationCountResponse.d.ts +3 -0
- package/dist/types/GetUnreadRegistrationApplicationCountResponse.js +3 -0
- package/dist/types/HideCommunity.d.ts +7 -0
- package/dist/types/HideCommunity.js +2 -0
- package/dist/types/Instance.d.ts +9 -0
- package/dist/types/Instance.js +2 -0
- package/dist/types/InstanceId.d.ts +1 -0
- package/dist/types/InstanceId.js +3 -0
- package/dist/types/Language.d.ts +6 -0
- package/dist/types/Language.js +2 -0
- package/dist/types/LanguageId.d.ts +1 -0
- package/dist/types/LanguageId.js +3 -0
- package/dist/types/LeaveAdmin.d.ts +3 -0
- package/dist/types/LeaveAdmin.js +3 -0
- package/dist/types/ListCommentReports.d.ts +8 -0
- package/dist/types/ListCommentReports.js +2 -0
- package/dist/types/ListCommentReportsResponse.d.ts +4 -0
- package/dist/types/ListCommentReportsResponse.js +2 -0
- package/dist/types/ListCommunities.d.ts +9 -0
- package/dist/types/ListCommunities.js +2 -0
- package/dist/types/ListCommunitiesResponse.d.ts +4 -0
- package/dist/types/ListCommunitiesResponse.js +2 -0
- package/dist/types/ListPostReports.d.ts +8 -0
- package/dist/types/ListPostReports.js +2 -0
- package/dist/types/ListPostReportsResponse.d.ts +4 -0
- package/dist/types/ListPostReportsResponse.js +2 -0
- package/dist/types/ListPrivateMessageReports.d.ts +6 -0
- package/dist/types/ListPrivateMessageReports.js +3 -0
- package/dist/types/ListPrivateMessageReportsResponse.d.ts +4 -0
- package/dist/types/ListPrivateMessageReportsResponse.js +2 -0
- package/dist/types/ListRegistrationApplications.d.ts +6 -0
- package/dist/types/ListRegistrationApplications.js +3 -0
- package/dist/types/ListRegistrationApplicationsResponse.d.ts +4 -0
- package/dist/types/ListRegistrationApplicationsResponse.js +2 -0
- package/dist/types/ListingType.d.ts +1 -0
- package/dist/types/ListingType.js +3 -0
- package/dist/types/LocalSite.d.ts +31 -0
- package/dist/types/LocalSite.js +2 -0
- package/dist/types/LocalSiteId.d.ts +1 -0
- package/dist/types/LocalSiteId.js +3 -0
- package/dist/types/LocalSiteRateLimit.d.ts +19 -0
- package/dist/types/LocalSiteRateLimit.js +2 -0
- package/dist/types/LocalUser.d.ts +24 -0
- package/dist/types/LocalUser.js +2 -0
- package/dist/types/LocalUserId.d.ts +1 -0
- package/dist/types/LocalUserId.js +3 -0
- package/dist/types/LocalUserView.d.ts +8 -0
- package/dist/types/LocalUserView.js +2 -0
- package/dist/types/LockPost.d.ts +6 -0
- package/dist/types/LockPost.js +2 -0
- package/dist/types/Login.d.ts +5 -0
- package/dist/types/Login.js +3 -0
- package/dist/types/LoginResponse.d.ts +5 -0
- package/dist/types/LoginResponse.js +3 -0
- package/dist/types/MarkAllAsRead.d.ts +3 -0
- package/dist/types/MarkAllAsRead.js +3 -0
- package/dist/types/MarkCommentReplyAsRead.d.ts +6 -0
- package/dist/types/MarkCommentReplyAsRead.js +2 -0
- package/dist/types/MarkPersonMentionAsRead.d.ts +6 -0
- package/dist/types/MarkPersonMentionAsRead.js +2 -0
- package/dist/types/MarkPostAsRead.d.ts +6 -0
- package/dist/types/MarkPostAsRead.js +2 -0
- package/dist/types/MarkPrivateMessageAsRead.d.ts +6 -0
- package/dist/types/MarkPrivateMessageAsRead.js +2 -0
- package/dist/types/ModAdd.d.ts +8 -0
- package/dist/types/ModAdd.js +2 -0
- package/dist/types/ModAddCommunity.d.ts +10 -0
- package/dist/types/ModAddCommunity.js +2 -0
- package/dist/types/ModAddCommunityView.d.ts +9 -0
- package/dist/types/ModAddCommunityView.js +2 -0
- package/dist/types/ModAddView.d.ts +7 -0
- package/dist/types/ModAddView.js +2 -0
- package/dist/types/ModBan.d.ts +10 -0
- package/dist/types/ModBan.js +2 -0
- package/dist/types/ModBanFromCommunity.d.ts +12 -0
- package/dist/types/ModBanFromCommunity.js +2 -0
- package/dist/types/ModBanFromCommunityView.d.ts +9 -0
- package/dist/types/ModBanFromCommunityView.js +2 -0
- package/dist/types/ModBanView.d.ts +7 -0
- package/dist/types/ModBanView.js +2 -0
- package/dist/types/ModFeaturePost.d.ts +10 -0
- package/dist/types/ModFeaturePost.js +2 -0
- package/dist/types/ModFeaturePostView.d.ts +10 -0
- package/dist/types/ModFeaturePostView.js +2 -0
- package/dist/types/ModHideCommunity.d.ts +10 -0
- package/dist/types/ModHideCommunity.js +2 -0
- package/dist/types/ModHideCommunityView.d.ts +8 -0
- package/dist/types/ModHideCommunityView.js +2 -0
- package/dist/types/ModJoin.d.ts +4 -0
- package/dist/types/ModJoin.js +2 -0
- package/dist/types/ModJoinResponse.d.ts +3 -0
- package/dist/types/ModJoinResponse.js +3 -0
- package/dist/types/ModLockPost.d.ts +9 -0
- package/dist/types/ModLockPost.js +2 -0
- package/dist/types/ModLockPostView.d.ts +10 -0
- package/dist/types/ModLockPostView.js +2 -0
- package/dist/types/ModRemoveComment.d.ts +10 -0
- package/dist/types/ModRemoveComment.js +2 -0
- package/dist/types/ModRemoveCommentView.d.ts +13 -0
- package/dist/types/ModRemoveCommentView.js +2 -0
- package/dist/types/ModRemoveCommunity.d.ts +11 -0
- package/dist/types/ModRemoveCommunity.js +2 -0
- package/dist/types/ModRemoveCommunityView.d.ts +8 -0
- package/dist/types/ModRemoveCommunityView.js +2 -0
- package/dist/types/ModRemovePost.d.ts +10 -0
- package/dist/types/ModRemovePost.js +2 -0
- package/dist/types/ModRemovePostView.d.ts +10 -0
- package/dist/types/ModRemovePostView.js +2 -0
- package/dist/types/ModTransferCommunity.d.ts +9 -0
- package/dist/types/ModTransferCommunity.js +2 -0
- package/dist/types/ModTransferCommunityView.d.ts +9 -0
- package/dist/types/ModTransferCommunityView.js +2 -0
- package/dist/types/ModlogActionType.d.ts +1 -0
- package/dist/types/ModlogActionType.js +3 -0
- package/dist/types/ModlogListParams.d.ts +10 -0
- package/dist/types/ModlogListParams.js +2 -0
- package/dist/types/MyUserInfo.d.ts +14 -0
- package/dist/types/MyUserInfo.js +2 -0
- package/dist/types/PasswordChangeAfterReset.d.ts +5 -0
- package/dist/types/PasswordChangeAfterReset.js +3 -0
- package/dist/types/PasswordReset.d.ts +3 -0
- package/dist/types/PasswordReset.js +3 -0
- package/dist/types/PasswordResetResponse.d.ts +1 -0
- package/dist/types/PasswordResetResponse.js +3 -0
- package/dist/types/Person.d.ts +21 -0
- package/dist/types/Person.js +2 -0
- package/dist/types/PersonAggregates.d.ts +9 -0
- package/dist/types/PersonAggregates.js +2 -0
- package/dist/types/PersonBlockId.d.ts +1 -0
- package/dist/types/PersonBlockId.js +3 -0
- package/dist/types/PersonBlockView.d.ts +5 -0
- package/dist/types/PersonBlockView.js +2 -0
- package/dist/types/PersonId.d.ts +1 -0
- package/dist/types/PersonId.js +3 -0
- package/dist/types/PersonMention.d.ts +10 -0
- package/dist/types/PersonMention.js +2 -0
- package/dist/types/PersonMentionId.d.ts +1 -0
- package/dist/types/PersonMentionId.js +3 -0
- package/dist/types/PersonMentionResponse.d.ts +4 -0
- package/dist/types/PersonMentionResponse.js +2 -0
- package/dist/types/PersonMentionView.d.ts +21 -0
- package/dist/types/PersonMentionView.js +2 -0
- package/dist/types/PersonView.d.ts +6 -0
- package/dist/types/PersonView.js +2 -0
- package/dist/types/Post.d.ts +27 -0
- package/dist/types/Post.js +2 -0
- package/dist/types/PostAggregates.d.ts +14 -0
- package/dist/types/PostAggregates.js +2 -0
- package/dist/types/PostFeatureType.d.ts +1 -0
- package/dist/types/PostFeatureType.js +3 -0
- package/dist/types/PostId.d.ts +1 -0
- package/dist/types/PostId.js +3 -0
- package/dist/types/PostJoin.d.ts +4 -0
- package/dist/types/PostJoin.js +2 -0
- package/dist/types/PostJoinResponse.d.ts +3 -0
- package/dist/types/PostJoinResponse.js +3 -0
- package/dist/types/PostOrCommentId.d.ts +7 -0
- package/dist/types/PostOrCommentId.js +2 -0
- package/dist/types/PostReport.d.ts +16 -0
- package/dist/types/PostReport.js +2 -0
- package/dist/types/PostReportId.d.ts +1 -0
- package/dist/types/PostReportId.js +3 -0
- package/dist/types/PostReportResponse.d.ts +4 -0
- package/dist/types/PostReportResponse.js +2 -0
- package/dist/types/PostReportView.d.ts +16 -0
- package/dist/types/PostReportView.js +2 -0
- package/dist/types/PostResponse.d.ts +4 -0
- package/dist/types/PostResponse.js +2 -0
- package/dist/types/PostView.d.ts +18 -0
- package/dist/types/PostView.js +2 -0
- package/dist/types/PrivateMessage.d.ts +14 -0
- package/dist/types/PrivateMessage.js +2 -0
- package/dist/types/PrivateMessageId.d.ts +1 -0
- package/dist/types/PrivateMessageId.js +3 -0
- package/dist/types/PrivateMessageReport.d.ts +14 -0
- package/dist/types/PrivateMessageReport.js +2 -0
- package/dist/types/PrivateMessageReportId.d.ts +1 -0
- package/dist/types/PrivateMessageReportId.js +3 -0
- package/dist/types/PrivateMessageReportResponse.d.ts +4 -0
- package/dist/types/PrivateMessageReportResponse.js +2 -0
- package/dist/types/PrivateMessageReportView.d.ts +10 -0
- package/dist/types/PrivateMessageReportView.js +2 -0
- package/dist/types/PrivateMessageResponse.d.ts +4 -0
- package/dist/types/PrivateMessageResponse.js +2 -0
- package/dist/types/PrivateMessageView.d.ts +7 -0
- package/dist/types/PrivateMessageView.js +2 -0
- package/dist/types/PrivateMessagesResponse.d.ts +4 -0
- package/dist/types/PrivateMessagesResponse.js +2 -0
- package/dist/types/PurgeComment.d.ts +6 -0
- package/dist/types/PurgeComment.js +2 -0
- package/dist/types/PurgeCommunity.d.ts +6 -0
- package/dist/types/PurgeCommunity.js +2 -0
- package/dist/types/PurgeItemResponse.d.ts +3 -0
- package/dist/types/PurgeItemResponse.js +3 -0
- package/dist/types/PurgePerson.d.ts +6 -0
- package/dist/types/PurgePerson.js +2 -0
- package/dist/types/PurgePost.d.ts +6 -0
- package/dist/types/PurgePost.js +2 -0
- package/dist/types/Register.d.ts +11 -0
- package/dist/types/Register.js +3 -0
- package/dist/types/RegistrationApplication.d.ts +10 -0
- package/dist/types/RegistrationApplication.js +2 -0
- package/dist/types/RegistrationApplicationResponse.d.ts +4 -0
- package/dist/types/RegistrationApplicationResponse.js +2 -0
- package/dist/types/RegistrationApplicationView.d.ts +9 -0
- package/dist/types/RegistrationApplicationView.js +2 -0
- package/dist/types/RegistrationMode.d.ts +1 -0
- package/dist/types/RegistrationMode.js +3 -0
- package/dist/types/RemoveComment.d.ts +7 -0
- package/dist/types/RemoveComment.js +2 -0
- package/dist/types/RemoveCommunity.d.ts +8 -0
- package/dist/types/RemoveCommunity.js +2 -0
- package/dist/types/RemovePost.d.ts +7 -0
- package/dist/types/RemovePost.js +2 -0
- package/dist/types/ResolveCommentReport.d.ts +6 -0
- package/dist/types/ResolveCommentReport.js +2 -0
- package/dist/types/ResolveObject.d.ts +4 -0
- package/dist/types/ResolveObject.js +3 -0
- package/dist/types/ResolveObjectResponse.d.ts +10 -0
- package/dist/types/ResolveObjectResponse.js +2 -0
- package/dist/types/ResolvePostReport.d.ts +6 -0
- package/dist/types/ResolvePostReport.js +2 -0
- package/dist/types/ResolvePrivateMessageReport.d.ts +6 -0
- package/dist/types/ResolvePrivateMessageReport.js +2 -0
- package/dist/types/SaveComment.d.ts +6 -0
- package/dist/types/SaveComment.js +2 -0
- package/dist/types/SavePost.d.ts +6 -0
- package/dist/types/SavePost.js +2 -0
- package/dist/types/SaveUserSettings.d.ts +26 -0
- package/dist/types/SaveUserSettings.js +2 -0
- package/dist/types/Search.d.ts +17 -0
- package/dist/types/Search.js +2 -0
- package/dist/types/SearchResponse.d.ts +12 -0
- package/dist/types/SearchResponse.js +2 -0
- package/dist/types/SearchType.d.ts +1 -0
- package/dist/types/SearchType.js +3 -0
- package/dist/types/Site.d.ts +18 -0
- package/dist/types/Site.js +2 -0
- package/dist/types/SiteAggregates.d.ts +13 -0
- package/dist/types/SiteAggregates.js +2 -0
- package/dist/types/SiteId.d.ts +1 -0
- package/dist/types/SiteId.js +3 -0
- package/dist/types/SiteMetadata.d.ts +6 -0
- package/dist/types/SiteMetadata.js +3 -0
- package/dist/types/SiteResponse.d.ts +4 -0
- package/dist/types/SiteResponse.js +2 -0
- package/dist/types/SiteView.d.ts +10 -0
- package/dist/types/SiteView.js +2 -0
- package/dist/types/SortType.d.ts +1 -0
- package/dist/types/SortType.js +3 -0
- package/dist/types/SubscribedType.d.ts +1 -0
- package/dist/types/SubscribedType.js +3 -0
- package/dist/types/Tagline.d.ts +8 -0
- package/dist/types/Tagline.js +2 -0
- package/dist/types/TransferCommunity.d.ts +7 -0
- package/dist/types/TransferCommunity.js +2 -0
- package/dist/types/UserJoin.d.ts +3 -0
- package/dist/types/UserJoin.js +3 -0
- package/dist/types/UserJoinResponse.d.ts +3 -0
- package/dist/types/UserJoinResponse.js +3 -0
- package/dist/types/VerifyEmail.d.ts +3 -0
- package/dist/types/VerifyEmail.js +3 -0
- package/dist/types/VerifyEmailResponse.d.ts +1 -0
- package/dist/types/VerifyEmailResponse.js +3 -0
- package/dist/types/others.d.ts +113 -0
- package/dist/types/others.js +96 -0
- package/dist/utils.d.ts +0 -0
- package/dist/utils.js +0 -0
- package/dist/websocket.d.ts +142 -17
- package/dist/websocket.js +93 -21
- package/package.json +26 -24
- package/dist/interfaces/aggregates.d.ts +0 -90
- package/dist/interfaces/api/comment.d.ts +0 -115
- package/dist/interfaces/api/community.d.ts +0 -120
- package/dist/interfaces/api/index.d.ts +0 -6
- package/dist/interfaces/api/index.js +0 -18
- package/dist/interfaces/api/person.d.ts +0 -271
- package/dist/interfaces/api/post.d.ts +0 -130
- package/dist/interfaces/api/site.d.ts +0 -168
- package/dist/interfaces/api/websocket.d.ts +0 -27
- package/dist/interfaces/index.d.ts +0 -5
- package/dist/interfaces/index.js +0 -17
- package/dist/interfaces/others.d.ts +0 -186
- package/dist/interfaces/others.js +0 -151
- package/dist/interfaces/source.d.ts +0 -250
- package/dist/interfaces/views.d.ts +0 -173
- /package/dist/{interfaces/aggregates.js → types/AddAdmin.js} +0 -0
- /package/dist/{interfaces/api/comment.js → types/AddAdminResponse.js} +0 -0
- /package/dist/{interfaces/api/community.js → types/AddModToCommunity.js} +0 -0
- /package/dist/{interfaces/api/person.js → types/AddModToCommunityResponse.js} +0 -0
- /package/dist/{interfaces/api/post.js → types/AdminPurgeComment.js} +0 -0
- /package/dist/{interfaces/api/site.js → types/AdminPurgeCommentView.js} +0 -0
- /package/dist/{interfaces/api/websocket.js → types/AdminPurgeCommunity.js} +0 -0
- /package/dist/{interfaces/source.js → types/AdminPurgeCommunityView.js} +0 -0
- /package/dist/{interfaces/views.js → types/AdminPurgePerson.js} +0 -0
package/dist/websocket.d.ts
CHANGED
@@ -1,9 +1,89 @@
|
|
1
|
-
import {
|
2
|
-
import { AddModToCommunity
|
3
|
-
import {
|
4
|
-
import {
|
5
|
-
import {
|
6
|
-
import {
|
1
|
+
import { AddAdmin } from "./types/AddAdmin";
|
2
|
+
import { AddModToCommunity } from "./types/AddModToCommunity";
|
3
|
+
import { ApproveRegistrationApplication } from "./types/ApproveRegistrationApplication";
|
4
|
+
import { BanFromCommunity } from "./types/BanFromCommunity";
|
5
|
+
import { BanPerson } from "./types/BanPerson";
|
6
|
+
import { BlockCommunity } from "./types/BlockCommunity";
|
7
|
+
import { BlockPerson } from "./types/BlockPerson";
|
8
|
+
import { ChangePassword } from "./types/ChangePassword";
|
9
|
+
import { CommunityJoin } from "./types/CommunityJoin";
|
10
|
+
import { CreateComment } from "./types/CreateComment";
|
11
|
+
import { CreateCommentLike } from "./types/CreateCommentLike";
|
12
|
+
import { CreateCommentReport } from "./types/CreateCommentReport";
|
13
|
+
import { CreateCommunity } from "./types/CreateCommunity";
|
14
|
+
import { CreateCustomEmoji } from "./types/CreateCustomEmoji";
|
15
|
+
import { CreatePost } from "./types/CreatePost";
|
16
|
+
import { CreatePostLike } from "./types/CreatePostLike";
|
17
|
+
import { CreatePostReport } from "./types/CreatePostReport";
|
18
|
+
import { CreatePrivateMessage } from "./types/CreatePrivateMessage";
|
19
|
+
import { CreatePrivateMessageReport } from "./types/CreatePrivateMessageReport";
|
20
|
+
import { CreateSite } from "./types/CreateSite";
|
21
|
+
import { DeleteAccount } from "./types/DeleteAccount";
|
22
|
+
import { DeleteComment } from "./types/DeleteComment";
|
23
|
+
import { DeleteCommunity } from "./types/DeleteCommunity";
|
24
|
+
import { DeleteCustomEmoji } from "./types/DeleteCustomEmoji";
|
25
|
+
import { DeletePost } from "./types/DeletePost";
|
26
|
+
import { DeletePrivateMessage } from "./types/DeletePrivateMessage";
|
27
|
+
import { EditComment } from "./types/EditComment";
|
28
|
+
import { EditCommunity } from "./types/EditCommunity";
|
29
|
+
import { EditCustomEmoji } from "./types/EditCustomEmoji";
|
30
|
+
import { EditPost } from "./types/EditPost";
|
31
|
+
import { EditPrivateMessage } from "./types/EditPrivateMessage";
|
32
|
+
import { EditSite } from "./types/EditSite";
|
33
|
+
import { FeaturePost } from "./types/FeaturePost";
|
34
|
+
import { FollowCommunity } from "./types/FollowCommunity";
|
35
|
+
import { GetBannedPersons } from "./types/GetBannedPersons";
|
36
|
+
import { GetComment } from "./types/GetComment";
|
37
|
+
import { GetComments } from "./types/GetComments";
|
38
|
+
import { GetCommunity } from "./types/GetCommunity";
|
39
|
+
import { GetModlog } from "./types/GetModlog";
|
40
|
+
import { GetPersonDetails } from "./types/GetPersonDetails";
|
41
|
+
import { GetPersonMentions } from "./types/GetPersonMentions";
|
42
|
+
import { GetPost } from "./types/GetPost";
|
43
|
+
import { GetPosts } from "./types/GetPosts";
|
44
|
+
import { GetPrivateMessages } from "./types/GetPrivateMessages";
|
45
|
+
import { GetReplies } from "./types/GetReplies";
|
46
|
+
import { GetReportCount } from "./types/GetReportCount";
|
47
|
+
import { GetSite } from "./types/GetSite";
|
48
|
+
import { GetSiteMetadata } from "./types/GetSiteMetadata";
|
49
|
+
import { GetUnreadCount } from "./types/GetUnreadCount";
|
50
|
+
import { GetUnreadRegistrationApplicationCount } from "./types/GetUnreadRegistrationApplicationCount";
|
51
|
+
import { LeaveAdmin } from "./types/LeaveAdmin";
|
52
|
+
import { ListCommentReports } from "./types/ListCommentReports";
|
53
|
+
import { ListCommunities } from "./types/ListCommunities";
|
54
|
+
import { ListPostReports } from "./types/ListPostReports";
|
55
|
+
import { ListPrivateMessageReports } from "./types/ListPrivateMessageReports";
|
56
|
+
import { ListRegistrationApplications } from "./types/ListRegistrationApplications";
|
57
|
+
import { LockPost } from "./types/LockPost";
|
58
|
+
import { Login } from "./types/Login";
|
59
|
+
import { MarkAllAsRead } from "./types/MarkAllAsRead";
|
60
|
+
import { MarkCommentReplyAsRead } from "./types/MarkCommentReplyAsRead";
|
61
|
+
import { MarkPersonMentionAsRead } from "./types/MarkPersonMentionAsRead";
|
62
|
+
import { MarkPostAsRead } from "./types/MarkPostAsRead";
|
63
|
+
import { MarkPrivateMessageAsRead } from "./types/MarkPrivateMessageAsRead";
|
64
|
+
import { UserOperation } from "./types/others";
|
65
|
+
import { PasswordChangeAfterReset } from "./types/PasswordChangeAfterReset";
|
66
|
+
import { PasswordReset } from "./types/PasswordReset";
|
67
|
+
import { PostJoin } from "./types/PostJoin";
|
68
|
+
import { PurgeComment } from "./types/PurgeComment";
|
69
|
+
import { PurgeCommunity } from "./types/PurgeCommunity";
|
70
|
+
import { PurgePerson } from "./types/PurgePerson";
|
71
|
+
import { PurgePost } from "./types/PurgePost";
|
72
|
+
import { Register } from "./types/Register";
|
73
|
+
import { RemoveComment } from "./types/RemoveComment";
|
74
|
+
import { RemoveCommunity } from "./types/RemoveCommunity";
|
75
|
+
import { RemovePost } from "./types/RemovePost";
|
76
|
+
import { ResolveCommentReport } from "./types/ResolveCommentReport";
|
77
|
+
import { ResolveObject } from "./types/ResolveObject";
|
78
|
+
import { ResolvePostReport } from "./types/ResolvePostReport";
|
79
|
+
import { ResolvePrivateMessageReport } from "./types/ResolvePrivateMessageReport";
|
80
|
+
import { SaveComment } from "./types/SaveComment";
|
81
|
+
import { SavePost } from "./types/SavePost";
|
82
|
+
import { SaveUserSettings } from "./types/SaveUserSettings";
|
83
|
+
import { Search } from "./types/Search";
|
84
|
+
import { TransferCommunity } from "./types/TransferCommunity";
|
85
|
+
import { UserJoin } from "./types/UserJoin";
|
86
|
+
import { VerifyEmail } from "./types/VerifyEmail";
|
7
87
|
/**
|
8
88
|
* Helps build lemmy websocket message requests, that you can use in your Websocket sends.
|
9
89
|
*
|
@@ -100,7 +180,7 @@ export declare class LemmyWebsocket {
|
|
100
180
|
/**
|
101
181
|
* Mark a comment as read.
|
102
182
|
*/
|
103
|
-
|
183
|
+
markCommentReplyAsRead(form: MarkCommentReplyAsRead): string;
|
104
184
|
/**
|
105
185
|
* Like / vote on a comment.
|
106
186
|
*/
|
@@ -129,6 +209,10 @@ export declare class LemmyWebsocket {
|
|
129
209
|
* Get / fetch comments.
|
130
210
|
*/
|
131
211
|
getComments(form: GetComments): string;
|
212
|
+
/**
|
213
|
+
* Get / fetch comment.
|
214
|
+
*/
|
215
|
+
getComment(form: GetComment): string;
|
132
216
|
/**
|
133
217
|
* Like / vote on a post.
|
134
218
|
*/
|
@@ -150,9 +234,13 @@ export declare class LemmyWebsocket {
|
|
150
234
|
*/
|
151
235
|
lockPost(form: LockPost): string;
|
152
236
|
/**
|
153
|
-
* A moderator can
|
237
|
+
* A moderator can feature a post ( IE stick it to the top of a community ).
|
238
|
+
*/
|
239
|
+
featurePost(form: FeaturePost): string;
|
240
|
+
/**
|
241
|
+
* Mark a post as read.
|
154
242
|
*/
|
155
|
-
|
243
|
+
markPostAsRead(form: MarkPostAsRead): string;
|
156
244
|
/**
|
157
245
|
* Save a post.
|
158
246
|
*/
|
@@ -244,11 +332,7 @@ export declare class LemmyWebsocket {
|
|
244
332
|
/**
|
245
333
|
* Gets the site, and your user data.
|
246
334
|
*/
|
247
|
-
getSite(form
|
248
|
-
/**
|
249
|
-
* Get your site configuration.
|
250
|
-
*/
|
251
|
-
getSiteConfig(form: GetSiteConfig): string;
|
335
|
+
getSite(form: GetSite): string;
|
252
336
|
/**
|
253
337
|
* Search lemmy.
|
254
338
|
*/
|
@@ -292,7 +376,7 @@ export declare class LemmyWebsocket {
|
|
292
376
|
/**
|
293
377
|
* Change your password from an email / token based reset.
|
294
378
|
*/
|
295
|
-
passwordChange(form:
|
379
|
+
passwordChange(form: PasswordChangeAfterReset): string;
|
296
380
|
/**
|
297
381
|
* Create a private message.
|
298
382
|
*/
|
@@ -314,9 +398,17 @@ export declare class LemmyWebsocket {
|
|
314
398
|
*/
|
315
399
|
getPrivateMessages(form: GetPrivateMessages): string;
|
316
400
|
/**
|
317
|
-
*
|
401
|
+
* Create a report for a private message.
|
318
402
|
*/
|
319
|
-
|
403
|
+
createPrivateMessageReport(form: CreatePrivateMessageReport): string;
|
404
|
+
/**
|
405
|
+
* Resolve a report for a private message.
|
406
|
+
*/
|
407
|
+
resolvePrivateMessageReport(form: ResolvePrivateMessageReport): string;
|
408
|
+
/**
|
409
|
+
* List private message reports.
|
410
|
+
*/
|
411
|
+
listPrivateMessageReports(form: ListPrivateMessageReports): string;
|
320
412
|
/**
|
321
413
|
* Block a person.
|
322
414
|
*/
|
@@ -325,4 +417,37 @@ export declare class LemmyWebsocket {
|
|
325
417
|
* Block a community.
|
326
418
|
*/
|
327
419
|
blockCommunity(form: BlockCommunity): string;
|
420
|
+
/**
|
421
|
+
* Purge / Delete a person from the database.
|
422
|
+
*/
|
423
|
+
purgePerson(form: PurgePerson): string;
|
424
|
+
/**
|
425
|
+
* Purge / Delete a community from the database.
|
426
|
+
*/
|
427
|
+
purgeCommunity(form: PurgeCommunity): string;
|
428
|
+
/**
|
429
|
+
* Purge / Delete a post from the database.
|
430
|
+
*/
|
431
|
+
purgePost(form: PurgePost): string;
|
432
|
+
/**
|
433
|
+
* Purge / Delete a comment from the database.
|
434
|
+
*/
|
435
|
+
purgeComment(form: PurgeComment): string;
|
436
|
+
/**
|
437
|
+
* Create a custom emoji
|
438
|
+
*/
|
439
|
+
createCustomEmoji(form: CreateCustomEmoji): string;
|
440
|
+
/**
|
441
|
+
* Edit a custom emoji
|
442
|
+
*/
|
443
|
+
editCustomEmoji(form: EditCustomEmoji): string;
|
444
|
+
/**
|
445
|
+
* Delete a custom emoji
|
446
|
+
*/
|
447
|
+
deleteCustomEmoji(form: DeleteCustomEmoji): string;
|
328
448
|
}
|
449
|
+
export declare function wsUserOp(msg: any): UserOperation;
|
450
|
+
/**
|
451
|
+
* Converts a websocket string response to a usable result
|
452
|
+
*/
|
453
|
+
export declare function wsJsonToRes<ResponseType>(msg: any): ResponseType;
|
package/dist/websocket.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.LemmyWebsocket = void 0;
|
4
|
-
var others_1 = require("./
|
3
|
+
exports.wsJsonToRes = exports.wsUserOp = exports.LemmyWebsocket = void 0;
|
4
|
+
var others_1 = require("./types/others");
|
5
5
|
/**
|
6
6
|
* Helps build lemmy websocket message requests, that you can use in your Websocket sends.
|
7
7
|
*
|
@@ -137,8 +137,8 @@ var LemmyWebsocket = /** @class */ (function () {
|
|
137
137
|
/**
|
138
138
|
* Mark a comment as read.
|
139
139
|
*/
|
140
|
-
LemmyWebsocket.prototype.
|
141
|
-
return wrapper(others_1.UserOperation.
|
140
|
+
LemmyWebsocket.prototype.markCommentReplyAsRead = function (form) {
|
141
|
+
return wrapper(others_1.UserOperation.MarkCommentReplyAsRead, form);
|
142
142
|
};
|
143
143
|
/**
|
144
144
|
* Like / vote on a comment.
|
@@ -182,6 +182,12 @@ var LemmyWebsocket = /** @class */ (function () {
|
|
182
182
|
LemmyWebsocket.prototype.getComments = function (form) {
|
183
183
|
return wrapper(others_1.UserOperation.GetComments, form);
|
184
184
|
};
|
185
|
+
/**
|
186
|
+
* Get / fetch comment.
|
187
|
+
*/
|
188
|
+
LemmyWebsocket.prototype.getComment = function (form) {
|
189
|
+
return wrapper(others_1.UserOperation.GetComment, form);
|
190
|
+
};
|
185
191
|
/**
|
186
192
|
* Like / vote on a post.
|
187
193
|
*/
|
@@ -213,10 +219,16 @@ var LemmyWebsocket = /** @class */ (function () {
|
|
213
219
|
return wrapper(others_1.UserOperation.LockPost, form);
|
214
220
|
};
|
215
221
|
/**
|
216
|
-
* A moderator can
|
222
|
+
* A moderator can feature a post ( IE stick it to the top of a community ).
|
223
|
+
*/
|
224
|
+
LemmyWebsocket.prototype.featurePost = function (form) {
|
225
|
+
return wrapper(others_1.UserOperation.FeaturePost, form);
|
226
|
+
};
|
227
|
+
/**
|
228
|
+
* Mark a post as read.
|
217
229
|
*/
|
218
|
-
LemmyWebsocket.prototype.
|
219
|
-
return wrapper(others_1.UserOperation.
|
230
|
+
LemmyWebsocket.prototype.markPostAsRead = function (form) {
|
231
|
+
return wrapper(others_1.UserOperation.MarkPostAsRead, form);
|
220
232
|
};
|
221
233
|
/**
|
222
234
|
* Save a post.
|
@@ -354,15 +366,8 @@ var LemmyWebsocket = /** @class */ (function () {
|
|
354
366
|
* Gets the site, and your user data.
|
355
367
|
*/
|
356
368
|
LemmyWebsocket.prototype.getSite = function (form) {
|
357
|
-
if (form === void 0) { form = {}; }
|
358
369
|
return wrapper(others_1.UserOperation.GetSite, form);
|
359
370
|
};
|
360
|
-
/**
|
361
|
-
* Get your site configuration.
|
362
|
-
*/
|
363
|
-
LemmyWebsocket.prototype.getSiteConfig = function (form) {
|
364
|
-
return wrapper(others_1.UserOperation.GetSiteConfig, form);
|
365
|
-
};
|
366
371
|
/**
|
367
372
|
* Search lemmy.
|
368
373
|
*/
|
@@ -427,7 +432,7 @@ var LemmyWebsocket = /** @class */ (function () {
|
|
427
432
|
* Change your password from an email / token based reset.
|
428
433
|
*/
|
429
434
|
LemmyWebsocket.prototype.passwordChange = function (form) {
|
430
|
-
return wrapper(others_1.UserOperation.
|
435
|
+
return wrapper(others_1.UserOperation.PasswordChangeAfterReset, form);
|
431
436
|
};
|
432
437
|
/**
|
433
438
|
* Create a private message.
|
@@ -460,10 +465,22 @@ var LemmyWebsocket = /** @class */ (function () {
|
|
460
465
|
return wrapper(others_1.UserOperation.GetPrivateMessages, form);
|
461
466
|
};
|
462
467
|
/**
|
463
|
-
*
|
468
|
+
* Create a report for a private message.
|
469
|
+
*/
|
470
|
+
LemmyWebsocket.prototype.createPrivateMessageReport = function (form) {
|
471
|
+
return wrapper(others_1.UserOperation.CreatePrivateMessageReport, form);
|
472
|
+
};
|
473
|
+
/**
|
474
|
+
* Resolve a report for a private message.
|
475
|
+
*/
|
476
|
+
LemmyWebsocket.prototype.resolvePrivateMessageReport = function (form) {
|
477
|
+
return wrapper(others_1.UserOperation.ResolvePrivateMessageReport, form);
|
478
|
+
};
|
479
|
+
/**
|
480
|
+
* List private message reports.
|
464
481
|
*/
|
465
|
-
LemmyWebsocket.prototype.
|
466
|
-
return wrapper(others_1.UserOperation.
|
482
|
+
LemmyWebsocket.prototype.listPrivateMessageReports = function (form) {
|
483
|
+
return wrapper(others_1.UserOperation.ListPrivateMessageReports, form);
|
467
484
|
};
|
468
485
|
/**
|
469
486
|
* Block a person.
|
@@ -477,11 +494,66 @@ var LemmyWebsocket = /** @class */ (function () {
|
|
477
494
|
LemmyWebsocket.prototype.blockCommunity = function (form) {
|
478
495
|
return wrapper(others_1.UserOperation.BlockCommunity, form);
|
479
496
|
};
|
497
|
+
/**
|
498
|
+
* Purge / Delete a person from the database.
|
499
|
+
*/
|
500
|
+
LemmyWebsocket.prototype.purgePerson = function (form) {
|
501
|
+
return wrapper(others_1.UserOperation.PurgePerson, form);
|
502
|
+
};
|
503
|
+
/**
|
504
|
+
* Purge / Delete a community from the database.
|
505
|
+
*/
|
506
|
+
LemmyWebsocket.prototype.purgeCommunity = function (form) {
|
507
|
+
return wrapper(others_1.UserOperation.PurgeCommunity, form);
|
508
|
+
};
|
509
|
+
/**
|
510
|
+
* Purge / Delete a post from the database.
|
511
|
+
*/
|
512
|
+
LemmyWebsocket.prototype.purgePost = function (form) {
|
513
|
+
return wrapper(others_1.UserOperation.PurgePost, form);
|
514
|
+
};
|
515
|
+
/**
|
516
|
+
* Purge / Delete a comment from the database.
|
517
|
+
*/
|
518
|
+
LemmyWebsocket.prototype.purgeComment = function (form) {
|
519
|
+
return wrapper(others_1.UserOperation.PurgeComment, form);
|
520
|
+
};
|
521
|
+
/**
|
522
|
+
* Create a custom emoji
|
523
|
+
*/
|
524
|
+
LemmyWebsocket.prototype.createCustomEmoji = function (form) {
|
525
|
+
return wrapper(others_1.UserOperation.CreateCustomEmoji, form);
|
526
|
+
};
|
527
|
+
/**
|
528
|
+
* Edit a custom emoji
|
529
|
+
*/
|
530
|
+
LemmyWebsocket.prototype.editCustomEmoji = function (form) {
|
531
|
+
return wrapper(others_1.UserOperation.EditCustomEmoji, form);
|
532
|
+
};
|
533
|
+
/**
|
534
|
+
* Delete a custom emoji
|
535
|
+
*/
|
536
|
+
LemmyWebsocket.prototype.deleteCustomEmoji = function (form) {
|
537
|
+
return wrapper(others_1.UserOperation.DeleteCustomEmoji, form);
|
538
|
+
};
|
480
539
|
return LemmyWebsocket;
|
481
540
|
}());
|
482
541
|
exports.LemmyWebsocket = LemmyWebsocket;
|
483
542
|
function wrapper(op, data) {
|
484
|
-
var send = { op: others_1.UserOperation[op], data: data };
|
485
|
-
|
486
|
-
|
543
|
+
var send = JSON.stringify({ op: others_1.UserOperation[op], data: data });
|
544
|
+
return send;
|
545
|
+
}
|
546
|
+
function wsUserOp(msg) {
|
547
|
+
var opStr = msg.op;
|
548
|
+
return others_1.UserOperation[opStr];
|
549
|
+
}
|
550
|
+
exports.wsUserOp = wsUserOp;
|
551
|
+
/**
|
552
|
+
* Converts a websocket string response to a usable result
|
553
|
+
*/
|
554
|
+
// TODO is this still necessary?
|
555
|
+
function wsJsonToRes(msg) {
|
556
|
+
// Have to deserialize the response again into the correct class
|
557
|
+
return msg.data;
|
487
558
|
}
|
559
|
+
exports.wsJsonToRes = wsJsonToRes;
|
package/package.json
CHANGED
@@ -1,40 +1,21 @@
|
|
1
1
|
{
|
2
2
|
"name": "lemmy-js-client",
|
3
|
+
"version": "0.17.2-rc.10",
|
3
4
|
"description": "A javascript / typescript client for Lemmy",
|
4
|
-
"
|
5
|
-
"author": "Dessalines <tyhou13@gmx.com>",
|
5
|
+
"repository": "https://github.com/LemmyNet/lemmy-js-client",
|
6
6
|
"license": "AGPL-3.0",
|
7
|
+
"author": "Dessalines <tyhou13@gmx.com>",
|
7
8
|
"main": "./dist/index.js",
|
9
|
+
"types": "./dist/index.d.ts",
|
8
10
|
"files": [
|
9
11
|
"/dist"
|
10
12
|
],
|
11
13
|
"scripts": {
|
12
14
|
"build": "tsc",
|
13
15
|
"docs": "typedoc src/index.ts --sourcefile-url-prefix 'https://github.com/LemmyNet/lemmy-js-client/tree/main/src/'",
|
14
|
-
"lint": "tsc --noEmit && eslint --report-unused-disable-directives --ext .js,.ts,.tsx src",
|
16
|
+
"lint": "tsc --noEmit && eslint --report-unused-disable-directives --ext .js,.ts,.tsx src && prettier --check src",
|
15
17
|
"prepare": "yarn run build && husky install"
|
16
18
|
},
|
17
|
-
"repository": "https://github.com/LemmyNet/lemmy-js-client",
|
18
|
-
"devDependencies": {
|
19
|
-
"@types/node": "^17.0.10",
|
20
|
-
"@types/node-fetch": "^3.0.3",
|
21
|
-
"@typescript-eslint/eslint-plugin": "^5.10.0",
|
22
|
-
"@typescript-eslint/parser": "^5.10.0",
|
23
|
-
"eslint": "^8.7.0",
|
24
|
-
"eslint-plugin-prettier": "^4.0.0",
|
25
|
-
"husky": "^7.0.4",
|
26
|
-
"lint-staged": "^12.2.2",
|
27
|
-
"node-fetch": "^3.1.1",
|
28
|
-
"prettier": "^2.5.0",
|
29
|
-
"prettier-plugin-import-sort": "^0.0.7",
|
30
|
-
"prettier-plugin-organize-imports": "^2.3.4",
|
31
|
-
"prettier-plugin-packagejson": "^2.2.15",
|
32
|
-
"sortpack": "^2.2.0",
|
33
|
-
"typedoc": "^0.21.6",
|
34
|
-
"typedoc-plugin-sourcefile-url": "^1.0.6",
|
35
|
-
"typescript": "^4.5.4"
|
36
|
-
},
|
37
|
-
"types": "./dist/index.d.ts",
|
38
19
|
"lint-staged": {
|
39
20
|
"*.{ts,tsx,js}": [
|
40
21
|
"prettier --write",
|
@@ -44,6 +25,27 @@
|
|
44
25
|
"sortpack"
|
45
26
|
]
|
46
27
|
},
|
28
|
+
"dependencies": {
|
29
|
+
"cross-fetch": "^3.1.5",
|
30
|
+
"form-data": "^4.0.0"
|
31
|
+
},
|
32
|
+
"devDependencies": {
|
33
|
+
"@types/node": "^18.6.2",
|
34
|
+
"@typescript-eslint/eslint-plugin": "^5.31.0",
|
35
|
+
"@typescript-eslint/parser": "^5.31.0",
|
36
|
+
"eslint": "^8.20.0",
|
37
|
+
"eslint-plugin-prettier": "^4.2.1",
|
38
|
+
"husky": "^8.0.1",
|
39
|
+
"lint-staged": "^13.0.3",
|
40
|
+
"prettier": "^2.7.1",
|
41
|
+
"prettier-plugin-import-sort": "^0.0.7",
|
42
|
+
"prettier-plugin-organize-imports": "^3.0.0",
|
43
|
+
"prettier-plugin-packagejson": "^2.2.18",
|
44
|
+
"sortpack": "^2.3.0",
|
45
|
+
"typedoc": "^0.21.6",
|
46
|
+
"typedoc-plugin-sourcefile-url": "^1.0.6",
|
47
|
+
"typescript": "^4.7.4"
|
48
|
+
},
|
47
49
|
"importSort": {
|
48
50
|
".js, .jsx, .ts, .tsx": {
|
49
51
|
"style": "module",
|
@@ -1,90 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* Aggregate data for a person.
|
3
|
-
*/
|
4
|
-
export interface PersonAggregates {
|
5
|
-
id: number;
|
6
|
-
person_id: number;
|
7
|
-
post_count: number;
|
8
|
-
post_score: number;
|
9
|
-
comment_count: number;
|
10
|
-
comment_score: number;
|
11
|
-
}
|
12
|
-
/**
|
13
|
-
* Aggregate data for your site.
|
14
|
-
*/
|
15
|
-
export interface SiteAggregates {
|
16
|
-
id: number;
|
17
|
-
site_id: number;
|
18
|
-
users: number;
|
19
|
-
posts: number;
|
20
|
-
comments: number;
|
21
|
-
communities: number;
|
22
|
-
/**
|
23
|
-
* Active users per day.
|
24
|
-
*/
|
25
|
-
users_active_day: number;
|
26
|
-
/**
|
27
|
-
* Active users per week.
|
28
|
-
*/
|
29
|
-
users_active_week: number;
|
30
|
-
/**
|
31
|
-
* Active users per month.
|
32
|
-
*/
|
33
|
-
users_active_month: number;
|
34
|
-
/**
|
35
|
-
* Active users per year.
|
36
|
-
*/
|
37
|
-
users_active_half_year: number;
|
38
|
-
}
|
39
|
-
/**
|
40
|
-
* Aggregate data for your post.
|
41
|
-
*/
|
42
|
-
export interface PostAggregates {
|
43
|
-
id: number;
|
44
|
-
post_id: number;
|
45
|
-
comments: number;
|
46
|
-
score: number;
|
47
|
-
upvotes: number;
|
48
|
-
downvotes: number;
|
49
|
-
/**
|
50
|
-
* Newest comment time, limited to 2 days, to prevent necrobumping.
|
51
|
-
*/
|
52
|
-
newest_comment_time_necro: string;
|
53
|
-
newest_comment_time: string;
|
54
|
-
}
|
55
|
-
/**
|
56
|
-
* Aggregate data for your community.
|
57
|
-
*/
|
58
|
-
export interface CommunityAggregates {
|
59
|
-
id: number;
|
60
|
-
community_id: number;
|
61
|
-
subscribers: number;
|
62
|
-
posts: number;
|
63
|
-
comments: number;
|
64
|
-
/**
|
65
|
-
* Active users per day.
|
66
|
-
*/
|
67
|
-
users_active_day: number;
|
68
|
-
/**
|
69
|
-
* Active users per week.
|
70
|
-
*/
|
71
|
-
users_active_week: number;
|
72
|
-
/**
|
73
|
-
* Active users per month.
|
74
|
-
*/
|
75
|
-
users_active_month: number;
|
76
|
-
/**
|
77
|
-
* Active users per year.
|
78
|
-
*/
|
79
|
-
users_active_half_year: number;
|
80
|
-
}
|
81
|
-
/**
|
82
|
-
* Aggregate data for your comment.
|
83
|
-
*/
|
84
|
-
export interface CommentAggregates {
|
85
|
-
id: number;
|
86
|
-
comment_id: number;
|
87
|
-
score: number;
|
88
|
-
upvotes: number;
|
89
|
-
downvotes: number;
|
90
|
-
}
|
@@ -1,115 +0,0 @@
|
|
1
|
-
import { ListingType, SortType } from "../others";
|
2
|
-
import { CommentReportView, CommentView } from "../views";
|
3
|
-
export interface CreateComment {
|
4
|
-
content: string;
|
5
|
-
parent_id?: number;
|
6
|
-
post_id: number;
|
7
|
-
/**
|
8
|
-
* An optional front end ID, to tell which is comment is coming back.
|
9
|
-
*/
|
10
|
-
form_id?: string;
|
11
|
-
auth: string;
|
12
|
-
}
|
13
|
-
export interface EditComment {
|
14
|
-
content: string;
|
15
|
-
comment_id: number;
|
16
|
-
/**
|
17
|
-
* An optional front end ID, to tell which is comment is coming back.
|
18
|
-
*/
|
19
|
-
form_id?: string;
|
20
|
-
auth: string;
|
21
|
-
}
|
22
|
-
/**
|
23
|
-
* Only the creator can delete the comment.
|
24
|
-
*/
|
25
|
-
export interface DeleteComment {
|
26
|
-
comment_id: number;
|
27
|
-
deleted: boolean;
|
28
|
-
auth: string;
|
29
|
-
}
|
30
|
-
/**
|
31
|
-
* Only a mod or admin can remove the comment.
|
32
|
-
*/
|
33
|
-
export interface RemoveComment {
|
34
|
-
comment_id: number;
|
35
|
-
removed: boolean;
|
36
|
-
reason?: string;
|
37
|
-
auth: string;
|
38
|
-
}
|
39
|
-
/**
|
40
|
-
* Only the recipient can do this.
|
41
|
-
*/
|
42
|
-
export interface MarkCommentAsRead {
|
43
|
-
comment_id: number;
|
44
|
-
read: boolean;
|
45
|
-
auth: string;
|
46
|
-
}
|
47
|
-
export interface SaveComment {
|
48
|
-
comment_id: number;
|
49
|
-
save: boolean;
|
50
|
-
auth: string;
|
51
|
-
}
|
52
|
-
export interface CommentResponse {
|
53
|
-
comment_view: CommentView;
|
54
|
-
recipient_ids: number[];
|
55
|
-
/**
|
56
|
-
* An optional front end ID, to tell which is comment is coming back.
|
57
|
-
*/
|
58
|
-
form_id?: string;
|
59
|
-
}
|
60
|
-
export interface CreateCommentLike {
|
61
|
-
comment_id: number;
|
62
|
-
score: number;
|
63
|
-
auth: string;
|
64
|
-
}
|
65
|
-
/**
|
66
|
-
* Comment listing types are `All, Subscribed, Community`
|
67
|
-
*
|
68
|
-
* You can use either `community_id` or `community_name` as an id.
|
69
|
-
* To get posts for a federated community by name, use `name@instance.tld` .
|
70
|
-
*/
|
71
|
-
export interface GetComments {
|
72
|
-
type_?: ListingType;
|
73
|
-
sort?: SortType;
|
74
|
-
page?: number;
|
75
|
-
limit?: number;
|
76
|
-
community_id?: number;
|
77
|
-
community_name?: string;
|
78
|
-
saved_only?: boolean;
|
79
|
-
auth?: string;
|
80
|
-
}
|
81
|
-
export interface GetCommentsResponse {
|
82
|
-
comments: CommentView[];
|
83
|
-
}
|
84
|
-
export interface CreateCommentReport {
|
85
|
-
comment_id: number;
|
86
|
-
reason: string;
|
87
|
-
auth: string;
|
88
|
-
}
|
89
|
-
export interface CommentReportResponse {
|
90
|
-
comment_report_view: CommentReportView;
|
91
|
-
}
|
92
|
-
export interface ResolveCommentReport {
|
93
|
-
report_id: number;
|
94
|
-
/**
|
95
|
-
* Either resolve or unresolve a report.
|
96
|
-
*/
|
97
|
-
resolved: boolean;
|
98
|
-
auth: string;
|
99
|
-
}
|
100
|
-
export interface ListCommentReports {
|
101
|
-
page?: number;
|
102
|
-
limit?: number;
|
103
|
-
/**
|
104
|
-
* if no community is given, it returns reports for all communities moderated by the auth user.
|
105
|
-
*/
|
106
|
-
community_id?: number;
|
107
|
-
/**
|
108
|
-
* Only shows the unresolved reports.
|
109
|
-
*/
|
110
|
-
unresolved_only?: boolean;
|
111
|
-
auth: string;
|
112
|
-
}
|
113
|
-
export interface ListCommentReportsResponse {
|
114
|
-
comment_reports: CommentReportView[];
|
115
|
-
}
|