lemmy-js-client 1.0.0-name-and-message.1 → 1.0.0-post-notifications.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.
Files changed (152) hide show
  1. package/dist/http.d.ts +36 -22
  2. package/dist/http.js +109 -51
  3. package/dist/index.d.ts +29 -8
  4. package/dist/other_types.d.ts +9 -0
  5. package/dist/types/AdminAllowInstance.d.ts +1 -1
  6. package/dist/types/AdminBlockInstance.d.ts +2 -2
  7. package/dist/types/AdminBlockInstanceParams.d.ts +1 -1
  8. package/dist/types/AdminPurgeComment.d.ts +1 -1
  9. package/dist/types/AdminPurgeCommunity.d.ts +1 -1
  10. package/dist/types/AdminPurgePerson.d.ts +1 -1
  11. package/dist/types/AdminPurgePost.d.ts +1 -1
  12. package/dist/types/BanFromCommunity.d.ts +1 -1
  13. package/dist/types/BanPerson.d.ts +1 -1
  14. package/dist/types/Comment.d.ts +2 -2
  15. package/dist/types/CommentActions.d.ts +2 -6
  16. package/dist/types/CommentActions.js +1 -0
  17. package/dist/types/CommentReply.d.ts +1 -1
  18. package/dist/types/CommentReport.d.ts +2 -2
  19. package/dist/types/CommentReportView.d.ts +0 -1
  20. package/dist/types/CommentResponse.d.ts +0 -2
  21. package/dist/types/CommentSlimView.d.ts +2 -4
  22. package/dist/types/CommentView.d.ts +2 -3
  23. package/dist/types/Community.d.ts +2 -2
  24. package/dist/types/CommunityActions.d.ts +5 -13
  25. package/dist/types/CommunityReport.d.ts +2 -2
  26. package/dist/types/CreateMultiCommunity.d.ts +5 -0
  27. package/dist/types/CreateMultiCommunity.js +3 -0
  28. package/dist/types/CreateOrDeleteMultiCommunityEntry.d.ts +6 -0
  29. package/dist/types/CreatePost.d.ts +1 -1
  30. package/dist/types/CreateSite.d.ts +16 -13
  31. package/dist/types/CustomEmoji.d.ts +2 -2
  32. package/dist/types/EditPost.d.ts +1 -1
  33. package/dist/types/EditSite.d.ts +22 -16
  34. package/dist/types/ExportDataResponse.d.ts +13 -0
  35. package/dist/types/FederationBlockList.d.ts +3 -3
  36. package/dist/types/FollowMultiCommunity.d.ts +5 -0
  37. package/dist/types/GetComments.d.ts +0 -2
  38. package/dist/types/GetMultiCommunity.d.ts +4 -0
  39. package/dist/types/GetMultiCommunityResponse.d.ts +6 -0
  40. package/dist/types/GetPosts.d.ts +2 -2
  41. package/dist/types/InboxDataType.d.ts +1 -1
  42. package/dist/types/Instance.d.ts +2 -2
  43. package/dist/types/InstanceActions.d.ts +3 -7
  44. package/dist/types/InstanceActions.js +1 -0
  45. package/dist/types/InstanceWithFederationState.d.ts +2 -2
  46. package/dist/types/LemmyErrorType.d.ts +10 -14
  47. package/dist/types/LikeType.d.ts +4 -0
  48. package/dist/types/LikeType.js +3 -0
  49. package/dist/types/ListInboxResponse.d.ts +2 -2
  50. package/dist/types/ListMultiCommunities.d.ts +5 -0
  51. package/dist/types/ListMultiCommunitiesResponse.d.ts +4 -0
  52. package/dist/types/ListPersonLiked.d.ts +13 -0
  53. package/dist/types/ListPersonLikedResponse.d.ts +13 -0
  54. package/dist/types/ListPersonLikedResponse.js +2 -0
  55. package/dist/types/ListingType.d.ts +1 -1
  56. package/dist/types/LocalImage.d.ts +8 -3
  57. package/dist/types/LocalImageView.d.ts +2 -0
  58. package/dist/types/LocalSite.d.ts +6 -6
  59. package/dist/types/LocalSiteRateLimit.d.ts +16 -16
  60. package/dist/types/LocalSiteUrlBlocklist.d.ts +2 -2
  61. package/dist/types/LocalUser.d.ts +2 -1
  62. package/dist/types/LocalUserView.d.ts +1 -2
  63. package/dist/types/LoginToken.d.ts +1 -1
  64. package/dist/types/MarkNotificationAsRead.d.ts +8 -0
  65. package/dist/types/MarkNotificationAsRead.js +2 -0
  66. package/dist/types/ModAdd.d.ts +1 -1
  67. package/dist/types/ModAddCommunity.d.ts +1 -1
  68. package/dist/types/ModBan.d.ts +2 -2
  69. package/dist/types/ModBanFromCommunity.d.ts +2 -2
  70. package/dist/types/ModChangeCommunityVisibility.d.ts +1 -2
  71. package/dist/types/ModFeaturePost.d.ts +1 -1
  72. package/dist/types/ModLockPost.d.ts +1 -1
  73. package/dist/types/ModRemoveComment.d.ts +1 -1
  74. package/dist/types/ModRemoveCommunity.d.ts +1 -1
  75. package/dist/types/ModRemovePost.d.ts +1 -1
  76. package/dist/types/ModTransferCommunity.d.ts +1 -1
  77. package/dist/types/MultiCommunity.d.ts +17 -0
  78. package/dist/types/MultiCommunity.js +2 -0
  79. package/dist/types/MultiCommunityFollow.d.ts +8 -0
  80. package/dist/types/MultiCommunityFollow.js +2 -0
  81. package/dist/types/MultiCommunityId.d.ts +1 -0
  82. package/dist/types/MultiCommunityId.js +3 -0
  83. package/dist/types/MultiCommunityView.d.ts +6 -0
  84. package/dist/types/MultiCommunityView.js +2 -0
  85. package/dist/types/NotePerson.d.ts +10 -0
  86. package/dist/types/NotePerson.js +2 -0
  87. package/dist/types/Notification.d.ts +14 -0
  88. package/dist/types/Notification.js +2 -0
  89. package/dist/types/NotificationId.d.ts +1 -0
  90. package/dist/types/NotificationId.js +3 -0
  91. package/dist/types/NotificationTypes.d.ts +4 -0
  92. package/dist/types/NotificationTypes.js +3 -0
  93. package/dist/types/{PersonPostMentionView.d.ts → NotificationView.d.ts} +19 -15
  94. package/dist/types/NotificationView.js +2 -0
  95. package/dist/types/NotificationsMode.d.ts +4 -0
  96. package/dist/types/NotificationsMode.js +3 -0
  97. package/dist/types/OAuthAccount.d.ts +2 -2
  98. package/dist/types/OAuthProvider.d.ts +2 -2
  99. package/dist/types/Person.d.ts +2 -2
  100. package/dist/types/PersonActions.d.ts +21 -4
  101. package/dist/types/PersonActions.js +1 -0
  102. package/dist/types/PersonCommentMention.d.ts +1 -1
  103. package/dist/types/PersonLikedCombinedView.d.ts +7 -0
  104. package/dist/types/PersonLikedCombinedView.js +2 -0
  105. package/dist/types/PersonNotification.d.ts +9 -0
  106. package/dist/types/PersonNotification.js +2 -0
  107. package/dist/types/PersonPostMention.d.ts +1 -1
  108. package/dist/types/PersonView.d.ts +2 -3
  109. package/dist/types/Post.d.ts +4 -4
  110. package/dist/types/PostActions.d.ts +7 -9
  111. package/dist/types/PostOrCommentOrPrivateMessage.d.ts +10 -0
  112. package/dist/types/PostOrCommentOrPrivateMessage.js +2 -0
  113. package/dist/types/PostReport.d.ts +2 -2
  114. package/dist/types/PostReportView.d.ts +0 -1
  115. package/dist/types/PostView.d.ts +2 -3
  116. package/dist/types/PrivateMessage.d.ts +2 -2
  117. package/dist/types/PrivateMessageReport.d.ts +2 -2
  118. package/dist/types/ReadableFederationState.d.ts +2 -2
  119. package/dist/types/RegistrationApplication.d.ts +1 -1
  120. package/dist/types/SaveUserSettings.d.ts +4 -0
  121. package/dist/types/Search.d.ts +5 -1
  122. package/dist/types/SearchCombinedView.d.ts +4 -1
  123. package/dist/types/SearchType.d.ts +1 -1
  124. package/dist/types/Site.d.ts +2 -2
  125. package/dist/types/SiteResponse.d.ts +0 -4
  126. package/dist/types/Tag.d.ts +2 -2
  127. package/dist/types/Tagline.d.ts +2 -2
  128. package/dist/types/UpdateCommunityNotifications.d.ts +9 -0
  129. package/dist/types/UpdateCommunityNotifications.js +2 -0
  130. package/dist/types/UpdateMultiCommunity.d.ts +7 -0
  131. package/dist/types/UpdateMultiCommunity.js +2 -0
  132. package/dist/types/UpdatePostNotifications.d.ts +9 -0
  133. package/dist/types/UpdatePostNotifications.js +2 -0
  134. package/dist/types/UserSettingsBackup.d.ts +26 -0
  135. package/dist/types/UserSettingsBackup.js +2 -0
  136. package/dist/types/VoteView.d.ts +0 -1
  137. package/package.json +2 -2
  138. package/dist/types/CommentReplyView.d.ts +0 -32
  139. package/dist/types/InboxCombinedView.d.ts +0 -13
  140. package/dist/types/MarkCommentReplyAsRead.d.ts +0 -8
  141. package/dist/types/MarkPersonCommentMentionAsRead.d.ts +0 -8
  142. package/dist/types/MarkPersonPostMentionAsRead.d.ts +0 -8
  143. package/dist/types/PersonCommentMentionView.d.ts +0 -30
  144. package/dist/types/ResolveObjectResponse.d.ts +0 -13
  145. /package/dist/types/{CommentReplyView.js → CreateOrDeleteMultiCommunityEntry.js} +0 -0
  146. /package/dist/types/{InboxCombinedView.js → ExportDataResponse.js} +0 -0
  147. /package/dist/types/{MarkCommentReplyAsRead.js → FollowMultiCommunity.js} +0 -0
  148. /package/dist/types/{MarkPersonCommentMentionAsRead.js → GetMultiCommunity.js} +0 -0
  149. /package/dist/types/{MarkPersonPostMentionAsRead.js → GetMultiCommunityResponse.js} +0 -0
  150. /package/dist/types/{PersonCommentMentionView.js → ListMultiCommunities.js} +0 -0
  151. /package/dist/types/{PersonPostMentionView.js → ListMultiCommunitiesResponse.js} +0 -0
  152. /package/dist/types/{ResolveObjectResponse.js → ListPersonLiked.js} +0 -0
