lemmy-js-client 0.20.0-modlog-combined.0 → 0.20.0-modlog-combined.1

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 (40) hide show
  1. package/dist/index.d.ts +3 -0
  2. package/dist/types/AdminAllowInstance.d.ts +1 -1
  3. package/dist/types/AdminBlockInstance.d.ts +1 -1
  4. package/dist/types/AdminPurgeComment.d.ts +1 -1
  5. package/dist/types/AdminPurgeCommunity.d.ts +1 -1
  6. package/dist/types/AdminPurgePerson.d.ts +1 -1
  7. package/dist/types/AdminPurgePost.d.ts +1 -1
  8. package/dist/types/CommunityAggregates.d.ts +2 -0
  9. package/dist/types/CommunityReport.d.ts +22 -0
  10. package/dist/types/CommunityReport.js +2 -0
  11. package/dist/types/CommunityReportId.d.ts +4 -0
  12. package/dist/types/CommunityReportId.js +3 -0
  13. package/dist/types/CommunityReportView.d.ts +16 -0
  14. package/dist/types/CommunityReportView.js +2 -0
  15. package/dist/types/CreateSite.d.ts +0 -2
  16. package/dist/types/EditSite.d.ts +0 -8
  17. package/dist/types/FederationError.d.ts +1 -1
  18. package/dist/types/GetModlog.d.ts +1 -1
  19. package/dist/types/ModAdd.d.ts +1 -1
  20. package/dist/types/ModAddCommunity.d.ts +1 -1
  21. package/dist/types/ModAddCommunityView.d.ts +1 -1
  22. package/dist/types/ModAddView.d.ts +1 -1
  23. package/dist/types/ModBan.d.ts +1 -1
  24. package/dist/types/ModBanFromCommunity.d.ts +1 -1
  25. package/dist/types/ModBanFromCommunityView.d.ts +1 -1
  26. package/dist/types/ModBanView.d.ts +1 -1
  27. package/dist/types/ModFeaturePost.d.ts +1 -1
  28. package/dist/types/ModFeaturePostView.d.ts +1 -1
  29. package/dist/types/ModHideCommunity.d.ts +1 -1
  30. package/dist/types/ModLockPost.d.ts +1 -1
  31. package/dist/types/ModLockPostView.d.ts +1 -1
  32. package/dist/types/ModRemoveComment.d.ts +1 -1
  33. package/dist/types/ModRemoveCommentView.d.ts +1 -1
  34. package/dist/types/ModRemoveCommunity.d.ts +1 -1
  35. package/dist/types/ModRemovePost.d.ts +1 -1
  36. package/dist/types/ModRemovePostView.d.ts +1 -1
  37. package/dist/types/ModTransferCommunity.d.ts +1 -1
  38. package/dist/types/ModTransferCommunityView.d.ts +1 -1
  39. package/dist/types/ReportCombinedView.d.ts +4 -1
  40. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -59,6 +59,9 @@ export { CommunityFollowerState } from "./types/CommunityFollowerState";
59
59
  export { CommunityFollowerView } from "./types/CommunityFollowerView";
60
60
  export { CommunityId } from "./types/CommunityId";
61
61
  export { CommunityModeratorView } from "./types/CommunityModeratorView";
62
+ export { CommunityReport } from "./types/CommunityReport";
63
+ export { CommunityReportId } from "./types/CommunityReportId";
64
+ export { CommunityReportView } from "./types/CommunityReportView";
62
65
  export { CommunityResponse } from "./types/CommunityResponse";
63
66
  export { CommunitySortType } from "./types/CommunitySortType";
64
67
  export { CommunityView } from "./types/CommunityView";
@@ -7,5 +7,5 @@ export type AdminAllowInstance = {
7
7
  admin_person_id: PersonId;
8
8
  allowed: boolean;
9
9
  reason?: string;
10
- when_: string;
10
+ published: string;
11
11
  };
@@ -8,5 +8,5 @@ export type AdminBlockInstance = {
8
8
  blocked: boolean;
9
9
  reason?: string;
10
10
  expires?: string;
11
- when_: string;
11
+ published: string;
12
12
  };
