lemmy-js-client 0.19.0-rc.9 → 0.19.2-alpha.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (169) hide show
  1. package/dist/http.d.ts +99 -33
  2. package/dist/http.js +119 -31
  3. package/dist/index.d.ts +16 -25
  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/AddAdmin.d.ts +0 -1
  7. package/dist/types/AddModToCommunity.d.ts +0 -1
  8. package/dist/types/ApproveRegistrationApplication.d.ts +0 -1
  9. package/dist/types/BanFromCommunity.d.ts +0 -1
  10. package/dist/types/BanPerson.d.ts +0 -1
  11. package/dist/types/BlockCommunity.d.ts +0 -1
  12. package/dist/types/BlockInstance.d.ts +0 -1
  13. package/dist/types/BlockPerson.d.ts +0 -1
  14. package/dist/types/ChangePassword.d.ts +0 -1
  15. package/dist/types/CommentAggregates.d.ts +0 -3
  16. package/dist/types/CommentReplyView.d.ts +2 -0
  17. package/dist/types/CommentView.d.ts +2 -0
  18. package/dist/types/Community.d.ts +0 -2
  19. package/dist/types/CommunityAggregates.d.ts +0 -2
  20. package/dist/types/CreateComment.d.ts +0 -1
  21. package/dist/types/CreateCommentLike.d.ts +0 -1
  22. package/dist/types/CreateCommentReport.d.ts +0 -1
  23. package/dist/types/CreateCommunity.d.ts +0 -1
  24. package/dist/types/CreateCustomEmoji.d.ts +0 -1
  25. package/dist/types/CreatePost.d.ts +0 -1
  26. package/dist/types/CreatePostLike.d.ts +0 -1
  27. package/dist/types/CreatePostReport.d.ts +0 -1
  28. package/dist/types/CreatePrivateMessage.d.ts +0 -1
  29. package/dist/types/CreatePrivateMessageReport.d.ts +0 -1
  30. package/dist/types/CreateSite.d.ts +0 -1
  31. package/dist/types/CustomEmojiKeyword.d.ts +0 -1
  32. package/dist/types/DeleteAccount.d.ts +0 -1
  33. package/dist/types/DeleteComment.d.ts +0 -1
  34. package/dist/types/DeleteCommunity.d.ts +0 -1
  35. package/dist/types/DeleteCustomEmoji.d.ts +0 -1
  36. package/dist/types/DeletePost.d.ts +0 -1
  37. package/dist/types/DeletePrivateMessage.d.ts +0 -1
  38. package/dist/types/DistinguishComment.d.ts +0 -1
  39. package/dist/types/EditComment.d.ts +0 -1
  40. package/dist/types/EditCommunity.d.ts +0 -1
  41. package/dist/types/EditCustomEmoji.d.ts +0 -1
  42. package/dist/types/EditPost.d.ts +0 -1
  43. package/dist/types/EditPrivateMessage.d.ts +0 -1
  44. package/dist/types/EditSite.d.ts +0 -1
  45. package/dist/types/FeaturePost.d.ts +0 -1
  46. package/dist/types/FederatedInstances.d.ts +4 -4
  47. package/dist/types/FollowCommunity.d.ts +0 -1
  48. package/dist/types/GenerateTotpSecretResponse.d.ts +3 -0
  49. package/dist/types/GetComment.d.ts +0 -1
  50. package/dist/types/GetComments.d.ts +0 -1
  51. package/dist/types/GetCommunity.d.ts +0 -1
  52. package/dist/types/GetModlog.d.ts +0 -1
  53. package/dist/types/GetPersonDetails.d.ts +0 -1
  54. package/dist/types/GetPersonMentions.d.ts +0 -1
  55. package/dist/types/GetPost.d.ts +0 -1
  56. package/dist/types/GetPosts.d.ts +2 -1
  57. package/dist/types/GetPostsResponse.d.ts +2 -0
  58. package/dist/types/GetPrivateMessages.d.ts +0 -1
  59. package/dist/types/GetReplies.d.ts +0 -1
  60. package/dist/types/GetReportCount.d.ts +0 -1
  61. package/dist/types/HideCommunity.d.ts +0 -1
  62. package/dist/types/ImageUpload.d.ts +7 -0
  63. package/dist/types/InstanceWithFederationState.d.ts +11 -0
  64. package/dist/types/LemmyErrorType.d.ts +171 -138
  65. package/dist/types/ListCommentLikes.d.ts +6 -0
  66. package/dist/types/ListCommentLikesResponse.d.ts +4 -0
  67. package/dist/types/ListCommentReports.d.ts +0 -1
  68. package/dist/types/ListCommunities.d.ts +0 -1
  69. package/dist/types/ListPostLikes.d.ts +6 -0
  70. package/dist/types/ListPostLikesResponse.d.ts +4 -0
  71. package/dist/types/ListPostLikesResponse.js +2 -0
  72. package/dist/types/ListPostReports.d.ts +0 -1
  73. package/dist/types/ListPrivateMessageReports.d.ts +0 -1
  74. package/dist/types/ListRegistrationApplications.d.ts +0 -1
  75. package/dist/types/LocalSite.d.ts +1 -0
  76. package/dist/types/LocalSiteRateLimit.d.ts +2 -1
  77. package/dist/types/LocalUser.d.ts +4 -3
  78. package/dist/types/LockPost.d.ts +0 -1
  79. package/dist/types/LoginToken.d.ts +7 -0
  80. package/dist/types/LoginToken.js +2 -0
  81. package/dist/types/MarkCommentReplyAsRead.d.ts +0 -1
  82. package/dist/types/MarkPersonMentionAsRead.d.ts +0 -1
  83. package/dist/types/MarkPostAsRead.d.ts +2 -2
  84. package/dist/types/MarkPrivateMessageAsRead.d.ts +0 -1
  85. package/dist/types/ModRemoveCommunity.d.ts +0 -1
  86. package/dist/types/PaginationCursor.d.ts +1 -0
  87. package/dist/types/Person.d.ts +0 -1
  88. package/dist/types/PersonAggregates.d.ts +0 -3
  89. package/dist/types/PersonMentionView.d.ts +2 -0
  90. package/dist/types/PersonView.d.ts +1 -0
  91. package/dist/types/PostAggregates.d.ts +0 -14
  92. package/dist/types/PostView.d.ts +2 -0
  93. package/dist/types/PurgeComment.d.ts +0 -1
  94. package/dist/types/PurgeCommunity.d.ts +0 -1
  95. package/dist/types/PurgePerson.d.ts +0 -1
  96. package/dist/types/PurgePost.d.ts +0 -1
  97. package/dist/types/ReadableFederationState.d.ts +10 -0
  98. package/dist/types/ReadableFederationState.js +2 -0
  99. package/dist/types/RemoveComment.d.ts +0 -1
  100. package/dist/types/RemoveCommunity.d.ts +0 -2
  101. package/dist/types/RemovePost.d.ts +0 -1
  102. package/dist/types/ResolveCommentReport.d.ts +0 -1
  103. package/dist/types/ResolveObject.d.ts +0 -1
  104. package/dist/types/ResolvePostReport.d.ts +0 -1
  105. package/dist/types/ResolvePrivateMessageReport.d.ts +0 -1
  106. package/dist/types/SaveComment.d.ts +0 -1
  107. package/dist/types/SavePost.d.ts +0 -1
  108. package/dist/types/SaveUserSettings.d.ts +5 -3
  109. package/dist/types/Search.d.ts +0 -1
  110. package/dist/types/SiteAggregates.d.ts +0 -1
  111. package/dist/types/SortType.d.ts +1 -1
  112. package/dist/types/SuccessResponse.d.ts +3 -0
  113. package/dist/types/TransferCommunity.d.ts +0 -1
  114. package/dist/types/UpdateTotp.d.ts +4 -0
  115. package/dist/types/UpdateTotpResponse.d.ts +3 -0
  116. package/dist/types/VoteView.d.ts +5 -0
  117. package/dist/types/VoteView.js +2 -0
  118. package/package.json +12 -12
  119. package/dist/types/CommunityBlockId.d.ts +0 -1
  120. package/dist/types/CommunityJoin.d.ts +0 -4
  121. package/dist/types/CommunityJoinResponse.d.ts +0 -3
  122. package/dist/types/DeleteAccountResponse.d.ts +0 -1
  123. package/dist/types/DeleteCustomEmojiResponse.d.ts +0 -5
  124. package/dist/types/GetBannedPersons.d.ts +0 -3
  125. package/dist/types/GetCaptcha.d.ts +0 -3
  126. package/dist/types/GetFederatedInstances.d.ts +0 -3
  127. package/dist/types/GetSite.d.ts +0 -3
  128. package/dist/types/GetSite.js +0 -3
  129. package/dist/types/GetUnreadCount.d.ts +0 -3
  130. package/dist/types/GetUnreadCount.js +0 -3
  131. package/dist/types/GetUnreadRegistrationApplicationCount.d.ts +0 -3
  132. package/dist/types/GetUnreadRegistrationApplicationCount.js +0 -3
  133. package/dist/types/LeaveAdmin.d.ts +0 -3
  134. package/dist/types/LeaveAdmin.js +0 -3
  135. package/dist/types/MarkAllAsRead.d.ts +0 -3
  136. package/dist/types/MarkAllAsRead.js +0 -3
  137. package/dist/types/ModJoin.d.ts +0 -4
  138. package/dist/types/ModJoinResponse.d.ts +0 -3
  139. package/dist/types/ModJoinResponse.js +0 -3
  140. package/dist/types/PasswordResetResponse.d.ts +0 -1
  141. package/dist/types/PasswordResetResponse.js +0 -3
  142. package/dist/types/PersonSortType.d.ts +0 -1
  143. package/dist/types/PersonSortType.js +0 -3
  144. package/dist/types/PostJoin.d.ts +0 -4
  145. package/dist/types/PostJoinResponse.d.ts +0 -3
  146. package/dist/types/PostJoinResponse.js +0 -3
  147. package/dist/types/PostOrCommentId.d.ts +0 -7
  148. package/dist/types/PurgeItemResponse.d.ts +0 -3
  149. package/dist/types/PurgeItemResponse.js +0 -3
  150. package/dist/types/UserJoin.d.ts +0 -3
  151. package/dist/types/UserJoin.js +0 -3
  152. package/dist/types/UserJoinResponse.d.ts +0 -3
  153. package/dist/types/UserJoinResponse.js +0 -3
  154. package/dist/types/VerifyEmailResponse.d.ts +0 -1
  155. package/dist/types/VerifyEmailResponse.js +0 -3
  156. package/dist/utils.d.ts +0 -0
  157. package/dist/utils.js +0 -0
  158. /package/dist/{types/others.js → other_types.js} +0 -0
  159. /package/dist/types/{CommunityBlockId.js → ActivityId.js} +0 -0
  160. /package/dist/types/{CommunityJoinResponse.js → GenerateTotpSecretResponse.js} +0 -0
  161. /package/dist/types/{CommunityJoin.js → ImageUpload.js} +0 -0
  162. /package/dist/types/{DeleteCustomEmojiResponse.js → InstanceWithFederationState.js} +0 -0
  163. /package/dist/types/{ModJoin.js → ListCommentLikes.js} +0 -0
  164. /package/dist/types/{PostJoin.js → ListCommentLikesResponse.js} +0 -0
  165. /package/dist/types/{PostOrCommentId.js → ListPostLikes.js} +0 -0
  166. /package/dist/types/{DeleteAccountResponse.js → PaginationCursor.js} +0 -0
  167. /package/dist/types/{GetBannedPersons.js → SuccessResponse.js} +0 -0
  168. /package/dist/types/{GetCaptcha.js → UpdateTotp.js} +0 -0
  169. /package/dist/types/{GetFederatedInstances.js → UpdateTotpResponse.js} +0 -0
