lemmy-js-client 1.0.0-merge-modlog-tables.8 → 1.0.0-merge-count-endpoints.1

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 (97) hide show
  1. package/dist/http.d.ts +44 -54
  2. package/dist/http.js +27 -40
  3. package/dist/index.d.ts +5 -28
  4. package/dist/other_types.d.ts +0 -3
  5. package/dist/types/AdminListUsers.d.ts +0 -1
  6. package/dist/types/CountsResponse.d.ts +6 -0
  7. package/dist/types/GetComments.d.ts +0 -1
  8. package/dist/types/GetFederatedInstances.d.ts +0 -1
  9. package/dist/types/GetModlog.d.ts +0 -1
  10. package/dist/types/GetPersonDetailsResponse.d.ts +2 -0
  11. package/dist/types/GetPosts.d.ts +1 -1
  12. package/dist/types/GetSiteResponse.d.ts +6 -0
  13. package/dist/types/ListCommentLikes.d.ts +0 -1
  14. package/dist/types/ListCommunities.d.ts +0 -1
  15. package/dist/types/ListCommunityPendingFollows.d.ts +0 -1
  16. package/dist/types/ListMedia.d.ts +0 -1
  17. package/dist/types/ListMultiCommunities.d.ts +12 -1
  18. package/dist/types/ListNotifications.d.ts +0 -1
  19. package/dist/types/ListPersonContent.d.ts +0 -1
  20. package/dist/types/ListPersonHidden.d.ts +0 -1
  21. package/dist/types/ListPersonLiked.d.ts +0 -1
  22. package/dist/types/ListPersonRead.d.ts +0 -1
  23. package/dist/types/ListPersonSaved.d.ts +0 -1
  24. package/dist/types/ListPostLikes.d.ts +0 -1
  25. package/dist/types/ListRegistrationApplications.d.ts +0 -1
  26. package/dist/types/ListReports.d.ts +0 -1
  27. package/dist/types/ListTaglines.d.ts +0 -1
  28. package/dist/types/ModlogKind.d.ts +1 -1
  29. package/dist/types/ModlogView.d.ts +6 -6
  30. package/dist/types/MultiCommunity.d.ts +3 -0
  31. package/dist/types/MultiCommunityListingType.d.ts +4 -0
  32. package/dist/types/MultiCommunitySortType.d.ts +1 -0
  33. package/dist/types/MultiCommunitySortType.js +3 -0
  34. package/dist/types/MyUserInfo.d.ts +2 -0
  35. package/dist/types/PagedResponse.d.ts +11 -0
  36. package/dist/types/PaginationCursor.d.ts +5 -1
  37. package/dist/types/PluginMetadata.d.ts +2 -2
  38. package/dist/types/{PersonSavedCombinedView.d.ts → PostCommentCombinedView.d.ts} +1 -1
  39. package/dist/types/RegistrationApplication.d.ts +1 -0
  40. package/dist/types/Search.d.ts +4 -1
  41. package/dist/types/SearchResponse.d.ts +11 -1
  42. package/package.json +4 -4
  43. package/dist/types/AdminListUsersResponse.d.ts +0 -10
  44. package/dist/types/BanFromCommunityResponse.d.ts +0 -8
  45. package/dist/types/GetCommentsResponse.d.ts +0 -10
  46. package/dist/types/GetCommentsResponse.js +0 -2
  47. package/dist/types/GetCommentsSlimResponse.d.ts +0 -10
  48. package/dist/types/GetCommentsSlimResponse.js +0 -2
  49. package/dist/types/GetCommunityPendingFollowsCountResponse.d.ts +0 -3
  50. package/dist/types/GetFederatedInstancesResponse.d.ts +0 -10
  51. package/dist/types/GetFederatedInstancesResponse.js +0 -2
  52. package/dist/types/GetModlogResponse.d.ts +0 -13
  53. package/dist/types/GetModlogResponse.js +0 -2
  54. package/dist/types/GetPostsResponse.d.ts +0 -13
  55. package/dist/types/GetPostsResponse.js +0 -2
  56. package/dist/types/GetReportCount.d.ts +0 -7
  57. package/dist/types/GetReportCount.js +0 -2
  58. package/dist/types/GetReportCountResponse.d.ts +0 -6
  59. package/dist/types/ListCommentLikesResponse.d.ts +0 -13
  60. package/dist/types/ListCommentLikesResponse.js +0 -2
  61. package/dist/types/ListCommunitiesResponse.d.ts +0 -13
  62. package/dist/types/ListCommunitiesResponse.js +0 -2
  63. package/dist/types/ListCommunityPendingFollowsResponse.d.ts +0 -10
  64. package/dist/types/ListCommunityPendingFollowsResponse.js +0 -2
  65. package/dist/types/ListMediaResponse.d.ts +0 -10
  66. package/dist/types/ListMediaResponse.js +0 -2
  67. package/dist/types/ListMultiCommunitiesResponse.d.ts +0 -4
  68. package/dist/types/ListMultiCommunitiesResponse.js +0 -2
  69. package/dist/types/ListNotificationsResponse.d.ts +0 -13
  70. package/dist/types/ListNotificationsResponse.js +0 -2
  71. package/dist/types/ListPersonContentResponse.d.ts +0 -13
  72. package/dist/types/ListPersonContentResponse.js +0 -2
  73. package/dist/types/ListPersonHiddenResponse.d.ts +0 -13
  74. package/dist/types/ListPersonHiddenResponse.js +0 -2
  75. package/dist/types/ListPersonLikedResponse.d.ts +0 -13
  76. package/dist/types/ListPersonLikedResponse.js +0 -2
  77. package/dist/types/ListPersonReadResponse.d.ts +0 -13
  78. package/dist/types/ListPersonReadResponse.js +0 -2
  79. package/dist/types/ListPersonSavedResponse.d.ts +0 -13
  80. package/dist/types/ListPersonSavedResponse.js +0 -2
  81. package/dist/types/ListPostLikesResponse.d.ts +0 -13
  82. package/dist/types/ListPostLikesResponse.js +0 -2
  83. package/dist/types/ListRegistrationApplicationsResponse.d.ts +0 -13
  84. package/dist/types/ListRegistrationApplicationsResponse.js +0 -2
  85. package/dist/types/ListReportsResponse.d.ts +0 -13
  86. package/dist/types/ListReportsResponse.js +0 -2
  87. package/dist/types/ListTaglinesResponse.d.ts +0 -13
  88. package/dist/types/ListTaglinesResponse.js +0 -2
  89. package/dist/types/PersonContentCombinedView.d.ts +0 -7
  90. package/dist/types/PersonContentCombinedView.js +0 -2
  91. package/dist/types/PersonLikedCombinedView.d.ts +0 -7
  92. package/dist/types/PersonLikedCombinedView.js +0 -2
  93. package/dist/types/PersonSavedCombinedView.js +0 -2
  94. /package/dist/types/{GetCommunityPendingFollowsCountResponse.js → CountsResponse.js} +0 -0
  95. /package/dist/types/{GetReportCountResponse.js → MultiCommunityListingType.js} +0 -0
  96. /package/dist/types/{AdminListUsersResponse.js → PagedResponse.js} +0 -0
  97. /package/dist/types/{BanFromCommunityResponse.js → PostCommentCombinedView.js} +0 -0
