lemmy-js-client 0.20.0-move-community-hidden.1 → 0.20.0-move-community-hidden.3

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 (48) hide show
  1. package/dist/index.d.ts +9 -5
  2. package/dist/types/Community.d.ts +4 -0
  3. package/dist/types/CreateSite.d.ts +0 -1
  4. package/dist/types/GetModlog.d.ts +2 -2
  5. package/dist/types/GetModlogResponse.d.ts +0 -5
  6. package/dist/types/GetPosts.d.ts +2 -2
  7. package/dist/types/GetPostsResponse.d.ts +2 -2
  8. package/dist/types/InboxCombinedPaginationCursor.d.ts +4 -0
  9. package/dist/types/LemmyErrorType.d.ts +4 -4
  10. package/dist/types/ListInbox.d.ts +2 -2
  11. package/dist/types/ListInboxResponse.d.ts +0 -5
  12. package/dist/types/ListPersonContent.d.ts +2 -2
  13. package/dist/types/ListPersonContentResponse.d.ts +0 -5
  14. package/dist/types/ListPersonSaved.d.ts +2 -2
  15. package/dist/types/ListPersonSavedResponse.d.ts +2 -7
  16. package/dist/types/ListReports.d.ts +2 -2
  17. package/dist/types/ListReportsResponse.d.ts +0 -5
  18. package/dist/types/LocalSite.d.ts +4 -4
  19. package/dist/types/LocalUser.d.ts +4 -4
  20. package/dist/types/ModHideCommunity.d.ts +14 -0
  21. package/dist/types/ModHideCommunityId.d.ts +1 -0
  22. package/dist/types/ModHideCommunityView.d.ts +11 -0
  23. package/dist/types/ModlogActionType.d.ts +1 -1
  24. package/dist/types/ModlogCombinedPaginationCursor.d.ts +4 -0
  25. package/dist/types/ModlogCombinedPaginationCursor.js +3 -0
  26. package/dist/types/ModlogCombinedView.d.ts +3 -3
  27. package/dist/types/PaginationCursor.d.ts +4 -1
  28. package/dist/types/PersonContentCombinedPaginationCursor.d.ts +4 -0
  29. package/dist/types/PersonContentCombinedPaginationCursor.js +3 -0
  30. package/dist/types/PersonSavedCombinedPaginationCursor.d.ts +4 -0
  31. package/dist/types/PersonSavedCombinedPaginationCursor.js +3 -0
  32. package/dist/types/ReportCombinedPaginationCursor.d.ts +4 -0
  33. package/dist/types/ReportCombinedPaginationCursor.js +3 -0
  34. package/dist/types/Search.d.ts +2 -2
  35. package/dist/types/SearchCombinedPaginationCursor.d.ts +4 -0
  36. package/dist/types/SearchCombinedPaginationCursor.js +3 -0
  37. package/dist/types/SearchResponse.d.ts +0 -5
  38. package/package.json +1 -1
  39. package/dist/types/ModChangeCommunityVisibility.d.ts +0 -12
  40. package/dist/types/ModChangeCommunityVisibilityId.d.ts +0 -1
  41. package/dist/types/ModChangeCommunityVisibilityView.d.ts +0 -11
  42. package/dist/types/PersonSavedCombinedView.d.ts +0 -7
  43. package/dist/types/PersonSavedCombinedView.js +0 -2
  44. package/dist/types/PostPaginationCursor.d.ts +0 -7
  45. /package/dist/types/{ModChangeCommunityVisibilityId.js → InboxCombinedPaginationCursor.js} +0 -0
  46. /package/dist/types/{ModChangeCommunityVisibility.js → ModHideCommunity.js} +0 -0
  47. /package/dist/types/{PostPaginationCursor.js → ModHideCommunityId.js} +0 -0
  48. /package/dist/types/{ModChangeCommunityVisibilityView.js → ModHideCommunityView.js} +0 -0
package/dist/index.d.ts CHANGED
@@ -139,6 +139,7 @@ export { HidePost } from "./types/HidePost";
139
139
  export { ImageDetails } from "./types/ImageDetails";
