lemmy-js-client 0.20.0-instance-blocks.4 → 0.20.0-modlog-combined.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (142) hide show
  1. package/dist/http.d.ts +164 -60
  2. package/dist/http.js +261 -114
  3. package/dist/index.d.ts +39 -9
  4. package/dist/other_types.d.ts +1 -18
  5. package/dist/other_types.js +1 -1
  6. package/dist/types/AdminAllowInstance.d.ts +3 -2
  7. package/dist/types/AdminAllowInstanceId.d.ts +1 -0
  8. package/dist/types/AdminAllowInstanceParams.d.ts +1 -2
  9. package/dist/types/AdminAllowInstanceParams.js +1 -0
  10. package/dist/types/AdminAllowInstanceView.d.ts +1 -1
  11. package/dist/types/AdminBlockInstance.d.ts +3 -2
  12. package/dist/types/AdminBlockInstanceId.d.ts +1 -0
  13. package/dist/types/AdminBlockInstanceId.js +3 -0
  14. package/dist/types/AdminBlockInstanceParams.d.ts +1 -2
  15. package/dist/types/AdminBlockInstanceParams.js +1 -0
  16. package/dist/types/AdminPurgeComment.d.ts +2 -1
  17. package/dist/types/AdminPurgeCommentId.d.ts +1 -0
  18. package/dist/types/AdminPurgeCommentId.js +3 -0
  19. package/dist/types/AdminPurgeCommunity.d.ts +2 -1
  20. package/dist/types/AdminPurgeCommunityId.d.ts +1 -0
  21. package/dist/types/AdminPurgeCommunityId.js +3 -0
  22. package/dist/types/AdminPurgePerson.d.ts +2 -1
  23. package/dist/types/AdminPurgePersonId.d.ts +1 -0
  24. package/dist/types/AdminPurgePersonId.js +3 -0
  25. package/dist/types/AdminPurgePost.d.ts +2 -1
  26. package/dist/types/AdminPurgePostId.d.ts +1 -0
  27. package/dist/types/AdminPurgePostId.js +3 -0
  28. package/dist/types/AuthenticateWithOauth.d.ts +1 -0
  29. package/dist/types/CommentAggregates.d.ts +2 -0
  30. package/dist/types/CreateOAuthProvider.d.ts +1 -0
  31. package/dist/types/CreatePost.d.ts +2 -0
  32. package/dist/types/CreateSite.d.ts +0 -2
  33. package/dist/types/DeleteImageParams.d.ts +4 -0
  34. package/dist/types/DeleteImageParams.js +3 -0
  35. package/dist/types/EditCommunity.d.ts +0 -8
  36. package/dist/types/EditOAuthProvider.d.ts +1 -0
  37. package/dist/types/EditPost.d.ts +2 -0
  38. package/dist/types/EditSite.d.ts +0 -8
  39. package/dist/types/GetComments.d.ts +0 -1
  40. package/dist/types/GetModlog.d.ts +4 -3
  41. package/dist/types/GetModlogResponse.d.ts +2 -34
  42. package/dist/types/GetPersonDetails.d.ts +0 -7
  43. package/dist/types/GetPersonDetailsResponse.d.ts +0 -4
  44. package/dist/types/GetPosts.d.ts +2 -0
  45. package/dist/types/GetReportCountResponse.d.ts +1 -5
  46. package/dist/types/GetReportCountResponse.js +1 -0
  47. package/dist/types/GetSiteResponse.d.ts +1 -10
  48. package/dist/types/ImageGetParams.d.ts +4 -0
  49. package/dist/types/ImageGetParams.js +3 -0
  50. package/dist/types/ImageProxyParams.d.ts +5 -0
  51. package/dist/types/ImageProxyParams.js +3 -0
  52. package/dist/types/LemmyErrorType.d.ts +6 -2
  53. package/dist/types/ListPersonContent.d.ts +18 -0
  54. package/dist/types/ListPersonContentResponse.d.ts +7 -0
  55. package/dist/types/ListPersonSaved.d.ts +10 -0
  56. package/dist/types/ListPersonSavedResponse.d.ts +7 -0
  57. package/dist/types/{ListPostReports.d.ts → ListReports.d.ts} +5 -6
  58. package/dist/types/ListReportsResponse.d.ts +7 -0
  59. package/dist/types/ModAdd.d.ts +2 -1
  60. package/dist/types/ModAddCommunity.d.ts +2 -1
  61. package/dist/types/ModAddCommunityId.d.ts +1 -0
  62. package/dist/types/ModAddCommunityId.js +3 -0
  63. package/dist/types/ModAddId.d.ts +1 -0
  64. package/dist/types/ModAddId.js +3 -0
  65. package/dist/types/ModBan.d.ts +2 -1
  66. package/dist/types/ModBanFromCommunity.d.ts +2 -1
  67. package/dist/types/ModBanFromCommunityId.d.ts +1 -0
  68. package/dist/types/ModBanFromCommunityId.js +3 -0
  69. package/dist/types/ModBanFromCommunityView.d.ts +1 -1
  70. package/dist/types/ModBanId.d.ts +1 -0
  71. package/dist/types/ModBanId.js +3 -0
  72. package/dist/types/ModBanView.d.ts +1 -1
  73. package/dist/types/ModFeaturePost.d.ts +2 -1
  74. package/dist/types/ModFeaturePostId.d.ts +1 -0
  75. package/dist/types/ModFeaturePostId.js +3 -0
  76. package/dist/types/ModFeaturePostView.d.ts +1 -0
  77. package/dist/types/ModHideCommunity.d.ts +2 -1
  78. package/dist/types/ModHideCommunityId.d.ts +1 -0
  79. package/dist/types/ModHideCommunityId.js +3 -0
  80. package/dist/types/ModLockPost.d.ts +2 -1
  81. package/dist/types/ModLockPostId.d.ts +1 -0
  82. package/dist/types/ModLockPostId.js +3 -0
  83. package/dist/types/ModLockPostView.d.ts +1 -0
  84. package/dist/types/ModRemoveComment.d.ts +2 -1
  85. package/dist/types/ModRemoveCommentId.d.ts +1 -0
  86. package/dist/types/ModRemoveCommentId.js +3 -0
  87. package/dist/types/ModRemoveCommentView.d.ts +1 -1
  88. package/dist/types/ModRemoveCommunity.d.ts +2 -1
  89. package/dist/types/ModRemoveCommunityId.d.ts +1 -0
  90. package/dist/types/ModRemoveCommunityId.js +3 -0
  91. package/dist/types/ModRemovePost.d.ts +2 -1
  92. package/dist/types/ModRemovePostId.d.ts +1 -0
  93. package/dist/types/ModRemovePostId.js +3 -0
  94. package/dist/types/ModRemovePostView.d.ts +1 -0
  95. package/dist/types/ModTransferCommunity.d.ts +2 -1
  96. package/dist/types/ModTransferCommunityId.d.ts +1 -0
  97. package/dist/types/ModTransferCommunityId.js +3 -0
  98. package/dist/types/ModlogCombinedPaginationCursor.d.ts +4 -0
  99. package/dist/types/ModlogCombinedPaginationCursor.js +3 -0
  100. package/dist/types/ModlogCombinedView.d.ts +52 -0
  101. package/dist/types/OAuthProvider.d.ts +4 -0
  102. package/dist/types/PersonContentCombinedPaginationCursor.d.ts +4 -0
  103. package/dist/types/PersonContentCombinedPaginationCursor.js +3 -0
  104. package/dist/types/PersonContentCombinedView.d.ts +7 -0
  105. package/dist/types/PersonContentCombinedView.js +2 -0
  106. package/dist/types/PersonContentType.d.ts +4 -0
  107. package/dist/types/PersonContentType.js +3 -0
  108. package/dist/types/PersonSavedCombinedPaginationCursor.d.ts +4 -0
  109. package/dist/types/PersonSavedCombinedPaginationCursor.js +3 -0
  110. package/dist/types/PostAggregates.d.ts +2 -0
  111. package/dist/types/PostTags.d.ts +7 -0
  112. package/dist/types/PostTags.js +2 -0
  113. package/dist/types/PostView.d.ts +2 -0
  114. package/dist/types/ReportCombinedPaginationCursor.d.ts +4 -0
  115. package/dist/types/ReportCombinedPaginationCursor.js +3 -0
  116. package/dist/types/ReportCombinedView.d.ts +10 -0
  117. package/dist/types/ReportCombinedView.js +2 -0
  118. package/dist/types/SaveUserSettings.d.ts +0 -8
  119. package/dist/types/Search.d.ts +0 -1
  120. package/dist/types/SiteResponse.d.ts +1 -1
  121. package/dist/types/Tag.d.ts +27 -0
  122. package/dist/types/Tag.js +2 -0
  123. package/dist/types/TagId.d.ts +4 -0
  124. package/dist/types/TagId.js +3 -0
  125. package/dist/types/UploadImageResponse.d.ts +5 -0
  126. package/dist/types/UploadImageResponse.js +3 -0
  127. package/package.json +3 -3
  128. package/dist/types/InstanceIdOrDomain.d.ts +0 -6
  129. package/dist/types/ListCommentReports.d.ts +0 -18
  130. package/dist/types/ListCommentReportsResponse.d.ts +0 -7
  131. package/dist/types/ListPostReportsResponse.d.ts +0 -7
  132. package/dist/types/ListPrivateMessageReports.d.ts +0 -11
  133. package/dist/types/ListPrivateMessageReportsResponse.d.ts +0 -7
  134. package/dist/types/ModlogListParams.d.ts +0 -17
  135. /package/dist/types/{ListPrivateMessageReports.js → AdminAllowInstanceId.js} +0 -0
  136. /package/dist/types/{InstanceIdOrDomain.js → ListPersonContent.js} +0 -0
  137. /package/dist/types/{ListCommentReports.js → ListPersonContentResponse.js} +0 -0
  138. /package/dist/types/{ListCommentReportsResponse.js → ListPersonSaved.js} +0 -0
  139. /package/dist/types/{ListPostReports.js → ListPersonSavedResponse.js} +0 -0
  140. /package/dist/types/{ListPostReportsResponse.js → ListReports.js} +0 -0
  141. /package/dist/types/{ListPrivateMessageReportsResponse.js → ListReportsResponse.js} +0 -0
  142. /package/dist/types/{ModlogListParams.js → ModlogCombinedView.js} +0 -0
