lemmy-js-client 1.0.0-alpha.0 → 1.0.0-api-updates-3.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 (321) hide show
  1. package/README.md +6 -0
  2. package/dist/http.d.ts +134 -53
  3. package/dist/http.js +521 -300
  4. package/dist/index.d.ts +71 -39
  5. package/dist/other_types.d.ts +22 -7
  6. package/dist/types/AdminAdd.d.ts +12 -0
  7. package/dist/types/AdminAddId.d.ts +1 -0
  8. package/dist/types/{ModAddView.d.ts → AdminAddView.d.ts} +3 -3
  9. package/dist/types/AdminAllowInstance.d.ts +2 -2
  10. package/dist/types/AdminAllowInstanceParams.d.ts +1 -1
  11. package/dist/types/AdminBan.d.ts +16 -0
  12. package/dist/types/AdminBanId.d.ts +1 -0
  13. package/dist/types/{ModBanView.d.ts → AdminBanView.d.ts} +3 -3
  14. package/dist/types/AdminBlockInstance.d.ts +3 -3
  15. package/dist/types/AdminBlockInstanceParams.d.ts +7 -2
  16. package/dist/types/AdminListUsers.d.ts +7 -0
  17. package/dist/types/{BannedPersonsResponse.d.ts → AdminListUsersResponse.d.ts} +4 -6
  18. package/dist/types/AdminPurgeComment.d.ts +2 -2
  19. package/dist/types/AdminPurgeCommunity.d.ts +2 -2
  20. package/dist/types/AdminPurgePerson.d.ts +2 -2
  21. package/dist/types/AdminPurgePost.d.ts +2 -2
  22. package/dist/types/{ModRemoveCommunity.d.ts → AdminRemoveCommunity.d.ts} +5 -5
  23. package/dist/types/AdminRemoveCommunityId.d.ts +1 -0
  24. package/dist/types/AdminRemoveCommunityView.d.ts +11 -0
  25. package/dist/types/AllLemmyErrors.d.ts +1 -0
  26. package/dist/types/AllLemmyErrors.js +117 -0
  27. package/dist/types/BanFromCommunity.d.ts +2 -2
  28. package/dist/types/BanPerson.d.ts +2 -2
  29. package/dist/types/Comment.d.ts +11 -2
  30. package/dist/types/CommentActions.d.ts +6 -10
  31. package/dist/types/CommentActions.js +1 -0
  32. package/dist/types/CommentReport.d.ts +2 -2
  33. package/dist/types/CommentReportView.d.ts +5 -1
  34. package/dist/types/CommentResponse.d.ts +0 -2
  35. package/dist/types/CommentSlimView.d.ts +3 -4
  36. package/dist/types/CommentSortType.d.ts +1 -1
  37. package/dist/types/CommentView.d.ts +7 -3
  38. package/dist/types/Community.d.ts +3 -2
  39. package/dist/types/CommunityActions.d.ts +11 -17
  40. package/dist/types/CommunityFollowerState.d.ts +1 -1
  41. package/dist/types/CommunityIdQuery.d.ts +8 -0
  42. package/dist/types/CommunityNotificationsMode.d.ts +4 -0
  43. package/dist/types/CommunityReport.d.ts +2 -2
  44. package/dist/types/CommunityReportView.d.ts +6 -0
  45. package/dist/types/CommunitySortType.d.ts +1 -1
  46. package/dist/types/CommunityView.d.ts +2 -2
  47. package/dist/types/CommunityVisibility.d.ts +1 -1
  48. package/dist/types/CreateCommentLike.d.ts +1 -4
  49. package/dist/types/CreateCommunityTag.d.ts +10 -0
  50. package/dist/types/CreateCustomEmoji.d.ts +2 -1
  51. package/dist/types/CreateCustomEmoji.js +0 -1
  52. package/dist/types/CreateMultiCommunity.d.ts +5 -0
  53. package/dist/types/CreateOrDeleteMultiCommunityEntry.d.ts +6 -0
  54. package/dist/types/CreatePost.d.ts +1 -1
  55. package/dist/types/CreatePostLike.d.ts +1 -4
  56. package/dist/types/CreateSite.d.ts +17 -15
  57. package/dist/types/CustomEmoji.d.ts +2 -2
  58. package/dist/types/DeleteCommunityTag.d.ts +7 -0
  59. package/dist/types/EditCustomEmoji.d.ts +7 -5
  60. package/dist/types/EditPost.d.ts +2 -2
  61. package/dist/types/EditSite.d.ts +30 -25
  62. package/dist/types/ExportDataResponse.d.ts +13 -0
  63. package/dist/types/FederationBlockList.d.ts +3 -3
  64. package/dist/types/FederationMode.d.ts +1 -1
  65. package/dist/types/FollowMultiCommunity.d.ts +5 -0
  66. package/dist/types/GetComments.d.ts +3 -3
  67. package/dist/types/GetCommentsResponse.d.ts +3 -0
  68. package/dist/types/GetCommentsSlimResponse.d.ts +3 -0
  69. package/dist/types/GetModlog.d.ts +1 -0
  70. package/dist/types/GetModlogResponse.d.ts +1 -0
  71. package/dist/types/GetMultiCommunity.d.ts +5 -0
  72. package/dist/types/GetMultiCommunityResponse.d.ts +6 -0
  73. package/dist/types/GetPosts.d.ts +5 -11
  74. package/dist/types/GetPostsResponse.d.ts +3 -2
  75. package/dist/types/GetSiteResponse.d.ts +2 -0
  76. package/dist/types/HideCommunity.d.ts +1 -1
  77. package/dist/types/Instance.d.ts +4 -3
  78. package/dist/types/InstanceActions.d.ts +14 -6
  79. package/dist/types/InstanceActions.js +1 -0
  80. package/dist/types/InstanceWithFederationState.d.ts +2 -2
  81. package/dist/types/LemmyErrorType.d.ts +45 -94
  82. package/dist/types/LikeType.d.ts +4 -0
  83. package/dist/types/LinkMetadata.d.ts +4 -0
  84. package/dist/types/ListCommentLikes.d.ts +3 -1
  85. package/dist/types/ListCommentLikesResponse.d.ts +6 -0
  86. package/dist/types/ListCommunities.d.ts +3 -1
  87. package/dist/types/ListCommunitiesResponse.d.ts +6 -0
  88. package/dist/types/ListCommunityPendingFollows.d.ts +4 -2
  89. package/dist/types/ListCommunityPendingFollows.js +0 -1
  90. package/dist/types/ListCommunityPendingFollowsResponse.d.ts +8 -2
  91. package/dist/types/ListCustomEmojis.d.ts +0 -3
  92. package/dist/types/ListMedia.d.ts +3 -1
  93. package/dist/types/ListMedia.js +0 -1
  94. package/dist/types/ListMediaResponse.d.ts +6 -0
  95. package/dist/types/ListMultiCommunities.d.ts +5 -0
  96. package/dist/types/ListMultiCommunitiesResponse.d.ts +4 -0
  97. package/dist/types/{ListInbox.d.ts → ListNotifications.d.ts} +4 -3
  98. package/dist/types/{ListInboxResponse.d.ts → ListNotificationsResponse.d.ts} +4 -3
  99. package/dist/types/ListPersonContent.d.ts +1 -0
  100. package/dist/types/ListPersonContentResponse.d.ts +1 -0
  101. package/dist/types/{ListBannedPersons.d.ts → ListPersonHidden.d.ts} +2 -2
  102. package/dist/types/ListPersonHiddenResponse.d.ts +13 -0
  103. package/dist/types/ListPersonLiked.d.ts +13 -0
  104. package/dist/types/ListPersonLikedResponse.d.ts +13 -0
  105. package/dist/types/ListPersonRead.d.ts +9 -0
  106. package/dist/types/ListPersonReadResponse.d.ts +13 -0
  107. package/dist/types/ListPersonSaved.d.ts +1 -0
  108. package/dist/types/ListPersonSavedResponse.d.ts +1 -0
  109. package/dist/types/ListPostLikes.d.ts +3 -1
  110. package/dist/types/ListPostLikesResponse.d.ts +6 -0
  111. package/dist/types/ListRegistrationApplications.d.ts +3 -1
  112. package/dist/types/ListRegistrationApplications.js +0 -1
  113. package/dist/types/ListRegistrationApplicationsResponse.d.ts +6 -0
  114. package/dist/types/ListReports.d.ts +1 -0
  115. package/dist/types/ListReportsResponse.d.ts +1 -0
  116. package/dist/types/ListTaglines.d.ts +3 -1
  117. package/dist/types/ListTaglines.js +0 -1
  118. package/dist/types/ListTaglinesResponse.d.ts +6 -0
  119. package/dist/types/ListingType.d.ts +1 -1
  120. package/dist/types/LocalImage.d.ts +8 -3
  121. package/dist/types/LocalImageView.d.ts +2 -0
  122. package/dist/types/LocalSite.d.ts +9 -15
  123. package/dist/types/LocalSiteRateLimit.d.ts +16 -16
  124. package/dist/types/LocalSiteUrlBlocklist.d.ts +2 -2
  125. package/dist/types/LocalUser.d.ts +13 -14
  126. package/dist/types/LocalUserView.d.ts +2 -0
  127. package/dist/types/LockComment.d.ts +9 -0
  128. package/dist/types/LockPost.d.ts +1 -0
  129. package/dist/types/Login.d.ts +3 -0
  130. package/dist/types/LoginToken.d.ts +1 -1
  131. package/dist/types/MarkManyPostsAsRead.d.ts +1 -0
  132. package/dist/types/MarkNotificationAsRead.d.ts +8 -0
  133. package/dist/types/{ModAddCommunity.d.ts → ModAddToCommunity.d.ts} +4 -4
  134. package/dist/types/ModAddToCommunityId.d.ts +1 -0
  135. package/dist/types/{ModAddCommunityView.d.ts → ModAddToCommunityView.d.ts} +3 -3
  136. package/dist/types/ModAddToCommunityView.js +2 -0
  137. package/dist/types/ModBanFromCommunity.d.ts +3 -3
  138. package/dist/types/ModChangeCommunityVisibility.d.ts +1 -2
  139. package/dist/types/ModEditPost.d.ts +10 -0
  140. package/dist/types/ModEditPost.js +2 -0
  141. package/dist/types/ModFeaturePost.d.ts +1 -1
  142. package/dist/types/ModLockComment.d.ts +14 -0
  143. package/dist/types/ModLockComment.js +2 -0
  144. package/dist/types/ModLockCommentId.d.ts +1 -0
  145. package/dist/types/ModLockCommentView.d.ts +16 -0
  146. package/dist/types/ModLockCommentView.js +2 -0
  147. package/dist/types/ModLockPost.d.ts +2 -1
  148. package/dist/types/ModRemoveComment.d.ts +2 -2
  149. package/dist/types/ModRemovePost.d.ts +2 -2
  150. package/dist/types/ModTransferCommunity.d.ts +1 -1
  151. package/dist/types/ModlogActionType.d.ts +1 -1
  152. package/dist/types/ModlogCombinedView.d.ts +16 -13
  153. package/dist/types/MultiCommunity.d.ts +17 -0
  154. package/dist/types/MultiCommunity.js +2 -0
  155. package/dist/types/MultiCommunityEntry.d.ts +6 -0
  156. package/dist/types/MultiCommunityEntry.js +2 -0
  157. package/dist/types/MultiCommunityFollow.d.ts +8 -0
  158. package/dist/types/MultiCommunityFollow.js +2 -0
  159. package/dist/types/MultiCommunityId.d.ts +1 -0
  160. package/dist/types/MultiCommunityResponse.d.ts +4 -0
  161. package/dist/types/MultiCommunityResponse.js +2 -0
  162. package/dist/types/MultiCommunityView.d.ts +8 -0
  163. package/dist/types/MultiCommunityView.js +2 -0
  164. package/dist/types/MyUserInfo.d.ts +3 -1
  165. package/dist/types/NotePerson.d.ts +10 -0
  166. package/dist/types/NotePerson.js +2 -0
  167. package/dist/types/Notification.d.ts +36 -0
  168. package/dist/types/Notification.js +2 -0
  169. package/dist/types/NotificationData.d.ts +40 -0
  170. package/dist/types/NotificationData.js +2 -0
  171. package/dist/types/NotificationDataType.d.ts +4 -0
  172. package/dist/types/NotificationId.d.ts +1 -0
  173. package/dist/types/NotificationId.js +3 -0
  174. package/dist/types/NotificationType.d.ts +4 -0
  175. package/dist/types/NotificationType.js +3 -0
  176. package/dist/types/NotificationView.d.ts +6 -0
  177. package/dist/types/NotificationView.js +2 -0
  178. package/dist/types/OAuthAccount.d.ts +2 -2
  179. package/dist/types/OAuthProvider.d.ts +2 -2
  180. package/dist/types/OpenGraphData.d.ts +4 -0
  181. package/dist/types/PendingFollowerView.d.ts +9 -0
  182. package/dist/types/PendingFollowerView.js +2 -0
  183. package/dist/types/Person.d.ts +2 -10
  184. package/dist/types/PersonActions.d.ts +21 -4
  185. package/dist/types/PersonActions.js +1 -0
  186. package/dist/types/PersonContentType.d.ts +1 -1
  187. package/dist/types/PersonLikedCombinedView.d.ts +7 -0
  188. package/dist/types/PersonLikedCombinedView.js +2 -0
  189. package/dist/types/PersonResponse.d.ts +7 -0
  190. package/dist/types/PersonResponse.js +2 -0
  191. package/dist/types/PersonView.d.ts +4 -0
  192. package/dist/types/PluginMetadata.d.ts +5 -0
  193. package/dist/types/PluginMetadata.js +3 -0
  194. package/dist/types/Post.d.ts +14 -7
  195. package/dist/types/PostActions.d.ts +15 -17
  196. package/dist/types/PostFeatureType.d.ts +1 -1
  197. package/dist/types/PostListingMode.d.ts +1 -1
  198. package/dist/types/PostNotificationsMode.d.ts +4 -0
  199. package/dist/types/PostNotificationsMode.js +3 -0
  200. package/dist/types/PostOrCommentOrPrivateMessage.d.ts +10 -0
  201. package/dist/types/PostOrCommentOrPrivateMessage.js +2 -0
  202. package/dist/types/PostReport.d.ts +2 -2
  203. package/dist/types/PostReportView.d.ts +5 -1
  204. package/dist/types/PostSortType.d.ts +1 -1
  205. package/dist/types/PostView.d.ts +7 -3
  206. package/dist/types/PrivateMessage.d.ts +2 -3
  207. package/dist/types/PrivateMessageReport.d.ts +2 -2
  208. package/dist/types/PrivateMessageReportView.d.ts +3 -0
  209. package/dist/types/PurgeComment.d.ts +1 -1
  210. package/dist/types/PurgeCommunity.d.ts +1 -1
  211. package/dist/types/PurgePerson.d.ts +1 -1
  212. package/dist/types/PurgePost.d.ts +1 -1
  213. package/dist/types/ReadableFederationState.d.ts +3 -3
  214. package/dist/types/RegistrationApplication.d.ts +1 -1
  215. package/dist/types/RegistrationMode.d.ts +1 -1
  216. package/dist/types/RemoveComment.d.ts +1 -1
  217. package/dist/types/RemoveCommunity.d.ts +1 -1
  218. package/dist/types/RemovePost.d.ts +1 -1
  219. package/dist/types/ReportType.d.ts +1 -1
  220. package/dist/types/SaveUserSettings.d.ts +12 -6
  221. package/dist/types/Search.d.ts +6 -1
  222. package/dist/types/SearchCombinedView.d.ts +4 -1
  223. package/dist/types/SearchResponse.d.ts +1 -0
  224. package/dist/types/SearchSortType.d.ts +1 -1
  225. package/dist/types/SearchType.d.ts +1 -1
  226. package/dist/types/Site.d.ts +4 -3
  227. package/dist/types/SiteResponse.d.ts +0 -4
  228. package/dist/types/SiteView.d.ts +2 -0
  229. package/dist/types/Tag.d.ts +7 -13
  230. package/dist/types/Tagline.d.ts +4 -3
  231. package/dist/types/Tagline.js +0 -1
  232. package/dist/types/TagsView.d.ts +5 -0
  233. package/dist/types/TagsView.js +2 -0
  234. package/dist/types/UntranslatedError.d.ts +14 -0
  235. package/dist/types/UntranslatedError.js +3 -0
  236. package/dist/types/UpdateCommunityNotifications.d.ts +9 -0
  237. package/dist/types/UpdateCommunityNotifications.js +2 -0
  238. package/dist/types/UpdateCommunityTag.d.ts +9 -0
  239. package/dist/types/UpdateCommunityTag.js +2 -0
  240. package/dist/types/UpdateMultiCommunity.d.ts +7 -0
  241. package/dist/types/UpdateMultiCommunity.js +2 -0
  242. package/dist/types/UpdatePostNotifications.d.ts +9 -0
  243. package/dist/types/UpdatePostNotifications.js +2 -0
  244. package/dist/types/UserBlockInstanceCommunitiesParams.d.ts +8 -0
  245. package/dist/types/UserBlockInstanceCommunitiesParams.js +2 -0
  246. package/dist/types/{UserBlockInstanceParams.d.ts → UserBlockInstancePersonsParams.d.ts} +2 -2
  247. package/dist/types/UserBlockInstancePersonsParams.js +2 -0
  248. package/dist/types/UserSettingsBackup.d.ts +29 -0
  249. package/dist/types/UserSettingsBackup.js +2 -0
  250. package/dist/types/VoteShow.d.ts +4 -0
  251. package/dist/types/VoteShow.js +3 -0
  252. package/dist/types/VoteView.d.ts +2 -1
  253. package/package.json +7 -6
  254. package/dist/types/BanPersonResponse.d.ts +0 -8
  255. package/dist/types/BlockCommunityResponse.d.ts +0 -8
  256. package/dist/types/BlockPersonResponse.d.ts +0 -8
  257. package/dist/types/CommentReply.d.ts +0 -13
  258. package/dist/types/CommentReplyId.d.ts +0 -4
  259. package/dist/types/CommentReplyView.d.ts +0 -27
  260. package/dist/types/FederationError.d.ts +0 -10
  261. package/dist/types/GetCommunityPendingFollowsCount.d.ts +0 -4
  262. package/dist/types/InboxCombinedView.d.ts +0 -13
  263. package/dist/types/InboxDataType.d.ts +0 -4
  264. package/dist/types/MarkCommentReplyAsRead.d.ts +0 -8
  265. package/dist/types/MarkPersonCommentMentionAsRead.d.ts +0 -8
  266. package/dist/types/MarkPersonPostMentionAsRead.d.ts +0 -8
  267. package/dist/types/MarkPrivateMessageAsRead.d.ts +0 -8
  268. package/dist/types/ModAdd.d.ts +0 -12
  269. package/dist/types/ModAddCommunityId.d.ts +0 -1
  270. package/dist/types/ModAddId.d.ts +0 -1
  271. package/dist/types/ModBan.d.ts +0 -14
  272. package/dist/types/ModBanId.d.ts +0 -1
  273. package/dist/types/ModRemoveCommunityId.d.ts +0 -1
  274. package/dist/types/ModRemoveCommunityView.d.ts +0 -11
  275. package/dist/types/PersonCommentMention.d.ts +0 -13
  276. package/dist/types/PersonCommentMentionId.d.ts +0 -4
  277. package/dist/types/PersonCommentMentionView.d.ts +0 -27
  278. package/dist/types/PersonPostMention.d.ts +0 -13
  279. package/dist/types/PersonPostMentionId.d.ts +0 -4
  280. package/dist/types/PersonPostMentionView.d.ts +0 -27
  281. package/dist/types/PostPaginationCursor.d.ts +0 -7
  282. package/dist/types/ResolveObjectResponse.d.ts +0 -13
  283. /package/dist/types/{BanPersonResponse.js → AdminAdd.js} +0 -0
  284. /package/dist/types/{CommentReplyId.js → AdminAddId.js} +0 -0
  285. /package/dist/types/{BannedPersonsResponse.js → AdminAddView.js} +0 -0
  286. /package/dist/types/{BlockCommunityResponse.js → AdminBan.js} +0 -0
  287. /package/dist/types/{FederationError.js → AdminBanId.js} +0 -0
  288. /package/dist/types/{BlockPersonResponse.js → AdminBanView.js} +0 -0
  289. /package/dist/types/{CommentReply.js → AdminListUsers.js} +0 -0
  290. /package/dist/types/{CommentReplyView.js → AdminListUsersResponse.js} +0 -0
  291. /package/dist/types/{GetCommunityPendingFollowsCount.js → AdminRemoveCommunity.js} +0 -0
  292. /package/dist/types/{InboxDataType.js → AdminRemoveCommunityId.js} +0 -0
  293. /package/dist/types/{InboxCombinedView.js → AdminRemoveCommunityView.js} +0 -0
  294. /package/dist/types/{ListBannedPersons.js → CommunityIdQuery.js} +0 -0
  295. /package/dist/types/{ModAddCommunityId.js → CommunityNotificationsMode.js} +0 -0
  296. /package/dist/types/{ListInbox.js → CreateCommunityTag.js} +0 -0
  297. /package/dist/types/{ModAddId.js → CreateMultiCommunity.js} +0 -0
  298. /package/dist/types/{ListInboxResponse.js → CreateOrDeleteMultiCommunityEntry.js} +0 -0
  299. /package/dist/types/{MarkCommentReplyAsRead.js → DeleteCommunityTag.js} +0 -0
  300. /package/dist/types/{MarkPersonCommentMentionAsRead.js → ExportDataResponse.js} +0 -0
  301. /package/dist/types/{MarkPersonPostMentionAsRead.js → FollowMultiCommunity.js} +0 -0
  302. /package/dist/types/{MarkPrivateMessageAsRead.js → GetMultiCommunity.js} +0 -0
  303. /package/dist/types/{ModAdd.js → GetMultiCommunityResponse.js} +0 -0
  304. /package/dist/types/{ModBanId.js → LikeType.js} +0 -0
  305. /package/dist/types/{ModAddCommunity.js → ListMultiCommunities.js} +0 -0
  306. /package/dist/types/{ModAddCommunityView.js → ListMultiCommunitiesResponse.js} +0 -0
  307. /package/dist/types/{ModAddView.js → ListNotifications.js} +0 -0
  308. /package/dist/types/{ModBan.js → ListNotificationsResponse.js} +0 -0
  309. /package/dist/types/{ModBanView.js → ListPersonHidden.js} +0 -0
  310. /package/dist/types/{ModRemoveCommunity.js → ListPersonHiddenResponse.js} +0 -0
  311. /package/dist/types/{ModRemoveCommunityView.js → ListPersonLiked.js} +0 -0
  312. /package/dist/types/{PersonCommentMention.js → ListPersonLikedResponse.js} +0 -0
  313. /package/dist/types/{PersonCommentMentionView.js → ListPersonRead.js} +0 -0
  314. /package/dist/types/{PersonPostMention.js → ListPersonReadResponse.js} +0 -0
  315. /package/dist/types/{PersonPostMentionView.js → LockComment.js} +0 -0
  316. /package/dist/types/{ResolveObjectResponse.js → MarkNotificationAsRead.js} +0 -0
  317. /package/dist/types/{UserBlockInstanceParams.js → ModAddToCommunity.js} +0 -0
  318. /package/dist/types/{ModRemoveCommunityId.js → ModAddToCommunityId.js} +0 -0
  319. /package/dist/types/{PersonCommentMentionId.js → ModLockCommentId.js} +0 -0
  320. /package/dist/types/{PersonPostMentionId.js → MultiCommunityId.js} +0 -0
  321. /package/dist/types/{PostPaginationCursor.js → NotificationDataType.js} +0 -0
