lemmy-js-client 1.0.0-api-updates-4.1 → 1.0.0-api-updates-6.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 (200) hide show
  1. package/dist/http.d.ts +43 -46
  2. package/dist/http.js +25 -25
  3. package/dist/index.d.ts +8 -79
  4. package/dist/index.js +3 -0
  5. package/dist/types/AdminListUsers.d.ts +0 -1
  6. package/dist/types/GetComments.d.ts +0 -1
  7. package/dist/types/GetFederatedInstances.d.ts +0 -1
  8. package/dist/types/GetModlog.d.ts +2 -3
  9. package/dist/types/GetPersonDetailsResponse.d.ts +2 -0
  10. package/dist/types/GetPosts.d.ts +1 -1
  11. package/dist/types/GetSiteResponse.d.ts +6 -0
  12. package/dist/types/ListCommentLikes.d.ts +0 -1
  13. package/dist/types/ListCommunities.d.ts +0 -1
  14. package/dist/types/ListCommunityPendingFollows.d.ts +0 -1
  15. package/dist/types/ListMedia.d.ts +0 -1
  16. package/dist/types/ListMultiCommunities.d.ts +12 -1
  17. package/dist/types/ListNotifications.d.ts +0 -1
  18. package/dist/types/ListPersonContent.d.ts +0 -1
  19. package/dist/types/ListPersonHidden.d.ts +0 -1
  20. package/dist/types/ListPersonLiked.d.ts +0 -1
  21. package/dist/types/ListPersonRead.d.ts +0 -1
  22. package/dist/types/ListPersonSaved.d.ts +0 -1
  23. package/dist/types/ListPostLikes.d.ts +0 -1
  24. package/dist/types/ListRegistrationApplications.d.ts +0 -1
  25. package/dist/types/ListReports.d.ts +0 -1
  26. package/dist/types/ListTaglines.d.ts +0 -1
  27. package/dist/types/Modlog.d.ts +10 -0
  28. package/dist/types/ModlogId.d.ts +1 -0
  29. package/dist/types/ModlogKind.d.ts +4 -0
  30. package/dist/types/ModlogView.d.ts +15 -0
  31. package/dist/types/MultiCommunity.d.ts +3 -0
  32. package/dist/types/MultiCommunityListingType.d.ts +4 -0
  33. package/dist/types/MultiCommunitySortType.d.ts +1 -0
  34. package/dist/types/MyUserInfo.d.ts +2 -0
  35. package/dist/types/Notification.d.ts +2 -20
  36. package/dist/types/NotificationData.d.ts +3 -30
  37. package/dist/types/NotificationDataType.d.ts +1 -1
  38. package/dist/types/PagedResponse.d.ts +11 -0
  39. package/dist/types/PaginationCursor.d.ts +5 -1
  40. package/dist/types/PluginMetadata.d.ts +2 -2
  41. package/dist/types/RegistrationApplication.d.ts +1 -0
  42. package/dist/types/Search.d.ts +4 -1
  43. package/dist/types/SearchResponse.d.ts +11 -1
  44. package/package.json +4 -4
  45. package/dist/types/AdminAdd.d.ts +0 -12
  46. package/dist/types/AdminAddId.d.ts +0 -1
  47. package/dist/types/AdminAddView.d.ts +0 -10
  48. package/dist/types/AdminAllowInstance.d.ts +0 -11
  49. package/dist/types/AdminAllowInstanceId.d.ts +0 -1
  50. package/dist/types/AdminAllowInstanceView.d.ts +0 -11
  51. package/dist/types/AdminAllowInstanceView.js +0 -2
  52. package/dist/types/AdminBan.d.ts +0 -16
  53. package/dist/types/AdminBan.js +0 -2
  54. package/dist/types/AdminBanId.d.ts +0 -1
  55. package/dist/types/AdminBanView.d.ts +0 -10
  56. package/dist/types/AdminBanView.js +0 -2
  57. package/dist/types/AdminBlockInstance.d.ts +0 -12
  58. package/dist/types/AdminBlockInstance.js +0 -2
  59. package/dist/types/AdminBlockInstanceId.d.ts +0 -1
  60. package/dist/types/AdminBlockInstanceView.d.ts +0 -11
  61. package/dist/types/AdminBlockInstanceView.js +0 -2
  62. package/dist/types/AdminListUsersResponse.d.ts +0 -10
  63. package/dist/types/AdminListUsersResponse.js +0 -2
  64. package/dist/types/AdminPurgeComment.d.ts +0 -13
  65. package/dist/types/AdminPurgeComment.js +0 -2
  66. package/dist/types/AdminPurgeCommentId.d.ts +0 -1
  67. package/dist/types/AdminPurgeCommentId.js +0 -3
  68. package/dist/types/AdminPurgeCommentView.d.ts +0 -11
  69. package/dist/types/AdminPurgeCommentView.js +0 -2
  70. package/dist/types/AdminPurgeCommunity.d.ts +0 -11
  71. package/dist/types/AdminPurgeCommunity.js +0 -2
  72. package/dist/types/AdminPurgeCommunityId.d.ts +0 -1
  73. package/dist/types/AdminPurgeCommunityId.js +0 -3
  74. package/dist/types/AdminPurgeCommunityView.d.ts +0 -9
  75. package/dist/types/AdminPurgeCommunityView.js +0 -2
  76. package/dist/types/AdminPurgePerson.d.ts +0 -11
  77. package/dist/types/AdminPurgePerson.js +0 -2
  78. package/dist/types/AdminPurgePersonId.d.ts +0 -1
  79. package/dist/types/AdminPurgePersonId.js +0 -3
  80. package/dist/types/AdminPurgePersonView.d.ts +0 -9
  81. package/dist/types/AdminPurgePersonView.js +0 -2
  82. package/dist/types/AdminPurgePost.d.ts +0 -13
  83. package/dist/types/AdminPurgePost.js +0 -2
  84. package/dist/types/AdminPurgePostId.d.ts +0 -1
  85. package/dist/types/AdminPurgePostId.js +0 -3
  86. package/dist/types/AdminPurgePostView.d.ts +0 -11
  87. package/dist/types/AdminPurgePostView.js +0 -2
  88. package/dist/types/AdminRemoveCommunity.d.ts +0 -14
  89. package/dist/types/AdminRemoveCommunity.js +0 -2
  90. package/dist/types/AdminRemoveCommunityId.d.ts +0 -1
  91. package/dist/types/AdminRemoveCommunityId.js +0 -3
  92. package/dist/types/AdminRemoveCommunityView.d.ts +0 -11
  93. package/dist/types/AdminRemoveCommunityView.js +0 -2
  94. package/dist/types/BanFromCommunityResponse.d.ts +0 -8
  95. package/dist/types/BanFromCommunityResponse.js +0 -2
  96. package/dist/types/GetCommentsResponse.d.ts +0 -10
  97. package/dist/types/GetCommentsResponse.js +0 -2
  98. package/dist/types/GetCommentsSlimResponse.d.ts +0 -10
  99. package/dist/types/GetCommentsSlimResponse.js +0 -2
  100. package/dist/types/GetFederatedInstancesResponse.d.ts +0 -10
  101. package/dist/types/GetFederatedInstancesResponse.js +0 -2
  102. package/dist/types/GetModlogResponse.d.ts +0 -13
  103. package/dist/types/GetModlogResponse.js +0 -2
  104. package/dist/types/GetPostsResponse.d.ts +0 -13
  105. package/dist/types/GetPostsResponse.js +0 -2
  106. package/dist/types/ListCommentLikesResponse.d.ts +0 -13
  107. package/dist/types/ListCommentLikesResponse.js +0 -2
  108. package/dist/types/ListCommunitiesResponse.d.ts +0 -13
  109. package/dist/types/ListCommunitiesResponse.js +0 -2
  110. package/dist/types/ListCommunityPendingFollowsResponse.d.ts +0 -10
  111. package/dist/types/ListCommunityPendingFollowsResponse.js +0 -2
  112. package/dist/types/ListMediaResponse.d.ts +0 -10
  113. package/dist/types/ListMediaResponse.js +0 -2
  114. package/dist/types/ListMultiCommunitiesResponse.d.ts +0 -4
  115. package/dist/types/ListMultiCommunitiesResponse.js +0 -2
  116. package/dist/types/ListNotificationsResponse.d.ts +0 -13
  117. package/dist/types/ListNotificationsResponse.js +0 -2
  118. package/dist/types/ListPersonContentResponse.d.ts +0 -13
  119. package/dist/types/ListPersonContentResponse.js +0 -2
  120. package/dist/types/ListPersonHiddenResponse.d.ts +0 -13
  121. package/dist/types/ListPersonHiddenResponse.js +0 -2
  122. package/dist/types/ListPersonLikedResponse.d.ts +0 -13
  123. package/dist/types/ListPersonLikedResponse.js +0 -2
  124. package/dist/types/ListPersonReadResponse.d.ts +0 -13
  125. package/dist/types/ListPersonReadResponse.js +0 -2
  126. package/dist/types/ListPersonSavedResponse.d.ts +0 -13
  127. package/dist/types/ListPersonSavedResponse.js +0 -2
  128. package/dist/types/ListPostLikesResponse.d.ts +0 -13
  129. package/dist/types/ListPostLikesResponse.js +0 -2
  130. package/dist/types/ListRegistrationApplicationsResponse.d.ts +0 -13
  131. package/dist/types/ListRegistrationApplicationsResponse.js +0 -2
  132. package/dist/types/ListReportsResponse.d.ts +0 -13
  133. package/dist/types/ListReportsResponse.js +0 -2
  134. package/dist/types/ListTaglinesResponse.d.ts +0 -13
  135. package/dist/types/ListTaglinesResponse.js +0 -2
  136. package/dist/types/ModAddToCommunity.d.ts +0 -14
  137. package/dist/types/ModAddToCommunity.js +0 -2
  138. package/dist/types/ModAddToCommunityId.d.ts +0 -1
  139. package/dist/types/ModAddToCommunityId.js +0 -3
  140. package/dist/types/ModAddToCommunityView.d.ts +0 -12
  141. package/dist/types/ModAddToCommunityView.js +0 -2
  142. package/dist/types/ModBanFromCommunity.d.ts +0 -16
  143. package/dist/types/ModBanFromCommunity.js +0 -2
  144. package/dist/types/ModBanFromCommunityId.d.ts +0 -1
  145. package/dist/types/ModBanFromCommunityId.js +0 -3
  146. package/dist/types/ModBanFromCommunityView.d.ts +0 -12
  147. package/dist/types/ModBanFromCommunityView.js +0 -2
  148. package/dist/types/ModChangeCommunityVisibility.d.ts +0 -11
  149. package/dist/types/ModChangeCommunityVisibility.js +0 -2
  150. package/dist/types/ModChangeCommunityVisibilityId.d.ts +0 -1
  151. package/dist/types/ModChangeCommunityVisibilityId.js +0 -3
  152. package/dist/types/ModChangeCommunityVisibilityView.d.ts +0 -11
  153. package/dist/types/ModChangeCommunityVisibilityView.js +0 -2
  154. package/dist/types/ModFeaturePost.d.ts +0 -14
  155. package/dist/types/ModFeaturePost.js +0 -2
  156. package/dist/types/ModFeaturePostId.d.ts +0 -1
  157. package/dist/types/ModFeaturePostId.js +0 -3
  158. package/dist/types/ModFeaturePostView.d.ts +0 -14
  159. package/dist/types/ModFeaturePostView.js +0 -2
  160. package/dist/types/ModLockComment.d.ts +0 -14
  161. package/dist/types/ModLockComment.js +0 -2
  162. package/dist/types/ModLockCommentId.d.ts +0 -1
  163. package/dist/types/ModLockCommentId.js +0 -3
  164. package/dist/types/ModLockCommentView.d.ts +0 -16
  165. package/dist/types/ModLockCommentView.js +0 -2
  166. package/dist/types/ModLockPost.d.ts +0 -14
  167. package/dist/types/ModLockPost.js +0 -2
  168. package/dist/types/ModLockPostId.d.ts +0 -1
  169. package/dist/types/ModLockPostId.js +0 -3
  170. package/dist/types/ModLockPostView.d.ts +0 -14
  171. package/dist/types/ModLockPostView.js +0 -2
  172. package/dist/types/ModRemoveComment.d.ts +0 -14
  173. package/dist/types/ModRemoveComment.js +0 -2
  174. package/dist/types/ModRemoveCommentId.d.ts +0 -1
  175. package/dist/types/ModRemoveCommentId.js +0 -3
  176. package/dist/types/ModRemoveCommentView.d.ts +0 -16
  177. package/dist/types/ModRemoveCommentView.js +0 -2
  178. package/dist/types/ModRemovePost.d.ts +0 -14
  179. package/dist/types/ModRemovePost.js +0 -2
  180. package/dist/types/ModRemovePostId.d.ts +0 -1
  181. package/dist/types/ModRemovePostId.js +0 -3
  182. package/dist/types/ModRemovePostView.d.ts +0 -14
  183. package/dist/types/ModRemovePostView.js +0 -2
  184. package/dist/types/ModTransferCommunity.d.ts +0 -13
  185. package/dist/types/ModTransferCommunity.js +0 -2
  186. package/dist/types/ModTransferCommunityId.d.ts +0 -1
  187. package/dist/types/ModTransferCommunityId.js +0 -3
  188. package/dist/types/ModTransferCommunityView.d.ts +0 -12
  189. package/dist/types/ModTransferCommunityView.js +0 -2
  190. package/dist/types/ModlogActionType.d.ts +0 -4
  191. package/dist/types/ModlogActionType.js +0 -3
  192. package/dist/types/ModlogCombinedView.d.ts +0 -55
  193. package/dist/types/ModlogCombinedView.js +0 -2
  194. /package/dist/types/{AdminAdd.js → Modlog.js} +0 -0
  195. /package/dist/types/{AdminAddId.js → ModlogId.js} +0 -0
  196. /package/dist/types/{AdminAllowInstanceId.js → ModlogKind.js} +0 -0
  197. /package/dist/types/{AdminAddView.js → ModlogView.js} +0 -0
  198. /package/dist/types/{AdminBanId.js → MultiCommunityListingType.js} +0 -0
  199. /package/dist/types/{AdminBlockInstanceId.js → MultiCommunitySortType.js} +0 -0
  200. /package/dist/types/{AdminAllowInstance.js → PagedResponse.js} +0 -0