@@ -1,7 +1,6 @@
1
1
  import type { Language } from "./Language";
2
2
  import type { LanguageId } from "./LanguageId";
3
3
  import type { LocalSiteUrlBlocklist } from "./LocalSiteUrlBlocklist";
4
- import type { MyUserInfo } from "./MyUserInfo";
5
4
  import type { OAuthProvider } from "./OAuthProvider";
6
5
  import type { PersonView } from "./PersonView";
7
6
  import type { PublicOAuthProvider } from "./PublicOAuthProvider";
@@ -14,17 +13,8 @@ export type GetSiteResponse = {
14
13
  site_view: SiteView;
15
14
  admins: Array<PersonView>;
16
15
  version: string;
17
- my_user?: MyUserInfo;
18
16
  all_languages: Array<Language>;
19
17
  discussion_languages: Array<LanguageId>;
20
- /**
21
- * deprecated, use field `tagline` or /api/v3/tagline/list
22
- */
23
- taglines: Array<null>;
24
- /**
25
- * deprecated, use /api/v3/custom_emoji/list
26
- */
27
- custom_emojis: Array<null>;
28
18
  /**
29
19
  * If the site has any taglines, a random one is included here for displaying
30
20
  */
@@ -35,4 +25,5 @@ export type GetSiteResponse = {
35
25
  oauth_providers?: Array<PublicOAuthProvider>;
36
26
  admin_oauth_providers?: Array<OAuthProvider>;
37
27
  blocked_urls: Array<LocalSiteUrlBlocklist>;
28
+ image_upload_disabled: boolean;
38
29
  };
@@ -0,0 +1,4 @@
1
+ export type ImageGetParams = {
2
+ file_type?: string;
3
+ max_size?: 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,5 @@
1
+ export type ImageProxyParams = {
2
+ url: string;
3
+ file_type?: string;
4
+ max_size?: number;
5
+ };
@@ -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 });
@@ -41,6 +41,10 @@ export type LemmyErrorType = {
41
41
  error: "no_content_type_header";
42
42
  } | {
43
43
  error: "not_an_image_type";
44
+ } | {
45
+ error: "invalid_image_upload";
46
+ } | {
47
+ error: "image_upload_disabled";
44
48
  } | {
45
49
  error: "not_a_mod_or_admin";
46
50
  } | {
@@ -130,6 +134,8 @@ export type LemmyErrorType = {
130
134
  error: "rate_limit_error";
131
135
  } | {
132
136
  error: "invalid_name";
137
+ } | {
138
+ error: "invalid_code_verifier";
133
139
  } | {
134
140
  error: "invalid_display_name";
135
141
  } | {
@@ -202,8 +208,6 @@ export type LemmyErrorType = {
202
208
  error: "couldnt_set_all_registrations_accepted";
203
209
  } | {
204
210
  error: "couldnt_set_all_email_verified";
205
- } | {
206
- error: "banned";
207
211
  } | {
208
212
  error: "blocked_url";
209
213
  } | {
@@ -0,0 +1,18 @@
1
+ import type { PersonContentCombinedPaginationCursor } from "./PersonContentCombinedPaginationCursor";
2
+ import type { PersonContentType } from "./PersonContentType";
3
+ import type { PersonId } from "./PersonId";
4
+ /**
5
+ * Gets a person's content (posts and comments)
6
+ *
7
+ * Either person_id, or username are required.
8
+ */
9
+ export type ListPersonContent = {
10
+ type_?: PersonContentType;
11
+ person_id?: PersonId;
12
+ /**
13
+ * Example: dessalines , or dessalines@xyz.tld
14
+ */
15
+ username?: string;
16
+ page_cursor?: PersonContentCombinedPaginationCursor;
17
+ page_back?: boolean;
18
+ };
@@ -0,0 +1,7 @@
1
+ import type { PersonContentCombinedView } from "./PersonContentCombinedView";
2
+ /**
3
+ * A person's content response.
4
+ */
5
+ export type ListPersonContentResponse = {
6
+ content: Array<PersonContentCombinedView>;
7
+ };
@@ -0,0 +1,10 @@
1
+ import type { PersonContentType } from "./PersonContentType";
2
+ import type { PersonSavedCombinedPaginationCursor } from "./PersonSavedCombinedPaginationCursor";
3
+ /**
4
+ * Gets your saved posts and comments
5
+ */
6
+ export type ListPersonSaved = {
7
+ type_?: PersonContentType;
8
+ page_cursor?: PersonSavedCombinedPaginationCursor;
9
+ page_back?: boolean;
10
+ };
@@ -0,0 +1,7 @@
1
+ import type { PersonContentCombinedView } from "./PersonContentCombinedView";
2
+ /**
3
+ * A person's saved content response.
4
+ */
5
+ export type ListPersonSavedResponse = {
6
+ saved: Array<PersonContentCombinedView>;
7
+ };
@@ -1,11 +1,9 @@
1
1
  import type { CommunityId } from "./CommunityId";
2
- import type { PostId } from "./PostId";
2
+ import type { ReportCombinedPaginationCursor } from "./ReportCombinedPaginationCursor";
3
3
  /**
4
- * List post reports.
4
+ * List reports.
5
5
  */
6
- export type ListPostReports = {
7
- page?: number;
8
- limit?: number;
6
+ export type ListReports = {
9
7
  /**
10
8
  * Only shows the unresolved reports
11
9
  */
@@ -14,5 +12,6 @@ export type ListPostReports = {
14
12
  * if no community is given, it returns reports for all communities moderated by the auth user
15
13
  */
16
14
  community_id?: CommunityId;
17
- post_id?: PostId;
15
+ page_cursor?: ReportCombinedPaginationCursor;
16
+ page_back?: boolean;
18
17
  };
@@ -0,0 +1,7 @@
1
+ import type { ReportCombinedView } from "./ReportCombinedView";
2
+ /**
3
+ * The post reports response.
4
+ */
5
+ export type ListReportsResponse = {
6
+ reports: Array<ReportCombinedView>;
7
+ };
@@ -1,9 +1,10 @@
1
+ import type { ModAddId } from "./ModAddId";
1
2
  import type { PersonId } from "./PersonId";
2
3
  /**
3
4
  * When someone is added as a site moderator.
4
5
  */
5
6
  export type ModAdd = {
6
- id: number;
7
+ id: ModAddId;
7
8
  mod_person_id: PersonId;
8
9
  other_person_id: PersonId;
9
10
  removed: boolean;
@@ -1,10 +1,11 @@
1
1
  import type { CommunityId } from "./CommunityId";
2
+ import type { ModAddCommunityId } from "./ModAddCommunityId";
2
3
  import type { PersonId } from "./PersonId";
3
4
  /**
4
5
  * When someone is added as a community moderator.
5
6
  */
6
7
  export type ModAddCommunity = {
7
- id: number;
8
+ id: ModAddCommunityId;
8
9
  mod_person_id: PersonId;
9
10
  other_person_id: PersonId;
10
11
  community_id: CommunityId;
@@ -0,0 +1 @@
1
+ export type ModAddCommunityId = 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 @@
1
+ export type ModAddId = 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 });
@@ -1,9 +1,10 @@
1
+ import type { ModBanId } from "./ModBanId";
1
2
  import type { PersonId } from "./PersonId";
2
3
  /**
3
4
  * When someone is banned from the site.
4
5
  */
5
6
  export type ModBan = {
6
- id: number;
7
+ id: ModBanId;
7
8
  mod_person_id: PersonId;
8
9
  other_person_id: PersonId;
9
10
  reason?: string;
@@ -1,10 +1,11 @@
1
1
  import type { CommunityId } from "./CommunityId";
2
+ import type { ModBanFromCommunityId } from "./ModBanFromCommunityId";
2
3
  import type { PersonId } from "./PersonId";
3
4
  /**
4
5
  * When someone is banned from a community.
5
6
  */
6
7
  export type ModBanFromCommunity = {
7
- id: number;
8
+ id: ModBanFromCommunityId;
8
9
  mod_person_id: PersonId;
9
10
  other_person_id: PersonId;
10
11
  community_id: CommunityId;
@@ -0,0 +1 @@
1
+ export type ModBanFromCommunityId = 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 });
@@ -8,5 +8,5 @@ export type ModBanFromCommunityView = {
8
8
  mod_ban_from_community: ModBanFromCommunity;
9
9
  moderator?: Person;
10
10
  community: Community;
11
- banned_person: Person;
11
+ modded_person: Person;
12
12
  };
@@ -0,0 +1 @@
1
+ export type ModBanId = 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 });
@@ -6,5 +6,5 @@ import type { Person } from "./Person";
6
6
  export type ModBanView = {
7
7
  mod_ban: ModBan;
8
8
  moderator?: Person;
9
- banned_person: Person;
9
+ modded_person: Person;
10
10
  };
@@ -1,10 +1,11 @@
1
+ import type { ModFeaturePostId } from "./ModFeaturePostId";
1
2
  import type { PersonId } from "./PersonId";
2
3
  import type { PostId } from "./PostId";
3
4
  /**
4
5
  * When a moderator features a post on a community (pins it to the top).
5
6
  */
6
7
  export type ModFeaturePost = {
7
- id: number;
8
+ id: ModFeaturePostId;
8
9
  mod_person_id: PersonId;
9
10
  post_id: PostId;
10
11
  featured: boolean;
@@ -0,0 +1 @@
1
+ export type ModFeaturePostId = 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 });
@@ -8,6 +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
12
  post: Post;
12
13
  community: Community;
13
14
  };
@@ -1,10 +1,11 @@
1
1
  import type { CommunityId } from "./CommunityId";
2
+ import type { ModHideCommunityId } from "./ModHideCommunityId";
2
3
  import type { PersonId } from "./PersonId";
3
4
  /**
4
5
  * When a community is hidden from public view.
5
6
  */
6
7
  export type ModHideCommunity = {
7
- id: number;
8
+ id: ModHideCommunityId;
8
9
  community_id: CommunityId;
9
10
  mod_person_id: PersonId;
10
11
  when_: string;
@@ -0,0 +1 @@
1
+ export type ModHideCommunityId = 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 });
@@ -1,10 +1,11 @@
1
+ import type { ModLockPostId } from "./ModLockPostId";
1
2
  import type { PersonId } from "./PersonId";