package/dist/http.js CHANGED
@@ -8,15 +8,6 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
8
8
  var __param = (this && this.__param) || function (paramIndex, decorator) {
9
9
  return function (target, key) { decorator(target, key, paramIndex); }
10
10
  };
11
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
12
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
13
- return new (P || (P = Promise))(function (resolve, reject) {
14
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
15
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
16
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
17
- step((generator = generator.apply(thisArg, _arguments || [])).next());
18
- });
19
- };
20
11
  var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
21
12
  if (kind === "m") throw new TypeError("Private method is not writable");
22
13
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
@@ -28,9 +19,9 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
28
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");
29
20
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
30
21
  };
31
- var _LemmyHttp_instances, _LemmyHttp_apiUrl, _LemmyHttp_headers, _LemmyHttp_fetchFunction, _LemmyHttp_buildFullUrl, _LemmyHttp_upload, _LemmyHttp_wrapper;
22
+ var _LemmyHttp_instances, _LemmyHttp_apiUrl, _LemmyHttp_headers, _LemmyHttp_fetchFunction, _LemmyHttp_buildFullUrl, _LemmyHttp_upload, _LemmyHttp_uploadWithQuery, _LemmyHttp_wrapper;
32
23
  Object.defineProperty(exports, "__esModule", { value: true });
