lemmy-js-client 0.19.0-rc.3 → 0.19.0-rc.5
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 +8 -0
- package/dist/http.js +12 -12
- package/dist/index.d.ts +4 -0
- package/dist/types/BlockInstance.d.ts +6 -0
- package/dist/types/BlockInstance.js +2 -0
- package/dist/types/BlockInstanceResponse.d.ts +3 -0
- package/dist/types/BlockInstanceResponse.js +3 -0
- package/dist/types/InstanceBlockView.d.ts +8 -0
- package/dist/types/InstanceBlockView.js +2 -0
- package/dist/types/LocalUser.d.ts +2 -0
- package/dist/types/MyUserInfo.d.ts +2 -0
- package/dist/types/PostAggregates.d.ts +2 -0
- package/dist/types/PostListingMode.d.ts +1 -0
- package/dist/types/PostListingMode.js +3 -0
- package/package.json +1 -1
package/dist/http.d.ts
CHANGED
@@ -130,6 +130,8 @@ import { SiteResponse } from "./types/SiteResponse";
|
|
130
130
|
import { TransferCommunity } from "./types/TransferCommunity";
|
131
131
|
import { VerifyEmail } from "./types/VerifyEmail";
|
132
132
|
import { UploadImage, UploadImageResponse } from "./types/others";
|
133
|
+
import { BlockInstance } from "./types/BlockInstance";
|
134
|
+
import { BlockInstanceResponse } from "./types/BlockInstanceResponse";
|
133
135
|
/**
|
134
136
|
* Helps build lemmy HTTP requests.
|
135
137
|
*/
|
@@ -656,6 +658,12 @@ export declare class LemmyHttp {
|
|
656
658
|
* `HTTP.Get /federated_instances`
|
657
659
|
*/
|
658
660
|
getFederatedInstances(form?: GetFederatedInstances): Promise<GetFederatedInstancesResponse>;
|
661
|
+
/**
|
662
|
+
* Block an instance
|
663
|
+
*
|
664
|
+
* `HTTP.POST /site/block`
|
665
|
+
*/
|
666
|
+
blockInstance(form: BlockInstance): Promise<BlockInstanceResponse>;
|
659
667
|
/**
|
660
668
|
* Upload an image to the server.
|
661
669
|
*/
|
package/dist/http.js
CHANGED
@@ -712,9 +712,7 @@ class LemmyHttp {
|
|
712
712
|
* `HTTP.POST /custom_emoji`
|
713
713
|
*/
|
714
714
|
createCustomEmoji(form) {
|
715
|
-
return
|
716
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/custom_emoji", form);
|
717
|
-
});
|
715
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/custom_emoji", form);
|
718
716
|
}
|
719
717
|
/**
|
720
718
|
* Edit an existing custom emoji
|
@@ -722,9 +720,7 @@ class LemmyHttp {
|
|
722
720
|
* `HTTP.PUT /custom_emoji`
|
723
721
|
*/
|
724
722
|
editCustomEmoji(form) {
|
725
|
-
return
|
726
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/custom_emoji", form);
|
727
|
-
});
|
723
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/custom_emoji", form);
|
728
724
|
}
|
729
725
|
/**
|
730
726
|
* Delete a custom emoji
|
@@ -732,9 +728,7 @@ class LemmyHttp {
|
|
732
728
|
* `HTTP.Post /custom_emoji/delete`
|
733
729
|
*/
|
734
730
|
deleteCustomEmoji(form) {
|
735
|
-
return
|
736
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/custom_emoji/delete", form);
|
737
|
-
});
|
731
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/custom_emoji/delete", form);
|
738
732
|
}
|
739
733
|
/**
|
740
734
|
* Fetch federated instances.
|
@@ -742,9 +736,15 @@ class LemmyHttp {
|
|
742
736
|
* `HTTP.Get /federated_instances`
|
743
737
|
*/
|
744
738
|
getFederatedInstances(form = {}) {
|
745
|
-
return
|
746
|
-
|
747
|
-
|
739
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/federated_instances", form);
|
740
|
+
}
|
741
|
+
/**
|
742
|
+
* Block an instance
|
743
|
+
*
|
744
|
+
* `HTTP.POST /site/block`
|
745
|
+
*/
|
746
|
+
blockInstance(form) {
|
747
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/site/block", form);
|
748
748
|
}
|
749
749
|
/**
|
750
750
|
* Upload an image to the server.
|
package/dist/index.d.ts
CHANGED
@@ -19,6 +19,8 @@ export { BanPersonResponse } from "./types/BanPersonResponse";
|
|
19
19
|
export { BannedPersonsResponse } from "./types/BannedPersonsResponse";
|
20
20
|
export { BlockCommunity } from "./types/BlockCommunity";
|
21
21
|
export { BlockCommunityResponse } from "./types/BlockCommunityResponse";
|
22
|
+
export { BlockInstance } from "./types/BlockInstance";
|
23
|
+
export { BlockInstanceResponse } from "./types/BlockInstanceResponse";
|
22
24
|
export { BlockPerson } from "./types/BlockPerson";
|
23
25
|
export { BlockPersonResponse } from "./types/BlockPersonResponse";
|
24
26
|
export { CaptchaResponse } from "./types/CaptchaResponse";
|
@@ -117,6 +119,7 @@ export { GetUnreadRegistrationApplicationCount } from "./types/GetUnreadRegistra
|
|
117
119
|
export { GetUnreadRegistrationApplicationCountResponse } from "./types/GetUnreadRegistrationApplicationCountResponse";
|
118
120
|
export { HideCommunity } from "./types/HideCommunity";
|
119
121
|
export { Instance } from "./types/Instance";
|
122
|
+
export { InstanceBlockView } from "./types/InstanceBlockView";
|
120
123
|
export { InstanceId } from "./types/InstanceId";
|
121
124
|
export { Language } from "./types/Language";
|
122
125
|
export { LanguageId } from "./types/LanguageId";
|
@@ -194,6 +197,7 @@ export { PostFeatureType } from "./types/PostFeatureType";
|
|
194
197
|
export { PostId } from "./types/PostId";
|
195
198
|
export { PostJoin } from "./types/PostJoin";
|
196
199
|
export { PostJoinResponse } from "./types/PostJoinResponse";
|
200
|
+
export { PostListingMode } from "./types/PostListingMode";
|
197
201
|
export { PostOrCommentId } from "./types/PostOrCommentId";
|
198
202
|
export { PostReport } from "./types/PostReport";
|
199
203
|
export { PostReportId } from "./types/PostReportId";
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import type { ListingType } from "./ListingType";
|
2
2
|
import type { LocalUserId } from "./LocalUserId";
|
3
3
|
import type { PersonId } from "./PersonId";
|
4
|
+
import type { PostListingMode } from "./PostListingMode";
|
4
5
|
import type { SortType } from "./SortType";
|
5
6
|
export interface LocalUser {
|
6
7
|
id: LocalUserId;
|
@@ -26,4 +27,5 @@ export interface LocalUser {
|
|
26
27
|
auto_expand: boolean;
|
27
28
|
infinite_scroll_enabled: boolean;
|
28
29
|
admin: boolean;
|
30
|
+
post_listing_mode: PostListingMode;
|
29
31
|
}
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import type { CommunityBlockView } from "./CommunityBlockView";
|
2
2
|
import type { CommunityFollowerView } from "./CommunityFollowerView";
|
3
3
|
import type { CommunityModeratorView } from "./CommunityModeratorView";
|
4
|
+
import type { InstanceBlockView } from "./InstanceBlockView";
|
4
5
|
import type { LanguageId } from "./LanguageId";
|
5
6
|
import type { LocalUserView } from "./LocalUserView";
|
6
7
|
import type { PersonBlockView } from "./PersonBlockView";
|
@@ -9,6 +10,7 @@ export interface MyUserInfo {
|
|
9
10
|
follows: Array<CommunityFollowerView>;
|
10
11
|
moderates: Array<CommunityModeratorView>;
|
11
12
|
community_blocks: Array<CommunityBlockView>;
|
13
|
+
instance_blocks: Array<InstanceBlockView>;
|
12
14
|
person_blocks: Array<PersonBlockView>;
|
13
15
|
discussion_languages: Array<LanguageId>;
|
14
16
|
}
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import type { CommunityId } from "./CommunityId";
|
2
|
+
import type { InstanceId } from "./InstanceId";
|
2
3
|
import type { PersonId } from "./PersonId";
|
3
4
|
import type { PostId } from "./PostId";
|
4
5
|
export interface PostAggregates {
|
@@ -18,4 +19,5 @@ export interface PostAggregates {
|
|
18
19
|
community_id: CommunityId;
|
19
20
|
creator_id: PersonId;
|
20
21
|
controversy_rank: number;
|
22
|
+
instance_id: InstanceId;
|
21
23
|
}
|
@@ -0,0 +1 @@
|
|
1
|
+
export type PostListingMode = "List" | "Card" | "SmallCard";
|