package/dist/index.d.ts CHANGED
@@ -5,43 +5,14 @@ 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
- 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";
11
+ export { AllLemmyErrors } from "./types/AllLemmyErrors";
40
12
  export { ApproveCommunityPendingFollower } from "./types/ApproveCommunityPendingFollower";
41
13
  export { ApproveRegistrationApplication } from "./types/ApproveRegistrationApplication";
42
14
  export { AuthenticateWithOauth } from "./types/AuthenticateWithOauth";
43
15
  export { BanFromCommunity } from "./types/BanFromCommunity";
44
- export { BanFromCommunityResponse } from "./types/BanFromCommunityResponse";
45
16
  export { BanPerson } from "./types/BanPerson";
46
17
  export { BlockCommunity } from "./types/BlockCommunity";
47
18
  export { BlockPerson } from "./types/BlockPerson";
@@ -128,16 +99,12 @@ export { GenerateTotpSecretResponse } from "./types/GenerateTotpSecretResponse";
128
99
  export { GetCaptchaResponse } from "./types/GetCaptchaResponse";
129
100
  export { GetComment } from "./types/GetComment";
130
101
  export { GetComments } from "./types/GetComments";
131
- export { GetCommentsResponse } from "./types/GetCommentsResponse";
132
- export { GetCommentsSlimResponse } from "./types/GetCommentsSlimResponse";
133
102
  export { GetCommunity } from "./types/GetCommunity";
