lemmy-js-client 0.19.0-rc.8 → 0.19.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (67) hide show
  1. package/dist/http.d.ts +87 -15
  2. package/dist/http.js +99 -13
  3. package/dist/index.d.ts +14 -8
  4. package/dist/{types/others.d.ts → other_types.d.ts} +4 -4
  5. package/dist/types/ActivityId.d.ts +1 -0
  6. package/dist/types/BlockInstance.d.ts +5 -0
  7. package/dist/types/BlockInstanceResponse.d.ts +3 -0
  8. package/dist/types/CommentAggregates.d.ts +0 -3
  9. package/dist/types/CommentReplyView.d.ts +2 -0
  10. package/dist/types/CommentView.d.ts +2 -0
  11. package/dist/types/Community.d.ts +0 -2
  12. package/dist/types/CommunityAggregates.d.ts +0 -2
  13. package/dist/types/CustomEmojiKeyword.d.ts +0 -1
  14. package/dist/types/FederatedInstances.d.ts +4 -4
  15. package/dist/types/GenerateTotpSecretResponse.d.ts +3 -0
  16. package/dist/types/GetPosts.d.ts +2 -0
  17. package/dist/types/GetPostsResponse.d.ts +2 -0
  18. package/dist/types/ImageUpload.d.ts +0 -2
  19. package/dist/types/InstanceBlockView.d.ts +8 -0
  20. package/dist/types/InstanceBlockView.js +2 -0
  21. package/dist/types/InstanceWithFederationState.d.ts +11 -0
  22. package/dist/types/InstanceWithFederationState.js +2 -0
  23. package/dist/types/LemmyErrorType.d.ts +171 -138
  24. package/dist/types/LocalSite.d.ts +1 -0
  25. package/dist/types/LocalSiteRateLimit.d.ts +2 -1
  26. package/dist/types/LocalUser.d.ts +4 -3
  27. package/dist/types/LoginToken.d.ts +7 -0
  28. package/dist/types/LoginToken.js +2 -0
  29. package/dist/types/MarkPostAsRead.d.ts +2 -1
  30. package/dist/types/ModRemoveCommunity.d.ts +0 -1
  31. package/dist/types/MyUserInfo.d.ts +2 -0
  32. package/dist/types/PaginationCursor.d.ts +1 -0
  33. package/dist/types/Person.d.ts +0 -1
  34. package/dist/types/PersonAggregates.d.ts +0 -3
  35. package/dist/types/PersonMentionView.d.ts +2 -0
  36. package/dist/types/PersonView.d.ts +1 -0
  37. package/dist/types/PostAggregates.d.ts +0 -12
  38. package/dist/types/PostView.d.ts +2 -0
  39. package/dist/types/ReadableFederationState.d.ts +10 -0
  40. package/dist/types/ReadableFederationState.js +2 -0
  41. package/dist/types/RemoveCommunity.d.ts +0 -1
  42. package/dist/types/SaveUserSettings.d.ts +5 -2
  43. package/dist/types/SiteAggregates.d.ts +0 -1
  44. package/dist/types/SortType.d.ts +1 -1
  45. package/dist/types/SuccessResponse.d.ts +3 -0
  46. package/dist/types/UpdateTotp.d.ts +4 -0
  47. package/dist/types/UpdateTotpResponse.d.ts +3 -0
  48. package/package.json +12 -12
  49. package/dist/types/CommunityBlockId.d.ts +0 -1
  50. package/dist/types/DeleteAccountResponse.d.ts +0 -1
  51. package/dist/types/DeleteCustomEmojiResponse.d.ts +0 -5
  52. package/dist/types/ImageUploadId.d.ts +0 -1
  53. package/dist/types/PasswordResetResponse.d.ts +0 -1
  54. package/dist/types/PersonSortType.d.ts +0 -1
  55. package/dist/types/PurgeItemResponse.d.ts +0 -3
  56. package/dist/types/VerifyEmailResponse.d.ts +0 -1
  57. package/dist/utils.d.ts +0 -0
  58. package/dist/utils.js +0 -0
  59. /package/dist/{types/others.js → other_types.js} +0 -0
  60. /package/dist/types/{CommunityBlockId.js → ActivityId.js} +0 -0
  61. /package/dist/types/{DeleteCustomEmojiResponse.js → BlockInstance.js} +0 -0
  62. /package/dist/types/{DeleteAccountResponse.js → BlockInstanceResponse.js} +0 -0
  63. /package/dist/types/{ImageUploadId.js → GenerateTotpSecretResponse.js} +0 -0
  64. /package/dist/types/{PasswordResetResponse.js → PaginationCursor.js} +0 -0
  65. /package/dist/types/{PersonSortType.js → SuccessResponse.js} +0 -0
  66. /package/dist/types/{PurgeItemResponse.js → UpdateTotp.js} +0 -0
  67. /package/dist/types/{VerifyEmailResponse.js → UpdateTotpResponse.js} +0 -0
