lemmy-js-client 0.19.4-alpha.8 → 0.19.4-alpha.9

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 CHANGED
@@ -214,6 +214,12 @@ export declare class LemmyHttp {
214
214
  * `HTTP.GET /user/list_media`
215
215
  */
216
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>;
217
223
  /**
218
224
  * Enable / Disable TOTP / two-factor authentication.
219
225
  *
package/dist/http.js CHANGED
@@ -141,6 +141,14 @@ class LemmyHttp {
141
141
  listMedia(form) {
142
142
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/user/list_media", form);
143
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
+ }
144
152
  /**
145
153
  * Enable / Disable TOTP / two-factor authentication.
146
154
  *
package/dist/index.d.ts CHANGED
@@ -140,10 +140,10 @@ export { LocalImage } from "./types/LocalImage";
140
140
  export { LocalSite } from "./types/LocalSite";
141
141
  export { LocalSiteId } from "./types/LocalSiteId";
142
142
  export { LocalSiteRateLimit } from "./types/LocalSiteRateLimit";
143
- export { LocalSiteUrlBlocklist } from "./types/LocalSiteUrlBlocklist";
144
143
  export { LocalUser } from "./types/LocalUser";
145
144
  export { LocalUserId } from "./types/LocalUserId";
146
145
  export { LocalUserView } from "./types/LocalUserView";
146
+ export { LocalUserVoteDisplayMode } from "./types/LocalUserVoteDisplayMode";
147
147
  export { LockPost } from "./types/LockPost";
148
148
  export { Login } from "./types/Login";
149
149
  export { LoginResponse } from "./types/LoginResponse";
@@ -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
  }
@@ -42,7 +42,6 @@ export interface EditSite {
42
42
  captcha_difficulty?: string;
43
43
  allowed_instances?: Array<string>;
44
44
  blocked_instances?: Array<string>;
45
- blocked_urls?: Array<string>;
46
45
  taglines?: Array<string>;
47
46
  registration_mode?: RegistrationMode;
48
47
  reports_email_admins?: boolean;
@@ -1,7 +1,6 @@
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";
5
4
  import type { MyUserInfo } from "./MyUserInfo";
6
5
  import type { PersonView } from "./PersonView";
7
6
  import type { SiteView } from "./SiteView";
@@ -15,5 +14,4 @@ export interface GetSiteResponse {
15
14
  discussion_languages: Array<LanguageId>;
16
15
  taglines: Array<Tagline>;
17
16
  custom_emojis: Array<CustomEmojiView>;
18
- blocked_urls: Array<LocalSiteUrlBlocklist>;
19
17
  }
@@ -0,0 +1,7 @@
1
+ import type { LocalUserId } from "./LocalUserId";
2
+ export interface ImageUpload {
3
+ local_user_id: LocalUserId;
4
+ pictrs_alias: string;
5
+ pictrs_delete_token: string;
6
+ published: string;
7
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -249,8 +249,6 @@ export type LemmyErrorType = {
249
249
  error: "couldnt_set_all_email_verified";
250
250
  } | {
251
251
  error: "banned";
252
- } | {
253
- error: "blocked_url";
254
252
  } | {
255
253
  error: "couldnt_get_comments";
256
254
  } | {
@@ -1,6 +1,6 @@
1
1
  import type { LocalUserId } from "./LocalUserId";
2
2
  export interface LocalImage {
3
- local_user_id: LocalUserId;
3
+ local_user_id?: LocalUserId;
4
4
  pictrs_alias: string;
5
5
  pictrs_delete_token: string;
6
6
  published: string;
@@ -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 });
@@ -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
  }
@@ -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,8 +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;
18
16
  content_warning?: string;
19
17
  }
@@ -0,0 +1,6 @@
1
+ export interface SiteMetadata {
2
+ title?: string;
3
+ description?: string;
4
+ image?: string;
5
+ embed_video_url?: string;
6
+ }
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.4-alpha.8",
4
+ "version": "0.19.4-alpha.9",
5
5
  "author": "Dessalines <tyhou13@gmx.com>",
6
6
  "license": "AGPL-3.0",
7
7
  "main": "./dist/index.js",
@@ -1,6 +0,0 @@
1
- export interface LocalSiteUrlBlocklist {
2
- id: number;
3
- url: string;
4
- published: string;
5
- updated?: string;
6
- }