package/dist/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  export * from "./http";
2
+ export { ActivityId } from "./types/ActivityId";
2
3
  export { AddAdmin } from "./types/AddAdmin";
3
4
  export { AddAdminResponse } from "./types/AddAdminResponse";
4
5
  export { AddModToCommunity } from "./types/AddModToCommunity";
@@ -41,12 +42,9 @@ export { CommentSortType } from "./types/CommentSortType";
41
42
  export { CommentView } from "./types/CommentView";
42
43
  export { Community } from "./types/Community";
43
44
  export { CommunityAggregates } from "./types/CommunityAggregates";
44
- export { CommunityBlockId } from "./types/CommunityBlockId";
45
45
  export { CommunityBlockView } from "./types/CommunityBlockView";
46
46
  export { CommunityFollowerView } from "./types/CommunityFollowerView";
47
47
  export { CommunityId } from "./types/CommunityId";
48
- export { CommunityJoin } from "./types/CommunityJoin";
49
- export { CommunityJoinResponse } from "./types/CommunityJoinResponse";
50
48
  export { CommunityModeratorView } from "./types/CommunityModeratorView";
51
49
  export { CommunityResponse } from "./types/CommunityResponse";
52
50
  export { CommunityView } from "./types/CommunityView";
@@ -67,11 +65,9 @@ export { CustomEmojiKeyword } from "./types/CustomEmojiKeyword";
67
65
  export { CustomEmojiResponse } from "./types/CustomEmojiResponse";