134
103
  export { GetCommunityPendingFollowsCountResponse } from "./types/GetCommunityPendingFollowsCountResponse";
135
104
  export { GetCommunityResponse } from "./types/GetCommunityResponse";
136
105
  export { GetFederatedInstances } from "./types/GetFederatedInstances";
137
106
  export { GetFederatedInstancesKind } from "./types/GetFederatedInstancesKind";
138
- export { GetFederatedInstancesResponse } from "./types/GetFederatedInstancesResponse";
139
107
  export { GetModlog } from "./types/GetModlog";
140
- export { GetModlogResponse } from "./types/GetModlogResponse";
141
108
  export { GetMultiCommunity } from "./types/GetMultiCommunity";
142
109
  export { GetMultiCommunityResponse } from "./types/GetMultiCommunityResponse";
143
110
  export { GetPersonDetails } from "./types/GetPersonDetails";
@@ -145,7 +112,6 @@ export { GetPersonDetailsResponse } from "./types/GetPersonDetailsResponse";
145
112
  export { GetPost } from "./types/GetPost";
146
113
  export { GetPostResponse } from "./types/GetPostResponse";
147
114
  export { GetPosts } from "./types/GetPosts";
148
- export { GetPostsResponse } from "./types/GetPostsResponse";
149
115
  export { GetRandomCommunity } from "./types/GetRandomCommunity";