140
140
  export { ImageGetParams } from "./types/ImageGetParams";
141
141
  export { ImageProxyParams } from "./types/ImageProxyParams";
142
+ export { InboxCombinedPaginationCursor } from "./types/InboxCombinedPaginationCursor";
142
143
  export { InboxCombinedView } from "./types/InboxCombinedView";
143
144
  export { InboxDataType } from "./types/InboxDataType";
144
145
  export { Instance } from "./types/Instance";
@@ -205,12 +206,12 @@ export { ModBanFromCommunityId } from "./types/ModBanFromCommunityId";
205
206
  export { ModBanFromCommunityView } from "./types/ModBanFromCommunityView";
206
207
  export { ModBanId } from "./types/ModBanId";
207
208
  export { ModBanView } from "./types/ModBanView";
208
- export { ModChangeCommunityVisibility } from "./types/ModChangeCommunityVisibility";
209
- export { ModChangeCommunityVisibilityId } from "./types/ModChangeCommunityVisibilityId";
210
- export { ModChangeCommunityVisibilityView } from "./types/ModChangeCommunityVisibilityView";
211
209
  export { ModFeaturePost } from "./types/ModFeaturePost";
212
210
  export { ModFeaturePostId } from "./types/ModFeaturePostId";
213
211
  export { ModFeaturePostView } from "./types/ModFeaturePostView";
212
+ export { ModHideCommunity } from "./types/ModHideCommunity";
213
+ export { ModHideCommunityId } from "./types/ModHideCommunityId";
214
+ export { ModHideCommunityView } from "./types/ModHideCommunityView";
214
215
  export { ModLockPost } from "./types/ModLockPost";
215
216
  export { ModLockPostId } from "./types/ModLockPostId";
216
217
  export { ModLockPostView } from "./types/ModLockPostView";
@@ -227,6 +228,7 @@ export { ModTransferCommunity } from "./types/ModTransferCommunity";
227
228
  export { ModTransferCommunityId } from "./types/ModTransferCommunityId";
228
229
  export { ModTransferCommunityView } from "./types/ModTransferCommunityView";
229
230
  export { ModlogActionType } from "./types/ModlogActionType";
231
+ export { ModlogCombinedPaginationCursor } from "./types/ModlogCombinedPaginationCursor";
230
232
  export { ModlogCombinedView } from "./types/ModlogCombinedView";
231
233
  export { MyUserInfo } from "./types/MyUserInfo";
232
234
  export { OAuthAccount } from "./types/OAuthAccount";
@@ -241,19 +243,19 @@ export { Person } from "./types/Person";
241
243
  export { PersonCommentMention } from "./types/PersonCommentMention";
242
244
  export { PersonCommentMentionId } from "./types/PersonCommentMentionId";
243
245
  export { PersonCommentMentionView } from "./types/PersonCommentMentionView";
246
+ export { PersonContentCombinedPaginationCursor } from "./types/PersonContentCombinedPaginationCursor";
244
247
  export { PersonContentCombinedView } from "./types/PersonContentCombinedView";
245
248
  export { PersonContentType } from "./types/PersonContentType";
246
249
  export { PersonId } from "./types/PersonId";
247
250
  export { PersonPostMention } from "./types/PersonPostMention";
248
251
  export { PersonPostMentionId } from "./types/PersonPostMentionId";
249
252
  export { PersonPostMentionView } from "./types/PersonPostMentionView";
250
- export { PersonSavedCombinedView } from "./types/PersonSavedCombinedView";
253
+ export { PersonSavedCombinedPaginationCursor } from "./types/PersonSavedCombinedPaginationCursor";
251
254
  export { PersonView } from "./types/PersonView";
252
255
  export { Post } from "./types/Post";
253
256
  export { PostFeatureType } from "./types/PostFeatureType";
254
257
  export { PostId } from "./types/PostId";
255
258
  export { PostListingMode } from "./types/PostListingMode";
256
- export { PostPaginationCursor } from "./types/PostPaginationCursor";
257
259
  export { PostReport } from "./types/PostReport";
258
260
  export { PostReportId } from "./types/PostReportId";
