lemmy-js-client 1.0.0-community-reports.0 → 1.0.0-local-image-user.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.
package/dist/http.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Controller } from "@tsoa/runtime";
2
- import { DeleteImageParamsI, GetCommentI, GetCommentsI, GetCommunityI, GetCommunityPendingFollowsCountI, GetModlogI, GetPersonDetailsI, GetPostI, GetPostsI, GetRandomCommunityI, GetRegistrationApplicationI, GetReportCountI, GetSiteMetadataI, ListBannedPersonsI, ListCommentLikesI, ListCommunitiesI, ListCommunityPendingFollowsI, ListCustomEmojisI, ListInboxI, ListMediaI, ListPersonContentI, ListPersonSavedI, ListPostLikesI, ListRegistrationApplicationsI, ListReportsI, ListTaglinesI, ResolveObjectI, SearchI, UploadImage } from "./other_types";
2
+ import { DeleteImageParamsI, GetCommentI, GetCommentsI, GetCommunityI, GetCommunityPendingFollowsCountI, GetModlogI, GetPersonDetailsI, GetPostI, GetPostsI, GetRandomCommunityI, GetRegistrationApplicationI, GetReportCountI, GetSiteMetadataI, ListBannedPersonsI, ListCommentLikesI, ListCommunitiesI, ListCommunityPendingFollowsI, ListCustomEmojisI, ListInboxI, ListMediaI, ListPersonContentI, ListPersonHiddenI, ListPersonReadI, ListPersonSavedI, ListPostLikesI, ListRegistrationApplicationsI, ListReportsI, ListTaglinesI, ResolveObjectI, SearchI, UploadImage } from "./other_types";
3
3
  import { AddAdmin } from "./types/AddAdmin";
4
4
  import { AddAdminResponse } from "./types/AddAdminResponse";
5
5
  import { AddModToCommunity } from "./types/AddModToCommunity";
@@ -137,6 +137,8 @@ import { MarkPersonPostMentionAsRead } from "./types/MarkPersonPostMentionAsRead
137
137
  import { GetCommentsSlimResponse } from "./types/GetCommentsSlimResponse";
138
138
  import { Tag } from "./types/Tag";
139
139
  import { ResendVerificationEmail } from "./types/ResendVerificationEmail";
140
+ import { ListPersonReadResponse } from "./types/ListPersonReadResponse";
141
+ import { ListPersonHiddenResponse } from "./types/ListPersonHiddenResponse";
140
142
  type RequestOptions = Pick<RequestInit, "signal">;
141
143
  /**
142
144
  * Helps build lemmy HTTP requests.
@@ -548,6 +550,14 @@ export declare class LemmyHttp extends Controller {
548
550
  * @summary List your saved content.
549
551
  */
550
552
  listPersonSaved(form: ListPersonSavedI, options?: RequestOptions): Promise<ListPersonSavedResponse>;
553
+ /**
554
+ * @summary List your read content.
555
+ */
556
+ listPersonRead(form: ListPersonReadI, options?: RequestOptions): Promise<ListPersonReadResponse>;
557
+ /**
558
+ * @summary List your hidden content.
559
+ */
560
+ listPersonHidden(form: ListPersonHiddenI, options?: RequestOptions): Promise<ListPersonHiddenResponse>;
551
561
  /**
552
562
  * @summary Add an admin to your site.
553
563
  */
package/dist/http.js CHANGED
@@ -640,6 +640,18 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
640
640
  async listPersonSaved(form, options) {
641
641
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/saved", form, options);
642
642
  }
643
+ /**
644
+ * @summary List your read content.
645
+ */
646
+ async listPersonRead(form, options) {
647
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/read", form, options);
648
+ }
649
+ /**
650
+ * @summary List your hidden content.
651
+ */
652
+ async listPersonHidden(form, options) {
653
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/hidden", form, options);
654
+ }
643
655
  /**
644
656
  * @summary Add an admin to your site.
645
657
  */
@@ -1637,6 +1649,20 @@ __decorate([
1637
1649
  __param(0, (0, runtime_1.Queries)()),
1638
1650
  __param(1, (0, runtime_1.Inject)())
1639
1651
  ], LemmyHttp.prototype, "listPersonSaved", null);
