lemmy-js-client 1.0.0-multi-community-follow-state.2 → 1.0.0-multi-community-name-get-posts.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 (184) hide show
  1. package/dist/http.d.ts +4 -5
  2. package/dist/http.js +8 -8
  3. package/dist/index.d.ts +11 -59
  4. package/dist/other_types.d.ts +3 -3
  5. package/dist/types/AuthenticateWithOauth.d.ts +4 -0
  6. package/dist/types/ChangePassword.d.ts +4 -0
  7. package/dist/types/CommentActions.d.ts +6 -6
  8. package/dist/types/CommentSortType.d.ts +1 -1
  9. package/dist/types/CommunityActions.d.ts +4 -4
  10. package/dist/types/CommunityFollowerState.d.ts +1 -1
  11. package/dist/types/CommunityNotificationsMode.d.ts +1 -1
  12. package/dist/types/CommunitySortType.d.ts +1 -1
  13. package/dist/types/CommunityVisibility.d.ts +1 -1
  14. package/dist/types/CreateCommentLike.d.ts +2 -2
  15. package/dist/types/CreatePostLike.d.ts +2 -2
  16. package/dist/types/FederatedInstanceView.d.ts +12 -0
  17. package/dist/types/FederationAllowList.d.ts +4 -0
  18. package/dist/types/FederationBlockList.d.ts +0 -2
  19. package/dist/types/FederationBlockList.js +1 -0
  20. package/dist/types/FederationMode.d.ts +1 -1
  21. package/dist/types/FederationQueueState.d.ts +18 -0
  22. package/dist/types/GetFederatedInstances.d.ts +9 -0
  23. package/dist/types/GetFederatedInstancesKind.d.ts +1 -0
  24. package/dist/types/GetFederatedInstancesResponse.d.ts +5 -5
  25. package/dist/types/GetModlog.d.ts +2 -2
  26. package/dist/types/GetModlogResponse.d.ts +2 -2
  27. package/dist/types/GetPosts.d.ts +1 -0
  28. package/dist/types/LikeType.d.ts +1 -1
  29. package/dist/types/ListCommunityPendingFollows.d.ts +1 -1
  30. package/dist/types/ListCommunityPendingFollowsResponse.d.ts +2 -2
  31. package/dist/types/ListingType.d.ts +1 -1
  32. package/dist/types/Login.d.ts +4 -0
  33. package/dist/types/MarkManyPostsAsRead.d.ts +1 -0
  34. package/dist/types/Modlog.d.ts +10 -0
  35. package/dist/types/ModlogId.d.ts +1 -0
  36. package/dist/types/ModlogKind.d.ts +4 -0
  37. package/dist/types/ModlogView.d.ts +15 -0
  38. package/dist/types/MultiCommunityEntry.d.ts +6 -0
  39. package/dist/types/Notification.d.ts +2 -20
  40. package/dist/types/NotificationData.d.ts +6 -33
  41. package/dist/types/NotificationDataType.d.ts +1 -1
  42. package/dist/types/NotificationType.d.ts +1 -1
  43. package/dist/types/PendingFollowerView.d.ts +9 -0
  44. package/dist/types/PersonContentCombinedView.d.ts +2 -2
  45. package/dist/types/PersonContentType.d.ts +1 -1
  46. package/dist/types/PersonLikedCombinedView.d.ts +2 -2
  47. package/dist/types/PersonSavedCombinedView.d.ts +2 -2
  48. package/dist/types/Post.d.ts +4 -4
  49. package/dist/types/PostActions.d.ts +11 -11
  50. package/dist/types/PostFeatureType.d.ts +1 -1
  51. package/dist/types/PostListingMode.d.ts +1 -1
  52. package/dist/types/PostNotificationsMode.d.ts +1 -1
  53. package/dist/types/PostOrCommentOrPrivateMessage.d.ts +3 -3
  54. package/dist/types/PostSortType.d.ts +1 -1
  55. package/dist/types/Register.d.ts +4 -0
  56. package/dist/types/RegistrationMode.d.ts +1 -1
  57. package/dist/types/ReportCombinedView.d.ts +4 -4
  58. package/dist/types/ReportType.d.ts +1 -1
  59. package/dist/types/SearchCombinedView.d.ts +5 -5
  60. package/dist/types/SearchSortType.d.ts +1 -1
  61. package/dist/types/SearchType.d.ts +1 -1
  62. package/dist/types/UntranslatedError.d.ts +3 -1
  63. package/dist/types/UserSettingsBackup.d.ts +2 -0
  64. package/dist/types/VoteShow.d.ts +1 -1
  65. package/dist/types/VoteView.d.ts +4 -1
  66. package/package.json +3 -3
  67. package/dist/types/AdminAdd.d.ts +0 -12
  68. package/dist/types/AdminAddId.d.ts +0 -1
  69. package/dist/types/AdminAddView.d.ts +0 -10
  70. package/dist/types/AdminAllowInstance.d.ts +0 -11
  71. package/dist/types/AdminAllowInstanceId.d.ts +0 -1
  72. package/dist/types/AdminAllowInstanceView.d.ts +0 -11
  73. package/dist/types/AdminBan.d.ts +0 -16
  74. package/dist/types/AdminBanId.d.ts +0 -1
  75. package/dist/types/AdminBanView.d.ts +0 -10
  76. package/dist/types/AdminBlockInstance.d.ts +0 -12
  77. package/dist/types/AdminBlockInstanceId.d.ts +0 -1
  78. package/dist/types/AdminBlockInstanceView.d.ts +0 -11
  79. package/dist/types/AdminBlockInstanceView.js +0 -2
  80. package/dist/types/AdminPurgeComment.d.ts +0 -13
  81. package/dist/types/AdminPurgeComment.js +0 -2
  82. package/dist/types/AdminPurgeCommentId.d.ts +0 -1
  83. package/dist/types/AdminPurgeCommentId.js +0 -3
  84. package/dist/types/AdminPurgeCommentView.d.ts +0 -11
  85. package/dist/types/AdminPurgeCommentView.js +0 -2
  86. package/dist/types/AdminPurgeCommunity.d.ts +0 -11
  87. package/dist/types/AdminPurgeCommunity.js +0 -2
  88. package/dist/types/AdminPurgeCommunityId.d.ts +0 -1
  89. package/dist/types/AdminPurgeCommunityId.js +0 -3
  90. package/dist/types/AdminPurgeCommunityView.d.ts +0 -9
  91. package/dist/types/AdminPurgeCommunityView.js +0 -2
  92. package/dist/types/AdminPurgePerson.d.ts +0 -11
  93. package/dist/types/AdminPurgePerson.js +0 -2
  94. package/dist/types/AdminPurgePersonId.d.ts +0 -1
  95. package/dist/types/AdminPurgePersonId.js +0 -3
  96. package/dist/types/AdminPurgePersonView.d.ts +0 -9
  97. package/dist/types/AdminPurgePersonView.js +0 -2
  98. package/dist/types/AdminPurgePost.d.ts +0 -13
  99. package/dist/types/AdminPurgePost.js +0 -2
  100. package/dist/types/AdminPurgePostId.d.ts +0 -1
  101. package/dist/types/AdminPurgePostId.js +0 -3
  102. package/dist/types/AdminPurgePostView.d.ts +0 -11
  103. package/dist/types/AdminPurgePostView.js +0 -2
  104. package/dist/types/AdminRemoveCommunity.d.ts +0 -14
  105. package/dist/types/AdminRemoveCommunity.js +0 -2
  106. package/dist/types/AdminRemoveCommunityId.d.ts +0 -1
  107. package/dist/types/AdminRemoveCommunityId.js +0 -3
  108. package/dist/types/AdminRemoveCommunityView.d.ts +0 -11
  109. package/dist/types/AdminRemoveCommunityView.js +0 -2
  110. package/dist/types/BanFromCommunityResponse.d.ts +0 -8
  111. package/dist/types/BanFromCommunityResponse.js +0 -2
  112. package/dist/types/FederatedInstances.d.ts +0 -9
  113. package/dist/types/FederatedInstances.js +0 -2
  114. package/dist/types/GetCommunityPendingFollowsCount.d.ts +0 -4
  115. package/dist/types/GetCommunityPendingFollowsCount.js +0 -2
  116. package/dist/types/ModAddToCommunity.d.ts +0 -14
  117. package/dist/types/ModAddToCommunity.js +0 -2
  118. package/dist/types/ModAddToCommunityId.d.ts +0 -1
  119. package/dist/types/ModAddToCommunityId.js +0 -3
  120. package/dist/types/ModAddToCommunityView.d.ts +0 -12
  121. package/dist/types/ModAddToCommunityView.js +0 -2
  122. package/dist/types/ModBanFromCommunity.d.ts +0 -16
  123. package/dist/types/ModBanFromCommunity.js +0 -2
  124. package/dist/types/ModBanFromCommunityId.d.ts +0 -1
  125. package/dist/types/ModBanFromCommunityId.js +0 -3
  126. package/dist/types/ModBanFromCommunityView.d.ts +0 -12
  127. package/dist/types/ModBanFromCommunityView.js +0 -2
  128. package/dist/types/ModChangeCommunityVisibility.d.ts +0 -11
  129. package/dist/types/ModChangeCommunityVisibility.js +0 -2
  130. package/dist/types/ModChangeCommunityVisibilityId.d.ts +0 -1
  131. package/dist/types/ModChangeCommunityVisibilityId.js +0 -3
  132. package/dist/types/ModChangeCommunityVisibilityView.d.ts +0 -11
  133. package/dist/types/ModChangeCommunityVisibilityView.js +0 -2
  134. package/dist/types/ModFeaturePost.d.ts +0 -14
  135. package/dist/types/ModFeaturePost.js +0 -2
  136. package/dist/types/ModFeaturePostId.d.ts +0 -1
  137. package/dist/types/ModFeaturePostId.js +0 -3
  138. package/dist/types/ModFeaturePostView.d.ts +0 -14
  139. package/dist/types/ModFeaturePostView.js +0 -2
  140. package/dist/types/ModLockComment.d.ts +0 -14
  141. package/dist/types/ModLockComment.js +0 -2
  142. package/dist/types/ModLockCommentId.d.ts +0 -1
  143. package/dist/types/ModLockCommentId.js +0 -3
  144. package/dist/types/ModLockCommentView.d.ts +0 -16
  145. package/dist/types/ModLockCommentView.js +0 -2
  146. package/dist/types/ModLockPost.d.ts +0 -14
  147. package/dist/types/ModLockPost.js +0 -2
  148. package/dist/types/ModLockPostId.d.ts +0 -1
  149. package/dist/types/ModLockPostId.js +0 -3
  150. package/dist/types/ModLockPostView.d.ts +0 -14
  151. package/dist/types/ModLockPostView.js +0 -2
  152. package/dist/types/ModRemoveComment.d.ts +0 -14
  153. package/dist/types/ModRemoveComment.js +0 -2
  154. package/dist/types/ModRemoveCommentId.d.ts +0 -1
  155. package/dist/types/ModRemoveCommentId.js +0 -3
  156. package/dist/types/ModRemoveCommentView.d.ts +0 -16
  157. package/dist/types/ModRemoveCommentView.js +0 -2
  158. package/dist/types/ModRemovePost.d.ts +0 -14
  159. package/dist/types/ModRemovePost.js +0 -2
  160. package/dist/types/ModRemovePostId.d.ts +0 -1
  161. package/dist/types/ModRemovePostId.js +0 -3
  162. package/dist/types/ModRemovePostView.d.ts +0 -14
  163. package/dist/types/ModRemovePostView.js +0 -2
  164. package/dist/types/ModTransferCommunity.d.ts +0 -13
  165. package/dist/types/ModTransferCommunity.js +0 -2
  166. package/dist/types/ModTransferCommunityId.d.ts +0 -1
  167. package/dist/types/ModTransferCommunityId.js +0 -3
  168. package/dist/types/ModTransferCommunityView.d.ts +0 -12
  169. package/dist/types/ModTransferCommunityView.js +0 -2
  170. package/dist/types/ModlogActionType.d.ts +0 -4
  171. package/dist/types/ModlogActionType.js +0 -3
  172. package/dist/types/ModlogCombinedView.d.ts +0 -55
  173. package/dist/types/ModlogCombinedView.js +0 -2
  174. /package/dist/types/{AdminAdd.js → FederatedInstanceView.js} +0 -0
  175. /package/dist/types/{AdminAddId.js → FederationAllowList.js} +0 -0
  176. /package/dist/types/{AdminAddView.js → FederationQueueState.js} +0 -0
  177. /package/dist/types/{AdminAllowInstance.js → GetFederatedInstances.js} +0 -0
  178. /package/dist/types/{AdminAllowInstanceId.js → GetFederatedInstancesKind.js} +0 -0
  179. /package/dist/types/{AdminAllowInstanceView.js → Modlog.js} +0 -0
  180. /package/dist/types/{AdminBanId.js → ModlogId.js} +0 -0
  181. /package/dist/types/{AdminBlockInstanceId.js → ModlogKind.js} +0 -0
  182. /package/dist/types/{AdminBan.js → ModlogView.js} +0 -0
  183. /package/dist/types/{AdminBanView.js → MultiCommunityEntry.js} +0 -0
  184. /package/dist/types/{AdminBlockInstance.js → PendingFollowerView.js} +0 -0