150
116
  export { GetRegistrationApplication } from "./types/GetRegistrationApplication";
151
117
  export { GetReportCount } from "./types/GetReportCount";
@@ -170,38 +136,23 @@ export { LemmyErrorType } from "./types/LemmyErrorType";
170
136
  export { LikeType } from "./types/LikeType";
171
137
  export { LinkMetadata } from "./types/LinkMetadata";
172
138
  export { ListCommentLikes } from "./types/ListCommentLikes";
173
- export { ListCommentLikesResponse } from "./types/ListCommentLikesResponse";
174
139
  export { ListCommunities } from "./types/ListCommunities";
175
- export { ListCommunitiesResponse } from "./types/ListCommunitiesResponse";
176
140
  export { ListCommunityPendingFollows } from "./types/ListCommunityPendingFollows";
177
- export { ListCommunityPendingFollowsResponse } from "./types/ListCommunityPendingFollowsResponse";
178
141
  export { ListCustomEmojis } from "./types/ListCustomEmojis";
179
142
  export { ListCustomEmojisResponse } from "./types/ListCustomEmojisResponse";
180
143
  export { ListLoginsResponse } from "./types/ListLoginsResponse";
181
144
  export { ListMedia } from "./types/ListMedia";
182
- export { ListMediaResponse } from "./types/ListMediaResponse";
183
145
  export { ListMultiCommunities } from "./types/ListMultiCommunities";