68
66
  export { CustomEmojiView } from "./types/CustomEmojiView";
69
67
  export { DeleteAccount } from "./types/DeleteAccount";
70
- export { DeleteAccountResponse } from "./types/DeleteAccountResponse";
71
68
  export { DeleteComment } from "./types/DeleteComment";
72
69
  export { DeleteCommunity } from "./types/DeleteCommunity";
73
70
  export { DeleteCustomEmoji } from "./types/DeleteCustomEmoji";
74
- export { DeleteCustomEmojiResponse } from "./types/DeleteCustomEmojiResponse";
75
71
  export { DeletePost } from "./types/DeletePost";
76
72
  export { DeletePrivateMessage } from "./types/DeletePrivateMessage";
77
73
  export { DistinguishComment } from "./types/DistinguishComment";
@@ -84,15 +80,13 @@ export { EditSite } from "./types/EditSite";
84
80
  export { FeaturePost } from "./types/FeaturePost";
85
81
  export { FederatedInstances } from "./types/FederatedInstances";
86
82
  export { FollowCommunity } from "./types/FollowCommunity";
87
- export { GetBannedPersons } from "./types/GetBannedPersons";
88
- export { GetCaptcha } from "./types/GetCaptcha";
83
+ export { GenerateTotpSecretResponse } from "./types/GenerateTotpSecretResponse";
89
84
  export { GetCaptchaResponse } from "./types/GetCaptchaResponse";