@@ -0,0 +1,11 @@
1
+ import type { InstanceId } from "./InstanceId";
2
+ import type { ReadableFederationState } from "./ReadableFederationState";
3
+ export interface InstanceWithFederationState {
4
+ id: InstanceId;
5
+ domain: string;
6
+ published: string;
7
+ updated?: string;
8
+ software?: string;
9
+ version?: string;
10
+ federation_state?: ReadableFederationState;
11
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,277 +1,310 @@
1
1
  export type LemmyErrorType = {
2
- error_type: "ReportReasonRequired";
2
+ error: "report_reason_required";
3
3
  } | {
4
- error_type: "ReportTooLong";
4
+ error: "report_too_long";
5
5
  } | {
6
- error_type: "NotAModerator";
6
+ error: "not_a_moderator";
7
7
  } | {
8
- error_type: "NotAnAdmin";
8
+ error: "not_an_admin";
9
9
  } | {
10
- error_type: "CannotBlockYourself";
10
+ error: "cant_block_yourself";
11
11
  } | {
12
- error_type: "CannotBlockAdmin";
12
+ error: "cant_block_admin";
13
13
  } | {
14
- error_type: "CouldNotUpdateUser";
14
+ error: "couldnt_update_user";
15
15
  } | {
16
- error_type: "PasswordsDoNotMatch";
16
+ error: "passwords_do_not_match";
17
17
  } | {
18
- error_type: "PasswordIncorrect";
18
+ error: "email_not_verified";
19
19
  } | {
20
- error_type: "EmailNotVerified";
20
+ error: "email_required";
21
21
  } | {
22
- error_type: "EmailRequired";
22
+ error: "couldnt_update_comment";
23
23
  } | {
24
- error_type: "CouldNotUpdateComment";
24
+ error: "couldnt_update_private_message";
25
25
  } | {
26
- error_type: "CouldNotUpdatePrivateMessage";
26
+ error: "cannot_leave_admin";
27
27
  } | {
28
- error_type: "CannotLeaveAdmin";
28
+ error: "no_lines_in_html";
29
29
  } | {
30
- error_type: "NoLinesInHtml";
30
+ error: "site_metadata_page_is_not_doctype_html";
31
31
  } | {
32
- error_type: "SiteMetadataPageIsNotDoctypeHtml";
33
- } | {
34
- error_type: "PictrsResponseError";
32
+ error: "pictrs_response_error";
35
33
  message: string;
36
34
  } | {
37
- error_type: "PictrsPurgeResponseError";
35
+ error: "pictrs_purge_response_error";
38
36
  message: string;
39
37
  } | {
40
- error_type: "ImageUrlMissingPathSegments";
38
+ error: "pictrs_caching_disabled";
41
39
  } | {
42
- error_type: "ImageUrlMissingLastPathSegment";
40
+ error: "image_url_missing_path_segments";
43
41
  } | {
44
- error_type: "PictrsApiKeyNotProvided";
42
+ error: "image_url_missing_last_path_segment";
45
43
  } | {
46
- error_type: "NoContentTypeHeader";
44
+ error: "pictrs_api_key_not_provided";
47
45
  } | {
48
- error_type: "NotAnImageType";
46
+ error: "no_content_type_header";
49
47
  } | {
50
- error_type: "NotAModOrAdmin";
48
+ error: "not_an_image_type";
51
49
  } | {
52
- error_type: "NoAdmins";
50
+ error: "not_a_mod_or_admin";
53
51
  } | {
54
- error_type: "NotTopAdmin";
52
+ error: "no_admins";
55
53
  } | {
56
- error_type: "NotTopMod";
54
+ error: "not_top_admin";
57
55
  } | {
58
- error_type: "NotLoggedIn";
56
+ error: "not_top_mod";
59
57
  } | {
60
- error_type: "SiteBan";
58
+ error: "not_logged_in";
61
59
  } | {
62
- error_type: "Deleted";
60
+ error: "site_ban";
63
61
  } | {
64
- error_type: "BannedFromCommunity";
62
+ error: "deleted";
65
63
  } | {
66
- error_type: "CouldNotFindCommunity";
64
+ error: "banned_from_community";
67
65
  } | {
68
- error_type: "PersonIsBlocked";
66
+ error: "couldnt_find_community";
69
67
  } | {
70
- error_type: "DownvotesAreDisabled";
68
+ error: "couldnt_find_person";
71
69
  } | {
72
- error_type: "InstanceIsPrivate";
70
+ error: "person_is_blocked";
73
71
  } | {
74
- error_type: "InvalidPassword";
72
+ error: "community_is_blocked";
75
73
  } | {
76
- error_type: "SiteDescriptionLengthOverflow";
74
+ error: "instance_is_blocked";
77
75
  } | {
78
- error_type: "HoneypotFailed";
76
+ error: "downvotes_are_disabled";
79
77
  } | {
80
- error_type: "RegistrationApplicationIsPending";
78
+ error: "instance_is_private";
81
79
  } | {
82
- error_type: "PrivateInstanceCannotHaveFederationEnabled";
80
+ error: "invalid_password";
83
81
  } | {
84
- error_type: "Locked";
82
+ error: "site_description_length_overflow";
85
83
  } | {
86
- error_type: "CouldNotCreateComment";
84
+ error: "honeypot_failed";
87
85
  } | {
88
- error_type: "MaxCommentDepthReached";
86
+ error: "registration_application_is_pending";
89
87
  } | {
90
- error_type: "EditCommentNotAllowed";
88
+ error: "cant_enable_private_instance_and_federation_together";
91
89
  } | {
92
- error_type: "OnlyAdminsCanCreateCommunities";
90
+ error: "locked";
93
91
  } | {
94
- error_type: "CommunityAlreadyExists";
92
+ error: "couldnt_create_comment";
95
93
  } | {
96
- error_type: "LanguageNotAllowed";
94
+ error: "max_comment_depth_reached";
97
95
  } | {
98
- error_type: "OnlyModsCanPostInCommunity";
96
+ error: "no_comment_edit_allowed";
99
97
  } | {
100
- error_type: "CouldNotUpdatePost";
98
+ error: "only_admins_can_create_communities";
101
99
  } | {
102
- error_type: "EditPostNotAllowed";
100
+ error: "community_already_exists";
103
101
  } | {
104
- error_type: "CouldNotFindPost";
102
+ error: "language_not_allowed";
105
103
  } | {
106
- error_type: "EditPrivateMessageNotAllowed";
104
+ error: "only_mods_can_post_in_community";
107
105
  } | {
108
- error_type: "SiteAlreadyExists";
106
+ error: "couldnt_update_post";
109
107
  } | {
110
- error_type: "ApplicationQuestionRequired";
108
+ error: "no_post_edit_allowed";
111
109
  } | {
112
- error_type: "InvalidDefaultPostListingType";
110
+ error: "couldnt_find_post";
113
111
  } | {
114
- error_type: "RegistrationClosed";
112
+ error: "edit_private_message_not_allowed";
115
113
  } | {
116
- error_type: "RegistrationApplicationAnswerRequired";
114
+ error: "site_already_exists";
117
115
  } | {
118
- error_type: "EmailAlreadyExists";
116
+ error: "application_question_required";
119
117
  } | {
120
- error_type: "FederationError";
121
- message: string;
118
+ error: "invalid_default_post_listing_type";
119
+ } | {
120
+ error: "registration_closed";
122
121
  } | {
123
- error_type: "FederationForbiddenByStrictAllowList";
122
+ error: "registration_application_answer_required";
124
123
  } | {
125
- error_type: "PersonIsBannedFromCommunity";
124
+ error: "email_already_exists";
126
125
  } | {
127
- error_type: "ObjectIsNotPublic";
126
+ error: "federation_forbidden_by_strict_allow_list";
128
127
  } | {
129
- error_type: "InvalidCommunity";
128
+ error: "person_is_banned_from_community";
130
129
  } | {
131
- error_type: "CannotCreatePostOrCommentInDeletedOrRemovedCommunity";
130
+ error: "object_is_not_public";
132
131
  } | {
133
- error_type: "CannotReceivePage";
132
+ error: "invalid_community";
134
133
  } | {
135
- error_type: "NewPostCannotBeLocked";
134
+ error: "cannot_create_post_or_comment_in_deleted_or_removed_community";
136
135
  } | {
137
- error_type: "OnlyLocalAdminCanRemoveCommunity";
136
+ error: "cannot_receive_page";
138
137
  } | {
139
- error_type: "OnlyLocalAdminCanRestoreCommunity";
138
+ error: "new_post_cannot_be_locked";
140
139
  } | {
141
- error_type: "NoIdGiven";
140
+ error: "only_local_admin_can_remove_community";
142
141
  } | {
143
- error_type: "CouldNotFindUsernameOrEmail";
142
+ error: "only_local_admin_can_restore_community";
144
143
  } | {
145
- error_type: "InvalidQuery";
144
+ error: "no_id_given";
146
145
  } | {
147
- error_type: "ObjectNotLocal";
146
+ error: "incorrect_login";
148
147
  } | {
149
- error_type: "PostIsLocked";
148
+ error: "invalid_query";
150
149
  } | {
151
- error_type: "PersonIsBannedFromSite";
150
+ error: "object_not_local";
151
+ } | {
152
+ error: "post_is_locked";
153
+ } | {
154
+ error: "person_is_banned_from_site";
155
+ message: string;
152
156
  } | {
153
- error_type: "InvalidVoteValue";
157
+ error: "invalid_vote_value";
154
158
  } | {
155
- error_type: "PageDoesNotSpecifyCreator";
159
+ error: "page_does_not_specify_creator";
156
160
  } | {
157
- error_type: "PageDoesNotSpecifyGroup";
161
+ error: "page_does_not_specify_group";
158
162
  } | {
159
- error_type: "NoCommunityFoundInCC";
163
+ error: "no_community_found_in_cc";
160
164
  } | {
161
- error_type: "NoEmailSetup";
165
+ error: "no_email_setup";
162
166
  } | {
163
- error_type: "EmailSmtpServerNeedsAPort";
167
+ error: "email_smtp_server_needs_a_port";
164
168
  } | {
165
- error_type: "MissingAnEmail";
169
+ error: "missing_an_email";
166
170
  } | {
167
- error_type: "RateLimitError";
171
+ error: "rate_limit_error";
168
172
  } | {
169
- error_type: "InvalidName";
173
+ error: "invalid_name";
170
174
  } | {
171
- error_type: "InvalidDisplayName";
175
+ error: "invalid_display_name";
172
176
  } | {
173
- error_type: "InvalidMatrixId";
177
+ error: "invalid_matrix_id";
174
178
  } | {
175
- error_type: "InvalidPostTitle";
179
+ error: "invalid_post_title";
176
180
  } | {
177
- error_type: "InvalidBodyField";
181
+ error: "invalid_body_field";
178
182
  } | {
179
- error_type: "BioLengthOverflow";
183
+ error: "bio_length_overflow";
180
184
  } | {
181
- error_type: "MissingTotpToken";
185
+ error: "missing_totp_token";
182
186
  } | {
183
- error_type: "IncorrectTotpToken";
187
+ error: "missing_totp_secret";
184
188
  } | {
185
- error_type: "CouldNotParseTotpSecret";
189
+ error: "incorrect_totp_token";
186
190
  } | {
187
- error_type: "CouldNotLikeComment";
191
+ error: "couldnt_parse_totp_secret";
188
192
  } | {
189
- error_type: "CouldNotSaveComment";
193
+ error: "couldnt_generate_totp";
190
194
  } | {
191
- error_type: "CouldNotCreateReport";
195
+ error: "totp_already_enabled";
192
196
  } | {
193
- error_type: "CouldNotResolveReport";
197
+ error: "couldnt_like_comment";
194
198
  } | {
195
- error_type: "CommunityModeratorAlreadyExists";
199
+ error: "couldnt_save_comment";
196
200
  } | {
197
- error_type: "CommunityUserIsAlreadyBanned";
201
+ error: "couldnt_create_report";
198
202
  } | {
199
- error_type: "CommunityBlockAlreadyExists";
203
+ error: "couldnt_resolve_report";
200
204
  } | {
201
- error_type: "CommunityFollowerAlreadyExists";
205
+ error: "community_moderator_already_exists";
202
206
  } | {
203
- error_type: "CouldNotUpdateCommunityHiddenStatus";
207
+ error: "community_user_already_banned";
204
208
  } | {
205
- error_type: "PersonBlockAlreadyExists";
209
+ error: "community_block_already_exists";
206
210
  } | {
207
- error_type: "UserAlreadyExists";
211
+ error: "community_follower_already_exists";
208
212
  } | {
209
- error_type: "TokenNotFound";
213
+ error: "couldnt_update_community_hidden_status";
210
214
  } | {
211
- error_type: "CouldNotLikePost";
215
+ error: "person_block_already_exists";
212
216
  } | {
213
- error_type: "CouldNotSavePost";
217
+ error: "user_already_exists";
214
218
  } | {
215
- error_type: "CouldNotMarkPostAsRead";
219
+ error: "token_not_found";
216
220
  } | {
217
- error_type: "CouldNotUpdateCommunity";
221
+ error: "couldnt_like_post";
218
222
  } | {
219
- error_type: "CouldNotUpdateReplies";
223
+ error: "couldnt_save_post";
220
224
  } | {
221
- error_type: "CouldNotUpdatePersonMentions";
225
+ error: "couldnt_mark_post_as_read";
222
226
  } | {
223
- error_type: "PostTitleTooLong";
227
+ error: "couldnt_update_community";
224
228
  } | {
225
- error_type: "CouldNotCreatePost";
229
+ error: "couldnt_update_replies";
226
230
  } | {
227
- error_type: "CouldNotCreatePrivateMessage";
231
+ error: "couldnt_update_person_mentions";
228
232
  } | {
229
- error_type: "CouldNotUpdatePrivate";
233
+ error: "post_title_too_long";
230
234
  } | {
231
- error_type: "SystemErrLogin";
235
+ error: "couldnt_create_post";
232
236
  } | {
233
- error_type: "CouldNotSetAllRegistrationsAccepted";
237
+ error: "couldnt_create_private_message";
234
238
  } | {
235
- error_type: "CouldNotSetAllEmailVerified";
239
+ error: "couldnt_update_private";
236
240
  } | {
237
- error_type: "Banned";
241
+ error: "system_err_login";
238
242
  } | {
239
- error_type: "CouldNotGetComments";
243
+ error: "couldnt_set_all_registrations_accepted";
240
244
  } | {
241
- error_type: "CouldNotGetPosts";
245
+ error: "couldnt_set_all_email_verified";
242
246
  } | {
243
- error_type: "InvalidUrl";
247
+ error: "banned";
244
248
  } | {
245
- error_type: "EmailSendFailed";
249
+ error: "couldnt_get_comments";
246
250
  } | {
247
- error_type: "Slurs";
251
+ error: "couldnt_get_posts";
248
252
  } | {
249
- error_type: "CouldNotGenerateTotp";
253
+ error: "invalid_url";
250
254
  } | {
251
- error_type: "CouldNotFindObject";
255
+ error: "email_send_failed";
252
256
  } | {
253
- error_type: "RegistrationDenied";
257
+ error: "slurs";
258
+ } | {
259
+ error: "couldnt_find_object";
260
+ } | {
261
+ error: "registration_denied";
262
+ message: string | null;
263
+ } | {
264
+ error: "federation_disabled";
265
+ } | {
266
+ error: "domain_blocked";
254
267
  message: string;
255
268
  } | {
256
- error_type: "FederationDisabled";
269
+ error: "domain_not_in_allow_list";
270
+ message: string;
257
271
  } | {
258
- error_type: "DomainBlocked";
272
+ error: "federation_disabled_by_strict_allow_list";
259
273
  } | {
260
- error_type: "DomainNotInAllowList";
274
+ error: "site_name_required";
261
275
  } | {
262
- error_type: "FederationDisabledByStrictAllowList";
276
+ error: "site_name_length_overflow";
263
277
  } | {
264
- error_type: "SiteNameRequired";
278
+ error: "permissive_regex";
265
279
  } | {
266
- error_type: "SiteNameLengthOverflow";
280
+ error: "invalid_regex";
267
281
  } | {
268
- error_type: "PermissiveRegex";
282
+ error: "captcha_incorrect";
269
283
  } | {
270
- error_type: "InvalidRegex";
284
+ error: "password_reset_limit_reached";
271
285
  } | {
272
- error_type: "CaptchaIncorrect";
286
+ error: "couldnt_create_audio_captcha";
273
287
  } | {
274
- error_type: "PasswordResetLimitReached";
288
+ error: "invalid_url_scheme";
275
289
  } | {
276
- error_type: "CouldNotCreateAudioCaptcha";
290
+ error: "couldnt_send_webmention";
291
+ } | {
292
+ error: "contradicting_filters";
293
+ } | {
294
+ error: "instance_block_already_exists";
295
+ } | {
296
+ error: "too_many_items";
297
+ } | {
298
+ error: "community_has_no_followers";
299
+ } | {
300
+ error: "ban_expiration_in_past";
301
+ } | {
302
+ error: "invalid_unix_time";
303
+ } | {
304
+ error: "invalid_bot_action";
305
+ } | {
306
+ error: "cant_block_local_instance";
307
+ } | {
308
+ error: "unknown";
309
+ message: string;
277
310
  };
@@ -26,4 +26,5 @@ export interface LocalSite {
26
26
  updated?: string;
27
27
  registration_mode: RegistrationMode;
28
28
  reports_email_admins: boolean;
29
+ federation_signed_fetch: boolean;
29
30
  }
@@ -1,6 +1,5 @@
1
1
  import type { LocalSiteId } from "./LocalSiteId";
2
2
  export interface LocalSiteRateLimit {
3
- id: number;
4
3
  local_site_id: LocalSiteId;
5
4
  message: number;
6
5
  message_per_second: number;
@@ -16,4 +15,6 @@ export interface LocalSiteRateLimit {
16
15
  search_per_second: number;
17
16
  published: string;
18
17
  updated?: string;
18
+ import_user_settings: number;
19
+ import_user_settings_per_second: number;
19
20
  }
@@ -14,18 +14,19 @@ export interface LocalUser {
14
14
  interface_language: string;
15
15
  show_avatars: boolean;
16
16
  send_notifications_to_email: boolean;
17
- validator_time: string;
18
17
  show_scores: boolean;
19
18
  show_bot_accounts: boolean;
20
19
  show_read_posts: boolean;
21
- show_new_post_notifs: boolean;
22
20
  email_verified: boolean;
23
21
  accepted_application: boolean;
24
- totp_2fa_url?: string;
25
22
  open_links_in_new_tab: boolean;
26
23
  blur_nsfw: boolean;
27
24
  auto_expand: boolean;
28
25
  infinite_scroll_enabled: boolean;
29
26
  admin: boolean;
30
27
  post_listing_mode: PostListingMode;
28
+ totp_2fa_enabled: boolean;
29
+ enable_keyboard_navigation: boolean;
30
+ enable_animated_images: boolean;
31
+ collapse_bot_comments: boolean;
31
32
  }
@@ -0,0 +1,7 @@
1
+ import type { LocalUserId } from "./LocalUserId";
2
+ export interface LoginToken {
3
+ user_id: LocalUserId;
4
+ published: string;
5
+ ip?: string;
6
+ user_agent?: string;
7
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,5 +1,6 @@
1
1
  import type { PostId } from "./PostId";
2
2
  export interface MarkPostAsRead {
3
- post_id: PostId;
3
+ post_id?: PostId;
4
+ post_ids?: Array<PostId>;
4
5
  read: boolean;
5
6
  }
@@ -6,6 +6,5 @@ export interface ModRemoveCommunity {
6
6
  community_id: CommunityId;
7
7
  reason?: string;
8
8
  removed: boolean;
9
- expires?: string;
10
9
  when_: string;
11
10
  }
@@ -1,6 +1,7 @@
1
1
  import type { CommunityBlockView } from "./CommunityBlockView";
2
2
  import type { CommunityFollowerView } from "./CommunityFollowerView";
3
3
  import type { CommunityModeratorView } from "./CommunityModeratorView";
4
+ import type { InstanceBlockView } from "./InstanceBlockView";
4
5
  import type { LanguageId } from "./LanguageId";
5
6
  import type { LocalUserView } from "./LocalUserView";
6
7
  import type { PersonBlockView } from "./PersonBlockView";
@@ -9,6 +10,7 @@ export interface MyUserInfo {
9
10
  follows: Array<CommunityFollowerView>;
10
11
  moderates: Array<CommunityModeratorView>;
11
12
  community_blocks: Array<CommunityBlockView>;
13
+ instance_blocks: Array<InstanceBlockView>;
12
14
  person_blocks: Array<PersonBlockView>;
13
15
  discussion_languages: Array<LanguageId>;
14
16
  }
@@ -0,0 +1 @@
1
+ export type PaginationCursor = string;
@@ -13,7 +13,6 @@ export interface Person {
13
13
  local: boolean;
14
14
  banner?: string;
15
15
  deleted: boolean;
16
- inbox_url: string;
17
16
  matrix_user_id?: string;
18
17
  bot_account: boolean;
19
18
  ban_expires?: string;
@@ -1,9 +1,6 @@
1
1
  import type { PersonId } from "./PersonId";
2
2
  export interface PersonAggregates {
3
- id: number;
4
3
  person_id: PersonId;
5
4
  post_count: number;
6
- post_score: number;
7
5
  comment_count: number;
8
- comment_score: number;
9
6
  }
@@ -14,6 +14,8 @@ export interface PersonMentionView {
14
14
  recipient: Person;
15
15
  counts: CommentAggregates;
16
16
  creator_banned_from_community: boolean;
17
+ creator_is_moderator: boolean;
18
+ creator_is_admin: boolean;
17
19
  subscribed: SubscribedType;
18
20
  saved: boolean;
19
21
  creator_blocked: boolean;
@@ -3,4 +3,5 @@ import type { PersonAggregates } from "./PersonAggregates";
3
3
  export interface PersonView {
4
4
  person: Person;
5
5
  counts: PersonAggregates;
6
+ is_admin: boolean;
6
7
  }
@@ -1,21 +1,9 @@
1
- import type { CommunityId } from "./CommunityId";
2
- import type { PersonId } from "./PersonId";
3
1
  import type { PostId } from "./PostId";
4
2
  export interface PostAggregates {
5
- id: number;
6
3
  post_id: PostId;
7
4
  comments: number;
8
5
  score: number;
9
6
  upvotes: number;
10
7
  downvotes: number;
11
8
  published: string;
12
- newest_comment_time_necro: string;
13
- newest_comment_time: string;
14
- featured_community: boolean;
15
- featured_local: boolean;
16
- hot_rank: number;
17
- hot_rank_active: number;
18
- community_id: CommunityId;
19
- creator_id: PersonId;
20
- controversy_rank: number;
21
9
  }
@@ -8,6 +8,8 @@ export interface PostView {
8
8
  creator: Person;
9
9
  community: Community;
10
10
  creator_banned_from_community: boolean;
11
+ creator_is_moderator: boolean;
12
+ creator_is_admin: boolean;
11
13
  counts: PostAggregates;
12
14
  subscribed: SubscribedType;
13
15
  saved: boolean;
@@ -0,0 +1,10 @@
1
+ import type { ActivityId } from "./ActivityId";
2
+ import type { InstanceId } from "./InstanceId";
3
+ export interface ReadableFederationState {
4
+ instance_id: InstanceId;
5
+ last_successful_id?: ActivityId;
6
+ last_successful_published_time?: string;
7
+ fail_count: number;
8
+ last_retry?: string;
9
+ next_retry?: string;
10
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -3,5 +3,4 @@ export interface RemoveCommunity {
3
3
  community_id: CommunityId;
4
4
  removed: boolean;
5
5
  reason?: string;
6
- expires?: number;
7
6
  }