lemmy-js-client 0.20.0-search-combined.1 → 0.20.0-show-mod-reports.0

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/index.d.ts CHANGED
@@ -50,6 +50,7 @@ export { CommentReportId } from "./types/CommentReportId";
50
50
  export { CommentReportResponse } from "./types/CommentReportResponse";
51
51
  export { CommentReportView } from "./types/CommentReportView";
52
52
  export { CommentResponse } from "./types/CommentResponse";
53
+ export { CommentSlimView } from "./types/CommentSlimView";
53
54
  export { CommentSortType } from "./types/CommentSortType";
54
55
  export { CommentView } from "./types/CommentView";
55
56
  export { Community } from "./types/Community";
@@ -112,6 +113,7 @@ export { GetCaptchaResponse } from "./types/GetCaptchaResponse";
112
113
  export { GetComment } from "./types/GetComment";
113
114
  export { GetComments } from "./types/GetComments";
114
115
  export { GetCommentsResponse } from "./types/GetCommentsResponse";
116
+ export { GetCommentsSlimResponse } from "./types/GetCommentsSlimResponse";
115
117
  export { GetCommunity } from "./types/GetCommunity";
116
118
  export { GetCommunityPendingFollowsCount } from "./types/GetCommunityPendingFollowsCount";
117
119
  export { GetCommunityPendingFollowsCountResponse } from "./types/GetCommunityPendingFollowsCountResponse";
@@ -292,6 +294,7 @@ export { RemoveCommunity } from "./types/RemoveCommunity";
292
294
  export { RemovePost } from "./types/RemovePost";
293
295
  export { ReportCombinedPaginationCursor } from "./types/ReportCombinedPaginationCursor";
294
296
  export { ReportCombinedView } from "./types/ReportCombinedView";
297
+ export { ReportType } from "./types/ReportType";
295
298
  export { ResolveCommentReport } from "./types/ResolveCommentReport";
296
299
  export { ResolveObject } from "./types/ResolveObject";
297
300
  export { ResolveObjectResponse } from "./types/ResolveObjectResponse";
@@ -301,7 +304,6 @@ export { SaveComment } from "./types/SaveComment";
301
304
  export { SavePost } from "./types/SavePost";
302
305
  export { SaveUserSettings } from "./types/SaveUserSettings";
303
306
  export { Search } from "./types/Search";
304
- export { SearchCombinedId } from "./types/SearchCombinedId";
305
307
  export { SearchCombinedPaginationCursor } from "./types/SearchCombinedPaginationCursor";
306
308
  export { SearchCombinedView } from "./types/SearchCombinedView";
307
309
  export { SearchResponse } from "./types/SearchResponse";
@@ -1,4 +1,85 @@
1
+ import { DeleteImageParams } from "./types/DeleteImageParams";
2
+ import { GetComment } from "./types/GetComment";
3
+ import { GetComments } from "./types/GetComments";
4
+ import { GetCommunity } from "./types/GetCommunity";
5
+ import { GetCommunityPendingFollowsCount } from "./types/GetCommunityPendingFollowsCount";
6
+ import { GetModlog } from "./types/GetModlog";
7
+ import { GetPersonDetails } from "./types/GetPersonDetails";
8
+ import { GetPost } from "./types/GetPost";
9
+ import { GetPosts } from "./types/GetPosts";
10
+ import { GetRandomCommunity } from "./types/GetRandomCommunity";
11
+ import { GetRegistrationApplication } from "./types/GetRegistrationApplication";
12
+ import { GetReportCount } from "./types/GetReportCount";
13
+ import { GetSiteMetadata } from "./types/GetSiteMetadata";
14
+ import { ListCommentLikes } from "./types/ListCommentLikes";
15
+ import { ListCommunities } from "./types/ListCommunities";
16
+ import { ListCommunityPendingFollows } from "./types/ListCommunityPendingFollows";
17
+ import { ListCustomEmojis } from "./types/ListCustomEmojis";
18
+ import { ListInbox } from "./types/ListInbox";
19
+ import { ListMedia } from "./types/ListMedia";
20
+ import { ListPersonContent } from "./types/ListPersonContent";
21
+ import { ListPersonSaved } from "./types/ListPersonSaved";
22
+ import { ListPostLikes } from "./types/ListPostLikes";
23
+ import { ListRegistrationApplications } from "./types/ListRegistrationApplications";
24
+ import { ListReports } from "./types/ListReports";
25
+ import { ListTaglines } from "./types/ListTaglines";
26
+ import { ResolveObject } from "./types/ResolveObject";
27
+ import { Search } from "./types/Search";
1
28
  export declare const VERSION = "v4";
