lemmy-js-client 0.19.3-alpha.5 → 0.19.3-alpha.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (495) hide show
  1. package/dist/http.d.ts +743 -0
  2. package/dist/http.js +929 -0
  3. package/dist/index.d.ts +246 -0
  4. package/dist/index.js +17 -0
  5. package/dist/other_types.d.ts +22 -0
  6. package/dist/other_types.js +4 -0
  7. package/dist/types/ActivityId.d.ts +1 -0
  8. package/dist/types/ActivityId.js +3 -0
  9. package/dist/types/AddAdmin.d.ts +5 -0
  10. package/dist/types/AddAdmin.js +2 -0
  11. package/dist/types/AddAdminResponse.d.ts +4 -0
  12. package/dist/types/AddAdminResponse.js +2 -0
  13. package/dist/types/AddModToCommunity.d.ts +7 -0
  14. package/dist/types/AddModToCommunity.js +2 -0
  15. package/dist/types/AddModToCommunityResponse.d.ts +4 -0
  16. package/dist/types/AddModToCommunityResponse.js +2 -0
  17. package/dist/types/AdminPurgeComment.d.ts +9 -0
  18. package/dist/types/AdminPurgeComment.js +2 -0
  19. package/dist/types/AdminPurgeCommentView.d.ts +8 -0
  20. package/dist/types/AdminPurgeCommentView.js +2 -0
  21. package/dist/types/AdminPurgeCommunity.d.ts +7 -0
  22. package/dist/types/AdminPurgeCommunity.js +2 -0
  23. package/dist/types/AdminPurgeCommunityView.d.ts +6 -0
  24. package/dist/types/AdminPurgeCommunityView.js +2 -0
  25. package/dist/types/AdminPurgePerson.d.ts +7 -0
  26. package/dist/types/AdminPurgePerson.js +2 -0
  27. package/dist/types/AdminPurgePersonView.d.ts +6 -0
  28. package/dist/types/AdminPurgePersonView.js +2 -0
  29. package/dist/types/AdminPurgePost.d.ts +9 -0
  30. package/dist/types/AdminPurgePost.js +2 -0
  31. package/dist/types/AdminPurgePostView.d.ts +8 -0
  32. package/dist/types/AdminPurgePostView.js +2 -0
  33. package/dist/types/ApproveRegistrationApplication.d.ts +5 -0
  34. package/dist/types/ApproveRegistrationApplication.js +3 -0
  35. package/dist/types/BanFromCommunity.d.ts +10 -0
  36. package/dist/types/BanFromCommunity.js +2 -0
  37. package/dist/types/BanFromCommunityResponse.d.ts +5 -0
  38. package/dist/types/BanFromCommunityResponse.js +2 -0
  39. package/dist/types/BanPerson.d.ts +8 -0
  40. package/dist/types/BanPerson.js +2 -0
  41. package/dist/types/BanPersonResponse.d.ts +5 -0
  42. package/dist/types/BanPersonResponse.js +2 -0
  43. package/dist/types/BannedPersonsResponse.d.ts +4 -0
  44. package/dist/types/BannedPersonsResponse.js +2 -0
  45. package/dist/types/BlockCommunity.d.ts +5 -0
  46. package/dist/types/BlockCommunity.js +2 -0
  47. package/dist/types/BlockCommunityResponse.d.ts +5 -0
  48. package/dist/types/BlockCommunityResponse.js +2 -0
  49. package/dist/types/BlockInstance.d.ts +5 -0
  50. package/dist/types/BlockInstance.js +2 -0
  51. package/dist/types/BlockInstanceResponse.d.ts +3 -0
  52. package/dist/types/BlockInstanceResponse.js +3 -0
  53. package/dist/types/BlockPerson.d.ts +5 -0
  54. package/dist/types/BlockPerson.js +2 -0
  55. package/dist/types/BlockPersonResponse.d.ts +5 -0
  56. package/dist/types/BlockPersonResponse.js +2 -0
  57. package/dist/types/CaptchaResponse.d.ts +5 -0
  58. package/dist/types/CaptchaResponse.js +3 -0
  59. package/dist/types/ChangePassword.d.ts +5 -0
  60. package/dist/types/ChangePassword.js +3 -0
  61. package/dist/types/Comment.d.ts +19 -0
  62. package/dist/types/Comment.js +2 -0
  63. package/dist/types/CommentAggregates.d.ts +9 -0
  64. package/dist/types/CommentAggregates.js +2 -0
  65. package/dist/types/CommentId.d.ts +1 -0
  66. package/dist/types/CommentId.js +3 -0
  67. package/dist/types/CommentReply.d.ts +10 -0
  68. package/dist/types/CommentReply.js +2 -0
  69. package/dist/types/CommentReplyId.d.ts +1 -0
  70. package/dist/types/CommentReplyId.js +3 -0
  71. package/dist/types/CommentReplyResponse.d.ts +4 -0
  72. package/dist/types/CommentReplyResponse.js +2 -0
  73. package/dist/types/CommentReplyView.d.ts +23 -0
  74. package/dist/types/CommentReplyView.js +2 -0
  75. package/dist/types/CommentReport.d.ts +14 -0
  76. package/dist/types/CommentReport.js +2 -0
  77. package/dist/types/CommentReportId.d.ts +1 -0
  78. package/dist/types/CommentReportId.js +3 -0
  79. package/dist/types/CommentReportResponse.d.ts +4 -0
  80. package/dist/types/CommentReportResponse.js +2 -0
  81. package/dist/types/CommentReportView.d.ts +18 -0
  82. package/dist/types/CommentReportView.js +2 -0
  83. package/dist/types/CommentResponse.d.ts +6 -0
  84. package/dist/types/CommentResponse.js +2 -0
  85. package/dist/types/CommentSortType.d.ts +1 -0
  86. package/dist/types/CommentSortType.js +3 -0
  87. package/dist/types/CommentView.d.ts +20 -0
  88. package/dist/types/CommentView.js +2 -0
  89. package/dist/types/Community.d.ts +20 -0
  90. package/dist/types/Community.js +2 -0
  91. package/dist/types/CommunityAggregates.d.ts +12 -0
  92. package/dist/types/CommunityAggregates.js +2 -0
  93. package/dist/types/CommunityBlockView.d.ts +6 -0
  94. package/dist/types/CommunityBlockView.js +2 -0
  95. package/dist/types/CommunityFollowerView.d.ts +6 -0
  96. package/dist/types/CommunityFollowerView.js +2 -0
  97. package/dist/types/CommunityId.d.ts +1 -0
  98. package/dist/types/CommunityId.js +3 -0
  99. package/dist/types/CommunityModeratorView.d.ts +6 -0
  100. package/dist/types/CommunityModeratorView.js +2 -0
  101. package/dist/types/CommunityResponse.d.ts +6 -0
  102. package/dist/types/CommunityResponse.js +2 -0
  103. package/dist/types/CommunityView.d.ts +9 -0
  104. package/dist/types/CommunityView.js +2 -0
  105. package/dist/types/CreateComment.d.ts +9 -0
  106. package/dist/types/CreateComment.js +2 -0
  107. package/dist/types/CreateCommentLike.d.ts +5 -0
  108. package/dist/types/CreateCommentLike.js +2 -0
  109. package/dist/types/CreateCommentReport.d.ts +5 -0
  110. package/dist/types/CreateCommentReport.js +2 -0
  111. package/dist/types/CreateCommunity.d.ts +11 -0
  112. package/dist/types/CreateCommunity.js +2 -0
  113. package/dist/types/CreateCustomEmoji.d.ts +7 -0
  114. package/dist/types/CreateCustomEmoji.js +3 -0
  115. package/dist/types/CreatePost.d.ts +11 -0
  116. package/dist/types/CreatePost.js +2 -0
  117. package/dist/types/CreatePostLike.d.ts +5 -0
  118. package/dist/types/CreatePostLike.js +2 -0
  119. package/dist/types/CreatePostReport.d.ts +5 -0
  120. package/dist/types/CreatePostReport.js +2 -0
  121. package/dist/types/CreatePrivateMessage.d.ts +5 -0
  122. package/dist/types/CreatePrivateMessage.js +2 -0
  123. package/dist/types/CreatePrivateMessageReport.d.ts +5 -0
  124. package/dist/types/CreatePrivateMessageReport.js +2 -0
  125. package/dist/types/CreateSite.d.ts +44 -0
  126. package/dist/types/CreateSite.js +2 -0
  127. package/dist/types/CustomEmoji.d.ts +12 -0
  128. package/dist/types/CustomEmoji.js +2 -0
  129. package/dist/types/CustomEmojiId.d.ts +1 -0
  130. package/dist/types/CustomEmojiId.js +3 -0
  131. package/dist/types/CustomEmojiKeyword.d.ts +5 -0
  132. package/dist/types/CustomEmojiKeyword.js +2 -0
  133. package/dist/types/CustomEmojiResponse.d.ts +4 -0
  134. package/dist/types/CustomEmojiResponse.js +2 -0
  135. package/dist/types/CustomEmojiView.d.ts +6 -0
  136. package/dist/types/CustomEmojiView.js +2 -0
  137. package/dist/types/DeleteAccount.d.ts +4 -0
  138. package/dist/types/DeleteAccount.js +3 -0
  139. package/dist/types/DeleteComment.d.ts +5 -0
  140. package/dist/types/DeleteComment.js +2 -0
  141. package/dist/types/DeleteCommunity.d.ts +5 -0
  142. package/dist/types/DeleteCommunity.js +2 -0
  143. package/dist/types/DeleteCustomEmoji.d.ts +4 -0
  144. package/dist/types/DeleteCustomEmoji.js +2 -0
  145. package/dist/types/DeletePost.d.ts +5 -0
  146. package/dist/types/DeletePost.js +2 -0
  147. package/dist/types/DeletePrivateMessage.d.ts +5 -0
  148. package/dist/types/DeletePrivateMessage.js +2 -0
  149. package/dist/types/DistinguishComment.d.ts +5 -0
  150. package/dist/types/DistinguishComment.js +2 -0
  151. package/dist/types/EditComment.d.ts +7 -0
  152. package/dist/types/EditComment.js +2 -0
  153. package/dist/types/EditCommunity.d.ts +12 -0
  154. package/dist/types/EditCommunity.js +2 -0
  155. package/dist/types/EditCustomEmoji.d.ts +8 -0
  156. package/dist/types/EditCustomEmoji.js +2 -0
  157. package/dist/types/EditPost.d.ts +10 -0
  158. package/dist/types/EditPost.js +2 -0
  159. package/dist/types/EditPrivateMessage.d.ts +5 -0
  160. package/dist/types/EditPrivateMessage.js +2 -0
  161. package/dist/types/EditSite.d.ts +45 -0
  162. package/dist/types/EditSite.js +2 -0
  163. package/dist/types/FeaturePost.d.ts +7 -0
  164. package/dist/types/FeaturePost.js +2 -0
  165. package/dist/types/FederatedInstances.d.ts +6 -0
  166. package/dist/types/FederatedInstances.js +2 -0
  167. package/dist/types/FollowCommunity.d.ts +5 -0
  168. package/dist/types/FollowCommunity.js +2 -0
  169. package/dist/types/GenerateTotpSecretResponse.d.ts +3 -0
  170. package/dist/types/GenerateTotpSecretResponse.js +3 -0
  171. package/dist/types/GetCaptchaResponse.d.ts +4 -0
  172. package/dist/types/GetCaptchaResponse.js +2 -0
  173. package/dist/types/GetComment.d.ts +4 -0
  174. package/dist/types/GetComment.js +2 -0
  175. package/dist/types/GetComments.d.ts +19 -0
  176. package/dist/types/GetComments.js +2 -0
  177. package/dist/types/GetCommentsResponse.d.ts +4 -0
  178. package/dist/types/GetCommentsResponse.js +2 -0
  179. package/dist/types/GetCommunity.d.ts +5 -0
  180. package/dist/types/GetCommunity.js +2 -0
  181. package/dist/types/GetCommunityResponse.d.ts +10 -0
  182. package/dist/types/GetCommunityResponse.js +2 -0
  183. package/dist/types/GetFederatedInstancesResponse.d.ts +4 -0
  184. package/dist/types/GetFederatedInstancesResponse.js +2 -0
  185. package/dist/types/GetModlog.d.ts +11 -0
  186. package/dist/types/GetModlog.js +2 -0
  187. package/dist/types/GetModlogResponse.d.ts +32 -0
  188. package/dist/types/GetModlogResponse.js +2 -0
  189. package/dist/types/GetPersonDetails.d.ts +12 -0
  190. package/dist/types/GetPersonDetails.js +2 -0
  191. package/dist/types/GetPersonDetailsResponse.d.ts +12 -0
  192. package/dist/types/GetPersonDetailsResponse.js +2 -0
  193. package/dist/types/GetPersonMentions.d.ts +7 -0
  194. package/dist/types/GetPersonMentions.js +2 -0
  195. package/dist/types/GetPersonMentionsResponse.d.ts +4 -0
  196. package/dist/types/GetPersonMentionsResponse.js +2 -0
  197. package/dist/types/GetPost.d.ts +6 -0
  198. package/dist/types/GetPost.js +2 -0
  199. package/dist/types/GetPostResponse.d.ts +9 -0
  200. package/dist/types/GetPostResponse.js +2 -0
  201. package/dist/types/GetPosts.d.ts +16 -0
  202. package/dist/types/GetPosts.js +2 -0
  203. package/dist/types/GetPostsResponse.d.ts +6 -0
  204. package/dist/types/GetPostsResponse.js +2 -0
  205. package/dist/types/GetPrivateMessages.d.ts +7 -0
  206. package/dist/types/GetPrivateMessages.js +2 -0
  207. package/dist/types/GetReplies.d.ts +7 -0
  208. package/dist/types/GetReplies.js +2 -0
  209. package/dist/types/GetRepliesResponse.d.ts +4 -0
  210. package/dist/types/GetRepliesResponse.js +2 -0
  211. package/dist/types/GetReportCount.d.ts +4 -0
  212. package/dist/types/GetReportCount.js +2 -0
  213. package/dist/types/GetReportCountResponse.d.ts +7 -0
  214. package/dist/types/GetReportCountResponse.js +2 -0
  215. package/dist/types/GetSiteMetadata.d.ts +3 -0
  216. package/dist/types/GetSiteMetadata.js +3 -0
  217. package/dist/types/GetSiteMetadataResponse.d.ts +4 -0
  218. package/dist/types/GetSiteMetadataResponse.js +2 -0
  219. package/dist/types/GetSiteResponse.d.ts +17 -0
  220. package/dist/types/GetSiteResponse.js +2 -0
  221. package/dist/types/GetUnreadCountResponse.d.ts +5 -0
  222. package/dist/types/GetUnreadCountResponse.js +3 -0
  223. package/dist/types/GetUnreadRegistrationApplicationCountResponse.d.ts +3 -0
  224. package/dist/types/GetUnreadRegistrationApplicationCountResponse.js +3 -0
  225. package/dist/types/HideCommunity.d.ts +6 -0
  226. package/dist/types/HideCommunity.js +2 -0
  227. package/dist/types/ImageUpload.d.ts +7 -0
  228. package/dist/types/ImageUpload.js +2 -0
  229. package/dist/types/Instance.d.ts +9 -0
  230. package/dist/types/Instance.js +2 -0
  231. package/dist/types/InstanceBlockView.d.ts +8 -0
  232. package/dist/types/InstanceBlockView.js +2 -0
  233. package/dist/types/InstanceId.d.ts +1 -0
  234. package/dist/types/InstanceId.js +3 -0
  235. package/dist/types/InstanceWithFederationState.d.ts +11 -0
  236. package/dist/types/InstanceWithFederationState.js +2 -0
  237. package/dist/types/Language.d.ts +6 -0
  238. package/dist/types/Language.js +2 -0
  239. package/dist/types/LanguageId.d.ts +1 -0
  240. package/dist/types/LanguageId.js +3 -0
  241. package/dist/types/LemmyErrorType.d.ts +310 -0
  242. package/dist/types/LemmyErrorType.js +3 -0
  243. package/dist/types/ListCommentLikes.d.ts +6 -0
  244. package/dist/types/ListCommentLikes.js +2 -0
  245. package/dist/types/ListCommentLikesResponse.d.ts +4 -0
  246. package/dist/types/ListCommentLikesResponse.js +2 -0
  247. package/dist/types/ListCommentReports.d.ts +7 -0
  248. package/dist/types/ListCommentReports.js +2 -0
  249. package/dist/types/ListCommentReportsResponse.d.ts +4 -0
  250. package/dist/types/ListCommentReportsResponse.js +2 -0
  251. package/dist/types/ListCommunities.d.ts +9 -0
  252. package/dist/types/ListCommunities.js +2 -0
  253. package/dist/types/ListCommunitiesResponse.d.ts +4 -0
  254. package/dist/types/ListCommunitiesResponse.js +2 -0
  255. package/dist/types/ListPostLikes.d.ts +6 -0
  256. package/dist/types/ListPostLikes.js +2 -0
  257. package/dist/types/ListPostLikesResponse.d.ts +4 -0
  258. package/dist/types/ListPostLikesResponse.js +2 -0
  259. package/dist/types/ListPostReports.d.ts +7 -0
  260. package/dist/types/ListPostReports.js +2 -0
  261. package/dist/types/ListPostReportsResponse.d.ts +4 -0
  262. package/dist/types/ListPostReportsResponse.js +2 -0
  263. package/dist/types/ListPrivateMessageReports.d.ts +5 -0
  264. package/dist/types/ListPrivateMessageReports.js +3 -0
  265. package/dist/types/ListPrivateMessageReportsResponse.d.ts +4 -0
  266. package/dist/types/ListPrivateMessageReportsResponse.js +2 -0
  267. package/dist/types/ListRegistrationApplications.d.ts +5 -0
  268. package/dist/types/ListRegistrationApplications.js +3 -0
  269. package/dist/types/ListRegistrationApplicationsResponse.d.ts +4 -0
  270. package/dist/types/ListRegistrationApplicationsResponse.js +2 -0
  271. package/dist/types/ListingType.d.ts +1 -0
  272. package/dist/types/ListingType.js +3 -0
  273. package/dist/types/LocalSite.d.ts +30 -0
  274. package/dist/types/LocalSite.js +2 -0
  275. package/dist/types/LocalSiteId.d.ts +1 -0
  276. package/dist/types/LocalSiteId.js +3 -0
  277. package/dist/types/LocalSiteRateLimit.d.ts +20 -0
  278. package/dist/types/LocalSiteRateLimit.js +2 -0
  279. package/dist/types/LocalUser.d.ts +32 -0
  280. package/dist/types/LocalUser.js +2 -0
  281. package/dist/types/LocalUserId.d.ts +1 -0
  282. package/dist/types/LocalUserId.js +3 -0
  283. package/dist/types/LocalUserView.d.ts +8 -0
  284. package/dist/types/LocalUserView.js +2 -0
  285. package/dist/types/LockPost.d.ts +5 -0
  286. package/dist/types/LockPost.js +2 -0
  287. package/dist/types/Login.d.ts +5 -0
  288. package/dist/types/Login.js +3 -0
  289. package/dist/types/LoginResponse.d.ts +5 -0
  290. package/dist/types/LoginResponse.js +3 -0
  291. package/dist/types/LoginToken.d.ts +7 -0
  292. package/dist/types/LoginToken.js +2 -0
  293. package/dist/types/MarkCommentReplyAsRead.d.ts +5 -0
  294. package/dist/types/MarkCommentReplyAsRead.js +2 -0
  295. package/dist/types/MarkPersonMentionAsRead.d.ts +5 -0
  296. package/dist/types/MarkPersonMentionAsRead.js +2 -0
  297. package/dist/types/MarkPostAsRead.d.ts +6 -0
  298. package/dist/types/MarkPostAsRead.js +2 -0
  299. package/dist/types/MarkPrivateMessageAsRead.d.ts +5 -0
  300. package/dist/types/MarkPrivateMessageAsRead.js +2 -0
  301. package/dist/types/ModAdd.d.ts +8 -0
  302. package/dist/types/ModAdd.js +2 -0
  303. package/dist/types/ModAddCommunity.d.ts +10 -0
  304. package/dist/types/ModAddCommunity.js +2 -0
  305. package/dist/types/ModAddCommunityView.d.ts +9 -0
  306. package/dist/types/ModAddCommunityView.js +2 -0
  307. package/dist/types/ModAddView.d.ts +7 -0
  308. package/dist/types/ModAddView.js +2 -0
  309. package/dist/types/ModBan.d.ts +10 -0
  310. package/dist/types/ModBan.js +2 -0
  311. package/dist/types/ModBanFromCommunity.d.ts +12 -0
  312. package/dist/types/ModBanFromCommunity.js +2 -0
  313. package/dist/types/ModBanFromCommunityView.d.ts +9 -0
  314. package/dist/types/ModBanFromCommunityView.js +2 -0
  315. package/dist/types/ModBanView.d.ts +7 -0
  316. package/dist/types/ModBanView.js +2 -0
  317. package/dist/types/ModFeaturePost.d.ts +10 -0
  318. package/dist/types/ModFeaturePost.js +2 -0
  319. package/dist/types/ModFeaturePostView.d.ts +10 -0
  320. package/dist/types/ModFeaturePostView.js +2 -0
  321. package/dist/types/ModHideCommunity.d.ts +10 -0
  322. package/dist/types/ModHideCommunity.js +2 -0
  323. package/dist/types/ModHideCommunityView.d.ts +8 -0
  324. package/dist/types/ModHideCommunityView.js +2 -0
  325. package/dist/types/ModLockPost.d.ts +9 -0
  326. package/dist/types/ModLockPost.js +2 -0
  327. package/dist/types/ModLockPostView.d.ts +10 -0
  328. package/dist/types/ModLockPostView.js +2 -0
  329. package/dist/types/ModRemoveComment.d.ts +10 -0
  330. package/dist/types/ModRemoveComment.js +2 -0
  331. package/dist/types/ModRemoveCommentView.d.ts +13 -0
  332. package/dist/types/ModRemoveCommentView.js +2 -0
  333. package/dist/types/ModRemoveCommunity.d.ts +10 -0
  334. package/dist/types/ModRemoveCommunity.js +2 -0
  335. package/dist/types/ModRemoveCommunityView.d.ts +8 -0
  336. package/dist/types/ModRemoveCommunityView.js +2 -0
  337. package/dist/types/ModRemovePost.d.ts +10 -0
  338. package/dist/types/ModRemovePost.js +2 -0
  339. package/dist/types/ModRemovePostView.d.ts +10 -0
  340. package/dist/types/ModRemovePostView.js +2 -0
  341. package/dist/types/ModTransferCommunity.d.ts +9 -0
  342. package/dist/types/ModTransferCommunity.js +2 -0
  343. package/dist/types/ModTransferCommunityView.d.ts +9 -0
  344. package/dist/types/ModTransferCommunityView.js +2 -0
  345. package/dist/types/ModlogActionType.d.ts +1 -0
  346. package/dist/types/ModlogActionType.js +3 -0
  347. package/dist/types/ModlogListParams.d.ts +10 -0
  348. package/dist/types/ModlogListParams.js +2 -0
  349. package/dist/types/MyUserInfo.d.ts +16 -0
  350. package/dist/types/MyUserInfo.js +2 -0
  351. package/dist/types/PaginationCursor.d.ts +1 -0
  352. package/dist/types/PaginationCursor.js +3 -0
  353. package/dist/types/PasswordChangeAfterReset.d.ts +5 -0
  354. package/dist/types/PasswordChangeAfterReset.js +3 -0
  355. package/dist/types/PasswordReset.d.ts +3 -0
  356. package/dist/types/PasswordReset.js +3 -0
  357. package/dist/types/Person.d.ts +20 -0
  358. package/dist/types/Person.js +2 -0
  359. package/dist/types/PersonAggregates.d.ts +6 -0
  360. package/dist/types/PersonAggregates.js +2 -0
  361. package/dist/types/PersonBlockId.d.ts +1 -0
  362. package/dist/types/PersonBlockId.js +3 -0
  363. package/dist/types/PersonBlockView.d.ts +5 -0
  364. package/dist/types/PersonBlockView.js +2 -0
  365. package/dist/types/PersonId.d.ts +1 -0
  366. package/dist/types/PersonId.js +3 -0
  367. package/dist/types/PersonMention.d.ts +10 -0
  368. package/dist/types/PersonMention.js +2 -0
  369. package/dist/types/PersonMentionId.d.ts +1 -0
  370. package/dist/types/PersonMentionId.js +3 -0
  371. package/dist/types/PersonMentionResponse.d.ts +4 -0
  372. package/dist/types/PersonMentionResponse.js +2 -0
  373. package/dist/types/PersonMentionView.d.ts +23 -0
  374. package/dist/types/PersonMentionView.js +2 -0
  375. package/dist/types/PersonView.d.ts +7 -0
  376. package/dist/types/PersonView.js +2 -0
  377. package/dist/types/Post.d.ts +27 -0
  378. package/dist/types/Post.js +2 -0
  379. package/dist/types/PostAggregates.d.ts +10 -0
  380. package/dist/types/PostAggregates.js +2 -0
  381. package/dist/types/PostFeatureType.d.ts +1 -0
  382. package/dist/types/PostFeatureType.js +3 -0
  383. package/dist/types/PostId.d.ts +1 -0
  384. package/dist/types/PostId.js +3 -0
  385. package/dist/types/PostListingMode.d.ts +1 -0
  386. package/dist/types/PostListingMode.js +3 -0
  387. package/dist/types/PostReport.d.ts +16 -0
  388. package/dist/types/PostReport.js +2 -0
  389. package/dist/types/PostReportId.d.ts +1 -0
  390. package/dist/types/PostReportId.js +3 -0
  391. package/dist/types/PostReportResponse.d.ts +4 -0
  392. package/dist/types/PostReportResponse.js +2 -0
  393. package/dist/types/PostReportView.d.ts +16 -0
  394. package/dist/types/PostReportView.js +2 -0
  395. package/dist/types/PostResponse.d.ts +4 -0
  396. package/dist/types/PostResponse.js +2 -0
  397. package/dist/types/PostView.d.ts +20 -0
  398. package/dist/types/PostView.js +2 -0
  399. package/dist/types/PrivateMessage.d.ts +14 -0
  400. package/dist/types/PrivateMessage.js +2 -0
  401. package/dist/types/PrivateMessageId.d.ts +1 -0
  402. package/dist/types/PrivateMessageId.js +3 -0
  403. package/dist/types/PrivateMessageReport.d.ts +14 -0
  404. package/dist/types/PrivateMessageReport.js +2 -0
  405. package/dist/types/PrivateMessageReportId.d.ts +1 -0
  406. package/dist/types/PrivateMessageReportId.js +3 -0
  407. package/dist/types/PrivateMessageReportResponse.d.ts +4 -0
  408. package/dist/types/PrivateMessageReportResponse.js +2 -0
  409. package/dist/types/PrivateMessageReportView.d.ts +10 -0
  410. package/dist/types/PrivateMessageReportView.js +2 -0
  411. package/dist/types/PrivateMessageResponse.d.ts +4 -0
  412. package/dist/types/PrivateMessageResponse.js +2 -0
  413. package/dist/types/PrivateMessageView.d.ts +7 -0
  414. package/dist/types/PrivateMessageView.js +2 -0
  415. package/dist/types/PrivateMessagesResponse.d.ts +4 -0
  416. package/dist/types/PrivateMessagesResponse.js +2 -0
  417. package/dist/types/PurgeComment.d.ts +5 -0
  418. package/dist/types/PurgeComment.js +2 -0
  419. package/dist/types/PurgeCommunity.d.ts +5 -0
  420. package/dist/types/PurgeCommunity.js +2 -0
  421. package/dist/types/PurgePerson.d.ts +5 -0
  422. package/dist/types/PurgePerson.js +2 -0
  423. package/dist/types/PurgePost.d.ts +5 -0
  424. package/dist/types/PurgePost.js +2 -0
  425. package/dist/types/ReadableFederationState.d.ts +10 -0
  426. package/dist/types/ReadableFederationState.js +2 -0
  427. package/dist/types/Register.d.ts +11 -0
  428. package/dist/types/Register.js +3 -0
  429. package/dist/types/RegistrationApplication.d.ts +10 -0
  430. package/dist/types/RegistrationApplication.js +2 -0
  431. package/dist/types/RegistrationApplicationResponse.d.ts +4 -0
  432. package/dist/types/RegistrationApplicationResponse.js +2 -0
  433. package/dist/types/RegistrationApplicationView.d.ts +9 -0
  434. package/dist/types/RegistrationApplicationView.js +2 -0
  435. package/dist/types/RegistrationMode.d.ts +1 -0
  436. package/dist/types/RegistrationMode.js +3 -0
  437. package/dist/types/RemoveComment.d.ts +6 -0
  438. package/dist/types/RemoveComment.js +2 -0
  439. package/dist/types/RemoveCommunity.d.ts +6 -0
  440. package/dist/types/RemoveCommunity.js +2 -0
  441. package/dist/types/RemovePost.d.ts +6 -0
  442. package/dist/types/RemovePost.js +2 -0
  443. package/dist/types/ResolveCommentReport.d.ts +5 -0
  444. package/dist/types/ResolveCommentReport.js +2 -0
  445. package/dist/types/ResolveObject.d.ts +3 -0
  446. package/dist/types/ResolveObject.js +3 -0
  447. package/dist/types/ResolveObjectResponse.d.ts +10 -0
  448. package/dist/types/ResolveObjectResponse.js +2 -0
  449. package/dist/types/ResolvePostReport.d.ts +5 -0
  450. package/dist/types/ResolvePostReport.js +2 -0
  451. package/dist/types/ResolvePrivateMessageReport.d.ts +5 -0
  452. package/dist/types/ResolvePrivateMessageReport.js +2 -0
  453. package/dist/types/SaveComment.d.ts +5 -0
  454. package/dist/types/SaveComment.js +2 -0
  455. package/dist/types/SavePost.d.ts +5 -0
  456. package/dist/types/SavePost.js +2 -0
  457. package/dist/types/SaveUserSettings.d.ts +32 -0
  458. package/dist/types/SaveUserSettings.js +2 -0
  459. package/dist/types/Search.d.ts +16 -0
  460. package/dist/types/Search.js +2 -0
  461. package/dist/types/SearchResponse.d.ts +12 -0
  462. package/dist/types/SearchResponse.js +2 -0
  463. package/dist/types/SearchType.d.ts +1 -0
  464. package/dist/types/SearchType.js +3 -0
  465. package/dist/types/Site.d.ts +18 -0
  466. package/dist/types/Site.js +2 -0
  467. package/dist/types/SiteAggregates.d.ts +12 -0
  468. package/dist/types/SiteAggregates.js +2 -0
  469. package/dist/types/SiteId.d.ts +1 -0
  470. package/dist/types/SiteId.js +3 -0
  471. package/dist/types/SiteMetadata.d.ts +6 -0
  472. package/dist/types/SiteMetadata.js +3 -0
  473. package/dist/types/SiteResponse.d.ts +6 -0
  474. package/dist/types/SiteResponse.js +2 -0
  475. package/dist/types/SiteView.d.ts +10 -0
  476. package/dist/types/SiteView.js +2 -0
  477. package/dist/types/SortType.d.ts +1 -0
  478. package/dist/types/SortType.js +3 -0
  479. package/dist/types/SubscribedType.d.ts +1 -0
  480. package/dist/types/SubscribedType.js +3 -0
  481. package/dist/types/SuccessResponse.d.ts +3 -0
  482. package/dist/types/SuccessResponse.js +3 -0
  483. package/dist/types/Tagline.d.ts +8 -0
  484. package/dist/types/Tagline.js +2 -0
  485. package/dist/types/TransferCommunity.d.ts +6 -0
  486. package/dist/types/TransferCommunity.js +2 -0
  487. package/dist/types/UpdateTotp.d.ts +4 -0
  488. package/dist/types/UpdateTotp.js +3 -0
  489. package/dist/types/UpdateTotpResponse.d.ts +3 -0
  490. package/dist/types/UpdateTotpResponse.js +3 -0
  491. package/dist/types/VerifyEmail.d.ts +3 -0
  492. package/dist/types/VerifyEmail.js +3 -0
  493. package/dist/types/VoteView.d.ts +5 -0
  494. package/dist/types/VoteView.js +2 -0
  495. package/package.json +6 -3
