lemmy-js-client 1.0.0-api-updates-4.1 → 1.0.0-api-updates-5.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 (138) hide show
  1. package/dist/http.d.ts +2 -3
  2. package/dist/http.js +25 -25
  3. package/dist/index.d.ts +7 -58
  4. package/dist/index.js +3 -0
  5. package/dist/types/GetModlog.d.ts +2 -2
  6. package/dist/types/GetModlogResponse.d.ts +2 -2
  7. package/dist/types/GetPersonDetailsResponse.d.ts +2 -0
  8. package/dist/types/GetPosts.d.ts +1 -0
  9. package/dist/types/GetSiteResponse.d.ts +6 -0
  10. package/dist/types/ListMultiCommunities.d.ts +13 -1
  11. package/dist/types/ListMultiCommunitiesResponse.d.ts +6 -0
  12. package/dist/types/Modlog.d.ts +10 -0
  13. package/dist/types/ModlogId.d.ts +1 -0
  14. package/dist/types/ModlogKind.d.ts +4 -0
  15. package/dist/types/ModlogView.d.ts +15 -0
  16. package/dist/types/MultiCommunity.d.ts +3 -0
  17. package/dist/types/MultiCommunityListingType.d.ts +4 -0
  18. package/dist/types/MultiCommunitySortType.d.ts +1 -0
  19. package/dist/types/MyUserInfo.d.ts +2 -0
  20. package/dist/types/Notification.d.ts +2 -20
  21. package/dist/types/NotificationData.d.ts +3 -30
  22. package/dist/types/NotificationDataType.d.ts +1 -1
  23. package/dist/types/RegistrationApplication.d.ts +1 -0
  24. package/package.json +4 -4
  25. package/dist/types/AdminAdd.d.ts +0 -12
  26. package/dist/types/AdminAddId.d.ts +0 -1
  27. package/dist/types/AdminAddView.d.ts +0 -10
  28. package/dist/types/AdminAllowInstance.d.ts +0 -11
  29. package/dist/types/AdminAllowInstance.js +0 -2
  30. package/dist/types/AdminAllowInstanceId.d.ts +0 -1
  31. package/dist/types/AdminAllowInstanceView.d.ts +0 -11
  32. package/dist/types/AdminAllowInstanceView.js +0 -2
  33. package/dist/types/AdminBan.d.ts +0 -16
  34. package/dist/types/AdminBan.js +0 -2
  35. package/dist/types/AdminBanId.d.ts +0 -1
  36. package/dist/types/AdminBanView.d.ts +0 -10
  37. package/dist/types/AdminBanView.js +0 -2
  38. package/dist/types/AdminBlockInstance.d.ts +0 -12
  39. package/dist/types/AdminBlockInstance.js +0 -2
  40. package/dist/types/AdminBlockInstanceId.d.ts +0 -1
  41. package/dist/types/AdminBlockInstanceView.d.ts +0 -11
  42. package/dist/types/AdminBlockInstanceView.js +0 -2
  43. package/dist/types/AdminPurgeComment.d.ts +0 -13
  44. package/dist/types/AdminPurgeComment.js +0 -2
  45. package/dist/types/AdminPurgeCommentId.d.ts +0 -1
  46. package/dist/types/AdminPurgeCommentId.js +0 -3
  47. package/dist/types/AdminPurgeCommentView.d.ts +0 -11
  48. package/dist/types/AdminPurgeCommentView.js +0 -2
  49. package/dist/types/AdminPurgeCommunity.d.ts +0 -11
  50. package/dist/types/AdminPurgeCommunity.js +0 -2
  51. package/dist/types/AdminPurgeCommunityId.d.ts +0 -1
  52. package/dist/types/AdminPurgeCommunityId.js +0 -3
  53. package/dist/types/AdminPurgeCommunityView.d.ts +0 -9
  54. package/dist/types/AdminPurgeCommunityView.js +0 -2
  55. package/dist/types/AdminPurgePerson.d.ts +0 -11
  56. package/dist/types/AdminPurgePerson.js +0 -2
  57. package/dist/types/AdminPurgePersonId.d.ts +0 -1
  58. package/dist/types/AdminPurgePersonId.js +0 -3
  59. package/dist/types/AdminPurgePersonView.d.ts +0 -9
  60. package/dist/types/AdminPurgePersonView.js +0 -2
  61. package/dist/types/AdminPurgePost.d.ts +0 -13
  62. package/dist/types/AdminPurgePost.js +0 -2
  63. package/dist/types/AdminPurgePostId.d.ts +0 -1
  64. package/dist/types/AdminPurgePostId.js +0 -3
  65. package/dist/types/AdminPurgePostView.d.ts +0 -11
  66. package/dist/types/AdminPurgePostView.js +0 -2
  67. package/dist/types/AdminRemoveCommunity.d.ts +0 -14
  68. package/dist/types/AdminRemoveCommunity.js +0 -2
  69. package/dist/types/AdminRemoveCommunityId.d.ts +0 -1
  70. package/dist/types/AdminRemoveCommunityId.js +0 -3
  71. package/dist/types/AdminRemoveCommunityView.d.ts +0 -11
  72. package/dist/types/AdminRemoveCommunityView.js +0 -2
  73. package/dist/types/BanFromCommunityResponse.d.ts +0 -8
  74. package/dist/types/BanFromCommunityResponse.js +0 -2
  75. package/dist/types/ModAddToCommunity.d.ts +0 -14
  76. package/dist/types/ModAddToCommunity.js +0 -2
  77. package/dist/types/ModAddToCommunityId.d.ts +0 -1
  78. package/dist/types/ModAddToCommunityId.js +0 -3
  79. package/dist/types/ModAddToCommunityView.d.ts +0 -12
  80. package/dist/types/ModAddToCommunityView.js +0 -2
  81. package/dist/types/ModBanFromCommunity.d.ts +0 -16
  82. package/dist/types/ModBanFromCommunity.js +0 -2
  83. package/dist/types/ModBanFromCommunityId.d.ts +0 -1
  84. package/dist/types/ModBanFromCommunityId.js +0 -3
  85. package/dist/types/ModBanFromCommunityView.d.ts +0 -12
  86. package/dist/types/ModBanFromCommunityView.js +0 -2
  87. package/dist/types/ModChangeCommunityVisibility.d.ts +0 -11
  88. package/dist/types/ModChangeCommunityVisibility.js +0 -2
  89. package/dist/types/ModChangeCommunityVisibilityId.d.ts +0 -1
  90. package/dist/types/ModChangeCommunityVisibilityId.js +0 -3
  91. package/dist/types/ModChangeCommunityVisibilityView.d.ts +0 -11
  92. package/dist/types/ModChangeCommunityVisibilityView.js +0 -2
  93. package/dist/types/ModFeaturePost.d.ts +0 -14
  94. package/dist/types/ModFeaturePost.js +0 -2
  95. package/dist/types/ModFeaturePostId.d.ts +0 -1
  96. package/dist/types/ModFeaturePostId.js +0 -3
  97. package/dist/types/ModFeaturePostView.d.ts +0 -14
  98. package/dist/types/ModFeaturePostView.js +0 -2
  99. package/dist/types/ModLockComment.d.ts +0 -14
  100. package/dist/types/ModLockComment.js +0 -2
  101. package/dist/types/ModLockCommentId.d.ts +0 -1
  102. package/dist/types/ModLockCommentId.js +0 -3
  103. package/dist/types/ModLockCommentView.d.ts +0 -16
  104. package/dist/types/ModLockCommentView.js +0 -2
  105. package/dist/types/ModLockPost.d.ts +0 -14
  106. package/dist/types/ModLockPost.js +0 -2
  107. package/dist/types/ModLockPostId.d.ts +0 -1
  108. package/dist/types/ModLockPostId.js +0 -3
  109. package/dist/types/ModLockPostView.d.ts +0 -14
  110. package/dist/types/ModLockPostView.js +0 -2
  111. package/dist/types/ModRemoveComment.d.ts +0 -14
  112. package/dist/types/ModRemoveComment.js +0 -2
  113. package/dist/types/ModRemoveCommentId.d.ts +0 -1
  114. package/dist/types/ModRemoveCommentId.js +0 -3
  115. package/dist/types/ModRemoveCommentView.d.ts +0 -16
  116. package/dist/types/ModRemoveCommentView.js +0 -2
  117. package/dist/types/ModRemovePost.d.ts +0 -14
  118. package/dist/types/ModRemovePost.js +0 -2
  119. package/dist/types/ModRemovePostId.d.ts +0 -1
  120. package/dist/types/ModRemovePostId.js +0 -3
  121. package/dist/types/ModRemovePostView.d.ts +0 -14
  122. package/dist/types/ModRemovePostView.js +0 -2
  123. package/dist/types/ModTransferCommunity.d.ts +0 -13
  124. package/dist/types/ModTransferCommunity.js +0 -2
  125. package/dist/types/ModTransferCommunityId.d.ts +0 -1
  126. package/dist/types/ModTransferCommunityId.js +0 -3
  127. package/dist/types/ModTransferCommunityView.d.ts +0 -12
  128. package/dist/types/ModTransferCommunityView.js +0 -2
  129. package/dist/types/ModlogActionType.d.ts +0 -4
  130. package/dist/types/ModlogActionType.js +0 -3
  131. package/dist/types/ModlogCombinedView.d.ts +0 -55
  132. package/dist/types/ModlogCombinedView.js +0 -2
  133. /package/dist/types/{AdminAdd.js → Modlog.js} +0 -0
  134. /package/dist/types/{AdminAddId.js → ModlogId.js} +0 -0
  135. /package/dist/types/{AdminAllowInstanceId.js → ModlogKind.js} +0 -0
  136. /package/dist/types/{AdminAddView.js → ModlogView.js} +0 -0
  137. /package/dist/types/{AdminBanId.js → MultiCommunityListingType.js} +0 -0
  138. /package/dist/types/{AdminBlockInstanceId.js → MultiCommunitySortType.js} +0 -0