259
261
  export { PostReportResponse } from "./types/PostReportResponse";
@@ -285,6 +287,7 @@ export { RegistrationMode } from "./types/RegistrationMode";
285
287
  export { RemoveComment } from "./types/RemoveComment";
286
288
  export { RemoveCommunity } from "./types/RemoveCommunity";
287
289
  export { RemovePost } from "./types/RemovePost";
290
+ export { ReportCombinedPaginationCursor } from "./types/ReportCombinedPaginationCursor";
288
291
  export { ReportCombinedView } from "./types/ReportCombinedView";
289
292
  export { ReportType } from "./types/ReportType";
290
293
  export { ResendVerificationEmail } from "./types/ResendVerificationEmail";
@@ -297,6 +300,7 @@ export { SaveComment } from "./types/SaveComment";
297
300
  export { SavePost } from "./types/SavePost";
298
301
  export { SaveUserSettings } from "./types/SaveUserSettings";
299
302
  export { Search } from "./types/Search";
303
+ export { SearchCombinedPaginationCursor } from "./types/SearchCombinedPaginationCursor";
300
304
  export { SearchCombinedView } from "./types/SearchCombinedView";
301
305
  export { SearchResponse } from "./types/SearchResponse";
302
306
  export { SearchSortType } from "./types/SearchSortType";
@@ -46,6 +46,10 @@ export type Community = {
46
46
  * A URL for a banner.
47
47
  */
48
48
  banner?: DbUrl;
49
+ /**
50
+ * Whether the community is hidden.
51
+ */
52
+ hidden: boolean;
49
53
  /**
50
54
  * Whether posting is restricted to mods only.
51
55
  */
@@ -51,5 +51,4 @@ export type CreateSite = {
51
51
  comment_upvotes?: FederationMode;
52
52
  comment_downvotes?: FederationMode;
53
53
  disable_donation_dialog?: boolean;
54
- disallow_nsfw_content?: boolean;
55
54
  };
@@ -2,7 +2,7 @@ import type { CommentId } from "./CommentId";
2
2
  import type { CommunityId } from "./CommunityId";
3
3
  import type { ListingType } from "./ListingType";
4
4
  import type { ModlogActionType } from "./ModlogActionType";
5
- import type { PaginationCursor } from "./PaginationCursor";
5
+ import type { ModlogCombinedPaginationCursor } from "./ModlogCombinedPaginationCursor";
6
6
  import type { PersonId } from "./PersonId";
7
7
  import type { PostId } from "./PostId";
8
8
  /**
@@ -38,6 +38,6 @@ export type GetModlog = {
38
38
  * Filter by comment.
39
39
  */
40
40
  comment_id?: CommentId;
41
- page_cursor?: PaginationCursor;
41
+ page_cursor?: ModlogCombinedPaginationCursor;
42
42
  page_back?: boolean;
43
43
  };
@@ -1,12 +1,7 @@
1
1
  import type { ModlogCombinedView } from "./ModlogCombinedView";
2
- import type { PaginationCursor } from "./PaginationCursor";
3
2
  /**
4
3
  * The modlog fetch response.
5
4
  */
6
5
  export type GetModlogResponse = {
7
6
  modlog: Array<ModlogCombinedView>;
8
- /**
9
- * the pagination cursor to use to fetch the next page
10
- */
11
- next_page?: PaginationCursor;
12
7
  };
@@ -1,6 +1,6 @@
1
1
  import type { CommunityId } from "./CommunityId";
2
2
  import type { ListingType } from "./ListingType";
3
- import type { PostPaginationCursor } from "./PostPaginationCursor";
3
+ import type { PaginationCursor } from "./PaginationCursor";
4
4
  import type { PostSortType } from "./PostSortType";
5
5
  /**
6
6
  * Get a list of posts.
@@ -46,6 +46,6 @@ export type GetPosts = {
46
46
  * If true, then only show posts with no comments
47
47
  */
48
48
  no_comments_only?: boolean;
49
- page_cursor?: PostPaginationCursor;
49
+ page_cursor?: PaginationCursor;
50
50
  page_back?: boolean;
51
51
  };