90
85
  export { GetComment } from "./types/GetComment";
91
86
  export { GetComments } from "./types/GetComments";
92
87
  export { GetCommentsResponse } from "./types/GetCommentsResponse";
93
88
  export { GetCommunity } from "./types/GetCommunity";
94
89
  export { GetCommunityResponse } from "./types/GetCommunityResponse";
95
- export { GetFederatedInstances } from "./types/GetFederatedInstances";
96
90
  export { GetFederatedInstancesResponse } from "./types/GetFederatedInstancesResponse";
97
91
  export { GetModlog } from "./types/GetModlog";
98
92
  export { GetModlogResponse } from "./types/GetModlogResponse";
@@ -109,26 +103,28 @@ export { GetReplies } from "./types/GetReplies";
109
103
  export { GetRepliesResponse } from "./types/GetRepliesResponse";
110
104
  export { GetReportCount } from "./types/GetReportCount";
111
105
  export { GetReportCountResponse } from "./types/GetReportCountResponse";
112
- export { GetSite } from "./types/GetSite";
113
106
  export { GetSiteMetadata } from "./types/GetSiteMetadata";
114
107
  export { GetSiteMetadataResponse } from "./types/GetSiteMetadataResponse";
115
108
  export { GetSiteResponse } from "./types/GetSiteResponse";
116
- export { GetUnreadCount } from "./types/GetUnreadCount";
117
109
  export { GetUnreadCountResponse } from "./types/GetUnreadCountResponse";
118
- export { GetUnreadRegistrationApplicationCount } from "./types/GetUnreadRegistrationApplicationCount";
119
110
  export { GetUnreadRegistrationApplicationCountResponse } from "./types/GetUnreadRegistrationApplicationCountResponse";
120
111
  export { HideCommunity } from "./types/HideCommunity";
112
+ export { ImageUpload } from "./types/ImageUpload";
121
113
  export { Instance } from "./types/Instance";
122
114
  export { InstanceBlockView } from "./types/InstanceBlockView";
123
115
  export { InstanceId } from "./types/InstanceId";
116
+ export { InstanceWithFederationState } from "./types/InstanceWithFederationState";
124
117
  export { Language } from "./types/Language";
125
118
  export { LanguageId } from "./types/LanguageId";
126
- export { LeaveAdmin } from "./types/LeaveAdmin";
127
119
  export { LemmyErrorType } from "./types/LemmyErrorType";
120
+ export { ListCommentLikes } from "./types/ListCommentLikes";
121
+ export { ListCommentLikesResponse } from "./types/ListCommentLikesResponse";
128
122
  export { ListCommentReports } from "./types/ListCommentReports";
129
123
  export { ListCommentReportsResponse } from "./types/ListCommentReportsResponse";
130
124
  export { ListCommunities } from "./types/ListCommunities";
131
125
  export { ListCommunitiesResponse } from "./types/ListCommunitiesResponse";
126
+ export { ListPostLikes } from "./types/ListPostLikes";
127
+ export { ListPostLikesResponse } from "./types/ListPostLikesResponse";
132
128
  export { ListPostReports } from "./types/ListPostReports";
133
129
  export { ListPostReportsResponse } from "./types/ListPostReportsResponse";
134
130
  export { ListPrivateMessageReports } from "./types/ListPrivateMessageReports";
@@ -145,7 +141,7 @@ export { LocalUserView } from "./types/LocalUserView";
145
141
  export { LockPost } from "./types/LockPost";
146
142
  export { Login } from "./types/Login";
147
143
  export { LoginResponse } from "./types/LoginResponse";
148
- export { MarkAllAsRead } from "./types/MarkAllAsRead";
144
+ export { LoginToken } from "./types/LoginToken";
149
145
  export { MarkCommentReplyAsRead } from "./types/MarkCommentReplyAsRead";
150
146
  export { MarkPersonMentionAsRead } from "./types/MarkPersonMentionAsRead";
151
147
  export { MarkPostAsRead } from "./types/MarkPostAsRead";
@@ -162,8 +158,6 @@ export { ModFeaturePost } from "./types/ModFeaturePost";
162
158
  export { ModFeaturePostView } from "./types/ModFeaturePostView";
163
159
  export { ModHideCommunity } from "./types/ModHideCommunity";
164
160
  export { ModHideCommunityView } from "./types/ModHideCommunityView";
165
- export { ModJoin } from "./types/ModJoin";
166
- export { ModJoinResponse } from "./types/ModJoinResponse";
167
161
  export { ModLockPost } from "./types/ModLockPost";
