lemmy-js-client 1.0.0-media-fixes.1 → 1.0.0-remove-page-limit.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.
- package/dist/http.d.ts +6 -10
- package/dist/http.js +139 -152
- package/dist/index.d.ts +0 -1
- package/dist/types/BannedPersonsResponse.d.ts +1 -0
- package/dist/types/GetComments.d.ts +3 -1
- package/dist/types/GetCommentsResponse.d.ts +3 -0
- package/dist/types/GetCommentsSlimResponse.d.ts +3 -0
- package/dist/types/GetModlog.d.ts +1 -0
- package/dist/types/GetModlogResponse.d.ts +1 -0
- package/dist/types/GetPosts.d.ts +3 -9
- package/dist/types/GetPostsResponse.d.ts +3 -2
- package/dist/types/LemmyErrorType.d.ts +82 -18
- package/dist/types/ListCommentLikes.d.ts +3 -1
- package/dist/types/ListCommentLikesResponse.d.ts +6 -0
- package/dist/types/ListCommunities.d.ts +3 -1
- package/dist/types/ListCommunitiesResponse.d.ts +6 -0
- package/dist/types/ListCommunityPendingFollows.d.ts +3 -1
- package/dist/types/ListCommunityPendingFollows.js +0 -1
- package/dist/types/ListCommunityPendingFollowsResponse.d.ts +6 -0
- package/dist/types/ListCustomEmojis.d.ts +0 -3
- package/dist/types/ListInbox.d.ts +1 -0
- package/dist/types/ListInboxResponse.d.ts +1 -0
- package/dist/types/ListMedia.d.ts +3 -1
- package/dist/types/ListMedia.js +0 -1
- package/dist/types/ListMediaResponse.d.ts +6 -0
- package/dist/types/ListPersonContent.d.ts +1 -0
- package/dist/types/ListPersonContentResponse.d.ts +1 -0
- package/dist/types/ListPersonSaved.d.ts +1 -0
- package/dist/types/ListPersonSavedResponse.d.ts +1 -0
- package/dist/types/ListPostLikes.d.ts +3 -1
- package/dist/types/ListPostLikesResponse.d.ts +6 -0
- package/dist/types/ListRegistrationApplications.d.ts +3 -1
- package/dist/types/ListRegistrationApplications.js +0 -1
- package/dist/types/ListRegistrationApplicationsResponse.d.ts +6 -0
- package/dist/types/ListReports.d.ts +1 -0
- package/dist/types/ListReportsResponse.d.ts +1 -0
- package/dist/types/ListTaglines.d.ts +3 -1
- package/dist/types/ListTaglines.js +0 -1
- package/dist/types/ListTaglinesResponse.d.ts +6 -0
- package/dist/types/MyUserInfo.d.ts +1 -0
- package/dist/types/SaveUserSettings.d.ts +1 -0
- package/dist/types/Search.d.ts +1 -0
- package/dist/types/SearchResponse.d.ts +1 -0
- package/dist/types/Tagline.d.ts +2 -1
- package/dist/types/Tagline.js +0 -1
- package/dist/types/VoteView.d.ts +1 -0
- package/package.json +1 -1
- package/dist/types/PostPaginationCursor.d.ts +0 -7
- package/dist/types/PostPaginationCursor.js +0 -3
package/dist/index.d.ts
CHANGED
@@ -264,7 +264,6 @@ export { PostActions } from "./types/PostActions";
|
|
264
264
|
export { PostFeatureType } from "./types/PostFeatureType";
|
265
265
|
export { PostId } from "./types/PostId";
|
266
266
|
export { PostListingMode } from "./types/PostListingMode";
|
267
|
-
export { PostPaginationCursor } from "./types/PostPaginationCursor";
|
268
267
|
export { PostReport } from "./types/PostReport";
|
269
268
|
export { PostReportId } from "./types/PostReportId";
|
270
269
|
export { PostReportResponse } from "./types/PostReportResponse";
|
@@ -2,6 +2,7 @@ import type { CommentId } from "./CommentId";
|
|
2
2
|
import type { CommentSortType } from "./CommentSortType";
|
3
3
|
import type { CommunityId } from "./CommunityId";
|
4
4
|
import type { ListingType } from "./ListingType";
|
5
|
+
import type { PaginationCursor } from "./PaginationCursor";
|
5
6
|
import type { PostId } from "./PostId";
|
6
7
|
/**
|
7
8
|
* Get a list of comments.
|
@@ -15,7 +16,8 @@ export type GetComments = {
|
|
15
16
|
*/
|
16
17
|
time_range_seconds?: number;
|
17
18
|
max_depth?: number;
|
18
|
-
|
19
|
+
page_cursor?: PaginationCursor;
|
20
|
+
page_back?: boolean;
|
19
21
|
limit?: number;
|
20
22
|
community_id?: CommunityId;
|
21
23
|
community_name?: string;
|
@@ -1,7 +1,10 @@
|
|
1
1
|
import type { CommentView } from "./CommentView";
|
2
|
+
import type { PaginationCursor } from "./PaginationCursor";
|
2
3
|
/**
|
3
4
|
* The comment list response.
|
4
5
|
*/
|
5
6
|
export type GetCommentsResponse = {
|
6
7
|
comments: Array<CommentView>;
|
8
|
+
next_page?: PaginationCursor;
|
9
|
+
prev_page?: PaginationCursor;
|
7
10
|
};
|
@@ -1,7 +1,10 @@
|
|
1
1
|
import type { CommentSlimView } from "./CommentSlimView";
|
2
|
+
import type { PaginationCursor } from "./PaginationCursor";
|
2
3
|
/**
|
3
4
|
* A slimmer comment list response, without the post or community.
|
4
5
|
*/
|
5
6
|
export type GetCommentsSlimResponse = {
|
6
7
|
comments: Array<CommentSlimView>;
|
8
|
+
next_page?: PaginationCursor;
|
9
|
+
prev_page?: PaginationCursor;
|
7
10
|
};
|
package/dist/types/GetPosts.d.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import type { CommunityId } from "./CommunityId";
|
2
2
|
import type { ListingType } from "./ListingType";
|
3
|
-
import type {
|
3
|
+
import type { PaginationCursor } from "./PaginationCursor";
|
4
4
|
import type { PostSortType } from "./PostSortType";
|
5
5
|
/**
|
6
6
|
* Get a list of posts.
|
@@ -14,15 +14,8 @@ export type GetPosts = {
|
|
14
14
|
* Use Zero to override the local_site and local_user time_range.
|
15
15
|
*/
|
16
16
|
time_range_seconds?: number;
|
17
|
-
/**
|
18
|
-
* DEPRECATED, use page_cursor
|
19
|
-
*/
|
20
|
-
page?: number;
|
21
|
-
limit?: number;
|
22
17
|
community_id?: CommunityId;
|
23
18
|
community_name?: string;
|
24
|
-
saved_only?: boolean;
|
25
|
-
read_only?: boolean;
|
26
19
|
liked_only?: boolean;
|
27
20
|
disliked_only?: boolean;
|
28
21
|
show_hidden?: boolean;
|
@@ -46,6 +39,7 @@ export type GetPosts = {
|
|
46
39
|
* If true, then only show posts with no comments
|
47
40
|
*/
|
48
41
|
no_comments_only?: boolean;
|
49
|
-
page_cursor?:
|
42
|
+
page_cursor?: PaginationCursor;
|
50
43
|
page_back?: boolean;
|
44
|
+
limit?: number;
|
51
45
|
};
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import type {
|
1
|
+
import type { PaginationCursor } from "./PaginationCursor";
|
2
2
|
import type { PostView } from "./PostView";
|
3
3
|
/**
|
4
4
|
* The post list response.
|
@@ -8,5 +8,6 @@ export type GetPostsResponse = {
|
|
8
8
|
/**
|
9
9
|
* the pagination cursor to use to fetch the next page
|
10
10
|
*/
|
11
|
-
next_page?:
|
11
|
+
next_page?: PaginationCursor;
|
12
|
+
prev_page?: PaginationCursor;
|
12
13
|
};
|
@@ -1,5 +1,11 @@
|
|
1
1
|
import type { FederationError } from "./FederationError";
|
2
2
|
export type LemmyErrorType = {
|
3
|
+
error: "block_keyword_too_short";
|
4
|
+
} | {
|
5
|
+
error: "block_keyword_too_long";
|
6
|
+
} | {
|
7
|
+
error: "couldnt_update_keywords";
|
8
|
+
} | {
|
3
9
|
error: "report_reason_required";
|
4
10
|
} | {
|
5
11
|
error: "report_too_long";
|
@@ -21,8 +27,6 @@ export type LemmyErrorType = {
|
|
21
27
|
error: "email_required";
|
22
28
|
} | {
|
23
29
|
error: "couldnt_update_comment";
|
24
|
-
} | {
|
25
|
-
error: "couldnt_update_private_message";
|
26
30
|
} | {
|
27
31
|
error: "cannot_leave_admin";
|
28
32
|
} | {
|
@@ -89,6 +93,8 @@ export type LemmyErrorType = {
|
|
89
93
|
error: "community_already_exists";
|
90
94
|
} | {
|
91
95
|
error: "language_not_allowed";
|
96
|
+
} | {
|
97
|
+
error: "couldnt_update_languages";
|
92
98
|
} | {
|
93
99
|
error: "couldnt_update_post";
|
94
100
|
} | {
|
@@ -119,8 +125,6 @@ export type LemmyErrorType = {
|
|
119
125
|
error: "no_id_given";
|
120
126
|
} | {
|
121
127
|
error: "incorrect_login";
|
122
|
-
} | {
|
123
|
-
error: "object_not_local";
|
124
128
|
} | {
|
125
129
|
error: "no_email_setup";
|
126
130
|
} | {
|
@@ -176,8 +180,6 @@ export type LemmyErrorType = {
|
|
176
180
|
error: "community_follower_already_exists";
|
177
181
|
} | {
|
178
182
|
error: "person_block_already_exists";
|
179
|
-
} | {
|
180
|
-
error: "user_already_exists";
|
181
183
|
} | {
|
182
184
|
error: "couldnt_like_post";
|
183
185
|
} | {
|
@@ -191,27 +193,23 @@ export type LemmyErrorType = {
|
|
191
193
|
} | {
|
192
194
|
error: "couldnt_update_community";
|
193
195
|
} | {
|
194
|
-
error: "
|
196
|
+
error: "couldnt_create_person_comment_mention";
|
197
|
+
} | {
|
198
|
+
error: "couldnt_update_person_comment_mention";
|
195
199
|
} | {
|
196
|
-
error: "
|
200
|
+
error: "couldnt_create_person_post_mention";
|
201
|
+
} | {
|
202
|
+
error: "couldnt_update_person_post_mention";
|
197
203
|
} | {
|
198
204
|
error: "couldnt_create_post";
|
199
205
|
} | {
|
200
206
|
error: "couldnt_create_private_message";
|
201
207
|
} | {
|
202
|
-
error: "
|
208
|
+
error: "couldnt_update_private_message";
|
203
209
|
} | {
|
204
210
|
error: "system_err_login";
|
205
|
-
} | {
|
206
|
-
error: "couldnt_set_all_registrations_accepted";
|
207
|
-
} | {
|
208
|
-
error: "couldnt_set_all_email_verified";
|
209
211
|
} | {
|
210
212
|
error: "blocked_url";
|
211
|
-
} | {
|
212
|
-
error: "couldnt_get_comments";
|
213
|
-
} | {
|
214
|
-
error: "couldnt_get_posts";
|
215
213
|
} | {
|
216
214
|
error: "invalid_url";
|
217
215
|
} | {
|
@@ -271,7 +269,9 @@ export type LemmyErrorType = {
|
|
271
269
|
} | {
|
272
270
|
error: "oauth_registration_closed";
|
273
271
|
} | {
|
274
|
-
error: "
|
272
|
+
error: "couldnt_create_oauth_provider";
|
273
|
+
} | {
|
274
|
+
error: "couldnt_update_oauth_provider";
|
275
275
|
} | {
|
276
276
|
error: "not_found";
|
277
277
|
} | {
|
@@ -292,4 +292,68 @@ export type LemmyErrorType = {
|
|
292
292
|
} | {
|
293
293
|
error: "plugin_error";
|
294
294
|
message: string;
|
295
|
+
} | {
|
296
|
+
error: "invalid_fetch_limit";
|
297
|
+
} | {
|
298
|
+
error: "couldnt_create_comment_reply";
|
299
|
+
} | {
|
300
|
+
error: "couldnt_update_comment_reply";
|
301
|
+
} | {
|
302
|
+
error: "couldnt_mark_comment_reply_as_read";
|
303
|
+
} | {
|
304
|
+
error: "couldnt_create_emoji";
|
305
|
+
} | {
|
306
|
+
error: "couldnt_update_emoji";
|
307
|
+
} | {
|
308
|
+
error: "couldnt_create_person";
|
309
|
+
} | {
|
310
|
+
error: "couldnt_update_person";
|
311
|
+
} | {
|
312
|
+
error: "couldnt_create_modlog";
|
313
|
+
} | {
|
314
|
+
error: "couldnt_update_modlog";
|
315
|
+
} | {
|
316
|
+
error: "couldnt_create_site";
|
317
|
+
} | {
|
318
|
+
error: "couldnt_update_site";
|
319
|
+
} | {
|
320
|
+
error: "couldnt_create_registration_application";
|
321
|
+
} | {
|
322
|
+
error: "couldnt_update_registration_application";
|
323
|
+
} | {
|
324
|
+
error: "couldnt_create_tag";
|
325
|
+
} | {
|
326
|
+
error: "couldnt_update_tag";
|
327
|
+
} | {
|
328
|
+
error: "couldnt_create_post_tag";
|
329
|
+
} | {
|
330
|
+
error: "couldnt_update_post_tag";
|
331
|
+
} | {
|
332
|
+
error: "couldnt_create_tagline";
|
333
|
+
} | {
|
334
|
+
error: "couldnt_update_tagline";
|
335
|
+
} | {
|
336
|
+
error: "couldnt_create_image";
|
337
|
+
} | {
|
338
|
+
error: "couldnt_allow_instance";
|
339
|
+
} | {
|
340
|
+
error: "couldnt_block_instance";
|
341
|
+
} | {
|
342
|
+
error: "couldnt_insert_activity";
|
343
|
+
} | {
|
344
|
+
error: "couldnt_create_rate_limit";
|
345
|
+
} | {
|
346
|
+
error: "couldnt_create_captcha_answer";
|
347
|
+
} | {
|
348
|
+
error: "couldnt_update_federation_queue_state";
|
349
|
+
} | {
|
350
|
+
error: "couldnt_create_oauth_account";
|
351
|
+
} | {
|
352
|
+
error: "couldnt_create_password_reset_request";
|
353
|
+
} | {
|
354
|
+
error: "couldnt_create_login_token";
|
355
|
+
} | {
|
356
|
+
error: "couldnt_update_local_site_url_blocklist";
|
357
|
+
} | {
|
358
|
+
error: "couldnt_create_email_verification";
|
295
359
|
};
|
@@ -1,9 +1,11 @@
|
|
1
1
|
import type { CommentId } from "./CommentId";
|
2
|
+
import type { PaginationCursor } from "./PaginationCursor";
|
2
3
|
/**
|
3
4
|
* List comment likes. Admins-only.
|
4
5
|
*/
|
5
6
|
export type ListCommentLikes = {
|
6
7
|
comment_id: CommentId;
|
7
|
-
|
8
|
+
page_cursor?: PaginationCursor;
|
9
|
+
page_back?: boolean;
|
8
10
|
limit?: number;
|
9
11
|
};
|
@@ -1,7 +1,13 @@
|
|
1
|
+
import type { PaginationCursor } from "./PaginationCursor";
|
1
2
|
import type { VoteView } from "./VoteView";
|
2
3
|
/**
|
3
4
|
* The comment likes response
|
4
5
|
*/
|
5
6
|
export type ListCommentLikesResponse = {
|
6
7
|
comment_likes: Array<VoteView>;
|
8
|
+
/**
|
9
|
+
* the pagination cursor to use to fetch the next page
|
10
|
+
*/
|
11
|
+
next_page?: PaginationCursor;
|
12
|
+
prev_page?: PaginationCursor;
|
7
13
|
};
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import type { CommunitySortType } from "./CommunitySortType";
|
2
2
|
import type { ListingType } from "./ListingType";
|
3
|
+
import type { PaginationCursor } from "./PaginationCursor";
|
3
4
|
/**
|
4
5
|
* Fetches a list of communities.
|
5
6
|
*/
|
@@ -12,6 +13,7 @@ export type ListCommunities = {
|
|
12
13
|
*/
|
13
14
|
time_range_seconds?: number;
|
14
15
|
show_nsfw?: boolean;
|
15
|
-
|
16
|
+
page_cursor?: PaginationCursor;
|
17
|
+
page_back?: boolean;
|
16
18
|
limit?: number;
|
17
19
|
};
|
@@ -1,7 +1,13 @@
|
|
1
1
|
import type { CommunityView } from "./CommunityView";
|
2
|
+
import type { PaginationCursor } from "./PaginationCursor";
|
2
3
|
/**
|
3
4
|
* The response for listing communities.
|
4
5
|
*/
|
5
6
|
export type ListCommunitiesResponse = {
|
6
7
|
communities: Array<CommunityView>;
|
8
|
+
/**
|
9
|
+
* the pagination cursor to use to fetch the next page
|
10
|
+
*/
|
11
|
+
next_page?: PaginationCursor;
|
12
|
+
prev_page?: PaginationCursor;
|
7
13
|
};
|
@@ -1,9 +1,11 @@
|
|
1
|
+
import type { PaginationCursor } from "./PaginationCursor";
|
1
2
|
export type ListCommunityPendingFollows = {
|
2
3
|
/**
|
3
4
|
* Only shows the unapproved applications
|
4
5
|
*/
|
5
6
|
pending_only?: boolean;
|
6
7
|
all_communities?: boolean;
|
7
|
-
|
8
|
+
page_cursor?: PaginationCursor;
|
9
|
+
page_back?: boolean;
|
8
10
|
limit?: number;
|
9
11
|
};
|
@@ -1,4 +1,10 @@
|
|
1
|
+
import type { PaginationCursor } from "./PaginationCursor";
|
1
2
|
import type { PendingFollow } from "./PendingFollow";
|
2
3
|
export type ListCommunityPendingFollowsResponse = {
|
3
4
|
items: Array<PendingFollow>;
|
5
|
+
/**
|
6
|
+
* the pagination cursor to use to fetch the next page
|
7
|
+
*/
|
8
|
+
next_page?: PaginationCursor;
|
9
|
+
prev_page?: PaginationCursor;
|
4
10
|
};
|
package/dist/types/ListMedia.js
CHANGED
@@ -1,4 +1,10 @@
|
|
1
1
|
import type { LocalImageView } from "./LocalImageView";
|
2
|
+
import type { PaginationCursor } from "./PaginationCursor";
|
2
3
|
export type ListMediaResponse = {
|
3
4
|
images: Array<LocalImageView>;
|
5
|
+
/**
|
6
|
+
* the pagination cursor to use to fetch the next page
|
7
|
+
*/
|
8
|
+
next_page?: PaginationCursor;
|
9
|
+
prev_page?: PaginationCursor;
|
4
10
|
};
|
@@ -1,9 +1,11 @@
|
|
1
|
+
import type { PaginationCursor } from "./PaginationCursor";
|
1
2
|
import type { PostId } from "./PostId";
|
2
3
|
/**
|
3
4
|
* List post likes. Admins-only.
|
4
5
|
*/
|
5
6
|
export type ListPostLikes = {
|
6
7
|
post_id: PostId;
|
7
|
-
|
8
|
+
page_cursor?: PaginationCursor;
|
9
|
+
page_back?: boolean;
|
8
10
|
limit?: number;
|
9
11
|
};
|
@@ -1,7 +1,13 @@
|
|
1
|
+
import type { PaginationCursor } from "./PaginationCursor";
|
1
2
|
import type { VoteView } from "./VoteView";
|
2
3
|
/**
|
3
4
|
* The post likes response
|
4
5
|
*/
|
5
6
|
export type ListPostLikesResponse = {
|
6
7
|
post_likes: Array<VoteView>;
|
8
|
+
/**
|
9
|
+
* the pagination cursor to use to fetch the next page
|
10
|
+
*/
|
11
|
+
next_page?: PaginationCursor;
|
12
|
+
prev_page?: PaginationCursor;
|
7
13
|
};
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import type { PaginationCursor } from "./PaginationCursor";
|
1
2
|
/**
|
2
3
|
* Fetches a list of registration applications.
|
3
4
|
*/
|
@@ -6,6 +7,7 @@ export type ListRegistrationApplications = {
|
|
6
7
|
* Only shows the unread applications (IE those without an admin actor)
|
7
8
|
*/
|
8
9
|
unread_only?: boolean;
|
9
|
-
|
10
|
+
page_cursor?: PaginationCursor;
|
11
|
+
page_back?: boolean;
|
10
12
|
limit?: number;
|
11
13
|
};
|
@@ -1,7 +1,13 @@
|
|
1
|
+
import type { PaginationCursor } from "./PaginationCursor";
|
1
2
|
import type { RegistrationApplicationView } from "./RegistrationApplicationView";
|
2
3
|
/**
|
3
4
|
* The list of registration applications.
|
4
5
|
*/
|
5
6
|
export type ListRegistrationApplicationsResponse = {
|
6
7
|
registration_applications: Array<RegistrationApplicationView>;
|
8
|
+
/**
|
9
|
+
* the pagination cursor to use to fetch the next page
|
10
|
+
*/
|
11
|
+
next_page?: PaginationCursor;
|
12
|
+
prev_page?: PaginationCursor;
|
7
13
|
};
|
@@ -1,7 +1,13 @@
|
|
1
|
+
import type { PaginationCursor } from "./PaginationCursor";
|
1
2
|
import type { Tagline } from "./Tagline";
|
2
3
|
/**
|
3
4
|
* A response for taglines.
|
4
5
|
*/
|
5
6
|
export type ListTaglinesResponse = {
|
6
7
|
taglines: Array<Tagline>;
|
8
|
+
/**
|
9
|
+
* the pagination cursor to use to fetch the next page
|
10
|
+
*/
|
11
|
+
next_page?: PaginationCursor;
|
12
|
+
prev_page?: PaginationCursor;
|
7
13
|
};
|
package/dist/types/Search.d.ts
CHANGED
package/dist/types/Tagline.d.ts
CHANGED
package/dist/types/Tagline.js
CHANGED
package/dist/types/VoteView.d.ts
CHANGED
package/package.json
CHANGED
@@ -1,7 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* currently this is just a wrapper around post id, but should be seen as opaque from the client's
|
3
|
-
* perspective. stringified since we might want to use arbitrary info later, with a P prepended to
|
4
|
-
* prevent ossification (api users love to make assumptions (e.g. parse stuff that looks like
|
5
|
-
* numbers as numbers) about apis that aren't part of the spec
|
6
|
-
*/
|
7
|
-
export type PostPaginationCursor = string;
|