@@ -9,5 +9,5 @@ export type AdminPurgeComment = {
9
9
  admin_person_id: PersonId;
10
10
  post_id: PostId;
11
11
  reason?: string;
12
- when_: string;
12
+ published: string;
13
13
  };
@@ -7,5 +7,5 @@ export type AdminPurgeCommunity = {
7
7
  id: AdminPurgeCommunityId;
8
8
  admin_person_id: PersonId;
9
9
  reason?: string;
10
- when_: string;
10
+ published: string;
11
11
  };
@@ -7,5 +7,5 @@ export type AdminPurgePerson = {
7
7
  id: AdminPurgePersonId;
8
8
  admin_person_id: PersonId;
9
9
  reason?: string;
10
- when_: string;
10
+ published: string;
11
11
  };
@@ -9,5 +9,5 @@ export type AdminPurgePost = {
9
9
  admin_person_id: PersonId;
10
10
  community_id: CommunityId;
11
11
  reason?: string;
12
- when_: string;
12
+ published: string;
13
13
  };
@@ -25,4 +25,6 @@ export type CommunityAggregates = {
25
25
  */
26
26
  users_active_half_year: number;
27
27
  subscribers_local: number;
28
+ report_count: number;
29
+ unresolved_report_count: number;
28
30
  };