168
162
  export { ModLockPostView } from "./types/ModLockPostView";
169
163
  export { ModRemoveComment } from "./types/ModRemoveComment";
@@ -177,9 +171,9 @@ export { ModTransferCommunityView } from "./types/ModTransferCommunityView";
177
171
  export { ModlogActionType } from "./types/ModlogActionType";
178
172
  export { ModlogListParams } from "./types/ModlogListParams";
179
173
  export { MyUserInfo } from "./types/MyUserInfo";
174
+ export { PaginationCursor } from "./types/PaginationCursor";
180
175
  export { PasswordChangeAfterReset } from "./types/PasswordChangeAfterReset";
181
176
  export { PasswordReset } from "./types/PasswordReset";
182
- export { PasswordResetResponse } from "./types/PasswordResetResponse";
183
177
  export { Person } from "./types/Person";
184
178
  export { PersonAggregates } from "./types/PersonAggregates";
185
179
  export { PersonBlockId } from "./types/PersonBlockId";
@@ -189,16 +183,12 @@ export { PersonMention } from "./types/PersonMention";
189
183
  export { PersonMentionId } from "./types/PersonMentionId";
190
184
  export { PersonMentionResponse } from "./types/PersonMentionResponse";
191
185
  export { PersonMentionView } from "./types/PersonMentionView";
192
- export { PersonSortType } from "./types/PersonSortType";
193
186
  export { PersonView } from "./types/PersonView";
194
187
  export { Post } from "./types/Post";
195
188
  export { PostAggregates } from "./types/PostAggregates";
196
189
  export { PostFeatureType } from "./types/PostFeatureType";
197
190
  export { PostId } from "./types/PostId";
198
- export { PostJoin } from "./types/PostJoin";
199
- export { PostJoinResponse } from "./types/PostJoinResponse";
200
191
  export { PostListingMode } from "./types/PostListingMode";
201
- export { PostOrCommentId } from "./types/PostOrCommentId";
202
192
  export { PostReport } from "./types/PostReport";
203
193
  export { PostReportId } from "./types/PostReportId";
204
194
  export { PostReportResponse } from "./types/PostReportResponse";
@@ -216,9 +206,9 @@ export { PrivateMessageView } from "./types/PrivateMessageView";
216
206
  export { PrivateMessagesResponse } from "./types/PrivateMessagesResponse";
217
207
  export { PurgeComment } from "./types/PurgeComment";
218
208
  export { PurgeCommunity } from "./types/PurgeCommunity";
219
- export { PurgeItemResponse } from "./types/PurgeItemResponse";
220
209
  export { PurgePerson } from "./types/PurgePerson";
221
210
  export { PurgePost } from "./types/PurgePost";
211
+ export { ReadableFederationState } from "./types/ReadableFederationState";
222
212
  export { Register } from "./types/Register";
223
213
  export { RegistrationApplication } from "./types/RegistrationApplication";
224
214
  export { RegistrationApplicationResponse } from "./types/RegistrationApplicationResponse";
@@ -246,10 +236,11 @@ export { SiteResponse } from "./types/SiteResponse";
246
236
  export { SiteView } from "./types/SiteView";
247
237
  export { SortType } from "./types/SortType";
248
238
  export { SubscribedType } from "./types/SubscribedType";
239
+ export { SuccessResponse } from "./types/SuccessResponse";
249
240
  export { Tagline } from "./types/Tagline";
250
241
  export { TransferCommunity } from "./types/TransferCommunity";
251
- export { UserJoin } from "./types/UserJoin";
252
- export { UserJoinResponse } from "./types/UserJoinResponse";
242
+ export { UpdateTotp } from "./types/UpdateTotp";
243
+ export { UpdateTotpResponse } from "./types/UpdateTotpResponse";
253
244
  export { VerifyEmail } from "./types/VerifyEmail";
254
- export { VerifyEmailResponse } from "./types/VerifyEmailResponse";
255
- export { UploadImage, UploadImageResponse, ImageFile } from "./types/others";
245
+ export { VoteView } from "./types/VoteView";
246
+ export { UploadImage, UploadImageResponse, ImageFile, DeleteImage, } from "./other_types";
@@ -2,10 +2,6 @@
2
2
  export declare const VERSION = "v3";
3
3
  export interface UploadImage {
4
4
  image: File | Buffer;
5
- /**
6
- * Optional if cookie with jwt set is already present. Otherwise, auth is required.
7
- */
8
- auth?: string;
9
5
  }
