lemmy-js-client 0.20.0-alpha.6 → 0.20.0-api-v4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (337) hide show
  1. package/dist/http.d.ts +217 -120
  2. package/dist/http.js +333 -241
  3. package/dist/index.d.ts +33 -5
  4. package/dist/other_types.d.ts +1 -1
  5. package/dist/other_types.js +1 -1
  6. package/dist/types/AddAdmin.d.ts +5 -2
  7. package/dist/types/AddAdminResponse.d.ts +5 -2
  8. package/dist/types/AddModToCommunity.d.ts +5 -2
  9. package/dist/types/AddModToCommunityResponse.d.ts +5 -2
  10. package/dist/types/AdminPurgeComment.d.ts +5 -2
  11. package/dist/types/AdminPurgeCommentView.d.ts +5 -2
  12. package/dist/types/AdminPurgeCommunity.d.ts +5 -2
  13. package/dist/types/AdminPurgeCommunityView.d.ts +5 -2
  14. package/dist/types/AdminPurgePerson.d.ts +5 -2
  15. package/dist/types/AdminPurgePersonView.d.ts +5 -2
  16. package/dist/types/AdminPurgePost.d.ts +5 -2
  17. package/dist/types/AdminPurgePostView.d.ts +5 -2
  18. package/dist/types/ApproveCommunityPendingFollower.d.ts +7 -0
  19. package/dist/types/ApproveRegistrationApplication.d.ts +5 -2
  20. package/dist/types/AuthenticateWithOauth.d.ts +18 -0
  21. package/dist/types/BanFromCommunity.d.ts +15 -3
  22. package/dist/types/BanFromCommunityResponse.d.ts +5 -2
  23. package/dist/types/BanPerson.d.ts +15 -3
  24. package/dist/types/BanPersonResponse.d.ts +5 -2
  25. package/dist/types/BannedPersonsResponse.d.ts +5 -2
  26. package/dist/types/BlockCommunity.d.ts +5 -2
  27. package/dist/types/BlockCommunityResponse.d.ts +5 -2
  28. package/dist/types/BlockInstance.d.ts +5 -2
  29. package/dist/types/BlockInstanceResponse.d.ts +2 -2
  30. package/dist/types/BlockPerson.d.ts +5 -2
  31. package/dist/types/BlockPersonResponse.d.ts +5 -2
  32. package/dist/types/CaptchaResponse.d.ts +14 -2
  33. package/dist/types/ChangePassword.d.ts +9 -5
  34. package/dist/types/ChangePassword.js +0 -1
  35. package/dist/types/Comment.d.ts +26 -3
  36. package/dist/types/CommentAggregates.d.ts +8 -2
  37. package/dist/types/CommentId.d.ts +3 -0
  38. package/dist/types/CommentReply.d.ts +5 -2
  39. package/dist/types/CommentReplyId.d.ts +3 -0
  40. package/dist/types/CommentReplyResponse.d.ts +5 -2
  41. package/dist/types/CommentReplyView.d.ts +5 -2
  42. package/dist/types/CommentReport.d.ts +5 -2
  43. package/dist/types/CommentReportId.d.ts +3 -0
  44. package/dist/types/CommentReportResponse.d.ts +5 -2
  45. package/dist/types/CommentReportView.d.ts +5 -2
  46. package/dist/types/CommentResponse.d.ts +5 -2
  47. package/dist/types/CommentSortType.d.ts +3 -0
  48. package/dist/types/CommentView.d.ts +5 -2
  49. package/dist/types/Community.d.ts +47 -6
  50. package/dist/types/CommunityAggregates.d.ts +17 -2
  51. package/dist/types/CommunityFollowerState.d.ts +1 -0
  52. package/dist/types/CommunityFollowerView.d.ts +5 -2
  53. package/dist/types/CommunityId.d.ts +3 -0
  54. package/dist/types/CommunityModeratorView.d.ts +5 -2
  55. package/dist/types/CommunityResponse.d.ts +5 -2
  56. package/dist/types/CommunitySortType.d.ts +4 -0
  57. package/dist/types/CommunitySortType.js +3 -0
  58. package/dist/types/CommunityView.d.ts +5 -2
  59. package/dist/types/CommunityVisibility.d.ts +4 -1
  60. package/dist/types/CreateComment.d.ts +5 -2
  61. package/dist/types/CreateCommentLike.d.ts +8 -2
  62. package/dist/types/CreateCommentReport.d.ts +5 -2
  63. package/dist/types/CreateCommunity.d.ts +30 -2
  64. package/dist/types/CreateCustomEmoji.d.ts +5 -2
  65. package/dist/types/CreateOAuthProvider.d.ts +17 -0
  66. package/dist/types/CreateOAuthProvider.js +3 -0
  67. package/dist/types/CreatePost.d.ts +20 -2
  68. package/dist/types/CreatePostLike.d.ts +8 -2
  69. package/dist/types/CreatePostReport.d.ts +5 -2
  70. package/dist/types/CreatePrivateMessage.d.ts +5 -2
  71. package/dist/types/CreatePrivateMessageReport.d.ts +5 -2
  72. package/dist/types/CreateSite.d.ts +16 -7
  73. package/dist/types/CreateTagline.d.ts +6 -0
  74. package/dist/types/CreateTagline.js +3 -0
  75. package/dist/types/CustomEmoji.d.ts +7 -5
  76. package/dist/types/CustomEmojiId.d.ts +3 -0
  77. package/dist/types/CustomEmojiKeyword.d.ts +5 -2
  78. package/dist/types/CustomEmojiResponse.d.ts +5 -2
  79. package/dist/types/CustomEmojiView.d.ts +5 -2
  80. package/dist/types/DbUrl.d.ts +1 -0
  81. package/dist/types/DbUrl.js +3 -0
  82. package/dist/types/DeleteAccount.d.ts +7 -3
  83. package/dist/types/DeleteAccount.js +0 -1
  84. package/dist/types/DeleteComment.d.ts +5 -2
  85. package/dist/types/DeleteCommunity.d.ts +5 -2
  86. package/dist/types/DeleteCustomEmoji.d.ts +5 -2
  87. package/dist/types/DeleteOAuthProvider.d.ts +7 -0
  88. package/dist/types/DeletePost.d.ts +5 -2
  89. package/dist/types/DeletePrivateMessage.d.ts +5 -2
  90. package/dist/types/DeleteTagline.d.ts +7 -0
  91. package/dist/types/DeleteTagline.js +2 -0
  92. package/dist/types/DistinguishComment.d.ts +5 -2
  93. package/dist/types/EditComment.d.ts +5 -2
  94. package/dist/types/EditCommunity.d.ts +27 -2
  95. package/dist/types/EditCustomEmoji.d.ts +5 -2
  96. package/dist/types/EditOAuthProvider.d.ts +17 -0
  97. package/dist/types/EditOAuthProvider.js +2 -0
  98. package/dist/types/EditPost.d.ts +18 -2
  99. package/dist/types/EditPrivateMessage.d.ts +5 -2
  100. package/dist/types/EditSite.d.ts +137 -7
  101. package/dist/types/FeaturePost.d.ts +5 -2
  102. package/dist/types/FederatedInstances.d.ts +5 -2
  103. package/dist/types/FederationError.d.ts +10 -0
  104. package/dist/types/FederationError.js +3 -0
  105. package/dist/types/FederationMode.d.ts +4 -0
  106. package/dist/types/FederationMode.js +3 -0
  107. package/dist/types/FollowCommunity.d.ts +5 -2
  108. package/dist/types/GenerateTotpSecretResponse.d.ts +4 -3
  109. package/dist/types/GenerateTotpSecretResponse.js +0 -1
  110. package/dist/types/GetCaptchaResponse.d.ts +8 -2
  111. package/dist/types/GetComment.d.ts +5 -2
  112. package/dist/types/GetComments.d.ts +5 -2
  113. package/dist/types/GetCommentsResponse.d.ts +5 -2
  114. package/dist/types/GetCommunity.d.ts +8 -2
  115. package/dist/types/GetCommunityPendingFollowsCount.d.ts +4 -0
  116. package/dist/types/GetCommunityPendingFollowsCount.js +2 -0
  117. package/dist/types/GetCommunityPendingFollowsCountResponse.d.ts +3 -0
  118. package/dist/types/GetCommunityPendingFollowsCountResponse.js +3 -0
  119. package/dist/types/GetCommunityResponse.d.ts +5 -2
  120. package/dist/types/GetFederatedInstancesResponse.d.ts +8 -2
  121. package/dist/types/GetModlog.d.ts +5 -2
  122. package/dist/types/GetModlogResponse.d.ts +5 -2
  123. package/dist/types/GetPersonDetails.d.ts +12 -4
  124. package/dist/types/GetPersonDetailsResponse.d.ts +5 -2
  125. package/dist/types/GetPersonMentions.d.ts +5 -2
  126. package/dist/types/GetPersonMentionsResponse.d.ts +5 -2
  127. package/dist/types/GetPost.d.ts +5 -2
  128. package/dist/types/GetPostResponse.d.ts +8 -2
  129. package/dist/types/GetPosts.d.ts +20 -4
  130. package/dist/types/GetPostsResponse.d.ts +8 -2
  131. package/dist/types/GetPrivateMessages.d.ts +5 -2
  132. package/dist/types/GetRandomCommunity.d.ts +7 -0
  133. package/dist/types/GetRandomCommunity.js +2 -0
  134. package/dist/types/GetRegistrationApplication.d.ts +5 -2
  135. package/dist/types/GetReplies.d.ts +5 -2
  136. package/dist/types/GetRepliesResponse.d.ts +5 -2
  137. package/dist/types/GetReportCount.d.ts +5 -2
  138. package/dist/types/GetReportCountResponse.d.ts +5 -2
  139. package/dist/types/GetSiteMetadata.d.ts +5 -2
  140. package/dist/types/GetSiteMetadataResponse.d.ts +5 -2
  141. package/dist/types/GetSiteResponse.d.ts +24 -5
  142. package/dist/types/GetUnreadCountResponse.d.ts +5 -2
  143. package/dist/types/GetUnreadRegistrationApplicationCountResponse.d.ts +5 -2
  144. package/dist/types/HideCommunity.d.ts +5 -2
  145. package/dist/types/HidePost.d.ts +5 -2
  146. package/dist/types/ImageDetails.d.ts +4 -3
  147. package/dist/types/ImageDetails.js +0 -1
  148. package/dist/types/Instance.d.ts +5 -2
  149. package/dist/types/InstanceId.d.ts +3 -0
  150. package/dist/types/InstanceWithFederationState.d.ts +7 -3
  151. package/dist/types/Language.d.ts +5 -2
  152. package/dist/types/LanguageId.d.ts +3 -0
  153. package/dist/types/LemmyErrorType.d.ts +27 -92
  154. package/dist/types/LemmyErrorType.js +0 -1
  155. package/dist/types/LinkMetadata.d.ts +9 -5
  156. package/dist/types/LinkMetadata.js +0 -1
  157. package/dist/types/ListCommentLikes.d.ts +5 -2
  158. package/dist/types/ListCommentLikesResponse.d.ts +5 -2
  159. package/dist/types/ListCommentReports.d.ts +11 -2
  160. package/dist/types/ListCommentReportsResponse.d.ts +5 -2
  161. package/dist/types/ListCommunities.d.ts +7 -4
  162. package/dist/types/ListCommunitiesResponse.d.ts +5 -2
  163. package/dist/types/ListCommunityPendingFollows.d.ts +9 -0
  164. package/dist/types/ListCommunityPendingFollows.js +3 -0
  165. package/dist/types/ListCommunityPendingFollowsResponse.d.ts +4 -0
  166. package/dist/types/ListCommunityPendingFollowsResponse.js +2 -0
  167. package/dist/types/ListCustomEmojis.d.ts +9 -0
  168. package/dist/types/ListCustomEmojis.js +3 -0
  169. package/dist/types/ListCustomEmojisResponse.d.ts +7 -0
  170. package/dist/types/ListCustomEmojisResponse.js +2 -0
  171. package/dist/types/ListLoginsResponse.d.ts +4 -0
  172. package/dist/types/ListLoginsResponse.js +2 -0
  173. package/dist/types/ListMedia.d.ts +5 -2
  174. package/dist/types/ListMediaResponse.d.ts +2 -2
  175. package/dist/types/ListPostLikes.d.ts +5 -2
  176. package/dist/types/ListPostLikesResponse.d.ts +5 -2
  177. package/dist/types/ListPostReports.d.ts +11 -2
  178. package/dist/types/ListPostReportsResponse.d.ts +5 -2
  179. package/dist/types/ListPrivateMessageReports.d.ts +8 -2
  180. package/dist/types/ListPrivateMessageReportsResponse.d.ts +5 -2
  181. package/dist/types/ListRegistrationApplications.d.ts +8 -2
  182. package/dist/types/ListRegistrationApplicationsResponse.d.ts +5 -2
  183. package/dist/types/ListTaglines.d.ts +7 -0
  184. package/dist/types/ListTaglines.js +3 -0
  185. package/dist/types/ListTaglinesResponse.d.ts +7 -0
  186. package/dist/types/ListTaglinesResponse.js +2 -0
  187. package/dist/types/ListingType.d.ts +3 -0
  188. package/dist/types/LocalImage.d.ts +2 -2
  189. package/dist/types/LocalImageView.d.ts +5 -2
  190. package/dist/types/LocalSite.d.ts +88 -6
  191. package/dist/types/LocalSiteId.d.ts +3 -0
  192. package/dist/types/LocalSiteRateLimit.d.ts +5 -2
  193. package/dist/types/LocalSiteUrlBlocklist.d.ts +2 -2
  194. package/dist/types/LocalUser.d.ts +54 -7
  195. package/dist/types/LocalUserId.d.ts +3 -0
  196. package/dist/types/LocalUserView.d.ts +5 -2
  197. package/dist/types/LocalUserVoteDisplayMode.d.ts +5 -4
  198. package/dist/types/LocalUserVoteDisplayMode.js +1 -0
  199. package/dist/types/LockPost.d.ts +5 -2
  200. package/dist/types/Login.d.ts +11 -4
  201. package/dist/types/Login.js +0 -1
  202. package/dist/types/LoginResponse.d.ts +17 -3
  203. package/dist/types/LoginResponse.js +0 -1
  204. package/dist/types/LoginToken.d.ts +12 -2
  205. package/dist/types/MarkCommentReplyAsRead.d.ts +5 -2
  206. package/dist/types/MarkPersonMentionAsRead.d.ts +5 -2
  207. package/dist/types/MarkPostAsRead.d.ts +5 -2
  208. package/dist/types/MarkPrivateMessageAsRead.d.ts +5 -2
  209. package/dist/types/ModAdd.d.ts +5 -2
  210. package/dist/types/ModAddCommunity.d.ts +5 -2
  211. package/dist/types/ModAddCommunityView.d.ts +5 -2
  212. package/dist/types/ModAddView.d.ts +5 -2
  213. package/dist/types/ModBan.d.ts +5 -2
  214. package/dist/types/ModBanFromCommunity.d.ts +5 -2
  215. package/dist/types/ModBanFromCommunityView.d.ts +5 -2
  216. package/dist/types/ModBanView.d.ts +5 -2
  217. package/dist/types/ModFeaturePost.d.ts +5 -2
  218. package/dist/types/ModFeaturePostView.d.ts +5 -2
  219. package/dist/types/ModHideCommunity.d.ts +5 -2
  220. package/dist/types/ModHideCommunityView.d.ts +5 -2
  221. package/dist/types/ModLockPost.d.ts +5 -2
  222. package/dist/types/ModLockPostView.d.ts +5 -2
  223. package/dist/types/ModRemoveComment.d.ts +5 -2
  224. package/dist/types/ModRemoveCommentView.d.ts +5 -2
  225. package/dist/types/ModRemoveCommunity.d.ts +5 -2
  226. package/dist/types/ModRemoveCommunityView.d.ts +5 -2
  227. package/dist/types/ModRemovePost.d.ts +5 -2
  228. package/dist/types/ModRemovePostView.d.ts +5 -2
  229. package/dist/types/ModTransferCommunity.d.ts +5 -2
  230. package/dist/types/ModTransferCommunityView.d.ts +5 -2
  231. package/dist/types/ModlogActionType.d.ts +3 -0
  232. package/dist/types/ModlogListParams.d.ts +5 -2
  233. package/dist/types/MyUserInfo.d.ts +11 -8
  234. package/dist/types/OAuthAccount.d.ts +12 -0
  235. package/dist/types/OAuthAccount.js +2 -0
  236. package/dist/types/OAuthProvider.d.ts +59 -0
  237. package/dist/types/OAuthProvider.js +2 -0
  238. package/dist/types/OAuthProviderId.d.ts +4 -0
  239. package/dist/types/OAuthProviderId.js +3 -0
  240. package/dist/types/OpenGraphData.d.ts +8 -4
  241. package/dist/types/OpenGraphData.js +0 -1
  242. package/dist/types/PaginationCursor.d.ts +6 -0
  243. package/dist/types/PasswordChangeAfterReset.d.ts +9 -5
  244. package/dist/types/PasswordChangeAfterReset.js +0 -1
  245. package/dist/types/PasswordReset.d.ts +7 -3
  246. package/dist/types/PasswordReset.js +0 -1
  247. package/dist/types/PendingFollow.d.ts +9 -0
  248. package/dist/types/PendingFollow.js +2 -0
  249. package/dist/types/Person.d.ts +42 -5
  250. package/dist/types/PersonAggregates.d.ts +5 -2
  251. package/dist/types/PersonId.d.ts +3 -0
  252. package/dist/types/PersonMention.d.ts +5 -2
  253. package/dist/types/PersonMentionId.d.ts +3 -0
  254. package/dist/types/PersonMentionResponse.d.ts +5 -2
  255. package/dist/types/PersonMentionView.d.ts +5 -2
  256. package/dist/types/PersonView.d.ts +5 -2
  257. package/dist/types/Post.d.ts +59 -7
  258. package/dist/types/PostAggregates.d.ts +8 -2
  259. package/dist/types/PostFeatureType.d.ts +3 -0
  260. package/dist/types/PostId.d.ts +3 -0
  261. package/dist/types/PostListingMode.d.ts +3 -0
  262. package/dist/types/PostReport.d.ts +16 -3
  263. package/dist/types/PostReportId.d.ts +3 -0
  264. package/dist/types/PostReportResponse.d.ts +5 -2
  265. package/dist/types/PostReportView.d.ts +5 -2
  266. package/dist/types/PostResponse.d.ts +2 -2
  267. package/dist/types/PostSortType.d.ts +4 -0
  268. package/dist/types/PostSortType.js +3 -0
  269. package/dist/types/PostView.d.ts +5 -2
  270. package/dist/types/PrivateMessage.d.ts +7 -3
  271. package/dist/types/PrivateMessageId.d.ts +3 -0
  272. package/dist/types/PrivateMessageReport.d.ts +8 -2
  273. package/dist/types/PrivateMessageReportId.d.ts +3 -0
  274. package/dist/types/PrivateMessageReportResponse.d.ts +5 -2
  275. package/dist/types/PrivateMessageReportView.d.ts +5 -2
  276. package/dist/types/PrivateMessageResponse.d.ts +5 -2
  277. package/dist/types/PrivateMessageView.d.ts +5 -2
  278. package/dist/types/PrivateMessagesResponse.d.ts +5 -2
  279. package/dist/types/PublicOAuthProvider.d.ts +2 -0
  280. package/dist/types/PublicOAuthProvider.js +2 -0
  281. package/dist/types/PurgeComment.d.ts +5 -2
  282. package/dist/types/PurgeCommunity.d.ts +5 -2
  283. package/dist/types/PurgePerson.d.ts +5 -2
  284. package/dist/types/PurgePost.d.ts +5 -2
  285. package/dist/types/ReadableFederationState.d.ts +15 -3
  286. package/dist/types/Register.d.ts +24 -5
  287. package/dist/types/Register.js +0 -1
  288. package/dist/types/RegistrationApplication.d.ts +5 -2
  289. package/dist/types/RegistrationApplicationId.d.ts +3 -0
  290. package/dist/types/RegistrationApplicationResponse.d.ts +5 -2
  291. package/dist/types/RegistrationApplicationView.d.ts +5 -2
  292. package/dist/types/RegistrationMode.d.ts +3 -0
  293. package/dist/types/RemoveComment.d.ts +5 -2
  294. package/dist/types/RemoveCommunity.d.ts +5 -2
  295. package/dist/types/RemovePost.d.ts +5 -2
  296. package/dist/types/ResolveCommentReport.d.ts +5 -2
  297. package/dist/types/ResolveObject.d.ts +8 -2
  298. package/dist/types/ResolveObjectResponse.d.ts +5 -2
  299. package/dist/types/ResolvePostReport.d.ts +5 -2
  300. package/dist/types/ResolvePrivateMessageReport.d.ts +5 -2
  301. package/dist/types/SaveComment.d.ts +5 -2
  302. package/dist/types/SavePost.d.ts +5 -2
  303. package/dist/types/SaveUserSettings.d.ts +91 -7
  304. package/dist/types/Search.d.ts +12 -4
  305. package/dist/types/SearchResponse.d.ts +5 -2
  306. package/dist/types/SearchType.d.ts +4 -1
  307. package/dist/types/SensitiveString.d.ts +1 -0
  308. package/dist/types/SensitiveString.js +3 -0
  309. package/dist/types/Site.d.ts +35 -6
  310. package/dist/types/SiteAggregates.d.ts +17 -2
  311. package/dist/types/SiteId.d.ts +3 -0
  312. package/dist/types/SiteResponse.d.ts +9 -4
  313. package/dist/types/SiteView.d.ts +5 -2
  314. package/dist/types/SubscribedType.d.ts +4 -1
  315. package/dist/types/SuccessResponse.d.ts +5 -2
  316. package/dist/types/Tagline.d.ts +5 -4
  317. package/dist/types/Tagline.js +1 -0
  318. package/dist/types/TaglineId.d.ts +4 -0
  319. package/dist/types/TaglineId.js +3 -0
  320. package/dist/types/TaglineResponse.d.ts +4 -0
  321. package/dist/types/TaglineResponse.js +2 -0
  322. package/dist/types/TransferCommunity.d.ts +5 -2
  323. package/dist/types/UpdateTagline.d.ts +8 -0
  324. package/dist/types/UpdateTagline.js +2 -0
  325. package/dist/types/UpdateTotp.d.ts +2 -2
  326. package/dist/types/UpdateTotpResponse.d.ts +2 -2
  327. package/dist/types/VerifyEmail.d.ts +5 -2
  328. package/dist/types/VoteView.d.ts +5 -2
  329. package/package.json +7 -7
  330. package/dist/types/CommunityBlockView.d.ts +0 -6
  331. package/dist/types/InstanceBlockView.d.ts +0 -8
  332. package/dist/types/PersonBlockView.d.ts +0 -5
  333. package/dist/types/SortType.d.ts +0 -1
  334. /package/dist/types/{CommunityBlockView.js → ApproveCommunityPendingFollower.js} +0 -0
  335. /package/dist/types/{InstanceBlockView.js → AuthenticateWithOauth.js} +0 -0
  336. /package/dist/types/{SortType.js → CommunityFollowerState.js} +0 -0
  337. /package/dist/types/{PersonBlockView.js → DeleteOAuthProvider.js} +0 -0
