lemmy-js-client 0.19.3-alpha.6 → 0.19.4-alpha.10

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/http.d.ts +21 -0
  2. package/dist/http.js +24 -0
  3. package/dist/index.d.ts +9 -2
  4. package/dist/types/CommentReportView.d.ts +6 -0
  5. package/dist/types/Community.d.ts +2 -0
  6. package/dist/types/CommunityAggregates.d.ts +1 -0
  7. package/dist/types/CommunityView.d.ts +1 -0
  8. package/dist/types/CommunityVisibility.d.ts +1 -0
  9. package/dist/types/CreateCommunity.d.ts +2 -0
  10. package/dist/types/CreatePost.d.ts +2 -0
  11. package/dist/types/CreateSite.d.ts +5 -0
  12. package/dist/types/EditCommunity.d.ts +2 -0
  13. package/dist/types/EditPost.d.ts +2 -0
  14. package/dist/types/EditSite.d.ts +6 -0
  15. package/dist/types/GetModlog.d.ts +4 -0
  16. package/dist/types/GetPosts.d.ts +1 -0
  17. package/dist/types/GetSiteMetadataResponse.d.ts +2 -2
  18. package/dist/types/GetSiteResponse.d.ts +2 -0
  19. package/dist/types/HidePost.d.ts +5 -0
  20. package/dist/types/LemmyErrorType.d.ts +6 -0
  21. package/dist/types/LinkMetadata.d.ts +7 -0
  22. package/dist/types/LinkMetadata.js +3 -0
  23. package/dist/types/ListCommentReports.d.ts +2 -0
  24. package/dist/types/ListMedia.d.ts +4 -0
  25. package/dist/types/ListMedia.js +3 -0
  26. package/dist/types/ListMediaResponse.d.ts +4 -0
  27. package/dist/types/ListMediaResponse.js +2 -0
  28. package/dist/types/ListPostReports.d.ts +2 -0
  29. package/dist/types/{ImageUpload.d.ts → LocalImage.d.ts} +2 -2
  30. package/dist/types/LocalImage.js +2 -0
  31. package/dist/types/LocalSite.d.ts +4 -0
  32. package/dist/types/LocalSiteUrlBlocklist.d.ts +6 -0
  33. package/dist/types/LocalSiteUrlBlocklist.js +3 -0
  34. package/dist/types/LocalUserView.d.ts +2 -0
  35. package/dist/types/LocalUserVoteDisplayMode.d.ts +8 -0
  36. package/dist/types/LocalUserVoteDisplayMode.js +2 -0
  37. package/dist/types/MarkPostAsRead.d.ts +1 -2
  38. package/dist/types/ModlogListParams.d.ts +4 -0
  39. package/dist/types/{SiteMetadata.d.ts → OpenGraphData.d.ts} +1 -1
  40. package/dist/types/OpenGraphData.js +3 -0
  41. package/dist/types/Post.d.ts +2 -0
  42. package/dist/types/PostReportView.d.ts +9 -0
  43. package/dist/types/PostView.d.ts +1 -0
  44. package/dist/types/SaveUserSettings.d.ts +4 -1
  45. package/dist/types/Site.d.ts +1 -2
  46. package/package.json +14 -14
  47. /package/dist/types/{SiteMetadata.js → CommunityVisibility.js} +0 -0
  48. /package/dist/types/{ImageUpload.js → HidePost.js} +0 -0
package/dist/http.d.ts CHANGED
@@ -132,6 +132,9 @@ import { ListPostLikes } from "./types/ListPostLikes";
132
132
  import { ListPostLikesResponse } from "./types/ListPostLikesResponse";
133
133
  import { ListCommentLikes } from "./types/ListCommentLikes";
134
134
  import { ListCommentLikesResponse } from "./types/ListCommentLikesResponse";