package/dist/index.d.ts CHANGED
@@ -8,13 +8,11 @@ export { AddModToCommunityResponse } from "./types/AddModToCommunityResponse";
8
8
  export { AdminAllowInstanceParams } from "./types/AdminAllowInstanceParams";
9
9
  export { AdminBlockInstanceParams } from "./types/AdminBlockInstanceParams";
10
10
  export { AdminListUsers } from "./types/AdminListUsers";
11
- export { AdminListUsersResponse } from "./types/AdminListUsersResponse";
12
11
  export { AllLemmyErrors } from "./types/AllLemmyErrors";
13
12
  export { ApproveCommunityPendingFollower } from "./types/ApproveCommunityPendingFollower";
14
13
  export { ApproveRegistrationApplication } from "./types/ApproveRegistrationApplication";
15
14
  export { AuthenticateWithOauth } from "./types/AuthenticateWithOauth";
16
15
  export { BanFromCommunity } from "./types/BanFromCommunity";
17
- export { BanFromCommunityResponse } from "./types/BanFromCommunityResponse";
18
16
  export { BanPerson } from "./types/BanPerson";
19
17
  export { BlockCommunity } from "./types/BlockCommunity";
20
18
  export { BlockPerson } from "./types/BlockPerson";
@@ -47,6 +45,7 @@ export { CommunityResponse } from "./types/CommunityResponse";
47
45
  export { CommunitySortType } from "./types/CommunitySortType";