184
- export { ListMultiCommunitiesResponse } from "./types/ListMultiCommunitiesResponse";
185
146
  export { ListNotifications } from "./types/ListNotifications";
186
- export { ListNotificationsResponse } from "./types/ListNotificationsResponse";
187
147
  export { ListPersonContent } from "./types/ListPersonContent";
188
- export { ListPersonContentResponse } from "./types/ListPersonContentResponse";
189
148
  export { ListPersonHidden } from "./types/ListPersonHidden";
190
- export { ListPersonHiddenResponse } from "./types/ListPersonHiddenResponse";
191
149
  export { ListPersonLiked } from "./types/ListPersonLiked";
192
- export { ListPersonLikedResponse } from "./types/ListPersonLikedResponse";
193
150
  export { ListPersonRead } from "./types/ListPersonRead";
194
- export { ListPersonReadResponse } from "./types/ListPersonReadResponse";
195
151
  export { ListPersonSaved } from "./types/ListPersonSaved";
196
- export { ListPersonSavedResponse } from "./types/ListPersonSavedResponse";
197
152
  export { ListPostLikes } from "./types/ListPostLikes";
198
- export { ListPostLikesResponse } from "./types/ListPostLikesResponse";
199
153
  export { ListRegistrationApplications } from "./types/ListRegistrationApplications";