135
+ import { HidePost } from "./types/HidePost";
136
+ import { ListMedia } from "./types/ListMedia";
137
+ import { ListMediaResponse } from "./types/ListMediaResponse";
135
138
  /**
136
139
  * Helps build lemmy HTTP requests.
137
140
  */
@@ -205,6 +208,18 @@ export declare class LemmyHttp {
205
208
  * `HTTP.GET /user/validate_auth`
206
209
  */
207
210
  validateAuth(): Promise<SuccessResponse>;
211
+ /**
212
+ * List all the media for your user
213
+ *
214
+ * `HTTP.GET /user/list_media`
215
+ */
216
+ listMedia(form?: ListMedia): Promise<ListMediaResponse>;
217
+ /**
218
+ * List all the media known to your instance.
219
+ *
220
+ * `HTTP.GET /admin/list_all_media`
221
+ */
222
+ listAllMedia(form?: ListMedia): Promise<ListMediaResponse>;
208
223
  /**
209
224
  * Enable / Disable TOTP / two-factor authentication.
210
225
  *
@@ -341,6 +356,12 @@ export declare class LemmyHttp {
341
356
  * `HTTP.POST /post/mark_as_read`
342
357
  */
343
358
  markPostAsRead(form: MarkPostAsRead): Promise<SuccessResponse>;
359
+ /**
360
+ * Hide a post from list views.
361
+ *
362
+ * `HTTP.POST /post/hide`
363
+ */
364
+ hidePost(form: HidePost): Promise<SuccessResponse>;
344
365
  /**
345
366
  * A moderator can lock a post ( IE disable new comments ).
346
367
  *
package/dist/http.js CHANGED
@@ -133,6 +133,22 @@ class LemmyHttp {
133
133
  validateAuth() {
134
134
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/user/validate_auth", {});
135
135
  }
136
+ /**
137
+ * List all the media for your user
138
+ *
139
+ * `HTTP.GET /user/list_media`
140
+ */
141
+ listMedia(form = {}) {
142
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/user/list_media", form);
143
+ }
144
+ /**
145
+ * List all the media known to your instance.
146
+ *
147
+ * `HTTP.GET /admin/list_all_media`
148
+ */
149
+ listAllMedia(form = {}) {
150
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/admin/list_all_media", form);
151
+ }
136
152
  /**
137
153
  * Enable / Disable TOTP / two-factor authentication.
138
154
  *
@@ -313,6 +329,14 @@ class LemmyHttp {
313
329
  markPostAsRead(form) {
314
330
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/post/mark_as_read", form);
315
331
  }
332
+ /**
333
+ * Hide a post from list views.
334
+ *
335
+ * `HTTP.POST /post/hide`
336
+ */
337
+ hidePost(form) {
338
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/post/hide", form);
339
+ }
316
340
  /**
317
341
  * A moderator can lock a post ( IE disable new comments ).
318
342
  *
package/dist/index.d.ts CHANGED
@@ -48,6 +48,7 @@ export { CommunityId } from "./types/CommunityId";
48
48
  export { CommunityModeratorView } from "./types/CommunityModeratorView";
49
49
  export { CommunityResponse } from "./types/CommunityResponse";
50
50
  export { CommunityView } from "./types/CommunityView";
51
+ export { CommunityVisibility } from "./types/CommunityVisibility";
51
52
  export { CreateComment } from "./types/CreateComment";
52
53
  export { CreateCommentLike } from "./types/CreateCommentLike";
53
54
  export { CreateCommentReport } from "./types/CreateCommentReport";
@@ -109,7 +110,7 @@ export { GetSiteResponse } from "./types/GetSiteResponse";
109
110
  export { GetUnreadCountResponse } from "./types/GetUnreadCountResponse";
110
111
  export { GetUnreadRegistrationApplicationCountResponse } from "./types/GetUnreadRegistrationApplicationCountResponse";
111
112
  export { HideCommunity } from "./types/HideCommunity";
112
- export { ImageUpload } from "./types/ImageUpload";
113
+ export { HidePost } from "./types/HidePost";
113
114
  export { Instance } from "./types/Instance";
114
115
  export { InstanceBlockView } from "./types/InstanceBlockView";
115
116
  export { InstanceId } from "./types/InstanceId";
@@ -117,12 +118,15 @@ export { InstanceWithFederationState } from "./types/InstanceWithFederationState
117
118
  export { Language } from "./types/Language";
118
119
  export { LanguageId } from "./types/LanguageId";
119
120
  export { LemmyErrorType } from "./types/LemmyErrorType";
121
+ export { LinkMetadata } from "./types/LinkMetadata";
120
122
  export { ListCommentLikes } from "./types/ListCommentLikes";
121
123
  export { ListCommentLikesResponse } from "./types/ListCommentLikesResponse";
122
124
  export { ListCommentReports } from "./types/ListCommentReports";
123
125
  export { ListCommentReportsResponse } from "./types/ListCommentReportsResponse";
124
126
  export { ListCommunities } from "./types/ListCommunities";
125
127
  export { ListCommunitiesResponse } from "./types/ListCommunitiesResponse";
128
+ export { ListMedia } from "./types/ListMedia";
129
+ export { ListMediaResponse } from "./types/ListMediaResponse";
126
130
  export { ListPostLikes } from "./types/ListPostLikes";
127
131
  export { ListPostLikesResponse } from "./types/ListPostLikesResponse";
128
132
  export { ListPostReports } from "./types/ListPostReports";
@@ -132,12 +136,15 @@ export { ListPrivateMessageReportsResponse } from "./types/ListPrivateMessageRep
132
136
  export { ListRegistrationApplications } from "./types/ListRegistrationApplications";
133
137
  export { ListRegistrationApplicationsResponse } from "./types/ListRegistrationApplicationsResponse";
134
138
  export { ListingType } from "./types/ListingType";
139
+ export { LocalImage } from "./types/LocalImage";
135
140
  export { LocalSite } from "./types/LocalSite";
136
141
  export { LocalSiteId } from "./types/LocalSiteId";
137
142
  export { LocalSiteRateLimit } from "./types/LocalSiteRateLimit";
143
+ export { LocalSiteUrlBlocklist } from "./types/LocalSiteUrlBlocklist";
138
144
  export { LocalUser } from "./types/LocalUser";
139
145
  export { LocalUserId } from "./types/LocalUserId";
140
146
  export { LocalUserView } from "./types/LocalUserView";
147
+ export { LocalUserVoteDisplayMode } from "./types/LocalUserVoteDisplayMode";
141
148
  export { LockPost } from "./types/LockPost";
142
149
  export { Login } from "./types/Login";
143
150
  export { LoginResponse } from "./types/LoginResponse";
@@ -171,6 +178,7 @@ export { ModTransferCommunityView } from "./types/ModTransferCommunityView";
171
178
  export { ModlogActionType } from "./types/ModlogActionType";
172
179
  export { ModlogListParams } from "./types/ModlogListParams";
173
180
  export { MyUserInfo } from "./types/MyUserInfo";
181
+ export { OpenGraphData } from "./types/OpenGraphData";
174
182
  export { PaginationCursor } from "./types/PaginationCursor";
175
183
  export { PasswordChangeAfterReset } from "./types/PasswordChangeAfterReset";
176
184
  export { PasswordReset } from "./types/PasswordReset";
@@ -231,7 +239,6 @@ export { SearchType } from "./types/SearchType";
231
239
  export { Site } from "./types/Site";
232
240
  export { SiteAggregates } from "./types/SiteAggregates";
233
241
  export { SiteId } from "./types/SiteId";
234
- export { SiteMetadata } from "./types/SiteMetadata";
235
242
  export { SiteResponse } from "./types/SiteResponse";
236
243
  export { SiteView } from "./types/SiteView";
237
244
  export { SortType } from "./types/SortType";
@@ -4,6 +4,7 @@ import type { CommentReport } from "./CommentReport";
4
4
  import type { Community } from "./Community";
5
5
  import type { Person } from "./Person";
6
6
  import type { Post } from "./Post";
7
+ import type { SubscribedType } from "./SubscribedType";
7
8
  export interface CommentReportView {
8
9
  comment_report: CommentReport;
9
10
  comment: Comment;
@@ -13,6 +14,11 @@ export interface CommentReportView {
13
14
  comment_creator: Person;
14
15
  counts: CommentAggregates;
15
16
  creator_banned_from_community: boolean;
17
+ creator_is_moderator: boolean;
18
+ creator_is_admin: boolean;
19
+ creator_blocked: boolean;
20
+ subscribed: SubscribedType;
21
+ saved: boolean;
16
22
  my_vote?: number;
17
23
  resolver?: Person;
18
24
  }
@@ -1,4 +1,5 @@
1
1
  import type { CommunityId } from "./CommunityId";
2
+ import type { CommunityVisibility } from "./CommunityVisibility";
2
3
  import type { InstanceId } from "./InstanceId";
3
4
  export interface Community {
4
5
  id: CommunityId;
@@ -17,4 +18,5 @@ export interface Community {
17
18
  hidden: boolean;
18
19
  posting_restricted_to_mods: boolean;
19
20
  instance_id: InstanceId;
21
+ visibility: CommunityVisibility;
20
22
  }
@@ -9,4 +9,5 @@ export interface CommunityAggregates {
9
9
  users_active_week: number;
10
10
  users_active_month: number;
11
11
  users_active_half_year: number;
12
+ subscribers_local: number;
12
13
  }
@@ -6,4 +6,5 @@ export interface CommunityView {
6
6
  subscribed: SubscribedType;
7
7
  blocked: boolean;
8
8
  counts: CommunityAggregates;
9
+ banned_from_community: boolean;
9
10
  }
@@ -0,0 +1 @@
1
+ export type CommunityVisibility = "Public" | "LocalOnly";
@@ -1,3 +1,4 @@
1
+ import type { CommunityVisibility } from "./CommunityVisibility";
1
2
  import type { LanguageId } from "./LanguageId";
2
3
  export interface CreateCommunity {
3
4
  name: string;
@@ -8,4 +9,5 @@ export interface CreateCommunity {
8
9
  nsfw?: boolean;
9
10
  posting_restricted_to_mods?: boolean;
10
11
  discussion_languages?: Array<LanguageId>;
12
+ visibility?: CommunityVisibility;
11
13
  }
@@ -5,7 +5,9 @@ export interface CreatePost {
5
5
  community_id: CommunityId;
6
6
  url?: string;
7
7
  body?: string;
8
+ alt_text?: string;
8
9
  honeypot?: string;
9
10
  nsfw?: boolean;
10
11
  language_id?: LanguageId;
12
+ custom_thumbnail?: string;
11
13
  }
@@ -1,6 +1,8 @@
1
1
  import type { LanguageId } from "./LanguageId";
2
2
  import type { ListingType } from "./ListingType";
3
+ import type { PostListingMode } from "./PostListingMode";
3
4
  import type { RegistrationMode } from "./RegistrationMode";
5
+ import type { SortType } from "./SortType";
4
6
  export interface CreateSite {
5
7
  name: string;
6
8
  sidebar?: string;
@@ -15,6 +17,7 @@ export interface CreateSite {
15
17
  private_instance?: boolean;
16
18
  default_theme?: string;
17
19
  default_post_listing_type?: ListingType;
20
+ default_sort_type?: SortType;
18
21
  legal_information?: string;
19
22
  application_email_admins?: boolean;
20
23
  hide_modlog_mod_names?: boolean;
@@ -41,4 +44,6 @@ export interface CreateSite {
41
44
  blocked_instances?: Array<string>;
42
45
  taglines?: Array<string>;
43
46
  registration_mode?: RegistrationMode;
47
+ content_warning?: string;
48
+ default_post_listing_mode?: PostListingMode;
44
49
  }
@@ -1,4 +1,5 @@
1
1
  import type { CommunityId } from "./CommunityId";
2
+ import type { CommunityVisibility } from "./CommunityVisibility";
2
3
  import type { LanguageId } from "./LanguageId";
3
4
  export interface EditCommunity {
4
5
  community_id: CommunityId;
@@ -9,4 +10,5 @@ export interface EditCommunity {
9
10
  nsfw?: boolean;
10
11
  posting_restricted_to_mods?: boolean;
11
12
  discussion_languages?: Array<LanguageId>;
13
+ visibility?: CommunityVisibility;
12
14
  }
@@ -5,6 +5,8 @@ export interface EditPost {
5
5
  name?: string;
6
6
  url?: string;
7
7
  body?: string;
8
+ alt_text?: string;
8
9
  nsfw?: boolean;
9
10
  language_id?: LanguageId;
11
+ custom_thumbnail?: string;
10
12
  }
@@ -1,6 +1,8 @@
1
1
  import type { LanguageId } from "./LanguageId";
2
2
  import type { ListingType } from "./ListingType";
3
+ import type { PostListingMode } from "./PostListingMode";
3
4
  import type { RegistrationMode } from "./RegistrationMode";
5
+ import type { SortType } from "./SortType";
4
6
  export interface EditSite {
5
7
  name?: string;
6
8
  sidebar?: string;
@@ -15,6 +17,7 @@ export interface EditSite {
15
17
  private_instance?: boolean;
16
18
  default_theme?: string;
17
19
  default_post_listing_type?: ListingType;
20
+ default_sort_type?: SortType;
18
21
  legal_information?: string;
19
22
  application_email_admins?: boolean;
20
23
  hide_modlog_mod_names?: boolean;
@@ -39,7 +42,10 @@ export interface EditSite {
39
42
  captcha_difficulty?: string;
40
43
  allowed_instances?: Array<string>;
41
44
  blocked_instances?: Array<string>;
45
+ blocked_urls?: Array<string>;
42
46
  taglines?: Array<string>;
43
47
  registration_mode?: RegistrationMode;
44
48
  reports_email_admins?: boolean;
49
+ content_warning?: string;
50
+ default_post_listing_mode?: PostListingMode;
45
51
  }
@@ -1,6 +1,8 @@
1
+ import type { CommentId } from "./CommentId";
1
2
  import type { CommunityId } from "./CommunityId";
2
3
  import type { ModlogActionType } from "./ModlogActionType";
3
4
  import type { PersonId } from "./PersonId";
5
+ import type { PostId } from "./PostId";
4
6
  export interface GetModlog {
5
7
  mod_person_id?: PersonId;
6
8
  community_id?: CommunityId;
@@ -8,4 +10,6 @@ export interface GetModlog {
8
10
  limit?: number;
9
11
  type_?: ModlogActionType;
10
12
  other_person_id?: PersonId;
13
+ post_id?: PostId;
14
+ comment_id?: CommentId;
11
15
  }
@@ -12,5 +12,6 @@ export interface GetPosts {
12
12
  saved_only?: boolean;
13
13
  liked_only?: boolean;
14
14
  disliked_only?: boolean;
15
+ show_hidden?: boolean;
15
16
  page_cursor?: PaginationCursor;
16
17
  }
@@ -1,4 +1,4 @@
1
- import type { SiteMetadata } from "./SiteMetadata";
1
+ import type { LinkMetadata } from "./LinkMetadata";
2
2
  export interface GetSiteMetadataResponse {
3
- metadata: SiteMetadata;
3
+ metadata: LinkMetadata;
4
4
  }
@@ -1,6 +1,7 @@
1
1
  import type { CustomEmojiView } from "./CustomEmojiView";
2
2
  import type { Language } from "./Language";
3
3
  import type { LanguageId } from "./LanguageId";
4
+ import type { LocalSiteUrlBlocklist } from "./LocalSiteUrlBlocklist";
4
5
  import type { MyUserInfo } from "./MyUserInfo";
5
6
  import type { PersonView } from "./PersonView";
6
7
  import type { SiteView } from "./SiteView";
@@ -14,4 +15,5 @@ export interface GetSiteResponse {
14
15
  discussion_languages: Array<LanguageId>;
15
16
  taglines: Array<Tagline>;
16
17
  custom_emojis: Array<CustomEmojiView>;
18
+ blocked_urls: Array<LocalSiteUrlBlocklist>;
17
19
  }
@@ -0,0 +1,5 @@
1
+ import type { PostId } from "./PostId";
2
+ export interface HidePost {
3
+ post_ids: Array<PostId>;
4
+ hide: boolean;
5
+ }
@@ -181,6 +181,8 @@ export type LemmyErrorType = {
181
181
  error: "invalid_body_field";
182
182
  } | {
183
183
  error: "bio_length_overflow";
184
+ } | {
185
+ error: "alt_text_length_overflow";
184
186
  } | {
185
187
  error: "missing_totp_token";
186
188
  } | {
@@ -223,6 +225,8 @@ export type LemmyErrorType = {
223
225
  error: "couldnt_save_post";
224
226
  } | {
225
227
  error: "couldnt_mark_post_as_read";
228
+ } | {
229
+ error: "couldnt_hide_post";
226
230
  } | {
227
231
  error: "couldnt_update_community";
228
232
  } | {
@@ -245,6 +249,8 @@ export type LemmyErrorType = {
245
249
  error: "couldnt_set_all_email_verified";
246
250
  } | {
247
251
  error: "banned";
252
+ } | {
253
+ error: "blocked_url";
248
254
  } | {
249
255
  error: "couldnt_get_comments";
250
256
  } | {
@@ -0,0 +1,7 @@
1
+ export interface LinkMetadata {
2
+ title?: string;
3
+ description?: string;
4
+ image?: string;
5
+ embed_video_url?: string;
6
+ content_type?: string;
7
+ }
@@ -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,5 +1,7 @@
1
+ import type { CommentId } from "./CommentId";
1
2
  import type { CommunityId } from "./CommunityId";
2
3
  export interface ListCommentReports {
4
+ comment_id?: CommentId;
3
5
  page?: number;
4
6
  limit?: number;
5
7
  unresolved_only?: boolean;
@@ -0,0 +1,4 @@
1
+ export interface ListMedia {
2
+ page?: number;
3
+ limit?: number;
4
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,4 @@
1
+ import type { LocalImage } from "./LocalImage";
2
+ export interface ListMediaResponse {
3
+ images: Array<LocalImage>;
4
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,7 +1,9 @@
1
1
  import type { CommunityId } from "./CommunityId";
2
+ import type { PostId } from "./PostId";
2
3
  export interface ListPostReports {
3
4
  page?: number;
4
5
  limit?: number;
5
6
  unresolved_only?: boolean;
6
7
  community_id?: CommunityId;
8
+ post_id?: PostId;
7
9
  }
@@ -1,6 +1,6 @@
1
1
  import type { LocalUserId } from "./LocalUserId";
2
- export interface ImageUpload {
3
- local_user_id: LocalUserId;
2
+ export interface LocalImage {
3
+ local_user_id?: LocalUserId;
4
4
  pictrs_alias: string;
5
5
  pictrs_delete_token: string;
6
6
  published: string;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,7 +1,9 @@
1
1
  import type { ListingType } from "./ListingType";
2
2
  import type { LocalSiteId } from "./LocalSiteId";
3
+ import type { PostListingMode } from "./PostListingMode";
3
4
  import type { RegistrationMode } from "./RegistrationMode";
4
5
  import type { SiteId } from "./SiteId";
6
+ import type { SortType } from "./SortType";
5
7
  export interface LocalSite {
6
8
  id: LocalSiteId;
7
9
  site_id: SiteId;
@@ -27,4 +29,6 @@ export interface LocalSite {
27
29
  registration_mode: RegistrationMode;
28
30
  reports_email_admins: boolean;
29
31
  federation_signed_fetch: boolean;
32
+ default_post_listing_mode: PostListingMode;
33
+ default_sort_type: SortType;
30
34
  }
@@ -0,0 +1,6 @@
1
+ export interface LocalSiteUrlBlocklist {
2
+ id: number;
3
+ url: string;
4
+ published: string;
5
+ updated?: string;
6
+ }
@@ -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,8 +1,10 @@
1
1
  import type { LocalUser } from "./LocalUser";
2
+ import type { LocalUserVoteDisplayMode } from "./LocalUserVoteDisplayMode";
2
3
  import type { Person } from "./Person";
3
4
  import type { PersonAggregates } from "./PersonAggregates";
4
5
  export interface LocalUserView {
5
6
  local_user: LocalUser;
7
+ local_user_vote_display_mode: LocalUserVoteDisplayMode;
6
8
  person: Person;
7
9
  counts: PersonAggregates;
8
10
  }
@@ -0,0 +1,8 @@
1
+ import type { LocalUserId } from "./LocalUserId";
2
+ export interface LocalUserVoteDisplayMode {
3
+ local_user_id: LocalUserId;
4
+ score: boolean;
5
+ upvotes: boolean;
6
+ downvotes: boolean;
7
+ upvote_percentage: boolean;
8
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,6 +1,5 @@
1
1
  import type { PostId } from "./PostId";
2
2
  export interface MarkPostAsRead {
3
- post_id?: PostId;
4
- post_ids?: Array<PostId>;
3
+ post_ids: Array<PostId>;
5
4
  read: boolean;
6
5
  }
@@ -1,9 +1,13 @@
1
+ import type { CommentId } from "./CommentId";
1
2
  import type { CommunityId } from "./CommunityId";
2
3
  import type { PersonId } from "./PersonId";
4
+ import type { PostId } from "./PostId";
3
5
  export interface ModlogListParams {
4
6
  community_id?: CommunityId;
5
7
  mod_person_id?: PersonId;
6
8
  other_person_id?: PersonId;
9
+ post_id?: PostId;
10
+ comment_id?: CommentId;
7
11
  page?: number;
8
12
  limit?: number;
9
13
  hide_modlog_names: boolean;
@@ -1,4 +1,4 @@
1
- export interface SiteMetadata {
1
+ export interface OpenGraphData {
2
2
  title?: string;
3
3
  description?: string;
4
4
  image?: 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 });
@@ -24,4 +24,6 @@ export interface Post {
24
24
  language_id: LanguageId;
25
25
  featured_community: boolean;
26
26
  featured_local: boolean;
27
+ url_content_type?: string;
28
+ alt_text?: string;
27
29
  }
@@ -3,6 +3,7 @@ import type { Person } from "./Person";
3
3
  import type { Post } from "./Post";
4
4
  import type { PostAggregates } from "./PostAggregates";
5
5
  import type { PostReport } from "./PostReport";
6
+ import type { SubscribedType } from "./SubscribedType";
6
7
  export interface PostReportView {
7
8
  post_report: PostReport;
8
9
  post: Post;
@@ -10,7 +11,15 @@ export interface PostReportView {
10
11
  creator: Person;
11
12
  post_creator: Person;
12
13
  creator_banned_from_community: boolean;
14
+ creator_is_moderator: boolean;
15
+ creator_is_admin: boolean;
16
+ subscribed: SubscribedType;
17
+ saved: boolean;
18
+ read: boolean;
19
+ hidden: boolean;
20
+ creator_blocked: boolean;
13
21
  my_vote?: number;
22
+ unread_comments: number;
14
23
  counts: PostAggregates;
15
24
  resolver?: Person;
16
25
  }
@@ -14,6 +14,7 @@ export interface PostView {
14
14
  subscribed: SubscribedType;
15
15
  saved: boolean;
16
16
  read: boolean;
17
+ hidden: boolean;
17
18
  creator_blocked: boolean;
18
19
  my_vote?: number;
19
20
  unread_comments: number;
@@ -6,7 +6,6 @@ export interface SaveUserSettings {
6
6
  show_nsfw?: boolean;
7
7
  blur_nsfw?: boolean;
8
8
  auto_expand?: boolean;
9
- show_scores?: boolean;
10
9
  theme?: string;
11
10
  default_sort_type?: SortType;
12
11
  default_listing_type?: ListingType;
@@ -29,4 +28,8 @@ export interface SaveUserSettings {
29
28
  enable_keyboard_navigation?: boolean;
30
29
  enable_animated_images?: boolean;
31
30
  collapse_bot_comments?: boolean;
31
+ show_scores?: boolean;
32
+ show_upvotes?: boolean;
33
+ show_downvotes?: boolean;
34
+ show_upvote_percentage?: boolean;
32
35
  }
@@ -12,7 +12,6 @@ export interface Site {
12
12
  actor_id: string;
13
13
  last_refreshed_at: string;
14
14
  inbox_url: string;
15
- private_key?: string;
16
- public_key: string;
17
15
  instance_id: InstanceId;
16
+ content_warning?: string;
18
17
  }
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.19.3-alpha.6",
4
+ "version": "0.19.4-alpha.10",
5
5
  "author": "Dessalines <tyhou13@gmx.com>",
6
6
  "license": "AGPL-3.0",
7
7
  "main": "./dist/index.js",
@@ -19,24 +19,24 @@
19
19
  "url": "git+https://github.com/LemmyNet/lemmy-js-client.git"
20
20
  },
21
21
  "dependencies": {
22
- "cross-fetch": "^3.1.5",
22
+ "cross-fetch": "^4.0.0",
23
23
  "form-data": "^4.0.0"
24
24
  },
25
25
  "devDependencies": {
26
- "@types/node": "^20.11.10",
27
- "@typescript-eslint/eslint-plugin": "^6.13.1",
28
- "@typescript-eslint/parser": "^6.13.1",
29
- "eslint": "^8.54.0",
30
- "eslint-plugin-prettier": "^5.0.1",
31
- "husky": "^9.0.6",
32
- "lint-staged": "^15.1.0",
33
- "prettier": "^3.1.0",
26
+ "@types/node": "^20.11.19",
27
+ "@typescript-eslint/eslint-plugin": "^7.0.1",
28
+ "@typescript-eslint/parser": "^7.0.1",
29
+ "eslint": "^8.56.0",
30
+ "eslint-plugin-prettier": "^5.1.3",
31
+ "husky": "^9.0.11",
32
+ "lint-staged": "^15.2.2",
33
+ "prettier": "^3.2.5",
34
34
  "prettier-plugin-import-sort": "^0.0.7",
35
35
  "prettier-plugin-organize-imports": "^3.2.4",
36
- "prettier-plugin-packagejson": "^2.4.6",
37
- "sortpack": "^2.3.5",
38
- "typedoc": "^0.25.7",
39
- "typescript": "^5.3.2"
36
+ "prettier-plugin-packagejson": "^2.4.11",
37
+ "sortpack": "^2.4.0",
38
+ "typedoc": "^0.25.8",
39
+ "typescript": "^5.3.3"
40
40
  },
41
41
  "types": "./dist/index.d.ts",
42
42
  "lint-staged": {
File without changes