lemmy-js-client 0.17.2-rc.9 → 0.18.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/http.d.ts +27 -12
- package/dist/http.js +351 -375
- package/dist/index.d.ts +248 -1
- package/dist/index.js +3 -1
- package/dist/types/BanFromCommunity.d.ts +1 -1
- package/dist/types/BanPerson.d.ts +1 -1
- package/dist/types/CommentAggregates.d.ts +4 -3
- package/dist/types/CommunityAggregates.d.ts +8 -7
- package/dist/types/GetCaptcha.d.ts +3 -1
- package/dist/types/GetComments.d.ts +2 -2
- package/dist/types/GetCommunityResponse.d.ts +0 -2
- package/dist/types/GetFederatedInstances.d.ts +3 -1
- package/dist/types/GetModlog.d.ts +2 -2
- package/dist/types/GetPersonDetails.d.ts +2 -2
- package/dist/types/GetPersonMentions.d.ts +2 -2
- package/dist/types/GetPost.d.ts +4 -2
- package/dist/types/GetPostResponse.d.ts +0 -1
- package/dist/types/GetPosts.d.ts +2 -2
- package/dist/types/GetPrivateMessages.d.ts +2 -2
- package/dist/types/GetReplies.d.ts +2 -2
- package/dist/types/GetReportCountResponse.d.ts +3 -3
- package/dist/types/GetSiteResponse.d.ts +0 -1
- package/dist/types/GetUnreadCountResponse.d.ts +3 -3
- package/dist/types/GetUnreadRegistrationApplicationCountResponse.d.ts +1 -1
- package/dist/types/ListCommentReports.d.ts +2 -2
- package/dist/types/ListCommunities.d.ts +2 -2
- package/dist/types/ListPostReports.d.ts +2 -2
- package/dist/types/ListPrivateMessageReports.d.ts +2 -2
- package/dist/types/ListRegistrationApplications.d.ts +2 -2
- package/dist/types/LocalSite.d.ts +0 -1
- package/dist/types/ModlogListParams.d.ts +2 -2
- package/dist/types/PersonAggregates.d.ts +4 -4
- package/dist/types/PostAggregates.d.ts +6 -4
- package/dist/types/PostView.d.ts +1 -1
- package/dist/types/RemoveCommunity.d.ts +1 -1
- package/dist/types/Search.d.ts +2 -2
- package/dist/types/SiteAggregates.d.ts +8 -8
- package/dist/types/SiteResponse.d.ts +2 -0
- package/dist/types/others.d.ts +2 -1
- package/dist/types/others.js +1 -0
- package/dist/websocket.d.ts +7 -1
- package/dist/websocket.js +185 -181
- package/package.json +14 -15
package/dist/http.d.ts
CHANGED
@@ -5,14 +5,15 @@ 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 { BannedPersonsResponse } from "./types/BannedPersonsResponse";
|
9
8
|
import { BanPerson } from "./types/BanPerson";
|
10
9
|
import { BanPersonResponse } from "./types/BanPersonResponse";
|
10
|
+
import { BannedPersonsResponse } from "./types/BannedPersonsResponse";
|
11
11
|
import { BlockCommunity } from "./types/BlockCommunity";
|
12
12
|
import { BlockCommunityResponse } from "./types/BlockCommunityResponse";
|
13
13
|
import { BlockPerson } from "./types/BlockPerson";
|
14
14
|
import { BlockPersonResponse } from "./types/BlockPersonResponse";
|
15
15
|
import { ChangePassword } from "./types/ChangePassword";
|
16
|
+
import { CommentReplyResponse } from "./types/CommentReplyResponse";
|
16
17
|
import { CommentReportResponse } from "./types/CommentReportResponse";
|
17
18
|
import { CommentResponse } from "./types/CommentResponse";
|
18
19
|
import { CommunityResponse } from "./types/CommunityResponse";
|
@@ -27,12 +28,15 @@ import { CreatePostReport } from "./types/CreatePostReport";
|
|
27
28
|
import { CreatePrivateMessage } from "./types/CreatePrivateMessage";
|
28
29
|
import { CreatePrivateMessageReport } from "./types/CreatePrivateMessageReport";
|
29
30
|
import { CreateSite } from "./types/CreateSite";
|
31
|
+
import { CustomEmojiResponse } from "./types/CustomEmojiResponse";
|
30
32
|
import { DeleteAccount } from "./types/DeleteAccount";
|
31
33
|
import { DeleteComment } from "./types/DeleteComment";
|
32
34
|
import { DeleteCommunity } from "./types/DeleteCommunity";
|
33
35
|
import { DeleteCustomEmoji } from "./types/DeleteCustomEmoji";
|
36
|
+
import { DeleteCustomEmojiResponse } from "./types/DeleteCustomEmojiResponse";
|
34
37
|
import { DeletePost } from "./types/DeletePost";
|
35
38
|
import { DeletePrivateMessage } from "./types/DeletePrivateMessage";
|
39
|
+
import { DistinguishComment } from "./types/DistinguishComment";
|
36
40
|
import { EditComment } from "./types/EditComment";
|
37
41
|
import { EditCommunity } from "./types/EditCommunity";
|
38
42
|
import { EditCustomEmoji } from "./types/EditCustomEmoji";
|
@@ -42,12 +46,15 @@ import { EditSite } from "./types/EditSite";
|
|
42
46
|
import { FeaturePost } from "./types/FeaturePost";
|
43
47
|
import { FollowCommunity } from "./types/FollowCommunity";
|
44
48
|
import { GetBannedPersons } from "./types/GetBannedPersons";
|
49
|
+
import { GetCaptcha } from "./types/GetCaptcha";
|
45
50
|
import { GetCaptchaResponse } from "./types/GetCaptchaResponse";
|
46
51
|
import { GetComment } from "./types/GetComment";
|
47
52
|
import { GetComments } from "./types/GetComments";
|
48
53
|
import { GetCommentsResponse } from "./types/GetCommentsResponse";
|
49
54
|
import { GetCommunity } from "./types/GetCommunity";
|
50
55
|
import { GetCommunityResponse } from "./types/GetCommunityResponse";
|
56
|
+
import { GetFederatedInstances } from "./types/GetFederatedInstances";
|
57
|
+
import { GetFederatedInstancesResponse } from "./types/GetFederatedInstancesResponse";
|
51
58
|
import { GetModlog } from "./types/GetModlog";
|
52
59
|
import { GetModlogResponse } from "./types/GetModlogResponse";
|
53
60
|
import { GetPersonDetails } from "./types/GetPersonDetails";
|
@@ -90,7 +97,6 @@ import { MarkCommentReplyAsRead } from "./types/MarkCommentReplyAsRead";
|
|
90
97
|
import { MarkPersonMentionAsRead } from "./types/MarkPersonMentionAsRead";
|
91
98
|
import { MarkPostAsRead } from "./types/MarkPostAsRead";
|
92
99
|
import { MarkPrivateMessageAsRead } from "./types/MarkPrivateMessageAsRead";
|
93
|
-
import { UploadImage, UploadImageResponse } from "./types/others";
|
94
100
|
import { PasswordChangeAfterReset } from "./types/PasswordChangeAfterReset";
|
95
101
|
import { PasswordReset } from "./types/PasswordReset";
|
96
102
|
import { PersonMentionResponse } from "./types/PersonMentionResponse";
|
@@ -122,13 +128,12 @@ import { SearchResponse } from "./types/SearchResponse";
|
|
122
128
|
import { SiteResponse } from "./types/SiteResponse";
|
123
129
|
import { TransferCommunity } from "./types/TransferCommunity";
|
124
130
|
import { VerifyEmail } from "./types/VerifyEmail";
|
131
|
+
import { UploadImage, UploadImageResponse } from "./types/others";
|
125
132
|
/**
|
126
133
|
* Helps build lemmy HTTP requests.
|
127
134
|
*/
|
128
135
|
export declare class LemmyHttp {
|
129
|
-
private
|
130
|
-
private headers;
|
131
|
-
private pictrsUrl;
|
136
|
+
#private;
|
132
137
|
/**
|
133
138
|
* Generates a new instance of LemmyHttp.
|
134
139
|
* @param baseUrl the base url, without the vX version: https://lemmy.ml -> goes to https://lemmy.ml/api/vX
|
@@ -364,7 +369,7 @@ export declare class LemmyHttp {
|
|
364
369
|
*
|
365
370
|
* `HTTP.POST /comment/mark_as_read`
|
366
371
|
*/
|
367
|
-
markCommentReplyAsRead(form: MarkCommentReplyAsRead): Promise<
|
372
|
+
markCommentReplyAsRead(form: MarkCommentReplyAsRead): Promise<CommentReplyResponse>;
|
368
373
|
/**
|
369
374
|
* Like / vote on a comment.
|
370
375
|
*
|
@@ -377,6 +382,12 @@ export declare class LemmyHttp {
|
|
377
382
|
* `HTTP.PUT /comment/save`
|
378
383
|
*/
|
379
384
|
saveComment(form: SaveComment): Promise<CommentResponse>;
|
385
|
+
/**
|
386
|
+
* Distinguishes a comment (speak as moderator)
|
387
|
+
*
|
388
|
+
* `HTTP.POST /comment/distinguish`
|
389
|
+
*/
|
390
|
+
distinguishComment(form: DistinguishComment): Promise<CommentResponse>;
|
380
391
|
/**
|
381
392
|
* Get / fetch comments.
|
382
393
|
*
|
@@ -514,7 +525,7 @@ export declare class LemmyHttp {
|
|
514
525
|
*
|
515
526
|
* `HTTP.GET /user/get_captcha`
|
516
527
|
*/
|
517
|
-
getCaptcha(): Promise<GetCaptchaResponse>;
|
528
|
+
getCaptcha(form: GetCaptcha): Promise<GetCaptchaResponse>;
|
518
529
|
/**
|
519
530
|
* Delete your account.
|
520
531
|
*
|
@@ -622,23 +633,27 @@ export declare class LemmyHttp {
|
|
622
633
|
*
|
623
634
|
* `HTTP.POST /custom_emoji`
|
624
635
|
*/
|
625
|
-
createCustomEmoji(form: CreateCustomEmoji): Promise<
|
636
|
+
createCustomEmoji(form: CreateCustomEmoji): Promise<CustomEmojiResponse>;
|
626
637
|
/**
|
627
638
|
* Edit an existing custom emoji
|
628
639
|
*
|
629
640
|
* `HTTP.PUT /custom_emoji`
|
630
641
|
*/
|
631
|
-
editCustomEmoji(form: EditCustomEmoji): Promise<
|
642
|
+
editCustomEmoji(form: EditCustomEmoji): Promise<CustomEmojiResponse>;
|
632
643
|
/**
|
633
644
|
* Delete a custom emoji
|
634
645
|
*
|
635
646
|
* `HTTP.Post /custom_emoji/delete`
|
636
647
|
*/
|
637
|
-
deleteCustomEmoji(form: DeleteCustomEmoji): Promise<
|
648
|
+
deleteCustomEmoji(form: DeleteCustomEmoji): Promise<DeleteCustomEmojiResponse>;
|
649
|
+
/**
|
650
|
+
* Fetch federated instances.
|
651
|
+
*
|
652
|
+
* `HTTP.Get /federated_instances`
|
653
|
+
*/
|
654
|
+
getFederatedInstances(form: GetFederatedInstances): Promise<GetFederatedInstancesResponse>;
|
638
655
|
/**
|
639
656
|
* Upload an image to the server.
|
640
657
|
*/
|
641
658
|
uploadImage({ image, auth, }: UploadImage): Promise<UploadImageResponse>;
|
642
|
-
private buildFullUrl;
|
643
|
-
private wrapper;
|
644
659
|
}
|