200
- export { ListRegistrationApplicationsResponse } from "./types/ListRegistrationApplicationsResponse";
201
154
  export { ListReports } from "./types/ListReports";
202
- export { ListReportsResponse } from "./types/ListReportsResponse";
203
155
  export { ListTaglines } from "./types/ListTaglines";
204
- export { ListTaglinesResponse } from "./types/ListTaglinesResponse";
205
156
  export { ListingType } from "./types/ListingType";
206
157
  export { LocalImage } from "./types/LocalImage";
207
158
  export { LocalImageView } from "./types/LocalImageView";
@@ -220,41 +171,18 @@ export { LoginToken } from "./types/LoginToken";
220
171
  export { MarkManyPostsAsRead } from "./types/MarkManyPostsAsRead";
221
172
  export { MarkNotificationAsRead } from "./types/MarkNotificationAsRead";
222
173
  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
174
  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";
175
+ export { Modlog } from "./types/Modlog";
176
+ export { ModlogId } from "./types/ModlogId";
177
+ export { ModlogKind } from "./types/ModlogKind";
178
+ export { ModlogView } from "./types/ModlogView";
253
179
  export { MultiCommunity } from "./types/MultiCommunity";
254
180
  export { MultiCommunityEntry } from "./types/MultiCommunityEntry";
255
181
  export { MultiCommunityFollow } from "./types/MultiCommunityFollow";
256
182
  export { MultiCommunityId } from "./types/MultiCommunityId";
183
+ export { MultiCommunityListingType } from "./types/MultiCommunityListingType";
257
184
  export { MultiCommunityResponse } from "./types/MultiCommunityResponse";
185
+ export { MultiCommunitySortType } from "./types/MultiCommunitySortType";
258
186
  export { MultiCommunityView } from "./types/MultiCommunityView";
259
187
  export { MyUserInfo } from "./types/MyUserInfo";
260
188
  export { NotePerson } from "./types/NotePerson";
@@ -268,6 +196,7 @@ export { OAuthAccount } from "./types/OAuthAccount";
268
196
  export { OAuthProvider } from "./types/OAuthProvider";
269
197
  export { OAuthProviderId } from "./types/OAuthProviderId";
270
198
  export { OpenGraphData } from "./types/OpenGraphData";
199
+ export { PagedResponse } from "./types/PagedResponse";
271
200
  export { PaginationCursor } from "./types/PaginationCursor";
272
201
  export { PasswordChangeAfterReset } from "./types/PasswordChangeAfterReset";
273
202
  export { PasswordReset } from "./types/PasswordReset";
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; } });
@@ -2,6 +2,5 @@ import type { PaginationCursor } from "./PaginationCursor";
2
2
  export type AdminListUsers = {
3
3
  banned_only?: boolean;
4
4
  page_cursor?: PaginationCursor;
5
- page_back?: boolean;
6
5
  limit?: number;
7
6
  };