48
46
  export { CommunityView } from "./types/CommunityView";
49
47
  export { CommunityVisibility } from "./types/CommunityVisibility";
48
+ export { CountsResponse } from "./types/CountsResponse";
50
49
  export { CreateComment } from "./types/CreateComment";
51
50
  export { CreateCommentLike } from "./types/CreateCommentLike";
52
51
  export { CreateCommentReport } from "./types/CreateCommentReport";
@@ -101,16 +100,11 @@ export { GenerateTotpSecretResponse } from "./types/GenerateTotpSecretResponse";
101
100
  export { GetCaptchaResponse } from "./types/GetCaptchaResponse";
102
101
  export { GetComment } from "./types/GetComment";
103
102
  export { GetComments } from "./types/GetComments";
104
- export { GetCommentsResponse } from "./types/GetCommentsResponse";
105
- export { GetCommentsSlimResponse } from "./types/GetCommentsSlimResponse";
106
103
  export { GetCommunity } from "./types/GetCommunity";
107
- export { GetCommunityPendingFollowsCountResponse } from "./types/GetCommunityPendingFollowsCountResponse";
108
104
  export { GetCommunityResponse } from "./types/GetCommunityResponse";
109
105
  export { GetFederatedInstances } from "./types/GetFederatedInstances";
110
106
  export { GetFederatedInstancesKind } from "./types/GetFederatedInstancesKind";
111
- export { GetFederatedInstancesResponse } from "./types/GetFederatedInstancesResponse";
112
107
  export { GetModlog } from "./types/GetModlog";
113
- export { GetModlogResponse } from "./types/GetModlogResponse";
114
108
  export { GetMultiCommunity } from "./types/GetMultiCommunity";
115
109
  export { GetMultiCommunityResponse } from "./types/GetMultiCommunityResponse";
116
110
  export { GetPersonDetails } from "./types/GetPersonDetails";
@@ -118,11 +112,8 @@ export { GetPersonDetailsResponse } from "./types/GetPersonDetailsResponse";
118
112
  export { GetPost } from "./types/GetPost";
119
113
  export { GetPostResponse } from "./types/GetPostResponse";
120
114
  export { GetPosts } from "./types/GetPosts";
121
- export { GetPostsResponse } from "./types/GetPostsResponse";
122
115
  export { GetRandomCommunity } from "./types/GetRandomCommunity";
123
116
  export { GetRegistrationApplication } from "./types/GetRegistrationApplication";
124
- export { GetReportCount } from "./types/GetReportCount";
125
- export { GetReportCountResponse } from "./types/GetReportCountResponse";
126
117
  export { GetSiteMetadata } from "./types/GetSiteMetadata";
127
118
  export { GetSiteMetadataResponse } from "./types/GetSiteMetadataResponse";
128
119
  export { GetSiteResponse } from "./types/GetSiteResponse";
@@ -143,38 +134,23 @@ export { LemmyErrorType } from "./types/LemmyErrorType";
143
134
  export { LikeType } from "./types/LikeType";
144
135
  export { LinkMetadata } from "./types/LinkMetadata";
145
136
  export { ListCommentLikes } from "./types/ListCommentLikes";
146
- export { ListCommentLikesResponse } from "./types/ListCommentLikesResponse";
147
137
  export { ListCommunities } from "./types/ListCommunities";