33
- exports.LemmyHttp = void 0;
24
+ exports.LemmyError = exports.LemmyHttp = void 0;
34
25
  const runtime_1 = require("@tsoa/runtime");
35
26
  const other_types_1 = require("./other_types");
36
27
  var HttpType;
@@ -56,35 +47,35 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
56
47
  _LemmyHttp_headers.set(this, {});
57
48
  _LemmyHttp_fetchFunction.set(this, fetch.bind(globalThis));
58
49
  __classPrivateFieldSet(this, _LemmyHttp_apiUrl, `${baseUrl.replace(/\/+$/, "")}/api/${other_types_1.VERSION}`, "f");
59
- if (options === null || options === void 0 ? void 0 : options.headers) {
50
+ if (options?.headers) {
60
51
  __classPrivateFieldSet(this, _LemmyHttp_headers, options.headers, "f");
61
52
  }
62
- if (options === null || options === void 0 ? void 0 : options.fetchFunction) {
53
+ if (options?.fetchFunction) {
63
54
  __classPrivateFieldSet(this, _LemmyHttp_fetchFunction, options.fetchFunction, "f");
64
55
  }
65
56
  }
66
57
  /**
67
58
  * @summary Gets the site, and your user data.
68
59
  */
69
- getSite(options) {
60
+ async getSite(options) {
70
61
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/site", {}, options);
71
62
  }
72
63
  /**
73
64
  * @summary Create your site.
74
65
  */
75
- createSite(form, options) {
66
+ async createSite(form, options) {
76
67
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/site", form, options);
77
68
  }
78
69
  /**
79
70
  * @summary Edit your site.
80
71
  */
81
- editSite(form, options) {
72
+ async editSite(form, options) {
82
73
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/site", form, options);
83
74
  }
84
75
  /**
85
76
  * @summary Leave the Site admins.
86
77
  */
87
- leaveAdmin(options) {
78
+ async leaveAdmin(options) {
88
79
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/admin/leave", {}, options);
89
80
  }
90
81
  /**
@@ -93,13 +84,13 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
93
84
  * Generate a TOTP / two-factor secret.
94
85
  * Afterwards you need to call `/account/auth/totp/update` with a valid token to enable it.
95
86
  */
96
- generateTotpSecret(options) {
87
+ async generateTotpSecret(options) {
97
88
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/auth/totp/generate", {}, options);
98
89
  }
99
90
  /**
100
91
  * @summary Get data of current user.
101
92
  */
102
- getMyUser(options) {
93
+ async getMyUser(options) {
103
94
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account", {}, options);
104
95
  }
105
96
  /**
@@ -108,38 +99,50 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
108
99
  * Export a backup of your user settings, including your saved content,
109
100
  * followed communities, and blocks.
110
101
  */
111
- exportSettings(options) {
102
+ async exportSettings(options) {
112
103
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/settings/export", {}, options);
113
104
  }
114
105
  /**
115
106
  * @summary Import a backup of your user settings.
116
107
  */
117
- importSettings(form, options) {
108
+ async importSettings(form, options) {
118
109
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/settings/import", form, options);
119
110
  }
120
111
  /**
121
112
  * @summary List login tokens for your user
122
113
  */
123
- listLogins(options) {
114
+ async listLogins(options) {
124
115
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/list_logins", {}, options);
125
116
  }
126
117
  /**
127
118
  * @summary Returns an error message if your auth token is invalid
128
119
  */
129
- validateAuth(options) {
120
+ async validateAuth(options) {
130
121
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/validate_auth", {}, options);
131
122
  }
132
123
  /**
133
- * @summary List all the media for your user
124
+ * @summary List all the media for your account.
125
+ */
126
+ async listMedia(form = {}, options) {
127
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/media/list", form, options);
128
+ }
129
+ /**
130
+ * @summary Delete media for your account.
131
+ */
132
+ async deleteMedia(form, options) {
133
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/account/media", form, options);
134
+ }
135
+ /**
136
+ * @summary Delete any media. (Admin only)
134
137
  */
135
- listMedia(form = {}, options) {
136
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/list_media", form, options);
138
+ async deleteMediaAdmin(form, options) {
139
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/image", form, options);
137
140
  }
138
141
  /**
139
142
  * @summary List all the media known to your instance.
140
143
  */
141
- listAllMedia(form = {}, options) {
142
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/admin/list_all_media", form, options);
144
+ async listMediaAdmin(form = {}, options) {
145
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/image/list", form, options);
143
146
  }
144
147
  /**
145
148
  * @summary Enable / Disable TOTP / two-factor authentication.
@@ -148,766 +151,815 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
148
151
  *
149
152
  * Disabling is only possible if 2FA was previously enabled. Again it is necessary to pass a valid token.
150
153
  */
151
- updateTotp(form, options) {
154
+ async updateTotp(form, options) {
152
155
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/auth/totp/update", form, options);
153
156
  }
154
157
  /**
155
158
  * @summary Get the modlog.
156
159
  */
157
- getModlog(form = {}, options) {
160
+ async getModlog(form = {}, options) {
158
161
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/modlog", form, options);
159
162
  }
160
163
  /**
161
- * @summary Search lemmy.
164
+ * @summary Search lemmy. If `search_term` is a url it also attempts to fetch it, just like `resolve_object`.
162
165
  */
163
- search(form, options) {
166
+ async search(form, options) {
164
167
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/search", form, options);
165
168
  }
166
169
  /**
167
170
  * @summary Fetch a non-local / federated object.
168
171
  */
169
- resolveObject(form, options) {
172
+ async resolveObject(form, options) {
170
173
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/resolve_object", form, options);
171
174
  }
172
175
  /**
173
176
  * @summary Create a new community.
174
177
  */
175
- createCommunity(form, options) {
178
+ async createCommunity(form, options) {
176
179
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/community", form, options);
177
180
  }
178
181
  /**
179
182
  * @summary Get / fetch a community.
180
183
  */
181
- getCommunity(form = {}, options) {
184
+ async getCommunity(form = {}, options) {
182
185
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/community", form, options);
183
186
  }
184
187
  /**
185
188
  * @summary Edit a community.
186
189
  */
187
- editCommunity(form, options) {
190
+ async editCommunity(form, options) {
188
191
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/community", form, options);
189
192
  }
190
193
  /**
191
194
  * @summary List communities, with various filters.
192
195
  */
193
- listCommunities(form = {}, options) {
196
+ async listCommunities(form = {}, options) {
194
197
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/community/list", form, options);
195
198
  }
196
199
  /**
197
200
  * @summary Follow / subscribe to a community.
198
201
  */
199
- followCommunity(form, options) {
202
+ async followCommunity(form, options) {
200
203
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/community/follow", form, options);
201
204
  }
202
205
  /**
203
206
  * @summary Get a community's pending follows count.
204
207
  */
205
- getCommunityPendingFollowsCount(form, options) {
206
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/community/pending_follows/count", form, options);
208
+ async getCommunityPendingFollowsCount(options) {
209
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/community/pending_follows/count", {}, options);
207
210
  }
208
211
  /**
209
212
  * @summary Get a community's pending followers.
210
213
  */
211
- listCommunityPendingFollows(form, options) {
214
+ async listCommunityPendingFollows(form, options) {
212
215
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/community/pending_follows/list", form, options);
213
216
  }
214
217
  /**
215
218
  * @summary Approve a community pending follow request.
216
219
  */
217
- approveCommunityPendingFollow(form, options) {
220
+ async approveCommunityPendingFollow(form, options) {
218
221
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/community/pending_follows/approve", form, options);
219
222
  }
220
223
  /**
221
224
  * @summary Block a community.
222
225
  */
223
- blockCommunity(form, options) {
226
+ async blockCommunity(form, options) {
224
227
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/block/community", form, options);
225
228
  }
226
229
  /**
227
230
  * @summary Delete a community.
228
231
  */
229
- deleteCommunity(form, options) {
232
+ async deleteCommunity(form, options) {
230
233
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/community/delete", form, options);
231
234
  }
232
235
  /**
233
236
  * @summary Hide a community from public / "All" view. Admins only.
234
237
  */
235
- hideCommunity(form, options) {
238
+ async hideCommunity(form, options) {
236
239
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/community/hide", form, options);
237
240
  }
238
241
  /**
239
242
  * @summary A moderator remove for a community.
240
243
  */
241
- removeCommunity(form, options) {
244
+ async removeCommunity(form, options) {
242
245
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/community/remove", form, options);
243
246
  }
244
247
  /**
245
248
  * @summary Transfer your community to an existing moderator.
246
249
  */
247
- transferCommunity(form, options) {
250
+ async transferCommunity(form, options) {
248
251
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/community/transfer", form, options);
249
252
  }
250
253
  /**
251
254
  * @summary Ban a user from a community.
252
255
  */
253
- banFromCommunity(form, options) {
256
+ async banFromCommunity(form, options) {
254
257
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/community/ban_user", form, options);
255
258
  }
256
259
  /**
257
260
  * @summary Add a moderator to your community.
258
261
  */
259
- addModToCommunity(form, options) {
262
+ async addModToCommunity(form, options) {
260
263
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/community/mod", form, options);
261
264
  }
262
265
  /**
263
266
  * @summary Get a random community.
264
267
  */
265
- getRandomCommunity(form, options) {
268
+ async getRandomCommunity(form, options) {
266
269
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/community/random", form, options);
267
270
  }
271
+ /**
272
+ * @summary Create a report for a community.
273
+ */
274
+ async createCommunityReport(form, options) {
275
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/community/report", form, options);
276
+ }
277
+ /**
278
+ * @summary Resolve a report for a private message.
279
+ */
280
+ async resolveCommunityReport(form, options) {
281
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/community/report/resolve", form, options);
282
+ }
268
283
  /**
269
284
  * @summary Create a post.
270
285
  */
271
- createPost(form, options) {
286
+ async createPost(form, options) {
272
287
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/post", form, options);
273
288
  }
274
289
  /**
275
290
  * @summary Get / fetch a post.
276
291
  */
277
- getPost(form = {}, options) {
292
+ async getPost(form = {}, options) {
278
293
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/post", form, options);
279
294
  }
280
295
  /**
281
296
  * @summary Edit a post.
282
297
  */
283
- editPost(form, options) {
298
+ async editPost(form, options) {
284
299
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/post", form, options);
285
300
  }
301
+ /**
302
+ * @summary Mods can change nsfw flag and tags for a post
303
+ */
304
+ async modEditPost(form, options) {
305
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/post/mod_update", form, options);
306
+ }
286
307
  /**
287
308
  * @summary Delete a post.
288
309
  */
289
- deletePost(form, options) {
310
+ async deletePost(form, options) {
290
311
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/post/delete", form, options);
291
312
  }
292
313
  /**
293
314
  * @summary A moderator remove for a post.
294
315
  */
295
- removePost(form, options) {
316
+ async removePost(form, options) {
296
317
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/post/remove", form, options);
297
318
  }
298
319
  /**
299
320
  * @summary Mark a post as read.
300
321
  */
301
- markPostAsRead(form, options) {
322
+ async markPostAsRead(form, options) {
302
323
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/post/mark_as_read", form, options);
303
324
  }
304
325
  /**
305
326
  * @summary Mark multiple posts as read.
306
327
  */
307
- markManyPostAsRead(form, options) {
328
+ async markManyPostAsRead(form, options) {
308
329
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/post/mark_as_read/many", form, options);
309
330
  }
310
331
  /**
311
332
  * @summary Hide a post from list views.
312
333
  */
313
- hidePost(form, options) {
334
+ async hidePost(form, options) {
314
335
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/post/hide", form, options);
315
336
  }
316
337
  /**
317
338
  * @summary A moderator can lock a post ( IE disable new comments ).
318
339
  */
319
- lockPost(form, options) {
340
+ async lockPost(form, options) {
320
341
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/post/lock", form, options);
321
342
  }
322
343
  /**
323
344
  * @summary A moderator can feature a community post ( IE stick it to the top of a community ).
324
345
  */
325
- featurePost(form, options) {
346
+ async featurePost(form, options) {
326
347
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/post/feature", form, options);
327
348
  }
328
349
  /**
329
350
  * @summary Get / fetch posts, with various filters.
330
351
  */
331
- getPosts(form = {}, options) {
352
+ async getPosts(form = {}, options) {
332
353
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/post/list", form, options);
333
354
  }
334
355
  /**
335
356
  * @summary Like / vote on a post.
336
357
  */
337
- likePost(form, options) {
358
+ async likePost(form, options) {
338
359
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/post/like", form, options);
339
360
  }
340
361
  /**
341
362
  * @summary List a post's likes. Admin-only.
342
363
  */
343
- listPostLikes(form, options) {
364
+ async listPostLikes(form, options) {
344
365
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/post/like/list", form, options);
345
366
  }
346
367
  /**
347
368
  * @summary Save a post.
348
369
  */
349
- savePost(form, options) {
370
+ async savePost(form, options) {
350
371
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/post/save", form, options);
351
372
  }
352
373
  /**
353
374
  * @summary Report a post.
354
375
  */
355
- createPostReport(form, options) {
376
+ async createPostReport(form, options) {
356
377
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/post/report", form, options);
357
378
  }
358
379
  /**
359
380
  * @summary Resolve a post report. Only a mod can do this.
360
381
  */
361
- resolvePostReport(form, options) {
382
+ async resolvePostReport(form, options) {
362
383
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/post/report/resolve", form, options);
363
384
  }
364
385
  /**
365
386
  * @summary Fetch metadata for any given site.
366
387
  */
367
- getSiteMetadata(form, options) {
388
+ async getSiteMetadata(form, options) {
368
389
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/post/site_metadata", form, options);
369
390
  }
370
391
  /**
371
392
  * @summary Create a comment.
372
393
  */
373
- createComment(form, options) {
394
+ async createComment(form, options) {
374
395
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/comment", form, options);
375
396
  }
376
397
  /**
377
398
  * @summary Edit a comment.
378
399
  */
379
- editComment(form, options) {
400
+ async editComment(form, options) {
380
401
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/comment", form, options);
381
402
  }
382
403
  /**
383
404
  * @summary Delete a comment.
384
405
  */
385
- deleteComment(form, options) {
406
+ async deleteComment(form, options) {
386
407
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/comment/delete", form, options);
387
408
  }
388
409
  /**
389
410
  * @summary A moderator remove for a comment.
390
411
  */
391
- removeComment(form, options) {
412
+ async removeComment(form, options) {
392
413
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/comment/remove", form, options);
393
414
  }
394
415
  /**
395
- * @summary Mark a comment as read.
416
+ * @summary A moderator can lock a comment (IE disable replies).
396
417
  */
397
- markCommentReplyAsRead(form, options) {
398
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/comment/mark_as_read", form, options);
418
+ async lockComment(form, options) {
419
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/comment/lock", form, options);
399
420
  }
400
421
  /**
401
- * @summary Like / vote on a comment.
422
+ * @Summary Like / vote on a comment.
402
423
  */
403
- likeComment(form, options) {
424
+ async likeComment(form, options) {
404
425
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/comment/like", form, options);
405
426
  }
406
427
  /**
407
428
  * @summary List a comment's likes. Admin-only.
408
429
  */
409
- listCommentLikes(form, options) {
430
+ async listCommentLikes(form, options) {
410
431
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/comment/like/list", form, options);
411
432
  }
412
433
  /**
413
434
  * @summary Save a comment.
414
435
  */
415
- saveComment(form, options) {
436
+ async saveComment(form, options) {
416
437
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/comment/save", form, options);
417
438
  }
418
439
  /**
419
440
  * @summary Distinguishes a comment (speak as moderator)
420
441
  */
421
- distinguishComment(form, options) {
442
+ async distinguishComment(form, options) {
422
443
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/comment/distinguish", form, options);
423
444
  }
424
445
  /**
425
446
  * @summary Get / fetch comments.
426
447
  */
427
- getComments(form = {}, options) {
448
+ async getComments(form = {}, options) {
428
449
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/comment/list", form, options);
429
450
  }
430
451
  /**
431
452
  * @summary Get / fetch comments, but without the post or community.
432
453
  */
433
- getCommentsSlim(form = {}, options) {
454
+ async getCommentsSlim(form = {}, options) {
434
455
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/comment/list/slim", form, options);
435
456
  }
436
457
  /**
437
458
  * @summary Get / fetch comment.
438
459
  */
439
- getComment(form, options) {
460
+ async getComment(form, options) {
440
461
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/comment", form, options);
441
462
  }
442
463
  /**
443
464
  * @summary Report a comment.
444
465
  */
445
- createCommentReport(form, options) {
466
+ async createCommentReport(form, options) {
446
467
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/comment/report", form, options);
447
468
  }
448
469
  /**
449
470
  * @summary Resolve a comment report. Only a mod can do this.
450
471
  */
451
- resolveCommentReport(form, options) {
472
+ async resolveCommentReport(form, options) {
452
473
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/comment/report/resolve", form, options);
453
474
  }
454
475
  /**
455
476
  * @summary Create a private message.
456
477
  */
457
- createPrivateMessage(form, options) {
478
+ async createPrivateMessage(form, options) {
458
479
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/private_message", form, options);
459
480
  }
460
481
  /**
461
482
  * @summary Edit a private message.
462
483
  */
463
- editPrivateMessage(form, options) {
484
+ async editPrivateMessage(form, options) {
464
485
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/private_message", form, options);
465
486
  }
466
487
  /**
467
488
  * @summary Delete a private message.
468
489
  */
469
- deletePrivateMessage(form, options) {
490
+ async deletePrivateMessage(form, options) {
470
491
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/private_message/delete", form, options);
471
492
  }
472
- /**
473
- * @summary Mark a private message as read.
474
- */
475
- markPrivateMessageAsRead(form, options) {
476
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/private_message/mark_as_read", form, options);
477
- }
478
493
  /**
479
494
  * @summary Create a report for a private message.
480
495
  */
481
- createPrivateMessageReport(form, options) {
496
+ async createPrivateMessageReport(form, options) {
482
497
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/private_message/report", form, options);
483
498
  }
484
499
  /**
485
500
  * @summary Resolve a report for a private message.
486
501
  */
487
- resolvePrivateMessageReport(form, options) {
502
+ async resolvePrivateMessageReport(form, options) {
488
503
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/private_message/report/resolve", form, options);
489
504
  }
490
505
  /**
491
506
  * @summary Register a new user.
492
507
  */
493
- register(form, options) {
508
+ async register(form, options) {
494
509
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/auth/register", form, options);
495
510
  }
496
511
  /**
497
512
  * @summary Log into lemmy.
498
513
  */
499
- login(form, options) {
514
+ async login(form, options) {
500
515
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/auth/login", form, options);
501
516
  }
502
517
  /**
503
518
  * @summary Invalidate the currently used auth token.
504
519
  */
505
- logout(options) {
520
+ async logout(options) {
506
521
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/auth/logout", {}, options);
507
522
  }
508
523
  /**
509
524
  * @summary Get the details for a person.
510
525
  */
511
- getPersonDetails(form = {}, options) {
526
+ async getPersonDetails(form = {}, options) {
512
527
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/person", form, options);
513
528
  }
514
529
  /**
515
530
  * @summary List the content for a person.
516
531
  */
517
- listPersonContent(form = {}, options) {
532
+ async listPersonContent(form = {}, options) {
518
533
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/person/content", form, options);
519
534
  }
520
535
  /**
521
- * @summary Mark a person mention as read.
536
+ * @summary Make a note for a person.
522
537
  */
523
- markCommentMentionAsRead(form, options) {
524
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/mention/comment/mark_as_read", form, options);
525
- }
526
- /**
527
- * @summary Mark a person post body mention as read.
528
- */
529
- markPostMentionAsRead(form, options) {
530
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/mention/post/mark_as_read", form, options);
538
+ async notePerson(form, options) {
539
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/person/note", form, options);
531
540
  }
532
541
  /**
533
542
  * @summary Ban a person from your site.
534
543
  */
535
- banPerson(form, options) {
544
+ async banPerson(form, options) {
536
545
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/admin/ban", form, options);
537
546
  }
538
547
  /**
539
- * @summary Get a list of banned users.
548
+ * @summary Get a list of users.
540
549
  */
541
- listBannedPersons(form = {}, options) {
542
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/admin/banned", form, options);
550
+ async listUsers(form = {}, options) {
551
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/admin/users", form, options);
543
552
  }
544
553
  /**
545
554
  * @summary Block a person.
546
555
  */
547
- blockPerson(form, options) {
556
+ async blockPerson(form, options) {
548
557
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/block/person", form, options);
549
558
  }
550
559
  /**
551
560
  * @summary Fetch a Captcha.
552
561
  */
553
- getCaptcha(options) {
562
+ async getCaptcha(options) {
554
563
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/auth/get_captcha", {}, options);
555
564
  }
556
565
  /**
557
566
  * @summary Delete your account.
558
567
  */
559
- deleteAccount(form, options) {
568
+ async deleteAccount(form, options) {
560
569
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/delete", form, options);
561
570
  }
562
571
  /**
563
572
  * @summary Reset your password.
564
573
  */
565
- passwordReset(form, options) {
574
+ async passwordReset(form, options) {
566
575
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/auth/password_reset", form, options);
567
576
  }
568
577
  /**
569
578
  * @summary Change your password from an email / token based reset.
570
579
  */
571
- passwordChangeAfterReset(form, options) {
580
+ async passwordChangeAfterReset(form, options) {
572
581
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/auth/password_change", form, options);
573
582
  }
574
583
  /**
575
584
  * @summary Mark all replies as read.
576
585
  */
577
- markAllNotificationsAsRead(options) {
586
+ async markAllNotificationsAsRead(options) {
578
587
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/mark_as_read/all", {}, options);
579
588
  }
589
+ /**
590
+ * @summary Mark a notification as read.
591
+ */
592
+ async markNotificationAsRead(form, options) {
593
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/mark_as_read", form, options);
594
+ }
580
595
  /**
581
596
  * @summary Save your user settings.
582
597
  */
583
- saveUserSettings(form, options) {
598
+ async saveUserSettings(form, options) {
584
599
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/account/settings/save", form, options);
585
600
  }
586
601
  /**
587
602
  * @summary Change your user password.
588
603
  */
589
- changePassword(form, options) {
604
+ async changePassword(form, options) {
590
605
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/account/auth/change_password", form, options);
591
606
  }
592
607
  /**
593
608
  * @summary Get counts for your reports.
594
609
  */
595
- getReportCount(form, options) {
610
+ async getReportCount(form, options) {
596
611
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/report_count", form, options);
597
612
  }
598
613
  /**
599
614
  * @summary Get your unread counts.
600
615
  */
601
- getUnreadCount(options) {
616
+ async getUnreadCount(options) {
602
617
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/unread_count", {}, options);
603
618
  }
604
619
  /**
605
620
  * @summary Get your inbox (replies, comment mentions, post mentions, and messages)
606
621
  */
607
- listInbox(form, options) {
608
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/inbox", form, options);
622
+ async listNotifications(form, options) {
623
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/notifications", form, options);
609
624
  }
610
625
  /**
611
626
  * @summary Verify your email
612
627
  */
613
- verifyEmail(form, options) {
628
+ async verifyEmail(form, options) {
614
629
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/auth/verify_email", form, options);
615
630
  }
616
631
  /**
617
632
  * @summary Resend a verification email.
618
633
  */
619
- resendVerificationEmail(form, options) {
634
+ async resendVerificationEmail(form, options) {
620
635
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/auth/resend_verification_email", form, options);
621
636
  }
622
637
  /**
623
638
  * @summary List your saved content.
624
639
  */
625
- listPersonSaved(form, options) {
640
+ async listPersonSaved(form, options) {
626
641
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/saved", form, options);
627
642
  }
643
+ /**
644
+ * @summary List your read content.
645
+ */
646
+ async listPersonRead(form, options) {
647
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/read", form, options);
648
+ }
649
+ /**
650
+ * @summary List your hidden content.
651
+ */
652
+ async listPersonHidden(form, options) {
653
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/hidden", form, options);
654
+ }
655
+ /**
656
+ * @summary List your liked content.
657
+ */
658
+ async listPersonLiked(form, options) {
659
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/liked", form, options);
660
+ }
628
661
  /**
629
662
  * @summary Add an admin to your site.
630
663
  */
631
- addAdmin(form, options) {
664
+ async addAdmin(form, options) {
632
665
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/admin/add", form, options);
633
666
  }
634
667
  /**
635
668
  * @summary Get the unread registration applications count.
636
669
  */
637
- getUnreadRegistrationApplicationCount(options) {
670
+ async getUnreadRegistrationApplicationCount(options) {
638
671
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/admin/registration_application/count", {}, options);
639
672
  }
640
673
  /**
641
674
  * @summary List the registration applications.
642
675
  */
643
- listRegistrationApplications(form, options) {
676
+ async listRegistrationApplications(form, options) {
644
677
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/admin/registration_application/list", form, options);
645
678
  }
646
679
  /**
647
680
  * @summary Approve a registration application
648
681
  */
649
- approveRegistrationApplication(form, options) {
682
+ async approveRegistrationApplication(form, options) {
650
683
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/admin/registration_application/approve", form, options);
651
684
  }
652
685
  /**
653
686
  * @summary Get the application a user submitted when they first registered their account
654
687
  */
655
- getRegistrationApplication(form, options) {
688
+ async getRegistrationApplication(form, options) {
656
689
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/admin/registration_application", form, options);
657
690
  }
658
691
  /**
659
692
  * @summary Purge / Delete a person from the database.
660
693
  */
661
- purgePerson(form, options) {
694
+ async purgePerson(form, options) {
662
695
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/admin/purge/person", form, options);
663
696
  }
664
697
  /**
665
698
  * @summary Purge / Delete a community from the database.
666
699
  */
667
- purgeCommunity(form, options) {
700
+ async purgeCommunity(form, options) {
668
701
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/admin/purge/community", form, options);
669
702
  }
670
703
  /**
671
704
  * @summary Purge / Delete a post from the database.
672
705
  */
673
- purgePost(form, options) {
706
+ async purgePost(form, options) {
674
707
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/admin/purge/post", form, options);
675
708
  }
676
709
  /**
677
710
  * @summary Purge / Delete a comment from the database.
678
711
  */
679
- purgeComment(form, options) {
712
+ async purgeComment(form, options) {
680
713
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/admin/purge/comment", form, options);
681
714
  }
682
715
  /**
683
716
  * @summary Create a new custom emoji.
684
717
  */
685
- createCustomEmoji(form, options) {
718
+ async createCustomEmoji(form, options) {
686
719
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/custom_emoji", form, options);
687
720
  }
688
721
  /**
689
722
  * @summary Edit an existing custom emoji.
690
723
  */
691
- editCustomEmoji(form, options) {
724
+ async editCustomEmoji(form, options) {
692
725
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/custom_emoji", form, options);
693
726
  }
694
727
  /**
695
728
  * @summary Delete a custom emoji.
696
729
  */
697
- deleteCustomEmoji(form, options) {
730
+ async deleteCustomEmoji(form, options) {
698
731
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/custom_emoji/delete", form, options);
699
732
  }
700
733
  /**
701
734
  * @summary List custom emojis
702
735
  */
703
- listCustomEmojis(form, options) {
736
+ async listCustomEmojis(form, options) {
704
737
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/custom_emoji/list", form, options);
705
738
  }
706
739
  /**
707
740
  * @summary Create a new tagline
708
741
  */
709
- createTagline(form, options) {
742
+ async createTagline(form, options) {
710
743
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/admin/tagline", form, options);
711
744
  }
712
745
  /**
713
746
  * @summary Edit an existing tagline
714
747
  */
715
- editTagline(form, options) {
748
+ async editTagline(form, options) {
716
749
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/admin/tagline", form, options);
717
750
  }
718
751
  /**
719
752
  * @summary Delete a tagline
720
753
  */
721
- deleteTagline(form, options) {
754
+ async deleteTagline(form, options) {
722
755
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/admin/tagline/delete", form, options);
723
756
  }
724
757
  /**
725
758
  * @summary List taglines.
726
759
  */
727
- listTaglines(form, options) {
760
+ async listTaglines(form, options) {
728
761
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/admin/tagline/list", form, options);
729
762
  }
763
+ /**
764
+ * @summary Create a community post tag.
765
+ */
766
+ createCommunityTag(form, options) {
767
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/community/tag", form, options);
768
+ }
769
+ /**
770
+ * @summary Edit a community post tag.
771
+ */
772
+ updateCommunityTag(form, options) {
773
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/community/tag", form, options);
774
+ }
775
+ /**
776
+ * @summary Delete a post tag in a community.
777
+ */
778
+ deleteCommunityTag(form, options) {
779
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/community/tag", form, options);
780
+ }
730
781
  /**
731
782
  * @summary Create a new oauth provider method
732
783
  */
733
- createOAuthProvider(form, options) {
784
+ async createOAuthProvider(form, options) {
734
785
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/oauth_provider", form, options);
735
786
  }
736
787
  /**
737
788
  * @summary Edit an existing oauth provider method
738
789
  */
739
- editOAuthProvider(form, options) {
790
+ async editOAuthProvider(form, options) {
740
791
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/oauth_provider", form, options);
741
792
  }
742
793
  /**
743
794
  * @summary Delete an oauth provider method
744
795
  */
745
- deleteOAuthProvider(form, options) {
796
+ async deleteOAuthProvider(form, options) {
746
797
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/oauth_provider/delete", form, options);
747
798
  }
748
799
  /**
749
800
  * @summary Authenticate with OAuth
750
801
  */
751
- authenticateWithOAuth(form, options) {
802
+ async authenticateWithOAuth(form, options) {
752
803
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/oauth/authenticate", form, options);
753
804
  }
754
805
  /**
755
806
  * @summary Fetch federated instances.
756
807
  */
757
- getFederatedInstances(options) {
808
+ async getFederatedInstances(options) {
758
809
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/federated_instances", {}, options);
759
810
  }
760
811
  /**
761
812
  * @summary List user reports.
762
813
  */
763
- listReports(form, options) {
814
+ async listReports(form, options) {
764
815
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/report/list", form, options);
765
816
  }
766
817
  /**
767
- * @summary Block an instance as user.
818
+ * @summary Block an instance's communities as a user.
768
819
  */
769
- userBlockInstance(form, options) {
770
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/block/instance", form, options);
820
+ async userBlockInstanceCommunities(form, options) {
821
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/block/instance/communities", form, options);
822
+ }
823
+ /**
824
+ * @summary Block an instance's persons as a user.
825
+ */
826
+ async userBlockInstancePersons(form, options) {
827
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/block/instance/persons", form, options);
771
828
  }
772
829
  /**
773
830
  * @summary Globally block an instance as admin.
774
831
  */
775
- adminBlockInstance(form, options) {
832
+ async adminBlockInstance(form, options) {
776
833
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/admin/instance/block", form, options);
777
834
  }
778
835
  /**
779
836
  * @summary Globally allow an instance as admin.
780
837
  */
781
- adminAllowInstance(form, options) {
838
+ async adminAllowInstance(form, options) {
782
839
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/admin/instance/allow", form, options);
783
840
  }
784
841
  /**
785
842
  * @summary Upload new user avatar.
786
843
  */
787
- uploadUserAvatar(image, options) {
788
- return __awaiter(this, void 0, void 0, function* () {
789
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_upload).call(this, "/account/avatar", image, options);
790
- });
844
+ async uploadUserAvatar(image, options) {
845
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_upload).call(this, "/account/avatar", image, options);
791
846
  }
792
847
  /**
793
848
  * @summary Delete the user avatar.
794
849
  */
795
- deleteUserAvatar(options) {
796
- return __awaiter(this, void 0, void 0, function* () {
797
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/account/avatar", {}, options);
798
- });
850
+ async deleteUserAvatar(options) {
851
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/account/avatar", {}, options);
799
852
  }
800
853
  /**
801
854
  * @summary Upload new user banner.
802
855
  */
803
- uploadUserBanner(image, options) {
804
- return __awaiter(this, void 0, void 0, function* () {
805
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_upload).call(this, "/account/banner", image, options);
806
- });
856
+ async uploadUserBanner(image, options) {
857
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_upload).call(this, "/account/banner", image, options);
807
858
  }
808
859
  /**
809
860
  * @summary Delete the user banner.
810
861
  */
811
- deleteUserBanner(options) {
812
- return __awaiter(this, void 0, void 0, function* () {
813
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/account/banner", {}, options);
814
- });
862
+ async deleteUserBanner(options) {
863
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/account/banner", {}, options);
815
864
  }
816
865
  /**
817
866
  * @summary Upload new community icon.
818
867
  */
819
- uploadCommunityIcon(image, options) {
820
- return __awaiter(this, void 0, void 0, function* () {
821
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_upload).call(this, "/community/icon", image, options);
822
- });
868
+ async uploadCommunityIcon(query, image, options) {
869
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_uploadWithQuery).call(this, "/community/icon", query, image, options);
823
870
  }
824
871
  /**
825
872
  * @summary Delete the community icon.
826
873
  */
827
- deleteCommunityIcon(options) {
828
- return __awaiter(this, void 0, void 0, function* () {
829
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/community/icon", {}, options);
830
- });
874
+ async deleteCommunityIcon(form, options) {
875
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/community/icon", form, options);
831
876
  }
832
877
  /**
833
878
  * @summary Upload new community banner.
834
879
  */
835
- uploadCommunityBanner(image, options) {
836
- return __awaiter(this, void 0, void 0, function* () {
837
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_upload).call(this, "/community/banner", image, options);
838
- });
880
+ async uploadCommunityBanner(query, image, options) {
881
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_uploadWithQuery).call(this, "/community/banner", query, image, options);
839
882
  }
840
883
  /**
841
884
  * @summary Delete the community banner.
842
885
  */
843
- deleteCommunityBanner(options) {
844
- return __awaiter(this, void 0, void 0, function* () {
845
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/community/banner", {}, options);
846
- });
886
+ async deleteCommunityBanner(form, options) {
887
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/community/banner", form, options);
847
888
  }
848
889
  /**
849
890
  * @summary Upload new site icon.
850
891
  */
851
- uploadSiteIcon(image, options) {
852
- return __awaiter(this, void 0, void 0, function* () {
853
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_upload).call(this, "/site/icon", image, options);
854
- });
892
+ async uploadSiteIcon(image, options) {
893
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_upload).call(this, "/site/icon", image, options);
855
894
  }
856
895
  /**
857
896
  * @summary Delete the site icon.
858
897
  */
859
- deleteSiteIcon(options) {
860
- return __awaiter(this, void 0, void 0, function* () {
861
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/site/icon", {}, options);
862
- });
898
+ async deleteSiteIcon(options) {
899
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/site/icon", {}, options);
863
900
  }
864
901
  /**
865
902
  * @summary Upload new site banner.
866
903
  */
867
- uploadSiteBanner(image, options) {
868
- return __awaiter(this, void 0, void 0, function* () {
869
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_upload).call(this, "/site/banner", image, options);
870
- });
904
+ async uploadSiteBanner(image, options) {
905
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_upload).call(this, "/site/banner", image, options);
871
906
  }
872
907
  /**
873
908
  * @summary Delete the site banner.
874
909
  */
875
- deleteSiteBanner(options) {
876
- return __awaiter(this, void 0, void 0, function* () {
877
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/site/banner", {}, options);
878
- });
910
+ async deleteSiteBanner(options) {
911
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/site/banner", {}, options);
879
912
  }
880
913
  /**
881
914
  * @summary Upload an image to the server.
882
915
  */
883
- uploadImage(image, options) {
884
- return __awaiter(this, void 0, void 0, function* () {
885
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_upload).call(this, "/image", image, options);
886
- });
916
+ async uploadImage(image, options) {
917
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_upload).call(this, "/image", image, options);
887
918
  }
888
919
  /**
889
- * @summary Delete a pictrs image
920
+ * @summary Health check for image functionality
890
921
  */
891
- deleteImage(form, options) {
892
- return __awaiter(this, void 0, void 0, function* () {
893
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/image", form, options);
894
- });
922
+ async imageHealth(options) {
923
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/image/health", {}, options);
895
924
  }
896
925
  /**
897
- * @summary Health check for image functionality
926
+ * Mark donation dialog as shown, so it isn't displayed anymore.
898
927
  */
899
- imageHealth(options) {
900
- return __awaiter(this, void 0, void 0, function* () {
901
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/image/health", {}, options);
902
- });
928
+ donationDialogShown(options) {
929
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/donation_dialog_shown", {}, options);
930
+ }
931
+ createMultiCommunity(form, options) {
932
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/multi_community", form, options);
933
+ }
934
+ updateMultiCommunity(form, options) {
935
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/multi_community", form, options);
936
+ }
937
+ getMultiCommunity(form, options) {
938
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/multi_community", form, options);
939
+ }
940
+ createMultiCommunityEntry(form, options) {
941
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/multi_community/entry", form, options);
942
+ }
943
+ deleteMultiCommunityEntry(form, options) {
944
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/multi_community/entry", form, options);
945
+ }
946
+ listMultiCommunities(form, options) {
947
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/multi_community/list", form, options);
948
+ }
949
+ followMultiCommunity(form, options) {
950
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/multi_community/follow", form, options);
903
951
  }
904
952
  /**
905
- * Mark donation dialog as shown, so it isn't displayed anymore.
906
- *
907
- * `HTTP.POST /user/donation_dialog_shown`
953
+ * @summary Change notification settings for a community
908
954
  */
909
- donation_dialog_shown(options) {
910
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/user/donation_dialog_shown", {}, options);
955
+ updateCommunityNotifications(form, options) {
956
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/community/notifications", form, options);
957
+ }
958
+ /**
959
+ * @summary Change notification settings for a post
960
+ */
961
+ updatePostNotifications(form, options) {
962
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/post/notifications", form, options);
911
963
  }
912
964
  /**
913
965
  * Set the headers (can be used to set the auth header)
@@ -924,38 +976,55 @@ _LemmyHttp_instances = new WeakSet();
924
976
  _LemmyHttp_buildFullUrl = function _LemmyHttp_buildFullUrl(endpoint) {
925
977
  return `${__classPrivateFieldGet(this, _LemmyHttp_apiUrl, "f")}${endpoint}`;
926
978
  };
927
- _LemmyHttp_upload = function _LemmyHttp_upload(path_1, _a, options_1) {
928
- return __awaiter(this, arguments, void 0, function* (path, { image }, options) {
929
- const formData = createFormData(image);
930
- const response = yield __classPrivateFieldGet(this, _LemmyHttp_fetchFunction, "f").call(this, __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_buildFullUrl).call(this, path), Object.assign(Object.assign({}, options), { method: HttpType.Post, body: formData, headers: __classPrivateFieldGet(this, _LemmyHttp_headers, "f") }));
931
- return response.json();
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"),
932
986
  });
987
+ return response.json();
933
988
  };
934
- _LemmyHttp_wrapper = function _LemmyHttp_wrapper(type_, endpoint, form, options) {
935
- return __awaiter(this, void 0, void 0, function* () {
936
- var _a;
937
- let response;
938
- if (type_ === HttpType.Get) {
939
- const getUrl = `${__classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_buildFullUrl).call(this, endpoint)}?${encodeGetParams(form)}`;
940
- response = yield __classPrivateFieldGet(this, _LemmyHttp_fetchFunction, "f").call(this, getUrl, Object.assign(Object.assign({}, options), { method: HttpType.Get, headers: __classPrivateFieldGet(this, _LemmyHttp_headers, "f") }));
941
- }
942
- else {
943
- response = yield __classPrivateFieldGet(this, _LemmyHttp_fetchFunction, "f").call(this, __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_buildFullUrl).call(this, endpoint), Object.assign(Object.assign({}, options), { method: type_, headers: Object.assign({ "Content-Type": "application/json" }, __classPrivateFieldGet(this, _LemmyHttp_headers, "f")), body: JSON.stringify(form) }));
944
- }
945
- let json = undefined;
946
- try {
947
- json = yield response.json();
948
- }
949
- catch (_b) {
950
- throw new Error(response.statusText);
951
- }
952
- if (!response.ok) {
953
- throw new Error((_a = json["error"]) !== null && _a !== void 0 ? _a : response.statusText);
954
- }
955
- else {
956
- return json;
957
- }
958
- });
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
+ });
1001
+ }
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, response.status);
1019
+ }
1020
+ if (!response.ok) {
1021
+ console.error(`Request error while calling ${type_} ${endpoint} with ${JSON.stringify(form)}`);
1022
+ let err = new LemmyError(json.error ?? response.statusText, response.status, json.message);
1023
+ throw err;
1024
+ }
1025
+ else {
1026
+ return json;
1027
+ }
959
1028
  };
960
1029
  __decorate([
961
1030
  (0, runtime_1.Security)("bearerAuth"),
@@ -1023,18 +1092,32 @@ __decorate([
1023
1092
  ], LemmyHttp.prototype, "validateAuth", null);
1024
1093
  __decorate([
1025
1094
  (0, runtime_1.Security)("bearerAuth"),
1026
- (0, runtime_1.Get)("/account/list_media"),
1095
+ (0, runtime_1.Get)("/account/media/list"),
1027
1096
  (0, runtime_1.Tags)("Account", "Media"),
1028
1097
  __param(0, (0, runtime_1.Queries)()),
1029
1098
  __param(1, (0, runtime_1.Inject)())
1030
1099
  ], LemmyHttp.prototype, "listMedia", null);
1031
1100
  __decorate([
1032
1101
  (0, runtime_1.Security)("bearerAuth"),
1033
- (0, runtime_1.Get)("/admin/list_all_media"),
1102
+ (0, runtime_1.Delete)("/account/media"),
1103
+ (0, runtime_1.Tags)("Account", "Media"),
1104
+ __param(0, (0, runtime_1.Queries)()),
1105
+ __param(1, (0, runtime_1.Inject)())
1106
+ ], LemmyHttp.prototype, "deleteMedia", null);
1107
+ __decorate([
1108
+ (0, runtime_1.Security)("bearerAuth"),
1109
+ (0, runtime_1.Delete)("/image"),
1110
+ (0, runtime_1.Tags)("Admin", "Media"),
1111
+ __param(0, (0, runtime_1.Queries)()),
1112
+ __param(1, (0, runtime_1.Inject)())
1113
+ ], LemmyHttp.prototype, "deleteMediaAdmin", null);
1114
+ __decorate([
1115
+ (0, runtime_1.Security)("bearerAuth"),
1116
+ (0, runtime_1.Get)("/image/list"),
1034
1117
  (0, runtime_1.Tags)("Admin", "Media"),
1035
1118
  __param(0, (0, runtime_1.Queries)()),
1036
1119
  __param(1, (0, runtime_1.Inject)())
1037
- ], LemmyHttp.prototype, "listAllMedia", null);
1120
+ ], LemmyHttp.prototype, "listMediaAdmin", null);
1038
1121
  __decorate([
1039
1122
  (0, runtime_1.Security)("bearerAuth"),
1040
1123
  (0, runtime_1.Post)("/account/auth/totp/update"),
@@ -1108,8 +1191,7 @@ __decorate([
1108
1191
  (0, runtime_1.Security)("bearerAuth"),
1109
1192
  (0, runtime_1.Get)("/community/pending_follows/count"),
1110
1193
  (0, runtime_1.Tags)("Community"),
1111
- __param(0, (0, runtime_1.Queries)()),
1112
- __param(1, (0, runtime_1.Inject)())
1194
+ __param(0, (0, runtime_1.Inject)())
1113
1195
  ], LemmyHttp.prototype, "getCommunityPendingFollowsCount", null);
1114
1196
  __decorate([
1115
1197
  (0, runtime_1.Security)("bearerAuth"),
@@ -1182,6 +1264,20 @@ __decorate([
1182
1264
  __param(0, (0, runtime_1.Queries)()),
1183
1265
  __param(1, (0, runtime_1.Inject)())
1184
1266
  ], LemmyHttp.prototype, "getRandomCommunity", null);
1267
+ __decorate([
1268
+ (0, runtime_1.Security)("bearerAuth"),
1269
+ (0, runtime_1.Post)("/community/report"),
1270
+ (0, runtime_1.Tags)("Community"),
1271
+ __param(0, (0, runtime_1.Body)()),
1272
+ __param(1, (0, runtime_1.Inject)())
1273
+ ], LemmyHttp.prototype, "createCommunityReport", null);
1274
+ __decorate([
1275
+ (0, runtime_1.Security)("bearerAuth"),
1276
+ (0, runtime_1.Put)("/community/report/resolve"),
1277
+ (0, runtime_1.Tags)("Community", "Admin"),
1278
+ __param(0, (0, runtime_1.Body)()),
1279
+ __param(1, (0, runtime_1.Inject)())
1280
+ ], LemmyHttp.prototype, "resolveCommunityReport", null);
1185
1281
  __decorate([
1186
1282
  (0, runtime_1.Security)("bearerAuth"),
1187
1283
  (0, runtime_1.Post)("/post"),
@@ -1204,6 +1300,13 @@ __decorate([
1204
1300
  __param(0, (0, runtime_1.Body)()),
1205
1301
  __param(1, (0, runtime_1.Inject)())
1206
1302
  ], LemmyHttp.prototype, "editPost", null);
1303
+ __decorate([
1304
+ (0, runtime_1.Security)("bearerAuth"),
1305
+ (0, runtime_1.Put)("/post/mod_update"),
1306
+ (0, runtime_1.Tags)("Post"),
1307
+ __param(0, (0, runtime_1.Body)()),
1308
+ __param(1, (0, runtime_1.Inject)())
1309
+ ], LemmyHttp.prototype, "modEditPost", null);
1207
1310
  __decorate([
1208
1311
  (0, runtime_1.Security)("bearerAuth"),
1209
1312
  (0, runtime_1.Post)("/post/delete"),
@@ -1333,11 +1436,11 @@ __decorate([
1333
1436
  ], LemmyHttp.prototype, "removeComment", null);
1334
1437
  __decorate([
1335
1438
  (0, runtime_1.Security)("bearerAuth"),
1336
- (0, runtime_1.Post)("/comment/mark_as_read"),
1337
- (0, runtime_1.Tags)("Comment"),
1439
+ (0, runtime_1.Post)("/comment/lock"),
1440
+ (0, runtime_1.Tags)("Comment", "Moderator"),
1338
1441
  __param(0, (0, runtime_1.Body)()),
1339
1442
  __param(1, (0, runtime_1.Inject)())
1340
- ], LemmyHttp.prototype, "markCommentReplyAsRead", null);
1443
+ ], LemmyHttp.prototype, "lockComment", null);
1341
1444
  __decorate([
1342
1445
  (0, runtime_1.Security)("bearerAuth"),
1343
1446
  (0, runtime_1.Post)("/comment/like"),
@@ -1425,13 +1528,6 @@ __decorate([
1425
1528
  __param(0, (0, runtime_1.Body)()),
1426
1529
  __param(1, (0, runtime_1.Inject)())
1427
1530
  ], LemmyHttp.prototype, "deletePrivateMessage", null);
1428
- __decorate([
1429
- (0, runtime_1.Security)("bearerAuth"),
1430
- (0, runtime_1.Post)("/private_message/mark_as_read"),
1431
- (0, runtime_1.Tags)("PrivateMessage"),
1432
- __param(0, (0, runtime_1.Body)()),
1433
- __param(1, (0, runtime_1.Inject)())
1434
- ], LemmyHttp.prototype, "markPrivateMessageAsRead", null);
1435
1531
  __decorate([
1436
1532
  (0, runtime_1.Security)("bearerAuth"),
1437
1533
  (0, runtime_1.Post)("/private_message/report"),
@@ -1482,18 +1578,11 @@ __decorate([
1482
1578
  ], LemmyHttp.prototype, "listPersonContent", null);
1483
1579
  __decorate([
1484
1580
  (0, runtime_1.Security)("bearerAuth"),
1485
- (0, runtime_1.Post)("/account/mention/comment/mark_as_read"),
1486
- (0, runtime_1.Tags)("Account", "Person"),
1487
- __param(0, (0, runtime_1.Body)()),
1488
- __param(1, (0, runtime_1.Inject)())
1489
- ], LemmyHttp.prototype, "markCommentMentionAsRead", null);
1490
- __decorate([
1491
- (0, runtime_1.Security)("bearerAuth"),
1492
- (0, runtime_1.Post)("/account/mention/post/mark_as_read"),
1493
- (0, runtime_1.Tags)("Account", "Post"),
1581
+ (0, runtime_1.Post)("/person/note"),
1582
+ (0, runtime_1.Tags)("Person"),
1494
1583
  __param(0, (0, runtime_1.Body)()),
1495
1584
  __param(1, (0, runtime_1.Inject)())
1496
- ], LemmyHttp.prototype, "markPostMentionAsRead", null);
1585
+ ], LemmyHttp.prototype, "notePerson", null);
1497
1586
  __decorate([
1498
1587
  (0, runtime_1.Security)("bearerAuth"),
1499
1588
  (0, runtime_1.Post)("/admin/ban"),
@@ -1503,11 +1592,11 @@ __decorate([
1503
1592
  ], LemmyHttp.prototype, "banPerson", null);
1504
1593
  __decorate([
1505
1594
  (0, runtime_1.Security)("bearerAuth"),
1506
- (0, runtime_1.Get)("/admin/banned"),
1595
+ (0, runtime_1.Get)("/admin/users"),
1507
1596
  (0, runtime_1.Tags)("Admin", "Miscellaneous"),
1508
1597
  __param(0, (0, runtime_1.Queries)()),
1509
1598
  __param(1, (0, runtime_1.Inject)())
1510
- ], LemmyHttp.prototype, "listBannedPersons", null);
1599
+ ], LemmyHttp.prototype, "listUsers", null);
1511
1600
  __decorate([
1512
1601
  (0, runtime_1.Security)("bearerAuth"),
1513
1602
  (0, runtime_1.Post)("/account/block/person"),
@@ -1547,6 +1636,13 @@ __decorate([
1547
1636
  (0, runtime_1.Tags)("Account"),
1548
1637
  __param(0, (0, runtime_1.Inject)())
1549
1638
  ], LemmyHttp.prototype, "markAllNotificationsAsRead", null);
1639
+ __decorate([
1640
+ (0, runtime_1.Security)("bearerAuth"),
1641
+ (0, runtime_1.Post)("/account/mark_as_read"),
1642
+ (0, runtime_1.Tags)("Account"),
1643
+ __param(0, (0, runtime_1.Body)()),
1644
+ __param(1, (0, runtime_1.Inject)())
1645
+ ], LemmyHttp.prototype, "markNotificationAsRead", null);
1550
1646
  __decorate([
1551
1647
  (0, runtime_1.Security)("bearerAuth"),
1552
1648
  (0, runtime_1.Put)("/account/settings/save"),
@@ -1576,11 +1672,11 @@ __decorate([
1576
1672
  ], LemmyHttp.prototype, "getUnreadCount", null);
1577
1673
  __decorate([
1578
1674
  (0, runtime_1.Security)("bearerAuth"),
1579
- (0, runtime_1.Get)("/account/inbox"),
1675
+ (0, runtime_1.Get)("/account/notifications"),
1580
1676
  (0, runtime_1.Tags)("Account"),
1581
1677
  __param(0, (0, runtime_1.Queries)()),
1582
1678
  __param(1, (0, runtime_1.Inject)())
1583
- ], LemmyHttp.prototype, "listInbox", null);
1679
+ ], LemmyHttp.prototype, "listNotifications", null);
1584
1680
  __decorate([
1585
1681
  (0, runtime_1.Post)("/account/auth/verify_email"),
1586
1682
  (0, runtime_1.Tags)("Account"),
@@ -1600,6 +1696,27 @@ __decorate([
1600
1696
  __param(0, (0, runtime_1.Queries)()),
1601
1697
  __param(1, (0, runtime_1.Inject)())
1602
1698
  ], LemmyHttp.prototype, "listPersonSaved", null);
1699
+ __decorate([
1700
+ (0, runtime_1.Security)("bearerAuth"),
1701
+ (0, runtime_1.Get)("/account/read"),
1702
+ (0, runtime_1.Tags)("Account"),
1703
+ __param(0, (0, runtime_1.Queries)()),
1704
+ __param(1, (0, runtime_1.Inject)())
1705
+ ], LemmyHttp.prototype, "listPersonRead", null);
1706
+ __decorate([
1707
+ (0, runtime_1.Security)("bearerAuth"),
1708
+ (0, runtime_1.Get)("/account/hidden"),
1709
+ (0, runtime_1.Tags)("Account"),
1710
+ __param(0, (0, runtime_1.Queries)()),
1711
+ __param(1, (0, runtime_1.Inject)())
1712
+ ], LemmyHttp.prototype, "listPersonHidden", null);
1713
+ __decorate([
1714
+ (0, runtime_1.Security)("bearerAuth"),
1715
+ (0, runtime_1.Get)("/account/liked"),
1716
+ (0, runtime_1.Tags)("Account"),
1717
+ __param(0, (0, runtime_1.Queries)()),
1718
+ __param(1, (0, runtime_1.Inject)())
1719
+ ], LemmyHttp.prototype, "listPersonLiked", null);
1603
1720
  __decorate([
1604
1721
  (0, runtime_1.Security)("bearerAuth"),
1605
1722
  (0, runtime_1.Post)("/admin/add"),
@@ -1720,6 +1837,27 @@ __decorate([
1720
1837
  __param(0, (0, runtime_1.Queries)()),
1721
1838
  __param(1, (0, runtime_1.Inject)())
1722
1839
  ], LemmyHttp.prototype, "listTaglines", null);
1840
+ __decorate([
1841
+ (0, runtime_1.Security)("bearerAuth"),
1842
+ (0, runtime_1.Post)("/community/tag"),
1843
+ (0, runtime_1.Tags)("Community"),
1844
+ __param(0, (0, runtime_1.Body)()),
1845
+ __param(1, (0, runtime_1.Inject)())
1846
+ ], LemmyHttp.prototype, "createCommunityTag", null);
1847
+ __decorate([
1848
+ (0, runtime_1.Security)("bearerAuth"),
1849
+ (0, runtime_1.Put)("/community/tag"),
1850
+ (0, runtime_1.Tags)("Community"),
1851
+ __param(0, (0, runtime_1.Body)()),
1852
+ __param(1, (0, runtime_1.Inject)())
1853
+ ], LemmyHttp.prototype, "updateCommunityTag", null);
1854
+ __decorate([
1855
+ (0, runtime_1.Security)("bearerAuth"),
1856
+ (0, runtime_1.Delete)("/community/tag"),
1857
+ (0, runtime_1.Tags)("Community"),
1858
+ __param(0, (0, runtime_1.Body)()),
1859
+ __param(1, (0, runtime_1.Inject)())
1860
+ ], LemmyHttp.prototype, "deleteCommunityTag", null);
1723
1861
  __decorate([
1724
1862
  (0, runtime_1.Security)("bearerAuth"),
1725
1863
  (0, runtime_1.Post)("/oauth_provider"),
@@ -1762,11 +1900,18 @@ __decorate([
1762
1900
  ], LemmyHttp.prototype, "listReports", null);
1763
1901
  __decorate([
1764
1902
  (0, runtime_1.Security)("bearerAuth"),
1765
- (0, runtime_1.Post)("/account/block/instance"),
1766
- (0, runtime_1.Tags)("Account"),
1903
+ (0, runtime_1.Post)("/account/block/instance/communities"),
1904
+ (0, runtime_1.Tags)("Account", "Community"),
1905
+ __param(0, (0, runtime_1.Body)()),
1906
+ __param(1, (0, runtime_1.Inject)())
1907
+ ], LemmyHttp.prototype, "userBlockInstanceCommunities", null);
1908
+ __decorate([
1909
+ (0, runtime_1.Security)("bearerAuth"),
1910
+ (0, runtime_1.Post)("/account/block/instance/persons"),
1911
+ (0, runtime_1.Tags)("Account", "Person"),
1767
1912
  __param(0, (0, runtime_1.Body)()),
1768
1913
  __param(1, (0, runtime_1.Inject)())
1769
- ], LemmyHttp.prototype, "userBlockInstance", null);
1914
+ ], LemmyHttp.prototype, "userBlockInstancePersons", null);
1770
1915
  __decorate([
1771
1916
  (0, runtime_1.Security)("bearerAuth"),
1772
1917
  (0, runtime_1.Post)("/admin/instance/block"),
@@ -1811,27 +1956,31 @@ __decorate([
1811
1956
  (0, runtime_1.Security)("bearerAuth"),
1812
1957
  (0, runtime_1.Post)("/community/icon"),
1813
1958
  (0, runtime_1.Tags)("Community", "Media"),
1814
- __param(0, (0, runtime_1.UploadedFile)()),
1815
- __param(1, (0, runtime_1.Inject)())
1959
+ __param(0, (0, runtime_1.Queries)()),
1960
+ __param(1, (0, runtime_1.UploadedFile)()),
1961
+ __param(2, (0, runtime_1.Inject)())
1816
1962
  ], LemmyHttp.prototype, "uploadCommunityIcon", null);
1817
1963
  __decorate([
1818
1964
  (0, runtime_1.Security)("bearerAuth"),
1819
1965
  (0, runtime_1.Delete)("/community/icon"),
1820
1966
  (0, runtime_1.Tags)("Community", "Media"),
1821
- __param(0, (0, runtime_1.Inject)())
1967
+ __param(0, (0, runtime_1.Body)()),
1968
+ __param(1, (0, runtime_1.Inject)())
1822
1969
  ], LemmyHttp.prototype, "deleteCommunityIcon", null);
1823
1970
  __decorate([
1824
1971
  (0, runtime_1.Security)("bearerAuth"),
1825
1972
  (0, runtime_1.Post)("/community/banner"),
1826
1973
  (0, runtime_1.Tags)("Community", "Media"),
1827
- __param(0, (0, runtime_1.UploadedFile)()),
1828
- __param(1, (0, runtime_1.Inject)())
1974
+ __param(0, (0, runtime_1.Queries)()),
1975
+ __param(1, (0, runtime_1.UploadedFile)()),
1976
+ __param(2, (0, runtime_1.Inject)())
1829
1977
  ], LemmyHttp.prototype, "uploadCommunityBanner", null);
1830
1978
  __decorate([
1831
1979
  (0, runtime_1.Security)("bearerAuth"),
1832
1980
  (0, runtime_1.Delete)("/community/banner"),
1833
1981
  (0, runtime_1.Tags)("Community", "Media"),
1834
- __param(0, (0, runtime_1.Inject)())
1982
+ __param(0, (0, runtime_1.Body)()),
1983
+ __param(1, (0, runtime_1.Inject)())
1835
1984
  ], LemmyHttp.prototype, "deleteCommunityBanner", null);
1836
1985
  __decorate([
1837
1986
  (0, runtime_1.Security)("bearerAuth"),
@@ -1867,20 +2016,76 @@ __decorate([
1867
2016
  __param(1, (0, runtime_1.Inject)())
1868
2017
  ], LemmyHttp.prototype, "uploadImage", null);
1869
2018
  __decorate([
1870
- (0, runtime_1.Security)("bearerAuth"),
1871
- (0, runtime_1.Delete)("/image"),
1872
- (0, runtime_1.Tags)("Media"),
1873
- __param(0, (0, runtime_1.Queries)()),
1874
- __param(1, (0, runtime_1.Inject)())
1875
- ], LemmyHttp.prototype, "deleteImage", null);
1876
- __decorate([
1877
- (0, runtime_1.Get)("image/health"),
2019
+ (0, runtime_1.Get)("/image/health"),
1878
2020
  (0, runtime_1.Tags)("Media"),
1879
2021
  __param(0, (0, runtime_1.Inject)())
1880
2022
  ], LemmyHttp.prototype, "imageHealth", null);
1881
2023
  __decorate([
2024
+ (0, runtime_1.Security)("bearerAuth"),
2025
+ (0, runtime_1.Post)("/account/donation_dialog_shown"),
2026
+ (0, runtime_1.Tags)("Account"),
1882
2027
  __param(0, (0, runtime_1.Inject)())
1883
- ], LemmyHttp.prototype, "donation_dialog_shown", null);
2028
+ ], LemmyHttp.prototype, "donationDialogShown", null);
2029
+ __decorate([
2030
+ (0, runtime_1.Security)("bearerAuth"),
2031
+ (0, runtime_1.Post)("/multi_community"),
2032
+ (0, runtime_1.Tags)("Multicommunity"),
2033
+ __param(0, (0, runtime_1.Body)()),
2034
+ __param(1, (0, runtime_1.Inject)())
2035
+ ], LemmyHttp.prototype, "createMultiCommunity", null);
2036
+ __decorate([
2037
+ (0, runtime_1.Security)("bearerAuth"),
2038
+ (0, runtime_1.Put)("/multi_community"),
2039
+ (0, runtime_1.Tags)("Multicommunity"),
2040
+ __param(0, (0, runtime_1.Body)()),
2041
+ __param(1, (0, runtime_1.Inject)())
2042
+ ], LemmyHttp.prototype, "updateMultiCommunity", null);
2043
+ __decorate([
2044
+ (0, runtime_1.Get)("/multi_community"),
2045
+ (0, runtime_1.Tags)("Multicommunity"),
2046
+ __param(0, (0, runtime_1.Queries)()),
2047
+ __param(1, (0, runtime_1.Inject)())
2048
+ ], LemmyHttp.prototype, "getMultiCommunity", null);
2049
+ __decorate([
2050
+ (0, runtime_1.Security)("bearerAuth"),
2051
+ (0, runtime_1.Post)("/multi_community/entry"),
2052
+ (0, runtime_1.Tags)("Multicommunity"),
2053
+ __param(0, (0, runtime_1.Body)()),
2054
+ __param(1, (0, runtime_1.Inject)())
2055
+ ], LemmyHttp.prototype, "createMultiCommunityEntry", null);
2056
+ __decorate([
2057
+ (0, runtime_1.Security)("bearerAuth"),
2058
+ (0, runtime_1.Delete)("/multi_community/entry"),
2059
+ (0, runtime_1.Tags)("Multicommunity"),
2060
+ __param(0, (0, runtime_1.Body)()),
2061
+ __param(1, (0, runtime_1.Inject)())
2062
+ ], LemmyHttp.prototype, "deleteMultiCommunityEntry", null);
2063
+ __decorate([
2064
+ (0, runtime_1.Get)("/multi_community/list"),
2065
+ (0, runtime_1.Tags)("Multicommunity"),
2066
+ __param(0, (0, runtime_1.Queries)()),
2067
+ __param(1, (0, runtime_1.Inject)())
2068
+ ], LemmyHttp.prototype, "listMultiCommunities", null);
2069
+ __decorate([
2070
+ (0, runtime_1.Post)("/multi_community/follow"),
2071
+ (0, runtime_1.Tags)("Multicommunity"),
2072
+ __param(0, (0, runtime_1.Body)()),
2073
+ __param(1, (0, runtime_1.Inject)())
2074
+ ], LemmyHttp.prototype, "followMultiCommunity", null);
2075
+ __decorate([
2076
+ (0, runtime_1.Security)("bearerAuth"),
2077
+ (0, runtime_1.Put)("/community/notifications"),
2078
+ (0, runtime_1.Tags)("Community"),
2079
+ __param(0, (0, runtime_1.Body)()),
2080
+ __param(1, (0, runtime_1.Inject)())
2081
+ ], LemmyHttp.prototype, "updateCommunityNotifications", null);
2082
+ __decorate([
2083
+ (0, runtime_1.Security)("bearerAuth"),
2084
+ (0, runtime_1.Put)("/post/notifications"),
2085
+ (0, runtime_1.Tags)("Post"),
2086
+ __param(0, (0, runtime_1.Body)()),
2087
+ __param(1, (0, runtime_1.Inject)())
2088
+ ], LemmyHttp.prototype, "updatePostNotifications", null);
1884
2089
  exports.LemmyHttp = LemmyHttp = __decorate([
1885
2090
  (0, runtime_1.Route)("api/v4")
1886
2091
  ], LemmyHttp);
@@ -1901,3 +2106,19 @@ function createFormData(image) {
1901
2106
  }
1902
2107
  return formData;
1903
2108
  }
2109
+ /**
2110
+ * A Lemmy error type.
2111
+ *
2112
+ * The name is the i18n translatable error code.
2113
+ * The msg is either an empty string, or extra non-translatable info.
2114
+ */
2115
+ class LemmyError extends Error {
2116
+ constructor(name, status, msg) {
2117
+ super(msg ?? "");
2118
+ this.name = name;
2119
+ this.status = status;
2120
+ // Set the prototype explicitly.
2121
+ Object.setPrototypeOf(this, LemmyError.prototype);
2122
+ }
2123
+ }
2124
+ exports.LemmyError = LemmyError;