@@ -17,7 +17,6 @@ export type GetComments = {
17
17
  time_range_seconds?: number;
18
18
  max_depth?: number;
19
19
  page_cursor?: PaginationCursor;
20
- page_back?: boolean;
21
20
  limit?: number;
22
21
  community_id?: CommunityId;
23
22
  community_name?: string;
@@ -4,6 +4,5 @@ export type GetFederatedInstances = {
4
4
  domain_filter?: string;
5
5
  kind: GetFederatedInstancesKind;
6
6
  page_cursor?: PaginationCursor;
7
- page_back?: boolean;
8
7
  limit?: number;
9
8
  };
@@ -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.
@@ -39,6 +39,5 @@ export type GetModlog = {
39
39
  */
40
40
  comment_id?: CommentId;
41
41
  page_cursor?: PaginationCursor;
42
- page_back?: boolean;
43
42
  limit?: number;
44
43
  };
@@ -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)
@@ -40,6 +41,5 @@ export type GetPosts = {
40
41
  */
41
42
  no_comments_only?: boolean;
42
43
  page_cursor?: PaginationCursor;
43
- page_back?: boolean;
44
44
  limit?: number;
45
45
  };
@@ -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
  };
@@ -6,6 +6,5 @@ import type { PaginationCursor } from "./PaginationCursor";
6
6
  export type ListCommentLikes = {
7
7
  comment_id: CommentId;
8
8
  page_cursor?: PaginationCursor;
9
- page_back?: boolean;
10
9
  limit?: number;
11
10
  };
@@ -14,6 +14,5 @@ export type ListCommunities = {
14
14
  time_range_seconds?: number;
15
15
  show_nsfw?: boolean;
16
16
  page_cursor?: PaginationCursor;
17
- page_back?: boolean;
18
17
  limit?: number;
19
18
  };
@@ -6,6 +6,5 @@ export type ListCommunityPendingFollows = {
6
6
  unread_only?: boolean;
7
7
  all_communities?: boolean;
8
8
  page_cursor?: PaginationCursor;
9
- page_back?: boolean;
10
9
  limit?: number;
11
10
  };
@@ -4,6 +4,5 @@ import type { PaginationCursor } from "./PaginationCursor";
4
4
  */
5
5
  export type ListMedia = {
6
6
  page_cursor?: PaginationCursor;
7
- page_back?: boolean;
8
7
  limit?: number;
9
8
  };
@@ -1,5 +1,16 @@
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
+ limit?: number;
5
16
  };
@@ -7,6 +7,5 @@ export type ListNotifications = {
7
7
  type_?: NotificationDataType;
8
8
  unread_only?: boolean;
9
9
  page_cursor?: PaginationCursor;
10
- page_back?: boolean;
11
10
  limit?: number;
12
11
  };
@@ -14,6 +14,5 @@ export type ListPersonContent = {
14
14
  */
15
15
  username?: string;
16
16
  page_cursor?: PaginationCursor;
17
- page_back?: boolean;
18
17
  limit?: number;
19
18
  };
@@ -4,6 +4,5 @@ import type { PaginationCursor } from "./PaginationCursor";
4
4
  */
5
5
  export type ListPersonHidden = {
6
6
  page_cursor?: PaginationCursor;
7
- page_back?: boolean;
8
7
  limit?: number;
9
8
  };
@@ -8,6 +8,5 @@ export type ListPersonLiked = {
8
8
  type_?: PersonContentType;
9
9
  like_type?: LikeType;
10
10
  page_cursor?: PaginationCursor;
11
- page_back?: boolean;
12
11
  limit?: number;
13
12
  };
@@ -4,6 +4,5 @@ import type { PaginationCursor } from "./PaginationCursor";
4
4
  */
5
5
  export type ListPersonRead = {
6
6
  page_cursor?: PaginationCursor;
7
- page_back?: boolean;
8
7
  limit?: number;
9
8
  };
@@ -6,6 +6,5 @@ import type { PersonContentType } from "./PersonContentType";
6
6
  export type ListPersonSaved = {
7
7
  type_?: PersonContentType;
8
8
  page_cursor?: PaginationCursor;
9
- page_back?: boolean;
10
9
  limit?: number;
11
10
  };