@@ -3,10 +3,13 @@ import type { CommunityView } from "./CommunityView";
3
3
  import type { PersonView } from "./PersonView";
4
4
  import type { PostView } from "./PostView";
5
5
  import type { SearchType } from "./SearchType";
6
- export interface SearchResponse {
6
+ /**
7
+ * The search response, containing lists of the return type possibilities
8
+ */
9
+ export type SearchResponse = {
7
10
  type_: SearchType;
8
11
  comments: Array<CommentView>;
9
12
  posts: Array<PostView>;
10
13
  communities: Array<CommunityView>;
11
14
  users: Array<PersonView>;
12
- }
15
+ };
@@ -1 +1,4 @@
1
- export type SearchType = "All" | "Comments" | "Posts" | "Communities" | "Users" | "Url";
1
+ /**
2
+ * The type of content returned from a search.
3
+ */
4
+ export type SearchType = "All" | "Comments" | "Posts" | "Communities" | "Users";
@@ -0,0 +1 @@
1
+ export type SensitiveString = string;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,18 +1,47 @@
1
+ import type { DbUrl } from "./DbUrl";
1
2
  import type { InstanceId } from "./InstanceId";
2
3
  import type { SiteId } from "./SiteId";
3
- export interface Site {
4
+ /**
5
+ * The site.
6
+ */
7
+ export type Site = {
4
8
  id: SiteId;
5
9
  name: string;
10
+ /**
11
+ * A sidebar for the site in markdown.
12
+ */
6
13
  sidebar?: string;
7
14
  published: string;
8
15
  updated?: string;
9
- icon?: string;
10
- banner?: string;
16
+ /**
17
+ * An icon URL.
18
+ */
19
+ icon?: DbUrl;
20
+ /**
21
+ * A banner url.
22
+ */
23
+ banner?: DbUrl;
24
+ /**
25
+ * A shorter, one-line description of the site.
26
+ */
11
27
  description?: string;
12
- actor_id: string;
28
+ /**
29
+ * The federated actor_id.
30
+ */
31
+ actor_id: DbUrl;
32
+ /**
33
+ * The time the site was last refreshed.
34
+ */
13
35
  last_refreshed_at: string;
14
- inbox_url: string;
36
+ /**
37
+ * The site inbox
38
+ */
39
+ inbox_url: DbUrl;
15
40
  public_key: string;
16
41
  instance_id: InstanceId;
42
+ /**
43
+ * If present, nsfw content is visible by default. Should be displayed by frontends/clients
44
+ * when the site is first opened by a user.
45
+ */
17
46
  content_warning?: string;
18
- }
47
+ };
@@ -1,12 +1,27 @@
1
1
  import type { SiteId } from "./SiteId";
