lemmy-js-client 0.20.0-reports-combined.2 → 0.20.0-search-combined.1
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/http.d.ts +161 -58
- package/dist/http.js +251 -104
- package/dist/index.d.ts +55 -16
- package/dist/other_types.d.ts +1 -18
- package/dist/other_types.js +1 -1
- package/dist/types/AdminAllowInstance.d.ts +3 -2
- package/dist/types/AdminAllowInstanceId.d.ts +1 -0
- package/dist/types/AdminAllowInstanceView.d.ts +1 -1
- package/dist/types/AdminBlockInstance.d.ts +3 -2
- package/dist/types/AdminBlockInstanceId.d.ts +1 -0
- package/dist/types/AdminPurgeComment.d.ts +3 -2
- package/dist/types/AdminPurgeCommentId.d.ts +1 -0
- package/dist/types/AdminPurgeCommentId.js +3 -0
- package/dist/types/AdminPurgeCommunity.d.ts +3 -2
- package/dist/types/AdminPurgeCommunityId.d.ts +1 -0
- package/dist/types/AdminPurgeCommunityId.js +3 -0
- package/dist/types/AdminPurgePerson.d.ts +3 -2
- package/dist/types/AdminPurgePersonId.d.ts +1 -0
- package/dist/types/AdminPurgePersonId.js +3 -0
- package/dist/types/AdminPurgePost.d.ts +3 -2
- package/dist/types/AdminPurgePostId.d.ts +1 -0
- package/dist/types/AdminPurgePostId.js +3 -0
- package/dist/types/CommunityAggregates.d.ts +2 -0
- package/dist/types/CommunityReport.d.ts +22 -0
- package/dist/types/CommunityReportId.d.ts +4 -0
- package/dist/types/CommunityReportId.js +3 -0
- package/dist/types/CommunityReportView.d.ts +16 -0
- package/dist/types/CreatePost.d.ts +2 -0
- package/dist/types/CreateSite.d.ts +1 -4
- package/dist/types/DeleteImageParams.d.ts +3 -0
- package/dist/types/DeleteImageParams.js +3 -0
- package/dist/types/EditCommunity.d.ts +0 -8
- package/dist/types/EditPost.d.ts +2 -0
- package/dist/types/EditSite.d.ts +5 -16
- package/dist/types/FederationError.d.ts +1 -1
- package/dist/types/GetComments.d.ts +0 -1
- package/dist/types/GetModlog.d.ts +3 -2
- package/dist/types/GetModlogResponse.d.ts +2 -34
- package/dist/types/GetPersonDetails.d.ts +0 -7
- package/dist/types/GetPersonDetailsResponse.d.ts +0 -4
- package/dist/types/GetPosts.d.ts +5 -0
- package/dist/types/GetRandomCommunity.d.ts +1 -0
- package/dist/types/GetSiteResponse.d.ts +1 -10
- package/dist/types/GetUnreadCountResponse.d.ts +2 -4
- package/dist/types/ImageGetParams.d.ts +4 -0
- package/dist/types/ImageGetParams.js +3 -0
- package/dist/types/ImageProxyParams.d.ts +5 -0
- package/dist/types/ImageProxyParams.js +3 -0
- package/dist/types/InboxCombinedPaginationCursor.d.ts +4 -0
- package/dist/types/InboxCombinedPaginationCursor.js +3 -0
- package/dist/types/InboxCombinedView.d.ts +13 -0
- package/dist/types/InboxDataType.d.ts +4 -0
- package/dist/types/InboxDataType.js +3 -0
- package/dist/types/LemmyErrorType.d.ts +5 -3
- package/dist/types/ListInbox.d.ts +11 -0
- package/dist/types/ListInboxResponse.d.ts +7 -0
- package/dist/types/ListPersonContent.d.ts +18 -0
- package/dist/types/ListPersonContentResponse.d.ts +7 -0
- package/dist/types/ListPersonSaved.d.ts +10 -0
- package/dist/types/ListPersonSavedResponse.d.ts +7 -0
- package/dist/types/LocalImage.d.ts +0 -1
- package/dist/types/LocalSite.d.ts +5 -0
- package/dist/types/LocalUser.d.ts +9 -0
- package/dist/types/MarkPersonCommentMentionAsRead.d.ts +8 -0
- package/dist/types/MarkPersonPostMentionAsRead.d.ts +8 -0
- package/dist/types/ModAdd.d.ts +3 -2
- package/dist/types/ModAddCommunity.d.ts +3 -2
- package/dist/types/ModAddCommunityId.d.ts +1 -0
- package/dist/types/ModAddCommunityId.js +3 -0
- package/dist/types/ModAddCommunityView.d.ts +1 -1
- package/dist/types/ModAddId.d.ts +1 -0
- package/dist/types/ModAddId.js +3 -0
- package/dist/types/ModAddView.d.ts +1 -1
- package/dist/types/ModBan.d.ts +3 -2
- package/dist/types/ModBanFromCommunity.d.ts +3 -2
- package/dist/types/ModBanFromCommunityId.d.ts +1 -0
- package/dist/types/ModBanFromCommunityId.js +3 -0
- package/dist/types/ModBanFromCommunityView.d.ts +1 -1
- package/dist/types/ModBanId.d.ts +1 -0
- package/dist/types/ModBanId.js +3 -0
- package/dist/types/ModBanView.d.ts +1 -1
- package/dist/types/ModFeaturePost.d.ts +3 -2
- package/dist/types/ModFeaturePostId.d.ts +1 -0
- package/dist/types/ModFeaturePostId.js +3 -0
- package/dist/types/ModFeaturePostView.d.ts +1 -0
- package/dist/types/ModHideCommunity.d.ts +3 -2
- package/dist/types/ModHideCommunityId.d.ts +1 -0
- package/dist/types/ModHideCommunityId.js +3 -0
- package/dist/types/ModLockPost.d.ts +3 -2
- package/dist/types/ModLockPostId.d.ts +1 -0
- package/dist/types/ModLockPostId.js +3 -0
- package/dist/types/ModLockPostView.d.ts +1 -0
- package/dist/types/ModRemoveComment.d.ts +3 -2
- package/dist/types/ModRemoveCommentId.d.ts +1 -0
- package/dist/types/ModRemoveCommentId.js +3 -0
- package/dist/types/ModRemoveCommentView.d.ts +1 -1
- package/dist/types/ModRemoveCommunity.d.ts +3 -2
- package/dist/types/ModRemoveCommunityId.d.ts +1 -0
- package/dist/types/ModRemoveCommunityId.js +3 -0
- package/dist/types/ModRemovePost.d.ts +3 -2
- package/dist/types/ModRemovePostId.d.ts +1 -0
- package/dist/types/ModRemovePostId.js +3 -0
- package/dist/types/ModRemovePostView.d.ts +1 -0
- package/dist/types/ModTransferCommunity.d.ts +3 -2
- package/dist/types/ModTransferCommunityId.d.ts +1 -0
- package/dist/types/ModTransferCommunityId.js +3 -0
- package/dist/types/ModTransferCommunityView.d.ts +1 -1
- package/dist/types/ModlogCombinedPaginationCursor.d.ts +4 -0
- package/dist/types/ModlogCombinedPaginationCursor.js +3 -0
- package/dist/types/ModlogCombinedView.d.ts +52 -0
- package/dist/types/{PersonMention.d.ts → PersonCommentMention.d.ts} +3 -3
- package/dist/types/PersonCommentMentionId.d.ts +4 -0
- package/dist/types/PersonCommentMentionId.js +3 -0
- package/dist/types/{PersonMentionView.d.ts → PersonCommentMentionView.d.ts} +4 -4
- package/dist/types/PersonCommentMentionView.js +2 -0
- package/dist/types/PersonContentCombinedPaginationCursor.d.ts +4 -0
- package/dist/types/PersonContentCombinedPaginationCursor.js +3 -0
- package/dist/types/PersonContentCombinedView.d.ts +7 -0
- package/dist/types/PersonContentCombinedView.js +2 -0
- package/dist/types/PersonContentType.d.ts +4 -0
- package/dist/types/PersonContentType.js +3 -0
- package/dist/types/PersonPostMention.d.ts +13 -0
- package/dist/types/PersonPostMention.js +2 -0
- package/dist/types/PersonPostMentionId.d.ts +4 -0
- package/dist/types/PersonPostMentionId.js +3 -0
- package/dist/types/PersonPostMentionView.d.ts +32 -0
- package/dist/types/PersonPostMentionView.js +2 -0
- package/dist/types/PersonSavedCombinedPaginationCursor.d.ts +4 -0
- package/dist/types/PersonSavedCombinedPaginationCursor.js +3 -0
- package/dist/types/PostTags.d.ts +7 -0
- package/dist/types/PostTags.js +2 -0
- package/dist/types/PostView.d.ts +2 -0
- package/dist/types/ReportCombinedView.d.ts +4 -1
- package/dist/types/SaveUserSettings.d.ts +4 -8
- package/dist/types/Search.d.ts +7 -7
- package/dist/types/SearchCombinedId.d.ts +4 -0
- package/dist/types/SearchCombinedId.js +3 -0
- package/dist/types/SearchCombinedPaginationCursor.d.ts +4 -0
- package/dist/types/SearchCombinedPaginationCursor.js +3 -0
- package/dist/types/SearchCombinedView.d.ts +13 -0
- package/dist/types/SearchCombinedView.js +2 -0
- package/dist/types/SearchResponse.d.ts +2 -10
- package/dist/types/SearchSortType.d.ts +4 -0
- package/dist/types/SearchSortType.js +3 -0
- package/dist/types/SiteResponse.d.ts +1 -1
- package/dist/types/Tag.d.ts +27 -0
- package/dist/types/Tag.js +2 -0
- package/dist/types/TagId.d.ts +4 -0
- package/dist/types/TagId.js +3 -0
- package/dist/types/UploadImageResponse.d.ts +4 -0
- package/dist/types/UploadImageResponse.js +3 -0
- package/package.json +2 -2
- package/dist/types/CommentReplyResponse.d.ts +0 -7
- package/dist/types/GetPersonMentions.d.ts +0 -10
- package/dist/types/GetPersonMentionsResponse.d.ts +0 -7
- package/dist/types/GetPrivateMessages.d.ts +0 -10
- package/dist/types/GetReplies.d.ts +0 -10
- package/dist/types/GetRepliesResponse.d.ts +0 -7
- package/dist/types/MarkPersonMentionAsRead.d.ts +0 -8
- package/dist/types/ModlogListParams.d.ts +0 -17
- package/dist/types/PersonMentionId.d.ts +0 -4
- package/dist/types/PersonMentionResponse.d.ts +0 -7
- package/dist/types/PrivateMessagesResponse.d.ts +0 -7
- package/dist/types/ReportCombined.d.ts +0 -14
- package/dist/types/ReportCombinedId.d.ts +0 -4
- /package/dist/types/{PersonMentionId.js → AdminAllowInstanceId.js} +0 -0
- /package/dist/types/{ReportCombinedId.js → AdminBlockInstanceId.js} +0 -0
- /package/dist/types/{CommentReplyResponse.js → CommunityReport.js} +0 -0
- /package/dist/types/{GetPersonMentions.js → CommunityReportView.js} +0 -0
- /package/dist/types/{GetPersonMentionsResponse.js → InboxCombinedView.js} +0 -0
- /package/dist/types/{GetPrivateMessages.js → ListInbox.js} +0 -0
- /package/dist/types/{GetReplies.js → ListInboxResponse.js} +0 -0
- /package/dist/types/{GetRepliesResponse.js → ListPersonContent.js} +0 -0
- /package/dist/types/{MarkPersonMentionAsRead.js → ListPersonContentResponse.js} +0 -0
- /package/dist/types/{ModlogListParams.js → ListPersonSaved.js} +0 -0
- /package/dist/types/{PersonMention.js → ListPersonSavedResponse.js} +0 -0
- /package/dist/types/{PersonMentionResponse.js → MarkPersonCommentMentionAsRead.js} +0 -0
- /package/dist/types/{PersonMentionView.js → MarkPersonPostMentionAsRead.js} +0 -0
- /package/dist/types/{PrivateMessagesResponse.js → ModlogCombinedView.js} +0 -0
- /package/dist/types/{ReportCombined.js → PersonCommentMention.js} +0 -0
package/dist/http.d.ts
CHANGED
@@ -5,6 +5,7 @@ import { AddModToCommunityResponse } from "./types/AddModToCommunityResponse";
|
|
5
5
|
import { ApproveRegistrationApplication } from "./types/ApproveRegistrationApplication";
|
6
6
|
import { BanFromCommunity } from "./types/BanFromCommunity";
|
7
7
|
import { BanFromCommunityResponse } from "./types/BanFromCommunityResponse";
|
8
|
+
import { MarkManyPostsAsRead } from "./types/MarkManyPostsAsRead";
|
8
9
|
import { BanPerson } from "./types/BanPerson";
|
9
10
|
import { BanPersonResponse } from "./types/BanPersonResponse";
|
10
11
|
import { BannedPersonsResponse } from "./types/BannedPersonsResponse";
|
@@ -13,7 +14,6 @@ import { BlockCommunityResponse } from "./types/BlockCommunityResponse";
|
|
13
14
|
import { BlockPerson } from "./types/BlockPerson";
|
14
15
|
import { BlockPersonResponse } from "./types/BlockPersonResponse";
|
15
16
|
import { ChangePassword } from "./types/ChangePassword";
|
16
|
-
import { CommentReplyResponse } from "./types/CommentReplyResponse";
|
17
17
|
import { CommentReportResponse } from "./types/CommentReportResponse";
|
18
18
|
import { CommentResponse } from "./types/CommentResponse";
|
19
19
|
import { CommunityResponse } from "./types/CommunityResponse";
|
@@ -59,15 +59,10 @@ import { GetModlog } from "./types/GetModlog";
|
|
59
59
|
import { GetModlogResponse } from "./types/GetModlogResponse";
|
60
60
|
import { GetPersonDetails } from "./types/GetPersonDetails";
|
61
61
|
import { GetPersonDetailsResponse } from "./types/GetPersonDetailsResponse";
|
62
|
-
import { GetPersonMentions } from "./types/GetPersonMentions";
|
63
|
-
import { GetPersonMentionsResponse } from "./types/GetPersonMentionsResponse";
|
64
62
|
import { GetPost } from "./types/GetPost";
|
65
63
|
import { GetPostResponse } from "./types/GetPostResponse";
|
66
64
|
import { GetPosts } from "./types/GetPosts";
|
67
65
|
import { GetPostsResponse } from "./types/GetPostsResponse";
|
68
|
-
import { GetPrivateMessages } from "./types/GetPrivateMessages";
|
69
|
-
import { GetReplies } from "./types/GetReplies";
|
70
|
-
import { GetRepliesResponse } from "./types/GetRepliesResponse";
|
71
66
|
import { GetReportCount } from "./types/GetReportCount";
|
72
67
|
import { GetReportCountResponse } from "./types/GetReportCountResponse";
|
73
68
|
import { GetSiteMetadata } from "./types/GetSiteMetadata";
|
@@ -83,17 +78,14 @@ import { LockPost } from "./types/LockPost";
|
|
83
78
|
import { Login } from "./types/Login";
|
84
79
|
import { LoginResponse } from "./types/LoginResponse";
|
85
80
|
import { MarkCommentReplyAsRead } from "./types/MarkCommentReplyAsRead";
|
86
|
-
import { MarkPersonMentionAsRead } from "./types/MarkPersonMentionAsRead";
|
87
81
|
import { MarkPostAsRead } from "./types/MarkPostAsRead";
|
88
82
|
import { MarkPrivateMessageAsRead } from "./types/MarkPrivateMessageAsRead";
|
89
83
|
import { PasswordChangeAfterReset } from "./types/PasswordChangeAfterReset";
|
90
84
|
import { PasswordReset } from "./types/PasswordReset";
|
91
|
-
import { PersonMentionResponse } from "./types/PersonMentionResponse";
|
92
85
|
import { PostReportResponse } from "./types/PostReportResponse";
|
93
86
|
import { PostResponse } from "./types/PostResponse";
|
94
87
|
import { PrivateMessageReportResponse } from "./types/PrivateMessageReportResponse";
|
95
88
|
import { PrivateMessageResponse } from "./types/PrivateMessageResponse";
|
96
|
-
import { PrivateMessagesResponse } from "./types/PrivateMessagesResponse";
|
97
89
|
import { PurgeComment } from "./types/PurgeComment";
|
98
90
|
import { PurgeCommunity } from "./types/PurgeCommunity";
|
99
91
|
import { PurgePerson } from "./types/PurgePerson";
|
@@ -116,7 +108,7 @@ import { SearchResponse } from "./types/SearchResponse";
|
|
116
108
|
import { SiteResponse } from "./types/SiteResponse";
|
117
109
|
import { TransferCommunity } from "./types/TransferCommunity";
|
118
110
|
import { VerifyEmail } from "./types/VerifyEmail";
|
119
|
-
import {
|
111
|
+
import { UploadImage } from "./other_types";
|
120
112
|
import { HideCommunity } from "./types/HideCommunity";
|
121
113
|
import { GenerateTotpSecretResponse } from "./types/GenerateTotpSecretResponse";
|
122
114
|
import { UpdateTotp } from "./types/UpdateTotp";
|
@@ -148,9 +140,20 @@ import { ListCommunityPendingFollows } from "./types/ListCommunityPendingFollows
|
|
148
140
|
import { CommunityId } from "./types/CommunityId";
|
149
141
|
import { ListReports } from "./types/ListReports";
|
150
142
|
import { ListReportsResponse } from "./types/ListReportsResponse";
|
143
|
+
import { MyUserInfo } from "./types/MyUserInfo";
|
151
144
|
import { UserBlockInstanceParams } from "./types/UserBlockInstanceParams";
|
152
145
|
import { AdminAllowInstanceParams } from "./types/AdminAllowInstanceParams";
|
153
146
|
import { AdminBlockInstanceParams } from "./types/AdminBlockInstanceParams";
|
147
|
+
import { ListPersonContent } from "./types/ListPersonContent";
|
148
|
+
import { ListPersonContentResponse } from "./types/ListPersonContentResponse";
|
149
|
+
import { ListPersonSaved } from "./types/ListPersonSaved";
|
150
|
+
import { ListPersonSavedResponse } from "./types/ListPersonSavedResponse";
|
151
|
+
import { DeleteImageParams } from "./types/DeleteImageParams";
|
152
|
+
import { UploadImageResponse } from "./types/UploadImageResponse";
|
153
|
+
import { ListInboxResponse } from "./types/ListInboxResponse";
|
154
|
+
import { ListInbox } from "./types/ListInbox";
|
155
|
+
import { MarkPersonCommentMentionAsRead } from "./types/MarkPersonCommentMentionAsRead";
|
156
|
+
import { MarkPersonPostMentionAsRead } from "./types/MarkPersonPostMentionAsRead";
|
154
157
|
type RequestOptions = Pick<RequestInit, "signal">;
|
155
158
|
/**
|
156
159
|
* Helps build lemmy HTTP requests.
|
@@ -189,40 +192,46 @@ export declare class LemmyHttp {
|
|
189
192
|
/**
|
190
193
|
* Leave the Site admins.
|
191
194
|
*
|
192
|
-
* `HTTP.POST /
|
195
|
+
* `HTTP.POST /admin/leave`
|
193
196
|
*/
|
194
197
|
leaveAdmin(options?: RequestOptions): Promise<GetSiteResponse>;
|
195
198
|
/**
|
196
199
|
* Generate a TOTP / two-factor secret.
|
197
200
|
*
|
198
|
-
* Afterwards you need to call `/
|
201
|
+
* Afterwards you need to call `/account/auth/totp/update` with a valid token to enable it.
|
199
202
|
*
|
200
|
-
* `HTTP.POST /
|
203
|
+
* `HTTP.POST /account/auth/totp/generate`
|
201
204
|
*/
|
202
205
|
generateTotpSecret(options?: RequestOptions): Promise<GenerateTotpSecretResponse>;
|
206
|
+
/**
|
207
|
+
* Get data of current user.
|
208
|
+
*
|
209
|
+
* `HTTP.GET /account`
|
210
|
+
*/
|
211
|
+
getMyUser(options?: RequestOptions): Promise<MyUserInfo>;
|
203
212
|
/**
|
204
213
|
* Export a backup of your user settings, including your saved content,
|
205
214
|
* followed communities, and blocks.
|
206
215
|
*
|
207
|
-
* `HTTP.GET /
|
216
|
+
* `HTTP.GET /account/settings/export`
|
208
217
|
*/
|
209
218
|
exportSettings(options?: RequestOptions): Promise<string>;
|
210
219
|
/**
|
211
220
|
* Import a backup of your user settings.
|
212
221
|
*
|
213
|
-
* `HTTP.POST /
|
222
|
+
* `HTTP.POST /account/settings/import`
|
214
223
|
*/
|
215
224
|
importSettings(form: any, options?: RequestOptions): Promise<SuccessResponse>;
|
216
225
|
/**
|
217
226
|
* List login tokens for your user
|
218
227
|
*
|
219
|
-
* `HTTP.GET /
|
228
|
+
* `HTTP.GET /account/list_logins`
|
220
229
|
*/
|
221
230
|
listLogins(options?: RequestOptions): Promise<LoginToken[]>;
|
222
231
|
/**
|
223
232
|
* Returns an error message if your auth token is invalid
|
224
233
|
*
|
225
|
-
* `HTTP.GET /
|
234
|
+
* `HTTP.GET /account/validate_auth`
|
226
235
|
*/
|
227
236
|
validateAuth(options?: RequestOptions): Promise<SuccessResponse>;
|
228
237
|
/**
|
@@ -240,11 +249,11 @@ export declare class LemmyHttp {
|
|
240
249
|
/**
|
241
250
|
* Enable / Disable TOTP / two-factor authentication.
|
242
251
|
*
|
243
|
-
* To enable, you need to first call `/
|
252
|
+
* To enable, you need to first call `/account/auth/totp/generate` and then pass a valid token to this.
|
244
253
|
*
|
245
254
|
* Disabling is only possible if 2FA was previously enabled. Again it is necessary to pass a valid token.
|
246
255
|
*
|
247
|
-
* `HTTP.POST /
|
256
|
+
* `HTTP.POST /account/auth/totp/update`
|
248
257
|
*/
|
249
258
|
updateTotp(form: UpdateTotp, options?: RequestOptions): Promise<UpdateTotpResponse>;
|
250
259
|
/**
|
@@ -301,7 +310,7 @@ export declare class LemmyHttp {
|
|
301
310
|
/**
|
302
311
|
* Block a community.
|
303
312
|
*
|
304
|
-
* `HTTP.POST /
|
313
|
+
* `HTTP.POST /account/block/community`
|
305
314
|
*/
|
306
315
|
blockCommunity(form: BlockCommunity, options?: RequestOptions): Promise<BlockCommunityResponse>;
|
307
316
|
/**
|
@@ -382,6 +391,12 @@ export declare class LemmyHttp {
|
|
382
391
|
* `HTTP.POST /post/mark_as_read`
|
383
392
|
*/
|
384
393
|
markPostAsRead(form: MarkPostAsRead, options?: RequestOptions): Promise<SuccessResponse>;
|
394
|
+
/**
|
395
|
+
* Mark multiple posts as read.
|
396
|
+
*
|
397
|
+
* `HTTP.POST /post/mark_as_read/many`
|
398
|
+
*/
|
399
|
+
markManyPostAsRead(form: MarkManyPostsAsRead, options?: RequestOptions): Promise<SuccessResponse>;
|
385
400
|
/**
|
386
401
|
* Hide a post from list views.
|
387
402
|
*
|
@@ -471,7 +486,7 @@ export declare class LemmyHttp {
|
|
471
486
|
*
|
472
487
|
* `HTTP.POST /comment/mark_as_read`
|
473
488
|
*/
|
474
|
-
markCommentReplyAsRead(form: MarkCommentReplyAsRead, options?: RequestOptions): Promise<
|
489
|
+
markCommentReplyAsRead(form: MarkCommentReplyAsRead, options?: RequestOptions): Promise<SuccessResponse>;
|
475
490
|
/**
|
476
491
|
* Like / vote on a comment.
|
477
492
|
*
|
@@ -520,12 +535,6 @@ export declare class LemmyHttp {
|
|
520
535
|
* `HTTP.PUT /comment/report/resolve`
|
521
536
|
*/
|
522
537
|
resolveCommentReport(form: ResolveCommentReport, options?: RequestOptions): Promise<CommentReportResponse>;
|
523
|
-
/**
|
524
|
-
* Get / fetch private messages.
|
525
|
-
*
|
526
|
-
* `HTTP.GET /private_message/list`
|
527
|
-
*/
|
528
|
-
getPrivateMessages(form: GetPrivateMessages, options?: RequestOptions): Promise<PrivateMessagesResponse>;
|
529
538
|
/**
|
530
539
|
* Create a private message.
|
531
540
|
*
|
@@ -565,123 +574,135 @@ export declare class LemmyHttp {
|
|
565
574
|
/**
|
566
575
|
* Register a new user.
|
567
576
|
*
|
568
|
-
* `HTTP.POST /
|
577
|
+
* `HTTP.POST /account/auth/register`
|
569
578
|
*/
|
570
579
|
register(form: Register, options?: RequestOptions): Promise<LoginResponse>;
|
571
580
|
/**
|
572
581
|
* Log into lemmy.
|
573
582
|
*
|
574
|
-
* `HTTP.POST /
|
583
|
+
* `HTTP.POST /account/auth/login`
|
575
584
|
*/
|
576
585
|
login(form: Login, options?: RequestOptions): Promise<LoginResponse>;
|
577
586
|
/**
|
578
587
|
* Invalidate the currently used auth token.
|
579
588
|
*
|
580
|
-
* `HTTP.POST /
|
589
|
+
* `HTTP.POST /account/auth/logout`
|
581
590
|
*/
|
582
591
|
logout(options?: RequestOptions): Promise<SuccessResponse>;
|
583
592
|
/**
|
584
593
|
* Get the details for a person.
|
585
594
|
*
|
586
|
-
* `HTTP.GET /
|
595
|
+
* `HTTP.GET /person`
|
587
596
|
*/
|
588
597
|
getPersonDetails(form?: GetPersonDetails, options?: RequestOptions): Promise<GetPersonDetailsResponse>;
|
589
598
|
/**
|
590
|
-
*
|
599
|
+
* List the content for a person.
|
591
600
|
*
|
592
|
-
* `HTTP.GET /
|
601
|
+
* `HTTP.GET /person/content`
|
593
602
|
*/
|
594
|
-
|
603
|
+
listPersonContent(form?: ListPersonContent, options?: RequestOptions): Promise<ListPersonContentResponse>;
|
595
604
|
/**
|
596
605
|
* Mark a person mention as read.
|
597
606
|
*
|
598
|
-
* `HTTP.POST /
|
607
|
+
* `HTTP.POST /account/mention/comment/mark_as_read`
|
599
608
|
*/
|
600
|
-
|
609
|
+
markCommentMentionAsRead(form: MarkPersonCommentMentionAsRead, options?: RequestOptions): Promise<SuccessResponse>;
|
601
610
|
/**
|
602
|
-
*
|
611
|
+
* Mark a person post body mention as read.
|
603
612
|
*
|
604
|
-
* `HTTP.
|
613
|
+
* `HTTP.POST /account/mention/post/mark_as_read`
|
605
614
|
*/
|
606
|
-
|
615
|
+
markPostMentionAsRead(form: MarkPersonPostMentionAsRead, options?: RequestOptions): Promise<SuccessResponse>;
|
607
616
|
/**
|
608
617
|
* Ban a person from your site.
|
609
618
|
*
|
610
|
-
* `HTTP.POST /
|
619
|
+
* `HTTP.POST /admin/ban`
|
611
620
|
*/
|
612
621
|
banPerson(form: BanPerson, options?: RequestOptions): Promise<BanPersonResponse>;
|
613
622
|
/**
|
614
623
|
* Get a list of banned users
|
615
624
|
*
|
616
|
-
* `HTTP.GET /
|
625
|
+
* `HTTP.GET /admin/banned`
|
617
626
|
*/
|
618
627
|
getBannedPersons(options?: RequestOptions): Promise<BannedPersonsResponse>;
|
619
628
|
/**
|
620
629
|
* Block a person.
|
621
630
|
*
|
622
|
-
* `HTTP.POST /
|
631
|
+
* `HTTP.POST /account/block/person`
|
623
632
|
*/
|
624
633
|
blockPerson(form: BlockPerson, options?: RequestOptions): Promise<BlockPersonResponse>;
|
625
634
|
/**
|
626
635
|
* Fetch a Captcha.
|
627
636
|
*
|
628
|
-
* `HTTP.GET /
|
637
|
+
* `HTTP.GET /account/auth/get_captcha`
|
629
638
|
*/
|
630
639
|
getCaptcha(options?: RequestOptions): Promise<GetCaptchaResponse>;
|
631
640
|
/**
|
632
641
|
* Delete your account.
|
633
642
|
*
|
634
|
-
* `HTTP.POST /
|
643
|
+
* `HTTP.POST /account/delete`
|
635
644
|
*/
|
636
645
|
deleteAccount(form: DeleteAccount, options?: RequestOptions): Promise<SuccessResponse>;
|
637
646
|
/**
|
638
647
|
* Reset your password.
|
639
648
|
*
|
640
|
-
* `HTTP.POST /
|
649
|
+
* `HTTP.POST /account/auth/password_reset`
|
641
650
|
*/
|
642
651
|
passwordReset(form: PasswordReset, options?: RequestOptions): Promise<SuccessResponse>;
|
643
652
|
/**
|
644
653
|
* Change your password from an email / token based reset.
|
645
654
|
*
|
646
|
-
* `HTTP.POST /
|
655
|
+
* `HTTP.POST /account/auth/password_change`
|
647
656
|
*/
|
648
657
|
passwordChangeAfterReset(form: PasswordChangeAfterReset, options?: RequestOptions): Promise<SuccessResponse>;
|
649
658
|
/**
|
650
659
|
* Mark all replies as read.
|
651
660
|
*
|
652
|
-
* `HTTP.POST /
|
661
|
+
* `HTTP.POST /account/mark_as_read/all`
|
653
662
|
*/
|
654
|
-
|
663
|
+
markAllNotificationsAsRead(options?: RequestOptions): Promise<SuccessResponse>;
|
655
664
|
/**
|
656
665
|
* Save your user settings.
|
657
666
|
*
|
658
|
-
* `HTTP.PUT /
|
667
|
+
* `HTTP.PUT /account/settings/save`
|
659
668
|
*/
|
660
669
|
saveUserSettings(form: SaveUserSettings, options?: RequestOptions): Promise<SuccessResponse>;
|
661
670
|
/**
|
662
671
|
* Change your user password.
|
663
672
|
*
|
664
|
-
* `HTTP.PUT /
|
673
|
+
* `HTTP.PUT /account/auth/change_password`
|
665
674
|
*/
|
666
675
|
changePassword(form: ChangePassword, options?: RequestOptions): Promise<LoginResponse>;
|
667
676
|
/**
|
668
677
|
* Get counts for your reports
|
669
678
|
*
|
670
|
-
* `HTTP.GET /
|
679
|
+
* `HTTP.GET /account/report_count`
|
671
680
|
*/
|
672
681
|
getReportCount(form: GetReportCount, options?: RequestOptions): Promise<GetReportCountResponse>;
|
673
682
|
/**
|
674
683
|
* Get your unread counts
|
675
684
|
*
|
676
|
-
* `HTTP.GET /
|
685
|
+
* `HTTP.GET /account/unread_count`
|
677
686
|
*/
|
678
687
|
getUnreadCount(options?: RequestOptions): Promise<GetUnreadCountResponse>;
|
688
|
+
/**
|
689
|
+
* Get your inbox (replies, comment mentions, post mentions, and messages)
|
690
|
+
*
|
691
|
+
* `HTTP.GET /account/inbox`
|
692
|
+
*/
|
693
|
+
listInbox(form: ListInbox, options?: RequestOptions): Promise<ListInboxResponse>;
|
679
694
|
/**
|
680
695
|
* Verify your email
|
681
696
|
*
|
682
|
-
* `HTTP.POST /
|
697
|
+
* `HTTP.POST /account/auth/verify_email`
|
683
698
|
*/
|
684
699
|
verifyEmail(form: VerifyEmail, options?: RequestOptions): Promise<SuccessResponse>;
|
700
|
+
/**
|
701
|
+
* List your saved content.
|
702
|
+
*
|
703
|
+
* `HTTP.GET /account/auth/saved`
|
704
|
+
*/
|
705
|
+
listPersonSaved(form: ListPersonSaved, options?: RequestOptions): Promise<ListPersonSavedResponse>;
|
685
706
|
/**
|
686
707
|
* Add an admin to your site.
|
687
708
|
*
|
@@ -823,29 +844,111 @@ export declare class LemmyHttp {
|
|
823
844
|
/**
|
824
845
|
* Block an instance as user.
|
825
846
|
*
|
826
|
-
* `HTTP.Post /
|
847
|
+
* `HTTP.Post /account/block/instance`
|
827
848
|
*/
|
828
849
|
userBlockInstance(form: UserBlockInstanceParams, options?: RequestOptions): Promise<SuccessResponse>;
|
829
850
|
/**
|
830
851
|
* Globally block an instance as admin.
|
831
852
|
*
|
832
|
-
* `HTTP.Post /admin/
|
853
|
+
* `HTTP.Post /admin/instance/block`
|
833
854
|
*/
|
834
855
|
adminBlockInstance(form: AdminBlockInstanceParams, options?: RequestOptions): Promise<SuccessResponse>;
|
835
856
|
/**
|
836
857
|
* Globally allow an instance as admin.
|
837
858
|
*
|
838
|
-
* `HTTP.Post /admin/
|
859
|
+
* `HTTP.Post /admin/instance/allow`
|
839
860
|
*/
|
840
861
|
adminAllowInstance(form: AdminAllowInstanceParams, options?: RequestOptions): Promise<SuccessResponse>;
|
862
|
+
/**
|
863
|
+
* Upload new user avatar.
|
864
|
+
*
|
865
|
+
* `HTTP.Post /account/avatar`
|
866
|
+
*/
|
867
|
+
uploadUserAvatar(image: UploadImage, options?: RequestOptions): Promise<SuccessResponse>;
|
868
|
+
/**
|
869
|
+
* Delete the user avatar.
|
870
|
+
*
|
871
|
+
* `HTTP.Delete /account/avatar`
|
872
|
+
*/
|
873
|
+
deleteUserAvatar(options?: RequestOptions): Promise<SuccessResponse>;
|
874
|
+
/**
|
875
|
+
* Upload new user banner.
|
876
|
+
*
|
877
|
+
* `HTTP.Post /account/banner`
|
878
|
+
*/
|
879
|
+
uploadUserBanner(image: UploadImage, options?: RequestOptions): Promise<SuccessResponse>;
|
880
|
+
/**
|
881
|
+
* Delete the user banner.
|
882
|
+
*
|
883
|
+
* `HTTP.Delete /account/banner`
|
884
|
+
*/
|
885
|
+
deleteUserBanner(options?: RequestOptions): Promise<SuccessResponse>;
|
886
|
+
/**
|
887
|
+
* Upload new community icon.
|
888
|
+
*
|
889
|
+
* `HTTP.Post /community/icon`
|
890
|
+
*/
|
891
|
+
uploadCommunityIcon(image: UploadImage, options?: RequestOptions): Promise<SuccessResponse>;
|
892
|
+
/**
|
893
|
+
* Delete the community icon.
|
894
|
+
*
|
895
|
+
* `HTTP.Delete /community/icon`
|
896
|
+
*/
|
897
|
+
deleteCommunityIcon(options?: RequestOptions): Promise<SuccessResponse>;
|
898
|
+
/**
|
899
|
+
* Upload new community banner.
|
900
|
+
*
|
901
|
+
* `HTTP.Post /community/banner`
|
902
|
+
*/
|
903
|
+
uploadCommunityBanner(image: UploadImage, options?: RequestOptions): Promise<SuccessResponse>;
|
904
|
+
/**
|
905
|
+
* Delete the community banner.
|
906
|
+
*
|
907
|
+
* `HTTP.Delete /community/banner`
|
908
|
+
*/
|
909
|
+
deleteCommunityBanner(options?: RequestOptions): Promise<SuccessResponse>;
|
910
|
+
/**
|
911
|
+
* Upload new site icon.
|
912
|
+
*
|
913
|
+
* `HTTP.Post /site/icon`
|
914
|
+
*/
|
915
|
+
uploadSiteIcon(image: UploadImage, options?: RequestOptions): Promise<SuccessResponse>;
|
916
|
+
/**
|
917
|
+
* Delete the site icon.
|
918
|
+
*
|
919
|
+
* `HTTP.Delete /site/icon`
|
920
|
+
*/
|
921
|
+
deleteSiteIcon(options?: RequestOptions): Promise<SuccessResponse>;
|
922
|
+
/**
|
923
|
+
* Upload new site banner.
|
924
|
+
*
|
925
|
+
* `HTTP.Post /site/banner`
|
926
|
+
*/
|
927
|
+
uploadSiteBanner(image: UploadImage, options?: RequestOptions): Promise<SuccessResponse>;
|
928
|
+
/**
|
929
|
+
* Delete the site banner.
|
930
|
+
*
|
931
|
+
* `HTTP.Delete /site/banner`
|
932
|
+
*/
|
933
|
+
deleteSiteBanner(options?: RequestOptions): Promise<SuccessResponse>;
|
841
934
|
/**
|
842
935
|
* Upload an image to the server.
|
936
|
+
*
|
937
|
+
* `HTTP.Post /image`
|
843
938
|
*/
|
844
|
-
uploadImage(
|
939
|
+
uploadImage(image: UploadImage, options?: RequestOptions): Promise<UploadImageResponse>;
|
845
940
|
/**
|
846
941
|
* Delete a pictrs image
|
942
|
+
*
|
943
|
+
* `HTTP.Delete /image`
|
944
|
+
*/
|
945
|
+
deleteImage(form: DeleteImageParams, options?: RequestOptions): Promise<SuccessResponse>;
|
946
|
+
/**
|
947
|
+
* Health check for image functionality
|
948
|
+
*
|
949
|
+
* `HTTP.Get /image/health`
|
847
950
|
*/
|
848
|
-
|
951
|
+
imageHealth(options?: RequestOptions): Promise<SuccessResponse>;
|
849
952
|
/**
|
850
953
|
* Set the headers (can be used to set the auth header)
|
851
954
|
*/
|