2
3
  import type { PostId } from "./PostId";
3
4
  /**
4
5
  * When a moderator locks a post (prevents new comments being made).
5
6
  */
6
7
  export type ModLockPost = {
7
- id: number;
8
+ id: ModLockPostId;
8
9
  mod_person_id: PersonId;
9
10
  post_id: PostId;
10
11
  locked: boolean;
@@ -0,0 +1 @@
1
+ export type ModLockPostId = 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 });
@@ -8,6 +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
12
  post: Post;
12
13
  community: Community;
13
14
  };
@@ -1,10 +1,11 @@
1
1
  import type { CommentId } from "./CommentId";
2
+ import type { ModRemoveCommentId } from "./ModRemoveCommentId";
2
3
  import type { PersonId } from "./PersonId";
3
4
  /**
4
5
  * When a moderator removes a comment.
5
6
  */
6
7
  export type ModRemoveComment = {
7
- id: number;
8
+ id: ModRemoveCommentId;
8
9
  mod_person_id: PersonId;
9
10
  comment_id: CommentId;
10
11
  reason?: string;
@@ -0,0 +1 @@
1
+ export type ModRemoveCommentId = 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 });
@@ -9,8 +9,8 @@ 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
13
  comment: Comment;
13
- commenter: Person;
14
14
  post: Post;