2
- export interface SiteAggregates {
2
+ /**
3
+ * Aggregate data for a site.
4
+ */
5
+ export type SiteAggregates = {
3
6
  site_id: SiteId;
4
7
  users: number;
5
8
  posts: number;
6
9
  comments: number;
7
10
  communities: number;
11
+ /**
12
+ * The number of users with any activity in the last day.
13
+ */
8
14
  users_active_day: number;
15
+ /**
16
+ * The number of users with any activity in the last week.
17
+ */
9
18
  users_active_week: number;
19
+ /**
20
+ * The number of users with any activity in the last month.
21
+ */
10
22
  users_active_month: number;
23
+ /**
24
+ * The number of users with any activity in the last half year.
25
+ */
11
26
  users_active_half_year: number;
12
- }
27
+ };
@@ -1 +1,4 @@
1
+ /**
2
+ * The site id.
3
+ */
1
4
  export type SiteId = number;
@@ -1,6 +1,11 @@
1
1
  import type { SiteView } from "./SiteView";
2
- import type { Tagline } from "./Tagline";
3
- export interface SiteResponse {
2
+ /**
3
+ * The response for a site.
4
+ */
5
+ export type SiteResponse = {
4
6
  site_view: SiteView;
5
- taglines: Array<Tagline>;
6
- }
7
+ /**
8
+ * deprecated, use field `tagline` or /api/v3/tagline/list
9
+ */
10
+ taglines: Array<null>;
11
+ };
@@ -2,9 +2,12 @@ import type { LocalSite } from "./LocalSite";
2
2
  import type { LocalSiteRateLimit } from "./LocalSiteRateLimit";