@@ -1,4 +1,4 @@
1
- import type { PostPaginationCursor } from "./PostPaginationCursor";
1
+ import type { PaginationCursor } from "./PaginationCursor";
2
2
  import type { PostView } from "./PostView";
3
3
  /**
4
4
  * The post list response.
@@ -8,5 +8,5 @@ export type GetPostsResponse = {
8
8
  /**
9
9
  * the pagination cursor to use to fetch the next page
10
10
  */
11
- next_page?: PostPaginationCursor;
11
+ next_page?: PaginationCursor;
12
12
  };
@@ -0,0 +1,4 @@
1
+ /**
2
+ * like PaginationCursor but for the report_combined table
3
+ */
4
+ export type InboxCombinedPaginationCursor = string;
@@ -95,8 +95,6 @@ export type LemmyErrorType = {
95
95
  error: "couldnt_update_post";
96
96
  } | {
97
97
  error: "no_post_edit_allowed";
98
- } | {
99
- error: "nsfw_not_allowed";
100
98
  } | {
101
99
  error: "edit_private_message_not_allowed";
102
100
  } | {
@@ -127,6 +125,8 @@ export type LemmyErrorType = {
127
125
  error: "no_email_setup";
128
126
  } | {
129
127
  error: "local_site_not_setup";
128
+ } | {
129
+ error: "email_smtp_server_needs_a_port";
130
130
  } | {
131
131
  error: "invalid_email_address";
132
132
  message: string;
@@ -176,6 +176,8 @@ export type LemmyErrorType = {
176
176
  error: "community_block_already_exists";
177
177
  } | {
178
178
  error: "community_follower_already_exists";
179
+ } | {
180
+ error: "couldnt_update_community_hidden_status";
179
181
  } | {
180
182
  error: "person_block_already_exists";
181
183
  } | {
@@ -283,6 +285,4 @@ export type LemmyErrorType = {
283
285
  message: {
284
286
  error?: FederationError;
285
287
  };
286
- } | {
287
- error: "couldnt_parse_pagination_token";
288
288
  };
@@ -1,11 +1,11 @@
1
+ import type { InboxCombinedPaginationCursor } from "./InboxCombinedPaginationCursor";
1
2
  import type { InboxDataType } from "./InboxDataType";
2
- import type { PaginationCursor } from "./PaginationCursor";
3
3
  /**
4
4
  * Get your inbox (replies, comment mentions, post mentions, and messages)
5
5
  */
6
6
  export type ListInbox = {
7
7
  type_?: InboxDataType;
8
8
  unread_only?: boolean;
9
- page_cursor?: PaginationCursor;
9
+ page_cursor?: InboxCombinedPaginationCursor;
10
10
  page_back?: boolean;
11
11
  };
@@ -1,12 +1,7 @@
1
1
  import type { InboxCombinedView } from "./InboxCombinedView";
2
- import type { PaginationCursor } from "./PaginationCursor";
3
2
  /**
4
3
  * Get your inbox (replies, comment mentions, post mentions, and messages)
5
4
  */
6
5
  export type ListInboxResponse = {
7
6
  inbox: Array<InboxCombinedView>;
8
- /**
9
- * the pagination cursor to use to fetch the next page
10
- */
11
- next_page?: PaginationCursor;
12
7
  };
@@ -1,4 +1,4 @@
1
- import type { PaginationCursor } from "./PaginationCursor";
1
+ import type { PersonContentCombinedPaginationCursor } from "./PersonContentCombinedPaginationCursor";
2
2
  import type { PersonContentType } from "./PersonContentType";
3
3
  import type { PersonId } from "./PersonId";
4
4
  /**
@@ -13,6 +13,6 @@ export type ListPersonContent = {
13
13
  * Example: dessalines , or dessalines@xyz.tld
14
14
  */
15
15
  username?: string;
16
- page_cursor?: PaginationCursor;
16
+ page_cursor?: PersonContentCombinedPaginationCursor;
17
17
  page_back?: boolean;
18
18
  };
@@ -1,12 +1,7 @@
1
- import type { PaginationCursor } from "./PaginationCursor";
2
1
  import type { PersonContentCombinedView } from "./PersonContentCombinedView";
3
2
  /**
4
3
  * A person's content response.
5
4
  */
6
5
  export type ListPersonContentResponse = {
7
6
  content: Array<PersonContentCombinedView>;
8
- /**
9
- * the pagination cursor to use to fetch the next page
10
- */
11
- next_page?: PaginationCursor;
12
7
  };
@@ -1,10 +1,10 @@
1
- import type { PaginationCursor } from "./PaginationCursor";
2
1
  import type { PersonContentType } from "./PersonContentType";
2
+ import type { PersonSavedCombinedPaginationCursor } from "./PersonSavedCombinedPaginationCursor";
3
3
  /**
4
4
  * Gets your saved posts and comments
5
5
  */
6
6
  export type ListPersonSaved = {
7
7
  type_?: PersonContentType;
8
- page_cursor?: PaginationCursor;
8
+ page_cursor?: PersonSavedCombinedPaginationCursor;
9
9
  page_back?: boolean;
10
10
  };
@@ -1,12 +1,7 @@
1
- import type { PaginationCursor } from "./PaginationCursor";
2
- import type { PersonSavedCombinedView } from "./PersonSavedCombinedView";
1
+ import type { PersonContentCombinedView } from "./PersonContentCombinedView";
3
2
  /**
4
3
  * A person's saved content response.
5
4
  */
6
5
  export type ListPersonSavedResponse = {
7
- saved: Array<PersonSavedCombinedView>;
8
- /**
9
- * the pagination cursor to use to fetch the next page
10
- */
11
- next_page?: PaginationCursor;
6
+ saved: Array<PersonContentCombinedView>;
12
7
  };
@@ -1,6 +1,6 @@
1
1
  import type { CommunityId } from "./CommunityId";
2
- import type { PaginationCursor } from "./PaginationCursor";
3
2
  import type { PostId } from "./PostId";
3
+ import type { ReportCombinedPaginationCursor } from "./ReportCombinedPaginationCursor";
4
4
  import type { ReportType } from "./ReportType";
5
5
  /**
6
6
  * List reports.
@@ -22,7 +22,7 @@ export type ListReports = {
22
22
  * if no community is given, it returns reports for all communities moderated by the auth user
23
23
  */
24
24
  community_id?: CommunityId;
25
- page_cursor?: PaginationCursor;
25
+ page_cursor?: ReportCombinedPaginationCursor;
26
26
  page_back?: boolean;
27
27
  /**
28
28
  * Only for admins: also show reports with `violates_instance_rules=false`
@@ -1,12 +1,7 @@
1
- import type { PaginationCursor } from "./PaginationCursor";
2
1
  import type { ReportCombinedView } from "./ReportCombinedView";
3
2
  /**
4
3
  * The post reports response.
5
4
  */
6
5
  export type ListReportsResponse = {
7
6
  reports: Array<ReportCombinedView>;
8
- /**
9
- * the pagination cursor to use to fetch the next page
10
- */
11
- next_page?: PaginationCursor;
12
7
  };
@@ -118,10 +118,6 @@ export type LocalSite = {
118
118
  * donations.
119
119
  */
120
120
  disable_donation_dialog: boolean;
121
- /**
122
- * A default time range limit to apply to post sorts, in seconds.
123
- */
124
- default_post_time_range_seconds?: number;
125
121
  users: number;
126
122
  posts: number;
127
123
  comments: number;
@@ -142,6 +138,10 @@ export type LocalSite = {
142
138
  * The number of users with any activity in the last half year.
143
139
  */
144
140
  users_active_half_year: number;
141
+ /**
142
+ * A default time range limit to apply to post sorts, in seconds.
143
+ */
144
+ default_post_time_range_seconds?: number;
145
145
  /**
146
146
  * Block NSFW content being created
147
147
  */
@@ -93,12 +93,12 @@ export type LocalUser = {
93
93
  * Whether to hide posts containing images/videos
94
94
  */
95
95
  hide_media: boolean;
96
- /**
97
- * A default time range limit to apply to post sorts, in seconds.
98
- */
99
- default_post_time_range_seconds?: number;
100
96
  show_score: boolean;
101
97
  show_upvotes: boolean;
102
98
  show_downvotes: boolean;
103
99
  show_upvote_percentage: boolean;
100
+ /**
101
+ * A default time range limit to apply to post sorts, in seconds.
102
+ */
103
+ default_post_time_range_seconds?: number;
104
104
  };
@@ -0,0 +1,14 @@
1
+ import type { CommunityId } from "./CommunityId";
2
+ import type { ModHideCommunityId } from "./ModHideCommunityId";
3
+ import type { PersonId } from "./PersonId";
4
+ /**
5
+ * When a community is hidden from public view.
6
+ */
7
+ export type ModHideCommunity = {
8
+ id: ModHideCommunityId;
9
+ community_id: CommunityId;
10
+ mod_person_id: PersonId;
11
+ published: string;
12
+ reason?: string;
13
+ hidden: boolean;
14
+ };
@@ -0,0 +1 @@
1
+ export type ModHideCommunityId = number;
@@ -0,0 +1,11 @@
1
+ import type { Community } from "./Community";
2
+ import type { ModHideCommunity } from "./ModHideCommunity";
3
+ import type { Person } from "./Person";
4
+ /**
5
+ * When a community is hidden from public view.
6
+ */
7
+ export type ModHideCommunityView = {
8
+ mod_hide_community: ModHideCommunity;
9
+ admin?: Person;
10
+ community: Community;
11
+ };
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * A list of possible types for the various modlog actions.
3
3
  */
4
- export type ModlogActionType = "All" | "ModRemovePost" | "ModLockPost" | "ModFeaturePost" | "ModRemoveComment" | "ModRemoveCommunity" | "ModBanFromCommunity" | "ModAddCommunity" | "ModTransferCommunity" | "ModAdd" | "ModBan" | "ModChangeCommunityVisibility" | "AdminPurgePerson" | "AdminPurgeCommunity" | "AdminPurgePost" | "AdminPurgeComment" | "AdminBlockInstance" | "AdminAllowInstance";
4
+ export type ModlogActionType = "All" | "ModRemovePost" | "ModLockPost" | "ModFeaturePost" | "ModRemoveComment" | "ModRemoveCommunity" | "ModBanFromCommunity" | "ModAddCommunity" | "ModTransferCommunity" | "ModAdd" | "ModBan" | "ModHideCommunity" | "AdminPurgePerson" | "AdminPurgeCommunity" | "AdminPurgePost" | "AdminPurgeComment" | "AdminBlockInstance" | "AdminAllowInstance";
@@ -0,0 +1,4 @@
1
+ /**
2
+ * like PaginationCursor but for the modlog_combined
3
+ */
4
+ export type ModlogCombinedPaginationCursor = 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 });
@@ -8,8 +8,8 @@ import type { ModAddCommunityView } from "./ModAddCommunityView";
8
8
  import type { ModAddView } from "./ModAddView";
9
9
  import type { ModBanFromCommunityView } from "./ModBanFromCommunityView";
10
10
  import type { ModBanView } from "./ModBanView";
11
- import type { ModChangeCommunityVisibilityView } from "./ModChangeCommunityVisibilityView";
12
11
  import type { ModFeaturePostView } from "./ModFeaturePostView";
12
+ import type { ModHideCommunityView } from "./ModHideCommunityView";
13
13
  import type { ModLockPostView } from "./ModLockPostView";
14
14
  import type { ModRemoveCommentView } from "./ModRemoveCommentView";
15
15
  import type { ModRemoveCommunityView } from "./ModRemoveCommunityView";
@@ -38,8 +38,8 @@ export type ModlogCombinedView = ({
38
38
  } & ModBanFromCommunityView) | ({
39
39
  type_: "ModFeaturePost";
40
40
  } & ModFeaturePostView) | ({
41
- type_: "ModChangeCommunityVisibility";
42
- } & ModChangeCommunityVisibilityView) | ({
41
+ type_: "ModHideCommunity";
42
+ } & ModHideCommunityView) | ({
43
43
  type_: "ModLockPost";
44
44
  } & ModLockPostView) | ({
45
45
  type_: "ModRemoveComment";
@@ -1,4 +1,7 @@
1
1
  /**
2
- * A pagination cursor
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
3
6
  */
4
7
  export type PaginationCursor = string;
@@ -0,0 +1,4 @@
1
+ /**
2
+ * like PaginationCursor but for the person_content_combined table
3
+ */
4
+ export type PersonContentCombinedPaginationCursor = 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 });
@@ -0,0 +1,4 @@
1
+ /**
2
+ * like PaginationCursor but for the person_saved_combined table
3
+ */
4
+ export type PersonSavedCombinedPaginationCursor = 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 });
@@ -0,0 +1,4 @@
1
+ /**
2
+ * like PaginationCursor but for the report_combined table
3
+ */
4
+ export type ReportCombinedPaginationCursor = 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,7 +1,7 @@
1
1
  import type { CommunityId } from "./CommunityId";