10
6
  export interface UploadImageResponse {
11
7
  /**
@@ -20,3 +16,7 @@ export interface ImageFile {
20
16
  file: string;
21
17
  delete_token: string;
22
18
  }
19
+ export interface DeleteImage {
20
+ token: string;
21
+ filename: string;
22
+ }
@@ -0,0 +1 @@
1
+ export type ActivityId = number;
@@ -2,5 +2,4 @@ import type { PersonId } from "./PersonId";
2
2
  export interface AddAdmin {
3
3
  person_id: PersonId;
4
4
  added: boolean;
5
- auth: string;
6
5
  }
@@ -4,5 +4,4 @@ export interface AddModToCommunity {
4
4
  community_id: CommunityId;
5
5
  person_id: PersonId;
6
6
  added: boolean;
7
- auth: string;
8
7
  }
@@ -2,5 +2,4 @@ export interface ApproveRegistrationApplication {
2
2
  id: number;
3
3
  approve: boolean;
4
4
  deny_reason?: string;
5
- auth: string;
6
5
  }
@@ -7,5 +7,4 @@ export interface BanFromCommunity {
7
7
  remove_data?: boolean;
8
8
  reason?: string;
9
9
  expires?: number;
10
- auth: string;
11
10
  }
@@ -5,5 +5,4 @@ export interface BanPerson {
5
5
  remove_data?: boolean;
6
6
  reason?: string;
7
7
  expires?: number;
8
- auth: string;
9
8
  }
@@ -2,5 +2,4 @@ import type { CommunityId } from "./CommunityId";
2
2
  export interface BlockCommunity {
3
3
  community_id: CommunityId;
4
4
  block: boolean;
5
- auth: string;
6
5
  }
@@ -2,5 +2,4 @@ import type { InstanceId } from "./InstanceId";
2
2
  export interface BlockInstance {
3
3
  instance_id: InstanceId;
4
4
  block: boolean;
5
- auth: string;
6
5
  }
@@ -2,5 +2,4 @@ import type { PersonId } from "./PersonId";
2
2
  export interface BlockPerson {
3
3
  person_id: PersonId;
4
4
  block: boolean;
5
- auth: string;
6
5
  }
@@ -2,5 +2,4 @@ export interface ChangePassword {
2
2
  new_password: string;
3
3
  new_password_verify: string;
4
4
  old_password: string;
5
- auth: string;
6
5
  }
@@ -1,12 +1,9 @@
1
1
  import type { CommentId } from "./CommentId";
2
2
  export interface CommentAggregates {
3
- id: number;
4
3
  comment_id: CommentId;
5
4
  score: number;
6
5
  upvotes: number;
7
6
  downvotes: number;
8
7
  published: string;
9
8
  child_count: number;
10
- hot_rank: number;
11
- controversy_rank: number;
12
9
  }
@@ -14,6 +14,8 @@ export interface CommentReplyView {
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;
@@ -11,6 +11,8 @@ export interface CommentView {
11
11
  community: Community;
12
12
  counts: CommentAggregates;
13
13
  creator_banned_from_community: boolean;
14
+ creator_is_moderator: boolean;
15
+ creator_is_admin: boolean;
14
16
  subscribed: SubscribedType;
15
17
  saved: boolean;
16
18
  creator_blocked: boolean;
@@ -14,8 +14,6 @@ export interface Community {
14
14
  local: boolean;
15
15
  icon?: string;
16
16
  banner?: string;
17
- followers_url: string;
18
- inbox_url: string;
19
17
  hidden: boolean;
20
18
  posting_restricted_to_mods: boolean;
21
19
  instance_id: InstanceId;
@@ -1,6 +1,5 @@
1
1
  import type { CommunityId } from "./CommunityId";
2
2
  export interface CommunityAggregates {
3
- id: number;
4
3
  community_id: CommunityId;
5
4
  subscribers: number;
6
5
  posts: number;
@@ -10,5 +9,4 @@ export interface CommunityAggregates {
10
9
  users_active_week: number;
11
10
  users_active_month: number;
12
11
  users_active_half_year: number;
13
- hot_rank: number;
14
12
  }
@@ -6,5 +6,4 @@ export interface CreateComment {
6
6
  post_id: PostId;
7
7
  parent_id?: CommentId;
8
8
  language_id?: LanguageId;
9
- auth: string;
10
9
  }
@@ -2,5 +2,4 @@ import type { CommentId } from "./CommentId";
2
2
  export interface CreateCommentLike {
3
3
  comment_id: CommentId;
4
4
  score: number;
5
- auth: string;
6
5
  }
@@ -2,5 +2,4 @@ import type { CommentId } from "./CommentId";
2
2
  export interface CreateCommentReport {
3
3
  comment_id: CommentId;
4
4
  reason: string;
5
- auth: string;
6
5
  }
@@ -8,5 +8,4 @@ export interface CreateCommunity {
8
8
  nsfw?: boolean;
9
9
  posting_restricted_to_mods?: boolean;
10
10
  discussion_languages?: Array<LanguageId>;
11
- auth: string;
12
11
  }
@@ -4,5 +4,4 @@ export interface CreateCustomEmoji {
4
4
  image_url: string;
5
5
  alt_text: string;
6
6
  keywords: Array<string>;
7
- auth: string;
8
7
  }
@@ -8,5 +8,4 @@ export interface CreatePost {
8
8
  honeypot?: string;
9
9
  nsfw?: boolean;
10
10
  language_id?: LanguageId;
11
- auth: string;
12
11
  }
@@ -2,5 +2,4 @@ import type { PostId } from "./PostId";
2
2
  export interface CreatePostLike {
3
3
  post_id: PostId;
4
4
  score: number;
5
- auth: string;
6
5
  }
@@ -2,5 +2,4 @@ import type { PostId } from "./PostId";
2
2
  export interface CreatePostReport {
3
3
  post_id: PostId;
4
4
  reason: string;
5
- auth: string;
6
5
  }
@@ -2,5 +2,4 @@ import type { PersonId } from "./PersonId";
2
2
  export interface CreatePrivateMessage {
3
3
  content: string;
4
4
  recipient_id: PersonId;
5
- auth: string;
6
5
  }
@@ -2,5 +2,4 @@ import type { PrivateMessageId } from "./PrivateMessageId";
2
2
  export interface CreatePrivateMessageReport {
3
3
  private_message_id: PrivateMessageId;
4
4
  reason: string;
5
- auth: string;
6
5
  }
@@ -41,5 +41,4 @@ export interface CreateSite {
41
41
  blocked_instances?: Array<string>;
42
42
  taglines?: Array<string>;
43
43
  registration_mode?: RegistrationMode;
44
- auth: string;
45
44
  }
@@ -1,6 +1,5 @@
1
1
  import type { CustomEmojiId } from "./CustomEmojiId";
2
2
  export interface CustomEmojiKeyword {
3
- id: number;
4
3
  custom_emoji_id: CustomEmojiId;
5
4
  keyword: string;
6
5
  }
@@ -1,5 +1,4 @@
1
1
  export interface DeleteAccount {
2
2
  password: string;
3
3
  delete_content: boolean;
4
- auth: string;
5
4
  }
@@ -2,5 +2,4 @@ import type { CommentId } from "./CommentId";
2
2
  export interface DeleteComment {
3
3
  comment_id: CommentId;
4
4
  deleted: boolean;
5
- auth: string;
6
5
  }
@@ -2,5 +2,4 @@ import type { CommunityId } from "./CommunityId";
2
2
  export interface DeleteCommunity {
3
3
  community_id: CommunityId;
4
4
  deleted: boolean;
5
- auth: string;
6
5
  }
@@ -1,5 +1,4 @@
1
1
  import type { CustomEmojiId } from "./CustomEmojiId";
2
2
  export interface DeleteCustomEmoji {
3
3
  id: CustomEmojiId;
4
- auth: string;
5
4
  }
@@ -2,5 +2,4 @@ import type { PostId } from "./PostId";
2
2
  export interface DeletePost {
3
3
  post_id: PostId;
4
4
  deleted: boolean;
5
- auth: string;
6
5
  }
@@ -2,5 +2,4 @@ import type { PrivateMessageId } from "./PrivateMessageId";
2
2
  export interface DeletePrivateMessage {
3
3
  private_message_id: PrivateMessageId;
4
4
  deleted: boolean;
5
- auth: string;
6
5
  }
@@ -2,5 +2,4 @@ import type { CommentId } from "./CommentId";
2
2
  export interface DistinguishComment {
3
3
  comment_id: CommentId;
4
4
  distinguished: boolean;
5
- auth: string;
6
5
  }
@@ -4,5 +4,4 @@ export interface EditComment {
4
4
  comment_id: CommentId;
5
5
  content?: string;
6
6
  language_id?: LanguageId;
7
- auth: string;
8
7
  }
@@ -9,5 +9,4 @@ export interface EditCommunity {
9
9
  nsfw?: boolean;
10
10
  posting_restricted_to_mods?: boolean;
11
11
  discussion_languages?: Array<LanguageId>;
12
- auth: string;
13
12
  }
@@ -5,5 +5,4 @@ export interface EditCustomEmoji {
5
5
  image_url: string;
6
6
  alt_text: string;
7
7
  keywords: Array<string>;
8
- auth: string;
9
8
  }
@@ -7,5 +7,4 @@ export interface EditPost {
7
7
  body?: string;
8
8
  nsfw?: boolean;
9
9
  language_id?: LanguageId;
10
- auth: string;
11
10
  }
@@ -2,5 +2,4 @@ import type { PrivateMessageId } from "./PrivateMessageId";
2
2
  export interface EditPrivateMessage {
3
3
  private_message_id: PrivateMessageId;
4
4
  content: string;
5
- auth: string;
6
5
  }
@@ -42,5 +42,4 @@ export interface EditSite {
42
42
  taglines?: Array<string>;
43
43
  registration_mode?: RegistrationMode;
44
44
  reports_email_admins?: boolean;
45
- auth: string;
46
45
  }
@@ -4,5 +4,4 @@ export interface FeaturePost {
4
4
  post_id: PostId;
5
5
  featured: boolean;
6
6
  feature_type: PostFeatureType;
7
- auth: string;
8
7
  }
@@ -1,6 +1,6 @@
1
- import type { Instance } from "./Instance";
1
+ import type { InstanceWithFederationState } from "./InstanceWithFederationState";
2
2
  export interface FederatedInstances {
3
- linked: Array<Instance>;
4
- allowed: Array<Instance>;
5
- blocked: Array<Instance>;
3
+ linked: Array<InstanceWithFederationState>;
4
+ allowed: Array<InstanceWithFederationState>;
5
+ blocked: Array<InstanceWithFederationState>;
6
6
  }
@@ -2,5 +2,4 @@ import type { CommunityId } from "./CommunityId";
2
2
  export interface FollowCommunity {
3
3
  community_id: CommunityId;
4
4
  follow: boolean;
5
- auth: string;
6
5
  }
@@ -0,0 +1,3 @@
1
+ export interface GenerateTotpSecretResponse {
2
+ totp_secret_url: string;
3
+ }
@@ -1,5 +1,4 @@
1
1
  import type { CommentId } from "./CommentId";
2
2
  export interface GetComment {
3
3
  id: CommentId;
4
- auth?: string;
5
4
  }
@@ -16,5 +16,4 @@ export interface GetComments {
16
16
  saved_only?: boolean;
17
17
  liked_only?: boolean;
18
18
  disliked_only?: boolean;
19
- auth?: string;
20
19
  }
@@ -2,5 +2,4 @@ import type { CommunityId } from "./CommunityId";
2
2
  export interface GetCommunity {
3
3
  id?: CommunityId;
4
4
  name?: string;
5
- auth?: string;
6
5
  }
@@ -8,5 +8,4 @@ export interface GetModlog {
8
8
  limit?: number;
9
9
  type_?: ModlogActionType;
10
10
  other_person_id?: PersonId;
11
- auth?: string;
12
11
  }
@@ -9,5 +9,4 @@ export interface GetPersonDetails {
9
9
  limit?: number;
10
10
  community_id?: CommunityId;
11
11
  saved_only?: boolean;
12
- auth?: string;
13
12
  }
@@ -4,5 +4,4 @@ export interface GetPersonMentions {
4
4
  page?: number;
5
5
  limit?: number;
6
6
  unread_only?: boolean;
7
- auth: string;
8
7
  }
@@ -3,5 +3,4 @@ import type { PostId } from "./PostId";
3
3
  export interface GetPost {
4
4
  id?: PostId;
5
5
  comment_id?: CommentId;
6
- auth?: string;
7
6
  }
@@ -1,5 +1,6 @@
1
1
  import type { CommunityId } from "./CommunityId";
2
2
  import type { ListingType } from "./ListingType";
3
+ import type { PaginationCursor } from "./PaginationCursor";
3
4
  import type { SortType } from "./SortType";
4
5
  export interface GetPosts {
5
6
  type_?: ListingType;
@@ -11,5 +12,5 @@ export interface GetPosts {
11
12
  saved_only?: boolean;
12
13
  liked_only?: boolean;
13
14
  disliked_only?: boolean;
14
- auth?: string;
15
+ page_cursor?: PaginationCursor;
15
16
  }
@@ -1,4 +1,6 @@
1
+ import type { PaginationCursor } from "./PaginationCursor";
1
2
  import type { PostView } from "./PostView";
2
3
  export interface GetPostsResponse {
3
4
  posts: Array<PostView>;
5
+ next_page?: PaginationCursor;
4
6
  }
@@ -4,5 +4,4 @@ export interface GetPrivateMessages {
4
4
  page?: number;
5
5
  limit?: number;
6
6
  creator_id?: PersonId;
7
- auth: string;
8
7
  }
@@ -4,5 +4,4 @@ export interface GetReplies {
4
4
  page?: number;
5
5
  limit?: number;
6
6
  unread_only?: boolean;
7
- auth: string;
8
7
  }
@@ -1,5 +1,4 @@
1
1
  import type { CommunityId } from "./CommunityId";
2
2
  export interface GetReportCount {
3
3
  community_id?: CommunityId;
4
- auth: string;
5
4
  }
@@ -3,5 +3,4 @@ export interface HideCommunity {
3
3
  community_id: CommunityId;
4
4
  hidden: boolean;
5
5
  reason?: string;
6
- auth: string;
7
6
  }
@@ -0,0 +1,7 @@
1
+ import type { LocalUserId } from "./LocalUserId";
2
+ export interface ImageUpload {
3
+ local_user_id: LocalUserId;
4
+ pictrs_alias: string;
5
+ pictrs_delete_token: string;
6
+ published: string;
7
+ }
@@ -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
+ }