@@ -1,6 +1,11 @@
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
- published: string;
5
+ published_at: string;
6
+ person_id?: PersonId;
7
+ /**
8
+ * This means the image is an auto-generated thumbnail, for a post.
9
+ */
10
+ thumbnail_for_post_id?: PostId;
6
11
  };
@@ -1,9 +1,11 @@
1
1
  import type { LocalImage } from "./LocalImage";
2
2
  import type { Person } from "./Person";
3
+ import type { Post } from "./Post";
3
4
  /**
4
5
  * A local image view.
5
6
  */
6
7
  export type LocalImageView = {
7
8
  local_image: LocalImage;
8
9
  person: Person;
10
+ post?: Post;
9
11
  };
@@ -2,6 +2,8 @@ import type { CommentSortType } from "./CommentSortType";
2
2
  import type { FederationMode } from "./FederationMode";
3
3
  import type { ListingType } from "./ListingType";
4
4
  import type { LocalSiteId } from "./LocalSiteId";
5
+ import type { MultiCommunityId } from "./MultiCommunityId";
6
+ import type { PersonId } from "./PersonId";
5
7
  import type { PostListingMode } from "./PostListingMode";
6
8
  import type { PostSortType } from "./PostSortType";
7
9
  import type { RegistrationMode } from "./RegistrationMode";