@@ -6,6 +6,5 @@ import type { PostId } from "./PostId";
6
6
  export type ListPostLikes = {
7
7
  post_id: PostId;
8
8
  page_cursor?: PaginationCursor;
9
- page_back?: boolean;
10
9
  limit?: number;
11
10
  };
@@ -8,6 +8,5 @@ export type ListRegistrationApplications = {
8
8
  */
9
9
  unread_only?: boolean;
10
10
  page_cursor?: PaginationCursor;
11
- page_back?: boolean;
12
11
  limit?: number;
13
12
  };
@@ -23,7 +23,6 @@ export type ListReports = {
23
23
  */
24
24
  community_id?: CommunityId;
25
25
  page_cursor?: PaginationCursor;
26
- page_back?: boolean;
27
26
  limit?: number;
28
27
  /**
29
28
  * Only for admins: also show reports with `violates_instance_rules=false`
@@ -4,6 +4,5 @@ import type { PaginationCursor } from "./PaginationCursor";
4
4
  */
5
5
  export type ListTaglines = {
6
6
  page_cursor?: PaginationCursor;
7
- page_back?: boolean;
8
7
  limit?: number;
9
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;
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";
@@ -0,0 +1,11 @@
1
+ import type { PaginationCursor } from "./PaginationCursor";
2
+ /**
3
+ * This response contains only a single page of items. To get the next page, take the
4
+ * cursor string from `next_page` and pass it to the same API endpoint via `page_cursor`
5
+ * parameter. For going to the previous page, use `prev_page` instead.
6
+ */
7
+ export type PagedResponse<T> = {
8
+ data: Array<T>;
9
+ next_page?: PaginationCursor;
10
+ prev_page?: PaginationCursor;
11
+ };
@@ -1,4 +1,8 @@
1
1
  /**
2
- * A pagination cursor
2
+ * To get the next or previous page, pass this string unchanged as `page_cursor` in a new request
3
+ * to the same endpoint.
4
+ *
5
+ * Do not attempt to parse or modify the cursor string. The format is internal and may change in
6
+ * minor Lemmy versions.
3
7
  */
4
8
  export type PaginationCursor = string;
@@ -1,5 +1,5 @@
1
1
  export type PluginMetadata = {
2
2
  name: string;
3
- url: string;
4
- description: string;
3
+ url?: string;
4
+ description?: string;
5
5
  };
@@ -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
  };
@@ -8,6 +8,10 @@ import type { SearchType } from "./SearchType";
8
8
  * Searches the site, given a search term, and some optional filters.
9
9
  */
10
10
  export type Search = {
11
+ /**
12
+ * The search query. Can be a plain text, or an object ID which will be resolved
13
+ * (eg `https://lemmy.world/comment/1` or `!fediverse@lemmy.ml`).
14
+ */
11
15
  q: string;
12
16
  community_id?: CommunityId;
13
17
  community_name?: string;
@@ -29,6 +33,5 @@ export type Search = {
29
33
  */
30
34
  show_nsfw?: boolean;
31
35
  page_cursor?: PaginationCursor;
32
- page_back?: boolean;
33
36
  limit?: number;
34
37
  };
@@ -4,7 +4,17 @@ import type { SearchCombinedView } from "./SearchCombinedView";
4
4
  * The search response, containing lists of the return type possibilities
5
5
  */
6
6
  export type SearchResponse = {
7
- results: Array<SearchCombinedView>;
7
+ /**
8
+ * If `Search.q` contains an ActivityPub ID (eg `https://lemmy.world/comment/1`) or an
9
+ * identifier (eg `!fediverse@lemmy.ml`) then this field contains the resolved object.
10
+ * It should always be shown above other search results.
11
+ */
12
+ resolve?: SearchCombinedView;
13
+ /**
14
+ * Items which contain the search string in post body, comment text, community sidebar etc.
15
+ * This is always empty when calling `/api/v4/resolve_object`
16
+ */
17
+ search: Array<SearchCombinedView>;
8
18
  /**
9
19
  * the pagination cursor to use to fetch the next page
10
20
  */