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.
- package/dist/http.d.ts +44 -54
- package/dist/http.js +27 -40
- package/dist/index.d.ts +5 -28
- package/dist/other_types.d.ts +0 -3
- package/dist/types/AdminListUsers.d.ts +0 -1
- package/dist/types/CountsResponse.d.ts +6 -0
- package/dist/types/GetComments.d.ts +0 -1
- package/dist/types/GetFederatedInstances.d.ts +0 -1
- package/dist/types/GetModlog.d.ts +0 -1
- package/dist/types/GetPersonDetailsResponse.d.ts +2 -0
- package/dist/types/GetPosts.d.ts +1 -1
- package/dist/types/GetSiteResponse.d.ts +6 -0
- package/dist/types/ListCommentLikes.d.ts +0 -1
- package/dist/types/ListCommunities.d.ts +0 -1
- package/dist/types/ListCommunityPendingFollows.d.ts +0 -1
- package/dist/types/ListMedia.d.ts +0 -1
- package/dist/types/ListMultiCommunities.d.ts +12 -1
- package/dist/types/ListNotifications.d.ts +0 -1
- package/dist/types/ListPersonContent.d.ts +0 -1
- package/dist/types/ListPersonHidden.d.ts +0 -1
- package/dist/types/ListPersonLiked.d.ts +0 -1
- package/dist/types/ListPersonRead.d.ts +0 -1
- package/dist/types/ListPersonSaved.d.ts +0 -1
- package/dist/types/ListPostLikes.d.ts +0 -1
- package/dist/types/ListRegistrationApplications.d.ts +0 -1
- package/dist/types/ListReports.d.ts +0 -1
- package/dist/types/ListTaglines.d.ts +0 -1
- package/dist/types/ModlogKind.d.ts +1 -1
- package/dist/types/ModlogView.d.ts +6 -6
- package/dist/types/MultiCommunity.d.ts +3 -0
- package/dist/types/MultiCommunityListingType.d.ts +4 -0
- package/dist/types/MultiCommunitySortType.d.ts +1 -0
- package/dist/types/MultiCommunitySortType.js +3 -0
- package/dist/types/MyUserInfo.d.ts +2 -0
- package/dist/types/PagedResponse.d.ts +11 -0
- package/dist/types/PaginationCursor.d.ts +5 -1
- package/dist/types/PluginMetadata.d.ts +2 -2
- package/dist/types/{PersonSavedCombinedView.d.ts → PostCommentCombinedView.d.ts} +1 -1
- package/dist/types/RegistrationApplication.d.ts +1 -0
- package/dist/types/Search.d.ts +4 -1
- package/dist/types/SearchResponse.d.ts +11 -1
- package/package.json +4 -4
- package/dist/types/AdminListUsersResponse.d.ts +0 -10
- package/dist/types/BanFromCommunityResponse.d.ts +0 -8
- package/dist/types/GetCommentsResponse.d.ts +0 -10
- package/dist/types/GetCommentsResponse.js +0 -2
- package/dist/types/GetCommentsSlimResponse.d.ts +0 -10
- package/dist/types/GetCommentsSlimResponse.js +0 -2
- package/dist/types/GetCommunityPendingFollowsCountResponse.d.ts +0 -3
- package/dist/types/GetFederatedInstancesResponse.d.ts +0 -10
- package/dist/types/GetFederatedInstancesResponse.js +0 -2
- package/dist/types/GetModlogResponse.d.ts +0 -13
- package/dist/types/GetModlogResponse.js +0 -2
- package/dist/types/GetPostsResponse.d.ts +0 -13
- package/dist/types/GetPostsResponse.js +0 -2
- package/dist/types/GetReportCount.d.ts +0 -7
- package/dist/types/GetReportCount.js +0 -2
- package/dist/types/GetReportCountResponse.d.ts +0 -6
- package/dist/types/ListCommentLikesResponse.d.ts +0 -13
- package/dist/types/ListCommentLikesResponse.js +0 -2
- package/dist/types/ListCommunitiesResponse.d.ts +0 -13
- package/dist/types/ListCommunitiesResponse.js +0 -2
- package/dist/types/ListCommunityPendingFollowsResponse.d.ts +0 -10
- package/dist/types/ListCommunityPendingFollowsResponse.js +0 -2
- package/dist/types/ListMediaResponse.d.ts +0 -10
- package/dist/types/ListMediaResponse.js +0 -2
- package/dist/types/ListMultiCommunitiesResponse.d.ts +0 -4
- package/dist/types/ListMultiCommunitiesResponse.js +0 -2
- package/dist/types/ListNotificationsResponse.d.ts +0 -13
- package/dist/types/ListNotificationsResponse.js +0 -2
- package/dist/types/ListPersonContentResponse.d.ts +0 -13
- package/dist/types/ListPersonContentResponse.js +0 -2
- package/dist/types/ListPersonHiddenResponse.d.ts +0 -13
- package/dist/types/ListPersonHiddenResponse.js +0 -2
- package/dist/types/ListPersonLikedResponse.d.ts +0 -13
- package/dist/types/ListPersonLikedResponse.js +0 -2
- package/dist/types/ListPersonReadResponse.d.ts +0 -13
- package/dist/types/ListPersonReadResponse.js +0 -2
- package/dist/types/ListPersonSavedResponse.d.ts +0 -13
- package/dist/types/ListPersonSavedResponse.js +0 -2
- package/dist/types/ListPostLikesResponse.d.ts +0 -13
- package/dist/types/ListPostLikesResponse.js +0 -2
- package/dist/types/ListRegistrationApplicationsResponse.d.ts +0 -13
- package/dist/types/ListRegistrationApplicationsResponse.js +0 -2
- package/dist/types/ListReportsResponse.d.ts +0 -13
- package/dist/types/ListReportsResponse.js +0 -2
- package/dist/types/ListTaglinesResponse.d.ts +0 -13
- package/dist/types/ListTaglinesResponse.js +0 -2
- package/dist/types/PersonContentCombinedView.d.ts +0 -7
- package/dist/types/PersonContentCombinedView.js +0 -2
- package/dist/types/PersonLikedCombinedView.d.ts +0 -7
- package/dist/types/PersonLikedCombinedView.js +0 -2
- package/dist/types/PersonSavedCombinedView.js +0 -2
- /package/dist/types/{GetCommunityPendingFollowsCountResponse.js → CountsResponse.js} +0 -0
- /package/dist/types/{GetReportCountResponse.js → MultiCommunityListingType.js} +0 -0
- /package/dist/types/{AdminListUsersResponse.js → PagedResponse.js} +0 -0
- /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";
|
package/dist/other_types.d.ts
CHANGED
|
@@ -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 {
|
|
@@ -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
|
};
|
package/dist/types/GetPosts.d.ts
CHANGED
|
@@ -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
|
};
|
|
@@ -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
|
-
|
|
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
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
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
|
|
10
|
-
target_person
|
|
11
|
-
target_instance
|
|
12
|
-
target_community
|
|
13
|
-
target_post
|
|
14
|
-
target_comment
|
|
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
|
};
|
|
@@ -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>;
|
|
@@ -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
|
-
*
|
|
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;
|
package/dist/types/Search.d.ts
CHANGED
|
@@ -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
|
-
|
|
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-
|
|
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": "^
|
|
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": "^
|
|
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.
|
|
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,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,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,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,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
|
-
};
|