@@ -41,10 +43,6 @@ export type LocalSite = {
41
43
  * An optional legal disclaimer page.
42
44
  */
43
45
  legal_information?: string;
44
- /**
45
- * Whether to hide mod names on the modlog.
46
- */
47
- hide_modlog_mod_names: boolean;
48
46
  /**
49
47
  * Whether new applications email admins.
50
48
  */
@@ -69,8 +67,8 @@ export type LocalSite = {
69
67
  * The captcha difficulty.
70
68
  */
71
69
  captcha_difficulty: string;
72
- published: string;
73
- updated?: string;
70
+ published_at: string;
71
+ updated_at?: string;
74
72
  registration_mode: RegistrationMode;
75
73
  /**
76
74
  * Whether to email admins on new reports.
@@ -145,4 +143,6 @@ export type LocalSite = {
145
143
  * Dont send email notifications to users for new replies, mentions etc
146
144
  */
147
145
  disable_email_notifications: boolean;
146
+ suggested_communities?: MultiCommunityId;
147
+ multi_comm_follower: PersonId;
148
148
  };
@@ -4,20 +4,20 @@ import type { LocalSiteId } from "./LocalSiteId";
4
4
  */
5
5
  export type LocalSiteRateLimit = {
6
6
  local_site_id: LocalSiteId;
7
- message: number;
8
- message_per_second: number;
9
- post: number;
10
- post_per_second: number;
11
- register: number;
12
- register_per_second: number;
13
- image: number;
14
- image_per_second: number;
15
- comment: number;
16
- comment_per_second: number;
17
- search: number;
18
- search_per_second: number;
19
- published: string;
20
- updated?: string;
21
- import_user_settings: number;
22
- import_user_settings_per_second: number;
7
+ message_max_requests: number;
8
+ message_interval_seconds: number;
9
+ post_max_requests: number;
10
+ post_interval_seconds: number;
11
+ register_max_requests: number;
12
+ register_interval_seconds: number;
13
+ image_max_requests: number;
14
+ image_interval_seconds: number;
15
+ comment_max_requests: number;
16
+ comment_interval_seconds: number;
17
+ search_max_requests: number;
18
+ search_interval_seconds: number;
19
+ published_at: string;
20
+ updated_at?: string;
21
+ import_user_settings_max_requests: number;
22
+ import_user_settings_interval_seconds: number;
23
23
  };
@@ -1,6 +1,6 @@
1
1
  export type LocalSiteUrlBlocklist = {
2
2
  id: number;
3
3
  url: string;
4
- published: string;
5
- updated?: string;
4
+ published_at: string;
5
+ updated_at?: string;
6
6
  };
@@ -89,7 +89,7 @@ export type LocalUser = {
89
89
  * The last time a donation request was shown to this user. If this is more than a year ago,
90
90
  * a new notification request should be shown.
91
91
  */
92
- last_donation_notification: string;
92
+ last_donation_notification_at: string;
93
93
  /**
94
94
  * Whether to hide posts containing images/videos
95
95
  */
@@ -102,4 +102,5 @@ export type LocalUser = {
102
102
  show_upvotes: boolean;
103
103
  show_downvotes: VoteShow;
104
104
  show_upvote_percentage: boolean;
105
+ show_person_votes: boolean;
105
106
  };
@@ -1,4 +1,3 @@
1
- import type { InstanceActions } from "./InstanceActions";
2
1
  import type { LocalUser } from "./LocalUser";
3
2
  import type { Person } from "./Person";
4
3
  /**
@@ -7,5 +6,5 @@ import type { Person } from "./Person";
7
6
  export type LocalUserView = {
8
7
  local_user: LocalUser;
9
8
  person: Person;
10
- instance_actions?: InstanceActions;
9
+ banned: boolean;
11
10
  };
@@ -7,7 +7,7 @@ export type LoginToken = {
7
7
  /**
8
8
  * Time of login
9
9
  */
10
- published: string;
10
+ published_at: string;
11
11
  /**
12
12
  * IP address where login was made from, allows invalidating logins by IP address.
13
13
  * Could be stored in truncated format, or store derived information for better privacy.
@@ -0,0 +1,8 @@
1
+ import type { NotificationId } from "./NotificationId";
2
+ /**
3
+ * Mark a comment reply as read.
4
+ */
5
+ export type MarkNotificationAsRead = {
6
+ notification_id: NotificationId;
7
+ read: boolean;
8
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -8,5 +8,5 @@ export type ModAdd = {
8
8
  mod_person_id: PersonId;
9
9
  other_person_id: PersonId;
10
10
  removed: boolean;
11
- published: string;
11
+ published_at: 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
- published: string;
13
+ published_at: string;
14
14
  };
@@ -10,7 +10,7 @@ export type ModBan = {
10
10
  other_person_id: PersonId;
11
11
  reason?: string;
12
12
  banned: boolean;
13
- expires?: string;
14
- published: string;
13
+ expires_at?: string;
14
+ published_at: string;
15
15
  instance_id: InstanceId;
16
16
  };
@@ -11,6 +11,6 @@ export type ModBanFromCommunity = {
11
11
  community_id: CommunityId;
12
12
  reason?: string;
13
13
  banned: boolean;
14
- expires?: string;
15
- published: string;
14
+ expires_at?: string;
15
+ published_at: string;
16
16
  };
@@ -6,7 +6,6 @@ export type ModChangeCommunityVisibility = {
6
6
  id: ModChangeCommunityVisibilityId;
7
7
  community_id: CommunityId;
8
8
  mod_person_id: PersonId;
9
- published: string;
10
- reason?: string;
9
+ published_at: string;
11
10
  visibility: CommunityVisibility;
12
11
  };
@@ -9,6 +9,6 @@ export type ModFeaturePost = {
9
9
  mod_person_id: PersonId;
10
10
  post_id: PostId;
11
11
  featured: boolean;
12
- published: string;
12
+ published_at: string;
13
13
  is_featured_community: boolean;
14
14
  };
@@ -9,6 +9,6 @@ export type ModLockPost = {
9
9
  mod_person_id: PersonId;
10
10
  post_id: PostId;
11
11
  locked: boolean;
12
- published: string;
12
+ published_at: string;
13
13
  reason?: string;
14
14
  };
@@ -10,5 +10,5 @@ export type ModRemoveComment = {
10
10
  comment_id: CommentId;
11
11
  reason?: string;
12
12
  removed: boolean;
13
- published: string;
13
+ published_at: string;
14
14
  };
@@ -10,5 +10,5 @@ export type ModRemoveCommunity = {
10
10
  community_id: CommunityId;
11
11
  reason?: string;
12
12
  removed: boolean;
13
- published: string;
13
+ published_at: string;
14
14
  };
@@ -10,5 +10,5 @@ export type ModRemovePost = {
10
10
  post_id: PostId;
11
11
  reason?: string;
12
12
  removed: boolean;
13
- published: string;
13
+ published_at: string;
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
- published: string;
12
+ published_at: string;
13
13
  };
@@ -0,0 +1,17 @@
1
+ import type { DbUrl } from "./DbUrl";
2
+ import type { InstanceId } from "./InstanceId";
3
+ import type { MultiCommunityId } from "./MultiCommunityId";
4
+ import type { PersonId } from "./PersonId";
5
+ export type MultiCommunity = {
6
+ id: MultiCommunityId;
7
+ creator_id: PersonId;
8
+ instance_id: InstanceId;
9
+ name: string;
10
+ title?: string;
11
+ description?: string;
12
+ local: boolean;
13
+ deleted: boolean;
14
+ ap_id: DbUrl;
15
+ published_at: string;
16
+ updated_at?: string;
17
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,8 @@
1
+ import type { CommunityFollowerState } from "./CommunityFollowerState";
2
+ import type { MultiCommunityId } from "./MultiCommunityId";
3
+ import type { PersonId } from "./PersonId";
4
+ export type MultiCommunityFollow = {
5
+ multi_community_id: MultiCommunityId;
6
+ person_id: PersonId;
7
+ follow_state: CommunityFollowerState;
8
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export type MultiCommunityId = 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,6 @@
1
+ import type { MultiCommunity } from "./MultiCommunity";
2
+ import type { Person } from "./Person";
3
+ export type MultiCommunityView = {
4
+ multi: MultiCommunity;
5
+ owner: Person;
6
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,10 @@
1
+ import type { PersonId } from "./PersonId";
2
+ /**
3
+ * Make a note for a person.
4
+ *
5
+ * An empty string deletes the note.
6
+ */
7
+ export type NotePerson = {
8
+ person_id: PersonId;
9
+ note: string;
10
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,14 @@
1
+ import type { CommentId } from "./CommentId";
2
+ import type { NotificationId } from "./NotificationId";
3
+ import type { PostId } from "./PostId";
4
+ import type { PrivateMessageId } from "./PrivateMessageId";
5
+ /**
6
+ * A person mention.
7
+ */
8
+ export type Notification = {
9
+ id: NotificationId;
10
+ post_id?: PostId;
11
+ comment_id?: CommentId;
12
+ private_message_id?: PrivateMessageId;
13
+ published_at: string;
14
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export type NotificationId = 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
+ * Lets you show votes for others only, show all votes, or hide all votes.
3
+ */
4
+ export type NotificationTypes = "Mention" | "Reply" | "Subscribed" | "PrivateMessage";
@@ -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,32 +1,36 @@
1
+ import type { Comment } from "./Comment";
2
+ import type { CommentActions } from "./CommentActions";
1
3
  import type { Community } from "./Community";
2
4
  import type { CommunityActions } from "./CommunityActions";
3
5
  import type { ImageDetails } from "./ImageDetails";
4
6
  import type { InstanceActions } from "./InstanceActions";
7
+ import type { Notification } from "./Notification";
5
8
  import type { Person } from "./Person";
6
9
  import type { PersonActions } from "./PersonActions";
7
- import type { PersonPostMention } from "./PersonPostMention";
10
+ import type { PersonNotification } from "./PersonNotification";
8
11
  import type { Post } from "./Post";
9
12
  import type { PostActions } from "./PostActions";
13
+ import type { PrivateMessage } from "./PrivateMessage";
10
14
  import type { TagsView } from "./TagsView";
11
- /**
12
- * A person post mention view.
13
- */
14
- export type PersonPostMentionView = {
15
- person_post_mention: PersonPostMention;
16
- recipient: Person;
17
- post: Post;
15
+ export type NotificationView = {
16
+ notification: Notification;
17
+ person_notification: PersonNotification;
18
+ private_message?: PrivateMessage;
19
+ comment?: Comment;
20
+ post?: Post;
21
+ community?: Community;
18
22
  creator: Person;
19
- community: Community;
23
+ recipient: Person;
20
24
  image_details?: ImageDetails;
21
25
  community_actions?: CommunityActions;
22
- person_actions?: PersonActions;
23
- post_actions?: PostActions;
24
26
  instance_actions?: InstanceActions;
25
- creator_home_instance_actions?: InstanceActions;
26
- creator_local_instance_actions?: InstanceActions;
27
- creator_community_actions?: CommunityActions;
27
+ post_actions?: PostActions;
28
+ person_actions?: PersonActions;
29
+ comment_actions?: CommentActions;
30
+ item_creator_is_admin: boolean;
28
31
  post_tags: TagsView;
29
- creator_is_admin: boolean;
30
32
  can_mod: boolean;
31
33
  creator_banned: boolean;
34
+ creator_is_moderator: boolean;
35
+ creator_banned_from_community: boolean;
32
36
  };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Lets you show votes for others only, show all votes, or hide all votes.
3
+ */
4
+ export type NotificationsMode = "RepliesAndMentions" | "AllComments" | "Mute";
@@ -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 });
@@ -7,6 +7,6 @@ export type OAuthAccount = {
7
7
  local_user_id: LocalUserId;
8
8
  oauth_provider_id: OAuthProviderId;
9
9
  oauth_user_id: string;
10
- published: string;
11
- updated?: string;
10
+ published_at: string;
11
+ updated_at?: string;
12
12
  };
@@ -54,8 +54,8 @@ export type OAuthProvider = {
54
54
  * switch to enable or disable an oauth provider
55
55
  */
56
56
  enabled: boolean;
57
- published: string;
58
- updated?: string;
57
+ published_at: string;
58
+ updated_at?: string;
59
59
  /**
60
60
  * switch to enable or disable PKCE
61
61
  */
@@ -15,8 +15,8 @@ export type Person = {
15
15
  * A URL for an avatar.
16
16
  */
17
17
  avatar?: DbUrl;
18
- published: string;
19
- updated?: string;
18
+ published_at: string;
19
+ updated_at?: string;
20
20
  /**
21
21
  * The federated ap_id.
22
22
  */
@@ -1,9 +1,26 @@
1
- import type { PersonId } from "./PersonId";
2
1
  export type PersonActions = {
3
- target_id: PersonId;
4
- person_id: PersonId;
5
2
  /**
6
3
  * When the person was blocked.
7
4
  */
8
- blocked?: string;
5
+ blocked_at?: string;
6
+ /**
7
+ * When the person was noted.
8
+ */
9
+ noted_at?: string;
10
+ /**
11
+ * A note about the person.
12
+ */
13
+ note?: string;
14
+ /**
15
+ * When the person was voted on.
16
+ */
17
+ voted_at?: string;
18
+ /**
19
+ * A total of upvotes given to this person
20
+ */
21
+ upvotes?: number;
22
+ /**
23
+ * A total of downvotes given to this person
24
+ */
25
+ downvotes?: number;
9
26
  };
@@ -1,2 +1,3 @@
1
1
  "use strict";
2
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
3
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -9,5 +9,5 @@ export type PersonCommentMention = {
9
9
  recipient_id: PersonId;
10
10
  comment_id: CommentId;
11
11
  read: boolean;
12
- published: string;
12
+ published_at: string;
13
13
  };
@@ -0,0 +1,7 @@
1
+ import type { CommentView } from "./CommentView";
2
+ import type { PostView } from "./PostView";
3
+ export type PersonLikedCombinedView = ({
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,9 @@
1
+ import type { NotificationId } from "./NotificationId";
2
+ import type { NotificationTypes } from "./NotificationTypes";
3
+ import type { PersonId } from "./PersonId";
4
+ export type PersonNotification = {
5
+ notification_id: NotificationId;
6
+ recipient_id: PersonId;
7
+ kind: NotificationTypes;
8
+ read: boolean;
9
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -9,5 +9,5 @@ export type PersonPostMention = {
9
9
  recipient_id: PersonId;
10
10
  post_id: PostId;
11
11
  read: boolean;
12
- published: string;
12
+ published_at: string;
13
13
  };
@@ -1,12 +1,11 @@
1
- import type { InstanceActions } from "./InstanceActions";
2
1
  import type { Person } from "./Person";
2
+ import type { PersonActions } from "./PersonActions";
3
3
  /**
4
4
  * A person view.
5
5
  */
6
6
  export type PersonView = {
7
7
  person: Person;
8
8
  is_admin: boolean;
9
- home_instance_actions?: InstanceActions;
10
- local_instance_actions?: InstanceActions;
9
+ person_actions?: PersonActions;
11
10
  creator_banned: boolean;
12
11
  };
@@ -27,8 +27,8 @@ export type Post = {
27
27
  * Whether the post is locked.
28
28
  */
29
29
  locked: boolean;
30
- published: string;
31
- updated?: string;
30
+ published_at: string;
31
+ updated_at?: string;
32
32
  /**
33
33
  * Whether the post is deleted.
34
34
  */
@@ -78,7 +78,7 @@ export type Post = {
78
78
  /**
79
79
  * Time at which the post will be published. None means publish immediately.
80
80
  */
81
- scheduled_publish_time?: string;
81
+ scheduled_publish_time_at?: string;
82
82
  comments: number;
83
83
  score: number;
84
84
  upvotes: number;
@@ -86,7 +86,7 @@ export type Post = {
86
86
  /**
87
87
  * The time of the newest comment in the post.
88
88
  */
89
- newest_comment_time: string;
89
+ newest_comment_time_at: string;
90
90
  report_count: number;
91
91
  unresolved_report_count: number;
92
92
  /**