15
15
  community: Community;
16
16
  };
@@ -1,10 +1,11 @@
1
1
  import type { CommunityId } from "./CommunityId";
2
+ import type { ModRemoveCommunityId } from "./ModRemoveCommunityId";
2
3
  import type { PersonId } from "./PersonId";
3
4
  /**
4
5
  * When a moderator removes a community.
5
6
  */
6
7
  export type ModRemoveCommunity = {
7
- id: number;
8
+ id: ModRemoveCommunityId;
8
9
  mod_person_id: PersonId;
9
10
  community_id: CommunityId;
10
11
  reason?: string;
@@ -0,0 +1 @@
1
+ export type ModRemoveCommunityId = 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 });
@@ -1,10 +1,11 @@
1
+ import type { ModRemovePostId } from "./ModRemovePostId";
1
2
  import type { PersonId } from "./PersonId";
2
3
  import type { PostId } from "./PostId";
3
4
  /**
4
5
  * When a moderator removes a post.
5
6
  */
6
7
  export type ModRemovePost = {
7
- id: number;
8
+ id: ModRemovePostId;
8
9
  mod_person_id: PersonId;
9
10
  post_id: PostId;
10
11
  reason?: string;
@@ -0,0 +1 @@
1
+ export type ModRemovePostId = 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 });
@@ -8,6 +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
12
  post: Post;