2
29
  export interface UploadImage {
3
30
  image: File | Buffer;
4
31
  }
32
+ export interface ListMediaI extends ListMedia {
33
+ }
34
+ export interface GetModlogI extends GetModlog {
35
+ }
36
+ export interface SearchI extends Search {
37
+ }
38
+ export interface ResolveObjectI extends ResolveObject {
39
+ }
40
+ export interface GetCommunityI extends GetCommunity {
41
+ }
42
+ export interface ListCommunitiesI extends ListCommunities {
43
+ }
44
+ export interface GetCommunityPendingFollowsCountI extends GetCommunityPendingFollowsCount {
45
+ }
46
+ export interface ListCommunityPendingFollowsI extends ListCommunityPendingFollows {
47
+ }
48
+ export interface GetRandomCommunityI extends GetRandomCommunity {
49
+ }
50
+ export interface GetPostI extends GetPost {
51
+ }
52
+ export interface GetPostsI extends GetPosts {
53
+ }
54
+ export interface ListPostLikesI extends ListPostLikes {
55
+ }
56
+ export interface GetSiteMetadataI extends GetSiteMetadata {
57
+ }
58
+ export interface ListCommentLikesI extends ListCommentLikes {
59
+ }
60
+ export interface GetCommentsI extends GetComments {
61
+ }
62
+ export interface GetCommentI extends GetComment {
63
+ }
64
+ export interface GetPersonDetailsI extends GetPersonDetails {
65
+ }
66
+ export interface ListPersonContentI extends ListPersonContent {
67
+ }
68
+ export interface GetReportCountI extends GetReportCount {
69
+ }
70
+ export interface ListInboxI extends ListInbox {
71
+ }
72
+ export interface ListPersonSavedI extends ListPersonSaved {
73
+ }
74
+ export interface ListRegistrationApplicationsI extends ListRegistrationApplications {
75
+ }
76
+ export interface GetRegistrationApplicationI extends GetRegistrationApplication {
77
+ }
78
+ export interface ListCustomEmojisI extends ListCustomEmojis {
79
+ }
80
+ export interface ListTaglinesI extends ListTaglines {
81
+ }
82
+ export interface ListReportsI extends ListReports {
83
+ }
84
+ export interface DeleteImageParamsI extends DeleteImageParams {
85
+ }
@@ -0,0 +1,20 @@
1
+ import type { Comment } from "./Comment";
2
+ import type { CommentAggregates } from "./CommentAggregates";
3
+ import type { Person } from "./Person";
4
+ import type { SubscribedType } from "./SubscribedType";
5
+ /**
6
+ * A slimmer comment view, without the post, or community.
7
+ */
8
+ export type CommentSlimView = {
9
+ comment: Comment;
10
+ creator: Person;
11
+ counts: CommentAggregates;
12
+ creator_banned_from_community: boolean;
13
+ banned_from_community: boolean;
14
+ creator_is_moderator: boolean;
15
+ creator_is_admin: boolean;
16
+ subscribed: SubscribedType;
17
+ saved: boolean;
18
+ creator_blocked: boolean;
19
+ my_vote?: number;
20
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -31,9 +31,9 @@ export type Community = {
31
31
  */
32
32
  nsfw: boolean;
33
33
  /**
34
- * The federated actor_id.
34
+ * The federated ap_id.
35
35
  */
36
- actor_id: DbUrl;
36
+ ap_id: DbUrl;
37
37
  /**
38
38
  * Whether the community is local.
39
39
  */
@@ -0,0 +1,7 @@
1
+ import type { CommentSlimView } from "./CommentSlimView";
2
+ /**
3
+ * A slimmer comment list response, without the post or community.
4
+ */
5
+ export type GetCommentsSlimResponse = {
6
+ comments: Array<CommentSlimView>;
7
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,5 +1,7 @@
1
1
  import type { CommunityId } from "./CommunityId";
2
+ import type { PostId } from "./PostId";
2
3
  import type { ReportCombinedPaginationCursor } from "./ReportCombinedPaginationCursor";
4
+ import type { ReportType } from "./ReportType";
3
5
  /**
4
6
  * List reports.
5
7
  */
@@ -8,10 +10,22 @@ export type ListReports = {
8
10
  * Only shows the unresolved reports
9
11
  */
10
12
  unresolved_only?: boolean;
13
+ /**
14
+ * Filter the type of report.
15
+ */
16
+ type_?: ReportType;
17
+ /**
18
+ * Filter by the post id. Can return either comment or post reports.
19
+ */
20
+ post_id?: PostId;
11
21
  /**
12
22
  * if no community is given, it returns reports for all communities moderated by the auth user
13
23
  */
14
24
  community_id?: CommunityId;
15
25
  page_cursor?: ReportCombinedPaginationCursor;
16
26
  page_back?: boolean;
27
+ /**
28
+ * Only for admins: also show reports destined to community mods
29
+ */
30
+ show_mod_reports?: boolean;
17
31
  };
@@ -22,9 +22,9 @@ export type Person = {
22
22
  published: string;
23
23
  updated?: string;
24
24
  /**
25
- * The federated actor_id.
25
+ * The federated ap_id.
26
26
  */
27
- actor_id: DbUrl;
27
+ ap_id: DbUrl;
28
28
  /**
29
29
  * An optional bio, in markdown.
30
30
  */
@@ -1,4 +1,4 @@
1
1
  /**
2
- * A list of possible types for the various modlog actions.
2
+ * A list of possible types for a person's content.
3
3
  */
4
4
  export type PersonContentType = "All" | "Comments" | "Posts";
@@ -0,0 +1,4 @@
1
+ /**
2
+ * A list of possible types for reports.
3
+ */
4
+ export type ReportType = "All" | "Posts" | "Comments" | "PrivateMessages" | "Communities";
@@ -26,9 +26,9 @@ export type Site = {
26
26
  */
27
27
  description?: string;
28
28
  /**
29
- * The federated actor_id.
29
+ * The federated ap_id.
30
30
  */
31
- actor_id: DbUrl;
31
+ ap_id: DbUrl;
32
32
  /**
33
33
  * The time the site was last refreshed.
34
34
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Saves settings for your user.
2
+ * A response that completes successfully.
3
3
  */
4
4
  export type SuccessResponse = {
5
5
  success: boolean;
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "lemmy-js-client",
3
3
  "description": "A javascript / typescript client for Lemmy",
4
- "version": "0.20.0-search-combined.1",
5
- "author": "Dessalines <tyhou13@gmx.com>",
4
+ "version": "0.20.0-show-mod-reports.0",
5
+ "author": "Dessalines",
6
6
  "license": "AGPL-3.0",
7
7
  "main": "./dist/index.js",
8
8
  "files": [
@@ -12,13 +12,16 @@
12
12
  "build": "tsc",
13
13
  "docs": "typedoc src/index.ts",
14
14
  "lint": "tsc --noEmit && eslint --report-unused-disable-directives && prettier --check src",
15
- "prepare": "pnpm run build && husky"
15
+ "prepare": "pnpm run build && husky",
16
+ "tsoa": "tsoa spec-and-routes && tsc && redocly build-docs tsoa_build/swagger.json"
16
17
  },
17
18
  "repository": {
18
19
  "type": "git",
19
20
  "url": "git+https://github.com/LemmyNet/lemmy-js-client.git"
20
21
  },
21
22
  "devDependencies": {
23
+ "@redocly/cli": "^1.27.2",
24
+ "@types/joi": "^17.2.3",
22
25
  "@types/node": "^22.7.4",
23
26
  "@typescript-eslint/eslint-plugin": "^8.7.0",
24
27
  "@typescript-eslint/parser": "^8.7.0",
@@ -31,11 +34,12 @@
31
34
  "prettier-plugin-organize-imports": "^4.0.0",
32
35
  "prettier-plugin-packagejson": "^2.5.1",
33
36
  "sortpack": "^2.4.0",
37
+ "tsoa": "^6.6.0",
34
38
  "typedoc": "^0.27.0",
35
39
  "typescript": "^5.5.4",
36
40
  "typescript-eslint": "^8.7.0"
37
41
  },
38
- "packageManager": "pnpm@9.15.4",
42
+ "packageManager": "pnpm@9.15.5",
39
43
  "types": "./dist/index.d.ts",
40
44
  "lint-staged": {
41
45
  "*.{ts,tsx,js}": [
@@ -1,4 +0,0 @@
1
- /**
2
- * The search combined id
3
- */
4
- export type SearchCombinedId = number;