@@ -0,0 +1,22 @@
1
+ import type { CommunityId } from "./CommunityId";
2
+ import type { CommunityReportId } from "./CommunityReportId";
3
+ import type { PersonId } from "./PersonId";
4
+ /**
5
+ * A comment report.
6
+ */
7
+ export type CommunityReport = {
8
+ id: CommunityReportId;
9
+ creator_id: PersonId;
10
+ community_id: CommunityId;
11
+ original_community_name: string;
12
+ original_community_title: string;
13
+ original_community_description?: string;
14
+ original_community_sidebar?: string;
15
+ original_community_icon?: string;
16
+ original_community_banner?: string;
17
+ reason: string;
18
+ resolved: boolean;
19
+ resolver_id?: PersonId;
20
+ published: string;
21
+ updated?: string;
22
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,4 @@
1
+ /**
2
+ * The community report id.
3
+ */
4
+ export type CommunityReportId = number;
@@ -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,16 @@
1
+ import type { Community } from "./Community";
2
+ import type { CommunityAggregates } from "./CommunityAggregates";
3
+ import type { CommunityReport } from "./CommunityReport";
4
+ import type { Person } from "./Person";
5
+ import type { SubscribedType } from "./SubscribedType";
6
+ /**
7
+ * A community report view.
8
+ */
9
+ export type CommunityReportView = {
10
+ community_report: CommunityReport;
11
+ community: Community;
12
+ creator: Person;
13
+ counts: CommunityAggregates;
14
+ subscribed: SubscribedType;
15
+ resolver?: Person;
16
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -12,7 +12,6 @@ export type CreateSite = {
12
12
  name: string;
13
13
  sidebar?: string;
14
14
  description?: string;
15
- enable_nsfw?: boolean;
16
15
  community_creation_admin_only?: boolean;
17
16
  require_email_verification?: boolean;
18
17
  application_question?: string;
@@ -41,7 +40,6 @@ export type CreateSite = {
41
40
  rate_limit_search?: number;
42
41
  rate_limit_search_per_second?: number;
43
42
  federation_enabled?: boolean;
44
- federation_debug?: boolean;
45
43
  captcha_enabled?: boolean;
46
44
  captcha_difficulty?: string;
47
45
  registration_mode?: RegistrationMode;
@@ -18,10 +18,6 @@ export type EditSite = {
18
18
  * A shorter, one line description of your site.
19
19
  */
20
20
  description?: string;
21
- /**
22
- * Whether to enable NSFW.
23
- */
24
- enable_nsfw?: boolean;
25
21
  /**
26
22
  * Limits community creation to admins only.
27
23
  */
@@ -116,10 +112,6 @@ export type EditSite = {
116
112
  * Whether to enable federation.
117
113
  */
118
114
  federation_enabled?: boolean;
119
- /**
120
- * Enables federation debugging.
121
- */
122
- federation_debug?: boolean;
123
115
  /**
124
116
  * Whether to enable captchas for signups.
125
117
  */
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Federation related errors, these dont need to be translated.
3
3
  */
4
- export type FederationError = "CouldntFindActivity" | "InvalidCommunity" | "CannotCreatePostOrCommentInDeletedOrRemovedCommunity" | "CannotReceivePage" | "OnlyLocalAdminCanRemoveCommunity" | "OnlyLocalAdminCanRestoreCommunity" | "PostIsLocked" | {
4
+ export type FederationError = "InvalidCommunity" | "CannotCreatePostOrCommentInDeletedOrRemovedCommunity" | "CannotReceivePage" | "OnlyLocalAdminCanRemoveCommunity" | "OnlyLocalAdminCanRestoreCommunity" | "PostIsLocked" | {
5
5
  PersonIsBannedFromSite: string;
6
6
  } | "InvalidVoteValue" | "PageDoesNotSpecifyCreator" | "CouldntGetComments" | "CouldntGetPosts" | "FederationDisabled" | {
7
7
  DomainBlocked: string;
@@ -11,7 +11,7 @@ export type GetModlog = {
11
11
  mod_person_id?: PersonId;
12
12
  community_id?: CommunityId;
13
13
  type_?: ModlogActionType;
14
- modded_person_id?: PersonId;
14
+ other_person_id?: PersonId;
15
15
  post_id?: PostId;
16
16
  comment_id?: CommentId;
17
17
  page_cursor?: ModlogCombinedPaginationCursor;
@@ -8,5 +8,5 @@ export type ModAdd = {
8
8
  mod_person_id: PersonId;
9
9
  other_person_id: PersonId;
10
10
  removed: boolean;
11
- when_: string;
11
+ published: string;
12
12
  };
@@ -10,5 +10,5 @@ export type ModAddCommunity = {
10
10
  other_person_id: PersonId;
11
11
  community_id: CommunityId;
12
12
  removed: boolean;
13
- when_: string;
13
+ published: string;
14
14
  };
@@ -8,5 +8,5 @@ export type ModAddCommunityView = {
8
8
  mod_add_community: ModAddCommunity;
9
9
  moderator?: Person;
10
10
  community: Community;
11
- modded_person: Person;
11
+ other_person: Person;
12
12
  };
@@ -6,5 +6,5 @@ import type { Person } from "./Person";
6
6
  export type ModAddView = {
7
7
  mod_add: ModAdd;
8
8
  moderator?: Person;
9
- modded_person: Person;
9
+ other_person: Person;
10
10
  };
@@ -10,5 +10,5 @@ export type ModBan = {
10
10
  reason?: string;
11
11
  banned: boolean;
12
12
  expires?: string;
13
- when_: string;
13
+ published: string;
14
14
  };
@@ -12,5 +12,5 @@ export type ModBanFromCommunity = {
12
12
  reason?: string;
13
13
  banned: boolean;
14
14
  expires?: string;
15
- when_: string;
15
+ published: string;
16
16
  };
@@ -8,5 +8,5 @@ export type ModBanFromCommunityView = {
8
8
  mod_ban_from_community: ModBanFromCommunity;
9
9
  moderator?: Person;
10
10
  community: Community;
11
- modded_person: Person;
11
+ other_person: Person;
12
12
  };
@@ -6,5 +6,5 @@ import type { Person } from "./Person";
6
6
  export type ModBanView = {
7
7
  mod_ban: ModBan;
8
8
  moderator?: Person;
9
- modded_person: Person;
9
+ other_person: Person;
10
10
  };
@@ -9,6 +9,6 @@ export type ModFeaturePost = {
9
9
  mod_person_id: PersonId;
10
10
  post_id: PostId;
11
11
  featured: boolean;
12
- when_: string;
12
+ published: string;
13
13
  is_featured_community: boolean;
14
14
  };
@@ -8,7 +8,7 @@ import type { Post } from "./Post";
8
8
  export type ModFeaturePostView = {
9
9
  mod_feature_post: ModFeaturePost;
10
10
  moderator?: Person;
11
- modded_person: Person;
11
+ other_person: Person;
12
12
  post: Post;
13
13
  community: Community;
14
14
  };
@@ -8,7 +8,7 @@ export type ModHideCommunity = {
8
8
  id: ModHideCommunityId;
9
9
  community_id: CommunityId;
10
10
  mod_person_id: PersonId;
11
- when_: string;
11
+ published: string;
12
12
  reason?: string;
13
13
  hidden: boolean;
14
14
  };
@@ -9,5 +9,5 @@ export type ModLockPost = {
9
9
  mod_person_id: PersonId;
10
10
  post_id: PostId;
11
11
  locked: boolean;
12
- when_: string;
12
+ published: string;
13
13
  };
@@ -8,7 +8,7 @@ import type { Post } from "./Post";
8
8
  export type ModLockPostView = {
9
9
  mod_lock_post: ModLockPost;
10
10
  moderator?: Person;
11
- modded_person: Person;
11
+ other_person: Person;
12
12
  post: Post;
13
13
  community: Community;
14
14
  };
@@ -10,5 +10,5 @@ export type ModRemoveComment = {
10
10
  comment_id: CommentId;
11
11
  reason?: string;
12
12
  removed: boolean;
13
- when_: string;
13
+ published: string;
14
14
  };
@@ -9,7 +9,7 @@ import type { Post } from "./Post";
9
9
  export type ModRemoveCommentView = {
10
10
  mod_remove_comment: ModRemoveComment;
11
11
  moderator?: Person;
12
- modded_person: Person;
12
+ other_person: Person;
13
13
  comment: Comment;
14
14
  post: Post;
15
15
  community: Community;
@@ -10,5 +10,5 @@ export type ModRemoveCommunity = {
10
10
  community_id: CommunityId;
11
11
  reason?: string;
12
12
  removed: boolean;
13
- when_: string;
13
+ published: string;
14
14
  };
@@ -10,5 +10,5 @@ export type ModRemovePost = {
10
10
  post_id: PostId;
11
11
  reason?: string;
12
12
  removed: boolean;
13
- when_: string;
13
+ published: string;
14
14
  };
@@ -8,7 +8,7 @@ import type { Post } from "./Post";
8
8
  export type ModRemovePostView = {
9
9
  mod_remove_post: ModRemovePost;
10
10
  moderator?: Person;
11
- modded_person: Person;
11
+ other_person: Person;
12
12
  post: Post;
13
13
  community: Community;
14
14
  };
@@ -9,5 +9,5 @@ export type ModTransferCommunity = {
9
9
  mod_person_id: PersonId;
10
10
  other_person_id: PersonId;
11
11
  community_id: CommunityId;
12
- when_: string;
12
+ published: string;
13
13
  };
@@ -8,5 +8,5 @@ export type ModTransferCommunityView = {
8
8
  mod_transfer_community: ModTransferCommunity;
9
9
  moderator?: Person;
10
10
  community: Community;
11
- modded_person: Person;
11
+ other_person: Person;
12
12
  };
@@ -1,4 +1,5 @@
1
1
  import type { CommentReportView } from "./CommentReportView";
2
+ import type { CommunityReportView } from "./CommunityReportView";
2
3
  import type { PostReportView } from "./PostReportView";
3
4
  import type { PrivateMessageReportView } from "./PrivateMessageReportView";
4
5
  export type ReportCombinedView = ({
@@ -7,4 +8,6 @@ export type ReportCombinedView = ({
7
8
  type_: "Comment";
8
9
  } & CommentReportView) | ({
9
10
  type_: "PrivateMessage";
10
- } & PrivateMessageReportView);
11
+ } & PrivateMessageReportView) | ({
12
+ type_: "Community";
13
+ } & CommunityReportView);
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.20.0-modlog-combined.0",
4
+ "version": "0.20.0-modlog-combined.1",
5
5
  "author": "Dessalines <tyhou13@gmx.com>",
6
6
  "license": "AGPL-3.0",
7
7
  "main": "./dist/index.js",