12
13
  community: Community;
13
14
  };
@@ -1,10 +1,11 @@
1
1
  import type { CommunityId } from "./CommunityId";
2
+ import type { ModTransferCommunityId } from "./ModTransferCommunityId";
2
3
  import type { PersonId } from "./PersonId";
3
4
  /**
4
5
  * When a moderator transfers a community to a new owner.
5
6
  */
6
7
  export type ModTransferCommunity = {
7
- id: number;
8
+ id: ModTransferCommunityId;
8
9
  mod_person_id: PersonId;
9
10
  other_person_id: PersonId;
10
11
  community_id: CommunityId;
@@ -0,0 +1 @@
1
+ export type ModTransferCommunityId = 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,4 @@
1
+ /**
2
+ * like PaginationCursor but for the modlog_combined
3
+ */
4
+ export type ModlogCombinedPaginationCursor = string;
@@ -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,52 @@
1
+ import type { AdminAllowInstanceView } from "./AdminAllowInstanceView";
2
+ import type { AdminBlockInstanceView } from "./AdminBlockInstanceView";
3
+ import type { AdminPurgeCommentView } from "./AdminPurgeCommentView";
4
+ import type { AdminPurgeCommunityView } from "./AdminPurgeCommunityView";
5
+ import type { AdminPurgePersonView } from "./AdminPurgePersonView";
6
+ import type { AdminPurgePostView } from "./AdminPurgePostView";
7
+ import type { ModAddCommunityView } from "./ModAddCommunityView";
8
+ import type { ModAddView } from "./ModAddView";
9
+ import type { ModBanFromCommunityView } from "./ModBanFromCommunityView";
10
+ import type { ModBanView } from "./ModBanView";
11
+ import type { ModFeaturePostView } from "./ModFeaturePostView";
12
+ import type { ModHideCommunityView } from "./ModHideCommunityView";
13
+ import type { ModLockPostView } from "./ModLockPostView";
14
+ import type { ModRemoveCommentView } from "./ModRemoveCommentView";
15
+ import type { ModRemoveCommunityView } from "./ModRemoveCommunityView";
16
+ import type { ModRemovePostView } from "./ModRemovePostView";
17
+ import type { ModTransferCommunityView } from "./ModTransferCommunityView";
18
+ export type ModlogCombinedView = ({
19
+ type_: "AdminAllowInstance";
20
+ } & AdminAllowInstanceView) | ({
21
+ type_: "AdminBlockInstance";
22
+ } & AdminBlockInstanceView) | ({
23
+ type_: "AdminPurgeComment";
24
+ } & AdminPurgeCommentView) | ({
25
+ type_: "AdminPurgeCommunity";
26
+ } & AdminPurgeCommunityView) | ({
27
+ type_: "AdminPurgePerson";
28
+ } & AdminPurgePersonView) | ({
29
+ type_: "AdminPurgePost";
30
+ } & AdminPurgePostView) | ({
31
+ type_: "ModAdd";
32
+ } & ModAddView) | ({
33
+ type_: "ModAddCommunity";
34
+ } & ModAddCommunityView) | ({
35
+ type_: "ModBan";
36
+ } & ModBanView) | ({
37
+ type_: "ModBanFromCommunity";
38
+ } & ModBanFromCommunityView) | ({
39
+ type_: "ModFeaturePost";
40
+ } & ModFeaturePostView) | ({
41
+ type_: "ModHideCommunity";
42
+ } & ModHideCommunityView) | ({
43
+ type_: "ModLockPost";
44
+ } & ModLockPostView) | ({
45
+ type_: "ModRemoveComment";
46
+ } & ModRemoveCommentView) | ({
47
+ type_: "ModRemoveCommunity";
48
+ } & ModRemoveCommunityView) | ({
49
+ type_: "ModRemovePost";
50
+ } & ModRemovePostView) | ({
51
+ type_: "ModTransferCommunity";
52
+ } & ModTransferCommunityView);
@@ -56,4 +56,8 @@ export type OAuthProvider = {
56
56
  enabled: boolean;
57
57
  published: string;
58
58
  updated?: string;
59
+ /**
60
+ * switch to enable or disable PKCE
61
+ */
62
+ use_pkce: boolean;
59
63
  };
@@ -0,0 +1,4 @@
1
+ /**
2
+ * like PaginationCursor but for the person_content_combined table
3
+ */
4
+ export type PersonContentCombinedPaginationCursor = string;
@@ -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,7 @@
1
+ import type { CommentView } from "./CommentView";
2
+ import type { PostView } from "./PostView";
3
+ export type PersonContentCombinedView = ({
4
+ type_: "Post";
5
+ } & PostView) | ({
6
+ type_: "Comment";
7
+ } & CommentView);
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,4 @@
1
+ /**
2
+ * A list of possible types for the various modlog actions.
3
+ */
4
+ export type PersonContentType = "All" | "Comments" | "Posts";
@@ -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
+ /**
2
+ * like PaginationCursor but for the person_saved_combined table
3
+ */
4
+ export type PersonSavedCombinedPaginationCursor = string;
@@ -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 });
@@ -13,4 +13,6 @@ export type PostAggregates = {
13
13
  * The time of the newest comment in the post.
14
14
  */
15
15
  newest_comment_time: string;
16
+ report_count: number;
17
+ unresolved_report_count: number;
16
18
  };
@@ -0,0 +1,7 @@
1
+ import type { Tag } from "./Tag";
2
+ /**
3
+ * we wrap this in a struct so we can implement FromSqlRow<Json> for it
4
+ */
5
+ export type PostTags = {
6
+ tags: Array<Tag>;
7
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -3,6 +3,7 @@ import type { ImageDetails } from "./ImageDetails";
3
3
  import type { Person } from "./Person";
4
4
  import type { Post } from "./Post";
5
5
  import type { PostAggregates } from "./PostAggregates";
6
+ import type { PostTags } from "./PostTags";
6
7
  import type { SubscribedType } from "./SubscribedType";
7
8
  /**
8
9
  * A post view.
@@ -24,4 +25,5 @@ export type PostView = {
24
25
  creator_blocked: boolean;
25
26
  my_vote?: number;
26
27
  unread_comments: number;
28
+ tags: PostTags;
27
29
  };
@@ -0,0 +1,4 @@
1
+ /**
2
+ * like PaginationCursor but for the report_combined table
3
+ */
4
+ export type ReportCombinedPaginationCursor = string;