3
3
  import type { Site } from "./Site";
4
4
  import type { SiteAggregates } from "./SiteAggregates";
5
- export interface SiteView {
5
+ /**
6
+ * A site view.
7
+ */
8
+ export type SiteView = {
6
9
  site: Site;
7
10
  local_site: LocalSite;
8
11
  local_site_rate_limit: LocalSiteRateLimit;
9
12
  counts: SiteAggregates;
10
- }
13
+ };
@@ -1 +1,4 @@
1
- export type SubscribedType = "Subscribed" | "NotSubscribed" | "Pending";
1
+ /**
2
+ * A type / status for a community subscribe.
3
+ */
4
+ export type SubscribedType = "Subscribed" | "NotSubscribed" | "Pending" | "ApprovalRequired";
@@ -1,3 +1,6 @@
1
- export interface SuccessResponse {
1
+ /**
2
+ * Saves settings for your user.
3
+ */
4
+ export type SuccessResponse = {
2
5
  success: boolean;
3
- }
6
+ };
@@ -1,8 +1,9 @@
1
- import type { LocalSiteId } from "./LocalSiteId";
2
- export interface Tagline {
1
+ /**
2
+ * A tagline, shown at the top of your site.
3
+ */
4
+ export type Tagline = {
3
5
  id: number;
4
- local_site_id: LocalSiteId;
5
6
  content: string;
6
7
  published: string;
7
8
  updated?: string;
8
- }
9
+ };
@@ -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 });
@@ -0,0 +1,4 @@
1
+ /**
2
+ * The tagline id.
3
+ */
4
+ export type TaglineId = number;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,4 @@
1
+ import type { Tagline } from "./Tagline";
2
+ export type TaglineResponse = {
3
+ tagline: Tagline;
4
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,6 +1,9 @@
1
1
  import type { CommunityId } from "./CommunityId";
2
2
  import type { PersonId } from "./PersonId";
3
- export interface TransferCommunity {
3
+ /**
4
+ * Transfer a community to a new owner.
5
+ */
6
+ export type TransferCommunity = {
4
7
  community_id: CommunityId;
5
8
  person_id: PersonId;
6
- }
9
+ };
@@ -0,0 +1,8 @@
1
+ import type { TaglineId } from "./TaglineId";
2
+ /**
3
+ * Update a tagline
4
+ */
5
+ export type UpdateTagline = {
6
+ id: TaglineId;
7
+ content: string;
8
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,4 +1,4 @@
1
- export interface UpdateTotp {
1
+ export type UpdateTotp = {
2
2
  totp_token: string;
3
3
  enabled: boolean;
4
- }
4
+ };
@@ -1,3 +1,3 @@
1
- export interface UpdateTotpResponse {
1
+ export type UpdateTotpResponse = {
2
2
  enabled: boolean;
3
- }
3
+ };
@@ -1,3 +1,6 @@
1
- export interface VerifyEmail {
1
+ /**
2
+ * Verify your email.
3
+ */
4
+ export type VerifyEmail = {
2
5
  token: string;
3
- }
6
+ };
@@ -1,6 +1,9 @@
1
1
  import type { Person } from "./Person";
2
- export interface VoteView {
2
+ /**
3
+ * A vote view for checking a post or comments votes.
4
+ */
5
+ export type VoteView = {
3
6
  creator: Person;
4
7
  creator_banned_from_community: boolean;
5
8
  score: number;
6
- }
9
+ };
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": "0.20.0-alpha.6",
4
+ "version": "0.20.0-api-v4.0",
5
5
  "author": "Dessalines <tyhou13@gmx.com>",
6
6
  "license": "AGPL-3.0",
7
7
  "main": "./dist/index.js",
@@ -19,10 +19,10 @@
19
19
  "url": "git+https://github.com/LemmyNet/lemmy-js-client.git"
20
20
  },
21
21
  "devDependencies": {
22
- "@types/node": "^22.1.0",
23
- "@typescript-eslint/eslint-plugin": "^8.0.0",
24
- "@typescript-eslint/parser": "^8.0.0",
25
- "eslint": "^9.8.0",
22
+ "@types/node": "^22.7.4",
23
+ "@typescript-eslint/eslint-plugin": "^8.7.0",
24
+ "@typescript-eslint/parser": "^8.7.0",
25
+ "eslint": "^9.11.1",
26
26
  "eslint-plugin-prettier": "^5.2.1",
27
27
  "husky": "^9.1.4",
28
28
  "lint-staged": "^15.2.7",
@@ -33,9 +33,9 @@
33
33
  "sortpack": "^2.4.0",
34
34
  "typedoc": "^0.26.5",
35
35
  "typescript": "^5.5.4",
36
- "typescript-eslint": "^8.0.0"
36
+ "typescript-eslint": "^8.7.0"
37
37
  },
38
- "packageManager": "pnpm@9.9.0",
38
+ "packageManager": "pnpm@9.14.2",
39
39
  "types": "./dist/index.d.ts",
40
40
  "lint-staged": {
41
41
  "*.{ts,tsx,js}": [
@@ -1,6 +0,0 @@
1
- import type { Community } from "./Community";
2
- import type { Person } from "./Person";
3
- export interface CommunityBlockView {
4
- person: Person;
5
- community: Community;
6
- }
@@ -1,8 +0,0 @@
1
- import type { Instance } from "./Instance";
2
- import type { Person } from "./Person";
3
- import type { Site } from "./Site";
4
- export interface InstanceBlockView {
5
- person: Person;
6
- instance: Instance;
7
- site?: Site;
8
- }
@@ -1,5 +0,0 @@
1
- import type { Person } from "./Person";
2
- export interface PersonBlockView {
3
- person: Person;
4
- target: Person;
5
- }
@@ -1 +0,0 @@
1
- export type SortType = "Active" | "Hot" | "New" | "Old" | "TopDay" | "TopWeek" | "TopMonth" | "TopYear" | "TopAll" | "MostComments" | "NewComments" | "TopHour" | "TopSixHour" | "TopTwelveHour" | "TopThreeMonths" | "TopSixMonths" | "TopNineMonths" | "Controversial" | "Scaled";