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 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 { MultiCommunityView } from "./types/MultiCommunityView";
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<MultiCommunityView>;
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
  };
@@ -0,0 +1,5 @@
1
+ import type { MultiCommunityId } from "./MultiCommunityId";
2
+ export type FollowMultiCommunity = {
3
+ multi_community_id: MultiCommunityId;
4
+ follow: boolean;
5
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,6 @@
1
+ import type { CommunityView } from "./CommunityView";
2
+ import type { MultiCommunity } from "./MultiCommunity";
3
+ export type GetMultiCommunityResponse = {
4
+ multi: MultiCommunity;
5
+ entries: Array<CommunityView>;
6
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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
  };
@@ -1,4 +1,5 @@
1
1
  import type { PersonId } from "./PersonId";
2
2
  export type ListMultiCommunities = {
3
- owner_id?: PersonId;
3
+ creator_id?: PersonId;
4
+ followed_only?: boolean;
4
5
  };
@@ -7,6 +7,7 @@ export type MultiCommunity = {
7
7
  name: string;
8
8
  title?: string;
9
9
  description?: string;
10
+ local: boolean;
10
11
  deleted: boolean;
11
12
  ap_id: DbUrl;
12
13
  published: string;
@@ -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
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,6 +1,6 @@
1
1
  import type { CommentView } from "./CommentView";
2
2
  import type { CommunityView } from "./CommunityView";
3
- import type { MultiCommunityView } from "./MultiCommunityView";
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?: MultiCommunityView;
14
+ multi_community?: MultiCommunity;
15
15
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "lemmy-js-client",
3
3
  "description": "A javascript / typescript client for Lemmy",
4
- "version": "1.0.0-multi-community.11",
4
+ "version": "1.0.0-multi-community.13",
5
5
  "author": "Dessalines",
6
6
  "license": "AGPL-3.0",
7
7
  "main": "./dist/index.js",