148
- export { ListCommunitiesResponse } from "./types/ListCommunitiesResponse";
149
138
  export { ListCommunityPendingFollows } from "./types/ListCommunityPendingFollows";
150
- export { ListCommunityPendingFollowsResponse } from "./types/ListCommunityPendingFollowsResponse";
151
139
  export { ListCustomEmojis } from "./types/ListCustomEmojis";
152
140
  export { ListCustomEmojisResponse } from "./types/ListCustomEmojisResponse";
153
141
  export { ListLoginsResponse } from "./types/ListLoginsResponse";
154
142
  export { ListMedia } from "./types/ListMedia";
155
- export { ListMediaResponse } from "./types/ListMediaResponse";
156
143
  export { ListMultiCommunities } from "./types/ListMultiCommunities";
157
- export { ListMultiCommunitiesResponse } from "./types/ListMultiCommunitiesResponse";
158
144
  export { ListNotifications } from "./types/ListNotifications";
159
- export { ListNotificationsResponse } from "./types/ListNotificationsResponse";
160
145
  export { ListPersonContent } from "./types/ListPersonContent";
161
- export { ListPersonContentResponse } from "./types/ListPersonContentResponse";
162
146
  export { ListPersonHidden } from "./types/ListPersonHidden";
163
- export { ListPersonHiddenResponse } from "./types/ListPersonHiddenResponse";
164
147
  export { ListPersonLiked } from "./types/ListPersonLiked";
165
- export { ListPersonLikedResponse } from "./types/ListPersonLikedResponse";
166
148
  export { ListPersonRead } from "./types/ListPersonRead";
167
- export { ListPersonReadResponse } from "./types/ListPersonReadResponse";
168
149
  export { ListPersonSaved } from "./types/ListPersonSaved";
169
- export { ListPersonSavedResponse } from "./types/ListPersonSavedResponse";
170
150
  export { ListPostLikes } from "./types/ListPostLikes";
171
- export { ListPostLikesResponse } from "./types/ListPostLikesResponse";
172
151
  export { ListRegistrationApplications } from "./types/ListRegistrationApplications";
173
- export { ListRegistrationApplicationsResponse } from "./types/ListRegistrationApplicationsResponse";
174
152
  export { ListReports } from "./types/ListReports";
175
- export { ListReportsResponse } from "./types/ListReportsResponse";
176
153
  export { ListTaglines } from "./types/ListTaglines";
177
- export { ListTaglinesResponse } from "./types/ListTaglinesResponse";
178
154
  export { ListingType } from "./types/ListingType";
179
155
  export { LocalImage } from "./types/LocalImage";
180
156
  export { LocalImageView } from "./types/LocalImageView";
@@ -202,7 +178,9 @@ export { MultiCommunity } from "./types/MultiCommunity";
202
178
  export { MultiCommunityEntry } from "./types/MultiCommunityEntry";
203
179
  export { MultiCommunityFollow } from "./types/MultiCommunityFollow";
204
180
  export { MultiCommunityId } from "./types/MultiCommunityId";
181
+ export { MultiCommunityListingType } from "./types/MultiCommunityListingType";
205
182
  export { MultiCommunityResponse } from "./types/MultiCommunityResponse";
183
+ export { MultiCommunitySortType } from "./types/MultiCommunitySortType";
206
184
  export { MultiCommunityView } from "./types/MultiCommunityView";
207
185
  export { MyUserInfo } from "./types/MyUserInfo";
208
186
  export { NotePerson } from "./types/NotePerson";
@@ -216,6 +194,7 @@ export { OAuthAccount } from "./types/OAuthAccount";
216
194
  export { OAuthProvider } from "./types/OAuthProvider";
217
195
  export { OAuthProviderId } from "./types/OAuthProviderId";
218
196
  export { OpenGraphData } from "./types/OpenGraphData";
197
+ export { PagedResponse } from "./types/PagedResponse";
219
198
  export { PaginationCursor } from "./types/PaginationCursor";