package/dist/http.d.ts CHANGED
@@ -1,12 +1,11 @@
1
1
  import { Controller } from "@tsoa/runtime";
2
- import { AdminListUsersI, CommunityIdQueryI, DeleteImageParamsI, GetCommentI, GetCommentsI, GetCommunityI, GetCommunityPendingFollowsCountI, GetModlogI, GetMultiCommunityI, GetPersonDetailsI, GetPostI, GetPostsI, GetRandomCommunityI, GetRegistrationApplicationI, GetReportCountI, GetSiteMetadataI, ListCommentLikesI, ListCommunitiesI, ListCommunityPendingFollowsI, ListCustomEmojisI, ListNotificationsI, ListMediaI, ListMultiCommunitiesI, ListPersonContentI, ListPersonHiddenI, ListPersonLikedI, ListPersonReadI, ListPersonSavedI, ListPostLikesI, ListRegistrationApplicationsI, ListReportsI, ListTaglinesI, ResolveObjectI, SearchI, UploadImage } from "./other_types";
2
+ import { AdminListUsersI, CommunityIdQueryI, DeleteImageParamsI, GetCommentI, GetCommentsI, GetCommunityI, GetModlogI, GetMultiCommunityI, GetPersonDetailsI, GetPostI, GetPostsI, GetRandomCommunityI, GetRegistrationApplicationI, GetReportCountI, GetSiteMetadataI, ListCommentLikesI, ListCommunitiesI, ListCommunityPendingFollowsI, ListCustomEmojisI, ListNotificationsI, ListMediaI, ListMultiCommunitiesI, ListPersonContentI, ListPersonHiddenI, ListPersonLikedI, ListPersonReadI, ListPersonSavedI, ListPostLikesI, ListRegistrationApplicationsI, ListReportsI, ListTaglinesI, ResolveObjectI, SearchI, UploadImage, GetFederatedInstancesI } from "./other_types";
3
3
  import { AddAdmin } from "./types/AddAdmin";
