lemmy-js-client 1.0.0-errors-array.3 → 1.0.0-feed-only-jwt.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (408) hide show
  1. package/README.md +33 -4
  2. package/dist/http.d.ts +254 -219
  3. package/dist/http.js +417 -328
  4. package/dist/index.d.ts +58 -112
  5. package/dist/index.js +1 -0
  6. package/dist/map_request_state.d.ts +2 -0
  7. package/dist/map_request_state.js +12 -0
  8. package/dist/map_request_state.main.d.ts +2 -0
  9. package/dist/map_request_state.main.js +12 -0
  10. package/dist/map_request_state.tsoa.d.ts +1 -0
  11. package/dist/map_request_state.tsoa.js +7 -0
  12. package/dist/other_types.d.ts +10 -7
  13. package/dist/request_state.d.ts +26 -0
  14. package/dist/request_state.js +5 -0
  15. package/dist/types/AdminAllowInstanceParams.d.ts +1 -1
  16. package/dist/types/AdminBlockInstanceParams.d.ts +7 -2
  17. package/dist/types/AdminListUsers.d.ts +2 -1
  18. package/dist/types/{OAuthProvider.d.ts → AdminOAuthProvider.d.ts} +1 -1
  19. package/dist/types/AllLemmyErrors.d.ts +1 -1
  20. package/dist/types/AllLemmyErrors.js +16 -14
  21. package/dist/types/AuthenticateWithOauth.d.ts +8 -0
  22. package/dist/types/BanFromCommunity.d.ts +1 -1
  23. package/dist/types/BanPerson.d.ts +1 -1
  24. package/dist/types/ChangePassword.d.ts +4 -0
  25. package/dist/types/{PasswordChangeAfterReset.d.ts → ChangePasswordAfterReset.d.ts} +1 -1
  26. package/dist/types/CommentActions.d.ts +6 -6
  27. package/dist/types/CommentReport.d.ts +1 -0
  28. package/dist/types/CommentReportView.d.ts +4 -0
  29. package/dist/types/CommentSortType.d.ts +1 -1
  30. package/dist/types/CommentView.d.ts +2 -2
  31. package/dist/types/Community.d.ts +9 -3
  32. package/dist/types/CommunityActions.d.ts +4 -4
  33. package/dist/types/CommunityFollowerState.d.ts +1 -1
  34. package/dist/types/CommunityNotificationsMode.d.ts +1 -1
  35. package/dist/types/CommunityReport.d.ts +3 -2
  36. package/dist/types/CommunityReportView.d.ts +2 -0
  37. package/dist/types/CommunitySortType.d.ts +1 -1
  38. package/dist/types/{Tag.d.ts → CommunityTag.d.ts} +6 -4
  39. package/dist/types/CommunityTagId.d.ts +4 -0
  40. package/dist/types/CommunityTagsView.d.ts +5 -0
  41. package/dist/types/CommunityView.d.ts +2 -2
  42. package/dist/types/CommunityVisibility.d.ts +1 -1
  43. package/dist/types/CreateCommentLike.d.ts +2 -2
  44. package/dist/types/CreateCommentReport.d.ts +4 -0
  45. package/dist/types/CreateCommentWarning.d.ts +8 -0
  46. package/dist/types/CreateCommunity.d.ts +8 -11
  47. package/dist/types/CreateCommunityTag.d.ts +3 -1
  48. package/dist/types/CreateCustomEmoji.d.ts +2 -1
  49. package/dist/types/CreateCustomEmoji.js +0 -1
  50. package/dist/types/CreateInvitation.d.ts +4 -0
  51. package/dist/types/CreateInvitationResponse.d.ts +4 -0
  52. package/dist/types/CreateMultiCommunity.d.ts +2 -1
  53. package/dist/types/CreatePost.d.ts +2 -2
  54. package/dist/types/CreatePostLike.d.ts +2 -2
  55. package/dist/types/CreatePostReport.d.ts +4 -0
  56. package/dist/types/CreatePostWarning.d.ts +8 -0
  57. package/dist/types/CreateSite.d.ts +24 -13
  58. package/dist/types/DeleteCommunityTag.d.ts +3 -2
  59. package/dist/types/DeleteUserForm.d.ts +8 -0
  60. package/dist/types/EditCommunity.d.ts +7 -2
  61. package/dist/types/{UpdateCommunityNotifications.d.ts → EditCommunityNotifications.d.ts} +1 -1
  62. package/dist/types/EditCommunityTag.d.ts +11 -0
  63. package/dist/types/EditCustomEmoji.d.ts +7 -5
  64. package/dist/types/{UpdateMultiCommunity.d.ts → EditMultiCommunity.d.ts} +3 -2
  65. package/dist/types/EditPost.d.ts +2 -2
  66. package/dist/types/{UpdatePostNotifications.d.ts → EditPostNotifications.d.ts} +1 -1
  67. package/dist/types/EditSite.d.ts +41 -27
  68. package/dist/types/{UpdateTagline.d.ts → EditTagline.d.ts} +1 -1
  69. package/dist/types/{UpdateTotp.d.ts → EditTotp.d.ts} +1 -1
  70. package/dist/types/EditTotpResponse.d.ts +3 -0
  71. package/dist/types/FederatedInstanceView.d.ts +12 -0
  72. package/dist/types/FederationAllowList.d.ts +4 -0
  73. package/dist/types/FederationBlockList.d.ts +0 -2
  74. package/dist/types/FederationBlockList.js +1 -0
  75. package/dist/types/{ReadableFederationState.d.ts → FederationQueueState.d.ts} +1 -5
  76. package/dist/types/GetComments.d.ts +4 -1
  77. package/dist/types/GetFederatedInstances.d.ts +8 -0
  78. package/dist/types/GetFederatedInstancesKind.d.ts +1 -0
  79. package/dist/types/GetModlog.d.ts +11 -3
  80. package/dist/types/GetMultiCommunity.d.ts +2 -1
  81. package/dist/types/GetPersonDetailsResponse.d.ts +2 -0
  82. package/dist/types/GetPostResponse.d.ts +2 -0
  83. package/dist/types/GetPosts.d.ts +13 -2
  84. package/dist/types/GetSiteResponse.d.ts +14 -3
  85. package/dist/types/HideCommunity.d.ts +1 -1
  86. package/dist/types/ImageMode.d.ts +4 -0
  87. package/dist/types/InvitationId.d.ts +4 -0
  88. package/dist/types/Language.d.ts +2 -0
  89. package/dist/types/LemmyErrorType.d.ts +33 -30
  90. package/dist/types/LemmyErrorType.js +1 -0
  91. package/dist/types/LikeType.d.ts +1 -1
  92. package/dist/types/ListCommentLikes.d.ts +0 -1
  93. package/dist/types/ListCommunities.d.ts +4 -1
  94. package/dist/types/ListCommunityPendingFollows.d.ts +1 -2
  95. package/dist/types/ListInvitations.d.ts +5 -0
  96. package/dist/types/ListMedia.d.ts +0 -1
  97. package/dist/types/ListMultiCommunities.d.ts +14 -1
  98. package/dist/types/ListNotifications.d.ts +4 -3
  99. package/dist/types/ListPersonContent.d.ts +3 -1
  100. package/dist/types/ListPersonHidden.d.ts +0 -1
  101. package/dist/types/ListPersonLiked.d.ts +0 -1
  102. package/dist/types/ListPersonRead.d.ts +0 -1
  103. package/dist/types/ListPersonSaved.d.ts +1 -1
  104. package/dist/types/ListPersons.d.ts +13 -0
  105. package/dist/types/ListPostLikes.d.ts +0 -1
  106. package/dist/types/ListRegistrationApplications.d.ts +0 -1
  107. package/dist/types/ListReports.d.ts +6 -1
  108. package/dist/types/ListTaglines.d.ts +0 -1
  109. package/dist/types/ListingType.d.ts +1 -1
  110. package/dist/types/LocalSite.d.ts +57 -31
  111. package/dist/types/LocalUser.d.ts +17 -16
  112. package/dist/types/LocalUserInvite.d.ts +11 -0
  113. package/dist/types/LocalUserSortType.d.ts +4 -0
  114. package/dist/types/LockComment.d.ts +4 -1
  115. package/dist/types/LockPost.d.ts +1 -1
  116. package/dist/types/Login.d.ts +4 -0
  117. package/dist/types/MarkManyPostsAsRead.d.ts +1 -0
  118. package/dist/types/ModEditPost.d.ts +2 -2
  119. package/dist/types/Modlog.d.ts +12 -0
  120. package/dist/types/ModlogId.d.ts +1 -0
  121. package/dist/types/ModlogKind.d.ts +4 -0
  122. package/dist/types/ModlogKindFilter.d.ts +4 -0
  123. package/dist/types/ModlogView.d.ts +15 -0
  124. package/dist/types/MultiCommunity.d.ts +12 -1
  125. package/dist/types/MultiCommunityEntry.d.ts +6 -0
  126. package/dist/types/MultiCommunityListingType.d.ts +4 -0
  127. package/dist/types/MultiCommunityResponse.d.ts +4 -0
  128. package/dist/types/MultiCommunitySortType.d.ts +1 -0
  129. package/dist/types/MultiCommunityView.d.ts +2 -0
  130. package/dist/types/MyUserInfo.d.ts +2 -0
  131. package/dist/types/NodeInfo.d.ts +20 -0
  132. package/dist/types/NodeInfoServices.d.ts +4 -0
  133. package/dist/types/NodeInfoSoftware.d.ts +6 -0
  134. package/dist/types/NodeInfoUsage.d.ts +6 -0
  135. package/dist/types/NodeInfoUsers.d.ts +5 -0
  136. package/dist/types/Notification.d.ts +5 -2
  137. package/dist/types/NotificationData.d.ts +7 -4
  138. package/dist/types/NotificationType.d.ts +4 -0
  139. package/dist/types/NotificationTypeFilter.d.ts +4 -0
  140. package/dist/types/PagedResponse.d.ts +11 -0
  141. package/dist/types/PaginationCursor.d.ts +5 -1
  142. package/dist/types/PendingFollowerView.d.ts +9 -0
  143. package/dist/types/Person.d.ts +1 -0
  144. package/dist/types/PersonContentType.d.ts +1 -1
  145. package/dist/types/PersonListingType.d.ts +4 -0
  146. package/dist/types/PersonResponse.d.ts +7 -0
  147. package/dist/types/PersonSortType.d.ts +4 -0
  148. package/dist/types/PersonView.d.ts +2 -0
  149. package/dist/types/PluginMetadata.d.ts +2 -2
  150. package/dist/types/Post.d.ts +6 -4
  151. package/dist/types/PostActions.d.ts +11 -11
  152. package/dist/types/{PersonSavedCombinedView.d.ts → PostCommentCombinedView.d.ts} +3 -3
  153. package/dist/types/PostFeatureType.d.ts +1 -1
  154. package/dist/types/PostListingMode.d.ts +1 -1
  155. package/dist/types/PostNotificationsMode.d.ts +1 -1
  156. package/dist/types/PostOrCommentOrPrivateMessage.d.ts +7 -7
  157. package/dist/types/PostReport.d.ts +1 -0
  158. package/dist/types/PostReportView.d.ts +4 -0
  159. package/dist/types/PostSortType.d.ts +1 -1
  160. package/dist/types/PostView.d.ts +2 -2
  161. package/dist/types/PrivateMessage.d.ts +1 -0
  162. package/dist/types/PrivateMessageReport.d.ts +1 -0
  163. package/dist/types/PrivateMessageReportView.d.ts +1 -0
  164. package/dist/types/PublicOAuthProvider.d.ts +27 -2
  165. package/dist/types/PurgeComment.d.ts +1 -1
  166. package/dist/types/PurgeCommunity.d.ts +1 -1
  167. package/dist/types/PurgePerson.d.ts +1 -1
  168. package/dist/types/PurgePost.d.ts +1 -1
  169. package/dist/types/Register.d.ts +8 -0
  170. package/dist/types/RegistrationApplication.d.ts +1 -0
  171. package/dist/types/RegistrationMode.d.ts +1 -1
  172. package/dist/types/RemoveComment.d.ts +6 -1
  173. package/dist/types/RemoveCommunity.d.ts +1 -1
  174. package/dist/types/RemovePost.d.ts +6 -1
  175. package/dist/types/ReportCombinedView.d.ts +4 -4
  176. package/dist/types/ReportSortType.d.ts +4 -0
  177. package/dist/types/ReportType.d.ts +1 -1
  178. package/dist/types/{PasswordReset.d.ts → ResetPassword.d.ts} +1 -1
  179. package/dist/types/ResolveCommentReport.d.ts +1 -0
  180. package/dist/types/ResolveCommunityReport.d.ts +1 -0
  181. package/dist/types/{SearchCombinedView.d.ts → ResolveObjectView.d.ts} +7 -7
  182. package/dist/types/ResolvePostReport.d.ts +1 -0
  183. package/dist/types/ResolvePrivateMessageReport.d.ts +1 -0
  184. package/dist/types/RevokeInvitation.d.ts +3 -0
  185. package/dist/types/SaveUserSettings.d.ts +9 -9
  186. package/dist/types/Search.d.ts +6 -6
  187. package/dist/types/SearchResponse.d.ts +16 -4
  188. package/dist/types/SearchType.d.ts +1 -1
  189. package/dist/types/Site.d.ts +2 -3
  190. package/dist/types/TagColor.d.ts +4 -0
  191. package/dist/types/UnreadCountsResponse.d.ts +11 -0
  192. package/dist/types/UserSettingsBackup.d.ts +2 -0
  193. package/dist/types/VoteSettings.d.ts +4 -0
  194. package/dist/types/VoteShow.d.ts +1 -1
  195. package/dist/types/VoteView.d.ts +4 -1
  196. package/package.json +10 -10
  197. package/dist/types/AdminAdd.d.ts +0 -12
  198. package/dist/types/AdminAddId.d.ts +0 -1
  199. package/dist/types/AdminAddView.d.ts +0 -10
  200. package/dist/types/AdminAllowInstance.d.ts +0 -11
  201. package/dist/types/AdminAllowInstanceId.d.ts +0 -1
  202. package/dist/types/AdminAllowInstanceView.d.ts +0 -11
  203. package/dist/types/AdminBan.d.ts +0 -16
  204. package/dist/types/AdminBanId.d.ts +0 -1
  205. package/dist/types/AdminBanView.d.ts +0 -10
  206. package/dist/types/AdminBlockInstance.d.ts +0 -12
  207. package/dist/types/AdminBlockInstanceId.d.ts +0 -1
  208. package/dist/types/AdminBlockInstanceView.d.ts +0 -11
  209. package/dist/types/AdminListUsersResponse.d.ts +0 -10
  210. package/dist/types/AdminPurgeComment.d.ts +0 -13
  211. package/dist/types/AdminPurgeCommentId.d.ts +0 -1
  212. package/dist/types/AdminPurgeCommentView.d.ts +0 -11
  213. package/dist/types/AdminPurgeCommunity.d.ts +0 -11
  214. package/dist/types/AdminPurgeCommunityId.d.ts +0 -1
  215. package/dist/types/AdminPurgeCommunityView.d.ts +0 -9
  216. package/dist/types/AdminPurgePerson.d.ts +0 -11
  217. package/dist/types/AdminPurgePersonId.d.ts +0 -1
  218. package/dist/types/AdminPurgePersonView.d.ts +0 -9
  219. package/dist/types/AdminPurgePost.d.ts +0 -13
  220. package/dist/types/AdminPurgePostId.d.ts +0 -1
  221. package/dist/types/AdminPurgePostView.d.ts +0 -11
  222. package/dist/types/AdminRemoveCommunity.d.ts +0 -14
  223. package/dist/types/AdminRemoveCommunityId.d.ts +0 -1
  224. package/dist/types/AdminRemoveCommunityView.d.ts +0 -11
  225. package/dist/types/BanFromCommunityResponse.d.ts +0 -8
  226. package/dist/types/BanPersonResponse.d.ts +0 -8
  227. package/dist/types/BlockCommunityResponse.d.ts +0 -8
  228. package/dist/types/BlockPersonResponse.d.ts +0 -8
  229. package/dist/types/FederatedInstances.d.ts +0 -9
  230. package/dist/types/FederationError.d.ts +0 -12
  231. package/dist/types/FederationMode.d.ts +0 -4
  232. package/dist/types/GetCommentsResponse.d.ts +0 -10
  233. package/dist/types/GetCommentsSlimResponse.d.ts +0 -10
  234. package/dist/types/GetCommunityPendingFollowsCount.d.ts +0 -4
  235. package/dist/types/GetCommunityPendingFollowsCountResponse.d.ts +0 -3
  236. package/dist/types/GetFederatedInstancesResponse.d.ts +0 -10
  237. package/dist/types/GetModlogResponse.d.ts +0 -13
  238. package/dist/types/GetPostsResponse.d.ts +0 -13
  239. package/dist/types/GetReportCount.d.ts +0 -7
  240. package/dist/types/GetReportCountResponse.d.ts +0 -6
  241. package/dist/types/GetUnreadCountResponse.d.ts +0 -6
  242. package/dist/types/GetUnreadRegistrationApplicationCountResponse.d.ts +0 -6
  243. package/dist/types/InstanceWithFederationState.d.ts +0 -24
  244. package/dist/types/InstanceWithFederationState.js +0 -2
  245. package/dist/types/ListCommentLikesResponse.d.ts +0 -13
  246. package/dist/types/ListCommentLikesResponse.js +0 -2
  247. package/dist/types/ListCommunitiesResponse.d.ts +0 -13
  248. package/dist/types/ListCommunitiesResponse.js +0 -2
  249. package/dist/types/ListCommunityPendingFollowsResponse.d.ts +0 -10
  250. package/dist/types/ListCommunityPendingFollowsResponse.js +0 -2
  251. package/dist/types/ListMediaResponse.d.ts +0 -10
  252. package/dist/types/ListMediaResponse.js +0 -2
  253. package/dist/types/ListMultiCommunitiesResponse.d.ts +0 -4
  254. package/dist/types/ListMultiCommunitiesResponse.js +0 -2
  255. package/dist/types/ListNotificationsResponse.d.ts +0 -13
  256. package/dist/types/ListNotificationsResponse.js +0 -2
  257. package/dist/types/ListPersonContentResponse.d.ts +0 -13
  258. package/dist/types/ListPersonContentResponse.js +0 -2
  259. package/dist/types/ListPersonHiddenResponse.d.ts +0 -13
  260. package/dist/types/ListPersonHiddenResponse.js +0 -2
  261. package/dist/types/ListPersonLikedResponse.d.ts +0 -13
  262. package/dist/types/ListPersonLikedResponse.js +0 -2
  263. package/dist/types/ListPersonReadResponse.d.ts +0 -13
  264. package/dist/types/ListPersonReadResponse.js +0 -2
  265. package/dist/types/ListPersonSavedResponse.d.ts +0 -13
  266. package/dist/types/ListPersonSavedResponse.js +0 -2
  267. package/dist/types/ListPostLikesResponse.d.ts +0 -13
  268. package/dist/types/ListPostLikesResponse.js +0 -2
  269. package/dist/types/ListRegistrationApplicationsResponse.d.ts +0 -13
  270. package/dist/types/ListRegistrationApplicationsResponse.js +0 -2
  271. package/dist/types/ListReportsResponse.d.ts +0 -13
  272. package/dist/types/ListReportsResponse.js +0 -2
  273. package/dist/types/ListTaglinesResponse.d.ts +0 -13
  274. package/dist/types/ListTaglinesResponse.js +0 -2
  275. package/dist/types/ModAddToCommunity.d.ts +0 -14
  276. package/dist/types/ModAddToCommunity.js +0 -2
  277. package/dist/types/ModAddToCommunityId.d.ts +0 -1
  278. package/dist/types/ModAddToCommunityView.d.ts +0 -12
  279. package/dist/types/ModAddToCommunityView.js +0 -2
  280. package/dist/types/ModBanFromCommunity.d.ts +0 -16
  281. package/dist/types/ModBanFromCommunity.js +0 -2
  282. package/dist/types/ModBanFromCommunityId.d.ts +0 -1
  283. package/dist/types/ModBanFromCommunityView.d.ts +0 -12
  284. package/dist/types/ModBanFromCommunityView.js +0 -2
  285. package/dist/types/ModChangeCommunityVisibility.d.ts +0 -11
  286. package/dist/types/ModChangeCommunityVisibility.js +0 -2
  287. package/dist/types/ModChangeCommunityVisibilityId.d.ts +0 -1
  288. package/dist/types/ModChangeCommunityVisibilityView.d.ts +0 -11
  289. package/dist/types/ModChangeCommunityVisibilityView.js +0 -2
  290. package/dist/types/ModFeaturePost.d.ts +0 -14
  291. package/dist/types/ModFeaturePost.js +0 -2
  292. package/dist/types/ModFeaturePostId.d.ts +0 -1
  293. package/dist/types/ModFeaturePostView.d.ts +0 -14
  294. package/dist/types/ModFeaturePostView.js +0 -2
  295. package/dist/types/ModLockComment.d.ts +0 -14
  296. package/dist/types/ModLockComment.js +0 -2
  297. package/dist/types/ModLockCommentId.d.ts +0 -1
  298. package/dist/types/ModLockCommentView.d.ts +0 -14
  299. package/dist/types/ModLockCommentView.js +0 -2
  300. package/dist/types/ModLockPost.d.ts +0 -14
  301. package/dist/types/ModLockPost.js +0 -2
  302. package/dist/types/ModLockPostId.d.ts +0 -1
  303. package/dist/types/ModLockPostView.d.ts +0 -14
  304. package/dist/types/ModLockPostView.js +0 -2
  305. package/dist/types/ModRemoveComment.d.ts +0 -14
  306. package/dist/types/ModRemoveComment.js +0 -2
  307. package/dist/types/ModRemoveCommentId.d.ts +0 -1
  308. package/dist/types/ModRemoveCommentView.d.ts +0 -16
  309. package/dist/types/ModRemoveCommentView.js +0 -2
  310. package/dist/types/ModRemovePost.d.ts +0 -14
  311. package/dist/types/ModRemovePost.js +0 -2
  312. package/dist/types/ModRemovePostId.d.ts +0 -1
  313. package/dist/types/ModRemovePostView.d.ts +0 -14
  314. package/dist/types/ModRemovePostView.js +0 -2
  315. package/dist/types/ModTransferCommunity.d.ts +0 -13
  316. package/dist/types/ModTransferCommunity.js +0 -2
  317. package/dist/types/ModTransferCommunityId.d.ts +0 -1
  318. package/dist/types/ModTransferCommunityView.d.ts +0 -12
  319. package/dist/types/ModTransferCommunityView.js +0 -2
  320. package/dist/types/ModlogActionType.d.ts +0 -4
  321. package/dist/types/ModlogCombinedView.d.ts +0 -55
  322. package/dist/types/ModlogCombinedView.js +0 -2
  323. package/dist/types/NotificationDataType.d.ts +0 -4
  324. package/dist/types/NotificationTypes.d.ts +0 -4
  325. package/dist/types/NotificationTypes.js +0 -3
  326. package/dist/types/OAuthProvider.js +0 -2
  327. package/dist/types/PasswordChangeAfterReset.js +0 -2
  328. package/dist/types/PasswordReset.js +0 -2
  329. package/dist/types/PersonContentCombinedView.d.ts +0 -7
  330. package/dist/types/PersonContentCombinedView.js +0 -2
  331. package/dist/types/PersonLikedCombinedView.d.ts +0 -7
  332. package/dist/types/PersonLikedCombinedView.js +0 -2
  333. package/dist/types/PersonSavedCombinedView.js +0 -2
  334. package/dist/types/ReadableFederationState.js +0 -2
  335. package/dist/types/SearchCombinedView.js +0 -2
  336. package/dist/types/SearchSortType.d.ts +0 -4
  337. package/dist/types/SearchSortType.js +0 -3
  338. package/dist/types/Tag.js +0 -2
  339. package/dist/types/TagId.d.ts +0 -4
  340. package/dist/types/TagId.js +0 -3
  341. package/dist/types/TagsView.d.ts +0 -5
  342. package/dist/types/TagsView.js +0 -2
  343. package/dist/types/UpdateCommunityNotifications.js +0 -2
  344. package/dist/types/UpdateCommunityTag.d.ts +0 -9
  345. package/dist/types/UpdateCommunityTag.js +0 -2
  346. package/dist/types/UpdateMultiCommunity.js +0 -2
  347. package/dist/types/UpdatePostNotifications.js +0 -2
  348. package/dist/types/UpdateTagline.js +0 -2
  349. package/dist/types/UpdateTotp.js +0 -3
  350. package/dist/types/UpdateTotpResponse.d.ts +0 -3
  351. package/dist/types/UpdateTotpResponse.js +0 -3
  352. /package/dist/types/{AdminAdd.js → AdminOAuthProvider.js} +0 -0
  353. /package/dist/types/{AdminAddView.js → ChangePasswordAfterReset.js} +0 -0
  354. /package/dist/types/{AdminAllowInstance.js → CommunityTag.js} +0 -0
  355. /package/dist/types/{AdminAddId.js → CommunityTagId.js} +0 -0
  356. /package/dist/types/{AdminAllowInstanceView.js → CommunityTagsView.js} +0 -0
  357. /package/dist/types/{AdminBan.js → CreateCommentWarning.js} +0 -0
  358. /package/dist/types/{AdminAllowInstanceId.js → CreateInvitation.js} +0 -0
  359. /package/dist/types/{AdminBanView.js → CreateInvitationResponse.js} +0 -0
  360. /package/dist/types/{AdminBlockInstance.js → CreatePostWarning.js} +0 -0
  361. /package/dist/types/{AdminBlockInstanceView.js → DeleteUserForm.js} +0 -0
  362. /package/dist/types/{AdminListUsersResponse.js → EditCommunityNotifications.js} +0 -0
  363. /package/dist/types/{AdminPurgeComment.js → EditCommunityTag.js} +0 -0
  364. /package/dist/types/{AdminPurgeCommentView.js → EditMultiCommunity.js} +0 -0
  365. /package/dist/types/{AdminPurgeCommunity.js → EditPostNotifications.js} +0 -0
  366. /package/dist/types/{AdminPurgeCommunityView.js → EditTagline.js} +0 -0
  367. /package/dist/types/{AdminBanId.js → EditTotp.js} +0 -0
  368. /package/dist/types/{AdminBlockInstanceId.js → EditTotpResponse.js} +0 -0
  369. /package/dist/types/{AdminPurgePerson.js → FederatedInstanceView.js} +0 -0
  370. /package/dist/types/{AdminPurgeCommentId.js → FederationAllowList.js} +0 -0
  371. /package/dist/types/{AdminPurgePersonView.js → FederationQueueState.js} +0 -0
  372. /package/dist/types/{AdminPurgePost.js → GetFederatedInstances.js} +0 -0
  373. /package/dist/types/{AdminPurgeCommunityId.js → GetFederatedInstancesKind.js} +0 -0
  374. /package/dist/types/{AdminPurgePersonId.js → ImageMode.js} +0 -0
  375. /package/dist/types/{AdminPurgePostId.js → InvitationId.js} +0 -0
  376. /package/dist/types/{AdminPurgePostView.js → ListInvitations.js} +0 -0
  377. /package/dist/types/{AdminRemoveCommunity.js → ListPersons.js} +0 -0
  378. /package/dist/types/{AdminRemoveCommunityView.js → LocalUserInvite.js} +0 -0
  379. /package/dist/types/{AdminRemoveCommunityId.js → LocalUserSortType.js} +0 -0
  380. /package/dist/types/{BanFromCommunityResponse.js → Modlog.js} +0 -0
  381. /package/dist/types/{FederationError.js → ModlogId.js} +0 -0
  382. /package/dist/types/{FederationMode.js → ModlogKind.js} +0 -0
  383. /package/dist/types/{GetCommunityPendingFollowsCountResponse.js → ModlogKindFilter.js} +0 -0
  384. /package/dist/types/{BanPersonResponse.js → ModlogView.js} +0 -0
  385. /package/dist/types/{BlockCommunityResponse.js → MultiCommunityEntry.js} +0 -0
  386. /package/dist/types/{GetReportCountResponse.js → MultiCommunityListingType.js} +0 -0
  387. /package/dist/types/{BlockPersonResponse.js → MultiCommunityResponse.js} +0 -0
  388. /package/dist/types/{GetUnreadCountResponse.js → MultiCommunitySortType.js} +0 -0
  389. /package/dist/types/{FederatedInstances.js → NodeInfo.js} +0 -0
  390. /package/dist/types/{GetUnreadRegistrationApplicationCountResponse.js → NodeInfoServices.js} +0 -0
  391. /package/dist/types/{ModAddToCommunityId.js → NodeInfoSoftware.js} +0 -0
  392. /package/dist/types/{GetCommentsResponse.js → NodeInfoUsage.js} +0 -0
  393. /package/dist/types/{ModBanFromCommunityId.js → NodeInfoUsers.js} +0 -0
  394. /package/dist/types/{ModChangeCommunityVisibilityId.js → NotificationType.js} +0 -0
  395. /package/dist/types/{ModFeaturePostId.js → NotificationTypeFilter.js} +0 -0
  396. /package/dist/types/{GetCommentsSlimResponse.js → PagedResponse.js} +0 -0
  397. /package/dist/types/{GetCommunityPendingFollowsCount.js → PendingFollowerView.js} +0 -0
  398. /package/dist/types/{ModLockCommentId.js → PersonListingType.js} +0 -0
  399. /package/dist/types/{GetFederatedInstancesResponse.js → PersonResponse.js} +0 -0
  400. /package/dist/types/{ModLockPostId.js → PersonSortType.js} +0 -0
  401. /package/dist/types/{GetModlogResponse.js → PostCommentCombinedView.js} +0 -0
  402. /package/dist/types/{ModRemoveCommentId.js → ReportSortType.js} +0 -0
  403. /package/dist/types/{GetPostsResponse.js → ResetPassword.js} +0 -0
  404. /package/dist/types/{GetReportCount.js → ResolveObjectView.js} +0 -0
  405. /package/dist/types/{ModRemovePostId.js → RevokeInvitation.js} +0 -0
  406. /package/dist/types/{ModTransferCommunityId.js → TagColor.js} +0 -0
  407. /package/dist/types/{ModlogActionType.js → UnreadCountsResponse.js} +0 -0
  408. /package/dist/types/{NotificationDataType.js → VoteSettings.js} +0 -0