2
2
  import type { ListingType } from "./ListingType";
3
- import type { PaginationCursor } from "./PaginationCursor";
4
3
  import type { PersonId } from "./PersonId";
4
+ import type { SearchCombinedPaginationCursor } from "./SearchCombinedPaginationCursor";
5
5
  import type { SearchSortType } from "./SearchSortType";
6
6
  import type { SearchType } from "./SearchType";
7
7
  /**
@@ -24,6 +24,6 @@ export type Search = {
24
24
  post_url_only?: boolean;
25
25
  liked_only?: boolean;
26
26
  disliked_only?: boolean;
27
- page_cursor?: PaginationCursor;
27
+ page_cursor?: SearchCombinedPaginationCursor;
28
28
  page_back?: boolean;
29
29
  };
@@ -0,0 +1,4 @@
1
+ /**
2
+ * like PaginationCursor but for the modlog_combined
3
+ */
4
+ export type SearchCombinedPaginationCursor = 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,12 +1,7 @@
1
- import type { PaginationCursor } from "./PaginationCursor";
2
1
  import type { SearchCombinedView } from "./SearchCombinedView";
3
2
  /**
4
3
  * The search response, containing lists of the return type possibilities
5
4
  */
6
5
  export type SearchResponse = {
7
6
  results: Array<SearchCombinedView>;
8
- /**
9
- * the pagination cursor to use to fetch the next page
10
- */
11
- next_page?: PaginationCursor;
12
7
  };
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-move-community-hidden.1",
4
+ "version": "0.20.0-move-community-hidden.3",
5
5
  "author": "Dessalines",
