lemmy-js-client 0.19.4-alpha.6 → 0.19.4-alpha.7

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
@@ -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,12 @@ 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>;
208
217
  /**
209
218
  * Enable / Disable TOTP / two-factor authentication.
210
219
  *
@@ -341,6 +350,12 @@ export declare class LemmyHttp {
341
350
  * `HTTP.POST /post/mark_as_read`
342
351
  */
343
352
  markPostAsRead(form: MarkPostAsRead): Promise<SuccessResponse>;
353
+ /**
354
+ * Hide a post from list views.
355
+ *
356
+ * `HTTP.POST /post/hide`
357
+ */
358
+ hidePost(form: HidePost): Promise<SuccessResponse>;
344
359
  /**
345
360
  * A moderator can lock a post ( IE disable new comments ).
346
361
  *
package/dist/http.js CHANGED
@@ -133,6 +133,14 @@ 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
+ }
136
144
  /**
137
145
  * Enable / Disable TOTP / two-factor authentication.
138
146
  *
@@ -313,6 +321,14 @@ class LemmyHttp {
313
321
  markPostAsRead(form) {
314
322
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/post/mark_as_read", form);
315
323
  }
324
+ /**
325
+ * Hide a post from list views.
326
+ *
327
+ * `HTTP.POST /post/hide`
328
+ */
329
+ hidePost(form) {
330
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/post/hide", form);
331
+ }
316
332
  /**
317
333
  * A moderator can lock a post ( IE disable new comments ).
318
334
  *
package/dist/index.d.ts CHANGED
@@ -110,6 +110,7 @@ export { GetSiteResponse } from "./types/GetSiteResponse";
110
110
  export { GetUnreadCountResponse } from "./types/GetUnreadCountResponse";
111
111
  export { GetUnreadRegistrationApplicationCountResponse } from "./types/GetUnreadRegistrationApplicationCountResponse";
112
112
  export { HideCommunity } from "./types/HideCommunity";
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";
@@ -124,6 +125,8 @@ export { ListCommentReports } from "./types/ListCommentReports";
124
125
  export { ListCommentReportsResponse } from "./types/ListCommentReportsResponse";
125
126
  export { ListCommunities } from "./types/ListCommunities";
126
127
  export { ListCommunitiesResponse } from "./types/ListCommunitiesResponse";
128
+ export { ListMedia } from "./types/ListMedia";
129
+ export { ListMediaResponse } from "./types/ListMediaResponse";
127
130
  export { ListPostLikes } from "./types/ListPostLikes";
128
131
  export { ListPostLikesResponse } from "./types/ListPostLikesResponse";
129
132
  export { ListPostReports } from "./types/ListPostReports";
@@ -133,6 +136,7 @@ export { ListPrivateMessageReportsResponse } from "./types/ListPrivateMessageRep
133
136
  export { ListRegistrationApplications } from "./types/ListRegistrationApplications";
134
137
  export { ListRegistrationApplicationsResponse } from "./types/ListRegistrationApplicationsResponse";
135
138
  export { ListingType } from "./types/ListingType";
139
+ export { LocalImage } from "./types/LocalImage";
136
140
  export { LocalSite } from "./types/LocalSite";
137
141
  export { LocalSiteId } from "./types/LocalSiteId";
138
142
  export { LocalSiteRateLimit } from "./types/LocalSiteRateLimit";
@@ -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
  }
@@ -0,0 +1,5 @@
1
+ import type { PostId } from "./PostId";
2
+ export interface HidePost {
3
+ post_ids: Array<PostId>;
4
+ hide: boolean;
5
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -225,6 +225,8 @@ export type LemmyErrorType = {
225
225
  error: "couldnt_save_post";
226
226
  } | {
227
227
  error: "couldnt_mark_post_as_read";
228
+ } | {
229
+ error: "couldnt_hide_post";
228
230
  } | {
229
231
  error: "couldnt_update_community";
230
232
  } | {
@@ -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
  }
@@ -0,0 +1,7 @@
1
+ import type { LocalUserId } from "./LocalUserId";
2
+ export interface LocalImage {
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 });
@@ -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;
@@ -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;
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.6",
4
+ "version": "0.19.4-alpha.7",
5
5
  "author": "Dessalines <tyhou13@gmx.com>",
6
6
  "license": "AGPL-3.0",
7
7
  "main": "./dist/index.js",