4
4
  import { AddAdminResponse } from "./types/AddAdminResponse";
5
5
  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";
@@ -270,7 +269,7 @@ export declare class LemmyHttp extends Controller {
270
269
  /**
271
270
  * @summary Get a community's pending follows count.
272
271
  */
273
- getCommunityPendingFollowsCount(form: GetCommunityPendingFollowsCountI, options?: RequestOptions): Promise<GetCommunityPendingFollowsCountResponse>;
272
+ getCommunityPendingFollowsCount(options?: RequestOptions): Promise<GetCommunityPendingFollowsCountResponse>;
274
273
  /**
275
274
  * @summary Get a community's pending followers.
276
275
  */
@@ -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
  */
@@ -670,7 +669,7 @@ export declare class LemmyHttp extends Controller {
670
669
  /**
671
670
  * @summary Fetch federated instances.
672
671
  */
673
- getFederatedInstances(options?: RequestOptions): Promise<GetFederatedInstancesResponse>;
672
+ getFederatedInstances(form: GetFederatedInstancesI, options?: RequestOptions): Promise<GetFederatedInstancesResponse>;
674
673
  /**
675
674
  * @summary List user reports.
676
675
  */
package/dist/http.js CHANGED
@@ -205,8 +205,8 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
205
205
  /**
206
206
  * @summary Get a community's pending follows count.
207
207
  */
208
- async getCommunityPendingFollowsCount(form, options) {
209
- 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);
210
210
  }
211
211
  /**
212
212
  * @summary Get a community's pending followers.
@@ -805,8 +805,8 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
805
805
  /**
806
806
  * @summary Fetch federated instances.
807
807
  */
808
- async getFederatedInstances(options) {
809
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/federated_instances", {}, options);
808
+ async getFederatedInstances(form, options) {
809
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/federated_instances", form, options);
810
810
  }
811
811
  /**
812
812
  * @summary List user reports.
@@ -1018,7 +1018,7 @@ _LemmyHttp_wrapper = async function _LemmyHttp_wrapper(type_, endpoint, form, op
1018
1018
  throw new LemmyError(response.statusText, response.status);
1019
1019
  }
1020
1020
  if (!response.ok) {
1021
- console.error(`Request error while calling ${type_} ${endpoint} with ${form}`);
1021
+ console.error(`Request error while calling ${type_} ${endpoint} with ${JSON.stringify(form)}`);
1022
1022
  let err = new LemmyError(json.error ?? response.statusText, response.status, json.message);
1023
1023
  throw err;
1024
1024
  }
@@ -1191,8 +1191,7 @@ __decorate([
1191
1191
  (0, runtime_1.Security)("bearerAuth"),
1192
1192
  (0, runtime_1.Get)("/community/pending_follows/count"),
1193
1193
  (0, runtime_1.Tags)("Community"),
1194
- __param(0, (0, runtime_1.Queries)()),
1195
- __param(1, (0, runtime_1.Inject)())
1194
+ __param(0, (0, runtime_1.Inject)())
1196
1195
  ], LemmyHttp.prototype, "getCommunityPendingFollowsCount", null);
1197
1196
  __decorate([
1198
1197
  (0, runtime_1.Security)("bearerAuth"),
@@ -1890,7 +1889,8 @@ __decorate([
1890
1889
  __decorate([
1891
1890
  (0, runtime_1.Get)("/federated_instances"),
1892
1891
  (0, runtime_1.Tags)("Miscellaneous"),
1893
- __param(0, (0, runtime_1.Inject)())
1892
+ __param(0, (0, runtime_1.Queries)()),
1893
+ __param(1, (0, runtime_1.Inject)())
1894
1894
  ], LemmyHttp.prototype, "getFederatedInstances", null);
1895
1895
  __decorate([
1896
1896
  (0, runtime_1.Security)("bearerAuth"),
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
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";
@@ -117,9 +89,11 @@ export { EditPrivateMessage } from "./types/EditPrivateMessage";
117
89
  export { EditSite } from "./types/EditSite";
118
90
  export { ExportDataResponse } from "./types/ExportDataResponse";
119
91
  export { FeaturePost } from "./types/FeaturePost";
120
- export { FederatedInstances } from "./types/FederatedInstances";
92
+ export { FederatedInstanceView } from "./types/FederatedInstanceView";
93
+ export { FederationAllowList } from "./types/FederationAllowList";
121
94
  export { FederationBlockList } from "./types/FederationBlockList";
122
95
  export { FederationMode } from "./types/FederationMode";
96
+ export { FederationQueueState } from "./types/FederationQueueState";
123
97
  export { FollowCommunity } from "./types/FollowCommunity";
124
98
  export { FollowMultiCommunity } from "./types/FollowMultiCommunity";
125
99
  export { GenerateTotpSecretResponse } from "./types/GenerateTotpSecretResponse";
@@ -129,9 +103,10 @@ export { GetComments } from "./types/GetComments";
129
103
  export { GetCommentsResponse } from "./types/GetCommentsResponse";
130
104
  export { GetCommentsSlimResponse } from "./types/GetCommentsSlimResponse";
131
105
  export { GetCommunity } from "./types/GetCommunity";
132
- export { GetCommunityPendingFollowsCount } from "./types/GetCommunityPendingFollowsCount";
133
106
  export { GetCommunityPendingFollowsCountResponse } from "./types/GetCommunityPendingFollowsCountResponse";
134
107
  export { GetCommunityResponse } from "./types/GetCommunityResponse";
108
+ export { GetFederatedInstances } from "./types/GetFederatedInstances";
109
+ export { GetFederatedInstancesKind } from "./types/GetFederatedInstancesKind";
135
110
  export { GetFederatedInstancesResponse } from "./types/GetFederatedInstancesResponse";
136
111
  export { GetModlog } from "./types/GetModlog";
137
112
  export { GetModlogResponse } from "./types/GetModlogResponse";
@@ -217,37 +192,13 @@ export { LoginToken } from "./types/LoginToken";
217
192
  export { MarkManyPostsAsRead } from "./types/MarkManyPostsAsRead";
218
193
  export { MarkNotificationAsRead } from "./types/MarkNotificationAsRead";
219
194
  export { MarkPostAsRead } from "./types/MarkPostAsRead";
220
- export { ModAddToCommunity } from "./types/ModAddToCommunity";
221
- export { ModAddToCommunityId } from "./types/ModAddToCommunityId";
222
- export { ModAddToCommunityView } from "./types/ModAddToCommunityView";
223
- export { ModBanFromCommunity } from "./types/ModBanFromCommunity";
224
- export { ModBanFromCommunityId } from "./types/ModBanFromCommunityId";
225
- export { ModBanFromCommunityView } from "./types/ModBanFromCommunityView";
226
- export { ModChangeCommunityVisibility } from "./types/ModChangeCommunityVisibility";
227
- export { ModChangeCommunityVisibilityId } from "./types/ModChangeCommunityVisibilityId";
228
- export { ModChangeCommunityVisibilityView } from "./types/ModChangeCommunityVisibilityView";
229
195
  export { ModEditPost } from "./types/ModEditPost";
230
- export { ModFeaturePost } from "./types/ModFeaturePost";
231
- export { ModFeaturePostId } from "./types/ModFeaturePostId";
232
- export { ModFeaturePostView } from "./types/ModFeaturePostView";
233
- export { ModLockComment } from "./types/ModLockComment";
234
- export { ModLockCommentId } from "./types/ModLockCommentId";
235
- export { ModLockCommentView } from "./types/ModLockCommentView";
236
- export { ModLockPost } from "./types/ModLockPost";
237
- export { ModLockPostId } from "./types/ModLockPostId";
238
- export { ModLockPostView } from "./types/ModLockPostView";
239
- export { ModRemoveComment } from "./types/ModRemoveComment";
240
- export { ModRemoveCommentId } from "./types/ModRemoveCommentId";
241
- export { ModRemoveCommentView } from "./types/ModRemoveCommentView";
242
- export { ModRemovePost } from "./types/ModRemovePost";
243
- export { ModRemovePostId } from "./types/ModRemovePostId";
244
- export { ModRemovePostView } from "./types/ModRemovePostView";
245
- export { ModTransferCommunity } from "./types/ModTransferCommunity";
246
- export { ModTransferCommunityId } from "./types/ModTransferCommunityId";
247
- export { ModTransferCommunityView } from "./types/ModTransferCommunityView";
248
- export { ModlogActionType } from "./types/ModlogActionType";
249
- 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";
250
200
  export { MultiCommunity } from "./types/MultiCommunity";
201
+ export { MultiCommunityEntry } from "./types/MultiCommunityEntry";
251
202
  export { MultiCommunityFollow } from "./types/MultiCommunityFollow";
252
203
  export { MultiCommunityId } from "./types/MultiCommunityId";
253
204
  export { MultiCommunityResponse } from "./types/MultiCommunityResponse";
@@ -268,6 +219,7 @@ export { PaginationCursor } from "./types/PaginationCursor";
268
219
  export { PasswordChangeAfterReset } from "./types/PasswordChangeAfterReset";
269
220
  export { PasswordReset } from "./types/PasswordReset";
270
221
  export { PendingFollow } from "./types/PendingFollow";
222
+ export { PendingFollowerView } from "./types/PendingFollowerView";
271
223
  export { Person } from "./types/Person";
272
224
  export { PersonActions } from "./types/PersonActions";
273
225
  export { PersonContentCombinedView } from "./types/PersonContentCombinedView";
@@ -4,7 +4,6 @@ import { DeleteImageParams } from "./types/DeleteImageParams";
4
4
  import { GetComment } from "./types/GetComment";
5
5
  import { GetComments } from "./types/GetComments";
6
6
  import { GetCommunity } from "./types/GetCommunity";
7
- import { GetCommunityPendingFollowsCount } from "./types/GetCommunityPendingFollowsCount";
8
7
  import { GetModlog } from "./types/GetModlog";
9
8
  import { GetMultiCommunity } from "./types/GetMultiCommunity";
10
9
  import { GetPersonDetails } from "./types/GetPersonDetails";
@@ -32,6 +31,7 @@ import { ListReports } from "./types/ListReports";
32
31
  import { ListTaglines } from "./types/ListTaglines";
33
32
  import { ResolveObject } from "./types/ResolveObject";
34
33
  import { Search } from "./types/Search";
34
+ import { GetFederatedInstances } from "./types/GetFederatedInstances";
35
35
  export declare const VERSION = "v4";
36
36
  export interface UploadImage {
37
37
  image: File | Buffer;
@@ -48,8 +48,6 @@ export interface GetCommunityI extends GetCommunity {
48
48
  }
49
49
  export interface ListCommunitiesI extends ListCommunities {
50
50
  }
51
- export interface GetCommunityPendingFollowsCountI extends GetCommunityPendingFollowsCount {
52
- }
53
51
  export interface ListCommunityPendingFollowsI extends ListCommunityPendingFollows {
54
52
  }
55
53
  export interface GetRandomCommunityI extends GetRandomCommunity {
@@ -104,3 +102,5 @@ export interface ListMultiCommunitiesI extends ListMultiCommunities {
104
102
  }
105
103
  export interface GetMultiCommunityI extends GetMultiCommunity {
106
104
  }
105
+ export interface GetFederatedInstancesI extends GetFederatedInstances {
106
+ }
@@ -16,4 +16,8 @@ export type AuthenticateWithOauth = {
16
16
  */
17
17
  answer?: string;
18
18
  pkce_code_verifier?: string;
19
+ /**
20
+ * If this is true the login is valid forever, otherwise it expires after one week.
21
+ */
22
+ stay_logged_in?: boolean;
19
23
  };
@@ -6,4 +6,8 @@ export type ChangePassword = {
6
6
  new_password: SensitiveString;
7
7
  new_password_verify: SensitiveString;
8
8
  old_password: SensitiveString;
9
+ /**
10
+ * If this is true the login is valid forever, otherwise it expires after one week.
11
+ */
12
+ stay_logged_in?: boolean;
9
13
  };
@@ -1,14 +1,14 @@
1
1
  export type CommentActions = {
2
2
  /**
3
- * The like / score for the comment.
3
+ * When the comment was upvoted or downvoted.
4
4
  */
5
- like_score?: number;
6
- /**
7
- * When the comment was liked.
8
- */
9
- liked_at?: string;
5
+ voted_at?: string;
10
6
  /**
11
7
  * When the comment was saved.
12
8
  */
13
9
  saved_at?: string;
10
+ /**
11
+ * True if upvoted, false if downvoted. Upvote is greater than downvote.
12
+ */
13
+ vote_is_upvote?: boolean;
14
14
  };
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * The comment sort types. See here for descriptions: https://join-lemmy.org/docs/en/users/03-votes-and-ranking.html
3
3
  */
4
- export type CommentSortType = "Hot" | "Top" | "New" | "Old" | "Controversial";
4
+ export type CommentSortType = "hot" | "top" | "new" | "old" | "controversial";
@@ -5,10 +5,6 @@ export type CommunityActions = {
5
5
  * When the community was followed.
6
6
  */
7
7
  followed_at?: string;
8
- /**
9
- * The state of the community follow.
10
- */
11
- follow_state?: CommunityFollowerState;
12
8
  /**
13
9
  * When the community was blocked.
14
10
  */
@@ -25,5 +21,9 @@ export type CommunityActions = {
25
21
  * When their ban expires.
26
22
  */
27
23
  ban_expires_at?: string;
24
+ /**
25
+ * The state of the community follow.
26
+ */
27
+ follow_state?: CommunityFollowerState;
28
28
  notifications?: CommunityNotificationsMode;
29
29
  };
@@ -1 +1 @@
1
- export type CommunityFollowerState = "Accepted" | "Pending" | "ApprovalRequired";
1
+ export type CommunityFollowerState = "accepted" | "pending" | "approval_required" | "denied";
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * Available settings for community notifications
3
3
  */
4
- export type CommunityNotificationsMode = "AllPostsAndComments" | "AllPosts" | "RepliesAndMentions" | "Mute";
4
+ export type CommunityNotificationsMode = "all_posts_and_comments" | "all_posts" | "replies_and_mentions" | "mute";
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * The community sort types. See here for descriptions: https://join-lemmy.org/docs/en/users/03-votes-and-ranking.html
3
3
  */
4
- export type CommunitySortType = "ActiveSixMonths" | "ActiveMonthly" | "ActiveWeekly" | "ActiveDaily" | "Hot" | "New" | "Old" | "NameAsc" | "NameDesc" | "Comments" | "Posts" | "Subscribers" | "SubscribersLocal";
4
+ export type CommunitySortType = "active_six_months" | "active_monthly" | "active_weekly" | "active_daily" | "hot" | "new" | "old" | "name_asc" | "name_desc" | "comments" | "posts" | "subscribers" | "subscribers_local";
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * Defines who can browse and interact with content in a community.
3
3
  */
4
- export type CommunityVisibility = "Public" | "Unlisted" | "LocalOnlyPublic" | "LocalOnlyPrivate" | "Private";
4
+ export type CommunityVisibility = "public" | "unlisted" | "local_only_public" | "local_only_private" | "private";
@@ -5,7 +5,7 @@ import type { CommentId } from "./CommentId";
5
5
  export type CreateCommentLike = {
6
6
  comment_id: CommentId;
7
7
  /**
8
- * Must be -1, 0, or 1 .
8
+ * True means Upvote, False means Downvote, and None means remove vote.
9
9
  */
10
- score: number;
10
+ is_upvote?: boolean;
11
11
  };
@@ -5,7 +5,7 @@ import type { PostId } from "./PostId";
5
5
  export type CreatePostLike = {
6
6
  post_id: PostId;
7
7
  /**
8
- * Score must be -1, 0, or 1.
8
+ * True means Upvote, False means Downvote, and None means remove vote.
9
9
  */
10
- score: number;
10
+ is_upvote?: boolean;
11
11
  };
@@ -0,0 +1,12 @@
1
+ import type { FederationAllowList } from "./FederationAllowList";
2
+ import type { FederationBlockList } from "./FederationBlockList";
3
+ import type { FederationQueueState } from "./FederationQueueState";
4
+ import type { Instance } from "./Instance";
5
+ import type { Site } from "./Site";
6
+ export type FederatedInstanceView = {
7
+ instance: Instance;
8
+ site?: Site;
9
+ queue_state?: FederationQueueState;
10
+ blocked?: FederationBlockList;
11
+ allowed?: FederationAllowList;
12
+ };
@@ -0,0 +1,4 @@
1
+ export type FederationAllowList = {
2
+ published_at: string;
3
+ updated_at?: string;
4
+ };
@@ -1,6 +1,4 @@
1
- import type { InstanceId } from "./InstanceId";
2
1
  export type FederationBlockList = {
3
- instance_id: InstanceId;
4
2
  published_at: string;
5
3
  updated_at?: string;
6
4
  expires_at?: string;
@@ -1,2 +1,3 @@
1
1
  "use strict";
2
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
3
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * The federation mode for an item
3
3
  */
4
- export type FederationMode = "All" | "Local" | "Disable";
4
+ export type FederationMode = "all" | "local" | "disable";
@@ -0,0 +1,18 @@
1
+ import type { ActivityId } from "./ActivityId";
2
+ import type { InstanceId } from "./InstanceId";
3
+ export type FederationQueueState = {
4
+ instance_id: InstanceId;
5
+ /**
6
+ * the last successfully sent activity id
7
+ */
8
+ last_successful_id?: ActivityId;
9
+ last_successful_published_time_at?: string;
10
+ /**
11
+ * how many failed attempts have been made to send the next activity
12
+ */
13
+ fail_count: number;
14
+ /**
15
+ * timestamp of the last retry attempt (when the last failing activity was resent)
16
+ */
17
+ last_retry_at?: string;
18
+ };
@@ -0,0 +1,9 @@
1
+ import type { GetFederatedInstancesKind } from "./GetFederatedInstancesKind";
2
+ import type { PaginationCursor } from "./PaginationCursor";
3
+ export type GetFederatedInstances = {
4
+ domain_filter?: string;
5
+ kind: GetFederatedInstancesKind;
6
+ page_cursor?: PaginationCursor;
7
+ page_back?: boolean;
8
+ limit?: number;
9
+ };
@@ -0,0 +1 @@
1
+ export type GetFederatedInstancesKind = "all" | "linked" | "allowed" | "blocked";
@@ -1,10 +1,10 @@
1
- import type { FederatedInstances } from "./FederatedInstances";
1
+ import type { FederatedInstanceView } from "./FederatedInstanceView";
2
+ import type { PaginationCursor } from "./PaginationCursor";
2
3
  /**
3
4
  * A response of federated instances.
4
5
  */
5
6
  export type GetFederatedInstancesResponse = {
6
- /**
7
- * Optional, because federation may be disabled.
8
- */
9
- federated_instances?: FederatedInstances;
7
+ federated_instances: Array<FederatedInstanceView>;
8
+ next_page?: PaginationCursor;
9
+ prev_page?: PaginationCursor;
10
10
  };
@@ -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
  */
@@ -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)
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * The like_type for a persons liked content.
3
3
  */
4
- export type LikeType = "All" | "LikedOnly" | "DislikedOnly";
4
+ export type LikeType = "all" | "liked_only" | "disliked_only";
@@ -3,7 +3,7 @@ export type ListCommunityPendingFollows = {
3
3
  /**
4
4
  * Only shows the unapproved applications
5
5
  */
6
- pending_only?: boolean;
6
+ unread_only?: boolean;
7
7
  all_communities?: boolean;
8
8
  page_cursor?: PaginationCursor;
9
9
  page_back?: boolean;
@@ -1,7 +1,7 @@
1
1
  import type { PaginationCursor } from "./PaginationCursor";
2
- import type { PendingFollow } from "./PendingFollow";
2
+ import type { PendingFollowerView } from "./PendingFollowerView";
3
3
  export type ListCommunityPendingFollowsResponse = {
4
- items: Array<PendingFollow>;
4
+ items: Array<PendingFollowerView>;
5
5
  /**
6
6
  * the pagination cursor to use to fetch the next page
7
7
  */
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * A listing type for post and comment list fetches.
3
3
  */
4
- export type ListingType = "All" | "Local" | "Subscribed" | "ModeratorView" | "Suggested";
4
+ export type ListingType = "all" | "local" | "subscribed" | "moderator_view" | "suggested";
@@ -12,4 +12,8 @@ export type Login = {
12
12
  * May be required, if totp is enabled for their account.
13
13
  */
14
14
  totp_2fa_token?: string;
15
+ /**
16
+ * If this is true the login is valid forever, otherwise it expires after one week.
17
+ */
18
+ stay_logged_in?: boolean;
15
19
  };
@@ -4,4 +4,5 @@ import type { PostId } from "./PostId";
4
4
  */
5
5
  export type MarkManyPostsAsRead = {
6
6
  post_ids: Array<PostId>;
7
+ read: boolean;
7
8
  };
@@ -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 | null;
10
+ target_person: Person | null;
11
+ target_instance: Instance | null;
12
+ target_community: Community | null;
13
+ target_post: Post | null;
14
+ target_comment: Comment | null;
15
+ };
@@ -0,0 +1,6 @@
1
+ import type { CommunityId } from "./CommunityId";
2
+ import type { MultiCommunityId } from "./MultiCommunityId";
3
+ export type MultiCommunityEntry = {
4
+ multi_community_id: MultiCommunityId;
5
+ community_id: CommunityId;
6
+ };
@@ -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
  };