package/dist/http.js CHANGED
@@ -19,11 +19,12 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
19
19
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
20
20
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
21
21
  };
22
- var _LemmyHttp_instances, _LemmyHttp_apiUrl, _LemmyHttp_headers, _LemmyHttp_fetchFunction, _LemmyHttp_buildFullUrl, _LemmyHttp_upload, _LemmyHttp_uploadWithQuery, _LemmyHttp_wrapper;
22
+ var _LemmyController_instances, _LemmyController_apiUrl, _LemmyController_headers, _LemmyController_fetchFunction, _LemmyController_buildFullUrl;
23
23
  Object.defineProperty(exports, "__esModule", { value: true });
24
- exports.LemmyError = exports.LemmyHttp = void 0;
24
+ exports.LemmyError = exports.NodeInfoHttp = exports.LemmyHttp = void 0;
25
25
  const runtime_1 = require("@tsoa/runtime");
26
26
  const other_types_1 = require("./other_types");
27
+ const map_request_state_1 = require("./map_request_state");
27
28
  var HttpType;
28
29
  (function (HttpType) {
29
30
  HttpType["Get"] = "GET";
@@ -31,10 +32,7 @@ var HttpType;
31
32
  HttpType["Put"] = "PUT";
32
33
  HttpType["Delete"] = "DELETE";
33
34
  })(HttpType || (HttpType = {}));