220
199
  export { PasswordChangeAfterReset } from "./types/PasswordChangeAfterReset";
221
200
  export { PasswordReset } from "./types/PasswordReset";
@@ -223,16 +202,14 @@ export { PendingFollow } from "./types/PendingFollow";
223
202
  export { PendingFollowerView } from "./types/PendingFollowerView";
224
203
  export { Person } from "./types/Person";
225
204
  export { PersonActions } from "./types/PersonActions";
226
- export { PersonContentCombinedView } from "./types/PersonContentCombinedView";
227
205
  export { PersonContentType } from "./types/PersonContentType";
228
206
  export { PersonId } from "./types/PersonId";
229
- export { PersonLikedCombinedView } from "./types/PersonLikedCombinedView";
230
207
  export { PersonResponse } from "./types/PersonResponse";
231
- export { PersonSavedCombinedView } from "./types/PersonSavedCombinedView";
232
208
  export { PersonView } from "./types/PersonView";
233
209
  export { PluginMetadata } from "./types/PluginMetadata";
234
210
  export { Post } from "./types/Post";
235
211
  export { PostActions } from "./types/PostActions";
212
+ export { PostCommentCombinedView } from "./types/PostCommentCombinedView";
236
213
  export { PostFeatureType } from "./types/PostFeatureType";
237
214
  export { PostId } from "./types/PostId";
238
215
  export { PostListingMode } from "./types/PostListingMode";
@@ -11,7 +11,6 @@ import { GetPost } from "./types/GetPost";
11
11
  import { GetPosts } from "./types/GetPosts";
12
12
  import { GetRandomCommunity } from "./types/GetRandomCommunity";
13
13
  import { GetRegistrationApplication } from "./types/GetRegistrationApplication";
14
- import { GetReportCount } from "./types/GetReportCount";
15
14
  import { GetSiteMetadata } from "./types/GetSiteMetadata";
16
15
  import { ListCommentLikes } from "./types/ListCommentLikes";
17
16
  import { ListCommunities } from "./types/ListCommunities";
@@ -70,8 +69,6 @@ export interface GetPersonDetailsI extends GetPersonDetails {
70
69
  }
71
70
  export interface ListPersonContentI extends ListPersonContent {
72
71
  }
73
- export interface GetReportCountI extends GetReportCount {
74
- }
75
72
  export interface ListNotificationsI extends ListNotifications {
76
73
  }
77
74
  export interface ListPersonSavedI extends ListPersonSaved {
@@ -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
  };
@@ -0,0 +1,6 @@
1
+ export type CountsResponse = {
2
+ notification_count: number;
3
+ report_count: number;
4
+ pending_follow_count: number;
5
+ registration_application_count: number;
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
  };
@@ -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
  };
@@ -1,4 +1,4 @@
1
1
  /**
2
- * Types of notifications which can be received in inbox
2
+ * A list of possible types for the various modlog actions.
3
3
  */
4
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";
@@ -6,10 +6,10 @@ import type { Person } from "./Person";
6
6
  import type { Post } from "./Post";
7
7
  export type ModlogView = {
8
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;
9
+ moderator?: Person;
10
+ target_person?: Person;
11
+ target_instance?: Instance;
12
+ target_community?: Community;
13
+ target_post?: Post;
14
+ target_comment?: Comment;
15
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";
@@ -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 });
@@ -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>;
@@ -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
+ items: 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
  };
@@ -1,6 +1,6 @@
1
1
  import type { CommentView } from "./CommentView";
2
2
  import type { PostView } from "./PostView";