1652
+ __decorate([
1653
+ (0, runtime_1.Security)("bearerAuth"),
1654
+ (0, runtime_1.Get)("/account/read"),
1655
+ (0, runtime_1.Tags)("Account"),
1656
+ __param(0, (0, runtime_1.Queries)()),
1657
+ __param(1, (0, runtime_1.Inject)())
1658
+ ], LemmyHttp.prototype, "listPersonRead", null);
1659
+ __decorate([
1660
+ (0, runtime_1.Security)("bearerAuth"),
1661
+ (0, runtime_1.Get)("/account/hidden"),
1662
+ (0, runtime_1.Tags)("Account"),
1663
+ __param(0, (0, runtime_1.Queries)()),
1664
+ __param(1, (0, runtime_1.Inject)())
1665
+ ], LemmyHttp.prototype, "listPersonHidden", null);
1640
1666
  __decorate([
1641
1667
  (0, runtime_1.Security)("bearerAuth"),
1642
1668
  (0, runtime_1.Post)("/admin/add"),
package/dist/index.d.ts CHANGED
@@ -171,6 +171,10 @@ export { ListMedia } from "./types/ListMedia";
171
171
  export { ListMediaResponse } from "./types/ListMediaResponse";
172
172
  export { ListPersonContent } from "./types/ListPersonContent";
173
173
  export { ListPersonContentResponse } from "./types/ListPersonContentResponse";
174
+ export { ListPersonHidden } from "./types/ListPersonHidden";
175
+ export { ListPersonHiddenResponse } from "./types/ListPersonHiddenResponse";
176
+ export { ListPersonRead } from "./types/ListPersonRead";
177
+ export { ListPersonReadResponse } from "./types/ListPersonReadResponse";
174
178
  export { ListPersonSaved } from "./types/ListPersonSaved";
175
179
  export { ListPersonSavedResponse } from "./types/ListPersonSavedResponse";
176
180
  export { ListPostLikes } from "./types/ListPostLikes";
@@ -331,4 +335,5 @@ export { UpdateTotpResponse } from "./types/UpdateTotpResponse";
331
335
  export { UploadImageResponse } from "./types/UploadImageResponse";
332
336
  export { UserBlockInstanceParams } from "./types/UserBlockInstanceParams";
333
337
  export { VerifyEmail } from "./types/VerifyEmail";
338
+ export { VoteShow } from "./types/VoteShow";
334
339
  export { VoteView } from "./types/VoteView";
@@ -19,6 +19,8 @@ import { ListCustomEmojis } from "./types/ListCustomEmojis";
19
19
  import { ListInbox } from "./types/ListInbox";
20
20
  import { ListMedia } from "./types/ListMedia";
21
21
  import { ListPersonContent } from "./types/ListPersonContent";
22
+ import { ListPersonHidden } from "./types/ListPersonHidden";
23
+ import { ListPersonRead } from "./types/ListPersonRead";
22
24
  import { ListPersonSaved } from "./types/ListPersonSaved";
23
25
  import { ListPostLikes } from "./types/ListPostLikes";
24
26
  import { ListRegistrationApplications } from "./types/ListRegistrationApplications";
@@ -72,6 +74,10 @@ export interface ListInboxI extends ListInbox {
72
74
  }
73
75
  export interface ListPersonSavedI extends ListPersonSaved {
74
76
  }
77
+ export interface ListPersonReadI extends ListPersonRead {
78
+ }
79
+ export interface ListPersonHiddenI extends ListPersonHidden {
80
+ }
75
81
  export interface ListRegistrationApplicationsI extends ListRegistrationApplications {
76
82
  }
77
83
  export interface GetRegistrationApplicationI extends GetRegistrationApplication {
@@ -0,0 +1,9 @@
1
+ import type { PaginationCursor } from "./PaginationCursor";
2
+ /**
3
+ * Gets your hidden posts.
4
+ */
5
+ export type ListPersonHidden = {
6
+ page_cursor?: PaginationCursor;
7
+ page_back?: boolean;
8
+ limit?: number;
9
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,13 @@
1
+ import type { PaginationCursor } from "./PaginationCursor";
2
+ import type { PostView } from "./PostView";
3
+ /**
4
+ * You hidden posts response.
5
+ */
6
+ export type ListPersonHiddenResponse = {
7
+ hidden: Array<PostView>;
8
+ /**
9
+ * the pagination cursor to use to fetch the next page
10
+ */
11
+ next_page?: PaginationCursor;
12
+ prev_page?: PaginationCursor;
13
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,9 @@
1
+ import type { PaginationCursor } from "./PaginationCursor";
2
+ /**
3
+ * Gets your read posts.
4
+ */
5
+ export type ListPersonRead = {
6
+ page_cursor?: PaginationCursor;
7
+ page_back?: boolean;
8
+ limit?: number;
9
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,13 @@
1
+ import type { PaginationCursor } from "./PaginationCursor";
2
+ import type { PostView } from "./PostView";
3
+ /**
4
+ * You read posts response.
5
+ */
6
+ export type ListPersonReadResponse = {
7
+ read: Array<PostView>;
8
+ /**
9
+ * the pagination cursor to use to fetch the next page
10
+ */
11
+ next_page?: PaginationCursor;
12
+ prev_page?: PaginationCursor;
13
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,6 +1,8 @@
1
- import type { LocalUserId } from "./LocalUserId";
1
+ import type { PersonId } from "./PersonId";
2
+ import type { PostId } from "./PostId";
2
3
  export type LocalImage = {
3
- local_user_id?: LocalUserId;
4
4
  pictrs_alias: string;
5
5
  published: string;
6
+ person_id: PersonId;
7
+ thumbnail_and_post_id?: PostId;
6
8
  };
@@ -5,6 +5,7 @@ import type { PersonId } from "./PersonId";
5
5
  import type { PostListingMode } from "./PostListingMode";
6
6
  import type { PostSortType } from "./PostSortType";
7
7
  import type { SensitiveString } from "./SensitiveString";
8
+ import type { VoteShow } from "./VoteShow";
8
9
  /**
9
10
  * A local user.
10
11
  */
@@ -99,6 +100,6 @@ export type LocalUser = {
99
100
  default_post_time_range_seconds?: number;
100
101
  show_score: boolean;
101
102
  show_upvotes: boolean;
102
- show_downvotes: boolean;
103
+ show_downvotes: VoteShow;
103
104
  show_upvote_percentage: boolean;
104
105
  };
@@ -1,6 +1,9 @@
1
1
  import type { SensitiveString } from "./SensitiveString";
2
2
  /**
3
3
  * Logging into lemmy.
4
+ *
5
+ * Note: Banned users can still log in, to be able to do certain things like delete
6
+ * their account.
4
7
  */
5
8
  export type Login = {
6
9
  username_or_email: SensitiveString;
@@ -4,6 +4,7 @@ import type { ListingType } from "./ListingType";
4
4
  import type { PostListingMode } from "./PostListingMode";
5
5
  import type { PostSortType } from "./PostSortType";
6
6
  import type { SensitiveString } from "./SensitiveString";
7
+ import type { VoteShow } from "./VoteShow";
7
8
  /**
8
9
  * Saves settings for your user.
9
10
  */
@@ -115,7 +116,7 @@ export type SaveUserSettings = {
115
116
  */
116
117
  show_scores?: boolean;
117
118
  show_upvotes?: boolean;
118
- show_downvotes?: boolean;
119
+ show_downvotes?: VoteShow;
119
120
  show_upvote_percentage?: boolean;
120
121
  /**
121
122
  * Whether to automatically mark fetched posts as read.
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Lets you show votes for others only, show all votes, or hide all votes.
3
+ */
4
+ export type VoteShow = "Show" | "ShowForOthers" | "Hide";
@@ -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 });
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": "1.0.0-community-reports.0",
4
+ "version": "1.0.0-local-image-user.3",
5
5
  "author": "Dessalines",
6
6
  "license": "AGPL-3.0",
7
7
  "main": "./dist/index.js",
@@ -25,13 +25,13 @@
25
25
  "devDependencies": {
26
26
  "@eslint/js": "^9.20.0",
27
27
  "@redocly/cli": "^1.27.2",
28
- "@types/joi": "^17.2.3",
29
28
  "@types/node": "^22.7.4",
30
29
  "@typescript-eslint/eslint-plugin": "^8.7.0",
31
30
  "@typescript-eslint/parser": "^8.7.0",
32
31
  "eslint": "^9.11.1",
33
32
  "eslint-plugin-prettier": "^5.2.1",
34
33
  "husky": "^9.1.4",
34
+ "joi": "^17.13.3",
35
35
  "lint-staged": "^15.2.7",
36
36
  "prettier": "^3.3.3",
37
37
  "prettier-plugin-import-sort": "^0.0.7",
@@ -43,7 +43,7 @@
43
43
  "typescript": "^5.5.4",
44
44
  "typescript-eslint": "^8.7.0"
45
45
  },
46
- "packageManager": "pnpm@10.8.1",
46
+ "packageManager": "pnpm@10.10.0",
47
47
  "types": "./dist/index.d.ts",
48
48
  "lint-staged": {
49
49
  "*.{ts,tsx,js}": [