lemmy-js-client 0.19.0-alpha.12 → 0.19.0-alpha.13
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/http.d.ts +56 -17
- package/dist/http.js +34 -1
- package/dist/index.d.ts +15 -0
- package/dist/types/AddAdminResponse.d.ts +4 -0
- package/dist/types/AddAdminResponse.js +2 -0
- package/dist/types/AddModToCommunityResponse.d.ts +4 -0
- package/dist/types/AddModToCommunityResponse.js +2 -0
- package/dist/types/BanFromCommunityResponse.d.ts +5 -0
- package/dist/types/BanFromCommunityResponse.js +2 -0
- package/dist/types/BanPersonResponse.d.ts +5 -0
- package/dist/types/BanPersonResponse.js +2 -0
- package/dist/types/BlockCommunityResponse.d.ts +5 -0
- package/dist/types/BlockCommunityResponse.js +2 -0
- package/dist/types/BlockInstanceResponse.d.ts +3 -0
- package/dist/types/BlockInstanceResponse.js +3 -0
- package/dist/types/BlockPersonResponse.d.ts +5 -0
- package/dist/types/BlockPersonResponse.js +2 -0
- package/dist/types/CommentReplyResponse.d.ts +4 -0
- package/dist/types/CommentReplyResponse.js +2 -0
- package/dist/types/DeleteAccountResponse.d.ts +1 -0
- package/dist/types/DeleteAccountResponse.js +3 -0
- package/dist/types/DeleteCustomEmojiResponse.d.ts +5 -0
- package/dist/types/DeleteCustomEmojiResponse.js +2 -0
- package/dist/types/LemmyErrorType.d.ts +138 -165
- package/dist/types/LoginToken.d.ts +8 -0
- package/dist/types/LoginToken.js +2 -0
- package/dist/types/PasswordResetResponse.d.ts +1 -0
- package/dist/types/PasswordResetResponse.js +3 -0
- package/dist/types/PersonSortType.d.ts +1 -0
- package/dist/types/PersonSortType.js +3 -0
- package/dist/types/PurgeItemResponse.d.ts +3 -0
- package/dist/types/PurgeItemResponse.js +3 -0
- package/dist/types/VerifyEmailResponse.d.ts +1 -0
- package/dist/types/VerifyEmailResponse.js +3 -0
- package/package.json +1 -1
package/dist/http.d.ts
CHANGED
@@ -1,13 +1,20 @@
|
|
1
1
|
import fetch from "cross-fetch";
|
2
2
|
import { AddAdmin } from "./types/AddAdmin";
|
3
|
+
import { AddAdminResponse } from "./types/AddAdminResponse";
|
3
4
|
import { AddModToCommunity } from "./types/AddModToCommunity";
|
5
|
+
import { AddModToCommunityResponse } from "./types/AddModToCommunityResponse";
|
4
6
|
import { ApproveRegistrationApplication } from "./types/ApproveRegistrationApplication";
|
5
7
|
import { BanFromCommunity } from "./types/BanFromCommunity";
|
8
|
+
import { BanFromCommunityResponse } from "./types/BanFromCommunityResponse";
|
6
9
|
import { BanPerson } from "./types/BanPerson";
|
10
|
+
import { BanPersonResponse } from "./types/BanPersonResponse";
|
7
11
|
import { BannedPersonsResponse } from "./types/BannedPersonsResponse";
|
8
12
|
import { BlockCommunity } from "./types/BlockCommunity";
|
13
|
+
import { BlockCommunityResponse } from "./types/BlockCommunityResponse";
|
9
14
|
import { BlockPerson } from "./types/BlockPerson";
|
15
|
+
import { BlockPersonResponse } from "./types/BlockPersonResponse";
|
10
16
|
import { ChangePassword } from "./types/ChangePassword";
|
17
|
+
import { CommentReplyResponse } from "./types/CommentReplyResponse";
|
11
18
|
import { CommentReportResponse } from "./types/CommentReportResponse";
|
12
19
|
import { CommentResponse } from "./types/CommentResponse";
|
13
20
|
import { CommunityResponse } from "./types/CommunityResponse";
|
@@ -24,9 +31,11 @@ import { CreatePrivateMessageReport } from "./types/CreatePrivateMessageReport";
|
|
24
31
|
import { CreateSite } from "./types/CreateSite";
|
25
32
|
import { CustomEmojiResponse } from "./types/CustomEmojiResponse";
|
26
33
|
import { DeleteAccount } from "./types/DeleteAccount";
|
34
|
+
import { DeleteAccountResponse } from "./types/DeleteAccountResponse";
|
27
35
|
import { DeleteComment } from "./types/DeleteComment";
|
28
36
|
import { DeleteCommunity } from "./types/DeleteCommunity";
|
29
37
|
import { DeleteCustomEmoji } from "./types/DeleteCustomEmoji";
|
38
|
+
import { DeleteCustomEmojiResponse } from "./types/DeleteCustomEmojiResponse";
|
30
39
|
import { DeletePost } from "./types/DeletePost";
|
31
40
|
import { DeletePrivateMessage } from "./types/DeletePrivateMessage";
|
32
41
|
import { DistinguishComment } from "./types/DistinguishComment";
|
@@ -84,6 +93,7 @@ import { MarkPostAsRead } from "./types/MarkPostAsRead";
|
|
84
93
|
import { MarkPrivateMessageAsRead } from "./types/MarkPrivateMessageAsRead";
|
85
94
|
import { PasswordChangeAfterReset } from "./types/PasswordChangeAfterReset";
|
86
95
|
import { PasswordReset } from "./types/PasswordReset";
|
96
|
+
import { PasswordResetResponse } from "./types/PasswordResetResponse";
|
87
97
|
import { PersonMentionResponse } from "./types/PersonMentionResponse";
|
88
98
|
import { PostReportResponse } from "./types/PostReportResponse";
|
89
99
|
import { PostResponse } from "./types/PostResponse";
|
@@ -92,6 +102,7 @@ import { PrivateMessageResponse } from "./types/PrivateMessageResponse";
|
|
92
102
|
import { PrivateMessagesResponse } from "./types/PrivateMessagesResponse";
|
93
103
|
import { PurgeComment } from "./types/PurgeComment";
|
94
104
|
import { PurgeCommunity } from "./types/PurgeCommunity";
|
105
|
+
import { PurgeItemResponse } from "./types/PurgeItemResponse";
|
95
106
|
import { PurgePerson } from "./types/PurgePerson";
|
96
107
|
import { PurgePost } from "./types/PurgePost";
|
97
108
|
import { Register } from "./types/Register";
|
@@ -112,13 +123,16 @@ import { SearchResponse } from "./types/SearchResponse";
|
|
112
123
|
import { SiteResponse } from "./types/SiteResponse";
|
113
124
|
import { TransferCommunity } from "./types/TransferCommunity";
|
114
125
|
import { VerifyEmail } from "./types/VerifyEmail";
|
126
|
+
import { VerifyEmailResponse } from "./types/VerifyEmailResponse";
|
115
127
|
import { DeleteImage, UploadImage, UploadImageResponse } from "./types/others";
|
116
128
|
import { HideCommunity } from "./types/HideCommunity";
|
117
129
|
import { BlockInstance } from "./types/BlockInstance";
|
130
|
+
import { BlockInstanceResponse } from "./types/BlockInstanceResponse";
|
118
131
|
import { GenerateTotpSecretResponse } from "./types/GenerateTotpSecretResponse";
|
119
132
|
import { UpdateTotp } from "./types/UpdateTotp";
|
120
133
|
import { UpdateTotpResponse } from "./types/UpdateTotpResponse";
|
121
134
|
import { SuccessResponse } from "./types/SuccessResponse";
|
135
|
+
import { LoginToken } from "./types/LoginToken";
|
122
136
|
/**
|
123
137
|
* Helps build lemmy HTTP requests.
|
124
138
|
*/
|
@@ -167,6 +181,31 @@ export declare class LemmyHttp {
|
|
167
181
|
* `HTTP.POST /user/totp/generate`
|
168
182
|
*/
|
169
183
|
generateTotpSecret(): Promise<GenerateTotpSecretResponse>;
|
184
|
+
/**
|
185
|
+
* Export a backup of your user settings, including your saved content,
|
186
|
+
* followed communities, and blocks.
|
187
|
+
*
|
188
|
+
* `HTTP.GET /user/export_settings`
|
189
|
+
*/
|
190
|
+
exportSettings(): Promise<any>;
|
191
|
+
/**
|
192
|
+
* Import a backup of your user settings.
|
193
|
+
*
|
194
|
+
* `HTTP.POST /user/import_settings`
|
195
|
+
*/
|
196
|
+
importSettings(form: any): Promise<SuccessResponse>;
|
197
|
+
/**
|
198
|
+
* List login tokens for your user
|
199
|
+
*
|
200
|
+
* `HTTP.GET /user/list_logins`
|
201
|
+
*/
|
202
|
+
listLogins(): Promise<LoginToken[]>;
|
203
|
+
/**
|
204
|
+
* Returns an error message if your auth token is invalid
|
205
|
+
*
|
206
|
+
* `HTTP.GET /user/validate_auth`
|
207
|
+
*/
|
208
|
+
validateAuth(): Promise<SuccessResponse>;
|
170
209
|
/**
|
171
210
|
* Enable / Disable TOTP / two-factor authentication.
|
172
211
|
*
|
@@ -230,7 +269,7 @@ export declare class LemmyHttp {
|
|
230
269
|
*
|
231
270
|
* `HTTP.POST /community/block`
|
232
271
|
*/
|
233
|
-
blockCommunity(form: BlockCommunity): Promise<
|
272
|
+
blockCommunity(form: BlockCommunity): Promise<BlockCommunityResponse>;
|
234
273
|
/**
|
235
274
|
* Delete a community.
|
236
275
|
*
|
@@ -238,7 +277,7 @@ export declare class LemmyHttp {
|
|
238
277
|
*/
|
239
278
|
deleteCommunity(form: DeleteCommunity): Promise<CommunityResponse>;
|
240
279
|
/**
|
241
|
-
* Hide a community from public view.
|
280
|
+
* Hide a community from public / "All" view. Admins only.
|
242
281
|
*
|
243
282
|
* `HTTP.PUT /community/hide`
|
244
283
|
*/
|
@@ -260,13 +299,13 @@ export declare class LemmyHttp {
|
|
260
299
|
*
|
261
300
|
* `HTTP.POST /community/ban_user`
|
262
301
|
*/
|
263
|
-
banFromCommunity(form: BanFromCommunity): Promise<
|
302
|
+
banFromCommunity(form: BanFromCommunity): Promise<BanFromCommunityResponse>;
|
264
303
|
/**
|
265
304
|
* Add a moderator to your community.
|
266
305
|
*
|
267
306
|
* `HTTP.POST /community/mod`
|
268
307
|
*/
|
269
|
-
addModToCommunity(form: AddModToCommunity): Promise<
|
308
|
+
addModToCommunity(form: AddModToCommunity): Promise<AddModToCommunityResponse>;
|
270
309
|
/**
|
271
310
|
* Create a post.
|
272
311
|
*
|
@@ -386,7 +425,7 @@ export declare class LemmyHttp {
|
|
386
425
|
*
|
387
426
|
* `HTTP.POST /comment/mark_as_read`
|
388
427
|
*/
|
389
|
-
markCommentReplyAsRead(form: MarkCommentReplyAsRead): Promise<
|
428
|
+
markCommentReplyAsRead(form: MarkCommentReplyAsRead): Promise<CommentReplyResponse>;
|
390
429
|
/**
|
391
430
|
* Like / vote on a comment.
|
392
431
|
*
|
@@ -524,7 +563,7 @@ export declare class LemmyHttp {
|
|
524
563
|
*
|
525
564
|
* `HTTP.POST /user/ban`
|
526
565
|
*/
|
527
|
-
banPerson(form: BanPerson): Promise<
|
566
|
+
banPerson(form: BanPerson): Promise<BanPersonResponse>;
|
528
567
|
/**
|
529
568
|
* Get a list of banned users
|
530
569
|
*
|
@@ -536,7 +575,7 @@ export declare class LemmyHttp {
|
|
536
575
|
*
|
537
576
|
* `HTTP.POST /user/block`
|
538
577
|
*/
|
539
|
-
blockPerson(form: BlockPerson): Promise<
|
578
|
+
blockPerson(form: BlockPerson): Promise<BlockPersonResponse>;
|
540
579
|
/**
|
541
580
|
* Fetch a Captcha.
|
542
581
|
*
|
@@ -548,13 +587,13 @@ export declare class LemmyHttp {
|
|
548
587
|
*
|
549
588
|
* `HTTP.POST /user/delete_account`
|
550
589
|
*/
|
551
|
-
deleteAccount(form: DeleteAccount): Promise<
|
590
|
+
deleteAccount(form: DeleteAccount): Promise<DeleteAccountResponse>;
|
552
591
|
/**
|
553
592
|
* Reset your password.
|
554
593
|
*
|
555
594
|
* `HTTP.POST /user/password_reset`
|
556
595
|
*/
|
557
|
-
passwordReset(form: PasswordReset): Promise<
|
596
|
+
passwordReset(form: PasswordReset): Promise<PasswordResetResponse>;
|
558
597
|
/**
|
559
598
|
* Change your password from an email / token based reset.
|
560
599
|
*
|
@@ -596,13 +635,13 @@ export declare class LemmyHttp {
|
|
596
635
|
*
|
597
636
|
* `HTTP.POST /user/verify_email`
|
598
637
|
*/
|
599
|
-
verifyEmail(form: VerifyEmail): Promise<
|
638
|
+
verifyEmail(form: VerifyEmail): Promise<VerifyEmailResponse>;
|
600
639
|
/**
|
601
640
|
* Add an admin to your site.
|
602
641
|
*
|
603
642
|
* `HTTP.POST /admin/add`
|
604
643
|
*/
|
605
|
-
addAdmin(form: AddAdmin): Promise<
|
644
|
+
addAdmin(form: AddAdmin): Promise<AddAdminResponse>;
|
606
645
|
/**
|
607
646
|
* Get the unread registration applications count.
|
608
647
|
*
|
@@ -626,25 +665,25 @@ export declare class LemmyHttp {
|
|
626
665
|
*
|
627
666
|
* `HTTP.POST /admin/purge/person`
|
628
667
|
*/
|
629
|
-
purgePerson(form: PurgePerson): Promise<
|
668
|
+
purgePerson(form: PurgePerson): Promise<PurgeItemResponse>;
|
630
669
|
/**
|
631
670
|
* Purge / Delete a community from the database.
|
632
671
|
*
|
633
672
|
* `HTTP.POST /admin/purge/community`
|
634
673
|
*/
|
635
|
-
purgeCommunity(form: PurgeCommunity): Promise<
|
674
|
+
purgeCommunity(form: PurgeCommunity): Promise<PurgeItemResponse>;
|
636
675
|
/**
|
637
676
|
* Purge / Delete a post from the database.
|
638
677
|
*
|
639
678
|
* `HTTP.POST /admin/purge/post`
|
640
679
|
*/
|
641
|
-
purgePost(form: PurgePost): Promise<
|
680
|
+
purgePost(form: PurgePost): Promise<PurgeItemResponse>;
|
642
681
|
/**
|
643
682
|
* Purge / Delete a comment from the database.
|
644
683
|
*
|
645
684
|
* `HTTP.POST /admin/purge/comment`
|
646
685
|
*/
|
647
|
-
purgeComment(form: PurgeComment): Promise<
|
686
|
+
purgeComment(form: PurgeComment): Promise<PurgeItemResponse>;
|
648
687
|
/**
|
649
688
|
* Create a new custom emoji
|
650
689
|
*
|
@@ -662,7 +701,7 @@ export declare class LemmyHttp {
|
|
662
701
|
*
|
663
702
|
* `HTTP.Post /custom_emoji/delete`
|
664
703
|
*/
|
665
|
-
deleteCustomEmoji(form: DeleteCustomEmoji): Promise<
|
704
|
+
deleteCustomEmoji(form: DeleteCustomEmoji): Promise<DeleteCustomEmojiResponse>;
|
666
705
|
/**
|
667
706
|
* Fetch federated instances.
|
668
707
|
*
|
@@ -674,7 +713,7 @@ export declare class LemmyHttp {
|
|
674
713
|
*
|
675
714
|
* `HTTP.Post /site/block`
|
676
715
|
*/
|
677
|
-
blockInstance(form: BlockInstance): Promise<
|
716
|
+
blockInstance(form: BlockInstance): Promise<BlockInstanceResponse>;
|
678
717
|
/**
|
679
718
|
* Upload an image to the server.
|
680
719
|
*/
|
package/dist/http.js
CHANGED
@@ -100,6 +100,39 @@ class LemmyHttp {
|
|
100
100
|
generateTotpSecret() {
|
101
101
|
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/user/totp/generate", {});
|
102
102
|
}
|
103
|
+
/**
|
104
|
+
* Export a backup of your user settings, including your saved content,
|
105
|
+
* followed communities, and blocks.
|
106
|
+
*
|
107
|
+
* `HTTP.GET /user/export_settings`
|
108
|
+
*/
|
109
|
+
exportSettings() {
|
110
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/user/export_settings", {});
|
111
|
+
}
|
112
|
+
/**
|
113
|
+
* Import a backup of your user settings.
|
114
|
+
*
|
115
|
+
* `HTTP.POST /user/import_settings`
|
116
|
+
*/
|
117
|
+
importSettings(form) {
|
118
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/user/import_settings", form);
|
119
|
+
}
|
120
|
+
/**
|
121
|
+
* List login tokens for your user
|
122
|
+
*
|
123
|
+
* `HTTP.GET /user/list_logins`
|
124
|
+
*/
|
125
|
+
listLogins() {
|
126
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/user/list_logins", {});
|
127
|
+
}
|
128
|
+
/**
|
129
|
+
* Returns an error message if your auth token is invalid
|
130
|
+
*
|
131
|
+
* `HTTP.GET /user/validate_auth`
|
132
|
+
*/
|
133
|
+
validateAuth() {
|
134
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/user/validate_auth", {});
|
135
|
+
}
|
103
136
|
/**
|
104
137
|
* Enable / Disable TOTP / two-factor authentication.
|
105
138
|
*
|
@@ -193,7 +226,7 @@ class LemmyHttp {
|
|
193
226
|
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/community/delete", form);
|
194
227
|
}
|
195
228
|
/**
|
196
|
-
* Hide a community from public view.
|
229
|
+
* Hide a community from public / "All" view. Admins only.
|
197
230
|
*
|
198
231
|
* `HTTP.PUT /community/hide`
|
199
232
|
*/
|
package/dist/index.d.ts
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
export * from "./http";
|
2
2
|
export { AddAdmin } from "./types/AddAdmin";
|
3
|
+
export { AddAdminResponse } from "./types/AddAdminResponse";
|
3
4
|
export { AddModToCommunity } from "./types/AddModToCommunity";
|
5
|
+
export { AddModToCommunityResponse } from "./types/AddModToCommunityResponse";
|
4
6
|
export { AdminPurgeComment } from "./types/AdminPurgeComment";
|
5
7
|
export { AdminPurgeCommentView } from "./types/AdminPurgeCommentView";
|
6
8
|
export { AdminPurgeCommunity } from "./types/AdminPurgeCommunity";
|
@@ -11,11 +13,16 @@ export { AdminPurgePost } from "./types/AdminPurgePost";
|
|
11
13
|
export { AdminPurgePostView } from "./types/AdminPurgePostView";
|
12
14
|
export { ApproveRegistrationApplication } from "./types/ApproveRegistrationApplication";
|
13
15
|
export { BanFromCommunity } from "./types/BanFromCommunity";
|
16
|
+
export { BanFromCommunityResponse } from "./types/BanFromCommunityResponse";
|
14
17
|
export { BanPerson } from "./types/BanPerson";
|
18
|
+
export { BanPersonResponse } from "./types/BanPersonResponse";
|
15
19
|
export { BannedPersonsResponse } from "./types/BannedPersonsResponse";
|
16
20
|
export { BlockCommunity } from "./types/BlockCommunity";
|
21
|
+
export { BlockCommunityResponse } from "./types/BlockCommunityResponse";
|
17
22
|
export { BlockInstance } from "./types/BlockInstance";
|
23
|
+
export { BlockInstanceResponse } from "./types/BlockInstanceResponse";
|
18
24
|
export { BlockPerson } from "./types/BlockPerson";
|
25
|
+
export { BlockPersonResponse } from "./types/BlockPersonResponse";
|
19
26
|
export { CaptchaResponse } from "./types/CaptchaResponse";
|
20
27
|
export { ChangePassword } from "./types/ChangePassword";
|
21
28
|
export { Comment } from "./types/Comment";
|
@@ -23,6 +30,7 @@ export { CommentAggregates } from "./types/CommentAggregates";
|
|
23
30
|
export { CommentId } from "./types/CommentId";
|
24
31
|
export { CommentReply } from "./types/CommentReply";
|
25
32
|
export { CommentReplyId } from "./types/CommentReplyId";
|
33
|
+
export { CommentReplyResponse } from "./types/CommentReplyResponse";
|
26
34
|
export { CommentReplyView } from "./types/CommentReplyView";
|
27
35
|
export { CommentReport } from "./types/CommentReport";
|
28
36
|
export { CommentReportId } from "./types/CommentReportId";
|
@@ -57,9 +65,11 @@ export { CustomEmojiKeyword } from "./types/CustomEmojiKeyword";
|
|
57
65
|
export { CustomEmojiResponse } from "./types/CustomEmojiResponse";
|
58
66
|
export { CustomEmojiView } from "./types/CustomEmojiView";
|
59
67
|
export { DeleteAccount } from "./types/DeleteAccount";
|
68
|
+
export { DeleteAccountResponse } from "./types/DeleteAccountResponse";
|
60
69
|
export { DeleteComment } from "./types/DeleteComment";
|
61
70
|
export { DeleteCommunity } from "./types/DeleteCommunity";
|
62
71
|
export { DeleteCustomEmoji } from "./types/DeleteCustomEmoji";
|
72
|
+
export { DeleteCustomEmojiResponse } from "./types/DeleteCustomEmojiResponse";
|
63
73
|
export { DeletePost } from "./types/DeletePost";
|
64
74
|
export { DeletePrivateMessage } from "./types/DeletePrivateMessage";
|
65
75
|
export { DistinguishComment } from "./types/DistinguishComment";
|
@@ -129,6 +139,7 @@ export { LocalUserView } from "./types/LocalUserView";
|
|
129
139
|
export { LockPost } from "./types/LockPost";
|
130
140
|
export { Login } from "./types/Login";
|
131
141
|
export { LoginResponse } from "./types/LoginResponse";
|
142
|
+
export { LoginToken } from "./types/LoginToken";
|
132
143
|
export { MarkCommentReplyAsRead } from "./types/MarkCommentReplyAsRead";
|
133
144
|
export { MarkPersonMentionAsRead } from "./types/MarkPersonMentionAsRead";
|
134
145
|
export { MarkPostAsRead } from "./types/MarkPostAsRead";
|
@@ -161,6 +172,7 @@ export { MyUserInfo } from "./types/MyUserInfo";
|
|
161
172
|
export { PaginationCursor } from "./types/PaginationCursor";
|
162
173
|
export { PasswordChangeAfterReset } from "./types/PasswordChangeAfterReset";
|
163
174
|
export { PasswordReset } from "./types/PasswordReset";
|
175
|
+
export { PasswordResetResponse } from "./types/PasswordResetResponse";
|
164
176
|
export { Person } from "./types/Person";
|
165
177
|
export { PersonAggregates } from "./types/PersonAggregates";
|
166
178
|
export { PersonBlockId } from "./types/PersonBlockId";
|
@@ -170,6 +182,7 @@ export { PersonMention } from "./types/PersonMention";
|
|
170
182
|
export { PersonMentionId } from "./types/PersonMentionId";
|
171
183
|
export { PersonMentionResponse } from "./types/PersonMentionResponse";
|
172
184
|
export { PersonMentionView } from "./types/PersonMentionView";
|
185
|
+
export { PersonSortType } from "./types/PersonSortType";
|
173
186
|
export { PersonView } from "./types/PersonView";
|
174
187
|
export { Post } from "./types/Post";
|
175
188
|
export { PostAggregates } from "./types/PostAggregates";
|
@@ -193,6 +206,7 @@ export { PrivateMessageView } from "./types/PrivateMessageView";
|
|
193
206
|
export { PrivateMessagesResponse } from "./types/PrivateMessagesResponse";
|
194
207
|
export { PurgeComment } from "./types/PurgeComment";
|
195
208
|
export { PurgeCommunity } from "./types/PurgeCommunity";
|
209
|
+
export { PurgeItemResponse } from "./types/PurgeItemResponse";
|
196
210
|
export { PurgePerson } from "./types/PurgePerson";
|
197
211
|
export { PurgePost } from "./types/PurgePost";
|
198
212
|
export { Register } from "./types/Register";
|
@@ -228,4 +242,5 @@ export { TransferCommunity } from "./types/TransferCommunity";
|
|
228
242
|
export { UpdateTotp } from "./types/UpdateTotp";
|
229
243
|
export { UpdateTotpResponse } from "./types/UpdateTotpResponse";
|
230
244
|
export { VerifyEmail } from "./types/VerifyEmail";
|
245
|
+
export { VerifyEmailResponse } from "./types/VerifyEmailResponse";
|
231
246
|
export { UploadImage, UploadImageResponse, ImageFile, DeleteImage, } from "./types/others";
|
@@ -0,0 +1 @@
|
|
1
|
+
export type DeleteAccountResponse = Record<string, never>;
|
@@ -1,304 +1,277 @@
|
|
1
1
|
export type LemmyErrorType = {
|
2
|
-
|
2
|
+
error_type: "ReportReasonRequired";
|
3
3
|
} | {
|
4
|
-
|
4
|
+
error_type: "ReportTooLong";
|
5
5
|
} | {
|
6
|
-
|
6
|
+
error_type: "NotAModerator";
|
7
7
|
} | {
|
8
|
-
|
8
|
+
error_type: "NotAnAdmin";
|
9
9
|
} | {
|
10
|
-
|
10
|
+
error_type: "CannotBlockYourself";
|
11
11
|
} | {
|
12
|
-
|
12
|
+
error_type: "CannotBlockAdmin";
|
13
13
|
} | {
|
14
|
-
|
14
|
+
error_type: "CouldNotUpdateUser";
|
15
15
|
} | {
|
16
|
-
|
16
|
+
error_type: "PasswordsDoNotMatch";
|
17
17
|
} | {
|
18
|
-
|
18
|
+
error_type: "PasswordIncorrect";
|
19
19
|
} | {
|
20
|
-
|
20
|
+
error_type: "EmailNotVerified";
|
21
21
|
} | {
|
22
|
-
|
22
|
+
error_type: "EmailRequired";
|
23
23
|
} | {
|
24
|
-
|
24
|
+
error_type: "CouldNotUpdateComment";
|
25
25
|
} | {
|
26
|
-
|
26
|
+
error_type: "CouldNotUpdatePrivateMessage";
|
27
27
|
} | {
|
28
|
-
|
28
|
+
error_type: "CannotLeaveAdmin";
|
29
29
|
} | {
|
30
|
-
|
30
|
+
error_type: "NoLinesInHtml";
|
31
31
|
} | {
|
32
|
-
|
33
|
-
message: string;
|
32
|
+
error_type: "SiteMetadataPageIsNotDoctypeHtml";
|
34
33
|
} | {
|
35
|
-
|
34
|
+
error_type: "PictrsResponseError";
|
36
35
|
message: string;
|
37
36
|
} | {
|
38
|
-
|
39
|
-
|
40
|
-
error: "image_url_missing_path_segments";
|
41
|
-
} | {
|
42
|
-
error: "image_url_missing_last_path_segment";
|
43
|
-
} | {
|
44
|
-
error: "pictrs_api_key_not_provided";
|
45
|
-
} | {
|
46
|
-
error: "no_content_type_header";
|
47
|
-
} | {
|
48
|
-
error: "not_an_image_type";
|
37
|
+
error_type: "PictrsPurgeResponseError";
|
38
|
+
message: string;
|
49
39
|
} | {
|
50
|
-
|
40
|
+
error_type: "ImageUrlMissingPathSegments";
|
51
41
|
} | {
|
52
|
-
|
42
|
+
error_type: "ImageUrlMissingLastPathSegment";
|
53
43
|
} | {
|
54
|
-
|
44
|
+
error_type: "PictrsApiKeyNotProvided";
|
55
45
|
} | {
|
56
|
-
|
46
|
+
error_type: "NoContentTypeHeader";
|
57
47
|
} | {
|
58
|
-
|
48
|
+
error_type: "NotAnImageType";
|
59
49
|
} | {
|
60
|
-
|
50
|
+
error_type: "NotAModOrAdmin";
|
61
51
|
} | {
|
62
|
-
|
52
|
+
error_type: "NoAdmins";
|
63
53
|
} | {
|
64
|
-
|
54
|
+
error_type: "NotTopAdmin";
|
65
55
|
} | {
|
66
|
-
|
56
|
+
error_type: "NotTopMod";
|
67
57
|
} | {
|
68
|
-
|
58
|
+
error_type: "NotLoggedIn";
|
69
59
|
} | {
|
70
|
-
|
60
|
+
error_type: "SiteBan";
|
71
61
|
} | {
|
72
|
-
|
62
|
+
error_type: "Deleted";
|
73
63
|
} | {
|
74
|
-
|
64
|
+
error_type: "BannedFromCommunity";
|
75
65
|
} | {
|
76
|
-
|
66
|
+
error_type: "CouldNotFindCommunity";
|
77
67
|
} | {
|
78
|
-
|
68
|
+
error_type: "PersonIsBlocked";
|
79
69
|
} | {
|
80
|
-
|
70
|
+
error_type: "DownvotesAreDisabled";
|
81
71
|
} | {
|
82
|
-
|
72
|
+
error_type: "InstanceIsPrivate";
|
83
73
|
} | {
|
84
|
-
|
74
|
+
error_type: "InvalidPassword";
|
85
75
|
} | {
|
86
|
-
|
76
|
+
error_type: "SiteDescriptionLengthOverflow";
|
87
77
|
} | {
|
88
|
-
|
78
|
+
error_type: "HoneypotFailed";
|
89
79
|
} | {
|
90
|
-
|
80
|
+
error_type: "RegistrationApplicationIsPending";
|
91
81
|
} | {
|
92
|
-
|
82
|
+
error_type: "PrivateInstanceCannotHaveFederationEnabled";
|
93
83
|
} | {
|
94
|
-
|
84
|
+
error_type: "Locked";
|
95
85
|
} | {
|
96
|
-
|
86
|
+
error_type: "CouldNotCreateComment";
|
97
87
|
} | {
|
98
|
-
|
88
|
+
error_type: "MaxCommentDepthReached";
|
99
89
|
} | {
|
100
|
-
|
90
|
+
error_type: "EditCommentNotAllowed";
|
101
91
|
} | {
|
102
|
-
|
92
|
+
error_type: "OnlyAdminsCanCreateCommunities";
|
103
93
|
} | {
|
104
|
-
|
94
|
+
error_type: "CommunityAlreadyExists";
|
105
95
|
} | {
|
106
|
-
|
96
|
+
error_type: "LanguageNotAllowed";
|
107
97
|
} | {
|
108
|
-
|
98
|
+
error_type: "OnlyModsCanPostInCommunity";
|
109
99
|
} | {
|
110
|
-
|
100
|
+
error_type: "CouldNotUpdatePost";
|
111
101
|
} | {
|
112
|
-
|
102
|
+
error_type: "EditPostNotAllowed";
|
113
103
|
} | {
|
114
|
-
|
104
|
+
error_type: "CouldNotFindPost";
|
115
105
|
} | {
|
116
|
-
|
106
|
+
error_type: "EditPrivateMessageNotAllowed";
|
117
107
|
} | {
|
118
|
-
|
108
|
+
error_type: "SiteAlreadyExists";
|
119
109
|
} | {
|
120
|
-
|
110
|
+
error_type: "ApplicationQuestionRequired";
|
121
111
|
} | {
|
122
|
-
|
112
|
+
error_type: "InvalidDefaultPostListingType";
|
123
113
|
} | {
|
124
|
-
|
114
|
+
error_type: "RegistrationClosed";
|
125
115
|
} | {
|
126
|
-
|
116
|
+
error_type: "RegistrationApplicationAnswerRequired";
|
127
117
|
} | {
|
128
|
-
|
118
|
+
error_type: "EmailAlreadyExists";
|
129
119
|
} | {
|
130
|
-
|
120
|
+
error_type: "FederationError";
|
121
|
+
message: string;
|
131
122
|
} | {
|
132
|
-
|
123
|
+
error_type: "FederationForbiddenByStrictAllowList";
|
133
124
|
} | {
|
134
|
-
|
125
|
+
error_type: "PersonIsBannedFromCommunity";
|
135
126
|
} | {
|
136
|
-
|
127
|
+
error_type: "ObjectIsNotPublic";
|
137
128
|
} | {
|
138
|
-
|
129
|
+
error_type: "InvalidCommunity";
|
139
130
|
} | {
|
140
|
-
|
131
|
+
error_type: "CannotCreatePostOrCommentInDeletedOrRemovedCommunity";
|
141
132
|
} | {
|
142
|
-
|
133
|
+
error_type: "CannotReceivePage";
|
143
134
|
} | {
|
144
|
-
|
135
|
+
error_type: "NewPostCannotBeLocked";
|
145
136
|
} | {
|
146
|
-
|
137
|
+
error_type: "OnlyLocalAdminCanRemoveCommunity";
|
147
138
|
} | {
|
148
|
-
|
139
|
+
error_type: "OnlyLocalAdminCanRestoreCommunity";
|
149
140
|
} | {
|
150
|
-
|
151
|
-
message: string;
|
141
|
+
error_type: "NoIdGiven";
|
152
142
|
} | {
|
153
|
-
|
143
|
+
error_type: "CouldNotFindUsernameOrEmail";
|
154
144
|
} | {
|
155
|
-
|
145
|
+
error_type: "InvalidQuery";
|
156
146
|
} | {
|
157
|
-
|
147
|
+
error_type: "ObjectNotLocal";
|
158
148
|
} | {
|
159
|
-
|
149
|
+
error_type: "PostIsLocked";
|
160
150
|
} | {
|
161
|
-
|
151
|
+
error_type: "PersonIsBannedFromSite";
|
162
152
|
} | {
|
163
|
-
|
153
|
+
error_type: "InvalidVoteValue";
|
164
154
|
} | {
|
165
|
-
|
155
|
+
error_type: "PageDoesNotSpecifyCreator";
|
166
156
|
} | {
|
167
|
-
|
157
|
+
error_type: "PageDoesNotSpecifyGroup";
|
168
158
|
} | {
|
169
|
-
|
159
|
+
error_type: "NoCommunityFoundInCC";
|
170
160
|
} | {
|
171
|
-
|
161
|
+
error_type: "NoEmailSetup";
|
172
162
|
} | {
|
173
|
-
|
163
|
+
error_type: "EmailSmtpServerNeedsAPort";
|
174
164
|
} | {
|
175
|
-
|
165
|
+
error_type: "MissingAnEmail";
|
176
166
|
} | {
|
177
|
-
|
167
|
+
error_type: "RateLimitError";
|
178
168
|
} | {
|
179
|
-
|
169
|
+
error_type: "InvalidName";
|
180
170
|
} | {
|
181
|
-
|
171
|
+
error_type: "InvalidDisplayName";
|
182
172
|
} | {
|
183
|
-
|
173
|
+
error_type: "InvalidMatrixId";
|
184
174
|
} | {
|
185
|
-
|
175
|
+
error_type: "InvalidPostTitle";
|
186
176
|
} | {
|
187
|
-
|
177
|
+
error_type: "InvalidBodyField";
|
188
178
|
} | {
|
189
|
-
|
179
|
+
error_type: "BioLengthOverflow";
|
190
180
|
} | {
|
191
|
-
|
181
|
+
error_type: "MissingTotpToken";
|
192
182
|
} | {
|
193
|
-
|
183
|
+
error_type: "IncorrectTotpToken";
|
194
184
|
} | {
|
195
|
-
|
185
|
+
error_type: "CouldNotParseTotpSecret";
|
196
186
|
} | {
|
197
|
-
|
187
|
+
error_type: "CouldNotLikeComment";
|
198
188
|
} | {
|
199
|
-
|
189
|
+
error_type: "CouldNotSaveComment";
|
200
190
|
} | {
|
201
|
-
|
191
|
+
error_type: "CouldNotCreateReport";
|
202
192
|
} | {
|
203
|
-
|
193
|
+
error_type: "CouldNotResolveReport";
|
204
194
|
} | {
|
205
|
-
|
195
|
+
error_type: "CommunityModeratorAlreadyExists";
|
206
196
|
} | {
|
207
|
-
|
197
|
+
error_type: "CommunityUserIsAlreadyBanned";
|
208
198
|
} | {
|
209
|
-
|
199
|
+
error_type: "CommunityBlockAlreadyExists";
|
210
200
|
} | {
|
211
|
-
|
201
|
+
error_type: "CommunityFollowerAlreadyExists";
|
212
202
|
} | {
|
213
|
-
|
203
|
+
error_type: "CouldNotUpdateCommunityHiddenStatus";
|
214
204
|
} | {
|
215
|
-
|
205
|
+
error_type: "PersonBlockAlreadyExists";
|
216
206
|
} | {
|
217
|
-
|
207
|
+
error_type: "UserAlreadyExists";
|
218
208
|
} | {
|
219
|
-
|
209
|
+
error_type: "TokenNotFound";
|
220
210
|
} | {
|
221
|
-
|
211
|
+
error_type: "CouldNotLikePost";
|
222
212
|
} | {
|
223
|
-
|
213
|
+
error_type: "CouldNotSavePost";
|
224
214
|
} | {
|
225
|
-
|
215
|
+
error_type: "CouldNotMarkPostAsRead";
|
226
216
|
} | {
|
227
|
-
|
217
|
+
error_type: "CouldNotUpdateCommunity";
|
228
218
|
} | {
|
229
|
-
|
219
|
+
error_type: "CouldNotUpdateReplies";
|
230
220
|
} | {
|
231
|
-
|
221
|
+
error_type: "CouldNotUpdatePersonMentions";
|
232
222
|
} | {
|
233
|
-
|
223
|
+
error_type: "PostTitleTooLong";
|
234
224
|
} | {
|
235
|
-
|
225
|
+
error_type: "CouldNotCreatePost";
|
236
226
|
} | {
|
237
|
-
|
227
|
+
error_type: "CouldNotCreatePrivateMessage";
|
238
228
|
} | {
|
239
|
-
|
229
|
+
error_type: "CouldNotUpdatePrivate";
|
240
230
|
} | {
|
241
|
-
|
231
|
+
error_type: "SystemErrLogin";
|
242
232
|
} | {
|
243
|
-
|
233
|
+
error_type: "CouldNotSetAllRegistrationsAccepted";
|
244
234
|
} | {
|
245
|
-
|
235
|
+
error_type: "CouldNotSetAllEmailVerified";
|
246
236
|
} | {
|
247
|
-
|
237
|
+
error_type: "Banned";
|
248
238
|
} | {
|
249
|
-
|
239
|
+
error_type: "CouldNotGetComments";
|
250
240
|
} | {
|
251
|
-
|
241
|
+
error_type: "CouldNotGetPosts";
|
252
242
|
} | {
|
253
|
-
|
243
|
+
error_type: "InvalidUrl";
|
254
244
|
} | {
|
255
|
-
|
245
|
+
error_type: "EmailSendFailed";
|
256
246
|
} | {
|
257
|
-
|
258
|
-
message: string | null;
|
247
|
+
error_type: "Slurs";
|
259
248
|
} | {
|
260
|
-
|
249
|
+
error_type: "CouldNotGenerateTotp";
|
261
250
|
} | {
|
262
|
-
|
263
|
-
message: string;
|
251
|
+
error_type: "CouldNotFindObject";
|
264
252
|
} | {
|
265
|
-
|
253
|
+
error_type: "RegistrationDenied";
|
266
254
|
message: string;
|
267
255
|
} | {
|
268
|
-
|
269
|
-
} | {
|
270
|
-
error: "site_name_required";
|
271
|
-
} | {
|
272
|
-
error: "site_name_length_overflow";
|
273
|
-
} | {
|
274
|
-
error: "permissive_regex";
|
275
|
-
} | {
|
276
|
-
error: "invalid_regex";
|
256
|
+
error_type: "FederationDisabled";
|
277
257
|
} | {
|
278
|
-
|
258
|
+
error_type: "DomainBlocked";
|
279
259
|
} | {
|
280
|
-
|
260
|
+
error_type: "DomainNotInAllowList";
|
281
261
|
} | {
|
282
|
-
|
262
|
+
error_type: "FederationDisabledByStrictAllowList";
|
283
263
|
} | {
|
284
|
-
|
264
|
+
error_type: "SiteNameRequired";
|
285
265
|
} | {
|
286
|
-
|
266
|
+
error_type: "SiteNameLengthOverflow";
|
287
267
|
} | {
|
288
|
-
|
268
|
+
error_type: "PermissiveRegex";
|
289
269
|
} | {
|
290
|
-
|
270
|
+
error_type: "InvalidRegex";
|
291
271
|
} | {
|
292
|
-
|
272
|
+
error_type: "CaptchaIncorrect";
|
293
273
|
} | {
|
294
|
-
|
274
|
+
error_type: "PasswordResetLimitReached";
|
295
275
|
} | {
|
296
|
-
|
297
|
-
} | {
|
298
|
-
error: "ban_expiration_in_past";
|
299
|
-
} | {
|
300
|
-
error: "invalid_unix_time";
|
301
|
-
} | {
|
302
|
-
error: "unknown";
|
303
|
-
message: string;
|
276
|
+
error_type: "CouldNotCreateAudioCaptcha";
|
304
277
|
};
|
@@ -0,0 +1 @@
|
|
1
|
+
export type PasswordResetResponse = Record<string, never>;
|
@@ -0,0 +1 @@
|
|
1
|
+
export type PersonSortType = "New" | "Old" | "MostComments" | "CommentScore" | "PostScore" | "PostCount";
|
@@ -0,0 +1 @@
|
|
1
|
+
export type VerifyEmailResponse = Record<string, never>;
|
package/package.json
CHANGED