package/dist/http.d.ts ADDED
@@ -0,0 +1,743 @@
1
+ import fetch from "cross-fetch";
2
+ import { AddAdmin } from "./types/AddAdmin";
3
+ import { AddAdminResponse } from "./types/AddAdminResponse";
4
+ import { AddModToCommunity } from "./types/AddModToCommunity";
5
+ import { AddModToCommunityResponse } from "./types/AddModToCommunityResponse";
6
+ import { ApproveRegistrationApplication } from "./types/ApproveRegistrationApplication";
7
+ import { BanFromCommunity } from "./types/BanFromCommunity";
8
+ import { BanFromCommunityResponse } from "./types/BanFromCommunityResponse";
9
+ import { BanPerson } from "./types/BanPerson";
10
+ import { BanPersonResponse } from "./types/BanPersonResponse";
11
+ import { BannedPersonsResponse } from "./types/BannedPersonsResponse";
12
+ import { BlockCommunity } from "./types/BlockCommunity";
13
+ import { BlockCommunityResponse } from "./types/BlockCommunityResponse";
14
+ import { BlockPerson } from "./types/BlockPerson";
15
+ import { BlockPersonResponse } from "./types/BlockPersonResponse";
16
+ import { ChangePassword } from "./types/ChangePassword";
17
+ import { CommentReplyResponse } from "./types/CommentReplyResponse";
18
+ import { CommentReportResponse } from "./types/CommentReportResponse";
19
+ import { CommentResponse } from "./types/CommentResponse";
20
+ import { CommunityResponse } from "./types/CommunityResponse";
21
+ import { CreateComment } from "./types/CreateComment";
22
+ import { CreateCommentLike } from "./types/CreateCommentLike";
23
+ import { CreateCommentReport } from "./types/CreateCommentReport";
24
+ import { CreateCommunity } from "./types/CreateCommunity";
25
+ import { CreateCustomEmoji } from "./types/CreateCustomEmoji";
26
+ import { CreatePost } from "./types/CreatePost";
27
+ import { CreatePostLike } from "./types/CreatePostLike";
28
+ import { CreatePostReport } from "./types/CreatePostReport";
29
+ import { CreatePrivateMessage } from "./types/CreatePrivateMessage";
30
+ import { CreatePrivateMessageReport } from "./types/CreatePrivateMessageReport";
31
+ import { CreateSite } from "./types/CreateSite";
32
+ import { CustomEmojiResponse } from "./types/CustomEmojiResponse";
33
+ import { DeleteAccount } from "./types/DeleteAccount";
34
+ import { DeleteComment } from "./types/DeleteComment";
35
+ import { DeleteCommunity } from "./types/DeleteCommunity";
36
+ import { DeleteCustomEmoji } from "./types/DeleteCustomEmoji";
37
+ import { DeletePost } from "./types/DeletePost";
38
+ import { DeletePrivateMessage } from "./types/DeletePrivateMessage";
39
+ import { DistinguishComment } from "./types/DistinguishComment";
40
+ import { EditComment } from "./types/EditComment";
41
+ import { EditCommunity } from "./types/EditCommunity";
42
+ import { EditCustomEmoji } from "./types/EditCustomEmoji";
43
+ import { EditPost } from "./types/EditPost";
44
+ import { EditPrivateMessage } from "./types/EditPrivateMessage";
45
+ import { EditSite } from "./types/EditSite";
46
+ import { FeaturePost } from "./types/FeaturePost";
47
+ import { FollowCommunity } from "./types/FollowCommunity";
48
+ import { GetCaptchaResponse } from "./types/GetCaptchaResponse";
49
+ import { GetComment } from "./types/GetComment";
50
+ import { GetComments } from "./types/GetComments";
51
+ import { GetCommentsResponse } from "./types/GetCommentsResponse";
52
+ import { GetCommunity } from "./types/GetCommunity";
53
+ import { GetCommunityResponse } from "./types/GetCommunityResponse";
54
+ import { GetFederatedInstancesResponse } from "./types/GetFederatedInstancesResponse";
55
+ import { GetModlog } from "./types/GetModlog";
56
+ import { GetModlogResponse } from "./types/GetModlogResponse";
57
+ import { GetPersonDetails } from "./types/GetPersonDetails";
58
+ import { GetPersonDetailsResponse } from "./types/GetPersonDetailsResponse";
59
+ import { GetPersonMentions } from "./types/GetPersonMentions";
60
+ import { GetPersonMentionsResponse } from "./types/GetPersonMentionsResponse";
61
+ import { GetPost } from "./types/GetPost";
62
+ import { GetPostResponse } from "./types/GetPostResponse";
63
+ import { GetPosts } from "./types/GetPosts";
64
+ import { GetPostsResponse } from "./types/GetPostsResponse";
65
+ import { GetPrivateMessages } from "./types/GetPrivateMessages";
66
+ import { GetReplies } from "./types/GetReplies";
67
+ import { GetRepliesResponse } from "./types/GetRepliesResponse";
68
+ import { GetReportCount } from "./types/GetReportCount";
69
+ import { GetReportCountResponse } from "./types/GetReportCountResponse";
70
+ import { GetSiteMetadata } from "./types/GetSiteMetadata";
71
+ import { GetSiteMetadataResponse } from "./types/GetSiteMetadataResponse";
72
+ import { GetSiteResponse } from "./types/GetSiteResponse";
73
+ import { GetUnreadCountResponse } from "./types/GetUnreadCountResponse";
74
+ import { GetUnreadRegistrationApplicationCountResponse } from "./types/GetUnreadRegistrationApplicationCountResponse";
75
+ import { ListCommentReports } from "./types/ListCommentReports";
76
+ import { ListCommentReportsResponse } from "./types/ListCommentReportsResponse";
77
+ import { ListCommunities } from "./types/ListCommunities";
78
+ import { ListCommunitiesResponse } from "./types/ListCommunitiesResponse";
79
+ import { ListPostReports } from "./types/ListPostReports";
80
+ import { ListPostReportsResponse } from "./types/ListPostReportsResponse";
81
+ import { ListPrivateMessageReports } from "./types/ListPrivateMessageReports";
82
+ import { ListPrivateMessageReportsResponse } from "./types/ListPrivateMessageReportsResponse";
83
+ import { ListRegistrationApplications } from "./types/ListRegistrationApplications";
84
+ import { ListRegistrationApplicationsResponse } from "./types/ListRegistrationApplicationsResponse";
85
+ import { LockPost } from "./types/LockPost";
86
+ import { Login } from "./types/Login";
87
+ import { LoginResponse } from "./types/LoginResponse";
88
+ import { MarkCommentReplyAsRead } from "./types/MarkCommentReplyAsRead";
89
+ import { MarkPersonMentionAsRead } from "./types/MarkPersonMentionAsRead";
90
+ import { MarkPostAsRead } from "./types/MarkPostAsRead";
91
+ import { MarkPrivateMessageAsRead } from "./types/MarkPrivateMessageAsRead";
92
+ import { PasswordChangeAfterReset } from "./types/PasswordChangeAfterReset";
93
+ import { PasswordReset } from "./types/PasswordReset";
94
+ import { PersonMentionResponse } from "./types/PersonMentionResponse";
95
+ import { PostReportResponse } from "./types/PostReportResponse";
96
+ import { PostResponse } from "./types/PostResponse";
97
+ import { PrivateMessageReportResponse } from "./types/PrivateMessageReportResponse";
98
+ import { PrivateMessageResponse } from "./types/PrivateMessageResponse";
99
+ import { PrivateMessagesResponse } from "./types/PrivateMessagesResponse";
100
+ import { PurgeComment } from "./types/PurgeComment";
101
+ import { PurgeCommunity } from "./types/PurgeCommunity";
102
+ import { PurgePerson } from "./types/PurgePerson";
103
+ import { PurgePost } from "./types/PurgePost";
104
+ import { Register } from "./types/Register";
105
+ import { RegistrationApplicationResponse } from "./types/RegistrationApplicationResponse";
106
+ import { RemoveComment } from "./types/RemoveComment";
107
+ import { RemoveCommunity } from "./types/RemoveCommunity";
108
+ import { RemovePost } from "./types/RemovePost";
109
+ import { ResolveCommentReport } from "./types/ResolveCommentReport";
110
+ import { ResolveObject } from "./types/ResolveObject";
111
+ import { ResolveObjectResponse } from "./types/ResolveObjectResponse";
112
+ import { ResolvePostReport } from "./types/ResolvePostReport";
113
+ import { ResolvePrivateMessageReport } from "./types/ResolvePrivateMessageReport";
114
+ import { SaveComment } from "./types/SaveComment";
115
+ import { SavePost } from "./types/SavePost";
116
+ import { SaveUserSettings } from "./types/SaveUserSettings";
117
+ import { Search } from "./types/Search";
118
+ import { SearchResponse } from "./types/SearchResponse";
119
+ import { SiteResponse } from "./types/SiteResponse";
120
+ import { TransferCommunity } from "./types/TransferCommunity";
121
+ import { VerifyEmail } from "./types/VerifyEmail";
122
+ import { DeleteImage, UploadImage, UploadImageResponse } from "./other_types";
123
+ import { HideCommunity } from "./types/HideCommunity";
124
+ import { BlockInstance } from "./types/BlockInstance";
125
+ import { BlockInstanceResponse } from "./types/BlockInstanceResponse";
126
+ import { GenerateTotpSecretResponse } from "./types/GenerateTotpSecretResponse";
127
+ import { UpdateTotp } from "./types/UpdateTotp";
128
+ import { UpdateTotpResponse } from "./types/UpdateTotpResponse";
129
+ import { SuccessResponse } from "./types/SuccessResponse";
130
+ import { LoginToken } from "./types/LoginToken";
131
+ import { ListPostLikes } from "./types/ListPostLikes";
132
+ import { ListPostLikesResponse } from "./types/ListPostLikesResponse";
133
+ import { ListCommentLikes } from "./types/ListCommentLikes";
134
+ import { ListCommentLikesResponse } from "./types/ListCommentLikesResponse";
135
+ /**
136
+ * Helps build lemmy HTTP requests.
137
+ */
138
+ export declare class LemmyHttp {
139
+ #private;
140
+ /**
141
+ * Generates a new instance of LemmyHttp.
142
+ * @param baseUrl the base url, without the vX version: https://lemmy.ml -> goes to https://lemmy.ml/api/vX
143
+ * @param headers optional headers. Should contain `x-real-ip` and `x-forwarded-for` .
144
+ */
145
+ constructor(baseUrl: string, options?: {
146
+ fetchFunction?: typeof fetch;
147
+ headers?: {
148
+ [key: string]: string;
149
+ };
150
+ });
151
+ /**
152
+ * Gets the site, and your user data.
153
+ *
154
+ * `HTTP.GET /site`
155
+ */
156
+ getSite(): Promise<GetSiteResponse>;
157
+ /**
158
+ * Create your site.
159
+ *
160
+ * `HTTP.POST /site`
161
+ */
162
+ createSite(form: CreateSite): Promise<SiteResponse>;
163
+ /**
164
+ * Edit your site.
165
+ *
166
+ * `HTTP.PUT /site`
167
+ */
168
+ editSite(form: EditSite): Promise<SiteResponse>;
169
+ /**
170
+ * Leave the Site admins.
171
+ *
172
+ * `HTTP.POST /user/leave_admin`
173
+ */
174
+ leaveAdmin(): Promise<GetSiteResponse>;
175
+ /**
176
+ * Generate a TOTP / two-factor secret.
177
+ *
178
+ * Afterwards you need to call `/user/totp/update` with a valid token to enable it.
179
+ *
180
+ * `HTTP.POST /user/totp/generate`
181
+ */
182
+ generateTotpSecret(): Promise<GenerateTotpSecretResponse>;
183
+ /**
184
+ * Export a backup of your user settings, including your saved content,
185
+ * followed communities, and blocks.
186
+ *
187
+ * `HTTP.GET /user/export_settings`
188
+ */
189
+ exportSettings(): Promise<string>;
190
+ /**
191
+ * Import a backup of your user settings.
192
+ *
193
+ * `HTTP.POST /user/import_settings`
194
+ */
195
+ importSettings(form: any): Promise<SuccessResponse>;
196
+ /**
197
+ * List login tokens for your user
198
+ *
199
+ * `HTTP.GET /user/list_logins`
200
+ */
201
+ listLogins(): Promise<LoginToken[]>;
202
+ /**
203
+ * Returns an error message if your auth token is invalid
204
+ *
205
+ * `HTTP.GET /user/validate_auth`
206
+ */
207
+ validateAuth(): Promise<SuccessResponse>;
208
+ /**
209
+ * Enable / Disable TOTP / two-factor authentication.
210
+ *
211
+ * To enable, you need to first call `/user/totp/generate` and then pass a valid token to this.
212
+ *
213
+ * Disabling is only possible if 2FA was previously enabled. Again it is necessary to pass a valid token.
214
+ *
215
+ * `HTTP.POST /user/totp/update`
216
+ */
217
+ updateTotp(form: UpdateTotp): Promise<UpdateTotpResponse>;
218
+ /**
219
+ * Get the modlog.
220
+ *
221
+ * `HTTP.GET /modlog`
222
+ */
223
+ getModlog(form?: GetModlog): Promise<GetModlogResponse>;
224
+ /**
225
+ * Search lemmy.
226
+ *
227
+ * `HTTP.GET /search`
228
+ */
229
+ search(form: Search): Promise<SearchResponse>;
230
+ /**
231
+ * Fetch a non-local / federated object.
232
+ *
233
+ * `HTTP.GET /resolve_object`
234
+ */
235
+ resolveObject(form: ResolveObject): Promise<ResolveObjectResponse>;
236
+ /**
237
+ * Create a new community.
238
+ *
239
+ * `HTTP.POST /community`
240
+ */
241
+ createCommunity(form: CreateCommunity): Promise<CommunityResponse>;
242
+ /**
243
+ * Get / fetch a community.
244
+ *
245
+ * `HTTP.GET /community`
246
+ */
247
+ getCommunity(form?: GetCommunity): Promise<GetCommunityResponse>;
248
+ /**
249
+ * Edit a community.
250
+ *
251
+ * `HTTP.PUT /community`
252
+ */
253
+ editCommunity(form: EditCommunity): Promise<CommunityResponse>;
254
+ /**
255
+ * List communities, with various filters.
256
+ *
257
+ * `HTTP.GET /community/list`
258
+ */
259
+ listCommunities(form?: ListCommunities): Promise<ListCommunitiesResponse>;
260
+ /**
261
+ * Follow / subscribe to a community.
262
+ *
263
+ * `HTTP.POST /community/follow`
264
+ */
265
+ followCommunity(form: FollowCommunity): Promise<CommunityResponse>;
266
+ /**
267
+ * Block a community.
268
+ *
269
+ * `HTTP.POST /community/block`
270
+ */
271
+ blockCommunity(form: BlockCommunity): Promise<BlockCommunityResponse>;
272
+ /**
273
+ * Delete a community.
274
+ *
275
+ * `HTTP.POST /community/delete`
276
+ */
277
+ deleteCommunity(form: DeleteCommunity): Promise<CommunityResponse>;
278
+ /**
279
+ * Hide a community from public / "All" view. Admins only.
280
+ *
281
+ * `HTTP.PUT /community/hide`
282
+ */
283
+ hideCommunity(form: HideCommunity): Promise<SuccessResponse>;
284
+ /**
285
+ * A moderator remove for a community.
286
+ *
287
+ * `HTTP.POST /community/remove`
288
+ */
289
+ removeCommunity(form: RemoveCommunity): Promise<CommunityResponse>;
290
+ /**
291
+ * Transfer your community to an existing moderator.
292
+ *
293
+ * `HTTP.POST /community/transfer`
294
+ */
295
+ transferCommunity(form: TransferCommunity): Promise<GetCommunityResponse>;
296
+ /**
297
+ * Ban a user from a community.
298
+ *
299
+ * `HTTP.POST /community/ban_user`
300
+ */
301
+ banFromCommunity(form: BanFromCommunity): Promise<BanFromCommunityResponse>;
302
+ /**
303
+ * Add a moderator to your community.
304
+ *
305
+ * `HTTP.POST /community/mod`
306
+ */
307
+ addModToCommunity(form: AddModToCommunity): Promise<AddModToCommunityResponse>;
308
+ /**
309
+ * Create a post.
310
+ *
311
+ * `HTTP.POST /post`
312
+ */
313
+ createPost(form: CreatePost): Promise<PostResponse>;
314
+ /**
315
+ * Get / fetch a post.
316
+ *
317
+ * `HTTP.GET /post`
318
+ */
319
+ getPost(form?: GetPost): Promise<GetPostResponse>;
320
+ /**
321
+ * Edit a post.
322
+ *
323
+ * `HTTP.PUT /post`
324
+ */
325
+ editPost(form: EditPost): Promise<PostResponse>;
326
+ /**
327
+ * Delete a post.
328
+ *
329
+ * `HTTP.POST /post/delete`
330
+ */
331
+ deletePost(form: DeletePost): Promise<PostResponse>;
332
+ /**
333
+ * A moderator remove for a post.
334
+ *
335
+ * `HTTP.POST /post/remove`
336
+ */
337
+ removePost(form: RemovePost): Promise<PostResponse>;
338
+ /**
339
+ * Mark a post as read.
340
+ *
341
+ * `HTTP.POST /post/mark_as_read`
342
+ */
343
+ markPostAsRead(form: MarkPostAsRead): Promise<SuccessResponse>;
344
+ /**
345
+ * A moderator can lock a post ( IE disable new comments ).
346
+ *
347
+ * `HTTP.POST /post/lock`
348
+ */
349
+ lockPost(form: LockPost): Promise<PostResponse>;
350
+ /**
351
+ * A moderator can feature a community post ( IE stick it to the top of a community ).
352
+ *
353
+ * `HTTP.POST /post/feature`
354
+ */
355
+ featurePost(form: FeaturePost): Promise<PostResponse>;
356
+ /**
357
+ * Get / fetch posts, with various filters.
358
+ *
359
+ * `HTTP.GET /post/list`
360
+ */
361
+ getPosts(form?: GetPosts): Promise<GetPostsResponse>;
362
+ /**
363
+ * Like / vote on a post.
364
+ *
365
+ * `HTTP.POST /post/like`
366
+ */
367
+ likePost(form: CreatePostLike): Promise<PostResponse>;
368
+ /**
369
+ * List a post's likes. Admin-only.
370
+ *
371
+ * `HTTP.GET /post/like/list`
372
+ */
373
+ listPostLikes(form: ListPostLikes): Promise<ListPostLikesResponse>;
374
+ /**
375
+ * Save a post.
376
+ *
377
+ * `HTTP.PUT /post/save`
378
+ */
379
+ savePost(form: SavePost): Promise<PostResponse>;
380
+ /**
381
+ * Report a post.
382
+ *
383
+ * `HTTP.POST /post/report`
384
+ */
385
+ createPostReport(form: CreatePostReport): Promise<PostReportResponse>;
386
+ /**
387
+ * Resolve a post report. Only a mod can do this.
388
+ *
389
+ * `HTTP.PUT /post/report/resolve`
390
+ */
391
+ resolvePostReport(form: ResolvePostReport): Promise<PostReportResponse>;
392
+ /**
393
+ * List post reports.
394
+ *
395
+ * `HTTP.GET /post/report/list`
396
+ */
397
+ listPostReports(form: ListPostReports): Promise<ListPostReportsResponse>;
398
+ /**
399
+ * Fetch metadata for any given site.
400
+ *
401
+ * `HTTP.GET /post/site_metadata`
402
+ */
403
+ getSiteMetadata(form: GetSiteMetadata): Promise<GetSiteMetadataResponse>;
404
+ /**
405
+ * Create a comment.
406
+ *
407
+ * `HTTP.POST /comment`
408
+ */
409
+ createComment(form: CreateComment): Promise<CommentResponse>;
410
+ /**
411
+ * Edit a comment.
412
+ *
413
+ * `HTTP.PUT /comment`
414
+ */
415
+ editComment(form: EditComment): Promise<CommentResponse>;
416
+ /**
417
+ * Delete a comment.
418
+ *
419
+ * `HTTP.POST /comment/delete`
420
+ */
421
+ deleteComment(form: DeleteComment): Promise<CommentResponse>;
422
+ /**
423
+ * A moderator remove for a comment.
424
+ *
425
+ * `HTTP.POST /comment/remove`
426
+ */
427
+ removeComment(form: RemoveComment): Promise<CommentResponse>;
428
+ /**
429
+ * Mark a comment as read.
430
+ *
431
+ * `HTTP.POST /comment/mark_as_read`
432
+ */
433
+ markCommentReplyAsRead(form: MarkCommentReplyAsRead): Promise<CommentReplyResponse>;
434
+ /**
435
+ * Like / vote on a comment.
436
+ *
437
+ * `HTTP.POST /comment/like`
438
+ */
439
+ likeComment(form: CreateCommentLike): Promise<CommentResponse>;
440
+ /**
441
+ * List a comment's likes. Admin-only.
442
+ *
443
+ * `HTTP.GET /comment/like/list`
444
+ */
445
+ listCommentLikes(form: ListCommentLikes): Promise<ListCommentLikesResponse>;
446
+ /**
447
+ * Save a comment.
448
+ *
449
+ * `HTTP.PUT /comment/save`
450
+ */
451
+ saveComment(form: SaveComment): Promise<CommentResponse>;
452
+ /**
453
+ * Distinguishes a comment (speak as moderator)
454
+ *
455
+ * `HTTP.POST /comment/distinguish`
456
+ */
457
+ distinguishComment(form: DistinguishComment): Promise<CommentResponse>;
458
+ /**
459
+ * Get / fetch comments.
460
+ *
461
+ * `HTTP.GET /comment/list`
462
+ */
463
+ getComments(form?: GetComments): Promise<GetCommentsResponse>;
464
+ /**
465
+ * Get / fetch comment.
466
+ *
467
+ * `HTTP.GET /comment`
468
+ */
469
+ getComment(form: GetComment): Promise<CommentResponse>;
470
+ /**
471
+ * Report a comment.
472
+ *
473
+ * `HTTP.POST /comment/report`
474
+ */
475
+ createCommentReport(form: CreateCommentReport): Promise<CommentReportResponse>;
476
+ /**
477
+ * Resolve a comment report. Only a mod can do this.
478
+ *
479
+ * `HTTP.PUT /comment/report/resolve`
480
+ */
481
+ resolveCommentReport(form: ResolveCommentReport): Promise<CommentReportResponse>;
482
+ /**
483
+ * List comment reports.
484
+ *
485
+ * `HTTP.GET /comment/report/list`
486
+ */
487
+ listCommentReports(form: ListCommentReports): Promise<ListCommentReportsResponse>;
488
+ /**
489
+ * Get / fetch private messages.
490
+ *
491
+ * `HTTP.GET /private_message/list`
492
+ */
493
+ getPrivateMessages(form: GetPrivateMessages): Promise<PrivateMessagesResponse>;
494
+ /**
495
+ * Create a private message.
496
+ *
497
+ * `HTTP.POST /private_message`
498
+ */
499
+ createPrivateMessage(form: CreatePrivateMessage): Promise<PrivateMessageResponse>;
500
+ /**
501
+ * Edit a private message.
502
+ *
503
+ * `HTTP.PUT /private_message`
504
+ */
505
+ editPrivateMessage(form: EditPrivateMessage): Promise<PrivateMessageResponse>;
506
+ /**
507
+ * Delete a private message.
508
+ *
509
+ * `HTTP.POST /private_message/delete`
510
+ */
511
+ deletePrivateMessage(form: DeletePrivateMessage): Promise<PrivateMessageResponse>;
512
+ /**
513
+ * Mark a private message as read.
514
+ *
515
+ * `HTTP.POST /private_message/mark_as_read`
516
+ */
517
+ markPrivateMessageAsRead(form: MarkPrivateMessageAsRead): Promise<PrivateMessageResponse>;
518
+ /**
519
+ * Create a report for a private message.
520
+ *
521
+ * `HTTP.POST /private_message/report`
522
+ */
523
+ createPrivateMessageReport(form: CreatePrivateMessageReport): Promise<PrivateMessageReportResponse>;
524
+ /**
525
+ * Resolve a report for a private message.
526
+ *
527
+ * `HTTP.PUT /private_message/report/resolve`
528
+ */
529
+ resolvePrivateMessageReport(form: ResolvePrivateMessageReport): Promise<PrivateMessageReportResponse>;
530
+ /**
531
+ * List private message reports.
532
+ *
533
+ * `HTTP.GET /private_message/report/list`
534
+ */
535
+ listPrivateMessageReports(form: ListPrivateMessageReports): Promise<ListPrivateMessageReportsResponse>;
536
+ /**
537
+ * Register a new user.
538
+ *
539
+ * `HTTP.POST /user/register`
540
+ */
541
+ register(form: Register): Promise<LoginResponse>;
542
+ /**
543
+ * Log into lemmy.
544
+ *
545
+ * `HTTP.POST /user/login`
546
+ */
547
+ login(form: Login): Promise<LoginResponse>;
548
+ logout(): Promise<SuccessResponse>;
549
+ /**
550
+ * Get the details for a person.
551
+ *
552
+ * `HTTP.GET /user`
553
+ */
554
+ getPersonDetails(form?: GetPersonDetails): Promise<GetPersonDetailsResponse>;
555
+ /**
556
+ * Get mentions for your user.
557
+ *
558
+ * `HTTP.GET /user/mention`
559
+ */
560
+ getPersonMentions(form: GetPersonMentions): Promise<GetPersonMentionsResponse>;
561
+ /**
562
+ * Mark a person mention as read.
563
+ *
564
+ * `HTTP.POST /user/mention/mark_as_read`
565
+ */
566
+ markPersonMentionAsRead(form: MarkPersonMentionAsRead): Promise<PersonMentionResponse>;
567
+ /**
568
+ * Get comment replies.
569
+ *
570
+ * `HTTP.GET /user/replies`
571
+ */
572
+ getReplies(form: GetReplies): Promise<GetRepliesResponse>;
573
+ /**
574
+ * Ban a person from your site.
575
+ *
576
+ * `HTTP.POST /user/ban`
577
+ */
578
+ banPerson(form: BanPerson): Promise<BanPersonResponse>;
579
+ /**
580
+ * Get a list of banned users
581
+ *
582
+ * `HTTP.GET /user/banned`
583
+ */
584
+ getBannedPersons(): Promise<BannedPersonsResponse>;
585
+ /**
586
+ * Block a person.
587
+ *
588
+ * `HTTP.POST /user/block`
589
+ */
590
+ blockPerson(form: BlockPerson): Promise<BlockPersonResponse>;
591
+ /**
592
+ * Fetch a Captcha.
593
+ *
594
+ * `HTTP.GET /user/get_captcha`
595
+ */
596
+ getCaptcha(): Promise<GetCaptchaResponse>;
597
+ /**
598
+ * Delete your account.
599
+ *
600
+ * `HTTP.POST /user/delete_account`
601
+ */
602
+ deleteAccount(form: DeleteAccount): Promise<SuccessResponse>;
603
+ /**
604
+ * Reset your password.
605
+ *
606
+ * `HTTP.POST /user/password_reset`
607
+ */
608
+ passwordReset(form: PasswordReset): Promise<SuccessResponse>;
609
+ /**
610
+ * Change your password from an email / token based reset.
611
+ *
612
+ * `HTTP.POST /user/password_change`
613
+ */
614
+ passwordChangeAfterReset(form: PasswordChangeAfterReset): Promise<SuccessResponse>;
615
+ /**
616
+ * Mark all replies as read.
617
+ *
618
+ * `HTTP.POST /user/mark_all_as_read`
619
+ */
620
+ markAllAsRead(): Promise<GetRepliesResponse>;
621
+ /**
622
+ * Save your user settings.
623
+ *
624
+ * `HTTP.PUT /user/save_user_settings`
625
+ */
626
+ saveUserSettings(form: SaveUserSettings): Promise<SuccessResponse>;
627
+ /**
628
+ * Change your user password.
629
+ *
630
+ * `HTTP.PUT /user/change_password`
631
+ */
632
+ changePassword(form: ChangePassword): Promise<LoginResponse>;
633
+ /**
634
+ * Get counts for your reports
635
+ *
636
+ * `HTTP.GET /user/report_count`
637
+ */
638
+ getReportCount(form: GetReportCount): Promise<GetReportCountResponse>;
639
+ /**
640
+ * Get your unread counts
641
+ *
642
+ * `HTTP.GET /user/unread_count`
643
+ */
644
+ getUnreadCount(): Promise<GetUnreadCountResponse>;
645
+ /**
646
+ * Verify your email
647
+ *
648
+ * `HTTP.POST /user/verify_email`
649
+ */
650
+ verifyEmail(form: VerifyEmail): Promise<SuccessResponse>;
651
+ /**
652
+ * Add an admin to your site.
653
+ *
654
+ * `HTTP.POST /admin/add`
655
+ */
656
+ addAdmin(form: AddAdmin): Promise<AddAdminResponse>;
657
+ /**
658
+ * Get the unread registration applications count.
659
+ *
660
+ * `HTTP.GET /admin/registration_application/count`
661
+ */
662
+ getUnreadRegistrationApplicationCount(): Promise<GetUnreadRegistrationApplicationCountResponse>;
663
+ /**
664
+ * List the registration applications.
665
+ *
666
+ * `HTTP.GET /admin/registration_application/list`
667
+ */
668
+ listRegistrationApplications(form: ListRegistrationApplications): Promise<ListRegistrationApplicationsResponse>;
669
+ /**
670
+ * Approve a registration application
671
+ *
672
+ * `HTTP.PUT /admin/registration_application/approve`
673
+ */
674
+ approveRegistrationApplication(form: ApproveRegistrationApplication): Promise<RegistrationApplicationResponse>;
675
+ /**
676
+ * Purge / Delete a person from the database.
677
+ *
678
+ * `HTTP.POST /admin/purge/person`
679
+ */
680
+ purgePerson(form: PurgePerson): Promise<SuccessResponse>;
681
+ /**
682
+ * Purge / Delete a community from the database.
683
+ *
684
+ * `HTTP.POST /admin/purge/community`
685
+ */
686
+ purgeCommunity(form: PurgeCommunity): Promise<SuccessResponse>;
687
+ /**
688
+ * Purge / Delete a post from the database.
689
+ *
690
+ * `HTTP.POST /admin/purge/post`
691
+ */
692
+ purgePost(form: PurgePost): Promise<SuccessResponse>;
693
+ /**
694
+ * Purge / Delete a comment from the database.
695
+ *
696
+ * `HTTP.POST /admin/purge/comment`
697
+ */
698
+ purgeComment(form: PurgeComment): Promise<SuccessResponse>;
699
+ /**
700
+ * Create a new custom emoji
701
+ *
702
+ * `HTTP.POST /custom_emoji`
703
+ */
704
+ createCustomEmoji(form: CreateCustomEmoji): Promise<CustomEmojiResponse>;
705
+ /**
706
+ * Edit an existing custom emoji
707
+ *
708
+ * `HTTP.PUT /custom_emoji`
709
+ */
710
+ editCustomEmoji(form: EditCustomEmoji): Promise<CustomEmojiResponse>;
711
+ /**
712
+ * Delete a custom emoji
713
+ *
714
+ * `HTTP.Post /custom_emoji/delete`
715
+ */
716
+ deleteCustomEmoji(form: DeleteCustomEmoji): Promise<SuccessResponse>;
717
+ /**
718
+ * Fetch federated instances.
719
+ *
720
+ * `HTTP.Get /federated_instances`
721
+ */
722
+ getFederatedInstances(): Promise<GetFederatedInstancesResponse>;
723
+ /**
724
+ * Block an instance.
725
+ *
726
+ * `HTTP.Post /site/block`
727
+ */
728
+ blockInstance(form: BlockInstance): Promise<BlockInstanceResponse>;
729
+ /**
730
+ * Upload an image to the server.
731
+ */
732
+ uploadImage({ image }: UploadImage): Promise<UploadImageResponse>;
733
+ /**
734
+ * Delete a pictrs image
735
+ */
736
+ deleteImage({ token, filename }: DeleteImage): Promise<boolean>;
737
+ /**
738
+ * Set the headers (can be used to set the auth header)
739
+ */
740
+ setHeaders(headers: {
741
+ [key: string]: string;
742
+ }): void;
743
+ }