3
- export type PersonSavedCombinedView = ({
3
+ export type PostCommentCombinedView = ({
4
4
  type_: "post";
5
5
  } & PostView) | ({
6
6
  type_: "comment";
@@ -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
  */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "lemmy-js-client",
3
3
  "description": "A javascript / typescript client for Lemmy",
4
- "version": "1.0.0-merge-modlog-tables.8",
4
+ "version": "1.0.0-merge-count-endpoints.1",
5
5
  "author": "Dessalines",
6
6
  "license": "AGPL-3.0",
7
7
  "main": "./dist/index.js",
@@ -25,7 +25,7 @@
25
25
  "devDependencies": {
26
26
  "@eslint/js": "^9.20.0",
27
27
  "@redocly/cli": "^2.0.0",
28
- "@types/node": "^22.7.4",
28
+ "@types/node": "^24.0.0",
29
29
  "@typescript-eslint/eslint-plugin": "^8.7.0",
30
30
  "@typescript-eslint/parser": "^8.7.0",
31
31
  "ajv": "^8.17.1",
@@ -38,13 +38,13 @@
38
38
  "prettier-plugin-import-sort": "^0.0.7",
39
39
  "prettier-plugin-organize-imports": "^4.0.0",
40
40
  "prettier-plugin-packagejson": "^2.5.1",
41
- "sortpack": "^3.0.0",
41
+ "sortpack": "^4.0.0",
42
42
  "tsoa": "^6.6.0",
43
43
  "typedoc": "^0.28.0",
44
44
  "typescript": "^5.5.4",
45
45
  "typescript-eslint": "^8.7.0"
46
46
  },
47
- "packageManager": "pnpm@10.19.0",
47
+ "packageManager": "pnpm@10.24.0",
48
48
  "types": "./dist/index.d.ts",
49
49
  "lint-staged": {
50
50
  "*.{ts,tsx,js}": [
@@ -1,10 +0,0 @@
1
- import type { LocalUserView } from "./LocalUserView";
2
- import type { PaginationCursor } from "./PaginationCursor";
3
- export type AdminListUsersResponse = {
4
- users: Array<LocalUserView>;
5
- /**
6
- * the pagination cursor to use to fetch the next page
7
- */
8
- next_page?: PaginationCursor;
9
- prev_page?: PaginationCursor;
10
- };
@@ -1,8 +0,0 @@
1
- import type { PersonView } from "./PersonView";
2
- /**
3
- * The response for banning a user from a community.
4
- */
5
- export type BanFromCommunityResponse = {
6
- person_view: PersonView;
7
- banned: boolean;
8
- };
@@ -1,10 +0,0 @@
1
- import type { CommentView } from "./CommentView";
2
- import type { PaginationCursor } from "./PaginationCursor";
3
- /**
4
- * The comment list response.
5
- */
6
- export type GetCommentsResponse = {
7
- comments: Array<CommentView>;
8
- next_page?: PaginationCursor;
9
- prev_page?: PaginationCursor;
10
- };
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,10 +0,0 @@
1
- import type { CommentSlimView } from "./CommentSlimView";
2
- import type { PaginationCursor } from "./PaginationCursor";
3
- /**
4
- * A slimmer comment list response, without the post or community.
5
- */
6
- export type GetCommentsSlimResponse = {
7
- comments: Array<CommentSlimView>;
8
- next_page?: PaginationCursor;
9
- prev_page?: PaginationCursor;
10
- };
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,3 +0,0 @@
1
- export type GetCommunityPendingFollowsCountResponse = {
2
- count: number;
3
- };
@@ -1,10 +0,0 @@
1
- import type { FederatedInstanceView } from "./FederatedInstanceView";
2
- import type { PaginationCursor } from "./PaginationCursor";
3
- /**
4
- * A response of federated instances.
5
- */
6
- export type GetFederatedInstancesResponse = {
7
- federated_instances: Array<FederatedInstanceView>;
8
- next_page?: PaginationCursor;
9
- prev_page?: PaginationCursor;
10
- };
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,13 +0,0 @@
1
- import type { ModlogView } from "./ModlogView";
2
- import type { PaginationCursor } from "./PaginationCursor";
3
- /**
4
- * The modlog fetch response.
5
- */
6
- export type GetModlogResponse = {
7
- modlog: Array<ModlogView>;
8
- /**
9
- * the pagination cursor to use to fetch the next page
10
- */
11
- next_page?: PaginationCursor;
12
- prev_page?: PaginationCursor;
13
- };