6
6
  "license": "AGPL-3.0",
7
7
  "main": "./dist/index.js",
@@ -1,12 +0,0 @@
1
- import type { CommunityId } from "./CommunityId";
2
- import type { CommunityVisibility } from "./CommunityVisibility";
3
- import type { ModChangeCommunityVisibilityId } from "./ModChangeCommunityVisibilityId";
4
- import type { PersonId } from "./PersonId";
5
- export type ModChangeCommunityVisibility = {
6
- id: ModChangeCommunityVisibilityId;
7
- community_id: CommunityId;
8
- mod_person_id: PersonId;
9
- published: string;
10
- reason?: string;
11
- new_visibility: CommunityVisibility;
12
- };
@@ -1 +0,0 @@
1
- export type ModChangeCommunityVisibilityId = number;
@@ -1,11 +0,0 @@
1
- import type { Community } from "./Community";
2
- import type { ModChangeCommunityVisibility } from "./ModChangeCommunityVisibility";
3
- import type { Person } from "./Person";
4
- /**
5
- * When the visibility of a community is changed
6
- */
7
- export type ModChangeCommunityVisibilityView = {
8
- mod_change_community_visibility: ModChangeCommunityVisibility;
9
- moderator?: Person;
10
- community: Community;
11
- };
@@ -1,7 +0,0 @@
1
- import type { CommentView } from "./CommentView";
2
- import type { PostView } from "./PostView";
3
- export type PersonSavedCombinedView = ({
4
- type_: "Post";
5
- } & PostView) | ({
6
- type_: "Comment";
7
- } & CommentView);
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -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;