34
- /**
35
- * Helps build lemmy HTTP requests.
36
- */
37
- let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
35
+ class LemmyController extends runtime_1.Controller {
38
36
  /**
39
37
  * Generates a new instance of LemmyHttp.
40
38
  * @param baseUrl the base url, without the vX version: https://lemmy.ml -> goes to https://lemmy.ml/api/vX
@@ -42,56 +40,148 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
42
40
  */
43
41
  constructor(baseUrl, options) {
44
42
  super();
45
- _LemmyHttp_instances.add(this);
46
- _LemmyHttp_apiUrl.set(this, void 0);
47
- _LemmyHttp_headers.set(this, {});
48
- _LemmyHttp_fetchFunction.set(this, fetch.bind(globalThis));
49
- __classPrivateFieldSet(this, _LemmyHttp_apiUrl, `${baseUrl.replace(/\/+$/, "")}/api/${other_types_1.VERSION}`, "f");
43
+ _LemmyController_instances.add(this);
44
+ _LemmyController_apiUrl.set(this, void 0);
45
+ _LemmyController_headers.set(this, {});
46
+ _LemmyController_fetchFunction.set(this, fetch.bind(globalThis));
47
+ __classPrivateFieldSet(this, _LemmyController_apiUrl, `${baseUrl.replace(/\/+$/, "")}/api/${other_types_1.VERSION}`, "f");
50
48
  if (options?.headers) {
51
- __classPrivateFieldSet(this, _LemmyHttp_headers, options.headers, "f");
49
+ __classPrivateFieldSet(this, _LemmyController_headers, options.headers, "f");
52
50
  }
53
51
  if (options?.fetchFunction) {
54
- __classPrivateFieldSet(this, _LemmyHttp_fetchFunction, options.fetchFunction, "f");
52
+ __classPrivateFieldSet(this, _LemmyController_fetchFunction, options.fetchFunction, "f");
53
+ }
54
+ }
55
+ async upload(path, { image }, options) {
56
+ let error;
57
+ let result;
58
+ try {
59
+ const formData = createFormData(image);
60
+ const response = await __classPrivateFieldGet(this, _LemmyController_fetchFunction, "f").call(this, __classPrivateFieldGet(this, _LemmyController_instances, "m", _LemmyController_buildFullUrl).call(this, path), {
61
+ ...options,
62
+ method: HttpType.Post,
63
+ body: formData,
64
+ headers: __classPrivateFieldGet(this, _LemmyController_headers, "f"),
65
+ });
66
+ if (!response.ok) {
67
+ console.error(`Request error while uploading to ${path}`);
68
+ const json2 = (await response.json());
69
+ const err = new LemmyError(json2.error ?? response.statusText, response.status, json2.message ?? "");
70
+ throw err;
71
+ }
72
+ else {
73
+ result = (await response.json());
74
+ }
75
+ }
76
+ catch (err) {
77
+ // eslint-disable-next-line @typescript-eslint/restrict-plus-operands
78
+ error = err instanceof Error ? err : new Error("" + err);
79
+ }
80
+ return (0, map_request_state_1.mapToRequestState)(result, error);
81
+ }
82
+ async uploadWithQuery(path, query, { image }, options) {
83
+ return this.upload(`${path}?${encodeGetParams(query)}`, { image }, options);
84
+ }
85
+ async wrapper(type_, endpoint, form, options, noPrefix = false) {
86
+ let error;
87
+ let result;
88
+ try {
89
+ const url = noPrefix ? endpoint : __classPrivateFieldGet(this, _LemmyController_instances, "m", _LemmyController_buildFullUrl).call(this, endpoint);
90
+ let response;
91
+ if (type_ === HttpType.Get) {
92
+ const getUrl = `${url}?${encodeGetParams(form)}`;
93
+ response = await __classPrivateFieldGet(this, _LemmyController_fetchFunction, "f").call(this, getUrl, {
94
+ ...options,
95
+ method: HttpType.Get,
96
+ headers: __classPrivateFieldGet(this, _LemmyController_headers, "f"),
97
+ });
98
+ }
99
+ else {
100
+ response = await __classPrivateFieldGet(this, _LemmyController_fetchFunction, "f").call(this, url, {
101
+ ...options,
102
+ method: type_,
103
+ headers: {
104
+ "Content-Type": "application/json",
105
+ ...__classPrivateFieldGet(this, _LemmyController_headers, "f"),
106
+ },
107
+ body: JSON.stringify(form),
108
+ });
109
+ }
110
+ let json;
111
+ try {
112
+ json = await response.json();
113
+ }
114
+ catch {
115
+ throw new LemmyError(response.statusText, response.status);
116
+ }
117
+ if (!response.ok) {
118
+ console.error(`Request error while calling ${type_} ${endpoint} with ${JSON.stringify(form)}`);
119
+ const json2 = json;
120
+ const err = new LemmyError(json2.error ?? response.statusText, response.status, json2.message ?? "");
121
+ throw err;
122
+ }
123
+ else {
124
+ result = json;
125
+ }
126
+ }
127
+ catch (err) {
128
+ // eslint-disable-next-line @typescript-eslint/restrict-plus-operands
129
+ error = err instanceof Error ? err : new Error("" + err);
55
130
  }
131
+ return (0, map_request_state_1.mapToRequestState)(result, error);
56
132
  }
133
+ /**
134
+ * Set the headers (can be used to set the auth header)
135
+ */
136
+ setHeaders(headers) {
137
+ __classPrivateFieldSet(this, _LemmyController_headers, headers, "f");
138
+ }
139
+ }
140
+ _LemmyController_apiUrl = new WeakMap(), _LemmyController_headers = new WeakMap(), _LemmyController_fetchFunction = new WeakMap(), _LemmyController_instances = new WeakSet(), _LemmyController_buildFullUrl = function _LemmyController_buildFullUrl(endpoint) {
141
+ return `${__classPrivateFieldGet(this, _LemmyController_apiUrl, "f")}${endpoint}`;
142
+ };
143
+ /**
144
+ * Helps build lemmy HTTP requests.
145
+ */
146
+ let LemmyHttp = class LemmyHttp extends LemmyController {
57
147
  /**
58
148
  * @summary Gets the site, and your user data.
59
149
  */
60
150
  async getSite(options) {
61
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/site", {}, options);
151
+ return this.wrapper(HttpType.Get, "/site", {}, options);
62
152
  }
63
153
  /**
64
154
  * @summary Create your site.
65
155
  */
66
156
  async createSite(form, options) {
67
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/site", form, options);
157
+ return this.wrapper(HttpType.Post, "/site", form, options);
68
158
  }
69
159
  /**
70
160
  * @summary Edit your site.
71
161
  */
72
162
  async editSite(form, options) {
73
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/site", form, options);
163
+ return this.wrapper(HttpType.Put, "/site", form, options);
74
164
  }
75
165
  /**
76
166
  * @summary Leave the Site admins.
77
167
  */
78
168
  async leaveAdmin(options) {
79
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/admin/leave", {}, options);
169
+ return this.wrapper(HttpType.Post, "/admin/leave", {}, options);
80
170
  }
81
171
  /**
82
172
  * @summary Generate a TOTP / two-factor secret.
83
173
  *
84
174
  * Generate a TOTP / two-factor secret.
85
- * Afterwards you need to call `/account/auth/totp/update` with a valid token to enable it.
175
+ * Afterwards you need to call `/account/auth/totp/edit` with a valid token to enable it.
86
176
  */
87
177
  async generateTotpSecret(options) {
88
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/auth/totp/generate", {}, options);
178
+ return this.wrapper(HttpType.Post, "/account/auth/totp/generate", {}, options);
89
179
  }
90
180
  /**
91
181
  * @summary Get data of current user.
92
182
  */
93
183
  async getMyUser(options) {
94
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account", {}, options);
184
+ return this.wrapper(HttpType.Get, "/account", {}, options);
95
185
  }
96
186
  /**
97
187
  * @summary Export a backup of your user settings.
@@ -99,50 +189,50 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
99
189
  * Export a backup of your user settings, including your saved content,
100
190
  * followed communities, and blocks.
101
191
  */
102
- async exportSettings(options) {
103
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/settings/export", {}, options);
192
+ async exportUserSettings(options) {
193
+ return this.wrapper(HttpType.Get, "/account/settings/export", {}, options);
104
194
  }
105
195
  /**
106
196
  * @summary Import a backup of your user settings.
107
197
  */
108
- async importSettings(form, options) {
109
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/settings/import", form, options);
198
+ async importUserSettings(form, options) {
199
+ return this.wrapper(HttpType.Post, "/account/settings/import", form, options);
110
200
  }
111
201
  /**
112
202
  * @summary List login tokens for your user
113
203
  */
114
204
  async listLogins(options) {
115
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/list_logins", {}, options);
205
+ return this.wrapper(HttpType.Get, "/account/login/list", {}, options);
116
206
  }
117
207
  /**
118
208
  * @summary Returns an error message if your auth token is invalid
119
209
  */
120
210
  async validateAuth(options) {
121
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/validate_auth", {}, options);
211
+ return this.wrapper(HttpType.Get, "/account/validate_auth", {}, options);
122
212
  }
123
213
  /**
124
214
  * @summary List all the media for your account.
125
215
  */
126
216
  async listMedia(form = {}, options) {
127
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/media/list", form, options);
217
+ return this.wrapper(HttpType.Get, "/account/media/list", form, options);
128
218
  }
129
219
  /**
130
220
  * @summary Delete media for your account.
131
221
  */
132
222
  async deleteMedia(form, options) {
133
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/account/media", form, options);
223
+ return this.wrapper(HttpType.Delete, "/account/media", form, options);
134
224
  }
135
225
  /**
136
226
  * @summary Delete any media. (Admin only)
137
227
  */
138
- async deleteMediaAdmin(form, options) {
139
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/image", form, options);
228
+ async adminDeleteMedia(form, options) {
229
+ return this.wrapper(HttpType.Delete, "/image", form, options);
140
230
  }
141
231
  /**
142
232
  * @summary List all the media known to your instance.
143
233
  */
144
- async listMediaAdmin(form = {}, options) {
145
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/image/list", form, options);
234
+ async adminListMedia(form = {}, options) {
235
+ return this.wrapper(HttpType.Get, "/image/list", form, options);
146
236
  }
147
237
  /**
148
238
  * @summary Enable / Disable TOTP / two-factor authentication.
@@ -151,880 +241,837 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
151
241
  *
152
242
  * Disabling is only possible if 2FA was previously enabled. Again it is necessary to pass a valid token.
153
243
  */
154
- async updateTotp(form, options) {
155
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/auth/totp/update", form, options);
244
+ async editTotp(form, options) {
245
+ return this.wrapper(HttpType.Post, "/account/auth/totp/edit", form, options);
156
246
  }
157
247
  /**
158
248
  * @summary Get the modlog.
159
249
  */
160
250
  async getModlog(form = {}, options) {
161
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/modlog", form, options);
251
+ return this.wrapper(HttpType.Get, "/modlog", form, options);
162
252
  }
163
253
  /**
164
254
  * @summary Search lemmy. If `search_term` is a url it also attempts to fetch it, just like `resolve_object`.
165
255
  */
166
256
  async search(form, options) {
167
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/search", form, options);
257
+ return this.wrapper(HttpType.Get, "/search", form, options);
168
258
  }
169
259
  /**
170
260
  * @summary Fetch a non-local / federated object.
171
261
  */
172
262
  async resolveObject(form, options) {
173
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/resolve_object", form, options);
263
+ return this.wrapper(HttpType.Get, "/resolve_object", form, options);
174
264
  }
175
265
  /**
176
266
  * @summary Create a new community.
177
267
  */
178
268
  async createCommunity(form, options) {
179
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/community", form, options);
269
+ return this.wrapper(HttpType.Post, "/community", form, options);
180
270
  }
181
271
  /**
182
272
  * @summary Get / fetch a community.
183
273
  */
184
274
  async getCommunity(form = {}, options) {
185
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/community", form, options);
275
+ return this.wrapper(HttpType.Get, "/community", form, options);
186
276
  }
187
277
  /**
188
278
  * @summary Edit a community.
189
279
  */
190
280
  async editCommunity(form, options) {
191
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/community", form, options);
281
+ return this.wrapper(HttpType.Put, "/community", form, options);
192
282
  }
193
283
  /**
194
284
  * @summary List communities, with various filters.
195
285
  */
196
286
  async listCommunities(form = {}, options) {
197
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/community/list", form, options);
287
+ return this.wrapper(HttpType.Get, "/community/list", form, options);
198
288
  }
199
289
  /**
200
290
  * @summary Follow / subscribe to a community.
201
291
  */
202
292
  async followCommunity(form, options) {
203
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/community/follow", form, options);
293
+ return this.wrapper(HttpType.Post, "/community/follow", form, options);
204
294
  }
205
295
  /**
206
- * @summary Get a community's pending follows count.
296
+ * @summary Returns the amount of unread items of various types. For normal users this means * the number of unread notifications, mods and admins get additional unread counts for
297
+ * reports, registration applications and pending follows to private communities.
207
298
  */
208
- async getCommunityPendingFollowsCount(form, options) {
209
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/community/pending_follows/count", form, options);
299
+ async getUnreadCounts(options) {
300
+ return this.wrapper(HttpType.Get, "/account/unread_counts", {}, options);
210
301
  }
211
302
  /**
212
303
  * @summary Get a community's pending followers.
213
304
  */
214
305
  async listCommunityPendingFollows(form, options) {
215
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/community/pending_follows/list", form, options);
306
+ return this.wrapper(HttpType.Get, "/community/pending_follows/list", form, options);
216
307
  }
217
308
  /**
218
309
  * @summary Approve a community pending follow request.
219
310
  */
220
311
  async approveCommunityPendingFollow(form, options) {
221
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/community/pending_follows/approve", form, options);
312
+ return this.wrapper(HttpType.Post, "/community/pending_follows/approve", form, options);
222
313
  }
223
314
  /**
224
315
  * @summary Block a community.
225
316
  */
226
317
  async blockCommunity(form, options) {
227
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/block/community", form, options);
318
+ return this.wrapper(HttpType.Post, "/account/block/community", form, options);
228
319
  }
229
320
  /**
230
321
  * @summary Delete a community.
231
322
  */
232
323
  async deleteCommunity(form, options) {
233
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/community/delete", form, options);
324
+ return this.wrapper(HttpType.Delete, "/community", form, options);
234
325
  }
235
326
  /**
236
327
  * @summary Hide a community from public / "All" view. Admins only.
237
328
  */
238
329
  async hideCommunity(form, options) {
239
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/community/hide", form, options);
330
+ return this.wrapper(HttpType.Put, "/community/hide", form, options);
240
331
  }
241
332
  /**
242
333
  * @summary A moderator remove for a community.
243
334
  */
244
335
  async removeCommunity(form, options) {
245
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/community/remove", form, options);
336
+ return this.wrapper(HttpType.Post, "/community/remove", form, options);
246
337
  }
247
338
  /**
248
339
  * @summary Transfer your community to an existing moderator.
249
340
  */
250
341
  async transferCommunity(form, options) {
251
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/community/transfer", form, options);
342
+ return this.wrapper(HttpType.Post, "/community/transfer", form, options);
252
343
  }
253
344
  /**
254
345
  * @summary Ban a user from a community.
255
346
  */
256
347
  async banFromCommunity(form, options) {
257
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/community/ban_user", form, options);
348
+ return this.wrapper(HttpType.Post, "/community/ban_user", form, options);
258
349
  }
259
350
  /**
260
351
  * @summary Add a moderator to your community.
261
352
  */
262
353
  async addModToCommunity(form, options) {
263
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/community/mod", form, options);
354
+ return this.wrapper(HttpType.Post, "/community/mod", form, options);
264
355
  }
265
356
  /**
266
357
  * @summary Get a random community.
267
358
  */
268
359
  async getRandomCommunity(form, options) {
269
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/community/random", form, options);
360
+ return this.wrapper(HttpType.Get, "/community/random", form, options);
270
361
  }
271
362
  /**
272
363
  * @summary Create a report for a community.
273
364
  */
274
365
  async createCommunityReport(form, options) {
275
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/community/report", form, options);
366
+ return this.wrapper(HttpType.Post, "/community/report", form, options);
276
367
  }
277
368
  /**
278
369
  * @summary Resolve a report for a private message.
279
370
  */
280
371
  async resolveCommunityReport(form, options) {
281
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/community/report/resolve", form, options);
372
+ return this.wrapper(HttpType.Put, "/community/report/resolve", form, options);
282
373
  }
283
374
  /**
284
375
  * @summary Create a post.
285
376
  */
286
377
  async createPost(form, options) {
287
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/post", form, options);
378
+ return this.wrapper(HttpType.Post, "/post", form, options);
288
379
  }
289
380
  /**
290
381
  * @summary Get / fetch a post.
291
382
  */
292
383
  async getPost(form = {}, options) {
293
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/post", form, options);
384
+ return this.wrapper(HttpType.Get, "/post", form, options);
294
385
  }
295
386
  /**
296
387
  * @summary Edit a post.
297
388
  */
298
389
  async editPost(form, options) {
299
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/post", form, options);
390
+ return this.wrapper(HttpType.Put, "/post", form, options);
300
391
  }
301
392
  /**
302
393
  * @summary Mods can change nsfw flag and tags for a post
303
394
  */
304
395
  async modEditPost(form, options) {
305
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/post/mod_update", form, options);
396
+ return this.wrapper(HttpType.Put, "/post/mod_edit", form, options);
397
+ }
398
+ /**
399
+ * @summary Creates a warning against a post and notifies the user.
400
+ */
401
+ async warnPost(form, options) {
402
+ return this.wrapper(HttpType.Post, "/post/warn", form, options);
306
403
  }
307
404
  /**
308
405
  * @summary Delete a post.
309
406
  */
310
407
  async deletePost(form, options) {
311
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/post/delete", form, options);
408
+ return this.wrapper(HttpType.Delete, "/post", form, options);
312
409
  }
313
410
  /**
314
411
  * @summary A moderator remove for a post.
315
412
  */
316
413
  async removePost(form, options) {
317
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/post/remove", form, options);
414
+ return this.wrapper(HttpType.Post, "/post/remove", form, options);
318
415
  }
319
416
  /**
320
417
  * @summary Mark a post as read.
321
418
  */
322
419
  async markPostAsRead(form, options) {
323
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/post/mark_as_read", form, options);
420
+ return this.wrapper(HttpType.Post, "/post/mark_as_read", form, options);
324
421
  }
325
422
  /**
326
423
  * @summary Mark multiple posts as read.
327
424
  */
328
- async markManyPostAsRead(form, options) {
329
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/post/mark_as_read/many", form, options);
425
+ async markManyPostsAsRead(form, options) {
426
+ return this.wrapper(HttpType.Post, "/post/mark_as_read/many", form, options);
330
427
  }
331
428
  /**
332
429
  * @summary Hide a post from list views.
333
430
  */
334
431
  async hidePost(form, options) {
335
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/post/hide", form, options);
432
+ return this.wrapper(HttpType.Post, "/post/hide", form, options);
336
433
  }
337
434
  /**
338
435
  * @summary A moderator can lock a post ( IE disable new comments ).
339
436
  */
340
437
  async lockPost(form, options) {
341
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/post/lock", form, options);
438
+ return this.wrapper(HttpType.Post, "/post/lock", form, options);
342
439
  }
343
440
  /**
344
441
  * @summary A moderator can feature a community post ( IE stick it to the top of a community ).
345
442
  */
346
443
  async featurePost(form, options) {
347
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/post/feature", form, options);
444
+ return this.wrapper(HttpType.Post, "/post/feature", form, options);
348
445
  }
349
446
  /**
350
447
  * @summary Get / fetch posts, with various filters.
351
448
  */
352
449
  async getPosts(form = {}, options) {
353
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/post/list", form, options);
450
+ return this.wrapper(HttpType.Get, "/post/list", form, options);
354
451
  }
355
452
  /**
356
453
  * @summary Like / vote on a post.
357
454
  */
358
455
  async likePost(form, options) {
359
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/post/like", form, options);
456
+ return this.wrapper(HttpType.Post, "/post/like", form, options);
360
457
  }
361
458
  /**
362
459
  * @summary List a post's likes. Admin-only.
363
460
  */
364
461
  async listPostLikes(form, options) {
365
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/post/like/list", form, options);
462
+ return this.wrapper(HttpType.Get, "/post/like/list", form, options);
366
463
  }
367
464
  /**
368
465
  * @summary Save a post.
369
466
  */
370
467
  async savePost(form, options) {
371
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/post/save", form, options);
468
+ return this.wrapper(HttpType.Put, "/post/save", form, options);
372
469
  }
373
470
  /**
374
471
  * @summary Report a post.
375
472
  */
376
473
  async createPostReport(form, options) {
377
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/post/report", form, options);
474
+ return this.wrapper(HttpType.Post, "/post/report", form, options);
378
475
  }
379
476
  /**
380
477
  * @summary Resolve a post report. Only a mod can do this.
381
478
  */
382
479
  async resolvePostReport(form, options) {
383
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/post/report/resolve", form, options);
480
+ return this.wrapper(HttpType.Put, "/post/report/resolve", form, options);
384
481
  }
385
482
  /**
386
483
  * @summary Fetch metadata for any given site.
387
484
  */
388
485
  async getSiteMetadata(form, options) {
389
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/post/site_metadata", form, options);
486
+ return this.wrapper(HttpType.Get, "/post/site_metadata", form, options);
390
487
  }
391
488
  /**
392
489
  * @summary Create a comment.
393
490
  */
394
491
  async createComment(form, options) {
395
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/comment", form, options);
492
+ return this.wrapper(HttpType.Post, "/comment", form, options);
396
493
  }
397
494
  /**
398
495
  * @summary Edit a comment.
399
496
  */
400
497
  async editComment(form, options) {
401
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/comment", form, options);
498
+ return this.wrapper(HttpType.Put, "/comment", form, options);
402
499
  }
403
500
  /**
404
501
  * @summary Delete a comment.
405
502
  */
406
503
  async deleteComment(form, options) {
407
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/comment/delete", form, options);
504
+ return this.wrapper(HttpType.Delete, "/comment", form, options);
408
505
  }
409
506
  /**
410
507
  * @summary A moderator remove for a comment.
411
508
  */
412
509
  async removeComment(form, options) {
413
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/comment/remove", form, options);
510
+ return this.wrapper(HttpType.Post, "/comment/remove", form, options);
414
511
  }
415
512
  /**
416
513
  * @summary A moderator can lock a comment (IE disable replies).
417
514
  */
418
515
  async lockComment(form, options) {
419
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/comment/lock", form, options);
516
+ return this.wrapper(HttpType.Post, "/comment/lock", form, options);
420
517
  }
421
518
  /**
422
519
  * @Summary Like / vote on a comment.
423
520
  */
424
521
  async likeComment(form, options) {
425
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/comment/like", form, options);
522
+ return this.wrapper(HttpType.Post, "/comment/like", form, options);
426
523
  }
427
524
  /**
428
525
  * @summary List a comment's likes. Admin-only.
429
526
  */
430
527
  async listCommentLikes(form, options) {
431
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/comment/like/list", form, options);
528
+ return this.wrapper(HttpType.Get, "/comment/like/list", form, options);
432
529
  }
433
530
  /**
434
531
  * @summary Save a comment.
435
532
  */
436
533
  async saveComment(form, options) {
437
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/comment/save", form, options);
534
+ return this.wrapper(HttpType.Put, "/comment/save", form, options);
438
535
  }
439
536
  /**
440
537
  * @summary Distinguishes a comment (speak as moderator)
441
538
  */
442
539
  async distinguishComment(form, options) {
443
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/comment/distinguish", form, options);
540
+ return this.wrapper(HttpType.Post, "/comment/distinguish", form, options);
444
541
  }
445
542
  /**
446
543
  * @summary Get / fetch comments.
447
544
  */
448
545
  async getComments(form = {}, options) {
449
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/comment/list", form, options);
546
+ return this.wrapper(HttpType.Get, "/comment/list", form, options);
450
547
  }
451
548
  /**
452
549
  * @summary Get / fetch comments, but without the post or community.
453
550
  */
454
551
  async getCommentsSlim(form = {}, options) {
455
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/comment/list/slim", form, options);
552
+ return this.wrapper(HttpType.Get, "/comment/list/slim", form, options);
456
553
  }
457
554
  /**
458
555
  * @summary Get / fetch comment.
459
556
  */
460
557
  async getComment(form, options) {
461
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/comment", form, options);
558
+ return this.wrapper(HttpType.Get, "/comment", form, options);
559
+ }
560
+ /**
561
+ * @summary Creates a warning against a comment and notifies the user.
562
+ */
563
+ async warnComment(form, options) {
564
+ return this.wrapper(HttpType.Post, "/comment/warn", form, options);
462
565
  }
463
566
  /**
464
567
  * @summary Report a comment.
465
568
  */
466
569
  async createCommentReport(form, options) {
467
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/comment/report", form, options);
570
+ return this.wrapper(HttpType.Post, "/comment/report", form, options);
468
571
  }
469
572
  /**
470
573
  * @summary Resolve a comment report. Only a mod can do this.
471
574
  */
472
575
  async resolveCommentReport(form, options) {
473
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/comment/report/resolve", form, options);
576
+ return this.wrapper(HttpType.Put, "/comment/report/resolve", form, options);
474
577
  }
475
578
  /**
476
579
  * @summary Create a private message.
477
580
  */
478
581
  async createPrivateMessage(form, options) {
479
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/private_message", form, options);
582
+ return this.wrapper(HttpType.Post, "/private_message", form, options);
480
583
  }
481
584
  /**
482
585
  * @summary Edit a private message.
483
586
  */
484
587
  async editPrivateMessage(form, options) {
485
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/private_message", form, options);
588
+ return this.wrapper(HttpType.Put, "/private_message", form, options);
486
589
  }
487
590
  /**
488
591
  * @summary Delete a private message.
489
592
  */
490
593
  async deletePrivateMessage(form, options) {
491
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/private_message/delete", form, options);
594
+ return this.wrapper(HttpType.Delete, "/private_message", form, options);
492
595
  }
493
596
  /**
494
597
  * @summary Create a report for a private message.
495
598
  */
496
599
  async createPrivateMessageReport(form, options) {
497
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/private_message/report", form, options);
600
+ return this.wrapper(HttpType.Post, "/private_message/report", form, options);
498
601
  }
499
602
  /**
500
603
  * @summary Resolve a report for a private message.
501
604
  */
502
605
  async resolvePrivateMessageReport(form, options) {
503
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/private_message/report/resolve", form, options);
606
+ return this.wrapper(HttpType.Put, "/private_message/report/resolve", form, options);
504
607
  }
505
608
  /**
506
609
  * @summary Register a new user.
507
610
  */
508
611
  async register(form, options) {
509
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/auth/register", form, options);
612
+ return this.wrapper(HttpType.Post, "/account/auth/register", form, options);
510
613
  }
511
614
  /**
512
615
  * @summary Log into lemmy.
513
616
  */
514
617
  async login(form, options) {
515
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/auth/login", form, options);
618
+ return this.wrapper(HttpType.Post, "/account/auth/login", form, options);
516
619
  }
517
620
  /**
518
621
  * @summary Invalidate the currently used auth token.
519
622
  */
520
623
  async logout(options) {
521
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/auth/logout", {}, options);
624
+ return this.wrapper(HttpType.Post, "/account/auth/logout", {}, options);
522
625
  }
523
626
  /**
524
627
  * @summary Get the details for a person.
525
628
  */
526
629
  async getPersonDetails(form = {}, options) {
527
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/person", form, options);
630
+ return this.wrapper(HttpType.Get, "/person", form, options);
528
631
  }
529
632
  /**
530
633
  * @summary List the content for a person.
531
634
  */
532
635
  async listPersonContent(form = {}, options) {
533
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/person/content", form, options);
636
+ return this.wrapper(HttpType.Get, "/person/content", form, options);
534
637
  }
535
638
  /**
536
639
  * @summary Make a note for a person.
537
640
  */
538
641
  async notePerson(form, options) {
539
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/person/note", form, options);
642
+ return this.wrapper(HttpType.Post, "/person/note", form, options);
643
+ }
644
+ /**
645
+ * @summary List persons.
646
+ */
647
+ async listPersons(form = {}, options) {
648
+ return this.wrapper(HttpType.Get, "/person/list", form, options);
540
649
  }
541
650
  /**
542
651
  * @summary Ban a person from your site.
543
652
  */
544
653
  async banPerson(form, options) {
545
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/admin/ban", form, options);
654
+ return this.wrapper(HttpType.Post, "/admin/ban", form, options);
546
655
  }
547
656
  /**
548
657
  * @summary Get a list of users.
549
658
  */
550
- async listUsers(form = {}, options) {
551
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/admin/users", form, options);
659
+ async adminListUsers(form = {}, options) {
660
+ return this.wrapper(HttpType.Get, "/admin/users", form, options);
552
661
  }
553
662
  /**
554
663
  * @summary Block a person.
555
664
  */
556
665
  async blockPerson(form, options) {
557
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/block/person", form, options);
666
+ return this.wrapper(HttpType.Post, "/account/block/person", form, options);
558
667
  }
559
668
  /**
560
669
  * @summary Fetch a Captcha.
561
670
  */
562
671
  async getCaptcha(options) {
563
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/auth/get_captcha", {}, options);
672
+ return this.wrapper(HttpType.Get, "/account/auth/get_captcha", {}, options);
564
673
  }
565
674
  /**
566
675
  * @summary Delete your account.
567
676
  */
568
677
  async deleteAccount(form, options) {
569
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/delete", form, options);
678
+ return this.wrapper(HttpType.Delete, "/account", form, options);
570
679
  }
571
680
  /**
572
681
  * @summary Reset your password.
573
682
  */
574
- async passwordReset(form, options) {
575
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/auth/password_reset", form, options);
683
+ async resetPassword(form, options) {
684
+ return this.wrapper(HttpType.Post, "/account/auth/password_reset", form, options);
576
685
  }
577
686
  /**
578
687
  * @summary Change your password from an email / token based reset.
579
688
  */
580
- async passwordChangeAfterReset(form, options) {
581
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/auth/password_change", form, options);
689
+ async changePasswordAfterReset(form, options) {
690
+ return this.wrapper(HttpType.Post, "/account/auth/password_change", form, options);
582
691
  }
583
692
  /**
584
- * @summary Mark all replies as read.
693
+ * @summary Mark all notifications as read.
585
694
  */
586
695
  async markAllNotificationsAsRead(options) {
587
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/mark_as_read/all", {}, options);
696
+ return this.wrapper(HttpType.Post, "/account/notification/mark_as_read/all", {}, options);
588
697
  }
589
698
  /**
590
- * @summary Mark a comment as read.
699
+ * @summary Mark a notification as read.
591
700
  */
592
701
  async markNotificationAsRead(form, options) {
593
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/mark_as_read", form, options);
702
+ return this.wrapper(HttpType.Post, "/account/notification/mark_as_read", form, options);
594
703
  }
595
704
  /**
596
705
  * @summary Save your user settings.
597
706
  */
598
707
  async saveUserSettings(form, options) {
599
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/account/settings/save", form, options);
708
+ return this.wrapper(HttpType.Put, "/account/settings/save", form, options);
600
709
  }
601
710
  /**
602
711
  * @summary Change your user password.
603
712
  */
604
713
  async changePassword(form, options) {
605
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/account/auth/change_password", form, options);
606
- }
607
- /**
608
- * @summary Get counts for your reports.
609
- */
610
- async getReportCount(form, options) {
611
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/report_count", form, options);
612
- }
613
- /**
614
- * @summary Get your unread counts.
615
- */
616
- async getUnreadCount(options) {
617
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/unread_count", {}, options);
714
+ return this.wrapper(HttpType.Put, "/account/auth/change_password", form, options);
618
715
  }
619
716
  /**
620
717
  * @summary Get your inbox (replies, comment mentions, post mentions, and messages)
621
718
  */
622
719
  async listNotifications(form, options) {
623
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/notifications", form, options);
720
+ return this.wrapper(HttpType.Get, "/account/notification/list", form, options);
624
721
  }
625
722
  /**
626
723
  * @summary Verify your email
627
724
  */
628
725
  async verifyEmail(form, options) {
629
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/auth/verify_email", form, options);
726
+ return this.wrapper(HttpType.Post, "/account/auth/verify_email", form, options);
630
727
  }
631
728
  /**
632
729
  * @summary Resend a verification email.
633
730
  */
634
731
  async resendVerificationEmail(form, options) {
635
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/auth/resend_verification_email", form, options);
732
+ return this.wrapper(HttpType.Post, "/account/auth/resend_verification_email", form, options);
636
733
  }
637
734
  /**
638
735
  * @summary List your saved content.
639
736
  */
640
737
  async listPersonSaved(form, options) {
641
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/saved", form, options);
738
+ return this.wrapper(HttpType.Get, "/account/saved", form, options);
642
739
  }
643
740
  /**
644
741
  * @summary List your read content.
645
742
  */
646
743
  async listPersonRead(form, options) {
647
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/read", form, options);
744
+ return this.wrapper(HttpType.Get, "/account/read", form, options);
648
745
  }
649
746
  /**
650
747
  * @summary List your hidden content.
651
748
  */
652
749
  async listPersonHidden(form, options) {
653
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/hidden", form, options);
750
+ return this.wrapper(HttpType.Get, "/account/hidden", form, options);
654
751
  }
655
752
  /**
656
753
  * @summary List your liked content.
657
754
  */
658
755
  async listPersonLiked(form, options) {
659
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/liked", form, options);
756
+ return this.wrapper(HttpType.Get, "/account/liked", form, options);
660
757
  }
661
758
  /**
662
759
  * @summary Add an admin to your site.
663
760
  */
664
761
  async addAdmin(form, options) {
665
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/admin/add", form, options);
666
- }
667
- /**
668
- * @summary Get the unread registration applications count.
669
- */
670
- async getUnreadRegistrationApplicationCount(options) {
671
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/admin/registration_application/count", {}, options);
762
+ return this.wrapper(HttpType.Post, "/admin/add", form, options);
672
763
  }
673
764
  /**
674
765
  * @summary List the registration applications.
675
766
  */
676
767
  async listRegistrationApplications(form, options) {
677
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/admin/registration_application/list", form, options);
768
+ return this.wrapper(HttpType.Get, "/admin/registration_application/list", form, options);
678
769
  }
679
770
  /**
680
771
  * @summary Approve a registration application
681
772
  */
682
773
  async approveRegistrationApplication(form, options) {
683
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/admin/registration_application/approve", form, options);
774
+ return this.wrapper(HttpType.Put, "/admin/registration_application/approve", form, options);
684
775
  }
685
776
  /**
686
777
  * @summary Get the application a user submitted when they first registered their account
687
778
  */
688
779
  async getRegistrationApplication(form, options) {
689
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/admin/registration_application", form, options);
780
+ return this.wrapper(HttpType.Get, "/admin/registration_application", form, options);
690
781
  }
691
782
  /**
692
783
  * @summary Purge / Delete a person from the database.
693
784
  */
694
785
  async purgePerson(form, options) {
695
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/admin/purge/person", form, options);
786
+ return this.wrapper(HttpType.Post, "/admin/purge/person", form, options);
696
787
  }
697
788
  /**
698
789
  * @summary Purge / Delete a community from the database.
699
790
  */
700
791
  async purgeCommunity(form, options) {
701
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/admin/purge/community", form, options);
792
+ return this.wrapper(HttpType.Post, "/admin/purge/community", form, options);
702
793
  }
703
794
  /**
704
795
  * @summary Purge / Delete a post from the database.
705
796
  */
706
797
  async purgePost(form, options) {
707
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/admin/purge/post", form, options);
798
+ return this.wrapper(HttpType.Post, "/admin/purge/post", form, options);
708
799
  }
709
800
  /**
710
801
  * @summary Purge / Delete a comment from the database.
711
802
  */
712
803
  async purgeComment(form, options) {
713
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/admin/purge/comment", form, options);
804
+ return this.wrapper(HttpType.Post, "/admin/purge/comment", form, options);
714
805
  }
715
806
  /**
716
807
  * @summary Create a new custom emoji.
717
808
  */
718
809
  async createCustomEmoji(form, options) {
719
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/custom_emoji", form, options);
810
+ return this.wrapper(HttpType.Post, "/custom_emoji", form, options);
720
811
  }
721
812
  /**
722
813
  * @summary Edit an existing custom emoji.
723
814
  */
724
815
  async editCustomEmoji(form, options) {
725
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/custom_emoji", form, options);
816
+ return this.wrapper(HttpType.Put, "/custom_emoji", form, options);
726
817
  }
727
818
  /**
728
819
  * @summary Delete a custom emoji.
729
820
  */
730
821
  async deleteCustomEmoji(form, options) {
731
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/custom_emoji/delete", form, options);
822
+ return this.wrapper(HttpType.Post, "/custom_emoji/delete", form, options);
732
823
  }
733
824
  /**
734
825
  * @summary List custom emojis
735
826
  */
736
827
  async listCustomEmojis(form, options) {
737
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/custom_emoji/list", form, options);
828
+ return this.wrapper(HttpType.Get, "/custom_emoji/list", form, options);
738
829
  }
739
830
  /**
740
831
  * @summary Create a new tagline
741
832
  */
742
833
  async createTagline(form, options) {
743
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/admin/tagline", form, options);
834
+ return this.wrapper(HttpType.Post, "/admin/tagline", form, options);
744
835
  }
745
836
  /**
746
837
  * @summary Edit an existing tagline
747
838
  */
748
839
  async editTagline(form, options) {
749
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/admin/tagline", form, options);
840
+ return this.wrapper(HttpType.Put, "/admin/tagline", form, options);
750
841
  }
751
842
  /**
752
843
  * @summary Delete a tagline
753
844
  */
754
845
  async deleteTagline(form, options) {
755
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/admin/tagline/delete", form, options);
846
+ return this.wrapper(HttpType.Delete, "/admin/tagline", form, options);
756
847
  }
757
848
  /**
758
849
  * @summary List taglines.
759
850
  */
760
851
  async listTaglines(form, options) {
761
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/admin/tagline/list", form, options);
852
+ return this.wrapper(HttpType.Get, "/admin/tagline/list", form, options);
762
853
  }
763
854
  /**
764
855
  * @summary Create a community post tag.
765
856
  */
766
- createCommunityTag(form, options) {
767
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/community/tag", form, options);
857
+ async createCommunityTag(form, options) {
858
+ return this.wrapper(HttpType.Post, "/community/tag", form, options);
768
859
  }
769
860
  /**
770
861
  * @summary Edit a community post tag.
771
862
  */
772
- updateCommunityTag(form, options) {
773
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/community/tag", form, options);
863
+ async editCommunityTag(form, options) {
864
+ return this.wrapper(HttpType.Put, "/community/tag", form, options);
774
865
  }
775
866
  /**
776
867
  * @summary Delete a post tag in a community.
777
868
  */
778
- deleteCommunityTag(form, options) {
779
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/community/tag", form, options);
869
+ async deleteCommunityTag(form, options) {
870
+ return this.wrapper(HttpType.Delete, "/community/tag", form, options);
780
871
  }
781
872
  /**
782
873
  * @summary Create a new oauth provider method
783
874
  */
784
875
  async createOAuthProvider(form, options) {
785
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/oauth_provider", form, options);
876
+ return this.wrapper(HttpType.Post, "/oauth_provider", form, options);
786
877
  }
787
878
  /**
788
879
  * @summary Edit an existing oauth provider method
789
880
  */
790
881
  async editOAuthProvider(form, options) {
791
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/oauth_provider", form, options);
882
+ return this.wrapper(HttpType.Put, "/oauth_provider", form, options);
792
883
  }
793
884
  /**
794
885
  * @summary Delete an oauth provider method
795
886
  */
796
887
  async deleteOAuthProvider(form, options) {
797
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/oauth_provider/delete", form, options);
888
+ return this.wrapper(HttpType.Delete, "/oauth_provider", form, options);
798
889
  }
799
890
  /**
800
891
  * @summary Authenticate with OAuth
801
892
  */
802
893
  async authenticateWithOAuth(form, options) {
803
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/oauth/authenticate", form, options);
894
+ return this.wrapper(HttpType.Post, "/oauth/authenticate", form, options);
804
895
  }
805
896
  /**
806
897
  * @summary Fetch federated instances.
807
898
  */
808
- async getFederatedInstances(options) {
809
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/federated_instances", {}, options);
899
+ async getFederatedInstances(form, options) {
900
+ return this.wrapper(HttpType.Get, "/federated_instances", form, options);
810
901
  }
811
902
  /**
812
903
  * @summary List user reports.
813
904
  */
814
905
  async listReports(form, options) {
815
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/report/list", form, options);
906
+ return this.wrapper(HttpType.Get, "/report/list", form, options);
816
907
  }
817
908
  /**
818
909
  * @summary Block an instance's communities as a user.
819
910
  */
820
911
  async userBlockInstanceCommunities(form, options) {
821
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/block/instance/communities", form, options);
912
+ return this.wrapper(HttpType.Post, "/account/block/instance/communities", form, options);
822
913
  }
823
914
  /**
824
915
  * @summary Block an instance's persons as a user.
825
916
  */
826
917
  async userBlockInstancePersons(form, options) {
827
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/block/instance/persons", form, options);
918
+ return this.wrapper(HttpType.Post, "/account/block/instance/persons", form, options);
828
919
  }
829
920
  /**
830
921
  * @summary Globally block an instance as admin.
831
922
  */
832
923
  async adminBlockInstance(form, options) {
833
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/admin/instance/block", form, options);
924
+ return this.wrapper(HttpType.Post, "/admin/instance/block", form, options);
834
925
  }
835
926
  /**
836
927
  * @summary Globally allow an instance as admin.
837
928
  */
838
929
  async adminAllowInstance(form, options) {
839
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/admin/instance/allow", form, options);
930
+ return this.wrapper(HttpType.Post, "/admin/instance/allow", form, options);
840
931
  }
841
932
  /**
842
933
  * @summary Upload new user avatar.
843
934
  */
844
935
  async uploadUserAvatar(image, options) {
845
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_upload).call(this, "/account/avatar", image, options);
936
+ return this.upload("/account/avatar", image, options);
846
937
  }
847
938
  /**
848
939
  * @summary Delete the user avatar.
849
940
  */
850
941
  async deleteUserAvatar(options) {
851
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/account/avatar", {}, options);
942
+ return this.wrapper(HttpType.Delete, "/account/avatar", {}, options);
852
943
  }
853
944
  /**
854
945
  * @summary Upload new user banner.
855
946
  */
856
947
  async uploadUserBanner(image, options) {
857
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_upload).call(this, "/account/banner", image, options);
948
+ return this.upload("/account/banner", image, options);
858
949
  }
859
950
  /**
860
951
  * @summary Delete the user banner.
861
952
  */
862
953
  async deleteUserBanner(options) {
863
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/account/banner", {}, options);
954
+ return this.wrapper(HttpType.Delete, "/account/banner", {}, options);
864
955
  }
865
956
  /**
866
957
  * @summary Upload new community icon.
867
958
  */
868
959
  async uploadCommunityIcon(query, image, options) {
869
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_uploadWithQuery).call(this, "/community/icon", query, image, options);
960
+ return this.uploadWithQuery("/community/icon", query, image, options);
870
961
  }
871
962
  /**
872
963
  * @summary Delete the community icon.
873
964
  */
874
965
  async deleteCommunityIcon(form, options) {
875
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/community/icon", form, options);
966
+ return this.wrapper(HttpType.Delete, "/community/icon", form, options);
876
967
  }
877
968
  /**
878
969
  * @summary Upload new community banner.
879
970
  */
880
971
  async uploadCommunityBanner(query, image, options) {
881
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_uploadWithQuery).call(this, "/community/banner", query, image, options);
972
+ return this.uploadWithQuery("/community/banner", query, image, options);
882
973
  }
883
974
  /**
884
975
  * @summary Delete the community banner.
885
976
  */
886
977
  async deleteCommunityBanner(form, options) {
887
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/community/banner", form, options);
978
+ return this.wrapper(HttpType.Delete, "/community/banner", form, options);
888
979
  }
889
980
  /**
890
981
  * @summary Upload new site icon.
891
982
  */
892
983
  async uploadSiteIcon(image, options) {
893
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_upload).call(this, "/site/icon", image, options);
984
+ return this.upload("/site/icon", image, options);
894
985
  }
895
986
  /**
896
987
  * @summary Delete the site icon.
897
988
  */
898
989
  async deleteSiteIcon(options) {
899
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/site/icon", {}, options);
990
+ return this.wrapper(HttpType.Delete, "/site/icon", {}, options);
900
991
  }
901
992
  /**
902
993
  * @summary Upload new site banner.
903
994
  */
904
995
  async uploadSiteBanner(image, options) {
905
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_upload).call(this, "/site/banner", image, options);
996
+ return this.upload("/site/banner", image, options);
906
997
  }
907
998
  /**
908
999
  * @summary Delete the site banner.
909
1000
  */
910
1001
  async deleteSiteBanner(options) {
911
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/site/banner", {}, options);
1002
+ return this.wrapper(HttpType.Delete, "/site/banner", {}, options);
912
1003
  }
913
1004
  /**
914
1005
  * @summary Upload an image to the server.
915
1006
  */
916
1007
  async uploadImage(image, options) {
917
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_upload).call(this, "/image", image, options);
1008
+ return this.upload("/image", image, options);
918
1009
  }
919
1010
  /**
920
1011
  * @summary Health check for image functionality
921
1012
  */
922
1013
  async imageHealth(options) {
923
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/image/health", {}, options);
1014
+ return this.wrapper(HttpType.Get, "/image/health", {}, options);
924
1015
  }
925
1016
  /**
926
- * Mark donation dialog as shown, so it isn't displayed anymore.
1017
+ * Mark the donation dialog as shown, so it isn't displayed anymore.
927
1018
  */
928
- donationDialogShown(options) {
929
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/donation_dialog_shown", {}, options);
1019
+ async markDonationDialogShown(options) {
1020
+ return this.wrapper(HttpType.Post, "/account/donation_dialog_shown", {}, options);
930
1021
  }
931
- createMultiCommunity(form, options) {
932
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/multi_community", form, options);
1022
+ async createMultiCommunity(form, options) {
1023
+ return this.wrapper(HttpType.Post, "/multi_community", form, options);
933
1024
  }
934
- updateMultiCommunity(form, options) {
935
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/multi_community", form, options);
1025
+ async editMultiCommunity(form, options) {
1026
+ return this.wrapper(HttpType.Put, "/multi_community", form, options);
936
1027
  }
937
- getMultiCommunity(form, options) {
938
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/multi_community", form, options);
1028
+ async getMultiCommunity(form, options) {
1029
+ return this.wrapper(HttpType.Get, "/multi_community", form, options);
939
1030
  }
940
- createMultiCommunityEntry(form, options) {
941
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/multi_community/entry", form, options);
1031
+ async createMultiCommunityEntry(form, options) {
1032
+ return this.wrapper(HttpType.Post, "/multi_community/entry", form, options);
942
1033
  }
943
- deleteMultiCommunityEntry(form, options) {
944
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/multi_community/entry", form, options);
1034
+ async deleteMultiCommunityEntry(form, options) {
1035
+ return this.wrapper(HttpType.Delete, "/multi_community/entry", form, options);
945
1036
  }
946
- listMultiCommunities(form, options) {
947
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/multi_community/list", form, options);
1037
+ async listMultiCommunities(form, options) {
1038
+ return this.wrapper(HttpType.Get, "/multi_community/list", form, options);
948
1039
  }
949
- followMultiCommunity(form, options) {
950
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/multi_community/follow", form, options);
1040
+ async followMultiCommunity(form, options) {
1041
+ return this.wrapper(HttpType.Post, "/multi_community/follow", form, options);
951
1042
  }
952
1043
  /**
953
1044
  * @summary Change notification settings for a community
954
1045
  */
955
- updateCommunityNotifications(form, options) {
956
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/community/notifications", form, options);
1046
+ async editCommunityNotifications(form, options) {
1047
+ return this.wrapper(HttpType.Put, "/community/notifications", form, options);
957
1048
  }
958
1049
  /**
959
1050
  * @summary Change notification settings for a post
960
1051
  */
961
- updatePostNotifications(form, options) {
962
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/post/notifications", form, options);
1052
+ async editPostNotifications(form, options) {
1053
+ return this.wrapper(HttpType.Put, "/post/notifications", form, options);
963
1054
  }
964
1055
  /**
965
- * Set the headers (can be used to set the auth header)
1056
+ * @summary Create a new registration invitation
966
1057
  */
967
- setHeaders(headers) {
968
- __classPrivateFieldSet(this, _LemmyHttp_headers, headers, "f");
969
- }
970
- };
971
- exports.LemmyHttp = LemmyHttp;
972
- _LemmyHttp_apiUrl = new WeakMap();
973
- _LemmyHttp_headers = new WeakMap();
974
- _LemmyHttp_fetchFunction = new WeakMap();
975
- _LemmyHttp_instances = new WeakSet();
976
- _LemmyHttp_buildFullUrl = function _LemmyHttp_buildFullUrl(endpoint) {
977
- return `${__classPrivateFieldGet(this, _LemmyHttp_apiUrl, "f")}${endpoint}`;
978
- };
979
- _LemmyHttp_upload = async function _LemmyHttp_upload(path, { image }, options) {
980
- const formData = createFormData(image);
981
- const response = await __classPrivateFieldGet(this, _LemmyHttp_fetchFunction, "f").call(this, __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_buildFullUrl).call(this, path), {
982
- ...options,
983
- method: HttpType.Post,
984
- body: formData,
985
- headers: __classPrivateFieldGet(this, _LemmyHttp_headers, "f"),
986
- });
987
- return response.json();
988
- };
989
- _LemmyHttp_uploadWithQuery = async function _LemmyHttp_uploadWithQuery(path, query, { image }, options) {
990
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_upload).call(this, `${path}?${encodeGetParams(query)}`, { image }, options);
991
- };
992
- _LemmyHttp_wrapper = async function _LemmyHttp_wrapper(type_, endpoint, form, options) {
993
- let response;
994
- if (type_ === HttpType.Get) {
995
- const getUrl = `${__classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_buildFullUrl).call(this, endpoint)}?${encodeGetParams(form)}`;
996
- response = await __classPrivateFieldGet(this, _LemmyHttp_fetchFunction, "f").call(this, getUrl, {
997
- ...options,
998
- method: HttpType.Get,
999
- headers: __classPrivateFieldGet(this, _LemmyHttp_headers, "f"),
1000
- });
1058
+ async createRegistrationInvitation(form, options) {
1059
+ return this.wrapper(HttpType.Post, "/account/invite", form, options);
1001
1060
  }
1002
- else {
1003
- response = await __classPrivateFieldGet(this, _LemmyHttp_fetchFunction, "f").call(this, __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_buildFullUrl).call(this, endpoint), {
1004
- ...options,
1005
- method: type_,
1006
- headers: {
1007
- "Content-Type": "application/json",
1008
- ...__classPrivateFieldGet(this, _LemmyHttp_headers, "f"),
1009
- },
1010
- body: JSON.stringify(form),
1011
- });
1012
- }
1013
- let json = undefined;
1014
- try {
1015
- json = await response.json();
1016
- }
1017
- catch {
1018
- throw new LemmyError(response.statusText);
1019
- }
1020
- if (!response.ok) {
1021
- let err = new LemmyError(json.error ?? response.statusText, json.message);
1022
- throw err;
1061
+ /**
1062
+ * @summary Revoke a previously created registration invitation
1063
+ */
1064
+ async revokeRegistrationInvitation(form, options) {
1065
+ return this.wrapper(HttpType.Delete, "/account/invite", form, options);
1023
1066
  }
1024
- else {
1025
- return json;
1067
+ /**
1068
+ * @summary Revoke a previously created registration invitation
1069
+ */
1070
+ async listRegistrationInvitations(form, options) {
1071
+ return this.wrapper(HttpType.Get, "/account/invite/list", form, options);
1026
1072
  }
1027
1073
  };
1074
+ exports.LemmyHttp = LemmyHttp;
1028
1075
  __decorate([
1029
1076
  (0, runtime_1.Security)("bearerAuth"),
1030
1077
  (0, runtime_1.Security)({}),
@@ -1069,17 +1116,17 @@ __decorate([
1069
1116
  (0, runtime_1.Get)("/account/settings/export"),
1070
1117
  (0, runtime_1.Tags)("Account"),
1071
1118
  __param(0, (0, runtime_1.Inject)())
1072
- ], LemmyHttp.prototype, "exportSettings", null);
1119
+ ], LemmyHttp.prototype, "exportUserSettings", null);
1073
1120
  __decorate([
1074
1121
  (0, runtime_1.Security)("bearerAuth"),
1075
1122
  (0, runtime_1.Post)("/account/settings/import"),
1076
1123
  (0, runtime_1.Tags)("Account"),
1077
1124
  __param(0, (0, runtime_1.Body)()),
1078
1125
  __param(1, (0, runtime_1.Inject)())
1079
- ], LemmyHttp.prototype, "importSettings", null);
1126
+ ], LemmyHttp.prototype, "importUserSettings", null);
1080
1127
  __decorate([
1081
1128
  (0, runtime_1.Security)("bearerAuth"),
1082
- (0, runtime_1.Get)("/account/list_logins"),
1129
+ (0, runtime_1.Get)("/account/login/list"),
1083
1130
  (0, runtime_1.Tags)("Account"),
1084
1131
  __param(0, (0, runtime_1.Inject)())
1085
1132
  ], LemmyHttp.prototype, "listLogins", null);
@@ -1100,30 +1147,30 @@ __decorate([
1100
1147
  (0, runtime_1.Security)("bearerAuth"),
1101
1148
  (0, runtime_1.Delete)("/account/media"),
1102
1149
  (0, runtime_1.Tags)("Account", "Media"),
1103
- __param(0, (0, runtime_1.Queries)()),
1150
+ __param(0, (0, runtime_1.Body)()),
1104
1151
  __param(1, (0, runtime_1.Inject)())
1105
1152
  ], LemmyHttp.prototype, "deleteMedia", null);
1106
1153
  __decorate([
1107
1154
  (0, runtime_1.Security)("bearerAuth"),
1108
1155
  (0, runtime_1.Delete)("/image"),
1109
1156
  (0, runtime_1.Tags)("Admin", "Media"),
1110
- __param(0, (0, runtime_1.Queries)()),
1157
+ __param(0, (0, runtime_1.Body)()),
1111
1158
  __param(1, (0, runtime_1.Inject)())
1112
- ], LemmyHttp.prototype, "deleteMediaAdmin", null);
1159
+ ], LemmyHttp.prototype, "adminDeleteMedia", null);
1113
1160
  __decorate([
1114
1161
  (0, runtime_1.Security)("bearerAuth"),
1115
1162
  (0, runtime_1.Get)("/image/list"),
1116
1163
  (0, runtime_1.Tags)("Admin", "Media"),
1117
1164
  __param(0, (0, runtime_1.Queries)()),
1118
1165
  __param(1, (0, runtime_1.Inject)())
1119
- ], LemmyHttp.prototype, "listMediaAdmin", null);
1166
+ ], LemmyHttp.prototype, "adminListMedia", null);
1120
1167
  __decorate([
1121
1168
  (0, runtime_1.Security)("bearerAuth"),
1122
- (0, runtime_1.Post)("/account/auth/totp/update"),
1169
+ (0, runtime_1.Post)("/account/auth/totp/edit"),
1123
1170
  (0, runtime_1.Tags)("Account"),
1124
1171
  __param(0, (0, runtime_1.Body)()),
1125
1172
  __param(1, (0, runtime_1.Inject)())
1126
- ], LemmyHttp.prototype, "updateTotp", null);
1173
+ ], LemmyHttp.prototype, "editTotp", null);
1127
1174
  __decorate([
1128
1175
  (0, runtime_1.Security)("bearerAuth"),
1129
1176
  (0, runtime_1.Security)({}),
@@ -1188,11 +1235,10 @@ __decorate([
1188
1235
  ], LemmyHttp.prototype, "followCommunity", null);
1189
1236
  __decorate([
1190
1237
  (0, runtime_1.Security)("bearerAuth"),
1191
- (0, runtime_1.Get)("/community/pending_follows/count"),
1192
- (0, runtime_1.Tags)("Community"),
1193
- __param(0, (0, runtime_1.Queries)()),
1194
- __param(1, (0, runtime_1.Inject)())
1195
- ], LemmyHttp.prototype, "getCommunityPendingFollowsCount", null);
1238
+ (0, runtime_1.Get)("/account/unread_counts"),
1239
+ (0, runtime_1.Tags)("Account"),
1240
+ __param(0, (0, runtime_1.Inject)())
1241
+ ], LemmyHttp.prototype, "getUnreadCounts", null);
1196
1242
  __decorate([
1197
1243
  (0, runtime_1.Security)("bearerAuth"),
1198
1244
  (0, runtime_1.Get)("/community/pending_follows/list"),
@@ -1216,7 +1262,7 @@ __decorate([
1216
1262
  ], LemmyHttp.prototype, "blockCommunity", null);
1217
1263
  __decorate([
1218
1264
  (0, runtime_1.Security)("bearerAuth"),
1219
- (0, runtime_1.Post)("/community/delete"),
1265
+ (0, runtime_1.Delete)("/community"),
1220
1266
  (0, runtime_1.Tags)("Community"),
1221
1267
  __param(0, (0, runtime_1.Body)()),
1222
1268
  __param(1, (0, runtime_1.Inject)())
@@ -1302,14 +1348,21 @@ __decorate([
1302
1348
  ], LemmyHttp.prototype, "editPost", null);
1303
1349
  __decorate([
1304
1350
  (0, runtime_1.Security)("bearerAuth"),
1305
- (0, runtime_1.Put)("/post/mod_update"),
1351
+ (0, runtime_1.Put)("/post/mod_edit"),
1306
1352
  (0, runtime_1.Tags)("Post"),
1307
1353
  __param(0, (0, runtime_1.Body)()),
1308
1354
  __param(1, (0, runtime_1.Inject)())
1309
1355
  ], LemmyHttp.prototype, "modEditPost", null);
1310
1356
  __decorate([
1311
1357
  (0, runtime_1.Security)("bearerAuth"),
1312
- (0, runtime_1.Post)("/post/delete"),
1358
+ (0, runtime_1.Post)("/post/warn"),
1359
+ (0, runtime_1.Tags)("Post"),
1360
+ __param(0, (0, runtime_1.Body)()),
1361
+ __param(1, (0, runtime_1.Inject)())
1362
+ ], LemmyHttp.prototype, "warnPost", null);
1363
+ __decorate([
1364
+ (0, runtime_1.Security)("bearerAuth"),
1365
+ (0, runtime_1.Delete)("/post"),
1313
1366
  (0, runtime_1.Tags)("Post"),
1314
1367
  __param(0, (0, runtime_1.Body)()),
1315
1368
  __param(1, (0, runtime_1.Inject)())
@@ -1334,7 +1387,7 @@ __decorate([
1334
1387
  (0, runtime_1.Tags)("Post"),
1335
1388
  __param(0, (0, runtime_1.Body)()),
1336
1389
  __param(1, (0, runtime_1.Inject)())
1337
- ], LemmyHttp.prototype, "markManyPostAsRead", null);
1390
+ ], LemmyHttp.prototype, "markManyPostsAsRead", null);
1338
1391
  __decorate([
1339
1392
  (0, runtime_1.Security)("bearerAuth"),
1340
1393
  (0, runtime_1.Post)("/post/hide"),
@@ -1422,7 +1475,7 @@ __decorate([
1422
1475
  ], LemmyHttp.prototype, "editComment", null);
1423
1476
  __decorate([
1424
1477
  (0, runtime_1.Security)("bearerAuth"),
1425
- (0, runtime_1.Post)("/comment/delete"),
1478
+ (0, runtime_1.Delete)("/comment"),
1426
1479
  (0, runtime_1.Tags)("Comment"),
1427
1480
  __param(0, (0, runtime_1.Body)()),
1428
1481
  __param(1, (0, runtime_1.Inject)())
@@ -1493,6 +1546,13 @@ __decorate([
1493
1546
  __param(0, (0, runtime_1.Queries)()),
1494
1547
  __param(1, (0, runtime_1.Inject)())
1495
1548
  ], LemmyHttp.prototype, "getComment", null);
1549
+ __decorate([
1550
+ (0, runtime_1.Security)("bearerAuth"),
1551
+ (0, runtime_1.Post)("/comment/warn"),
1552
+ (0, runtime_1.Tags)("Comment"),
1553
+ __param(0, (0, runtime_1.Body)()),
1554
+ __param(1, (0, runtime_1.Inject)())
1555
+ ], LemmyHttp.prototype, "warnComment", null);
1496
1556
  __decorate([
1497
1557
  (0, runtime_1.Security)("bearerAuth"),
1498
1558
  (0, runtime_1.Post)("/comment/report"),
@@ -1523,7 +1583,7 @@ __decorate([
1523
1583
  ], LemmyHttp.prototype, "editPrivateMessage", null);
1524
1584
  __decorate([
1525
1585
  (0, runtime_1.Security)("bearerAuth"),
1526
- (0, runtime_1.Post)("/private_message/delete"),
1586
+ (0, runtime_1.Delete)("/private_message"),
1527
1587
  (0, runtime_1.Tags)("PrivateMessage"),
1528
1588
  __param(0, (0, runtime_1.Body)()),
1529
1589
  __param(1, (0, runtime_1.Inject)())
@@ -1583,6 +1643,14 @@ __decorate([
1583
1643
  __param(0, (0, runtime_1.Body)()),
1584
1644
  __param(1, (0, runtime_1.Inject)())
1585
1645
  ], LemmyHttp.prototype, "notePerson", null);
1646
+ __decorate([
1647
+ (0, runtime_1.Security)("bearerAuth"),
1648
+ (0, runtime_1.Security)({}),
1649
+ (0, runtime_1.Get)("/person/list"),
1650
+ (0, runtime_1.Tags)("Person"),
1651
+ __param(0, (0, runtime_1.Queries)()),
1652
+ __param(1, (0, runtime_1.Inject)())
1653
+ ], LemmyHttp.prototype, "listPersons", null);
1586
1654
  __decorate([
1587
1655
  (0, runtime_1.Security)("bearerAuth"),
1588
1656
  (0, runtime_1.Post)("/admin/ban"),
@@ -1596,7 +1664,7 @@ __decorate([
1596
1664
  (0, runtime_1.Tags)("Admin", "Miscellaneous"),
1597
1665
  __param(0, (0, runtime_1.Queries)()),
1598
1666
  __param(1, (0, runtime_1.Inject)())
1599
- ], LemmyHttp.prototype, "listUsers", null);
1667
+ ], LemmyHttp.prototype, "adminListUsers", null);
1600
1668
  __decorate([
1601
1669
  (0, runtime_1.Security)("bearerAuth"),
1602
1670
  (0, runtime_1.Post)("/account/block/person"),
@@ -1611,7 +1679,7 @@ __decorate([
1611
1679
  ], LemmyHttp.prototype, "getCaptcha", null);
1612
1680
  __decorate([
1613
1681
  (0, runtime_1.Security)("bearerAuth"),
1614
- (0, runtime_1.Post)("/account/delete"),
1682
+ (0, runtime_1.Delete)("/account"),
1615
1683
  (0, runtime_1.Tags)("Account"),
1616
1684
  __param(0, (0, runtime_1.Body)()),
1617
1685
  __param(1, (0, runtime_1.Inject)())
@@ -1622,23 +1690,23 @@ __decorate([
1622
1690
  (0, runtime_1.Tags)("Account"),
1623
1691
  __param(0, (0, runtime_1.Body)()),
1624
1692
  __param(1, (0, runtime_1.Inject)())
1625
- ], LemmyHttp.prototype, "passwordReset", null);
1693
+ ], LemmyHttp.prototype, "resetPassword", null);
1626
1694
  __decorate([
1627
1695
  (0, runtime_1.Security)("bearerAuth"),
1628
1696
  (0, runtime_1.Post)("/account/auth/password_change"),
1629
1697
  (0, runtime_1.Tags)("Account"),
1630
1698
  __param(0, (0, runtime_1.Body)()),
1631
1699
  __param(1, (0, runtime_1.Inject)())
1632
- ], LemmyHttp.prototype, "passwordChangeAfterReset", null);
1700
+ ], LemmyHttp.prototype, "changePasswordAfterReset", null);
1633
1701
  __decorate([
1634
1702
  (0, runtime_1.Security)("bearerAuth"),
1635
- (0, runtime_1.Post)("/account/mark_as_read/all"),
1703
+ (0, runtime_1.Post)("/account/notification/mark_as_read/all"),
1636
1704
  (0, runtime_1.Tags)("Account"),
1637
1705
  __param(0, (0, runtime_1.Inject)())
1638
1706
  ], LemmyHttp.prototype, "markAllNotificationsAsRead", null);
1639
1707
  __decorate([
1640
1708
  (0, runtime_1.Security)("bearerAuth"),
1641
- (0, runtime_1.Post)("/account/mark_as_read"),
1709
+ (0, runtime_1.Post)("/account/notification/mark_as_read"),
1642
1710
  (0, runtime_1.Tags)("Account"),
1643
1711
  __param(0, (0, runtime_1.Body)()),
1644
1712
  __param(1, (0, runtime_1.Inject)())
@@ -1659,20 +1727,7 @@ __decorate([
1659
1727
  ], LemmyHttp.prototype, "changePassword", null);
1660
1728
  __decorate([
1661
1729
  (0, runtime_1.Security)("bearerAuth"),
1662
- (0, runtime_1.Get)("/account/report_count"),
1663
- (0, runtime_1.Tags)("Account"),
1664
- __param(0, (0, runtime_1.Queries)()),
1665
- __param(1, (0, runtime_1.Inject)())
1666
- ], LemmyHttp.prototype, "getReportCount", null);
1667
- __decorate([
1668
- (0, runtime_1.Security)("bearerAuth"),
1669
- (0, runtime_1.Get)("/account/unread_count"),
1670
- (0, runtime_1.Tags)("Account"),
1671
- __param(0, (0, runtime_1.Inject)())
1672
- ], LemmyHttp.prototype, "getUnreadCount", null);
1673
- __decorate([
1674
- (0, runtime_1.Security)("bearerAuth"),
1675
- (0, runtime_1.Get)("/account/notifications"),
1730
+ (0, runtime_1.Get)("/account/notification/list"),
1676
1731
  (0, runtime_1.Tags)("Account"),
1677
1732
  __param(0, (0, runtime_1.Queries)()),
1678
1733
  __param(1, (0, runtime_1.Inject)())
@@ -1724,12 +1779,6 @@ __decorate([
1724
1779
  __param(0, (0, runtime_1.Body)()),
1725
1780
  __param(1, (0, runtime_1.Inject)())
1726
1781
  ], LemmyHttp.prototype, "addAdmin", null);
1727
- __decorate([
1728
- (0, runtime_1.Security)("bearerAuth"),
1729
- (0, runtime_1.Get)("/admin/registration_application/count"),
1730
- (0, runtime_1.Tags)("Admin"),
1731
- __param(0, (0, runtime_1.Inject)())
1732
- ], LemmyHttp.prototype, "getUnreadRegistrationApplicationCount", null);
1733
1782
  __decorate([
1734
1783
  (0, runtime_1.Security)("bearerAuth"),
1735
1784
  (0, runtime_1.Get)("/admin/registration_application/list"),
@@ -1824,7 +1873,7 @@ __decorate([
1824
1873
  ], LemmyHttp.prototype, "editTagline", null);
1825
1874
  __decorate([
1826
1875
  (0, runtime_1.Security)("bearerAuth"),
1827
- (0, runtime_1.Post)("/admin/tagline/delete"),
1876
+ (0, runtime_1.Delete)("/admin/tagline"),
1828
1877
  (0, runtime_1.Tags)("Admin", "Tagline"),
1829
1878
  __param(0, (0, runtime_1.Body)()),
1830
1879
  __param(1, (0, runtime_1.Inject)())
@@ -1850,7 +1899,7 @@ __decorate([
1850
1899
  (0, runtime_1.Tags)("Community"),
1851
1900
  __param(0, (0, runtime_1.Body)()),
1852
1901
  __param(1, (0, runtime_1.Inject)())
1853
- ], LemmyHttp.prototype, "updateCommunityTag", null);
1902
+ ], LemmyHttp.prototype, "editCommunityTag", null);
1854
1903
  __decorate([
1855
1904
  (0, runtime_1.Security)("bearerAuth"),
1856
1905
  (0, runtime_1.Delete)("/community/tag"),
@@ -1874,7 +1923,7 @@ __decorate([
1874
1923
  ], LemmyHttp.prototype, "editOAuthProvider", null);
1875
1924
  __decorate([
1876
1925
  (0, runtime_1.Security)("bearerAuth"),
1877
- (0, runtime_1.Post)("/oauth_provider/delete"),
1926
+ (0, runtime_1.Delete)("/oauth_provider"),
1878
1927
  (0, runtime_1.Tags)("Miscellaneous", "OAuth"),
1879
1928
  __param(0, (0, runtime_1.Body)()),
1880
1929
  __param(1, (0, runtime_1.Inject)())
@@ -1889,7 +1938,8 @@ __decorate([
1889
1938
  __decorate([
1890
1939
  (0, runtime_1.Get)("/federated_instances"),
1891
1940
  (0, runtime_1.Tags)("Miscellaneous"),
1892
- __param(0, (0, runtime_1.Inject)())
1941
+ __param(0, (0, runtime_1.Queries)()),
1942
+ __param(1, (0, runtime_1.Inject)())
1893
1943
  ], LemmyHttp.prototype, "getFederatedInstances", null);
1894
1944
  __decorate([
1895
1945
  (0, runtime_1.Security)("bearerAuth"),
@@ -2025,7 +2075,7 @@ __decorate([
2025
2075
  (0, runtime_1.Post)("/account/donation_dialog_shown"),
2026
2076
  (0, runtime_1.Tags)("Account"),
2027
2077
  __param(0, (0, runtime_1.Inject)())
2028
- ], LemmyHttp.prototype, "donationDialogShown", null);
2078
+ ], LemmyHttp.prototype, "markDonationDialogShown", null);
2029
2079
  __decorate([
2030
2080
  (0, runtime_1.Security)("bearerAuth"),
2031
2081
  (0, runtime_1.Post)("/multi_community"),
@@ -2039,7 +2089,7 @@ __decorate([
2039
2089
  (0, runtime_1.Tags)("Multicommunity"),
2040
2090
  __param(0, (0, runtime_1.Body)()),
2041
2091
  __param(1, (0, runtime_1.Inject)())
2042
- ], LemmyHttp.prototype, "updateMultiCommunity", null);
2092
+ ], LemmyHttp.prototype, "editMultiCommunity", null);
2043
2093
  __decorate([
2044
2094
  (0, runtime_1.Get)("/multi_community"),
2045
2095
  (0, runtime_1.Tags)("Multicommunity"),
@@ -2078,17 +2128,55 @@ __decorate([
2078
2128
  (0, runtime_1.Tags)("Community"),
2079
2129
  __param(0, (0, runtime_1.Body)()),
2080
2130
  __param(1, (0, runtime_1.Inject)())
2081
- ], LemmyHttp.prototype, "updateCommunityNotifications", null);
2131
+ ], LemmyHttp.prototype, "editCommunityNotifications", null);
2082
2132
  __decorate([
2083
2133
  (0, runtime_1.Security)("bearerAuth"),
2084
2134
  (0, runtime_1.Put)("/post/notifications"),
2085
2135
  (0, runtime_1.Tags)("Post"),
2086
2136
  __param(0, (0, runtime_1.Body)()),
2087
2137
  __param(1, (0, runtime_1.Inject)())
2088
- ], LemmyHttp.prototype, "updatePostNotifications", null);
2138
+ ], LemmyHttp.prototype, "editPostNotifications", null);
2139
+ __decorate([
2140
+ (0, runtime_1.Security)("bearerAuth"),
2141
+ (0, runtime_1.Post)("/account/invite"),
2142
+ (0, runtime_1.Tags)("Account"),
2143
+ __param(0, (0, runtime_1.Body)()),
2144
+ __param(1, (0, runtime_1.Inject)())
2145
+ ], LemmyHttp.prototype, "createRegistrationInvitation", null);
2146
+ __decorate([
2147
+ (0, runtime_1.Security)("bearerAuth"),
2148
+ (0, runtime_1.Delete)("/account/invite"),
2149
+ (0, runtime_1.Tags)("Account"),
2150
+ __param(0, (0, runtime_1.Body)()),
2151
+ __param(1, (0, runtime_1.Inject)())
2152
+ ], LemmyHttp.prototype, "revokeRegistrationInvitation", null);
2153
+ __decorate([
2154
+ (0, runtime_1.Security)("bearerAuth"),
2155
+ (0, runtime_1.Get)("/account/invite/list"),
2156
+ (0, runtime_1.Tags)("Account"),
2157
+ __param(0, (0, runtime_1.Queries)()),
2158
+ __param(1, (0, runtime_1.Inject)())
2159
+ ], LemmyHttp.prototype, "listRegistrationInvitations", null);
2089
2160
  exports.LemmyHttp = LemmyHttp = __decorate([
2090
2161
  (0, runtime_1.Route)("api/v4")
2091
2162
  ], LemmyHttp);
2163
+ let NodeInfoHttp = class NodeInfoHttp extends LemmyController {
2164
+ /**
2165
+ * @summary Metadata for the instance
2166
+ */
2167
+ async nodeinfo(options) {
2168
+ return this.wrapper(HttpType.Get, "/nodeinfo/2.1", {}, options, true);
2169
+ }
2170
+ };
2171
+ exports.NodeInfoHttp = NodeInfoHttp;
2172
+ __decorate([
2173
+ (0, runtime_1.Get)("/nodeinfo/2.1"),
2174
+ (0, runtime_1.Tags)("Site"),
2175
+ __param(0, (0, runtime_1.Inject)())
2176
+ ], NodeInfoHttp.prototype, "nodeinfo", null);
2177
+ exports.NodeInfoHttp = NodeInfoHttp = __decorate([
2178
+ (0, runtime_1.Route)("")
2179
+ ], NodeInfoHttp);
2092
2180
  function encodeGetParams(p) {
2093
2181
  return Object.entries(p)
2094
2182
  .filter(kv => kv[1] !== undefined && kv[1] !== null)
@@ -2096,7 +2184,7 @@ function encodeGetParams(p) {
2096
2184
  .join("&");
2097
2185
  }
2098
2186
  function createFormData(image) {
2099
- let formData = new FormData();
2187
+ const formData = new FormData();
2100
2188
  if (image instanceof File) {
2101
2189
  formData.append("images[]", image);
2102
2190
  }
@@ -2110,14 +2198,15 @@ function createFormData(image) {
2110
2198
  * A Lemmy error type.
2111
2199
  *
2112
2200
  * The name is the i18n translatable error code.
2113
- * The msg is either an empty string, or extra non-translatable info.
2201
+ * The message is either an empty string, or extra non-translatable info.
2114
2202
  */
2115
2203
  class LemmyError extends Error {
2116
- constructor(name, msg) {
2117
- super(msg ?? "");
2204
+ constructor(name, status, message = "", cause) {
2205
+ super();
2118
2206
  this.name = name;
2119
- // Set the prototype explicitly.
2120
- Object.setPrototypeOf(this, LemmyError.prototype);
2207
+ this.message = message;
2208
+ this.status = status;
2209
+ this.cause = cause;
2121
2210
  }
2122
2211
  }
2123
2212
  exports.LemmyError = LemmyError;