package/dist/http.d.ts CHANGED
@@ -6,7 +6,6 @@ import { AddModToCommunity } from "./types/AddModToCommunity";
6
6
  import { AddModToCommunityResponse } from "./types/AddModToCommunityResponse";
7
7
  import { ApproveRegistrationApplication } from "./types/ApproveRegistrationApplication";
8
8
  import { BanFromCommunity } from "./types/BanFromCommunity";
9
- import { BanFromCommunityResponse } from "./types/BanFromCommunityResponse";
10
9
  import { MarkManyPostsAsRead } from "./types/MarkManyPostsAsRead";
11
10
  import { BanPerson } from "./types/BanPerson";
12
11
  import { BlockCommunity } from "./types/BlockCommunity";
@@ -302,7 +301,7 @@ export declare class LemmyHttp extends Controller {
302
301
  /**
303
302
  * @summary Ban a user from a community.
304
303
  */
305
- banFromCommunity(form: BanFromCommunity, options?: RequestOptions): Promise<BanFromCommunityResponse>;
304
+ banFromCommunity(form: BanFromCommunity, options?: RequestOptions): Promise<PersonResponse>;
306
305
  /**
307
306
  * @summary Add a moderator to your community.
308
307
  */
@@ -520,7 +519,7 @@ export declare class LemmyHttp extends Controller {
520
519
  */
521
520
  passwordChangeAfterReset(form: PasswordChangeAfterReset, options?: RequestOptions): Promise<SuccessResponse>;
522
521
  /**
523
- * @summary Mark all replies as read.
522
+ * @summary Mark all notifications as read.
524
523
  */
525
524
  markAllNotificationsAsRead(options?: RequestOptions): Promise<SuccessResponse>;
526
525
  /**
package/dist/http.js CHANGED
@@ -112,7 +112,7 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
112
112
  * @summary List login tokens for your user
113
113
  */
114
114
  async listLogins(options) {
115
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/list_logins", {}, options);
115
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/login/list", {}, options);
116
116
  }
117
117
  /**
118
118
  * @summary Returns an error message if your auth token is invalid
@@ -230,7 +230,7 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
230
230
  * @summary Delete a community.
231
231
  */
232
232
  async deleteCommunity(form, options) {
233
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/community/delete", form, options);
233
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/community", form, options);
234
234
  }
235
235
  /**
236
236
  * @summary Hide a community from public / "All" view. Admins only.
@@ -308,7 +308,7 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
308
308
  * @summary Delete a post.
309
309
  */
310
310
  async deletePost(form, options) {
311
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/post/delete", form, options);
311
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/post", form, options);
312
312
  }
313
313
  /**
314
314
  * @summary A moderator remove for a post.
@@ -404,7 +404,7 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
404
404
  * @summary Delete a comment.
405
405
  */
406
406
  async deleteComment(form, options) {
407
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/comment/delete", form, options);
407
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/comment", form, options);
408
408
  }
409
409
  /**
410
410
  * @summary A moderator remove for a comment.
@@ -488,7 +488,7 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
488
488
  * @summary Delete a private message.
489
489
  */
490
490
  async deletePrivateMessage(form, options) {
491
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/private_message/delete", form, options);
491
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/private_message", form, options);
492
492
  }
493
493
  /**
494
494
  * @summary Create a report for a private message.
@@ -566,7 +566,7 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
566
566
  * @summary Delete your account.
567
567
  */
568
568
  async deleteAccount(form, options) {
569
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/delete", form, options);
569
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/account", form, options);
570
570
  }
571
571
  /**
572
572
  * @summary Reset your password.
@@ -581,16 +581,16 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
581
581
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/auth/password_change", form, options);
582
582
  }
583
583
  /**
584
- * @summary Mark all replies as read.
584
+ * @summary Mark all notifications as read.
585
585
  */
586
586
  async markAllNotificationsAsRead(options) {
587
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/mark_as_read/all", {}, options);
587
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/notification/mark_as_read/all", {}, options);
588
588
  }
589
589
  /**
590
590
  * @summary Mark a notification as read.
591
591
  */
592
592
  async markNotificationAsRead(form, options) {
593
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/mark_as_read", form, options);
593
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/notification/mark_as_read", form, options);
594
594
  }
595
595
  /**
596
596
  * @summary Save your user settings.
@@ -614,13 +614,13 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
614
614
  * @summary Get your unread counts.
615
615
  */
616
616
  async getUnreadCount(options) {
617
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/unread_count", {}, options);
617
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/notification/count", {}, options);
618
618
  }
619
619
  /**
620
620
  * @summary Get your inbox (replies, comment mentions, post mentions, and messages)
621
621
  */
622
622
  async listNotifications(form, options) {
623
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/notifications", form, options);
623
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/notification/list", form, options);
624
624
  }
625
625
  /**
626
626
  * @summary Verify your email
@@ -752,7 +752,7 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
752
752
  * @summary Delete a tagline
753
753
  */
754
754
  async deleteTagline(form, options) {
755
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/admin/tagline/delete", form, options);
755
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/admin/tagline", form, options);
756
756
  }
757
757
  /**
758
758
  * @summary List taglines.
@@ -794,7 +794,7 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
794
794
  * @summary Delete an oauth provider method
795
795
  */
796
796
  async deleteOAuthProvider(form, options) {
797
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/oauth_provider/delete", form, options);
797
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/oauth_provider", form, options);
798
798
  }
799
799
  /**
800
800
  * @summary Authenticate with OAuth
@@ -1080,7 +1080,7 @@ __decorate([
1080
1080
  ], LemmyHttp.prototype, "importSettings", null);
1081
1081
  __decorate([
1082
1082
  (0, runtime_1.Security)("bearerAuth"),
1083
- (0, runtime_1.Get)("/account/list_logins"),
1083
+ (0, runtime_1.Get)("/account/login/list"),
1084
1084
  (0, runtime_1.Tags)("Account"),
1085
1085
  __param(0, (0, runtime_1.Inject)())
1086
1086
  ], LemmyHttp.prototype, "listLogins", null);
@@ -1216,7 +1216,7 @@ __decorate([
1216
1216
  ], LemmyHttp.prototype, "blockCommunity", null);
1217
1217
  __decorate([
1218
1218
  (0, runtime_1.Security)("bearerAuth"),
1219
- (0, runtime_1.Post)("/community/delete"),
1219
+ (0, runtime_1.Delete)("/community"),
1220
1220
  (0, runtime_1.Tags)("Community"),
1221
1221
  __param(0, (0, runtime_1.Body)()),
1222
1222
  __param(1, (0, runtime_1.Inject)())
@@ -1309,7 +1309,7 @@ __decorate([
1309
1309
  ], LemmyHttp.prototype, "modEditPost", null);
1310
1310
  __decorate([
1311
1311
  (0, runtime_1.Security)("bearerAuth"),
1312
- (0, runtime_1.Post)("/post/delete"),
1312
+ (0, runtime_1.Delete)("/post"),
1313
1313
  (0, runtime_1.Tags)("Post"),
1314
1314
  __param(0, (0, runtime_1.Body)()),
1315
1315
  __param(1, (0, runtime_1.Inject)())
@@ -1422,7 +1422,7 @@ __decorate([
1422
1422
  ], LemmyHttp.prototype, "editComment", null);
1423
1423
  __decorate([
1424
1424
  (0, runtime_1.Security)("bearerAuth"),
1425
- (0, runtime_1.Post)("/comment/delete"),
1425
+ (0, runtime_1.Delete)("/comment"),
1426
1426
  (0, runtime_1.Tags)("Comment"),
1427
1427
  __param(0, (0, runtime_1.Body)()),
1428
1428
  __param(1, (0, runtime_1.Inject)())
@@ -1523,7 +1523,7 @@ __decorate([
1523
1523
  ], LemmyHttp.prototype, "editPrivateMessage", null);
1524
1524
  __decorate([
1525
1525
  (0, runtime_1.Security)("bearerAuth"),
1526
- (0, runtime_1.Post)("/private_message/delete"),
1526
+ (0, runtime_1.Delete)("/private_message"),
1527
1527
  (0, runtime_1.Tags)("PrivateMessage"),
1528
1528
  __param(0, (0, runtime_1.Body)()),
1529
1529
  __param(1, (0, runtime_1.Inject)())
@@ -1611,7 +1611,7 @@ __decorate([
1611
1611
  ], LemmyHttp.prototype, "getCaptcha", null);
1612
1612
  __decorate([
1613
1613
  (0, runtime_1.Security)("bearerAuth"),
1614
- (0, runtime_1.Post)("/account/delete"),
1614
+ (0, runtime_1.Delete)("/account"),
1615
1615
  (0, runtime_1.Tags)("Account"),
1616
1616
  __param(0, (0, runtime_1.Body)()),
1617
1617
  __param(1, (0, runtime_1.Inject)())
@@ -1632,13 +1632,13 @@ __decorate([
1632
1632
  ], LemmyHttp.prototype, "passwordChangeAfterReset", null);
1633
1633
  __decorate([
1634
1634
  (0, runtime_1.Security)("bearerAuth"),
1635
- (0, runtime_1.Post)("/account/mark_as_read/all"),
1635
+ (0, runtime_1.Post)("/account/notification/mark_as_read/all"),
1636
1636
  (0, runtime_1.Tags)("Account"),
1637
1637
  __param(0, (0, runtime_1.Inject)())
1638
1638
  ], LemmyHttp.prototype, "markAllNotificationsAsRead", null);
1639
1639
  __decorate([
1640
1640
  (0, runtime_1.Security)("bearerAuth"),
1641
- (0, runtime_1.Post)("/account/mark_as_read"),
1641
+ (0, runtime_1.Post)("/account/notification/mark_as_read"),
1642
1642
  (0, runtime_1.Tags)("Account"),
1643
1643
  __param(0, (0, runtime_1.Body)()),
1644
1644
  __param(1, (0, runtime_1.Inject)())
@@ -1666,13 +1666,13 @@ __decorate([
1666
1666
  ], LemmyHttp.prototype, "getReportCount", null);
1667
1667
  __decorate([
1668
1668
  (0, runtime_1.Security)("bearerAuth"),
1669
- (0, runtime_1.Get)("/account/unread_count"),
1669
+ (0, runtime_1.Get)("/account/notification/count"),
1670
1670
  (0, runtime_1.Tags)("Account"),
1671
1671
  __param(0, (0, runtime_1.Inject)())
1672
1672
  ], LemmyHttp.prototype, "getUnreadCount", null);
1673
1673
  __decorate([
1674
1674
  (0, runtime_1.Security)("bearerAuth"),
1675
- (0, runtime_1.Get)("/account/notifications"),
1675
+ (0, runtime_1.Get)("/account/notification/list"),
1676
1676
  (0, runtime_1.Tags)("Account"),
1677
1677
  __param(0, (0, runtime_1.Queries)()),
1678
1678
  __param(1, (0, runtime_1.Inject)())
@@ -1824,7 +1824,7 @@ __decorate([
1824
1824
  ], LemmyHttp.prototype, "editTagline", null);
1825
1825
  __decorate([
1826
1826
  (0, runtime_1.Security)("bearerAuth"),
1827
- (0, runtime_1.Post)("/admin/tagline/delete"),
1827
+ (0, runtime_1.Delete)("/admin/tagline"),
1828
1828
  (0, runtime_1.Tags)("Admin", "Tagline"),
1829
1829
  __param(0, (0, runtime_1.Body)()),
1830
1830
  __param(1, (0, runtime_1.Inject)())
@@ -1874,7 +1874,7 @@ __decorate([
1874
1874
  ], LemmyHttp.prototype, "editOAuthProvider", null);
1875
1875
  __decorate([
1876
1876
  (0, runtime_1.Security)("bearerAuth"),
1877
- (0, runtime_1.Post)("/oauth_provider/delete"),
1877
+ (0, runtime_1.Delete)("/oauth_provider"),
1878
1878
  (0, runtime_1.Tags)("Miscellaneous", "OAuth"),
1879
1879
  __param(0, (0, runtime_1.Body)()),
1880
1880
  __param(1, (0, runtime_1.Inject)())
package/dist/index.d.ts CHANGED
@@ -5,43 +5,15 @@ export { AddAdmin } from "./types/AddAdmin";
5
5
  export { AddAdminResponse } from "./types/AddAdminResponse";
6
6
  export { AddModToCommunity } from "./types/AddModToCommunity";
7
7
  export { AddModToCommunityResponse } from "./types/AddModToCommunityResponse";
8
- export { AdminAdd } from "./types/AdminAdd";
9
- export { AdminAddId } from "./types/AdminAddId";
10
- export { AdminAddView } from "./types/AdminAddView";
11
- export { AdminAllowInstance } from "./types/AdminAllowInstance";
12
- export { AdminAllowInstanceId } from "./types/AdminAllowInstanceId";
13
8
  export { AdminAllowInstanceParams } from "./types/AdminAllowInstanceParams";
14
- export { AdminAllowInstanceView } from "./types/AdminAllowInstanceView";
15
- export { AdminBan } from "./types/AdminBan";
16
- export { AdminBanId } from "./types/AdminBanId";
17
- export { AdminBanView } from "./types/AdminBanView";
18
- export { AdminBlockInstance } from "./types/AdminBlockInstance";
19
- export { AdminBlockInstanceId } from "./types/AdminBlockInstanceId";
20
9
  export { AdminBlockInstanceParams } from "./types/AdminBlockInstanceParams";
21
- export { AdminBlockInstanceView } from "./types/AdminBlockInstanceView";
22
10
  export { AdminListUsers } from "./types/AdminListUsers";
23
11
  export { AdminListUsersResponse } from "./types/AdminListUsersResponse";
24
- export { AdminPurgeComment } from "./types/AdminPurgeComment";
25
- export { AdminPurgeCommentId } from "./types/AdminPurgeCommentId";
26
- export { AdminPurgeCommentView } from "./types/AdminPurgeCommentView";
27
- export { AdminPurgeCommunity } from "./types/AdminPurgeCommunity";
28
- export { AdminPurgeCommunityId } from "./types/AdminPurgeCommunityId";
29
- export { AdminPurgeCommunityView } from "./types/AdminPurgeCommunityView";
30
- export { AdminPurgePerson } from "./types/AdminPurgePerson";
31
- export { AdminPurgePersonId } from "./types/AdminPurgePersonId";
32
- export { AdminPurgePersonView } from "./types/AdminPurgePersonView";
33
- export { AdminPurgePost } from "./types/AdminPurgePost";
34
- export { AdminPurgePostId } from "./types/AdminPurgePostId";
35
- export { AdminPurgePostView } from "./types/AdminPurgePostView";
36
- export { AdminRemoveCommunity } from "./types/AdminRemoveCommunity";
37
- export { AdminRemoveCommunityId } from "./types/AdminRemoveCommunityId";
38
- export { AdminRemoveCommunityView } from "./types/AdminRemoveCommunityView";
39
- export {} from "./types/AllLemmyErrors";
12
+ export { AllLemmyErrors } from "./types/AllLemmyErrors";
40
13
  export { ApproveCommunityPendingFollower } from "./types/ApproveCommunityPendingFollower";
41
14
  export { ApproveRegistrationApplication } from "./types/ApproveRegistrationApplication";
42
15
  export { AuthenticateWithOauth } from "./types/AuthenticateWithOauth";
43
16
  export { BanFromCommunity } from "./types/BanFromCommunity";
44
- export { BanFromCommunityResponse } from "./types/BanFromCommunityResponse";
45
17
  export { BanPerson } from "./types/BanPerson";
46
18
  export { BlockCommunity } from "./types/BlockCommunity";
47
19
  export { BlockPerson } from "./types/BlockPerson";
@@ -220,41 +192,18 @@ export { LoginToken } from "./types/LoginToken";
220
192
  export { MarkManyPostsAsRead } from "./types/MarkManyPostsAsRead";
221
193
  export { MarkNotificationAsRead } from "./types/MarkNotificationAsRead";
222
194
  export { MarkPostAsRead } from "./types/MarkPostAsRead";
223
- export { ModAddToCommunity } from "./types/ModAddToCommunity";
224
- export { ModAddToCommunityId } from "./types/ModAddToCommunityId";
225
- export { ModAddToCommunityView } from "./types/ModAddToCommunityView";
226
- export { ModBanFromCommunity } from "./types/ModBanFromCommunity";
227
- export { ModBanFromCommunityId } from "./types/ModBanFromCommunityId";
228
- export { ModBanFromCommunityView } from "./types/ModBanFromCommunityView";
229
- export { ModChangeCommunityVisibility } from "./types/ModChangeCommunityVisibility";
230
- export { ModChangeCommunityVisibilityId } from "./types/ModChangeCommunityVisibilityId";
231
- export { ModChangeCommunityVisibilityView } from "./types/ModChangeCommunityVisibilityView";
232
195
  export { ModEditPost } from "./types/ModEditPost";
233
- export { ModFeaturePost } from "./types/ModFeaturePost";
234
- export { ModFeaturePostId } from "./types/ModFeaturePostId";
235
- export { ModFeaturePostView } from "./types/ModFeaturePostView";
236
- export { ModLockComment } from "./types/ModLockComment";
237
- export { ModLockCommentId } from "./types/ModLockCommentId";
238
- export { ModLockCommentView } from "./types/ModLockCommentView";
239
- export { ModLockPost } from "./types/ModLockPost";
240
- export { ModLockPostId } from "./types/ModLockPostId";
241
- export { ModLockPostView } from "./types/ModLockPostView";
242
- export { ModRemoveComment } from "./types/ModRemoveComment";
243
- export { ModRemoveCommentId } from "./types/ModRemoveCommentId";
244
- export { ModRemoveCommentView } from "./types/ModRemoveCommentView";
245
- export { ModRemovePost } from "./types/ModRemovePost";
246
- export { ModRemovePostId } from "./types/ModRemovePostId";
247
- export { ModRemovePostView } from "./types/ModRemovePostView";
248
- export { ModTransferCommunity } from "./types/ModTransferCommunity";
249
- export { ModTransferCommunityId } from "./types/ModTransferCommunityId";
250
- export { ModTransferCommunityView } from "./types/ModTransferCommunityView";
251
- export { ModlogActionType } from "./types/ModlogActionType";
252
- export { ModlogCombinedView } from "./types/ModlogCombinedView";
196
+ export { Modlog } from "./types/Modlog";
197
+ export { ModlogId } from "./types/ModlogId";
198
+ export { ModlogKind } from "./types/ModlogKind";
199
+ export { ModlogView } from "./types/ModlogView";
253
200
  export { MultiCommunity } from "./types/MultiCommunity";
254
201
  export { MultiCommunityEntry } from "./types/MultiCommunityEntry";
255
202
  export { MultiCommunityFollow } from "./types/MultiCommunityFollow";
256
203
  export { MultiCommunityId } from "./types/MultiCommunityId";
204
+ export { MultiCommunityListingType } from "./types/MultiCommunityListingType";
257
205
  export { MultiCommunityResponse } from "./types/MultiCommunityResponse";
206
+ export { MultiCommunitySortType } from "./types/MultiCommunitySortType";
258
207
  export { MultiCommunityView } from "./types/MultiCommunityView";
259
208
  export { MyUserInfo } from "./types/MyUserInfo";
260
209
  export { NotePerson } from "./types/NotePerson";
package/dist/index.js CHANGED
@@ -14,4 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.AllLemmyErrors = void 0;
17
18
  __exportStar(require("./http"), exports);
19
+ var AllLemmyErrors_1 = require("./types/AllLemmyErrors");
20
+ Object.defineProperty(exports, "AllLemmyErrors", { enumerable: true, get: function () { return AllLemmyErrors_1.AllLemmyErrors; } });
@@ -1,7 +1,7 @@
1
1
  import type { CommentId } from "./CommentId";
2
2
  import type { CommunityId } from "./CommunityId";
3
3
  import type { ListingType } from "./ListingType";
4
- import type { ModlogActionType } from "./ModlogActionType";
4
+ import type { ModlogKind } from "./ModlogKind";
5
5
  import type { PaginationCursor } from "./PaginationCursor";
6
6
  import type { PersonId } from "./PersonId";
7
7
  import type { PostId } from "./PostId";
@@ -20,7 +20,7 @@ export type GetModlog = {
20
20
  /**
21
21
  * Filter by the modlog action type.
22
22
  */
23
- type_?: ModlogActionType;
23
+ type_?: ModlogKind;
24
24
  /**
25
25
  * Filter by listing type. When not using All, it will remove the non-community modlog entries,
26
26
  * such as site bans, instance blocks, adding an admin, etc.
@@ -1,10 +1,10 @@
1
- import type { ModlogCombinedView } from "./ModlogCombinedView";
1
+ import type { ModlogView } from "./ModlogView";
2
2
  import type { PaginationCursor } from "./PaginationCursor";
3
3
  /**
4
4
  * The modlog fetch response.
5
5
  */
6
6
  export type GetModlogResponse = {
7
- modlog: Array<ModlogCombinedView>;
7
+ modlog: Array<ModlogView>;
8
8
  /**
9
9
  * the pagination cursor to use to fetch the next page
10
10
  */
@@ -1,4 +1,5 @@
1
1
  import type { CommunityModeratorView } from "./CommunityModeratorView";
2
+ import type { MultiCommunityView } from "./MultiCommunityView";
2
3
  import type { PersonView } from "./PersonView";
3
4
  import type { Site } from "./Site";
4
5
  /**
@@ -8,4 +9,5 @@ export type GetPersonDetailsResponse = {
8
9
  person_view: PersonView;
9
10
  site?: Site;
10
11
  moderates: Array<CommunityModeratorView>;
12
+ multi_communities_created: Array<MultiCommunityView>;
11
13
  };
@@ -18,6 +18,7 @@ export type GetPosts = {
18
18
  community_id?: CommunityId;
19
19
  community_name?: string;
20
20
  multi_community_id?: MultiCommunityId;
21
+ multi_community_name?: string;
21
22
  show_hidden?: boolean;
22
23
  /**
23
24
  * If true, then show the read posts (even if your user setting is to hide them)
@@ -28,4 +28,10 @@ export type GetSiteResponse = {
28
28
  blocked_urls: Array<LocalSiteUrlBlocklist>;
29
29
  image_upload_disabled: boolean;
30
30
  active_plugins: Array<PluginMetadata>;
31
+ /**
32
+ * The number of seconds between the last application published, and approved / denied time.
33
+ *
34
+ * Useful for estimating when your application will be approved.
35
+ */
36
+ last_application_duration_seconds?: number;
31
37
  };
@@ -1,5 +1,17 @@
1
+ import type { MultiCommunityListingType } from "./MultiCommunityListingType";
2
+ import type { MultiCommunitySortType } from "./MultiCommunitySortType";
3
+ import type { PaginationCursor } from "./PaginationCursor";
1
4
  import type { PersonId } from "./PersonId";
2
5
  export type ListMultiCommunities = {
6
+ type_?: MultiCommunityListingType;
7
+ sort?: MultiCommunitySortType;
3
8
  creator_id?: PersonId;
4
- followed_only?: boolean;
9
+ /**
10
+ * Filter to within a given time range, in seconds.
11
+ * IE 60 would give results for the past minute.
12
+ */
13
+ time_range_seconds?: number;
14
+ page_cursor?: PaginationCursor;
15
+ page_back?: boolean;
16
+ limit?: number;
5
17
  };
@@ -1,4 +1,10 @@
1
1
  import type { MultiCommunityView } from "./MultiCommunityView";
2
+ import type { PaginationCursor } from "./PaginationCursor";
2
3
  export type ListMultiCommunitiesResponse = {
3
4
  multi_communities: Array<MultiCommunityView>;
5
+ /**
6
+ * the pagination cursor to use to fetch the next page
7
+ */
8
+ next_page?: PaginationCursor;
9
+ prev_page?: PaginationCursor;
4
10
  };
@@ -0,0 +1,10 @@
1
+ import type { ModlogId } from "./ModlogId";
2
+ import type { ModlogKind } from "./ModlogKind";
3
+ export type Modlog = {
4
+ id: ModlogId;
5
+ kind: ModlogKind;
6
+ is_revert: boolean;
7
+ reason?: string;
8
+ expires_at?: string;
9
+ published_at: string;
10
+ };
@@ -0,0 +1 @@
1
+ export type ModlogId = number;
@@ -0,0 +1,4 @@
1
+ /**
2
+ * A list of possible types for the various modlog actions.
3
+ */
4
+ export type ModlogKind = "admin_add" | "admin_ban" | "admin_allow_instance" | "admin_block_instance" | "admin_purge_comment" | "admin_purge_community" | "admin_purge_person" | "admin_purge_post" | "mod_add_to_community" | "mod_ban_from_community" | "admin_feature_post_site" | "mod_feature_post_community" | "mod_change_community_visibility" | "mod_lock_post" | "mod_remove_comment" | "admin_remove_community" | "mod_remove_post" | "mod_transfer_community" | "mod_lock_comment";
@@ -0,0 +1,15 @@
1
+ import type { Comment } from "./Comment";
2
+ import type { Community } from "./Community";
3
+ import type { Instance } from "./Instance";
4
+ import type { Modlog } from "./Modlog";
5
+ import type { Person } from "./Person";
6
+ import type { Post } from "./Post";
7
+ export type ModlogView = {
8
+ modlog: Modlog;
9
+ moderator?: Person;
10
+ target_person?: Person;
11
+ target_instance?: Instance;
12
+ target_community?: Community;
13
+ target_post?: Post;
14
+ target_comment?: Comment;
15
+ };
@@ -14,4 +14,7 @@ export type MultiCommunity = {
14
14
  ap_id: DbUrl;
15
15
  published_at: string;
16
16
  updated_at?: string;
17
+ subscribers: number;
18
+ subscribers_local: number;
19
+ communities: number;
17
20
  };
@@ -0,0 +1,4 @@
1
+ /**
2
+ * A listing type for multi-community fetches.
3
+ */
4
+ export type MultiCommunityListingType = "all" | "local" | "subscribed";
@@ -0,0 +1 @@
1
+ export type MultiCommunitySortType = "new" | "old" | "name_asc" | "name_desc" | "communities" | "subscribers" | "subscribers_local";
@@ -4,6 +4,7 @@ import type { CommunityModeratorView } from "./CommunityModeratorView";
4
4
  import type { Instance } from "./Instance";
5
5
  import type { LanguageId } from "./LanguageId";
6
6
  import type { LocalUserView } from "./LocalUserView";
7
+ import type { MultiCommunityView } from "./MultiCommunityView";
7
8
  import type { Person } from "./Person";
8
9
  /**
9
10
  * Your user info.
@@ -12,6 +13,7 @@ export type MyUserInfo = {
12
13
  local_user_view: LocalUserView;
13
14
  follows: Array<CommunityFollowerView>;
14
15
  moderates: Array<CommunityModeratorView>;
16
+ multi_community_follows: Array<MultiCommunityView>;
15
17
  community_blocks: Array<Community>;
16
18
  instance_communities_blocks: Array<Instance>;
17
19
  instance_persons_blocks: Array<Instance>;
@@ -1,14 +1,5 @@
1
- import type { AdminAddId } from "./AdminAddId";
2
- import type { AdminBanId } from "./AdminBanId";
3
- import type { AdminRemoveCommunityId } from "./AdminRemoveCommunityId";
4
1
  import type { CommentId } from "./CommentId";
5
- import type { ModAddToCommunityId } from "./ModAddToCommunityId";
6
- import type { ModBanFromCommunityId } from "./ModBanFromCommunityId";
7
- import type { ModLockCommentId } from "./ModLockCommentId";
8
- import type { ModLockPostId } from "./ModLockPostId";
9
- import type { ModRemoveCommentId } from "./ModRemoveCommentId";
10
- import type { ModRemovePostId } from "./ModRemovePostId";
11
- import type { ModTransferCommunityId } from "./ModTransferCommunityId";
2
+ import type { ModlogId } from "./ModlogId";
12
3
  import type { NotificationId } from "./NotificationId";
13
4
  import type { NotificationType } from "./NotificationType";
14
5
  import type { PersonId } from "./PersonId";
@@ -23,14 +14,5 @@ export type Notification = {
23
14
  kind: NotificationType;
24
15
  post_id?: PostId;
25
16
  private_message_id?: PrivateMessageId;
26
- admin_add_id?: AdminAddId;
27
- mod_add_to_community_id?: ModAddToCommunityId;
28
- admin_ban_id?: AdminBanId;
29
- mod_ban_from_community_id?: ModBanFromCommunityId;
30
- mod_lock_post_id?: ModLockPostId;
31
- mod_remove_comment_id?: ModRemoveCommentId;
32
- admin_remove_community_id?: AdminRemoveCommunityId;
33
- mod_remove_post_id?: ModRemovePostId;
34
- mod_lock_comment_id?: ModLockCommentId;
35
- mod_transfer_community_id?: ModTransferCommunityId;
17
+ modlog_id?: ModlogId;
36
18
  };
@@ -1,14 +1,5 @@
1
- import type { AdminAdd } from "./AdminAdd";
2
- import type { AdminBan } from "./AdminBan";
3
- import type { AdminRemoveCommunity } from "./AdminRemoveCommunity";
4
1
  import type { CommentView } from "./CommentView";
5
- import type { ModAddToCommunity } from "./ModAddToCommunity";
6
- import type { ModBanFromCommunity } from "./ModBanFromCommunity";
7
- import type { ModLockComment } from "./ModLockComment";
8
- import type { ModLockPost } from "./ModLockPost";
9
- import type { ModRemoveComment } from "./ModRemoveComment";
10
- import type { ModRemovePost } from "./ModRemovePost";
11
- import type { ModTransferCommunity } from "./ModTransferCommunity";
2
+ import type { ModlogView } from "./ModlogView";
12
3
  import type { PostView } from "./PostView";
13
4
  import type { PrivateMessageView } from "./PrivateMessageView";
14
5
  export type NotificationData = ({
@@ -18,23 +9,5 @@ export type NotificationData = ({
18
9
  } & PostView) | ({
19
10
  type_: "private_message";
20
11
  } & PrivateMessageView) | ({
21
- type_: "admin_add";
22
- } & AdminAdd) | ({
23
- type_: "mod_add_to_community";
24
- } & ModAddToCommunity) | ({
25
- type_: "admin_ban";
26
- } & AdminBan) | ({
27
- type_: "mod_ban_from_community";
28
- } & ModBanFromCommunity) | ({
29
- type_: "mod_lock_post";
30
- } & ModLockPost) | ({
31
- type_: "mod_lock_comment";
32
- } & ModLockComment) | ({
33
- type_: "mod_remove_post";
34
- } & ModRemovePost) | ({
35
- type_: "mod_remove_comment";
36
- } & ModRemoveComment) | ({
37
- type_: "admin_remove_community";
38
- } & AdminRemoveCommunity) | ({
39
- type_: "mod_transfer_community";
40
- } & ModTransferCommunity);
12
+ type_: "mod_action";
13
+ } & ModlogView);
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * A list of possible types for the inbox.
3
3
  */
4
- export type NotificationDataType = "all" | "reply" | "mention" | "private_message" | "subscribed";
4
+ export type NotificationDataType = "all" | "reply" | "mention" | "private_message" | "subscribed" | "mod_action";
@@ -11,4 +11,5 @@ export type RegistrationApplication = {
11
11
  admin_id?: PersonId;
12
12
  deny_reason?: string;
13
13
  published_at: string;
14
+ updated_at?: string;
14
15
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "lemmy-js-client",
3
3
  "description": "A javascript / typescript client for Lemmy",
4
- "version": "1.0.0-api-updates-4.1",
4
+ "version": "1.0.0-api-updates-5.0",
5
5
  "author": "Dessalines",
6
6
  "license": "AGPL-3.0",
7
7
  "main": "./dist/index.js",
@@ -25,7 +25,7 @@
25
25
  "devDependencies": {
26
26
  "@eslint/js": "^9.20.0",
27
27
  "@redocly/cli": "^2.0.0",
28
- "@types/node": "^22.7.4",
28
+ "@types/node": "^24.0.0",
29
29
  "@typescript-eslint/eslint-plugin": "^8.7.0",
30
30
  "@typescript-eslint/parser": "^8.7.0",
31
31
  "ajv": "^8.17.1",
@@ -38,13 +38,13 @@
38
38
  "prettier-plugin-import-sort": "^0.0.7",
39
39
  "prettier-plugin-organize-imports": "^4.0.0",
40
40
  "prettier-plugin-packagejson": "^2.5.1",
41
- "sortpack": "^3.0.0",
41
+ "sortpack": "^4.0.0",
42
42
  "tsoa": "^6.6.0",
43
43
  "typedoc": "^0.28.0",
44
44
  "typescript": "^5.5.4",
45
45
  "typescript-eslint": "^8.7.0"
46
46
  },
47
- "packageManager": "pnpm@10.18.3",
47
+ "packageManager": "pnpm@10.20.0",
48
48
  "types": "./dist/index.d.ts",
49
49
  "lint-staged": {
50
50
  "*.{ts,tsx,js}": [