lemmy-js-client 1.0.0-multi-community.11 → 1.0.0-multi-community.13
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 +4 -2
- package/dist/http.js +8 -0
- package/dist/index.d.ts +3 -0
- package/dist/types/CommunityActions.d.ts +5 -0
- package/dist/types/FollowMultiCommunity.d.ts +5 -0
- package/dist/types/FollowMultiCommunity.js +2 -0
- package/dist/types/GetMultiCommunityResponse.d.ts +6 -0
- package/dist/types/GetMultiCommunityResponse.js +2 -0
- package/dist/types/LemmyErrorType.d.ts +2 -2
- package/dist/types/ListMultiCommunities.d.ts +2 -1
- package/dist/types/MultiCommunity.d.ts +1 -0
- package/dist/types/MultiCommunityFollow.d.ts +8 -0
- package/dist/types/MultiCommunityFollow.js +2 -0
- package/dist/types/ResolveObjectResponse.d.ts +2 -2
- package/package.json +1 -1
package/dist/http.d.ts
CHANGED
@@ -147,7 +147,8 @@ import { ListMultiCommunitiesResponse } from "./types/ListMultiCommunitiesRespon
|
|
147
147
|
import { AdminListUsersResponse } from "./types/AdminListUsersResponse";
|
148
148
|
import { CreateOrDeleteMultiCommunityEntry } from "./types/CreateOrDeleteMultiCommunityEntry";
|
149
149
|
import { GetMultiCommunity } from "./types/GetMultiCommunity";
|
150
|
-
import {
|
150
|
+
import { GetMultiCommunityResponse } from "./types/GetMultiCommunityResponse";
|
151
|
+
import { FollowMultiCommunity } from "./types/FollowMultiCommunity";
|
151
152
|
type RequestOptions = Pick<RequestInit, "signal">;
|
152
153
|
/**
|
153
154
|
* Helps build lemmy HTTP requests.
|
@@ -745,10 +746,11 @@ export declare class LemmyHttp extends Controller {
|
|
745
746
|
donationDialogShown(options?: RequestOptions): Promise<SuccessResponse>;
|
746
747
|
createMultiCommunity(form: CreateMultiCommunity, options?: RequestOptions): Promise<MultiCommunity>;
|
747
748
|
updateMultiCommunity(form: UpdateMultiCommunity, options?: RequestOptions): Promise<SuccessResponse>;
|
748
|
-
getMultiCommunity(form: GetMultiCommunity, options?: RequestOptions): Promise<
|
749
|
+
getMultiCommunity(form: GetMultiCommunity, options?: RequestOptions): Promise<GetMultiCommunityResponse>;
|
749
750
|
createMultiCommunityEntry(form: CreateOrDeleteMultiCommunityEntry, options?: RequestOptions): Promise<SuccessResponse>;
|
750
751
|
deleteMultiCommunityEntry(form: CreateOrDeleteMultiCommunityEntry, options?: RequestOptions): Promise<SuccessResponse>;
|
751
752
|
listMultiCommunities(form: ListMultiCommunities, options?: RequestOptions): Promise<ListMultiCommunitiesResponse>;
|
753
|
+
followMultiCommunity(form: FollowMultiCommunity, options?: RequestOptions): Promise<SuccessResponse>;
|
752
754
|
/**
|
753
755
|
* Set the headers (can be used to set the auth header)
|
754
756
|
*/
|
package/dist/http.js
CHANGED
@@ -934,6 +934,9 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
|
|
934
934
|
listMultiCommunities(form, options) {
|
935
935
|
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/multi_community/list", form, options);
|
936
936
|
}
|
937
|
+
followMultiCommunity(form, options) {
|
938
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/multi_community/follow", form, options);
|
939
|
+
}
|
937
940
|
/**
|
938
941
|
* Set the headers (can be used to set the auth header)
|
939
942
|
*/
|
@@ -2017,6 +2020,11 @@ __decorate([
|
|
2017
2020
|
__param(0, (0, runtime_1.Body)()),
|
2018
2021
|
__param(1, (0, runtime_1.Inject)())
|
2019
2022
|
], LemmyHttp.prototype, "listMultiCommunities", null);
|
2023
|
+
__decorate([
|
2024
|
+
(0, runtime_1.Post)("/multi_community/follow"),
|
2025
|
+
__param(0, (0, runtime_1.Body)()),
|
2026
|
+
__param(1, (0, runtime_1.Inject)())
|
2027
|
+
], LemmyHttp.prototype, "followMultiCommunity", null);
|
2020
2028
|
exports.LemmyHttp = LemmyHttp = __decorate([
|
2021
2029
|
(0, runtime_1.Route)("api/v4")
|
2022
2030
|
], LemmyHttp);
|
package/dist/index.d.ts
CHANGED
@@ -116,6 +116,7 @@ export { FederationBlockList } from "./types/FederationBlockList";
|
|
116
116
|
export { FederationError } from "./types/FederationError";
|
117
117
|
export { FederationMode } from "./types/FederationMode";
|
118
118
|
export { FollowCommunity } from "./types/FollowCommunity";
|
119
|
+
export { FollowMultiCommunity } from "./types/FollowMultiCommunity";
|
119
120
|
export { GenerateTotpSecretResponse } from "./types/GenerateTotpSecretResponse";
|
120
121
|
export { GetCaptchaResponse } from "./types/GetCaptchaResponse";
|
121
122
|
export { GetComment } from "./types/GetComment";
|
@@ -130,6 +131,7 @@ export { GetFederatedInstancesResponse } from "./types/GetFederatedInstancesResp
|
|
130
131
|
export { GetModlog } from "./types/GetModlog";
|
131
132
|
export { GetModlogResponse } from "./types/GetModlogResponse";
|
132
133
|
export { GetMultiCommunity } from "./types/GetMultiCommunity";
|
134
|
+
export { GetMultiCommunityResponse } from "./types/GetMultiCommunityResponse";
|
133
135
|
export { GetPersonDetails } from "./types/GetPersonDetails";
|
134
136
|
export { GetPersonDetailsResponse } from "./types/GetPersonDetailsResponse";
|
135
137
|
export { GetPost } from "./types/GetPost";
|
@@ -247,6 +249,7 @@ export { ModTransferCommunityView } from "./types/ModTransferCommunityView";
|
|
247
249
|
export { ModlogActionType } from "./types/ModlogActionType";
|
248
250
|
export { ModlogCombinedView } from "./types/ModlogCombinedView";
|
249
251
|
export { MultiCommunity } from "./types/MultiCommunity";
|
252
|
+
export { MultiCommunityFollow } from "./types/MultiCommunityFollow";
|
250
253
|
export { MultiCommunityId } from "./types/MultiCommunityId";
|
251
254
|
export { MultiCommunityView } from "./types/MultiCommunityView";
|
252
255
|
export { MyUserInfo } from "./types/MyUserInfo";
|
@@ -32,4 +32,9 @@ export type CommunityActions = {
|
|
32
32
|
* When their ban expires.
|
33
33
|
*/
|
34
34
|
ban_expires?: string;
|
35
|
+
/**
|
36
|
+
* True indicates that user is following this community as part of multi-comm (not part of
|
37
|
+
* subscribed feed)
|
38
|
+
*/
|
39
|
+
is_multi_community_follow: boolean | null;
|
35
40
|
};
|
@@ -356,8 +356,8 @@ export type LemmyErrorType = {
|
|
356
356
|
error: "couldnt_create_email_verification";
|
357
357
|
} | {
|
358
358
|
error: "email_notifications_disabled";
|
359
|
-
} | {
|
360
|
-
error: "invalid_community_id";
|
361
359
|
} | {
|
362
360
|
error: "multi_community_update_wrong_user";
|
361
|
+
} | {
|
362
|
+
error: "cannot_combine_community_id_and_multi_community_id";
|
363
363
|
};
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import type { CommunityFollowerState } from "./CommunityFollowerState";
|
2
|
+
import type { MultiCommunityId } from "./MultiCommunityId";
|
3
|
+
import type { PersonId } from "./PersonId";
|
4
|
+
export type MultiCommunityFollow = {
|
5
|
+
multi_community_id: MultiCommunityId;
|
6
|
+
person_id: PersonId;
|
7
|
+
follow_state: CommunityFollowerState;
|
8
|
+
};
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import type { CommentView } from "./CommentView";
|
2
2
|
import type { CommunityView } from "./CommunityView";
|
3
|
-
import type {
|
3
|
+
import type { MultiCommunity } from "./MultiCommunity";
|
4
4
|
import type { PersonView } from "./PersonView";
|
5
5
|
import type { PostView } from "./PostView";
|
6
6
|
/**
|
@@ -11,5 +11,5 @@ export type ResolveObjectResponse = {
|
|
11
11
|
post?: PostView;
|
12
12
|
community?: CommunityView;
|
13
13
|
person?: PersonView;
|
14
|
-
multi_community?:
|
14
|
+
multi_community?: MultiCommunity;
|
15
15
|
};
|
package/package.json
CHANGED